Utilizar DeleteBucketInventoryConfiguration con una CLI - Ejemplos de código de AWS SDK

Hay más ejemplos de AWS SDK disponibles en el repositorio de GitHub de ejemplos de AWS SDK de documentos.

Utilizar DeleteBucketInventoryConfiguration con una CLI

Los siguientes ejemplos de código muestran cómo utilizar 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