list secrets
The table below lists only the request parameters unique to this API and some common parameters. For more information, see common parameters.
const columns = [ { width: '20%', title: 'Parameter', dataIndex: 'Name', className: 'openapi-doc-parameter-table-name' }, { width: 130, title: 'Type', dataIndex: 'DataType', className: 'openapi-doc-parameter-table-type' }, { width: 90, title: 'Required', dataIndex: 'IsRequired', className: 'openapi-doc-parameter-table-required' }, { width: '20%', title: 'Example', dataIndex: 'Example', className: 'openapi-doc-parameter-table-example' }, { title: 'description', dataIndex: 'Description', className: 'openapi-doc-parameter-table-description' }, ]; const data = [ { rowKey: '->Action', Name: 'Action', DataType: 'String', IsRequired: 'yes', Example: <RenderMd content={"DescribeSecrets"} />, Description: <RenderMd content={"The action to execute, valid value: DescribeSecrets."} />, children: [ ] }, { rowKey: '->Version', Name: 'Version', DataType: 'String', IsRequired: 'yes', Example: <RenderMd content={"2021-02-18"} />, Description: <RenderMd content={"API version, value: 2021-02-18."} />, children: [ ] }, { rowKey: '->Filters', Name: 'Filters', DataType: 'String', IsRequired: 'No', Example: <RenderMd content={"[{"Key":"SecretName","Values":["hello","world"]}]"} />, Description: <RenderMd content={"Query secrets that meet specified conditions, composed of Key-Values pairs."} />, \nKey\n Description: the attribute to query. \n Type: String. \n Values: \n SecretName: secret name. SecretType: Type of secret. SecretState: State of the secret. ManagedState: Whether it is a managed secret. RotationState: Rotation status of the secret. Description: Description of the secret. CreationDateRange: Time range for secret creation. UpdateDateRange: Time range for secret update. Values describe: Specific values of the attribute. Type: List of strings. Capacity: 1 to 10. Value description: when the key is SecretName: supports fuzzy search, case insensitive, example: ["hello","world"] when the key is Trn: supports fuzzy search, case insensitive, example: ["kms","secret"] when the key is SecretType: values are Generic, IAM, RDS, Redis, ECS, case sensitive, example: ["ECS","IAM"] when the key is SecretState: values are Enable, Disable, PendingDelete, case sensitive, example: ["Enable","PendingDelete"] when the key is ManagedState: values are true, false, case sensitive, example: ["true"] when the key is RotationState: values are Enable, Disable, Rotating, case sensitive, example: ["Enable","Rotating"] when the key is Description: supports fuzzy search, case insensitive, example: ["hello","world"] when the key is CreationDateRange: must enter start time and end time, example: ["2024-08-13 10:00:00","2024-08-14 10:00:00"] when the key is UpdateDateRange: must enter start time and end time, example: ["2024-08-13 10:00:00","2024-08-14 10:00:00"] Within the same key in filters, multiple values use OR logic; between different keys, use AND logic For example: entering [{"Key":"SecretName", "Values":["hello","world"]},{"Key":"SecretType", "Values":["ECS"]}] means: (SecretName=hello OR SecretName=world) AND (SecretType=ECS). "} />, children: [ ] }, { rowKey: '->ProjectName', Name: 'ProjectName', DataType: 'String', IsRequired: 'No', Example: <RenderMd content={"default"} />, Description: <RenderMd content={"secret project name"} />, children: [ ] }, { rowKey: '->CurrentPage', Name: 'CurrentPage', DataType: 'Integer', IsRequired: 'no', Example: <RenderMd content={"1"} />, Description: <RenderMd content={"Page number for pagination search, value >= 1"} />, children: [ ] }, { rowKey: '->PageSize', Name: 'PageSize', DataType: 'Integer', IsRequired: 'No', Example: <RenderMd content={"20"} />, Description: <RenderMd content={"Page size for paginated search, value range: [1, 100]"} />, children: [ ] }, ]; return (<Table rowKey="rowKey" className="openapi-doc-parameter-table" columns={columns} data={data} border={ { cell: true, wrapper: true } } scroll={ { x: "auto" } } pagination={false} />);
The table below only lists return parameters unique to this interface. See return structure for more information.
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: "->Secrets", Name: "Secrets", DataType: "Array of 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={"secret information"} />, children: [ { rowKey: "->Secrets->ID", Name: "ID", DataType: "String", Example: <RenderMd content={""} />, Description: <RenderMd content={"unique identifier for the secret, in UUID format"} />, children: [ ] }, { rowKey: "->Secrets->CreationDate", Name: "CreationDate", DataType: "Long", Example: <RenderMd content={""} />, Description: <RenderMd content={"secret creation time"} />, children: [ ] }, { rowKey: "->Secrets->UpdateDate", Name: "UpdateDate", DataType: "Long", Example: <RenderMd content={""} />, Description: <RenderMd content={"secret update date"} />, children: [ ] }, { rowKey: "->Secrets->SecretName", Name: "SecretName", DataType: "String", Example: <RenderMd content={"secret-9527"} />, Description: <RenderMd content={"secret name"} />, children: [ ] }, { rowKey: "->Secrets->UID", Name: "UID", DataType: "String", Example: <RenderMd content={""} />, Description: <RenderMd content={"secret tenant ID"} />, children: [ ] }, { rowKey: "->Secrets->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: "->Secrets->ProjectName", Name: "ProjectName", DataType: "String", Example: <RenderMd content={"default"} />, Description: <RenderMd content={"secret item name"} />, children: [ ] }, { rowKey: "->Secrets->Description", Name: "Description", DataType: "String", Example: <RenderMd content={""} />, Description: <RenderMd content={"secret description"} />, children: [ ] }, { rowKey: "->Secrets->SecretType", Name: "SecretType", DataType: "String", Example: <RenderMd content={"Generic"} />, Description: <RenderMd content={"secret type"} />, children: [ ] }, { rowKey: "->Secrets->SecretState", Name: "SecretState", DataType: "String", Example: <RenderMd content={"Enable"} />, Description: <RenderMd content={"secret state"} />, children: [ ] }, { rowKey: "->Secrets->EncryptionKey", Name: "EncryptionKey", DataType: "String", Example: <RenderMd content={""} />, Description: <RenderMd content={"KMS key TRN for the secret encryption credential value; if not specified, it will not be displayed."} />, children: [ ] }, { rowKey: "->Secrets->Managed", Name: "Managed", DataType: "Boolean", Example: <RenderMd content={"false"} />, Description: <RenderMd content={"whether it is a managed secret"} />, children: [ ] }, { rowKey: "->Secrets->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: "->Secrets->RotationState", Name: "RotationState", DataType: "String", Example: <RenderMd content={"Enable"} />, Description: <RenderMd content={"Rotation state:\nEnable: Automatic rotation enabled\nDisable: Automatic rotation disabled\nRotating: Automatically rotating\nNone: Automatic rotation not supported"} />, children: [ ] }, { rowKey: "->Secrets->RotationInterval", Name: "RotationInterval", DataType: "Integer", Example: <RenderMd content={""} />, Description: <RenderMd content={"Automatic rotation interval, unit: seconds"} />, children: [ ] }, { rowKey: "->Secrets->LastRotationTime", Name: "LastRotationTime", DataType: "String", Example: <RenderMd content={""} />, Description: <RenderMd content={"secret last rotation time"} /> children: [ ] }, { rowKey: "->Secrets->ScheduleRotationTime", Name: "ScheduleRotationTime", DataType: "String", Example: <RenderMd content={""} />, Description: <RenderMd content={"secret next rotation time"} /> children: [ ] }, { rowKey: "->Secrets->ScheduleDeleteTime", Name: "ScheduleDeleteTime", DataType: "String", Example: <RenderMd content={""} />, Description: <RenderMd content={"secret scheduled deletion time"} />, children: [ ] }, ] }, { rowKey: "->PageInfo", Name: "PageInfo", DataType: "Object", Example: <RenderMd content={""PageInfo": {\n "TotalCount": 1,\n "PageSize": 20,\n "CurrentPage": 1,\n "Count": 1\n}"} />, Description: <RenderMd content={"pagination information"} />, children: [ { rowKey: "->PageInfo->TotalCount", Name: "TotalCount", DataType: "Integer", Example: <RenderMd content={""} />, Description: <RenderMd content={"total count of pagination search items"} />, children: [ ] }, { rowKey: "->PageInfo->PageSize", Name: "PageSize", DataType: "Integer", Example: <RenderMd content={""} />, Description: <RenderMd content={"Page size for pagination lookup"} />, children: [ ] }, { rowKey: "->PageInfo->CurrentPage", Name: "CurrentPage", DataType: "Integer", Example: <RenderMd content={""} />, Description: <RenderMd content={"page number for pagination search, starting from 1"} />, children: [ ] }, { rowKey: "->PageInfo->Count", Name: "Count", DataType: "Integer", Example: <RenderMd content={""} />, Description: <RenderMd content={"Number of items on the current page found by pagination"} />, children: [ ] }, ] }, ]; return (<Table rowKey="rowKey" className="openapi-doc-parameter-table" columns={columns} data={data} border={ { cell: true, wrapper: true } } scroll={ { x: "auto" } } pagination={false} />);
POST /?Action=DescribeSecrets&Version=2021-02-18 HTTP/1.1 Host: kms.cn-beijing.volcengineapi.com Content-Type: application/json; charset=UTF-8 X-Date: 20240814T083317Z X-Content-Sha256: 287e874e******d653b44d21e Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20240814/cn-beijing/kms/request, SignedHeaders=host;x-content-sha256;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f { "Filters": "[{"Key":"SecretName","Values":["secret","9527"]}]", "ProjectName": "default", "CurrentPage": 1, "PageSize": 20 }
{ "ResponseMetadata": { "RequestId": "202408080951551860031671271B4C78", "Action": "DescribeSecrets", "Version": "2021-02-18", "Service": "kms", "Region": "cn-beijing" }, "Result": { "Secrets": [ { "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 } ], "PageInfo": { "TotalCount": 1, "PageSize": 20, "CurrentPage": 1, "Count": 1 } } }
The table below lists error codes related to this interface and business logic. For public error codes, see the Public Error Codes document.
Status Code | Error Code | description |
|---|---|---|
400 | InvalidParameter | |
403 | Reject.Throttling.Action | |
403 | AccessDenied | |
500 | UndefinedError |