を使用して Amazon EMR クラスターのステップを一覧表示するAWSSDK - AWSSDK コードサンプル

まだまだありますAWSSDK のサンプルは以下にあります。AWSドキュメント SDK サンプル GitHubレポ。

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

を使用して Amazon EMR クラスターのステップを一覧表示するAWSSDK

次のコード例は、Amazon EMR クラスターのステップを一覧表示する方法を示しています。

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 の詳細については、を参照してください。ListStepsAWSPython (ボト3) 用 SDK API リファレンス