AppRegistry を使用した の例 AWS CLI - AWS Command Line Interface

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

AppRegistry を使用した の例 AWS CLI

次のコード例は、 AWS Command Line Interface で を使用してアクションを実行し、一般的なシナリオを実装する方法を示しています AppRegistry。

アクションはより大きなプログラムからのコードの抜粋であり、コンテキスト内で実行する必要があります。アクションは個々のサービス機能を呼び出す方法を示していますが、コンテキスト内のアクションは、関連するシナリオで確認できます。

各例には、完全なソースコードへのリンクが含まれています。このリンクには、コンテキスト内でコードをセットアップして実行する方法の手順が記載されています。

トピック

アクション

次の例は、associate-attribute-group を使用する方法を説明しています。

AWS CLI

属性グループを関連付けるには

次のassociate-attribute-group例では、アカウント内の特定の属性グループ AWS を AWS アカウント内の特定のアプリケーションに関連付けます。

aws servicecatalog-appregistry associate-attribute-group \ --application "ExampleApplication" \ --attribute-group "ExampleAttributeGroup"

出力:

{ "applicationArn": "arn:aws:servicecatalog:us-west-2:813737243517:/applications/0ars38r6btoohvpvd9gqrptt9l", "attributeGroupArn": "arn:aws:servicecatalog:us-west-2:813737243517:/attribute-groups/01sj5xdwhbw54kejwnt09fnpcl" }

詳細については、「Service Catalog 管理者ガイド」の「属性グループの関連付けと関連付け解除」を参照してください。 AWS AppRegistry

  • API 詳細については、「 コマンドリファレンスAssociateAttributeGroup」の「」を参照してください。 AWS CLI

次の例は、create-application を使用する方法を説明しています。

AWS CLI

アプリケーションを作成するには

次のcreate-application例では、 AWS アカウントに新しいアプリケーションを作成します。

aws servicecatalog-appregistry create-application \ --name "ExampleApplication"

出力:

{ "application": { "id": "0ars38r6btoohvpvd9gqrptt9l", "arn": "arn:aws:servicecatalog:us-west-2:813737243517:/applications/0ars38r6btoohvpvd9gqrptt9l", "name": "ExampleApplication", "creationTime": "2023-02-28T21:10:10.820000+00:00", "lastUpdateTime": "2023-02-28T21:10:10.820000+00:00", "tags": {} } }

詳細については、AWS 「Service Catalog AppRegistry 管理者ガイド」の「アプリケーションの作成」を参照してください。

  • API 詳細については、「 コマンドリファレンスCreateApplication」の「」を参照してください。 AWS CLI

次のコード例は、create-attribute-group を使用する方法を示しています。

AWS CLI

属性グループを作成するには

次のcreate-attribute-group例では、 AWS アカウントに新しい属性グループを作成します。

aws servicecatalog-appregistry create-attribute-group \ --name "ExampleAttributeGroup" \ --attributes '{"SomeKey1":"SomeValue1","SomeKey2":"SomeValue2"}'

出力:

{ "attributeGroup": { "id": "01sj5xdwhbw54kejwnt09fnpcl", "arn": "arn:aws:servicecatalog:us-west-2:813737243517:/attribute-groups/01sj5xdwhbw54kejwnt09fnpcl", "name": "ExampleAttributeGroup", "creationTime": "2023-02-28T20:38:01.389000+00:00", "lastUpdateTime": "2023-02-28T20:38:01.389000+00:00", "tags": {} } }

詳細については、AWS 「Service Catalog AppRegistry 管理者ガイド」の「属性グループの作成」を参照してください。

  • API 詳細については、「 コマンドリファレンスCreateAttributeGroup」の「」を参照してください。 AWS CLI

次の例は、delete-application を使用する方法を説明しています。

AWS CLI

アプリケーションを削除するには

次のdelete-application例では、 AWS アカウント内の特定のアプリケーションを削除します。

