View a markdown version of this page

CLI で GetBucketInventoryConfiguration を使用する - Amazon Simple Storage Service

CLI で GetBucketInventoryConfiguration を使用する

次のサンプルコードは、GetBucketInventoryConfiguration を使用する方法を説明しています。

CLI
AWS CLI

バケットのインベントリ設定を取得するには

次の get-bucket-inventory-configuration の例では、ID 1 を持つ指定したバケットのインベントリ設定を取得します。

aws s3api get-bucket-inventory-configuration \ --bucket amzn-s3-demo-bucket \ --id 1

出力:

{ "InventoryConfiguration": { "IsEnabled": true, "Destination": { "S3BucketDestination": { "Format": "ORC", "Bucket": "arn:aws:s3:::amzn-s3-demo-bucket", "AccountId": "123456789012" } }, "IncludedObjectVersions": "Current", "Id": "1", "Schedule": { "Frequency": "Weekly" } } }
PowerShell
Tools for PowerShell V4

例 1: このコマンドは、指定した S3 バケット内の「testinventory」という名前のインベントリの詳細を返します。

Get-S3BucketInventoryConfiguration -BucketName 'amzn-s3-demo-bucket' -InventoryId 'testinventory'
  • API の詳細については、「AWS Tools for PowerShell コマンドレットリファレンス (V4)」の「GetBucketInventoryConfiguration」を参照してください。

Tools for PowerShell V5

例 1: このコマンドは、指定した S3 バケット内の「testinventory」という名前のインベントリの詳細を返します。

Get-S3BucketInventoryConfiguration -BucketName 'amzn-s3-demo-bucket' -InventoryId 'testinventory'
  • API の詳細については、AWS Tools for PowerShell コマンドレットリファレンス (V5) の「GetBucketInventoryConfiguration」を参照してください。

AWS SDK デベロッパーガイドとコード例の詳細なリストについては、AWS SDK を使用した Amazon S3 での開発 を参照してください。このトピックには、使用開始方法に関する情報と、以前の SDK バージョンの詳細も含まれています。