View a markdown version of this page

Usar DeleteBucketInventoryConfiguration com uma CLI - Amazon Simple Storage Service

Usar DeleteBucketInventoryConfiguration com uma CLI

Os exemplos de código a seguir mostram como usar DeleteBucketInventoryConfiguration.

CLI
AWS CLI

Para excluir a configuração de inventário de um bucket

O exemplo delete-bucket-inventory-configuration a seguir exclui a configuração do inventário com ID 1 do bucket especificado.

aws s3api delete-bucket-inventory-configuration \ --bucket amzn-s3-demo-bucket \ --id 1

Este comando não produz saída.

PowerShell
Ferramentas para PowerShell V4

Exemplo 1: este comando remove o inventário denominado “testInventoryName” correspondente ao bucket do S3 em questão.

Remove-S3BucketInventoryConfiguration -BucketName 'amzn-s3-demo-bucket' -InventoryId 'testInventoryName'

Saída:

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

Exemplo 1: este comando remove o inventário denominado “testInventoryName” correspondente ao bucket do S3 em questão.

Remove-S3BucketInventoryConfiguration -BucketName 'amzn-s3-demo-bucket' -InventoryId 'testInventoryName'

Saída:

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

Para ver uma lista completa dos guias de desenvolvedor e exemplos de código do SDK da AWS, consulte Desenvolvimento com o Amazon S3 usando AWS SDKs. Este tópico também inclui informações sobre como começar e detalhes sobre versões anteriores do SDK.