aws servicecatalog-appregistry delete-application \ --application "ExampleApplication3"

出力:

{ "application": { "id": "055gw7aynr1i5mbv7kjwzx5945", "arn": "arn:aws:servicecatalog:us-west-2:813737243517:/applications/055gw7aynr1i5mbv7kjwzx5945", "name": "ExampleApplication3", "creationTime": "2023-02-28T22:06:28.228000+00:00", "lastUpdateTime": "2023-02-28T22:06:28.228000+00:00" } }

詳細については、AWS 「Service Catalog AppRegistry 管理者ガイド」の「アプリケーションの削除」を参照してください。

  • API 詳細については、「 コマンドリファレンスDeleteApplication」の「」を参照してください。 AWS CLI

次の例は、delete-attribute-group を使用する方法を説明しています。

AWS CLI

例 8: 属性グループを削除するには

次のdelete-attribute-group例では、 AWS アカウント内の特定の属性グループを削除します。

aws servicecatalog-appregistry delete-attribute-group \ --attribute-group "ExampleAttributeGroup3"

出力:

{ "attributeGroup": { "id": "011ge6y3emyjijt8dw8jn6r0hv", "arn": "arn:aws:servicecatalog:us-west-2:813737243517:/attribute-groups/011ge6y3emyjijt8dw8jn6r0hv", "name": "ExampleAttributeGroup3", "creationTime": "2023-02-28T22:05:35.224000+00:00", "lastUpdateTime": "2023-02-28T22:05:35.224000+00:00" } }

詳細については、AWS 「Service Catalog AppRegistry 管理者ガイド」の「属性グループの削除」を参照してください。

  • API 詳細については、「 コマンドリファレンスDeleteAttributeGroup」の「」を参照してください。 AWS CLI

次のコード例は、get-application を使用する方法を示しています。

AWS CLI

アプリケーションを取得するには

次のget-application例では、 AWS アカウント内の特定のアプリケーションに関するメタデータ情報を取得します。

aws servicecatalog-appregistry get-application \ --application "ExampleApplication"

出力:

{ "id": "0ars38r6btoohvpvd9gqrptt9l", "arn": "arn:aws:servicecatalog:us-west-2:813737243517:/applications/0ars38r6btoohvpvd9gqrptt9l", "name": "ExampleApplication", "creationTime": "2023-02-28T21:10:10.820000+00:00", "lastUpdateTime": "2023-02-28T21:10:10.820000+00:00", "associatedResourceCount": 0, "tags": { "aws:servicecatalog:applicationName": "ExampleApplication" }, "integrations": { "resourceGroup": { "state": "CREATE_COMPLETE", "arn": "arn:aws:resource-groups:us-west-2:813737243517:group/AWS_AppRegistry_Application-ExampleApplication" } } }

詳細については、AWS 「Service Catalog AppRegistry 管理者ガイド」の「アプリケーションの詳細の使用」を参照してください。

  • API 詳細については、「 コマンドリファレンスGetApplication」の「」を参照してください。 AWS CLI

次の例は、get-attribute-group を使用する方法を説明しています。

AWS CLI

属性グループを取得するには

次のget-attribute-group例では、 AWS アカウント内の特定の属性グループを取得します。

aws servicecatalog-appregistry get-attribute-group \ --attribute-group "ExampleAttributeGroup"

出力:

{ "id": "01sj5xdwhbw54kejwnt09fnpcl", "arn": "arn:aws:servicecatalog:us-west-2:813737243517:/attribute-groups/01sj5xdwhbw54kejwnt09fnpcl", "name": "ExampleAttributeGroup", "attributes": "{\"SomeKey1\":\"SomeValue1\",\"SomeKey2\":\"SomeValue2\"}", "creationTime": "2023-02-28T20:38:01.389000+00:00", "lastUpdateTime": "2023-02-28T20:38:01.389000+00:00", "tags": { "aws:servicecatalog:attributeGroupName": "ExampleAttributeGroup" } }

