tencent cloud

Feedback

DescribePurchaseStateInfo

Last updated: 2024-12-06 15:50:29

    1. API Description

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

    This API is used to check whether TCSS is purchased.

    A maximum of 20 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: DescribePurchaseStateInfo.
    Version Yes String Common Params. The value used for this API: 2020-11-01.
    Region No String Common Params. This parameter is not required.

    3. Output Parameters

    Parameter Name Type Description
    State Integer Valid values: 0 (available for trial and purchase); 1 (available for purchase only after failed trial review or trial expiration); 2 (trial effective); 3 (Pro Edition effective); 4 (Pro Edition expired).
    CoresCnt Integer Total number of cores
    Note: This field may return null, indicating that no valid values can be obtained.
    AuthorizedCoresCnt Integer Number of purchased cores
    Note: This field may return null, indicating that no valid values can be obtained.
    ImageCnt Integer Number of images
    Note: This field may return null, indicating that no valid values can be obtained.
    AuthorizedImageCnt Integer Number of licensed images
    Note: This field may return null, indicating that no valid values can be obtained.
    PurchasedAuthorizedCnt Integer Number of purchased image licenses
    Note: This field may return null, indicating that no valid values can be obtained.
    ExpirationTime String Expiration time
    Note: This field may return null, indicating that no valid values can be obtained.
    AutomaticRenewal Integer Valid values: 0 (initial status, which is the default value and not set by the user); 1 (auto-renewal); 2 (no auto-renewal, which is specified by the user).
    Note: This field may return null, indicating that no valid values can be obtained.
    GivenAuthorizedCnt Integer Number of free image licenses during the trial, which may expire.
    Note: This field may return null, indicating that no valid values can be obtained.
    BeginTime String Start time
    Note: This field may return null, indicating that no valid values can be obtained.
    SubState String Sub-status, the meaning of which is subject to the State field.
    Valid values when State is 4: ISOLATE (isolated); DESTROED (terminated).
    Note: This field may return null, indicating that no valid values can be obtained.
    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 Checking whether TCSS is purchased

    Input Example

    POST / HTTP/1.1
    Host: tcss.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribePurchaseStateInfo
    <Common request parameters>
    
    {}
    

    Output Example

    {
        "Response": {
            "AuthorizedImageCnt": 1,
            "PurchasedAuthorizedCnt": 1,
            "GivenAuthorizedCnt": 500,
            "AuthorizedCoresCnt": 1,
            "ImageCnt": 1,
            "State": 4,
            "RequestId": "xx",
            "ExpirationTime": "xx",
            "CoresCnt": 1,
            "AutomaticRenewal": 0,
            "BeginTime": "xx",
            "SubState": "ISOLATE"
        }
    }
    

    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 An internal error occurred.
    InternalError.ErrRoleNotExist The user is unauthorized.
    InternalError.MainDBFail The database operation failed.
    InvalidParameter The parameter is incorrect.