Doc AWS SDK 예제 GitHub 리포지토리에서 더 많은 SDK 예제를 사용할 수 있습니다. AWS
기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.
AWS SDK 또는 CLI와 ListSteps
함께 사용
다음 코드 예제는 ListSteps
의 사용 방법을 보여 줍니다.
- CLI
-
- AWS CLI
-
다음 명령은 클러스터 ID가
j-3SD91U2E1L2QX
인 클러스터의 모든 단계를 나열합니다.aws emr list-steps --cluster-id
j-3SD91U2E1L2QX
-
API 세부 정보는 AWS CLI 명령 참조의 ListSteps
를 참조하세요.
-
- Python
-
- SDK for Python (Boto3)
-
참고
GitHub에 더 많은 내용이 있습니다. AWS 코드 예시 리포지토리
에서 전체 예시를 찾고 설정 및 실행하는 방법을 배워보세요. def list_steps(cluster_id, emr_client): """ Gets a list of steps for the specified cluster. In this example, all steps are returned, including completed and failed steps. :param cluster_id: The ID of the cluster. :param emr_client: The Boto3 EMR client object. :return: The list of steps for the specified cluster. """ try: response = emr_client.list_steps(ClusterId=cluster_id) steps = response["Steps"] logger.info("Got %s steps for cluster %s.", len(steps), cluster_id) except ClientError: logger.exception("Couldn't get steps for cluster %s.", cluster_id) raise else: return steps
-
API 세부 정보는 AWS SDK for Python (Boto3) API 참조의 ListSteps를 참조하십시오.
-
DescribeStep
RunJobFlow