tencent cloud

Secrets Manager

DescribeSecret

다운로드
포커스 모드
폰트 크기
마지막 업데이트 시간: 2026-11-30 19:10:30

1. API Description

Domain name for API request: ssm.intl.tencentcloudapi.com.

This API is used to obtain the detailed attribute information of a credential.

A maximum of 100 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

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: DescribeSecret.
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 credential whose details are to be obtained.

3. Output Parameters

Parameter Name Type Description
SecretName String

Credential name.

Description String

Credential description.

KmsKeyId String

KMS CMK ID used for encryption.

CreateUin Integer

Creator UIN.

Status String

Credential status: Enabled, Disabled, PendingDelete, Creating, Failed.

DeleteTime Integer

Deletion date, Unix timestamp. The value is 0 for credentials not in the pending deletion status.

CreateTime Integer

Creation date.

SecretType Integer

0 -- user-defined credential type; 1 -- database credential type; 2 -- SSH key pair credential type; 3 -- cloud API key (AKSK) credential type (to use this feature, contact cloud assistant to enable the allowlist separately); 4 -- Redis credential type.

ProductName String

Cloud product name.

ResourceID String

Cloud product instance ID.

RotationStatus Boolean

Whether to enable rotation: True -- enable rotation; False -- disable rotation.

RotationFrequency Integer

Rotation period, in days by default.

ResourceName String

This field is valid when the credential type is SSH key pair credential, and it indicates the name of the SSH key pair credential.

ProjectID Integer

This field is valid when the credential type is SSH key pair credential, and it indicates the project ID to which the SSH key pair belongs.

AssociatedInstanceIDs Array of String

This field is valid when the credential type is SSH key pair credential, and it indicates the ID of the CVM instance associated with the SSH key pair.

TargetUin Integer

This field is valid when the credential type is cloud API key pair credential, and it indicates the UIN of the user to which the cloud API key pair belongs.

AdditionalConfig String

Additional credential configuration

EncryptType Integer

Credential encryption type

Valid values:

  • 0: KMS key encryption
  • 1: Soft key encryption

Default value: 0

EncryptSwitching Boolean

Credential update status

CreateUinString String

Creator uin string

TargetUinString String

UIN string of the user

AccountInfoList Array of SecretAccountInfo

Account information of the corresponding cloud product

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.

4. Example

Example1 Getting Credential Details

Input Example

POST / HTTP/1.1
Host: ssm.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeSecret
<Common request parameters>

{
    "SecretName": "prepaid-quota-gz-1779881924-003"
}

Output Example

{
    "Response": {
        "AdditionalConfig": "",
        "AssociatedInstanceIDs": [],
        "CreateTime": 1779881929,
        "CreateUin": 700002670817,
        "CreateUinString": "700002670817",
        "DeleteTime": 0,
        "Description": "",
        "EncryptSwitching": false,
        "EncryptType": 1,
        "KmsKeyId": "",
        "ProductName": "default",
        "ProjectID": 0,
        "ResourceID": "260201473_700002670817_customize_1779881929918436370_W4H",
        "ResourceName": "",
        "RotationFrequency": 0,
        "RotationStatus": false,
        "SecretName": "prepaid-quota-gz-1779881924-003",
        "SecretType": 0,
        "Status": "Enabled",
        "TargetUin": 0,
        "TargetUinString": "0",
        "RequestId": "cd63cc40-4d71-4b1d-b571-bcd38be27787"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
InternalError Internal error.
InvalidParameterValue Parameter value error.
OperationDenied.RoleNotExist Role does not exist.
ResourceNotFound Resources do not exist.
ResourceUnavailable The resource is unavailable.
ResourceUnavailable.NotPurchased The service has not been purchased.
UnauthorizedOperation Unauthorized operation.

도움말 및 지원

문제 해결에 도움이 되었나요?

피드백