tencent cloud

文档反馈

DescribeBundles

最后更新时间:2023-12-04 16:31:53

    1. API Description

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

    This API is used to query the information of a package.

    A maximum of 5 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: DescribeBundles.
    Version Yes String Common Params. The value used for this API: 2020-03-24.
    Region No String Common Params. This parameter is not required for this API.
    BundleIds.N No Array of String Package ID list.
    Offset No Integer Offset. Default value: 0. For more information on Offset, please see the relevant section in Overview.
    Limit No Integer Number of returned results. Default value: 20. Maximum value: 100. For more information on Limit, please see the relevant section in the API Overview.
    Filters.N No Array of Filter Filter list.
  • bundle-id
  • Filter by the bundle ID.
    Type: String
    Required: No
  • support-platform-type
  • Filter by the system type.
    Values: LINUX_UNIX (Linux/Unix), WINDOWS (Windows).
    Type: String
    Required: No
  • bundle-type
  • Filter by the bundle type.
    Values: GENERAL_BUNDLE (General bundle), STORAGE_BUNDLE (Storage bundle), ENTERPRISE_BUNDLE (Enterprise bundle), EXCLUSIVE_BUNDLE (Dedicated bundle), BEFAST_BUNDLE (BeFast bundle), STARTER_BUNDLE (Beginner bundle); CAREFREE_BUNDLE (Carefree bundle);
    Type: String
    Required: No
  • bundle-state
  • Filter by the bundle status.
    Values: ONLINE, OFFLINE
    Type: String
    Required: No
    Each request can contain up to 10 Filters and 5 Filter.Values. You cannot specify both BundleIds and Filters at the same time.
    Zones.N No Array of String AZ list, which contains all AZs by default.

    3. Output Parameters

    Parameter Name Type Description
    BundleSet Array of Bundle List of package details.
    TotalCount Integer Total number of eligible packages, which is used for pagination.
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Querying bundles

    This example shows you how to query the information of specific bundles.

    Input Example

    POST / HTTP/1.1
    Host: lighthouse.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeBundles
    <Common request parameters>
    
    {
        "BundleIds": [
            "bundle_ntp_small1_500",
            "bundle_bw_small1_1"
        ]
    }
    

    Output Example

    {
        "Response": {
            "BundleSet": [
                {
                    "BundleId": "bundle2022_gen_02",
                    "CPU": 2,
                    "Memory": 2,
                    "SystemDiskType": "CLOUD_SSD",
                    "SystemDiskSize": 50,
                    "InternetMaxBandwidthOut": 5,
                    "InternetChargeType": "TRAFFIC_POSTPAID_BY_HOUR",
                    "MonthlyTraffic": 500,
                    "Price": {
                        "InstancePrice": {
                            "Currency": "USD",
                            "OriginalBundlePrice": 60.0,
                            "OriginalPrice": 60.0,
                            "Discount": 66.229933,
                            "DiscountPrice": 39.74
                        }
                    },
                    "SupportLinuxUnixPlatform": true,
                    "SupportWindowsPlatform": true,
                    "BundleType": "GENERAL_BUNDLE",
                    "BundleTypeDescription": "Standard",
                    "BundleSalesState": "AVAILABLE",
                    "BundleDisplayLabel": "NORMAL"
                }
            ],
            "TotalCount": 1,
            "RequestId": "b2563b1d-e93f-4e05-9c6f-096e0c403add"
        }
    }
    

    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
    FailedOperation Operation failed.
    FailedOperation.DescribeBundlesFailed
    FailedOperation.RequestError A request error occurred.
    FailedOperation.TradeGetPriceFailed Failed to query the price.
    InternalError.InvalidCommandNotFound The command is not found.
    InternalError.RequestError There was an error in the request.
    InternalError.TradeGetPriceFailed Failed to get the price.
    InvalidParameter.BundleIdNotFound Undefined service package ID.
    InvalidParameter.Conflict Parameters conflicted.
    InvalidParameter.FilterValueLimitExceeded Invalid parameter: the number of Values in the Filter parameter exceeds the allowed maximum number.
    InvalidParameter.InvalidFilter Invalid parameter: the Filter parameter is invalid.
    InvalidParameter.InvalidFilterInvalidKey Invalid parameter: the value of Name in the Filter parameter is invalid.
    InvalidParameter.InvalidFilterInvalidNameNotStr Invalid parameter: the value of Name in the Filter parameter is not a string.
    InvalidParameter.InvalidFilterNotDict Invalid parameter: the Filter parameter is not a dictionary.
    InvalidParameter.InvalidFilterNotSupportedName Invalid parameter: there are unsupported Name values in the Filter parameter.
    InvalidParameter.ParameterConflict Invalid parameter: the parameters conflict.
    InvalidParameterValue.Duplicated Invalid parameter value: duplicate values are not allowed.
    InvalidParameterValue.InvalidBlueprintPlatformType The type of the image OS is invalid.
    InvalidParameterValue.InvalidConsoleDisplayTypes The console display type is invalid.
    InvalidParameterValue.InvalidZone Invalid Zone value.
    InvalidParameterValue.LimitExceeded Invalid parametric value: the number of parameter values exceeds the upper limit.
    InvalidParameterValue.Negative Invalid parametric value: it cannot be negative.
    InvalidParameterValue.OutOfRange Invalid parametric value: it is not within the valid range.
    InvalidParameterValue.ZoneInvalid Invalid AZ.