將一份標準快照或加密快照從一個地域複製到另一個地域。
介面說明
呼叫該介面時,您需要注意:
複製後的新快照不能復原來源快照對應的雲端硬碟。
不支援複製本地快照。
調試
您可以在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 |
否 |
|||
| AssumeRoleFor |
integer |
否 |
說明
該參數暫未開放使用。 |
0 |
| RoleType |
string |
否 |
說明
該參數暫未開放使用。 |
null |
| Rolearn |
string |
否 |
說明
該參數暫未開放使用。 |
null |
| DestinationStorageLocationArn |
string |
否 |
說明
該參數暫未開放使用。 |
null |
| ClientToken |
string |
否 |
保證請求冪等性。從您的用戶端生成一個參數值,確保不同請求間該參數值唯一。ClientToken 只支援 ASCII 字元,且不能超過 64 個字元。更多詳情,請參閱如何保證冪等性。 |
123e4567-e89b-12d3-a456-426655440000 |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| RequestId |
string |
請求 ID。 |
C8B26B44-0189-443E-9816-D951F596**** |
| SnapshotId |
string |
新快照的 ID。 |
s-bp17441ohwka0yui**** |
樣本
正常返回樣本
JSON格式
{
"RequestId": "C8B26B44-0189-443E-9816-D951F596****",
"SnapshotId": "s-bp17441ohwka0yui****"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | Duplicate.TagKey | The Tag.N.Key contain duplicate key. | 標籤中存在重複的鍵,請保持鍵的唯一性。 |
| 400 | InvalidTagKey.Malformed | The specified Tag.n.Key is not valid. | 指定的標籤鍵參數有誤。 |
| 400 | InvalidTagValue.Malformed | The specified Tag.n.Value is not valid. | 指定的標籤值參數有誤。 |
| 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. | 指定的快照不存在,請您檢查快照是否正確。 |
| 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. | 不支援指定的地域。 |
| 403 | InvalidRegionId.NotSupportEncryptAlgorithm | The current region does not support creating encrypted disks with EncryptAlgorithm. | |
| 403 | InvalidRegionId.NotExists | Region not exists. | |
| 403 | InvalidEncryptAlgorithm | The specified EncryptAlgorithm is not valid. Ensure the value is a supported encryption algorithm such as AES-256. | |
| 403 | InvalidEncrypted.NotMatchKmsKeyId | The Encrypted parameter must be set to true when KMSKeyId is specified. Please adjust the parameters and try again. | |
| 403 | InvalidEncrypted.NotMatchEncryptAlgorithm | The Encrypted parameter must be set to true when EncryptAlgorithm is specified. Please adjust the parameters and try again. | |
| 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 | The ECS service is not authorized to access your KMS key. Please grant the ECS service permission to use the key and try again. | |
| 403 | InvalidParameter.KMSKeyId.NotFound | The specified KMSKeyId does not exist. Please verify that the key ID is correct and that the key resides in the current region. | |
| 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 KMSKeyId must be a symmetric key. Please use a symmetric KMS key such as an AES-256 key. | |
| 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 specified KMS key must be in an enabled state. Please enable the key in the KMS console and try again. | |
| 403 | InvalidParameter.KMSKeyId.CMKUnauthorized | The specified KMS key is not authorized for the ECS service. Please grant the ECS service permission to use the key in the KMS console and try again. | |
| 403 | OperationDenied.NotInArnsWhitelist | The current account is not authorized for this operation. Please check the ARNS whitelist configuration. | |
| 403 | OperationDenied.KMSKeyUnauthorized | The operation is denied due to missing KMS key authorization. Please check the KMS key permissions and ensure the key is properly authorized for this operation. | |
| 409 | InvalidOperation.Conflict | Request was denied due to conflict with a previous request. Please try again later. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。