詳細については、AWS 「Service Catalog AppRegistry 管理者ガイド」の「属性グループのメタデータの管理」を参照してください。

  • API 詳細については、「 コマンドリファレンスGetAttributeGroup」の「」を参照してください。 AWS CLI

次のコード例は、list-applications を使用する方法を示しています。

AWS CLI

アプリケーションを一覧表示するには

次のlist-applications例では、 AWS アカウント内のすべてのアプリケーションのリストを取得します。

aws servicecatalog-appregistry list-applications

出力:

{ "applications": [ { "id": "03axw94pjfj3uan00tcgbrxnkw", "arn": "arn:aws:servicecatalog:us-west-2:813737243517:/applications/03axw94pjfj3uan00tcgbrxnkw", "name": "ExampleApplication2", "creationTime": "2023-02-28T21:59:34.094000+00:00", "lastUpdateTime": "2023-02-28T21:59:34.094000+00:00" }, { "id": "055gw7aynr1i5mbv7kjwzx5945", "arn": "arn:aws:servicecatalog:us-west-2:813737243517:/applications/055gw7aynr1i5mbv7kjwzx5945", "name": "ExampleApplication3", "creationTime": "2023-02-28T22:06:28.228000+00:00", "lastUpdateTime": "2023-02-28T22:06:28.228000+00:00" }, { "id": "0ars38r6btoohvpvd9gqrptt9l", "arn": "arn:aws:servicecatalog:us-west-2:813737243517:/applications/0ars38r6btoohvpvd9gqrptt9l", "name": "ExampleApplication", "description": "This is an example application", "creationTime": "2023-02-28T21:10:10.820000+00:00", "lastUpdateTime": "2023-02-28T21:24:19.729000+00:00" } ] }

詳細については、AWS 「Service Catalog AppRegistry 管理者ガイド」の「アプリケーションの詳細の表示」を参照してください。

  • API 詳細については、「 コマンドリファレンスListApplications」の「」を参照してください。 AWS CLI

次のコード例は、list-associated-attribute-groups を使用する方法を示しています。

AWS CLI

関連付けられた属性グループを一覧表示するには

次のlist-associated-attribute-groups例では、 AWS アカウント内の特定のアプリケーションに関連付けられている AWS アカウント内のすべての属性グループのリストを取得します。

aws servicecatalog-appregistry list-associated-attribute-groups \ --application "ExampleApplication"

出力:

{ "attributeGroups": [ "01sj5xdwhbw54kejwnt09fnpcl" ] }

詳細については、「Service Catalog 管理者ガイド」の「属性グループの関連付けと関連付け解除」を参照してください。 AWS AppRegistry

次の例は、list-attribute-groups-for-application を使用する方法を説明しています。

AWS CLI

アプリケーションの属性グループを一覧表示するには

次のlist-attribute-groups-for-application例では、 AWS アカウント内の特定のアプリケーションに関連付けられている AWS アカウント内のすべての属性グループの詳細を一覧表示します。

aws servicecatalog-appregistry list-attribute-groups-for-application \ --application "ExampleApplication"

出力:

{ "attributeGroupsDetails": [ { "id": "01sj5xdwhbw54kejwnt09fnpcl", "arn": "arn:aws:servicecatalog:us-west-2:813737243517:/attribute-groups/01sj5xdwhbw54kejwnt09fnpcl", "name": "ExampleAttributeGroup" } ] }

詳細については、AWS 「Service Catalog AppRegistry 管理者ガイド」の「属性グループの詳細の表示」を参照してください。

次の例は、list-attribute-groups を使用する方法を説明しています。

AWS CLI

属性グループを一覧表示するには

次のlist-attribute-groups例では、 AWS アカウント内のすべての属性グループのリストを取得します。

