CLI로 DeleteBucketInventoryConfiguration 사용 - AWS SDK 코드 예제

AWS SDK 예제 GitHub 리포지토리에 더 많은 AWS문서 SDK 예제가 있습니다.

CLI로 DeleteBucketInventoryConfiguration 사용

다음 코드 예시는 DeleteBucketInventoryConfiguration의 사용 방법을 보여 줍니다.

CLI
AWS CLI

버킷의 인벤토리 구성 삭제

다음 delete-bucket-inventory-configuration 예시에서는 지정된 버킷에 대해 ID가 1인 인벤토리 구성을 삭제합니다.

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

이 명령은 출력을 생성하지 않습니다.

PowerShell
Tools for PowerShell V4

예시 1: 이 명령은 지정된 S3 버킷에 해당하는 'testInventoryName'이라는 이름의 인벤토리를 제거합니다.

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

출력:

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
Tools for PowerShell V5

예시 1: 이 명령은 지정된 S3 버킷에 해당하는 'testInventoryName'이라는 이름의 인벤토리를 제거합니다.

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

출력:

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