Create Key
- Print
- PDF
Create Key
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Available in Classic and VPC
Create a new key.
Request
This section describes the request format. The method and URI are as follows:
Method | URI |
---|---|
POST | /keys |
Request headers
For information about the headers common to all Key Management Service APIs, see the account authentication method in Key Management Service request headers.
Request body
You can include the following data in the body of your request:
Field | Type | Required | Description |
---|---|---|---|
keyName | String | Required | Key name
|
keyType | String | Required | Key type
|
memo | String | Optional | Key notes
|
isConvergent | Boolean | Optional | Whether to set convergent encryption
|
isAutoRotation | Boolean | Required | Whether to enable key auto-rotation
|
rotationPeriod | Integer | Optional | Set automatic key rotation cycle (day)
|
protectionType | String | Required | Key storage method
|
Request example
The request example is as follows:
Response
This section describes the response format.
Response body
The response body includes the following data:
Field | Type | Required | Description |
---|---|---|---|
code | String | - | Success or Failure |
data | Object | - | Response result |
data.keyId | Integer | - | Key identifier |
data.keyTag | String | - | Key tag
|
data.keyName | String | - | Key name
|
data.keyType | String | - | Key type
|
data.status | String | - | Key status
|
data.keystoreId | Integer | - | Logical keystore identifier assigned to the user |
data.protectionType | String | - | Key storage method
|
data.memo | String | - | Key notes
|
data.isConvergent | Boolean | - | Whether to set convergent encryption
|
data.isAutoRotation | Boolean | - | Whether to enable key auto-rotation
|
data.rotationPeriod | Integer | - | Automatic key rotation cycle (day) |
data.nextRotationDate | Long | - | Next scheduled rotation date and time (millisecond)
|
data.registerDate | Long | - | Key creation date and time (millisecond)
|
Response status codes
For response status codes common to all Key Management Service APIs, see Key Management Service response status codes.
Response example
The response example is as follows:
Was this article helpful?