AWS SDK または CLI で ListBucketInventoryConfigurations
を使用する
以下のコード例は、ListBucketInventoryConfigurations
の使用方法を示しています。
- CLI
-
- AWS CLI
-
バケットのインベントリ設定のリストを取得するには
次の
list-bucket-inventory-configurations
の例では、指定したバケットのインベントリ設定をリスト表示します。aws s3api list-bucket-inventory-configurations \ --bucket
my-bucket
出力:
{ "InventoryConfigurationList": [ { "IsEnabled": true, "Destination": { "S3BucketDestination": { "Format": "ORC", "Bucket": "arn:aws:s3:::my-bucket", "AccountId": "123456789012" } }, "IncludedObjectVersions": "Current", "Id": "1", "Schedule": { "Frequency": "Weekly" } }, { "IsEnabled": true, "Destination": { "S3BucketDestination": { "Format": "CSV", "Bucket": "arn:aws:s3:::my-bucket", "AccountId": "123456789012" } }, "IncludedObjectVersions": "Current", "Id": "2", "Schedule": { "Frequency": "Daily" } } ], "IsTruncated": false }
-
API の詳細については、「AWS CLI コマンドリファレンス」の「ListBucketInventoryConfigurations
」を参照してください。
-
- PowerShell
-
- Tools for PowerShell
-
例 1: このコマンドは、指定した S3 バケットの最初の 100 つのインベントリ設定を返します。
Get-S3BucketInventoryConfigurationList -BucketName 's3testbucket'
-
API の詳細については、「AWS Tools for PowerShell コマンドレットリファレンス」の「ListBucketInventoryConfigurations」を参照してください。
-
AWS SDK デベロッパーガイドとコード例の完全なリストについては、「このサービスを AWS SDK で使用する」を参照してください。このトピックには、使用開始方法に関する情報と、以前の SDK バージョンの詳細も含まれています。
ListBucketAnalyticsConfigurations
ListBuckets