tencent cloud

Feedback

DescribeReservedInstances

Last updated: 2022-02-23 10:28:29

1. API Description

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

This API is used to list reserved instances the user has purchased.

A maximum of 10 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.
This document describes the parameters for Signature V1. It's recommended to use the V3 signature, which provides higher security. Note that for Signature V3, the common parameters need to be placed in the HTTP Header. See details.

Parameter Name Required Type Description
Action Yes String Common parameter. The value used for this API: DescribeReservedInstances.
Version Yes String Common parameter. The value used for this API: 2017-03-12.
Region Yes String Common parameter. For more information, please see the list of regions supported by the product.
DryRun No Boolean Dry run. The default is false.
Offset No Integer Offset. The default value is 0. For more information on Offset, see the relevant sections in API Overview.
Limit No Integer Number of returned results. The default value is 20. The maximum is 100. For more information on Limit, see the relevant sections in API Overview.
Filters.N No Array of Filter
  • zone

  • Filters by availability zone in which reserved instances can be purchased, such as ap-guangzhou-1.

    Type: String

    Required: no

    Valid values: please see Availability Zones


  • duration

  • Filters by validity period of the reserved instance, such as 31536000.

    Type: Integer

    Unit: second

    Required: no

    Valid value: 31536000 (1 year)


  • instance-type

  • Filters by specification of the reserved instance, such as S3.MEDIUM4.

    Type: String

    Required: no

    Valid values: please see Reserved Instance Types


  • instance-family

  • Filters by type of the reserved instance, such as S3.

    Type: String

    Required: no

    Valid values: please see Reserved Instance Types


  • offering-type
  • offering-type

  • Filters by payment method, such as All Upfront.

    Type: String

    Required: no

    Valid values: All Upfront | Partial Upfront | No Upfront


  • product-description

  • Filters by platform description (operating system) of the reserved instance, such as linux.

    Type: String

    Required: no

    Valid value: linux


  • reserved-instances-id

  • Filters by reserved instance ID in the form of 650c138f-ae7e-4750-952a-96841d6e9fc1.

    Type: String

    Required: no


  • state

  • Filters by reserved instance status, such as active.

    Type: String

    Required: no

    Valid values: active (created) | pending (waiting to be created) | retired (expired)


    Each request can have up to 10 Filters and 5 Filter.Values.

    3. Output Parameters

    Parameter Name Type Description
    TotalCount Integer The number of eligible reserved instances.
    ReservedInstancesSet Array of ReservedInstances List of eligible reserved instances.
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Describing the reserved instance purchased

    Input Example

    GET https://cvm.tencentcloudapi.com/?Action=DescribeReservedInstances
    &Filters.0.Name=zone
    &Filters.0.Values.0=ap-guangzhou-1
    &Limit=1
    &<Common request parameters>
    

    Output Example

    {
      "Response": {
        "TotalCount": 1,
        "ReservedInstancesSet": [
          {
            "ReservedInstancesId": "13d8e599-b8dc-4e8a-80b4-7dce9eb27043",
            "InstanceType": "S3.16XLARGE256",
            "InstanceFamily": "S3",
            "Zone": "ap-guangzhou-1",
            "StartTime": "0000-00-00 00:00:00",
            "EndTime": "0000-00-00 00:00:00",
            "Duration": 31536000,
            "InstanceCount": 1,
            "ProductDescription": "linux",
            "State": "active",
            "CurrencyCode": "USD",
            "OfferingType": "All Upfront"
          }
        ],
        "RequestId": "9cb3dd3d-5717-47c4-bf3b-05c7ddb4655b"
      }
    }
    

    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
    InternalServerError Internal error.
    InvalidFilter Invalid filter.
    InvalidFilterValue.LimitExceeded Filter
    InvalidParameter A parameter error occurred.
    InvalidParameterValue Incorrect parameter value.
    InvalidParameterValue.LimitExceeded The number of parameter values exceeds the limit.
    UnsupportedOperation.InvalidPermissionNonInternationalAccount The current operation is only supported for Tencent Cloud International users.
    UnsupportedOperation.ReservedInstanceInvisibleForUser Purchasing reserved instances is not supported for the current user.