Domain name for API request: teo.intl.tencentcloudapi.com.
EdgeOne offers three access methods: CNAME, NS, and domainless access. You need to finalize site creation through this API first. For CNAME and NS connected site scenarios, see Quickly access EdgeOne from scratch. For domainless access scenarios, see Quickly enable layer 4 proxy service.
It is recommended to call this API to create a site when a package already exists under the account. Please input
PlanIdin the parameter to directly bind the site to the package. IfPlanIdis not input, the created site will be inactive and unable to provide normal services. You need to complete package binding through BindZoneToPlan before the site can provide services normally. If you currently have no bindable package, go to the console to purchase a package to finalize site creation.
A maximum of 20 requests can be initiated per second for this API.
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: CreateZone. |
| Version | Yes | String | Common Params. The value used for this API: 2022-09-01. |
| Region | No | String | Common Params. This parameter is not required. |
| Type | No | String | Site access type. If this parameter is not input, the default value partial is used. Valid values of this parameter are as follows: |
| ZoneName | No | String | Site name. For CNAME/NS access, pass in the second-level domain (example.com) as the site name. For domainless access, leave this value empty. |
| Area | No | String | Acceleration region of the layer-7 domain name when Type is partial/full. The following are the values for this parameter. If left empty, the default value is overseas. When Type is noDomainAccess, retain this value as empty: |
| PlanId | No | String | ID of the target bundle to bind. If your account already has a bundle, you can fill in this parameter to bind the site to it directly. If you currently have no bindable bundle, you can purchase one through CreatePlan. Note: If this parameter is not specified, a site in the "init" state will be created. The site is inactive and will not be displayed in the console. You can access BindZoneToPlan to bind a package and activate the site. After activation, the site can provide services properly. |
| AliasZoneName | No | String | Identical site identifier. Only numbers, English letters, ".", "-", and "_" are allowed, up to 200 characters. For details, see Identical Site Identifier. If this usage scenario does not apply, just leave this field empty. |
| Tags.N | No | Array of Tag | Tag. This parameter is used for authority control and cost allocation of the site. You need to go to the tag console to create the corresponding tag before you can input the corresponding tag key and tag value here. |
| Parameter Name | Type | Description |
|---|---|---|
| ZoneId | String | Zone ID. |
| OwnershipVerification | OwnershipVerification | Site ownership verification information. After site creation is completed, you also need to complete ownership verification before the site can run properly. When Type = partial, you need to refer to site/domain ownership verification, go to your DNS service provider to add a TXT record or go to the root domain name server to add a file, and then call the API VerifyOwnership to complete the verification; When Type is full, you need to refer to modify DNS server to switch the DNS server. You can query whether the DNS switchover is successful through the VerifyOwnership API. When Type is noDomainAccess, this value is empty and no operation is needed. |
| 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. |
Create an NS access mode site example.com with the service area as Chinese mainland availability zone and bind the plan edgeone-37q0w6qali10. The API will return DNS server information. Go to your domain name registrar to modify it. See Modify DNS Server.
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateZone
<Common request parameters>
{
"Type": "full",
"ZoneName": "example.com",
"Area": "mainland",
"PlanId": "edgeone-37q0w6qali10"
}
{
"Response": {
"ZoneId": "zone-27q0p0bali16",
"OwnershipVerification": {
"DnsVerification": null,
"FileVerification": null,
"NsVerification": {
"NameServers": [
"ns1.teodns.com",
"ns2.teodns.com"
]
}
},
"RequestId": "9kl50bew-89ga-44f4-91ce-78125d53vd2a"
}
}
Create a no domain access mode site and bind the package edgeone-37q0w6qali10. The API will return the site ID. For more information about no domain access mode, see Quickly Enable Layer 4 Proxy Service.
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateZone
<Common request parameters>
{
"Type": "noDomainAccess",
"PlanId": "edgeone-37q0w6qali10"
}
{
"Response": {
"ZoneId": "zone-27q0p0bali16",
"RequestId": "9kl50bew-89ga-44f4-91ce-78125d53vd2a"
}
}
Create a CNAME access type site example.com with the service area as global availability zone and bind the package edgeone-37q0w6qali10. The API will return the site ID and site ownership verification information. You can perform ownership verification for the site. See Site/Domain Ownership Verification.
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateZone
<Common request parameters>
{
"Type": "partial",
"ZoneName": "example.com",
"Area": "global",
"PlanId": "edgeone-37q0w6qali10"
}
{
"Response": {
"ZoneId": "zone-27q0p0bali16",
"OwnershipVerification": {
"DnsVerification": {
"Subdomain": "edgeonereclaim",
"RecordType": "TXT",
"RecordValue": "reclaim-a24aba2420cf4ce8b7bff7c8be6d337f"
},
"FileVerification": {
"Path": "/.well-known/teo-verification/vd4ewuqa9n.txt",
"Content": "88v24mnnljwbhaohrpfx80f63duhdnjx"
},
"NsVerification": null
},
"RequestId": "9kl50bew-89ga-44f4-91ce-78125d53vd2a"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| DryRunOperation | DryRun operation means the request will be successful, but the DryRun parameter is passed. |
| FailedOperation.FailedToCallDNSPod | Failed to call DNSPod. Please try again later. If the problem persists, submit a ticket. |
| InvalidParameter.InvalidOriginIp | Private IP addresses or loopback addresses are not supported as the origin server address. |
| InvalidParameter.LengthExceedsLimit | The parameter length exceeds the limit. |
| InvalidParameter.PlanNotFound | The package does not exist. |
| InvalidParameter.ZoneHasBeenBound | Site has been bound. |
| InvalidParameterValue | Parameter value error. |
| InvalidParameterValue.AccessBlacklist | The site domain name is disabled. |
| InvalidParameterValue.InvalidTagValue | Tag value contains invalid characters. |
| InvalidParameterValue.TopLevelDomainNotSupport | The current domain suffix is not supported for access. If you need to use it, contact us. |
| InvalidParameterValue.ZoneNameInvalid | Zone name format is incorrect. Please input a correctly formed domain name. |
| InvalidParameterValue.ZoneNameNotSupportPunyCode | punycode access is not supported. |
| InvalidParameterValue.ZoneNameNotSupportSubDomain | Zone does not support subdomain access. Use second-level domains for zone access. |
| InvalidParameterValue.ZoneSameAsName | The identical site identifier is occupied. Please enter again. |
| LimitExceeded.ZoneBindPlan | The number of sites that can be bound to the package exceeds the quota. |
| OperationDenied | Operation denied. |
| OperationDenied.ComplianceForbidden | The current compliance status is banning. |
| OperationDenied.DNSPodUnauthorizedRoleOperation | The TEO_QCSLinkedRoleInDnspodAccessEO role is not authorized. Please authorize it and try again. |
| OperationDenied.DomainIsBlocked | Domain banned. Unable to operate temporarily. |
| OperationDenied.RecordIsForbidden | DNS record is not allowed to be added. |
| ResourceInUse | The resource is occupied. |
| ResourceInUse.AliasDomain | Resource is occupied by the alias domain name of this account. |
| ResourceInUse.Cname | The resource is occupied by a Cname integration from this account. |
| ResourceInUse.Dns | Dns resources are occupied. |
| ResourceInUse.GenericHost | Resource is occupied by a wildcard domain name. |
| ResourceInUse.Host | Resource is occupied by a subdomain of this account. |
| ResourceInUse.NS | The resource is occupied by an NS access from this account. |
| ResourceInUse.Others | Resource is connected by another user. |
| ResourceInUse.OthersAliasDomain | Resource is occupied by the alias domain name of another account. |
| ResourceInUse.OthersCname | The resource is occupied by a Cname integration from another account. |
| ResourceInUse.OthersHost | Resource is occupied by a subdomain of another account. |
| ResourceInUse.OthersNS | The resource is occupied by an NS access from another account. |
| ResourceInUse.SelfAndOthersCname | The resource is occupied by simultaneous Cname integrations from this account and another account. |
| ResourceNotFound | The resource does not exist. |
| ResourceNotFound.DNSPodDomainNotInAccount | The domain name is not properly accessed via DNSPod. Please try again after DNSPod access. |
| UnauthorizedOperation.CamUnauthorized | Unauthorized Cam operation. |
| UnauthorizedOperation.NoPermission | The sub-account does not have operation permissions. Add the required permissions and try again. |
| UnauthorizedOperation.Unknown | Unknown error occurs on the real server. |
Apakah halaman ini membantu?
Anda juga dapat Menghubungi Penjualan atau Mengirimkan Tiket untuk meminta bantuan.
masukan