aws servicecatalog-appregistry list-attribute-groups

出力:

{ "attributeGroups": [ { "id": "011ge6y3emyjijt8dw8jn6r0hv", "arn": "arn:aws:servicecatalog:us-west-2:813737243517:/attribute-groups/011ge6y3emyjijt8dw8jn6r0hv", "name": "ExampleAttributeGroup3", "creationTime": "2023-02-28T22:05:35.224000+00:00", "lastUpdateTime": "2023-02-28T22:05:35.224000+00:00" }, { "id": "01sj5xdwhbw54kejwnt09fnpcl", "arn": "arn:aws:servicecatalog:us-west-2:813737243517:/attribute-groups/01sj5xdwhbw54kejwnt09fnpcl", "name": "ExampleAttributeGroup", "description": "This is an example attribute group", "creationTime": "2023-02-28T20:38:01.389000+00:00", "lastUpdateTime": "2023-02-28T21:02:04.559000+00:00" }, { "id": "03n1yffgq6d18vwrzxf0c70nm3", "arn": "arn:aws:servicecatalog:us-west-2:813737243517:/attribute-groups/03n1yffgq6d18vwrzxf0c70nm3", "name": "ExampleAttributeGroup2", "creationTime": "2023-02-28T21:57:30.687000+00:00", "lastUpdateTime": "2023-02-28T21:57:30.687000+00:00" } ] }

詳細については、AWS 「Service Catalog AppRegistry 管理者ガイド」の「属性グループの詳細の表示」を参照してください。

  • API 詳細については、「 コマンドリファレンスListAttributeGroups」の「」を参照してください。 AWS CLI

次のコード例は、update-application を使用する方法を示しています。

AWS CLI

アプリケーションを更新するには

次のupdate-application例では、 AWS アカウント内の特定のアプリケーションを更新して説明を含めます。

aws servicecatalog-appregistry update-application \ --application "ExampleApplication" \ --description "This is an example application"

出力:

{ "application": { "id": "0ars38r6btoohvpvd9gqrptt9l", "arn": "arn:aws:servicecatalog:us-west-2:813737243517:/applications/0ars38r6btoohvpvd9gqrptt9l", "name": "ExampleApplication", "description": "This is an example application", "creationTime": "2023-02-28T21:10:10.820000+00:00", "lastUpdateTime": "2023-02-28T21:24:19.729000+00:00", "tags": { "aws:servicecatalog:applicationName": "ExampleApplication" } } }

詳細については、AWS 「Service Catalog AppRegistry 管理者ガイド」の「アプリケーションの編集」を参照してください。

  • API 詳細については、「 コマンドリファレンスUpdateApplication」の「」を参照してください。 AWS CLI

次の例は、update-attribute-group を使用する方法を説明しています。

AWS CLI

属性グループを更新するには

次のupdate-attribute-group例では、 AWS アカウント内の特定の属性グループを更新して、記述を含めます。

aws servicecatalog-appregistry update-attribute-group \ --attribute-group "ExampleAttributeGroup" \ --description "This is an example attribute group"

出力:

{ "attributeGroup": { "id": "01sj5xdwhbw54kejwnt09fnpcl", "arn": "arn:aws:servicecatalog:us-west-2:813737243517:/attribute-groups/01sj5xdwhbw54kejwnt09fnpcl", "name": "ExampleAttributeGroup", "description": "This is an example attribute group", "creationTime": "2023-02-28T20:38:01.389000+00:00", "lastUpdateTime": "2023-02-28T21:02:04.559000+00:00", "tags": { "aws:servicecatalog:attributeGroupName": "ExampleAttributeGroup" } } }

詳細については、AWS 「Service Catalog AppRegistry 管理者ガイド」の「属性グループの編集」を参照してください。

  • API 詳細については、「 コマンドリファレンスUpdateAttributeGroup」の「」を参照してください。 AWS CLI