tencent cloud

Feedback

CloneLoadBalancer

Last updated: 2024-09-05 19:28:54

    1. API Description

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

    This API is used to clone a CLB instance. CLB instance cloning indicates copying a specified CLB instance to create one with the same rules and binding relationships. The operation of this cloning API is asynchronous. The cloned data is based on the state when CloneLoadBalancer is called. If the cloned CLB instance changes after CloneLoadBalancer is called, the changed rules will not be cloned.Note: You can query the instance creation status by calling the DescribeTaskStatus API with the returned requestId.RestrictionsInstance attribute restrictions:- Instances billed in pay-as-you-go and monthly subscription modes can be cloned. For a new instance cloned from a monthly subscription instance, its network billing mode will switch to billing by hourly bandwidth, but its bandwidth and specifications will remain the same as the settings of the original instance.- CLB instances not associated with any billable items cannot be cloned.- Classic CLB instances and CLB instances with Anti-DDoS Pro cannot be cloned.- Classic network-based instances cannot be cloned.- Anycast instances cannot be cloned.- IPv6 NAT64 instances cannot be cloned.- Blocked or frozen instances cannot be cloned.- Before cloning an instance, make sure that all certificates used on the instance have not expired; otherwise, the cloning will fail.Quota restrictions:- Instances with more than 50 listeners cannot be cloned.- Shared instances with the public network bandwidth cap exceeding 2 Gbps cannot be cloned.API calling restrictions:The bandwidth package ID must be input for BGP bandwidth packages.Corresponding parameters should be input for cloning of an exclusive cluster; otherwise, a shared instance will be created.The feature is in beta test. You can submit a beta test application.

    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: CloneLoadBalancer.
    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
    LoadBalancerName No String Clones the name of the CLB instance. The name must be 1-60 characters containing letters, numbers, "-" or "_".
    Note: if the name of a new CLB instance already exists, a default name will be generated automatically.
    ProjectId No Integer ID of the project to which a CLB instance belongs, which can be obtained through the DescribeProject API. If this parameter is not passed in, the default project will be used.
    MasterZoneId No String Sets the primary AZ ID for cross-AZ disaster recovery, such as 100001 or ap-guangzhou-1, which is applicable only to public network CLB.
    Note: A primary AZ loads traffic, while a secondary AZ does not load traffic by default and will be used only if the primary AZ becomes unavailable. The platform will automatically select the optimal secondary AZ. You can use the DescribeResource API to query the primary AZ list of a region.
    SlaveZoneId No String Specifies the secondary AZ ID for cross-AZ disaster recovery, such as 100001 or ap-guangzhou-1. It is applicable only to public network CLB.
    Note: A secondary AZ will load traffic if the primary AZ is faulty. You can use the DescribeMasterZones API to query the primary and secondary AZ list of a region.
    ZoneId No String Specifies an AZ ID for creating a CLB instance, such as ap-guangzhou-1, which is applicable only to public network CLB instances.
    InternetAccessible No InternetAccessible CLB network billing mode. This parameter is applicable only to public network CLB instances.
    VipIsp No String ISP of VIP. Values: CMCC (China Mobile), CUCC (China Unicom) and CTCC (China Telecom). You need to activate static single-line IPs. This feature is in beta and is only available in Guangzhou, Shanghai, Nanjing, Jinan, Hangzhou, Fuzhou, Beijing, Shijiazhuang, Wuhan, Changsha, Chengdu and Chongqing regions. To try it out, please contact your sales rep. If it's specified, the network billing mode must be BANDWIDTH_PACKAGE. If it's not specified, BGP is used by default. To query ISPs supported in a region, please use DescribeResources.
    Vip No String Applies for CLB instances for a specified VIP
    Tags.N No Array of TagInfo Tags a CLB instance when purchasing it
    ExclusiveCluster No ExclusiveCluster Dedicated cluster information
    BandwidthPackageId No String Bandwidth package ID. If this parameter is specified, the network billing mode (InternetAccessible.InternetChargeType) will only support bill-by-bandwidth package (BANDWIDTH_PACKAGE).
    SnatPro No Boolean Whether to support binding cross-VPC IPs or cross-region IPs
    SnatIps.N No Array of SnatIp Creates SnatIp when the binding IPs of other VPCs feature is enabled
    ClusterIds.N No Array of String ID of the public network CLB dedicated cluster
    SlaType No String Specification of the LCU-supported instance.
    ClusterTag No String Tag of the STGW dedicated cluster
    Zones.N No Array of String Availability zones for nearby access of private network CLB instances to distribute traffic
    EipAddressId No String Unique ID of an EIP, which can only be used when binding the EIP of a private network CLB instance (e.g., eip-11112222)

    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 Cloning a CLB instance

    This example shows you how to clone a CLB instance.

    Input Example

    POST / HTTP/1.1
    Host: clb.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: CloneLoadBalancer
    <Common request parameters>
    
    {
        "LoadBalancerId": "lb-p10fcs**"
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "83129908-a282-4f9f-8ab-131a3025****"
        }
    }
    

    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
    AuthFailure CAM signature/authentication error
    DryRunOperation DryRun operation, which means the DryRun parameter is passed in yet the request will still be successful.
    FailedOperation Operation failed.
    FailedOperation.InvalidLBStatus Exceptional CLB instance status
    FailedOperation.ResourceInOperating The specified resource is currently being operated. Please try again later.
    InternalError Internal error.
    InvalidParameter Parameter error.
    InvalidParameter.FormatError Wrong parameter format.
    InvalidParameter.LBIdNotFound Wrong CLB instance ID.
    InvalidParameter.ListenerIdNotFound Wrong listener ID.
    InvalidParameter.LocationNotFound Unable to find eligible forwarding rules.
    InvalidParameter.PortCheckFailed Listener port checks failed due to port conflicts or other reasons.
    InvalidParameter.ProtocolCheckFailed Listener protocol checks failed because the protocol used is incompatible with the corresponding operation.
    InvalidParameter.RegionNotFound Invalid region.
    LimitExceeded Quota exceeded.
    MissingParameter Missing parameter.
    OperationDenied Operation denied.
    RequestLimitExceeded The number of requests exceeds the frequency limit.
    ResourceInUse The resource is occupied.
    ResourceInsufficient Insufficient resources.
    ResourcesSoldOut The resources have been sold out.