A private image can be copied within a region as another one. The API used is an extension API. When replicating an image, you can change the image attributes to meet the requirements of different scenarios.
The token obtained from IAM is valid for only 24 hours. If you want to use a token for authentication, you can cache it to avoid frequently calling the IAM API.
If you use a token for authentication, you must obtain the token and add X-Auth-Token to the request header of the IMS API when making an API call.
{ "name": "ims_encrypted_copy3", //Image name (mandatory, string) "description": "test copy", //Image description (optional, string) "cmk_id": "bd66288c-9081-460a-8227-4cbd0c814cb4" //Encryption key (optional, string) }
If the request is successful, a job ID is returned.
If the job status is SUCCESS, the image is successfully replicated.
For details about status codes for request errors, see Status Codes.