tencent cloud

文档反馈

DescribeRewrite

最后更新时间:2024-09-05 19:28:13

    1. API Description

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

    This API (DescribeRewrite) is used to query the redirection relationship between the forwarding rules of a CLB instance by instance ID. If no listener ID or forwarding rule ID is specified, all redirection relationships in the instance will be returned.

    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: DescribeRewrite.
    Version Yes String Common Params. The value used for this API: 2018-03-17.
    Region No String Common Params. This parameter is not required for this API.
    LoadBalancerId Yes String CLB instance ID
    SourceListenerIds.N No Array of String Array of CLB listener IDs
    SourceLocationIds.N No Array of String Array of CLB forwarding rule IDs

    3. Output Parameters

    Parameter Name Type Description
    RewriteSet Array of RuleOutput Array of redirection forwarding rules. If there are no redirection rules, an empty array will be returned.
    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 the redirection relationship by a specified forwarding rule ID

    This example shows you how to query redirection relationship by a specified forwarding rule ID.

    Input Example

    https://clb.tencentcloudapi.com/?Action=DescribeRewrite
    &LoadBalancerId=lb-qc2iq5yc
    &SourceListenerIds.0=lbl-j36caqde
    &SourceLocationIds.0=loc-5t7526km
    &<Common request parameters>
    

    Output Example

    {
        "Response": {
            "RewriteSet": [
                {
                    "TargetType": "Node",
                    "DefaultServer": false,
                    "Certificate": {
                        "SSLMode": "UNIDIRECTIONAL",
                        "CertCaId": "xx",
                        "CertId": "xx",
                        "ExtCertIds": [
                            "xx"
                        ]
                    },
                    "TrpcCallee": "abc",
                    "ListenerId": "lbl-xxxxxxxx",
                    "WafDomainId": "xx",
                    "HttpGzip": true,
                    "Scheduler": "WRR",
                    "TargetGroupList": [
                        {
                            "TargetGroupId": "lbtg-xxxxxxxx",
                            "TargetGroupName": "testGroup"
                        }
                    ],
                    "TargetGroup": {
                        "TargetGroupId": "lbtg-xxxxxxxx",
                        "TargetGroupName": "testGroup"
                    },
                    "Url": "/",
                    "HealthCheck": {
                        "RecvContext": "test",
                        "HealthSwitch": 1,
                        "HttpCheckPath": "/check",
                        "HttpCheckMethod": "head",
                        "UnHealthNum": 3,
                        "IntervalTime": 5,
                        "HttpCode": 15,
                        "SourceIpType": 0,
                        "CheckPort": 0,
                        "ContextType": "HTTP",
                        "HttpCheckDomain": "test.xxx.com",
                        "ExtendedCode": "12",
                        "HealthNum": 3,
                        "TimeOut": 2,
                        "CheckType": "TCP ",
                        "SendContext": "abc",
                        "HttpVersion": "HTTP/1.0"
                    },
                    "TrpcFunc": "trpcfunc_xxx",
                    "Http2": false,
                    "Domains": [
                        "test.abc.com"
                    ],
                    "BeAutoCreated": false,
                    "Domain": "test.abc.com",
                    "ForwardType": "HTTP",
                    "RewriteTarget": {
                        "TargetListenerId": "lbl-xxxxxxxx",
                        "RewriteType": "Manual",
                        "RewriteCode": 0,
                        "TargetLocationId": "loc-xxxxxxxx",
                        "TakeUrl": true
                    },
                    "QuicStatus": "OFF",
                    "LocationId": "loc-xxxxxxxx",
                    "SessionExpireTime": 0,
                    "CreateTime": "2022-03-23 10:37:16"
                }
            ],
            "RequestId": "63bee47c-2bf9-4909-a8f7-67495dfe7b42"
        }
    }
    

    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.
    InternalError Internal error.
    InvalidParameter Parameter error.
    InvalidParameter.FormatError Wrong parameter format.
    InvalidParameter.LBIdNotFound Wrong CLB instance ID.
    InvalidParameterValue Incorrect parameter value.
    InvalidParameterValue.Length Wrong parameter length.
    LimitExceeded Quota exceeded.
    ResourceInsufficient Insufficient resources.
    ResourceNotFound Resources do not exist.
    UnauthorizedOperation Unauthorized operation.