Create zone (POST /v1.0/hostedzone)
Creates a zone.
Specify the necessary information in the request body, and a zone will be created based on that information.
Up to 100 zones can be registered.
When the API is executed, authentication is performed using a confirmation code in order to confirm the ownership rights of the domain.
When this API is executed for the first time, an Unauthorised error occurs. When an Unauthorized error occurs, set the confirmation code in the error message of the response in the registrar or DNS, and reexecute this API.
If a create zone API of the same name is executed concurrently with a zone that is being created, a 500 Internal Error will occur, so retry the operation.
Request headers
n/a
Request parameters
n/a
Request elements
CreateHostedZoneRequest
Request envelope.
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
- | 1..1 | None | Name HostedZoneConfig |
Name
Zone name. FQDN format.
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
xsd:string | 1..1 | CreateHostedZoneRequest | None |
HostedZoneConfig
Envelope of appended information.
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
- | 0..1 | CreateHostedZoneRequest | Comment |
Comment
Comment. Specify up to 255 fullwidth characters.
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
xsd:string | 0..1 | HostedZoneConfig | None |
HTTP status
Status
The following error codes can be returned for the request.
- 201:
- Normal completion
- 400:
- Authentication required/invalid zone name
- 404:
- Invalid zone name was specified
- 409:
- Existing zone name was specified
Data Type | Cardinality |
---|---|
Int | 1..1 |
Response elements (normal completion)
CreateHostedZoneResponse
Envelope of the response.
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
- | 1..1 | None | HostedZone ChangeInfo DelegationSet |
HostedZone
Envelope of the zone information.
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
- | 1..1 | CreateHostedZoneResponse | Id Name CallerReference Config ResourceRecordSetCount |
Id
ID of the zone that was created. Same value as the zone name.
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
xsd:string | 1..1 | HostedZone | None |
Name
Name of the zone that was created. Normalized value.
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
xsd:string | 1..1 | HostedZone | None |
CallerReference
Identifier of the zone that was created. Same value as the zone name.
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
xsd:string | 1..1 | HostedZone | None |
Config
Envelope of appended information.
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
- | 1..1 | HostedZone | Comment |
Comment
Comment.
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
xsd:string | 0..1 | Config | None |
ResourceRecordSetCount
Number of records registered in the host zone.
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
xsd:string | 1..1 | HostedZone | None |
ChangeInfo
Envelope of the update request information.
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
- | 1..1 | CreateHostedZoneResponse | Id Status SubmittedAt |
Id
Update request ID.
The ID is used by the GetChange API to retrieve update request information.
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
xsd:string | 1..1 | ChangeInfo | None |
Status
Current status of an update request.
PENDING or INSYNC.
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
xsd:string | 1..1 | ChangeInfo | None |
SubmittedAt
Datetime when update request was issued. Format: YYYY-MM-DDThh:mm:ss.SSSZ
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
xsd:string | 1..1 | ChangeInfo | None |
DelegationSet
Envelope of the name server information.
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
- | 1..1 | CreateHostedZoneResponse | NameServers |
NameServers
Envelope of the name server list.
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
- | 1..1 | DelegationSet | NameServer |
NameServer
Name server allocated to the zone.
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
xsd:string | 1..n | NameServers | None |
Example of Request
POST /v1.0/hostedzone HTTP/1.1
Date: Fri, 06 Jun 2014 11:00:37 GMT
Content-Length: . . .
Host: dns.gls.cloud.global.fujitsu.com
Content-Type: application/xml
Accept: application/xml
X-Auth-Token: MIIFvgY . . .
<?xml version="1.0" encoding="UTF-8"?>
< CreateHostedZoneRequest xmlns="http://docs.cloudcommunity.global.fujitsu.com/dns/api/v1.0/">
<Name>example.com</Name>
<HostedZoneConfig>
<Comment>comment</Comment>
</HostedZoneConfig>
</CreateHostedZoneRequest>
Example of Response
HTTP/1.1 201 Created
Date: Fri, 06 Jun 2014 11:00:38 GMT
Content-Length: . . .
Content-Type: application/xml
x-fj-request-id: d96bd874-9bf2-11e1-8ee7-c98a0037a2b6
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
< CreateHostedZoneResponse xmlns="http://docs.cloudcommunity.global.fujitsu.com/dns/api/v1.0/">
<HostedZone>
<Id>example.com</Id>
<Name>example.com<Name>
<CallerReference>example.com</CallerReference>
<Config>
<Comment>comment</Comment>
</Config>
<ResourceRecordSetCount>0</ResourceRecordSetCount>
</HostedZone>
<ChangeInfo>
<Id>cb7faf29ae2bb2bd489d0d27b36e28fc</Id>
<Status>INSYNC</Status>
<SubmittedAt>2014-06-06T11:00:38.370Z</SubmittedAt>
</ChangeInfo>
<DelegationSet>
<NameServers>
<NameServer>ns0.dns.nifcloud.com</NameServer>
<NameServer>ns1.dns.nifcloud.com</NameServer>
</NameServers>
</DelegationSet>
</CreateHostedZoneResponse>
Flow of authentication using a confirmation code to confirm ownership rights of a domain
- When using the CreateHostedZone API, authentication using a confirmation code is required to confirm if the domain of the zone to be created is the domain owned by the user who executed the API.
The method for setting up the confirmation code is shown below.
The setup method is different depending on whether the domain to be specified is a newly retrieved domain (not managed by any DNS yet) or an existing domain (already managed by another DNS).
- Confirmation code retrieval method:
Specify the same parameters as the zone scheduled for creation, and execute the CreateHostedZone API. Execution of the API will result in an Unauthorized error, so retrieve the confirmation code that is output to the error message.
Response Body: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> < ErrorResponse xmlns="http://docs.cloudcommunity.global.fujitsu.com/dns/api/v1.0/"> <Error><Type>Sender</Type><Code>Unauthorized</Code> <Message>name_server:f0094d76e096551441d24af257488a6a.ns-verify.dns.nifcloud.com,txt:nifty-dns-verify=f0094d76e096551441d24af257488a6a</Message> </Error><RequestId>req-ac1ac325-2880-4cf5-8e5f-42dc9097b5d4</RequestId></ErrorResponse>
- Confirmation code setup method for a newly retrieved domain:
Set a name server in the registrar.
name_server:f0094d76e096551441d24af257488a6a.ns-verify.dns.nifcloud.com
- Confirmation code setup method for an existing domain:
Set a text record in the DNS.
txt:nifty-dns-verify=f0094d76e096551441d24af257488a6a