Há mais exemplos do AWS SDK disponíveis no repositório do GitHub Documento de Exemplos do AWS SDK
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.
-
Consulte detalhes da API em DeleteBucketInventoryConfiguration
na Referência de comandos da AWS CLI.
-
- 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-
Consulte detalhes da API em DeleteBucketInventoryConfiguration na Referência de cmdlet do Ferramentas da AWS para PowerShell (V4).
-
- 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-
Consulte detalhes da API em DeleteBucketInventoryConfiguration na Referência de cmdlet do Ferramentas da AWS para PowerShell (V5).
-