create_site_cname_record
Creates a CNAME DNS record for a website, linking it to a target domain. Specify site ID, record name, and origin domain to manage DNS configurations effectively.
Instructions
Creates a DNS record for a specific website. Only supports records with type=CNAME and sourceType=Domain.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
bizName | No | The business scenario of the record for acceleration. Leave the parameter empty if your record is not proxied. Valid values: - image_video - api - web | |
comment | No | The comment of the record. The maximum length is 100 characters. | |
data | Yes | The DNS record information. The format of this field varies based on the record type. For more information, see https://www.alibabacloud.com/help/doc-detail/2708761.html | |
hostPolicy | No | The origin host policy. This policy takes effect when the record type is CNAME. Required. You can set the policy in two modes: - follow_hostname - follow_origin_domain | |
recordName | Yes | The record name. | |
siteId | Yes | The website ID, which can be obtained by calling the [ListSites] operation. | |
sourceType | No | The origin type for the CNAME record. This parameter is required when you add a CNAME record. Valid values: - Domain: domain name If you do not pass this parameter or if you leave its value empty, Domain is used by default. | |
ttl | No | The TTL of the record. Unit: seconds. If the value is 1, the TTL of the record is determined by the system. Default: 1. |
Input Schema (JSON Schema)
{
"annotations": {
"destructiveHint": false,
"idempotentHint": false,
"openWorldHint": false,
"readOnlyHint": false
},
"properties": {
"bizName": {
"description": "The business scenario of the record for acceleration. Leave the parameter empty if your record is not proxied. Valid values:\n- image_video\n- api\n- web",
"enum": [
"image_video",
"api",
"web"
],
"examples": [
"web"
],
"type": "string"
},
"comment": {
"description": "The comment of the record. The maximum length is 100 characters.",
"type": "string"
},
"data": {
"description": "The DNS record information. The format of this field varies based on the record type. For more information, see https://www.alibabacloud.com/help/doc-detail/2708761.html",
"properties": {
"value": {
"description": "The target domain name. Required.",
"example": [
"origin.example.com"
],
"type": "string"
}
},
"type": "object"
},
"hostPolicy": {
"description": "The origin host policy. This policy takes effect when the record type is CNAME. Required. You can set the policy in two modes:\n- follow_hostname\n- follow_origin_domain",
"enum": [
"follow_hostname",
"follow_origin_domain"
],
"examples": [
"follow_hostname"
],
"type": "string"
},
"recordName": {
"description": "The record name.",
"examples": [
"www.example.com"
],
"type": "string"
},
"siteId": {
"description": "The website ID, which can be obtained by calling the [ListSites] operation.",
"type": "number"
},
"sourceType": {
"description": "The origin type for the CNAME record. This parameter is required when you add a CNAME record. Valid values:\n- Domain: domain name\n\nIf you do not pass this parameter or if you leave its value empty, Domain is used by default.",
"enum": [
"Domain"
],
"examples": [
"Domain"
],
"type": "string"
},
"ttl": {
"description": "The TTL of the record. Unit: seconds. If the value is 1, the TTL of the record is determined by the system. Default: 1.",
"examples": [
1
],
"type": "number"
}
},
"required": [
"siteId",
"recordName",
"type",
"data"
],
"type": "object"
}