query secret
The following table lists only the request parameters unique to this interface and some common parameters. For more information, see common parameters.
Parameter | Type | Is required | Example value | description |
|---|---|---|---|---|
Action | String | yes | DescribeSecret | Action to perform, value: DescribeSecret. |
Version | String | yes | 2021-02-18 | API version, value: 2021-02-18. |
SecretName | String | yes | secret-9527 | Secret name, length between 2 and 128 characters. Valid characters: [a-zA-Z0-9/_+=.@-] |
The table below 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: "->Secret", Name: "Secret", DataType: "Object", Example: <RenderMd content={"{\n "ID": "d24a9f14-1a8b-4393-b66e-b77b766b6666",\n "CreationDate": 1625818017,\n "UpdateDate": 1625818017591,\n "SecretName": "secret-9527",\n "UID": "2100000282",\n "Trn": "trn:kms:cn-beijing:2100000282:secrets/secret-9527",\n "ProjectName": "default",\n "Description": "test",\n "SecretType": "Generic",\n "Managed": false,\n "ExtendedConfig": "",\n "RotationState": "None",\n "RotationInterval": 0\n}"} />, Description: <RenderMd content={"credential information queried"} />, children: [ { rowKey: "->Secret->ID", Name: "ID", DataType: "String", Example: <RenderMd content={""} />, Description: <RenderMd content={"unique secret identifier in UUID format"} />, children: [ ] }, { rowKey: "->Secret->CreationDate", Name: "CreationDate", DataType: "Long", Example: <RenderMd content={""} />, Description: <RenderMd content={"secret creation time"} />, children: [ ] }, { rowKey: "->Secret->UpdateDate", Name: "UpdateDate", DataType: "Long", Example: <RenderMd content={""} />, Description: <RenderMd content={"secret update date"} />, children: [ ] }, { rowKey: "->Secret->SecretName", Name: "SecretName", DataType: "String", Example: <RenderMd content={"secret-9527"} />, Description: <RenderMd content={"secret name"} />, children: [ ] }, { rowKey: "->Secret->UID", Name: "UID", DataType: "String", Example: <RenderMd content={""} />, Description: <RenderMd content={"secret tenant ID"} />, children: [ ] }, { rowKey: "->Secret->Trn", Name: "Trn", DataType: "String", Example: <RenderMd content={""} />, Description: <RenderMd content={"secret resource name, format should be trn:kms:${Region}:${AccountID}:secrets/${secret}"} />, children: [ ] }, { rowKey: "->Secret->ProjectName", Name: "ProjectName", DataType: "String", Example: <RenderMd content={"default"} />, Description: <RenderMd content={"secret project name"} />, children: [ ] }, { rowKey: "->Secret->Description", Name: "Description", DataType: "String", Example: <RenderMd content={""} />, Description: <RenderMd content={"secret description"} />, children: [ ] }, { rowKey: "->Secret->SecretType", Name: "SecretType", DataType: "String", Example: <RenderMd content={"Generic"} />, Description: <RenderMd content={"secret type"} />, children: [ ] }, { rowKey: "->Secret->SecretState", Name: "SecretState", DataType: "String", Example: <RenderMd content={"Enable"} />, Description: <RenderMd content={"secret status"} />, children: [ ] }, { rowKey: "->Secret->EncryptionKey", Name: "EncryptionKey", DataType: "String", Example: <RenderMd content={""} />, Description: <RenderMd content={"KMS key TRN of the encrypted secret value, not displayed if unspecified."} />, children: [ ] }, { rowKey: "->Secret->Managed", Name: "Managed", DataType: "Boolean", Example: <RenderMd content={"false"} />, Description: <RenderMd content={"Whether it is a managed secret"} />, children: [ ] }, { rowKey: "->Secret->ExtendedConfig", Name: "ExtendedConfig", DataType: "String", Example: <RenderMd content={"{"InstanceId":"xxx","SecretSubType":"Password","CustomData":{"desc":"test"}}"} />, Description: <RenderMd content={"extended configuration for the secret"} />, children: [ ] }, { rowKey: "->Secret->RotationState", Name: "RotationState", DataType: "String", Example: <RenderMd content={"Enable"} />, Description: <RenderMd content={"Rotation state:\nEnable: Auto rotation enabled\nDisable: Auto rotation disabled\nRotating: Auto rotation in progress\nNone: Auto rotation not supported"} />, children: [ ] }, { rowKey: "->Secret->RotationInterval", Name: "RotationInterval", DataType: "Integer", Example: <RenderMd content={""} />, Description: <RenderMd content={"Auto rotation interval in seconds"} />, children: [ ] }, { rowKey: "->Secret->LastRotationTime", Name: "LastRotationTime", DataType: "String", Example: <RenderMd content={""} />, Description: <RenderMd content={"secret last rotation time"} />, children: [ ] }, { rowKey: "->Secret->ScheduleRotationTime", Name: "ScheduleRotationTime", DataType: "String", Example: <RenderMd content={""} />, Description: <RenderMd content={"next secret rotation time"} />, children: [ ] }, { rowKey: "->Secret->ScheduleDeleteTime", Name: "ScheduleDeleteTime", DataType: "String", Example: <RenderMd content={""} />, Description: <RenderMd content={"Secret schedule deletion time"} />, 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=DescribeSecret&Version=2021-02-18&SecretName=secret-9527 HTTP/1.1 Host: kms.cn-beijing.volcengineapi.com X-Date: 20240808T020044Z Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20240808/cn-beijing/kms/request, SignedHeaders=host;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f
{ "ResponseMetadata": { "RequestId": "20240808100105207033003140DB67B3", "Action": "DescribeSecret", "Version": "2021-02-18", "Service": "kms", "Region": "cn-beijing" }, "Result": { "Secret": { "ID": "d24a9f14-1a8b-4393-b66e-b77b766b6666", "CreationDate": 1625818017, "UpdateDate": 1625818017591, "SecretName": "secret-9527", "UID": "2100000282", "Trn": "trn:kms:cn-beijing:2100000282:secrets/secret-9527", "ProjectName": "default", "Description": "test", "SecretType": "Generic", "SecretState": "Enable", "EncryptionKey": "", "Managed": false, "ExtendedConfig": "", "RotationState": "None", "RotationInterval": 0 } } }
The following table lists the error codes related to this interface and business logic. For common error codes, please refer to the Common Error Codes document.
Status Code | Error Code | Description |
|---|---|---|
400 | InvalidParameter | |
403 | AccessDenied | |
403 | Reject.Throttling.Action | |
404 | Not Found | |
500 | UndefinedError |