tencent cloud

Feedback

GetServiceStatus

Last updated: 2023-03-24 16:02:38

1. API Description

Domain name for API request: kms.tencentcloudapi.com.

Used to query whether the user has activated the KMS service.

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: GetServiceStatus.
Version Yes String Common Params. The value used for this API: 2019-01-18.
Region No String Common Params. This parameter is not required for this API.

3. Output Parameters

Parameter Name Type Description
ServiceEnabled Boolean Whether the KMS service has been activated. true: activated
InvalidType Integer Service unavailability type. 0: not purchased; 1: normal; 2: suspended due to arrears; 3: resource released
UserLevel Integer 0: Basic Edition, 1: Ultimate Edition
ProExpireTime Integer Expiration time of the KMS Ultimate edition. It’s represented in a Unix Epoch timestamp.
Note: This field may return null, indicating that no valid values can be obtained.
ProRenewFlag Integer Whether to automatically renew Ultimate Edition. 0: no, 1: yes
Note: this field may return null, indicating that no valid values can be obtained.
ProResourceId String Unique ID of the Ultimate Edition purchase record. If the Ultimate Edition is not activated, the returned value will be null.
Note: this field may return null, indicating that no valid values can be obtained.
ExclusiveVSMEnabled Boolean Whether to activate Managed KMS
Note: This field may return null, indicating that no valid value can be obtained.
ExclusiveHSMEnabled Boolean Whether to activate Exclusive KMS
Note: This field may return null, indicating that no valid value can be obtained.
SubscriptionInfo String KMS subscription information.
Note: This field may return null, indicating that no valid values can be obtained.
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Querying the service status

This example shows you how to query service status.

Input Example

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

{}

Output Example

{
    "Response": {
        "ServiceEnabled": true,
        "InvalidType": 1,
        "UserLevel": 0,
        "ProResourceId": "kms_pro_12345",
        "ProRenewFlag": 1,
        "ProExpireTime": 1603701385,
        "RequestId": "1b580852-1e38-11e9-b129-5cb9019b4b00",
        "ExclusiveHSMEnabled": false,
        "ExclusiveVSMEnabled": false,
        "SubscriptionInfo": "Prepaid_KMS"
    }
}

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.
UnauthorizedOperation Unauthorized operation.
UnsupportedOperation Unsupported operation.