tencent cloud

Feedback

ModifyLoadBalancer

Last updated: 2024-11-14 16:58:49

1. API Description

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

This API is used to modify LoadBalancer configuration. The load balancing feature is in beta test. If you need to use it, contact us.

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: ModifyLoadBalancer.
Version Yes String Common Params. The value used for this API: 2022-09-01.
Region No String Common Params. This parameter is not required.
ZoneId Yes String Zone ID.
InstanceId Yes String CLB instance ID.
Name No String LoadBalancer name, which can contain 1 to 200 characters, including a-z, A-Z, 0-9, underscores (_), and hyphens (-). The original configuration applies if this field is not specified.
OriginGroups.N No Array of OriginGroupInLoadBalancer List of origin server groups and their corresponding disaster recovery scheduling priorities. For details, refer to Sample Scenario in Quickly Create Load Balancers. The original configuration applies if this field is not specified.
HealthChecker No HealthChecker Health check policy. For details, refer to Health Check Policies. The original configuration applies if this field is not specified.
SteeringPolicy No String Traffic scheduling policy among origin server groups. Valid values:
  • Priority: Perform failover according to priority.
  • The original configuration applies if this field is not specified.
    FailoverPolicy No String Request retry policy when access to an origin server fails. For details, refer to Introduction to Request Retry Strategy. Valid values:
  • OtherOriginGroup: After a single request fails, retry with another origin server within the next lower priority origin server group.
  • OtherRecordInOriginGroup: After a single request fails, retry with another origin server within the same origin server group.
  • The original configuration applies if not specified.

    3. Output Parameters

    Parameter Name Type Description
    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 Modifying the Check Policy of a LoadBalancer

    This example shows you how to change the check policy of a LoadBalancer to HTTP probe.

    Input Example

    POST / HTTP/1.1
    Host: teo.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: ModifyLoadBalancer
    <Common request parameters>
    
    {
        "ZoneId": "zone-2ju9lrnpaxol",
        "Name": "HTTP-LB",
        "OriginGroups": [
            {
                "Priority": "priority_1",
                "OriginGroupId": "og-30l5kv5z2bse"
            },
            {
                "Priority": "priority_2",
                "OriginGroupId": "oog-30l3kv5z2bse"
            },
            {
                "Priority": "priority_3",
                "OriginGroupId": "og-30l5kv5z22e9"
            }
        ],
        "HealthChecker": {
            "Type": "HTTP",
            "Path": "www.qq.com/test111",
            "Port": 80,
            "Interval": 30,
            "Method": "HEAD",
            "ExpectedCodes": [
                "200",
                "400",
                "401",
                "402",
                "403",
                "404",
                "405",
                "406",
                "408",
                "409",
                "410",
                "411",
                "412",
                "413",
                "414",
                "415",
                "416",
                "417",
                "418",
                "421",
                "423",
                "424",
                "426",
                "429",
                "431",
                "433",
                "434",
                "444",
                "451",
                "499"
            ],
            "FollowRedirect": "false",
            "Headers": [
                {
                    "Key": "header1",
                    "Value": "header1"
                },
                {
                    "Key": "header2",
                    "Value": "header2"
                }
            ],
            "Timeout": 5,
            "HealthThreshold": 3,
            "CriticalThreshold": 2
        },
        "SteeringPolicy": "Pritory",
        "FailoverPolicy": "OtherRecordInOriginGroup",
        "InstanceId": "lb-2sswjr6gnfy2"
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "a66b1739-9f63-4c2b-bad2-8ef0ca714d56"
        }
    }
    

    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.LoadBalancerBindL4NotInStableStatus The Layer-4 proxy service referencing a LoadBalancer is being deployed. Please edit later.
    InvalidParameter.LoadBalancerBindL7NotInStableStatus The Layer-7 domain name service referencing a LoadBalancer is being deployed. Please edit later.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support