Gunakan DeleteBucketInventoryConfiguration dengan AWS SDK atau CLI - AWS Contoh Kode SDK

Ada lebih banyak contoh AWS SDK yang tersedia di repo Contoh SDK AWS Doc. GitHub

Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.

Gunakan DeleteBucketInventoryConfiguration dengan AWS SDK atau CLI

Contoh kode berikut menunjukkan cara menggunakanDeleteBucketInventoryConfiguration.

CLI
AWS CLI

Untuk menghapus konfigurasi inventaris bucket

delete-bucket-inventory-configurationContoh berikut menghapus konfigurasi inventaris dengan ID 1 untuk bucket yang ditentukan.

aws s3api delete-bucket-inventory-configuration \ --bucket my-bucket \ --id 1

Perintah ini tidak menghasilkan output.

PowerShell
Alat untuk PowerShell

Contoh 1: Perintah ini menghapus invventori bernama 'testInventoryName' yang sesuai dengan bucket S3 yang diberikan.

Remove-S3BucketInventoryConfiguration -BucketName 's3testbucket' -InventoryId 'testInventoryName'

Output:

Confirm Are you sure you want to perform this action? Performing the operation "Remove-S3BucketInventoryConfiguration (DeleteBucketInventoryConfiguration)" on target "s3testbucket". [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): Y