AWS Doc SDK Examples
CLI で ListBucketInventoryConfigurations を使用する
次のサンプルコードは、ListBucketInventoryConfigurations を使用する方法を説明しています。
- CLI
-
- AWS CLI
-
バケットのインベントリ設定のリストを取得するには
次の
list-bucket-inventory-configurationsの例では、指定したバケットのインベントリ設定をリスト表示します。aws s3api list-bucket-inventory-configurations \ --bucketamzn-s3-demo-bucket出力:
{ "InventoryConfigurationList": [ { "IsEnabled": true, "Destination": { "S3BucketDestination": { "Format": "ORC", "Bucket": "arn:aws:s3:::amzn-s3-demo-bucket", "AccountId": "123456789012" } }, "IncludedObjectVersions": "Current", "Id": "1", "Schedule": { "Frequency": "Weekly" } }, { "IsEnabled": true, "Destination": { "S3BucketDestination": { "Format": "CSV", "Bucket": "arn:aws:s3:::amzn-s3-demo-bucket", "AccountId": "123456789012" } }, "IncludedObjectVersions": "Current", "Id": "2", "Schedule": { "Frequency": "Daily" } } ], "IsTruncated": false }-
API の詳細については、「AWS CLI コマンドリファレンス」の「ListBucketInventoryConfigurations
」を参照してください。
-
- PowerShell
-
- Tools for PowerShell V4
-
例 1: このコマンドは、指定した S3 バケットの最初の 100 つのインベントリ設定を返します。
Get-S3BucketInventoryConfigurationList -BucketName 'amzn-s3-demo-bucket'-
API の詳細については、「AWS Tools for PowerShell コマンドレットリファレンス (V4)」の「ListBucketInventoryConfigurations」を参照してください。
-
- Tools for PowerShell V5
-
例 1: このコマンドは、指定した S3 バケットの最初の 100 つのインベントリ設定を返します。
Get-S3BucketInventoryConfigurationList -BucketName 'amzn-s3-demo-bucket'-
API の詳細については、「AWS Tools for PowerShell コマンドレットリファレンス (V5)」の「ListBucketInventoryConfigurations」を参照してください。
-
ListBucketAnalyticsConfigurations
ListBuckets