AWS SDK 또는 CLI와 함께 DeleteBucketLifecycle 사용
다음 코드 예시는 DeleteBucketLifecycle의 사용 방법을 보여 줍니다.
- .NET
-
- SDK for .NET
-
참고
GitHub에 더 많은 내용이 있습니다. AWS코드 예 리포지토리
에서 전체 예를 찾고 설정 및 실행하는 방법을 배워보세요. /// <summary> /// This method removes the Lifecycle configuration from the named /// S3 bucket. /// </summary> /// <param name="client">The S3 client object used to call /// the RemoveLifecycleConfigAsync method.</param> /// <param name="bucketName">A string representing the name of the /// S3 bucket from which the configuration will be removed.</param> public static async Task RemoveLifecycleConfigAsync(IAmazonS3 client, string bucketName) { var request = new DeleteLifecycleConfigurationRequest() { BucketName = bucketName, }; await client.DeleteLifecycleConfigurationAsync(request); }-
API 세부 정보는 AWS SDK for .NET API 참조의 DeleteBucketLifecycle을 참조하세요.
-
- CLI
-
- AWS CLI
-
다음 명령은
amzn-s3-demo-bucket이라는 버킷에서 수명 주기 구성을 삭제합니다.aws s3api delete-bucket-lifecycle --bucketamzn-s3-demo-bucket-
API 세부 정보는 AWS CLI 명령 참조의 DeleteBucketLifecycle
을 참조하세요.
-
- Python
-
- SDK for Python(Boto3)
-
참고
GitHub에 더 많은 내용이 있습니다. AWS코드 예 리포지토리
에서 전체 예를 찾고 설정 및 실행하는 방법을 배워보세요. class BucketWrapper: """Encapsulates S3 bucket actions.""" def __init__(self, bucket): """ :param bucket: A Boto3 Bucket resource. This is a high-level resource in Boto3 that wraps bucket actions in a class-like structure. """ self.bucket = bucket self.name = bucket.name def delete_lifecycle_configuration(self): """ Remove the lifecycle configuration from the specified bucket. """ try: self.bucket.LifecycleConfiguration().delete() logger.info( "Deleted lifecycle configuration for bucket '%s'.", self.bucket.name ) except ClientError: logger.exception( "Couldn't delete lifecycle configuration for bucket '%s'.", self.bucket.name, ) raise-
API 세부 정보는 AWSSDK for Python (Boto3) API 참조의 DeleteBucketLifecycle를 참조하세요.
-
- SAP ABAP
-
- SDK for SAP ABAP
-
참고
GitHub에 더 많은 내용이 있습니다. AWS코드 예 리포지토리
에서 전체 예를 찾고 설정 및 실행하는 방법을 배워보세요. TRY. lo_s3->deletebucketlifecycle( iv_bucket = iv_bucket_name ). MESSAGE 'Bucket lifecycle configuration deleted.' TYPE 'I'. CATCH /aws1/cx_s3_nosuchbucket. MESSAGE 'Bucket does not exist.' TYPE 'E'. ENDTRY.-
API 세부 정보는 AWS SDK for SAP ABAP API 참조의 DeleteBucketLifecycle을 참조하세요.
-
AWS SDK 개발자 가이드 및 코드 예제의 전체 목록은 AWS SDK를 사용하여 Amazon S3에서 개발을 참조하세요. 이 주제에는 시작하기에 대한 정보와 이전 SDK 버전에 대한 세부 정보도 포함되어 있습니다.
DeleteBucketInventoryConfiguration
DeleteBucketMetricsConfiguration