Há mais exemplos de AWS SDK disponíveis no repositório AWS Doc SDK Examples
As traduções são geradas por tradução automática. Em caso de conflito entre o conteúdo da tradução e da versão original em inglês, a versão em inglês prevalecerá.
Usar DeleteBucketInventoryConfiguration com uma CLI
Os exemplos de código a seguir mostram como usar o DeleteBucketInventoryConfiguration.
- CLI
-
- AWS CLI
-
Para excluir a configuração de inventário de um bucket
O exemplo
delete-bucket-inventory-configurationa seguir exclui a configuração do inventário com ID1do bucket especificado.aws s3api delete-bucket-inventory-configuration \ --bucketamzn-s3-demo-bucket\ --id1Este comando não produz saída.
-
Para obter detalhes da API, consulte DeleteBucketInventoryConfiguration
em Referência de AWS CLI Comandos.
-
- PowerShell
-
- Ferramentas para PowerShell V4
-
Exemplo 1: Esse comando remove o inventário chamado 'testInventoryName' correspondente ao determinado bucket do S3.
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 obter detalhes da API, consulte DeleteBucketInventoryConfigurationem Referência de Ferramentas da AWS para PowerShell cmdlet (V4).
-
- Ferramentas para PowerShell V5
-
Exemplo 1: Esse comando remove o inventário chamado 'testInventoryName' correspondente ao determinado bucket do S3.
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 obter detalhes da API, consulte DeleteBucketInventoryConfigurationem Referência de Ferramentas da AWS para PowerShell cmdlet (V5).
-