EdgeOne Logo
Documentation
请选择
请选择
Overview
Menu

CreateOriginGroup

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 NameRequiredTypeDescription
ActionYesStringCommon Params. The value used for this API: CreateOriginGroup.
VersionYesStringCommon Params. The value used for this API: 2022-09-01.
RegionNoStringCommon Params. This parameter is not required.
ZoneIdYesStringSite ID
NameNoStringOrigin group name. It can contain 1 to 200 characters ([a-z], [A-Z], [0-9] and [_-]).
TypeNoString(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.NNoArray of OriginRecord(Required) Origins in the origin group.
    HostHeaderNoStringHost 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 NameTypeDescription
    OriginGroupIdStringThe ID of the origin group.
    RequestIdStringThe 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 CodeDescription
    FailedOperationOperation failed.
    InternalError.ConfigLockedThe configuration is locked. Please unlock and try again.
    InvalidParameter.HostHeaderInvalidHost header error
    InvalidParameter.InvalidAwsRegionInvalid region. Please fill in a correct region of the third-party object storage service.
    InvalidParameter.InvalidOriginGroupTypeThe origin server group type is incorrect.
    InvalidParameter.InvalidOriginIpThe origin cannot be a private IP or loopback address.
    InvalidParameter.OriginNameExistsThe origin group name already exists.
    InvalidParameter.OriginRecordFormatErrorIncorrect origin server format.
    InvalidParameter.OriginRecordWeightValueWeight value range: 0-100.
    InvalidParameter.OriginThirdPartyParamFormatErrorThe key format is incorrect.
    LimitExceededThe quota limit has been reached.
    OperationDeniedOperation denied.
    OperationDenied.ConfigLockedThe configuration is locked. Please unlock and try again.
    OperationDenied.LoadBalancingZoneIsNotActiveThe site status does not support operations on load balancers.
    UnauthorizedOperation.CamUnauthorizedCAM is not authorized.
    UnauthorizedOperation.NoPermissionThe sub-account is not authorized for the operation. Please get permissions first.