ncloud_ncs_copy_object
Copy an object within Ncloud Storage and optionally change its storage class. Copy an object onto itself with a new class to change an existing object's class.
Instructions
[Ncloud Storage] Copy an object within Ncloud Storage (PUT /{key} with x-amz-copy-source). Optionally change the storage class (STANDARD (default): Standard Class | ONEZONE_IA: One Zone-IA (Infrequent Access) Class | DEEP_ARCHIVE: Archive Class) — copying an object onto itself with a new class is how an existing object's class is changed. Source objects up to 5 GB; larger ones need ncloud_ncs_upload_part_copy. A DEEP_ARCHIVE source must be restored first.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"bucketName": "<bucketName>",
"key": "<key>",
"copySource": "<copySource>"
},
"name": "ncloud_ncs_copy_object"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Destination object key (path) | |
| ifMatch | No | If-Match — write only if the current object's ETag equals this value (quotes optional). '*' is not supported. Cannot be combined with ifNoneMatch. Fails with 412 PreconditionFailed otherwise | |
| bucketName | Yes | Destination bucket name | |
| copySource | Yes | Source object as {sourceBucket}/{sourceKey} (a leading slash is tolerated) | |
| contentType | No | Content-Type for the copy (applied with metadataDirective=REPLACE) | |
| ifNoneMatch | No | If-None-Match — only '*': write only if no object with this key exists (create-only). Cannot be combined with ifMatch. Fails with 412 PreconditionFailed if the key exists | |
| storageClass | No | x-amz-storage-class for the copy — STANDARD (default): Standard Class | ONEZONE_IA: One Zone-IA (Infrequent Access) Class | DEEP_ARCHIVE: Archive Class. Omit to use STANDARD | |
| objectLockMode | No | x-amz-object-lock-mode for the copy | |
| copySourceIfMatch | No | x-amz-copy-source-if-match — copy only if the source ETag equals this value | |
| metadataDirective | No | COPY (default) keeps the source metadata; REPLACE uses the headers given in this request (contentType) | |
| copySourceVersionId | No | Version ID of the source object to copy (versioning-enabled buckets) | |
| expectedBucketOwner | No | x-amz-expected-bucket-owner — expected owner account number of the bucket: the account number inside any resource NRN (nrn:PUB:<service>:<region>:<accountNo>:…, e.g. from ncloud_resource_list_resources). The 36-char owner ID from ncloud_ncs_list_buckets is rejected as InvalidBucketOwnerAWSAccountID. A different owner is rejected with AccessDenied (403) | |
| objectLockLegalHold | No | x-amz-object-lock-legal-hold for the copy — ON | OFF | |
| serverSideEncryption | No | x-amz-server-side-encryption for the copy — AES256 | aws:kms | |
| copySourceIfNoneMatch | No | x-amz-copy-source-if-none-match — copy only if the source ETag differs from this value | |
| copySourceIfModifiedSince | No | x-amz-copy-source-if-modified-since — date of the source object (ISO 8601 or HTTP-date; sent as HTTP-date) | |
| objectLockRetainUntilDate | No | x-amz-object-lock-retain-until-date for the copy, ISO 8601 | |
| sourceExpectedBucketOwner | No | x-amz-source-expected-bucket-owner — expected owner account number of the bucket: the account number inside any resource NRN (nrn:PUB:<service>:<region>:<accountNo>:…, e.g. from ncloud_resource_list_resources). The 36-char owner ID from ncloud_ncs_list_buckets is rejected as InvalidBucketOwnerAWSAccountID. A different owner is rejected with AccessDenied (403) | |
| copySourceIfUnmodifiedSince | No | x-amz-copy-source-if-unmodified-since — date of the source object (ISO 8601 or HTTP-date; sent as HTTP-date) |