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 ID1del bucket especificado.aws s3api delete-bucket-inventory-configuration \ --bucketamzn-s3-demo-bucket\ --id1Este comando no genera ninguna salida.
-
Para obtener información sobre la API, consulte DeleteBucketInventoryConfiguration
en la Referencia de comandos de la AWS CLI.
-
- 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-
Para obtener información sobre la API, consulte DeleteBucketInventoryConfiguration en la Referencia de cmdlets de Herramientas de AWS para PowerShell (V4).
-
- 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 información sobre la API, consulte DeleteBucketInventoryConfiguration en la Referencia de cmdlets de Herramientas de AWS para PowerShell (V5).
-