Queries encryption parameters by path. Make sure that you have the permissions to call the GetSecretValue operation of Key Management Service (KMS) before you call this operation.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
oos:GetSecretParametersByPath | get |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | No | The region ID. | cn-hangzhou |
Path | string | Yes | The path of the encryption parameter. The path must be 1 to 200 characters in length. For example, if the name of an encryption parameter is /secretParameter/mySecretParameter, the path of the encryption parameter is /secretParameter. | /secretParameter |
Recursive | boolean | No | Specifies whether to recursively query encryption parameters from all levels of directories in the specified path. Valid values: true and false. For example, if you want to query the /secretParameter/mySecretParameter and /secretParameter/secretParameter 1/mySecretParameter parameters, the valid values specify the parameters to be returned.
| false |
NextToken | string | No | A pagination token. It can be used in the next request to retrieve a new page of results. | MTRBMDc0NjAtRUJFNy00N0NBLTk3NTctMTJDQzA |
MaxResults | integer | No | The number of entries per page. Valid values: 1 to 10. Default value: 10. | 10 |
WithDecryption | boolean | No | Specifies whether to decrypt the parameter value. Default value: false. Valid values:
| true |
Response parameters
Examples
Sample success responses
JSON
format
{
"NextToken": "gAAAAABfTgv5ewUWmNdJ3g7JVLvX70sPH90GZOVGC",
"RequestId": "25156E99-7437-4590-AA58-2ACA17DE405C",
"TotalCount": 10,
"MaxResults": 10,
"Parameters": [
{
"Type": "Secret",
"UpdatedDate": "2020-10-21T06:22:48Z",
"UpdatedBy": "root(130900000)",
"KeyId": "090xxbex-xexx-xxxx-axfc-ddxxcxxxxcex",
"Value": "secretParameter",
"Description": "secretParameter",
"Constraints": "{\\\"AllowedPattern\\\": \\\"^[a-g]*$\\\"}",
"CreatedBy": "root(130900000)",
"CreatedDate": "2020-10-21T06:22:48Z",
"ParameterVersion": 1,
"Name": "mySecretParameter",
"Id": "p-7cdc0000000000000000",
"ShareType": "Private"
}
]
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|