Queries an encryption parameter and its value. Make sure that you have the permission to call this operation.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates a sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes GetSecretParameter

The operation that you want to perform. Set the value to GetSecretParameter.

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.

RegionId String No cn-hangzhou

The region ID of the resource.

ParameterVersion Integer No 1

The version number of the encryption parameter. Valid values: 1 to 100.

WithDecryption Boolean No false

Specifies whether to decrypt the parameter value. The decrypted parameter value is returned only when this parameter is set to true. Otherwise, null is returned.

Response parameters

Parameter Type Example Description
Parameter Struct

The information of the encryption parameter.

Constraints String '{''AllowedValues":["secretparameter"],"AllowedPattern":". *","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:28:47Z

The time when the encryption parameter was created.

Description String SecretParameter

The description of the encryption parameter.

Id String p-14ed150fdcd048xxxxxx

The ID of the encryption parameter.

Name String MySecretParameter

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:35:17Z

The time when the encryption parameter was updated.

Value String SecretParameter

The value of the encryption parameter.

RequestId String 7F14FB7C-C9BE-44AE-92ED-21ACC02FBFD2

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/? Action=GetSecretParameter
&Name=MySecretParameter
&<Common request parameters>

Sample success responses

XML format

<RequestId>7F14FB7C-C9BE-44AE-92ED-21ACC02FBFD2</RequestId>
<Parameter>
    <UpdatedBy>root(130900000)</UpdatedBy>
    <Type>Secret</Type>
    <CreatedBy>root(130900000)</CreatedBy>
    <Description>SecretParameter</Description>
    <UpdatedDate>2020-09-01T09:35:17Z</UpdatedDate>
    <ParameterVersion>1</ParameterVersion>
    <CreatedDate>2020-09-01T09:28:47Z</CreatedDate>
    <Id>p-14ed150fdcd048xxxxxx</Id>
    <Name>MySecretParameter</Name>
    <ShareType>Private</ShareType>
    <Value>SecretParameter</Value>
    <Constraints>{'AllowedValues':['secretparameter'],'AllowedPattern':'. *','MinLength':0,'MaxLength':20}</Constraints>
</Parameter>

JSON format

{
	"RequestId": "7F14FB7C-C9BE-44AE-92ED-21ACC02FBFD2",
	"Parameter": {
		"UpdatedBy": "root(130900000)",
		"Type": "Secret",
		"CreatedBy": "root(130900000)",
		"Description": "SecretParameter",
		"UpdatedDate": "2020-09-01T09:35:17Z",
		"ParameterVersion": 1,
		"CreatedDate": "2020-09-01T09:28:47Z",
		"Id": "p-14ed150fdcd048xxxxxx",
		"Name": "MySecretParameter",
		"ShareType": "Private",
        "Value": "SecretParameter",
        "Constraints":"{'AllowedValues':['secretparameter'],'AllowedPattern':'. *','MinLength':0,'MaxLength':20}"
	}
}

Error codes

For a list of error codes, visit the API Error Center.