Domain name for API request: ssm.intl.tencentcloudapi.com.
This API is used to create a version under a specified secret. Custom secrets are supported. If VersionId is not specified, the system generates a version number and returns it in the response. You can specify Stage_Current to bind a stage label to the new version.
A secret can contain up to 10 versions. You must specify either SecretBinary or SecretString, but not both.
A maximum of 100 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: PutSecretValue. |
| Version | Yes | String | Common Params. The value used for this API: 2019-09-23. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
| SecretName | Yes | String | Specifies the name of the secret to which a version is to be added. |
| VersionId | No | String | Specifies the version number of the new secret version. This parameter is optional. If not specified, the system generates a UUID v4 and returns it through the response field VersionId. Format: Up to 64 bytes, consisting of letters, digits, or a combination of - _ . and starting with a letter or digit. Each call that omits VersionId generates a new version. To identify the same version or handle retries, the caller should generate and reuse VersionId. If the version number already exists, ResourceInUse.VersionIdExists is returned. |
| SecretBinary | No | String | Binary secret information, encoded in base64. |
| SecretString | No | String | Plaintext of the text secret information (base64 encoding is not required). You must set either SecretBinary or SecretString, but not both. |
| VersionStage | No | String | Sets a version tag for the new version. Only Stage_Current is supported, and it is case-sensitive. This API supports custom secrets only. Input limits: You must specify a non-empty value for either SecretString or SecretBinary, but not both. |
| Parameter Name | Type | Description |
|---|---|---|
| SecretName | String | Secret name. |
| VersionId | String | Newly added version number. |
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
https://ssm.intl.tencentcloudapi.com/?Action=PutSecretValue
&SecretName=lzctest
&VersionId=v2.0
&SecretString=lzctestv2
&<Common request parameters>
{
"Response": {
"RequestId": "6764f1f5-8229-4033-a831-46180aee30cf",
"SecretName": "lzctest",
"VersionId": "v2.0"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| FailedOperation | Operation failed. |
| FailedOperation.AccessKmsError | KMS operation failed. |
| InternalError | Internal error. |
| InvalidParameterValue | Parameter value error. |
| LimitExceeded | The quota limit is exceeded. |
| OperationDenied | Operation denied. |
| OperationDenied.AutoRotatedResource | Credentials with automatic rotation cannot be updated manually. |
| ResourceInUse.VersionIdExists | The version number already exists. |
| ResourceNotFound | Resources do not exist. |
| ResourceUnavailable.NotPurchased | The service has not been purchased. |
| UnauthorizedOperation | Unauthorized operation. |
Apakah halaman ini membantu?
Anda juga dapat Menghubungi Penjualan atau Mengirimkan Tiket untuk meminta bantuan.
masukan