将 ListBucketInventoryConfigurations
与 AWS SDK 或 CLI 配合使用
以下代码示例演示如何使用 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
-
- 适用于 PowerShell 的工具
-
示例 1:此命令返回给定 S3 存储桶的前 100 个清单配置。
Get-S3BucketInventoryConfigurationList -BucketName 's3testbucket'
-
有关 API 详细信息,请参阅《AWS Tools for PowerShell Cmdlet 参考》中的 ListBucketInventoryConfigurations。
-
有关 AWS SDK 开发人员指南和代码示例的完整列表,请参阅 将此服务与 AWS SDK 结合使用。本主题还包括有关入门的信息以及有关先前的 SDK 版本的详细信息。
ListBucketAnalyticsConfigurations
ListBuckets