AWS 文件 AWS SDK 範例 GitHub 存放庫中提供了更多 SDK 範例
本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
搭GetBucketInventoryConfiguration
配 AWS 開發套件或 CLI 使用
下列程式碼範例會示範如何使用GetBucketInventoryConfiguration
。
- CLI
-
- AWS CLI
-
若要擷取值區的庫存組態
下列
get-bucket-inventory-configuration
範例會擷取具有 ID 之指定值區的詳細目錄組態1
。aws s3api get-bucket-inventory-configuration \ --bucket my-bucket \ --id 1
輸出:
{ "InventoryConfiguration": { "IsEnabled": true, "Destination": { "S3BucketDestination": { "Format": "ORC", "Bucket": "arn:aws:s3:::my-bucket", "AccountId": "123456789012" } }, "IncludedObjectVersions": "Current", "Id": "1", "Schedule": { "Frequency": "Weekly" } } }
-
如需 API 詳細資訊,請參閱AWS CLI 命令參考GetBucketInventoryConfiguration
中的。
-
- PowerShell
-
- 用於的工具 PowerShell
-
範例 1:此命令會針對指定的 S3 儲存貯體傳回名為「測試庫存」的詳細資料。
Get-S3BucketInventoryConfiguration -BucketName 's3testbucket' -InventoryId 'testinventory'
-
如需 API 詳細資訊,請參閱AWS Tools for PowerShell 指令程GetBucketInventoryConfiguration式參考中的。
-
GetBucketEncryption
GetBucketLifecycleConfiguration