--- title: "put-object-lock-configuration" slug: "put-object-lock-configuration" updated: 2026-10-22T09:07:27Z published: 2026-10-22T09:07:27Z canonical: "cli-gov.ncloud-docs.com/put-object-lock-configuration" --- > ## Documentation Index > Fetch the complete documentation index at: https://cli-gov.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # put-object-lock-configuration Classic/VPC 환경에서 이용 가능합니다. Ncloud Storage 버킷에 Object Lock 설정을 적용합니다. ## 명령어 명령어 구문은 다음과 같습니다. ``` aws s3api put-object-lock-configuration --bucket --object-lock-configuration [--options] ``` ### 파라미터 파라미터에 대한 설명은 다음과 같습니다. | 파라미터 | 타입 | 필수 여부 | 설명 | 제약 사항 | | --- | --- | --- | --- | --- | | --bucket | string | Y | Object Lock 설정을 적용할 대상 버킷 | - | | --object-lock-configuration | structure | Y | 적용할 Object Lock 설정 | JSON 구조 - `ObjectLockEnabled`: `Enabled` - `Rule.DefaultRetention.Mode`: `GOVERNANCE` \| `COMPLIANCE` - `Rule.DefaultRetention.Days`: 1~36,500 - `Rule.DefaultRetention.Years`: 1~100 (`Days`와 택 1) | | --endpoint-url | string | Y | 명령 호출의 기본 URL 지정 | kr 리전만 가능, 호출 도메인 정보는 [Ncloud Storage 개요](/docs/storage-ncloudstorage#%ED%98%B8%EC%B6%9C%EB%8F%84%EB%A9%94%EC%9D%B8) 참고 | | --content-md5 | string | N | 요청 바디의 Base64 인코딩된 MD5 해시값 | 미 입력 시 자동 계산 | | --checksum-algorithm | string | N | 요청 바디 검증에 사용할 체크섬 알고리즘 | 선택한 가능한 옵션 - CRC32 - CRC32C - SHA1 - SHA256 - CRC64NVME | | --cli-input-json \| --cli-input-yaml | string | N | 제공한 json 또는 yaml 문자열에서 인수 입력 | json과 yaml을 함께 지정 불가 | | --generate-cli-skeleton | integer | N | API 명령을 실행하지 않고 이후에 input으로 사용할 수 있는 파라미터 템플릿 생성 | - | | --debug | boolean | N | 디버그 로깅 사용 | - | | --no-verify-ssl | boolean | N | SSL 인증서를 검증하는 기본 동작 재정의 | - | | --no-paginate | boolean | N | 자동 pagination 비활성화, 결과에 대해 첫 번째 페이지 한 번만 호출됨 | - | | --output | string | N | 응답값의 포맷 지정 | 선택한 가능한 옵션 - json - text - table - yaml - yaml-stream | | --query | string | N | 응답 데이터를 필터링하는 데 사용할 JMESPath 쿼리 | - | | --profile | string | N | 자격 증명 파일에서 특정 profile 사용 | - | | --region | string | N | 리전 지정 | kr만 지원 | | --color | string | N | output color 설정 | 선택한 가능한 옵션 - on - off - auto | | --no-sign-request | boolean | N | 자격 증명 로드 비활성화 | - | | --ca-bundle | string | N | SSL 인증서를 확인할 때 사용할 CA 인증서 지정 | - | | --cli-read-timeout | int | N | 최대 읽기 시간, 0으로 입력시 타임아웃이 아닌 차단 상태로 변경됨 | default는 60초로 설정 | | --cli-connect-timeout | int | N | 최대 연결 시간, 0으로 입력시 타임아웃이 아닌 차단 상태로 변경됨 | default는 60초로 설정 | | --no-cli-pager | boolean | N | 응답값의 cli pager 비활성화 | - | | --cli-auto-prompt | boolean | N | CLI 입력 파라미터 자동 프롬프트 설정 | - | | --no-cli-auto-prompt | boolean | N | CLI 입력 파라미터 자동 프롬프트 비활성화 | - | ## 권한 Subaccount 사용자가 이 명령어를 사용하려면 Change/PutBucketObjectLockConfiguration 액션 권한이 필요합니다. ## 예시 put-object-lock-configuration 명령어의 호출 예시를 설명합니다. ### Object Lock 설정 적용 #### 호출 예시 put-object-lock-configuration 명령어를 호출하면 버킷에 기본 보존 규칙을 설정할 수 있습니다. 호출 예시는 다음과 같습니다. ``` aws s3api put-object-lock-configuration --bucket bucket-a --object-lock-configuration '{"ObjectLockEnabled":"Enabled","Rule":{"DefaultRetention":{"Mode":"GOVERNANCE","Days":30}}}' --endpoint-url=https://kr.gov-ncloudstorage.com ``` ## 연관 명령어 연관 명령어는 다음과 같습니다. - [get-object-lock-configuration](/docs/get-object-lock-configuration) - [put-object-retention](/docs/put-object-retention) - [get-object-retention](/docs/get-object-retention) - [put-object-legal-hold](/docs/put-object-legal-hold) - [get-object-legal-hold](/docs/get-object-legal-hold)