--- title: "put-object-retention" slug: "put-object-retention" updated: 2026-10-22T09:07:27Z published: 2026-10-22T09:07:27Z canonical: "cli-gov.ncloud-docs.com/put-object-retention" --- > ## 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-retention Classic/VPC 환경에서 이용 가능합니다. Ncloud Storage 객체에 보존(Retention) 설정을 적용합니다. ## 명령어 명령어 구문은 다음과 같습니다. ``` aws s3api put-object-retention --bucket --key --retention [--options] ``` ### 파라미터 파라미터에 대한 설명은 다음과 같습니다. | 파라미터 | 타입 | 필수 여부 | 설명 | 제약 사항 | | --- | --- | --- | --- | --- | | --bucket | string | Y | 객체가 저장된 대상 버킷 | - | | --key | string | Y | 보존을 설정할 객체 이름 | - | | --retention | structure | Y | 적용할 보존 설정 | JSON 구조 - `Mode`: `GOVERNANCE` \| `COMPLIANCE` - `RetainUntilDate`: 보존 만료일(ISO 8601, 미래 시점) - 모두 생략 시 보존 해제 | | --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) 참고 | | --version-id | string | N | 보존을 설정할 객체의 버전 ID 지정 | - | | --bypass-governance-retention \| --no-bypass-governance-retention | boolean | N | GOVERNANCE 모드 보존 우회 여부 | 별도 우회 권한 필요 | | --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/PutObjectRetention 액션 권한이 필요합니다. ## 예시 put-object-retention 명령어의 호출 예시를 설명합니다. ### 보존 설정 적용 #### 호출 예시 put-object-retention 명령어를 호출하면 객체에 보존 모드와 만료일을 설정할 수 있습니다. 호출 예시는 다음과 같습니다. ``` aws s3api put-object-retention --bucket bucket-a --key object.csv --retention '{"Mode":"GOVERNANCE","RetainUntilDate":"2025-12-31T00:00:00"}' --endpoint-url=https://kr.gov-ncloudstorage.com ``` ## 연관 명령어 연관 명령어는 다음과 같습니다. - [put-object-lock-configuration](/docs/put-object-lock-configuration) - [get-object-lock-configuration](/docs/get-object-lock-configuration) - [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)