將一份標準快照或加密快照從一個地域複製到另一個地域。
介面說明
呼叫該介面時,您需要注意:
複製後的新快照無法復原來源快照對應的雲端硬碟。
不支援複製本機快照。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
ecs:CopySnapshot |
create |
*Snapshot
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| ResourceGroupId |
string |
否 |
該參數尚未開放使用。 |
rg-bp67acfmxazb4p**** |
| Tag |
array<object> |
否 |
新快照的標籤資訊。 |
|
|
object |
否 |
新快照的標籤資訊。 |
||
| Key |
string |
否 |
新快照的標籤鍵。一旦傳入該值,則不允許為空字串。最多支援 128 個字元,不能以 aliyun 和 acs: 開頭,不能包含 http:// 或者 https://。 |
TestKey |
| Value |
string |
否 |
新快照的標籤值。一旦傳入該值,允許為空字串。最多支援 128 個字元,不能以 aliyun 和 acs: 開頭,不能包含 http:// 或者 https://。 |
TestValue |
| RegionId |
string |
是 |
來源快照所在的地域。您可以呼叫 DescribeRegions 查看最新的阿里雲地域清單。 |
cn-chengdu |
| DestinationRegionId |
string |
是 |
新快照的目標地域 ID。 |
us-east-1 |
| SnapshotId |
string |
是 |
來源快照 ID。 |
s-bp67acfmxazb4p**** |
| DestinationSnapshotName |
string |
是 |
新快照的名稱。長度為 2~128 個字元,必須以大小寫字母或中文開頭,不能以 http:// 和 https:// 開頭。支援 Unicode 中 letter 分類下的字元(其中包括英文、中文和數字等)。可以包含半形冒號(:)、底線(_)、半形句號(.)或者連字號(-)。 預設值:空。 |
CopySnapshotDemo |
| DestinationSnapshotDescription |
string |
是 |
新快照的描述資訊。長度為 2~256 個英文或中文字元,不能以 http:// 或 https:// 開頭。 預設值:空。 |
CopySnapshotDemo |
| RetentionDays |
integer |
否 |
新快照的保留時長,單位為天,到期後快照會被自動釋放。取值範圍:1~65536。 預設值:空,表示快照不會被自動釋放。 |
60 |
| Encrypted |
boolean |
否 |
是否加密雲端硬碟。取值範圍:
預設值:false。 |
false |
| KMSKeyId |
string |
否 |
目標地域的 KMS 使用者主金鑰。 |
0e478b7a-4262-4802-b8cb-00d3fb40**** |
| Arn |
array<object> |
否 |
說明
該參數正在邀測中,暫不支援使用。 |
|
|
object |
否 |
|||
| RoleType |
string |
否 |
說明
該參數尚未開放使用。 |
null |
| Rolearn |
string |
否 |
說明
該參數尚未開放使用。 |
null |
| AssumeRoleFor |
integer |
否 |
說明
該參數尚未開放使用。 |
0 |
| DestinationStorageLocationArn |
string |
否 |
說明
該參數尚未開放使用。 |
null |
| ClientToken |
string |
否 |
保證請求冪等性。從您的用戶端產生一個參數值,確保不同請求間該參數值唯一。ClientToken 只支援 ASCII 字元,且不能超過 64 個字元。更多詳情,請參見如何保證冪等性。 |
123e4567-e89b-12d3-a456-426655440000 |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| SnapshotId |
string |
新快照的 ID。 |
s-bp17441ohwka0yui**** |
| RequestId |
string |
請求 ID。 |
C8B26B44-0189-443E-9816-D951F596**** |
樣本
正常返回樣本
JSON格式
{
"SnapshotId": "s-bp17441ohwka0yui****",
"RequestId": "C8B26B44-0189-443E-9816-D951F596****"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | Duplicate.TagKey | The Tag.N.Key contain duplicate key. | 標籤中存在重複的鍵,請保持鍵的唯一性。 |
| 400 | InvalidTagKey.Malformed | The specified Tag.n.Key is not valid. | 指定的標籤鍵無效。標籤鍵不能為空或 null,最多支援 128 個字元,不能以「aliyun」或「acs:」開頭,不能包含「http://」或「https://」。 |
| 400 | InvalidTagValue.Malformed | The specified Tag.n.Value is not valid. | 指定的標籤值無效。標籤值最多支援 128 個字元,並且不能包含「http://」或「https://」。 |
| 400 | InvalidRegionId.MalFormed | The specified RegionId is not valid. | |
| 400 | InvalidParameter.Arns | The specified Arns is not valid. | 該Arns參數無效,請檢查後重新傳遞。 |
| 500 | InternalError | The request processing has failed due to an internal error and you may retry later or contact support with the request ID. | |
| 403 | InvalidSnapshotId.EncryptedNotSupport | The specified snapshot with encrypted does not support copy. | |
| 403 | InvalidSnapshotId.NotFound | The specified snapshot is not exists. | 指定的 Snapshot 不存在。 |
| 403 | InvalidSnapshotCategory.NotSupportCopy | The specified snapshot's category does not support copy. | |
| 403 | InvalidUser.NotInWhiteList | The user is not in the white list of copying snapshot. | 您暫未授權執行該操作。 |
| 403 | InvalidAccountStatus.NotEnoughBalance | Your account does not have enough balance. | |
| 403 | InvalidAccountStatus.SnapshotServiceUnavailable | Snapshot service has not been opened yet. | 快照服務未開通,操作無法執行。 |
| 403 | InvalidSnapshotId.NotReady | The specified snapshot has not completed yet. | |
| 403 | InvalidOperation.Unauthorized | The specified operation is unauthorized. | |
| 403 | InvalidOperation.UnfinishedCrossRegionCopy | This disk has unfinished cross-region copy snapshots in the target region. | 該磁碟還有未完成的跨地域快照拷貝。 |
| 403 | InvalidOperation.NotSupportCopyInSameRegion | Copying snapshot in the same region is not supported. | 複製快照的來源和目的region不能相同。 |
| 403 | InvalidSnapshotName.Malformed | The specified SnapshotName is malformed. | |
| 403 | InvalidDescription.Malformed | The specified description is malformed. | |
| 403 | InvalidRetentionDays.Malformed | The specified RetentionDays is not valid. | |
| 403 | InvalidRegionId.NotSupportedEncryptedSnapshotCopy | The specified region not support copy encrypted snapshot. | |
| 403 | InvalidRegion.NotSupport | The specified region does not support byok. | 該地域不支援 BYOK。 |
| 403 | InvalidRegionId.NotSupportEncryptAlgorithm | The current region does not support creating encrypted disks with EncryptAlgorithm. | |
| 403 | InvalidRegionId.NotExists | Region not exists. | |
| 403 | InvalidEncryptAlgorithm | The specified parameter EncryptAlgorithm is not valid. | |
| 403 | InvalidEncrypted.NotMatchKmsKeyId | The specified parameter Encrypted must be true when KmsKeyId is not empty. | |
| 403 | InvalidEncrypted.NotMatchEncryptAlgorithm | The specified parameter Encrypted must be true when EncryptAlgorithm is not empty. | |
| 403 | InvalidEncrypted.NotSupportDecrypt | Encrypted snapshot not support copy to decrypt snapshot. | |
| 403 | InvalidSnapshotCategory.NotSupportCrossRegionCopy | The specified snapshot does not support cross-region copy. | |
| 403 | InvalidSnapshotCategory.NotSupportEncryptedCopy | The specified snapshot does not support encrypted copy. | |
| 403 | InvalidParameter.KmsNotEnabled | The specified operation need enable KMS. | |
| 403 | InvalidParameter.DataEncryptedKeyCreateFailed | Failed to create the KMS data encryption key. Please verify that the current KMS key has authorized the ECS service to use it. If the issue persists; contact KMS Technical Support. | |
| 403 | InvalidParameter.KMSKeyId.NotFound | The specified KMSKeyId does not exist. | |
| 403 | InvalidParameter.KMSKeyId.KMSUnauthorized | ECS service does not have permission to access your KMS key. Please verify that the specified KMS key has authorized the ECS service. | |
| 403 | InvalidKMSKeyId.NotSymmetric | The specified parameter KmsKeyId must be symmetric. | |
| 403 | QuotaExceed.SnapshotQuota | The quota is insufficient. Please contact your channel partner to increase the quota. | |
| 403 | InvalidOperation.UnfinishedEncryptedSnapshotCopy | This disk has unfinished encrypted copy snapshots in the target region. | 雲端硬碟存在未完成的加密快照拷貝任務。 |
| 403 | InvalidParameterDestinationStorageLocationArn.Unauthorized | The operation has failed due to lack of permission for the specified "DestinationStorageLocationArn". Please use a resource with appropriate permission for the operation. | |
| 403 | InvalidParameterDestinationStorageLocationArn.RegionNotMatch | The region information in the specified parameter "DestinationStorageLocationArn" is inconsistent with "DestinationRegionId". Please use the correct information for the operation. | |
| 403 | InvalidSnapshot.StorageLocationNotSupported | The storage location of the current snapshot does not support this operation. | |
| 403 | InvalidSnapshot.EncryptedNotSupported | The current operation does not support the use of encrypted snapshots. | 加密快照不支援此操作。 |
| 403 | InvalidParameterDestinationStorageLocationArn.Malformed | The specified DestinationStorageLocationArn is malformed. | |
| 403 | OperationDenied.NonCompliantDestinationRegion | The copy operation to the destination region is not in compliance with regulations. | 目標地域不符合安全合規要求。 |
| 403 | OperationDenied.SnapshotCategoryNotSupportCopy | The specified category of snapshot not support copy. | 指定快照類型暫不支援拷貝。 |
| 403 | InvalidParameter.KMSKeyId.CMKNotEnabled | The CMK (Customer Master Key) must be in an active state. | 使用者主金鑰(CMK)需要處於活動狀態。 |
| 403 | InvalidParameter.KMSKeyId.CMKUnauthorized | The CMK(Customer Master Key) lacks authorization to add tags to the ECS service. | ECS 服務無權限加密/解密您的 CMK 金鑰。 |
| 409 | InvalidOperation.Conflict | Request was denied due to conflict with a previous request. Please try again later. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。