retrieve secret value
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. |
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} />);
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
{ "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"}" } }
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 | Description |
|---|---|---|
400 | InvalidParameter | |
403 | AccessDenied | |
403 | Reject.Throttling.Action | |
404 | Not Found | |
500 | UndefinedError |