Sono disponibili altri esempi per SDK AWS nel repository GitHub della documentazione degli esempi per SDK AWS
Utilizzare DeleteBucketInventoryConfiguration con una CLI
Gli esempi di codice seguenti mostrano come utilizzare DeleteBucketInventoryConfiguration.
- CLI
-
- AWS CLI
-
Come eliminare la configurazione di inventario di un bucket
L’esempio
delete-bucket-inventory-configurationseguente elimina la configurazione dell’inventario con ID1per il bucket specificato.aws s3api delete-bucket-inventory-configuration \ --bucketamzn-s3-demo-bucket\ --id1Questo comando non produce alcun output.
-
Per informazioni dettagliate sull’API, consulta DeleteBucketInventoryConfiguration
nella documentazione di riferimento dei comandi della AWS CLI.
-
- PowerShell
-
- Strumenti per PowerShell V4
-
Esempio 1: questo comando rimuove l’inventario denominato “testInventoryName” corrispondente al bucket S3 specificato.
Remove-S3BucketInventoryConfiguration -BucketName 'amzn-s3-demo-bucket' -InventoryId 'testInventoryName'Output:
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-
Per informazioni dettagliate sull’API, consulta DeleteBucketInventoryConfiguration nella documentazione di riferimento dei cmdlet di AWS Strumenti per PowerShell (V4).
-
- Strumenti per PowerShell V5
-
Esempio 1: questo comando rimuove l’inventario denominato “testInventoryName” corrispondente al bucket S3 specificato.
Remove-S3BucketInventoryConfiguration -BucketName 'amzn-s3-demo-bucket' -InventoryId 'testInventoryName'Output:
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-
Per informazioni dettagliate sull’API, consulta DeleteBucketInventoryConfiguration nella documentazione di riferimento dei cmdlet di AWS Strumenti per PowerShell (V5).
-