Creates a DNS record for a domain.
In addition to the following parameters, you also need to include the authentication parameters.
Name | Type | Required | Example | Description |
|---|---|---|---|---|
Action | String | Yes | CreateRecord | The name of the API. The value of this parameter is CreateRecord. |
Version | String | Yes | 2022-06-01 | The version of the API. The value of this parameter is 2022-06-01. |
Name | Type | Required | Example | Description |
|---|---|---|---|---|
ZID | Integer | Yes | 1234 | The unique ID that identifies the domain. You can obtain this through the following APIs:
|
Host | String | Yes | abc | The domain name prefix of the subdomain. |
Value | String | Yes | 1.1.1.1 | The record value. See Supported DNS Record Types. |
Type | String | Yes | A | The record type. For different types of records, see Supported DNS Record Types. The value of this parameter can be:
|
Weight | Integer | No | 1 | The weight of the record value. The weight of the record value only takes effect when load balancing is enabled for the domain. See UpdatePrivateZone API to learn how to enable or disable load balancing for a domain. The default value is 1. |
TTL | Integer | No | 600 | The Time to Live (TTL) of the DNS record. The unit is seconds. The default value is 600. |
Line | String | No | default | Line of the record. This parameter can only be set to default. |
Remark | String | No | Remark | The remark. Supports UTF-8 encoding. The length should not exceed 16 characters. The default value is an empty string. |
ClientToken | String | No | 123456abcdef | Used to ensure the idempotence of the request. If you set this parameter, the results returned will be the same under the same request parameters, regardless of how many times this API is called. This parameter only allows ASCII characters and cannot exceed 64 characters. |
Name | Type | Description |
|---|---|---|
RequestId | String | The ID that identifies this request. |
Action | String | The value of the Action query parameter. |
Version | String | The API version. |
Service | String | The service type. |
Region | String | The region where the service is located. |
Name | Type | Description |
|---|---|---|
RecordID | String | The unique ID of a record。 |
POST https://private-zone.volcengineapi.com/?Action=CreateRecord&Version=2022-06-01 { "ZID": 1068, "Host": "www", "Value": "10.0.0.1", "Type": "A", "Weight": 10, "TTL": 600, "Line": "default", "Remark":"" }
{ "ResponseMetadata": { "RequestId": "20221215101225DB0A30AF803D07576779", "Action": "CreateRecord", "Version": "2022-06-01", "Service": "private_zone", "Region": "cn-beijing" }, "Result": { "RecordID": "9079256848778957482" } }
Refer to Common Error Codes.