tencent cloud

Feedback

CreateOriginGroup

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

    1. API Description

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

    This API is used to create an origin group for easy management. The created origin server group can be used for adding acceleration domain names and layer-4 proxy configuration.

    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: CreateOriginGroup.
    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
    Name No String Origin group name. It can contain 1 to 200 characters ([a-z], [A-Z], [0-9] and [_-]).
    Type No String (Required) Origin group type. 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.
  • Records.N No Array of OriginRecord (Required) Origins in the origin group.
    HostHeader No String Host header used for origin-pull. It only works when Type=HTTP. The HostHeader specified in RuleEngine takes a higher priority over this configuration.

    3. Output Parameters

    Parameter Name Type Description
    OriginGroupId String The ID of the origin group.
    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 Creating an origin group

    This example shows you how to create an HTTP-specific origin groups.

    Input Example

    POST / HTTP/1.1
    Host: teo.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: CreateOriginGroup
    <Common request parameters>
    
    {
        "ZoneId": "zone-2kblak89bkx1",
        "Name": "edgeone-origin",
        "Type": "HTTP",
        "Records": [
            {
                "Record": "1.1.1.1",
                "Type": "IP_DOMAIN",
                "Weight": 20
            },
            {
                "Record": "s3.test.tencent.com",
                "Type": "AWS_S3",
                "Weight": 30
            }
        ]
    }
    

    Output Example

    {
        "Response": {
            "OriginGroupId": "origin-df19b73e-3a4c-11ee-a68f-5254000a367f",
            "RequestId": "8240f255-241c-4bae-979f-4738d7ea3f84"
        }
    }
    

    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.ConfigLocked The configuration is locked. Please unlock and try again.
    InvalidParameter.HostHeaderInvalid Host header error
    InvalidParameter.InvalidAwsRegion Invalid region. Please fill in a correct region of the third-party object storage service.
    InvalidParameter.InvalidOriginGroupType The origin server group type is incorrect.
    InvalidParameter.InvalidOriginIp The origin cannot be a private IP or loopback address.
    InvalidParameter.OriginNameExists The origin group name already exists.
    InvalidParameter.OriginRecordFormatError Incorrect origin server format.
    InvalidParameter.OriginRecordWeightValue Weight value range: 0-100.
    InvalidParameter.OriginThirdPartyParamFormatError The key format is incorrect.
    LimitExceeded The quota limit has been reached.
    OperationDenied Operation denied.
    OperationDenied.ConfigLocked The configuration is locked. Please unlock and try again.
    OperationDenied.LoadBalancingZoneIsNotActive The site status does not support operations on load balancers.
    UnauthorizedOperation.CamUnauthorized CAM is not authorized.
    UnauthorizedOperation.NoPermission The sub-account is not authorized for the operation. Please get permissions first.
    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