将 GetBucketInventoryConfiguration 与 CLI 配合使用
以下代码示例演示如何使用 GetBucketInventoryConfiguration。
- CLI
-
- Amazon CLI
-
检索存储桶的清单配置
以下
get-bucket-inventory-configuration示例检索 ID 为1的指定存储桶的清单配置。aws s3api get-bucket-inventory-configuration \ --bucketamzn-s3-demo-bucket\ --id1输出:
{ "InventoryConfiguration": { "IsEnabled": true, "Destination": { "S3BucketDestination": { "Format": "ORC", "Bucket": "arn:aws:s3:::amzn-s3-demo-bucket", "AccountId": "123456789012" } }, "IncludedObjectVersions": "Current", "Id": "1", "Schedule": { "Frequency": "Weekly" } } }-
有关 API 详细信息,请参阅《Amazon CLI 命令参考》中的 GetBucketInventoryConfiguration
。
-
- PowerShell
-
- 适用于 PowerShell V4 的工具
-
示例 1:此命令返回给定 S3 存储桶的名为“testinventory”的清单的详细信息。
Get-S3BucketInventoryConfiguration -BucketName 'amzn-s3-demo-bucket' -InventoryId 'testinventory'-
有关 API 详细信息,请参阅《Amazon Tools for PowerShell Cmdlet Reference (V4)》中的 GetBucketInventoryConfiguration。
-
- 适用于 PowerShell V5 的工具
-
示例 1:此命令返回给定 S3 存储桶的名为“testinventory”的清单的详细信息。
Get-S3BucketInventoryConfiguration -BucketName 'amzn-s3-demo-bucket' -InventoryId 'testinventory'-
有关 API 详细信息,请参阅《Amazon Tools for PowerShell Cmdlet Reference (V5)》中的 GetBucketInventoryConfiguration。
-
有关 Amazon SDK 开发人员指南和代码示例的完整列表,请参阅 使用 Amazon SDK 通过 Amazon S3 进行开发。本主题还包括有关入门的信息以及有关先前的 SDK 版本的详细信息。
GetBucketEncryption
GetBucketLifecycleConfiguration