store secret value
The following table lists only the request parameters specific to this interface 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 Value', 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={"SetSecretValue"} />, Description: <RenderMd content={"Operation to perform, value: SetSecretValue."} />, 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: '->SecretName', Name: 'SecretName', DataType: 'String', IsRequired: 'yes', Example: <RenderMd content={"secret-9527"} />, Description: <RenderMd content={"secret name, length 2 to 128 characters. Valid characters: [a-zA-Z0-9/_+=.@-]"} />, children: [ ] }, { rowKey: '->SecretValue', Name: 'SecretValue', DataType: 'String', IsRequired: 'yes', Example: <RenderMd content={"{"username":"root","password":"123456"}"} />, Description: <RenderMd content={"Secret value, length not exceeding 30,720 bytes."} User-defined, recommended to use key-value pairs in JSON format. "} />, 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 lists only the return parameters specific to this interface. For more information, see return structure.
Parameter | Type | Example Value | Description |
|---|---|---|---|
VersionID | String | 54487470-102a-4f35-bfb1-b819e78f7579 | New version number of the stored secret value |
VersionStage | String | CURRENT | New version label for the stored secret value |
CreationDate | Long | 1723104729 | secret version creation time |
POST /?Action=SetSecretValue&Version=2021-02-18 HTTP/1.1 Host: kms.cn-beijing.volcengineapi.com Content-Type: application/json; charset=UTF-8 X-Date: 20240811T015427Z X-Content-Sha256: 287e874e******d653b44d21e Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20240811/cn-beijing/kms/request, SignedHeaders=host;x-content-sha256;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f { "SecretName": "secret-9527", "SecretValue": "{"username":"root","password":"123456"}" }
{ "ResponseMetadata": { "RequestId": "20240811095501069218106058666D53", "Action": "SetSecretValue", "Version": "2021-02-18", "Service": "kms", "Region": "cn-beijing" }, "Result": { "VersionID": "54487470-102a-4f35-bfb1-b819e78f7579", "VersionStage": "CURRENT", "CreationDate": 1723104729 } }
The table below lists error codes related to the business logic of this interface. For common error codes, refer to the Common Error Codes document.
Status Code | Error Code | Description |
|---|---|---|
400 | InvalidSecretType | |
400 | InvalidParameter | |
403 | AccessDenied | |
403 | Reject.Throttling.Action | |
404 | Not Found | |
500 | UndefinedError |