tencent cloud

Feedback

ModifyOriginGroup

Last updated: 2024-10-11 15:52:13

    1. API Description

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

    This API is used to modify the configuration of an origin group. The original configuration will be overwritten.

    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: ModifyOriginGroup.
    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 Site ID
    GroupId No String (Required) Origin group ID
    Name No String Origin group name. It can contain 1 to 200 characters ([a-z], [A-Z], [0-9] and [_-]). The original configuration applies if this field is not specified.
    Type No String The origin grouptype. Values:
  • GENERAL: General origin groups. It supports IPs and domain names. It can be referenced by DNS, Rule Engine, Layer 4 Proxy and General LoadBalancer.
  • HTTP: HTTP-specific origin groups. It supports IPs/domain names and object storage buckets. It can be referenced by acceleration domain names, rule engines and HTTP LoadBalancer. It cannot be referenced by L4 proxies.
  • The original configuration is used if it's not specified.
    Records.N No Array of OriginRecord Origin information. The original configuration is used if it's not specified.
    HostHeader No String Host header used for origin-pull. It only works when Type=HTTP. If it's not specified, no specific Host header is configured. The HostHeader specified in RuleEngine takes a higher priority over this configuration.

    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 Renaming an origin group

    This example shows you how to rename an origin group to edgeone-new-origin.

    Input Example

    POST / HTTP/1.1
    Host: teo.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: ModifyOriginGroup
    <Common request parameters>
    
    {
        "ZoneId": "zone-2kblak89bkx1",
        "GroupId": "origin-df19b73e-3a4c-11ee-a68f-5254000a367f",
        "Name": "edgeone-rename-origin"
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "c2886bcd-173f-499e-b425-022ceaf636d8"
        }
    }
    

    Example2 Modifying an origin group

    This example show you how to modify origins in an origin group in an overwriting manner.

    Input Example

    POST / HTTP/1.1
    Host: teo.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: ModifyOriginGroup
    <Common request parameters>
    
    {
        "ZoneId": "zone-2nrle17s0v0r",
        "GroupId": "origin-afbce0e9-6e8a-11ee-8944-52540084caf1",
        "Records": [
            {
                "Record": "2.2.2.2",
                "Type": "IP_DOMAIN"
            },
            {
                "Record": "3.3.3.3",
                "Type": "IP_DOMAIN"
            }
        ]
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "39f96a44-9a52-4a9f-8b76-4ccc9e496f40"
        }
    }
    

    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.
    InvalidParameter.HostHeaderInvalid Host header error
    InvalidParameter.InvalidAwsRegion Invalid region. Please fill in a correct region of the third-party object storage service.
    InvalidParameter.InvalidOriginIp The origin cannot be a private IP or loopback address.
    InvalidParameter.OriginL4RecordIPV4MixDomain The layer-4 proxy strictly prohibits mixing IPs and domain names.
    InvalidParameter.OriginL4RecordMultiDomain Usage of multi-domain origin server is forbidden for layer-4 proxy.
    InvalidParameter.OriginNameExists The origin group name already exists.
    InvalidParameter.OriginRecordFormatError Incorrect origin server format.
    OperationDenied Operation denied.
    OperationDenied.AccelerationDomainStatusNotInOnline An L7 DNS service referencing the origin group is being deployed. Please edit later.
    OperationDenied.L4StatusNotInOnline Unable to operate the L4 instance when it’s not running
    OperationDenied.LoadBalanceStatusNotInOnline The affiliated Cloud Load Balancer is not in a running state. Operation is forbidden.
    ResourceNotFound The resource doesn’t exist.
    UnauthorizedOperation.CamUnauthorized CAM is not authorized.
    UnauthorizedOperation.Unknown An unknown error occurred in the backend server.