Creates an encryption parameter. Make sure that you have the permission to call this operation.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | CreateSecretParameter |
The operation that you want to perform. Set the value to CreateSecretParameter. |
Name | String | Yes | MySecretParameter |
The name of the encryption parameter. The name must be 1 to 180 characters in length, and can contain letters, digits, hyphens (-), and underscores (_). It cannot start with ALIYUN, ACS, ALIBABA, ALICLOUD, or OOS. |
Type | String | Yes | Secret |
The data type of the encryption parameter. Set the value to Secret. |
Value | String | Yes | SecretParameter |
The value of the encryption parameter. The value must be 1 to 4096 characters in length. |
RegionId | String | No | cn-hangzhou |
The region ID of the resource. |
Description | String | No | SecretParameter |
The description of the encryption parameter. The description must be 1 to 200 characters in length. |
KeyId | String | No | 80e9409f-78fa-42ab-84bd-83f40c****** |
The Customer Master Key (CMK) of Key Management Service (KMS) that is used to encrypt the parameter. |
ClientToken | String | No | 123e4567-e89b-12d3-a456-42665544**** |
The client token that is used to ensure the idempotence of the request. The token is a unique string that is generated by the client. The token must be 1 to 64 characters in length, and can contain letters, digits, hyphens (-), and underscores (_). For more information, see How to ensure idempotence. |
Constraints | String | No | '{''AllowedValues":["secretparameter"],"AllowedPattern":"secretparameter","MinLength":0,"MaxLength":20}' |
The constraints of the encryption parameter. By default, this parameter is null. Valid values:
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Parameter | Struct |
The information of the encryption parameter. |
|
Constraints | String | '{ "AllowedValues": ["secretparameter"], "AllowedPattern": "secretparameter", "MinLength": 0, "MaxLength": 20 }' |
The constraints of the encryption parameter. |
CreatedBy | String | root(130900000) |
The user who created the encryption parameter. |
CreatedDate | String | 2020-09-01T09:30:36Z |
The time when the encryption parameter was created. |
Description | String | SecretParameter |
The description of the encryption parameter. |
Id | String | p-0b0fff9919c946xxxxxx |
The ID of the encryption parameter. |
Name | String | MyParameter |
The name of the encryption parameter. |
ParameterVersion | Integer | 1 |
The version number of the encryption parameter. |
ShareType | String | Private |
The share type of the encryption parameter. |
Type | String | Secret |
The data type of the encryption parameter. |
UpdatedBy | String | root(130900000) |
The user who updated the encryption parameter. |
UpdatedDate | String | 2020-09-01T09:30:36Z |
The time when the encryption parameter was updated. |
RequestId | String | 0B419FF3-ABC6-4DF0-95E5-636DC8CBB8AF |
The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/? Action=CreateSecretParameter
&Name=MySecretParameter
&Type=Secret
&Value=SecretParameter
&<Common request parameters>
Sample success responses
XML
format
<RequestId>0B419FF3-ABC6-4DF0-95E5-636DC8CBB8AF</RequestId>
<Parameter>
<UpdatedBy>root(130900000)</UpdatedBy>
<Type>Secret</Type>
<CreatedBy>root(130900000)</CreatedBy>
<Description>SecretParameter</Description>
<UpdatedDate>2020-09-01T09:30:36Z</UpdatedDate>
<ParameterVersion>1</ParameterVersion>
<CreatedDate>2020-09-01T09:30:36Z</CreatedDate>
<Id>p-0b0fff9919c946xxxxxx</Id>
<Name>MyParameter</Name>
<ShareType>Private</ShareType>
<Constraints>{'AllowedValues':['secretparameter'],'AllowedPattern':'secretparameter','MinLength':0,'MaxLength':20}</Constraints>
</Parameter>
JSON
format
{
"RequestId": "0B419FF3-ABC6-4DF0-95E5-636DC8CBB8AF",
"Parameter": {
"UpdatedBy": "root(130900000)",
"Type": "Secret",
"CreatedBy": "root(130900000)",
"Description": "SecretParameter",
"UpdatedDate": "2020-09-01T09:30:36Z",
"ParameterVersion": 1,
"CreatedDate": "2020-09-01T09:30:36Z",
"Id": "p-0b0fff9919c946xxxxxx",
"Name": "MyParameter",
"ShareType": "Private",
"Constraints":"{'AllowedValues':['secretparameter'],'AllowedPattern':'secretparameter','MinLength':0,'MaxLength':20}"
}
}
Error codes
For a list of error codes, visit the API Error Center.