tencent cloud

피드백

DescribeCcns

마지막 업데이트 시간:2024-11-25 20:09:54

    1. API Description

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

    This API (DescribeCcns) is used to query the CCN list.

    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: DescribeCcns.
    Version Yes String Common Params. The value used for this API: 2017-03-12.
    Region Yes String Common Params. For more information, please see the list of regions supported by the product.
    CcnIds.N No Array of String The CCN instance ID, such as ccn-f49l6u0z. Each request can have a maximum of 100 instances. CcnIds and Filters cannot be specified at the same time
    Filters.N No Array of Filter Filter conditions. CcnIds and Filters cannot be specified at the same time.
  • ccn-id - String - (Filter condition) The unique ID of the CCN, such as vpc-f49l6u0z.
  • ccn-name - String - (Filter condition) The CCN name.
  • ccn-description - String - (Filter condition) CCN description.
  • state - String - (Filter condition) The instance status. 'ISOLATED': Isolated (the account is in arrears and the service is suspended.) 'AVAILABLE': Running.
  • tag-key - String - Required: no - (Filter condition) Filters by tag key.
  • tag:tag-key - String - Required: no - (Filter condition) Filters by tag key pair. For this parameter, tag-key will be replaced with a specific tag key. For more information, see this example: Querying the list of CCNs bound to tags.
  • Offset No Integer Offset
    Limit No Integer The returned quantity
    OrderField No String Order fields support CcnId, CcnName, CreateTime, State, and QosLevel
    OrderDirection No String Order methods. Ascending: ASC, Descending: DESC.

    3. Output Parameters

    Parameter Name Type Description
    TotalCount Integer The number of objects meeting the condition.
    CcnSet Array of CCN CCN object.
    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 Querying CCN instances by IDs

    Input Example

    POST / HTTP/1.1
    Host: vpc.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeCcns
    <Common request parameters>
    
    {
        "CcnIds": [
            "ccn-8j0phqix"
        ]
    }
    

    Output Example

    {
        "Response": {
            "TotalCount": 1,
            "RequestId": "73159790-39b3-48e8-9d61-29e11eed1acd",
            "CcnSet": [
                {
                    "InstanceCount": 1,
                    "TagSet": [
                        {
                            "Value": "env",
                            "Key": "test"
                        }
                    ],
                    "RoutePriorityFlag": true,
                    "CcnId": "ccn-8j0phqix",
                    "CcnDescription": "test",
                    "State": "AVAILABLE",
                    "InstanceChargeType": "POSTPAID",
                    "CcnName": "test",
                    "QosLevel": "AU",
                    "BandwidthLimitType": "INTER_REGION_LIMIT",
                    "CreateTime": "2020-09-22 00:00:00",
                    "RouteTableFlag": null,
                    "RouteTableCount": null
                }
            ]
        }
    }
    

    Example2 Querying CCN instances by names

    Input Example

    POST / HTTP/1.1
    Host: vpc.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeCcns
    <Common request parameters>
    
    {
        "Filters": [
            {
                "Values": [
                    "test"
                ],
                "Name": "ccn-name"
            }
        ]
    }
    

    Output Example

    {
        "Response": {
            "TotalCount": 1,
            "RequestId": "73159790-39b3-48e8-9d61-29e11eed1acd",
            "CcnSet": [
                {
                    "InstanceCount": 1,
                    "TagSet": [
                        {
                            "Value": "env",
                            "Key": "test"
                        }
                    ],
                    "RoutePriorityFlag": true,
                    "CcnId": "ccn-8j0phqix",
                    "CcnDescription": "test",
                    "State": "AVAILABLE",
                    "InstanceChargeType": "POSTPAID",
                    "CcnName": "test",
                    "QosLevel": "AU",
                    "BandwidthLimitType": "INTER_REGION_LIMIT",
                    "CreateTime": "2020-09-22 00:00:00",
                    "RouteTableFlag": null,
                    "RouteTableCount": null
                }
            ]
        }
    }
    

    Example3 Querying the list of CCN instances bound with the specified tag

    This example shows you how to query the CCN instances associated with the tag env:test.

    Input Example

    POST / HTTP/1.1
    Host: vpc.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeCcns
    <Common request parameters>
    
    {
        "Filters": [
            {
                "Values": [
                    "test"
                ],
                "Name": "tag:env"
            }
        ]
    }
    

    Output Example

    {
        "Response": {
            "TotalCount": 1,
            "RequestId": "73159790-39b3-48e8-9d61-29e11eed1acd",
            "CcnSet": [
                {
                    "InstanceCount": 1,
                    "TagSet": [
                        {
                            "Value": "env",
                            "Key": "test"
                        }
                    ],
                    "RoutePriorityFlag": true,
                    "CcnId": "ccn-8j0phqix",
                    "CcnDescription": "test",
                    "State": "AVAILABLE",
                    "InstanceChargeType": "POSTPAID",
                    "CcnName": "test",
                    "QosLevel": "AU",
                    "BandwidthLimitType": "INTER_REGION_LIMIT",
                    "CreateTime": "2020-09-22 00:00:00",
                    "RouteTableFlag": null,
                    "RouteTableCount": null
                }
            ]
        }
    }
    

    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
    InvalidParameter A parameter error occurred.
    InvalidParameter.Coexist The parameters cannot be specified at the same time.
    InvalidParameter.FilterInvalidKey The specified filter condition does not exist.
    InvalidParameter.FilterNotDict The specified filter condition should be a key-value pair.
    InvalidParameter.FilterValuesNotList The specified filter value should be a list.
    InvalidParameterValue.LimitExceeded The parameter value exceeds the limit.
    InvalidParameterValue.Malformed Invalid input parameter format.
    InvalidParameterValue.Range The parameter value is not in the specified range.
    InvalidParameterValue.TooLong Invalid parameter value. The parameter value is too long.
    ResourceNotFound The resource does not exist.
    UnsupportedOperation Unsupported operation.
    UnsupportedOperation.ActionNotFound The port does not exist.
    문의하기

    고객의 업무에 전용 서비스를 제공해드립니다.

    기술 지원

    더 많은 도움이 필요하시면, 티켓을 통해 연락 바랍니다. 티켓 서비스는 연중무휴 24시간 제공됩니다.

    연중무휴 24시간 전화 지원