You need to enable JavaScript to run this app.
Key Management System

Key Management System

Copy page
Download PDF
Secret manager
GetSecretValue - retrieve secret value
Copy page
Download PDF
GetSecretValue - retrieve secret value

retrieve secret value

Debug

Request parameters

The following table lists only the unique request parameters of this interface and some common parameters. For more information, see common parameters.

Parameter
Type
required
example value
description
Action
String
yes

GetSecretValue

Operation to execute; valid value: GetSecretValue.

Version
String
yes

2021-02-18

API version, value: 2021-02-18.

SecretName
String
yes

secret-9527

Secret name, length 2 to 128 characters. Valid characters: [a-zA-Z0-9/_+=.@-]

VersionID
String
No

b58a7e97-3000-4e6e-90c4-c01958333717

The version number of the secret value to retrieve. If empty, it returns the version labeled “CURRENT” by default.

response parameters

This table lists only the response parameters unique to this interface. For more information, see response structure.

const columns = [ 
  { 
    width: '25%', 
title: 'Parameter', 
    dataIndex: 'Name', 
    className: 'openapi-doc-parameter-table-name', 
  }, 
  { 
    width: 130, 
title: 'Type', 
    dataIndex: 'DataType', 
    className: 'openapi-doc-parameter-table-type' 
  }, 
  { 
    width: '25%', 
title: 'Example Value', 
    dataIndex: 'Example', 
    className: 'openapi-doc-parameter-table-example' 
  }, 
  { 
title: 'Description', 
    dataIndex: 'Description', 
    className: 'openapi-doc-parameter-table-description' 
  }, 
]; 

const data = [ 
  { 
    rowKey: "->VersionID", 
    Name: "VersionID", 
    DataType: "String", 
    Example: <RenderMd content={"b58a7e97-3000-4e6e-90c4-c01958333717"} />, 
Description: <RenderMd content={"Version number of the obtained secret value"} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: "->VersionStage", 
    Name: "VersionStage", 
    DataType: "String", 
    Example: <RenderMd content={"CURRENT"} />, 
Description: <RenderMd content={"version tag of the obtained secret value"} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: "->CreationDate", 
    Name: "CreationDate", 
    DataType: "Long", 
    Example: <RenderMd content={"1723284049"} />, 
Description: <RenderMd content={"secret version creation time"} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: "->SecretValue", 
    Name: "SecretValue", 
    DataType: "String", 
    Example: <RenderMd content={"{\"username\":\"root\",\"password\":\"123456\"}"} />, 
Description: <RenderMd content={"Obtained secret value"} /> 
    children: [ 
    ] 
  }, 
]; 

return (<Table 
  rowKey="rowKey" 
  className="openapi-doc-parameter-table" 
  columns={columns} 
  data={data} 
  border={ { cell: true, wrapper: true } } 
  scroll={ { x: "auto" } } 
  pagination={false} 
/>);

request example

GET /?Action=GetSecretValue&Version=2021-02-18&SecretName=secret-9527 HTTP/1.1 
Host: kms.cn-beijing.volcengineapi.com 
X-Date: 20240810T113459Z 
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20240810/cn-beijing/kms/request, SignedHeaders=host;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f


response example

{ 
  "ResponseMetadata": { 
    "RequestId": "20240810193520028008060086B0B947", 
    "Action": "GetSecretValue", 
    "Version": "2021-02-18", 
    "Service": "kms", 
    "Region": "cn-beijing" 
  }, 
  "Result": { 
    "VersionID": "b58a7e97-3000-4e6e-90c4-c01958333717", 
    "VersionStage": "CURRENT", 
    "CreationDate": 1723284049, 
    "SecretValue": "{"username":"root","password":"123456"}" 
  } 
}

Error code

The table below lists error codes related to this interface and business logic. See the Public Error Codes document for common error codes.

Status Code
Error Code
Error Message
Description
400
InvalidParameter

The request parameter %s is invalid.

403
AccessDenied

User is not authorized to do this action

403
Reject.Throttling.Action

The request of Action: %s upper limit is exceeded.

404
Not Found

Not found %s [%s].

500
UndefinedError

Undefined Internal Error. Pls Contact With Admin.

Last updated: 2025.06.27 15:24:18