View a markdown version of this page

Utilizar DeleteBucketInventoryConfiguration con una CLI - Amazon Simple Storage Service

Utilizar DeleteBucketInventoryConfiguration con una CLI

En los siguientes ejemplos de código se muestra cómo se utiliza DeleteBucketInventoryConfiguration.

CLI
AWS CLI

Eliminar la configuración de inventario de un bucket

En el siguiente ejemplo de delete-bucket-inventory-configuration, se elimina la configuración de inventario con el ID 1 del bucket especificado.

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

Este comando no genera ninguna salida.

PowerShell
Herramientas para PowerShell V4

Ejemplo 1: este comando elimina el inventario denominado “testInventoryName” correspondiente al bucket de S3 en cuestión.

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

Salida:

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
Herramientas para PowerShell V5

Ejemplo 1: este comando elimina el inventario denominado “testInventoryName” correspondiente al bucket de S3 en cuestión.

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

Salida:

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 obtener una lista completa de las guías para desarrolladores de AWS SDK y ejemplos de código, consulte Desarrollo con Amazon S3 mediante los SDK de AWS. En este tema también se incluye información sobre cómo empezar a utilizar el SDK y detalles sobre sus versiones anteriores.