Classic/VPC 환경에서 이용 가능합니다.
Ncloud Storage 버킷의 객체 소유권(Object Ownership) 설정을 변경합니다.
참고
Sub Account 사용자가 이 명령어를 실행하려면 Change/PutBucketOwnershipControls 액션 권한이 있어야 합니다.
참고
객체 소유권 설정에 대해 다음 내용을 참고해 주십시오.
- Ncloud Storage는 ACL(Access Control List)을 지원하지 않으므로 객체 소유권은 항상
BucketOwnerEnforced이며, 버킷에 업로드한 모든 객체는 버킷 소유자의 소유가 됩니다.BucketOwnerEnforced만 입력할 수 있습니다. - 객체 소유권 설정 삭제는 지원하지 않습니다.
구문
put-bucket-ownership-controls 구문은 다음과 같습니다.
aws s3api put-bucket-ownership-controls \
--bucket <bucket> \
--ownership-controls <ownership-controls> \
[--content-md5 <content-md5>] \
[--checksum-algorithm <checksum-algorithm>] \
--endpoint-url <endpoint-url>
옵션
put-bucket-ownership-controls 실행 시 지정할 수 있는 옵션을 설명합니다.
필수 옵션
put-bucket-ownership-controls의 필수 옵션입니다.
| 옵션 | 타입 | 필수 여부 | 설명 |
|---|---|---|---|
--bucket |
String | Required | 버킷 이름 |
--ownership-controls |
String | Required | 객체 소유권 설정
|
선택 옵션
put-bucket-ownership-controls의 선택 옵션입니다. 지정하지 않은 옵션에는 기본값이 적용됩니다.
| 옵션 | 타입 | 필수 여부 | 설명 |
|---|---|---|---|
--content-md5 |
String | Optional | 요청 데이터의 Base64 인코딩된 128비트 MD5 해시값
|
--checksum-algorithm |
String | Optional | 요청 데이터 검증에 사용할 체크섬 알고리즘
|
공통 옵션
aws 명령에서 공통으로 사용하는 옵션에 대한 정보는 Ncloud Storage 옵션을 참조해 주십시오.
예시
객체 소유권 설정 요청이 성공하면 결과는 출력되지 않습니다.
명령
명령 예시는 다음과 같습니다.
aws s3api put-bucket-ownership-controls --bucket my-test-bucket \
--ownership-controls '{"Rules":[{"ObjectOwnership":"BucketOwnerEnforced"}]}' \
--endpoint-url=https://kr.ncloudstorage.com
연관 명령어
연관 명령어는 다음과 같습니다.