Querying a Secret Instance
Debugging
You can debug this API in API Explorer.
URI
POST /{version_id}/{project_id}/csms/{resource_instances}/action
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
resource_instances |
Yes |
String |
Resource instance. Its value is resource_instances. |
|
project_id |
Yes |
String |
Project ID. |
|
version_id |
Yes |
String |
API version |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
User token. The token can be obtained by calling the IAM API. (The token is the value of X-Subject-Token in the response header.) |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
limit |
No |
String |
Number of records in a query. If action is set to count, you do not need to set this parameter. If action is set to filter, the default value of this parameter is 10. The value range is 1 to 1000. |
|
offset |
No |
String |
Index location. The query starts from the next piece of data indexed by this parameter. When data on a page is queried, the value in the response body of the previous page is transferred to this parameter. (If action is to count, you do not need to set this parameter.) If the action value is filter, the default value is 0. The value must be a numeral and cannot be a negative number. |
|
action |
No |
String |
Operation type. It can be: |
|
tags |
No |
Array of Tag objects |
List of tags, including tag keys and tag values.
|
|
matches |
No |
Array of TagItem objects |
Search field. |
|
sequence |
No |
String |
36-byte serial number of a request message. Example: 919c82d4-8046-4722-9094-35c3c6524cff |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
key |
No |
String |
Key. The value contains a maximum of 36 Unicode characters. The value of key cannot be empty. It cannot contain ASCII characters (0–31), asterisks (*), angle brackets (< and >), backslashes (\), or equal signs (=). |
|
values |
No |
Array of strings |
Tag value set |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
key |
No |
String |
Key. The value contains a maximum of 36 Unicode characters. The value of key cannot be empty. It cannot contain ASCII characters (0–31), asterisks (*), angle brackets (< and >), backslashes (\), or equal signs (=). |
|
value |
No |
String |
Value. Each value contains a maximum of 43 Unicode characters and can be an empty string. It cannot contain ASCII characters (0–31), asterisks (*), angle brackets (< and >), backslashes (\), and equal signs (=). |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
resources |
Array of ActionResources objects |
Resource instance list. |
|
total_count |
Integer |
Total number of resources. |
|
Parameter |
Type |
Description |
|---|---|---|
|
resource_id |
String |
Resource ID |
|
resource_detail |
Secret object |
Secret |
|
resource_name |
String |
Resource name. This parameter is an empty string by default. |
|
tags |
Array of TagItem objects |
Tag list. If there is no tag in the list, an empty array is returned. |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Secret ID |
|
name |
String |
Secret name |
|
state |
String |
Secret status. Its value can be: ENABLED DISABLED PENDING_DELETE FROZEN |
|
kms_key_id |
String |
ID of the KMS CMK used to encrypt secret values |
|
description |
String |
Description of a secret |
|
create_time |
Long |
Secret creation time. The timestamp indicates the total seconds past the start of the epoch date (January 1, 1970). |
|
update_time |
Long |
Time when a secret was last updated. The timestamp indicates the total seconds past the start of the epoch date (January 1, 1970). |
|
scheduled_delete_time |
Long |
Time when a secret will be deleted as scheduled. The timestamp indicates the total seconds past the start of the epoch date (January 1, 1970). If a secret is not in Pending deletion state, the value of this parameter is null. |
|
Parameter |
Type |
Description |
|---|---|---|
|
key |
String |
Key. The value contains a maximum of 36 Unicode characters. The value of key cannot be empty. It cannot contain ASCII characters (0–31), asterisks (*), angle brackets (< and >), backslashes (\), and equal signs (=). |
|
value |
String |
Value. Each value contains a maximum of 43 Unicode characters and can be an empty string. It cannot contain ASCII characters (0–31), asterisks (*), angle brackets (< and >), backslashes (\), and equal signs (=). |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error |
ErrorDetail object |
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error information. |
Status code: 401
|
Parameter |
Type |
Description |
|---|---|---|
|
error |
ErrorDetail object |
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error information. |
Status code: 403
|
Parameter |
Type |
Description |
|---|---|---|
|
error |
ErrorDetail object |
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error information. |
Status code: 404
|
Parameter |
Type |
Description |
|---|---|---|
|
error |
ErrorDetail object |
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error information. |
Status code: 500
|
Parameter |
Type |
Description |
|---|---|---|
|
error |
ErrorDetail object |
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error information. |
Status code: 502
|
Parameter |
Type |
Description |
|---|---|---|
|
error |
ErrorDetail object |
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error information. |
Status code: 504
|
Parameter |
Type |
Description |
|---|---|---|
|
error |
ErrorDetail object |
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error information. |
Example Request
None
Example Response
None
Status Code
|
Status Code |
Description |
|---|---|
|
200 |
The request has succeeded. |
|
400 |
Invalid request parameters. |
|
401 |
Username and password are required to access the page requested. |
|
403 |
Authentication failed. |
|
404 |
The requested resource does not exist or is not found. |
|
500 |
Internal service error. |
|
502 |
Failed to complete the request. The server receives an invalid response from the upstream server. |
|
504 |
Gateway timed out. |
Error Code
For details, see Error Code.
Last Article: Secret Tag Management
Next Article: Batch Adding or Deleting Secret Tags
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.