Converting an Ordinary Cluster to an Encryption Cluster
Function
This API is used to convert an ordinary cluster to an encryption d cluster
Constraints
To convert an encryption cluster, the ordinary cluster version must be 8.0.0 or later.
To convert an encryption cluster, the guestAgent version must be 8.3.0.200 or later.
Calling Method
For details, see Calling APIs.
URI
POST /v2/{project_id}/clusters/{cluster_id}/encrypt
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Definition Project ID. To obtain the value, see Obtaining a Project ID. Constraints N/A Range N/A Default Value N/A |
cluster_id |
Yes |
String |
Definition Cluster ID. For details about how to obtain the value, see Obtaining the Cluster ID. Constraints N/A Range N/A Default Value N/A |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
encrypt |
No |
EncryptCluster object |
Definition Request for converting to an encryption cluster. Range N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
master_key_id |
Yes |
String |
Definition KMS key ID. Constraints N/A Range N/A Default Value N/A |
master_key_name |
No |
String |
Definition KMS key name. Constraints N/A Range N/A Default Value N/A |
crypt_algorithm |
Yes |
String |
Definition Cryptographic algorithm. International or SM series cryptographic algorithms are supported. Constraints N/A Range generalCipher: AES-CBC algorithm is used. SMcompatible: SM4 algorithm is used. Default Value N/A |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Definition Error code. Range N/A |
error_msg |
String |
Definition Error message. Range N/A |
job_id |
String |
Definition Task ID, which can be used to query the task progress. Range N/A |
Example Requests
Convert an ordinary cluster to an encryption cluster (use the KMS-1abd-1016 keys and the default international encryption algorithm).
POST https://{endpoint}/v2/89cd04f168b84af6be287f71730fdb4b/clusters/97cbaab3-939e-4dbc-9187-0fe240f2b9fd/encrypt { "encrypt" : { "crypt_algorithm" : "generalCipher", "master_key_id" : "0f3196c8-5c23-469f-84da-92ecd2499dce", "master_key_name" : "KMS-1abd-1016" } }
Example Responses
Status code: 200
Request submitted.
{ "job_id" : "2c9080d08cc99d28018ccd139e942498" }
Status Codes
Status Code |
Description |
---|---|
200 |
Request submitted. |
400 |
Request error. |
401 |
Authentication failed. |
403 |
You do not have required permissions. |
404 |
No resources found. |
500 |
Internal server error. |
503 |
Service unavailable. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot