Copyright | (c) 2013-2016 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Creates a new public hosted zone, used to specify how the Domain Name System (DNS) routes traffic on the Internet for a domain, such as example.com, and its subdomains.
Public hosted zones cannot be converted to a private hosted zone or vice versa. Instead, create a new hosted zone with the same name and create new resource record sets.
Send a POST
request to the '/Amazon Route 53 API version/hostedzone' resource. The request body must include an XML document with a CreateHostedZoneRequest
element. The response returns the CreateHostedZoneResponse
element containing metadata about the hosted zone.
Fore more information about charges for hosted zones, see AmazonAmazon Route 53 Pricing.
Note the following:
- You cannot create a hosted zone for a top-level domain (TLD).
- Amazon Route 53 automatically creates a default SOA record and four NS records for the zone. For more information about SOA and NS records, see NS and SOA Records that Amazon Route 53 Creates for a Hosted Zone in the Amazon Route 53 Developer Guide.
- If your domain is registered with a registrar other than Amazon Route 53, you must update the name servers with your registrar to make Amazon Route 53 your DNS service. For more information, see Configuring Amazon Route 53 as your DNS Service in the Amazon Route 53 Developer's Guide.
After creating a zone, its initial status is PENDING
. This means that it is not yet available on all DNS servers. The status of the zone changes to INSYNC
when the NS and SOA records are available on all Amazon Route 53 DNS servers.
When trying to create a hosted zone using a reusable delegation set, specify an optional DelegationSetId, and Amazon Route 53 would assign those 4 NS records for the zone, instead of alloting a new one.
- createHostedZone :: Text -> Text -> CreateHostedZone
- data CreateHostedZone
- chzDelegationSetId :: Lens' CreateHostedZone (Maybe Text)
- chzVPC :: Lens' CreateHostedZone (Maybe VPC)
- chzHostedZoneConfig :: Lens' CreateHostedZone (Maybe HostedZoneConfig)
- chzName :: Lens' CreateHostedZone Text
- chzCallerReference :: Lens' CreateHostedZone Text
- createHostedZoneResponse :: Int -> HostedZone -> ChangeInfo -> DelegationSet -> Text -> CreateHostedZoneResponse
- data CreateHostedZoneResponse
- chzrsVPC :: Lens' CreateHostedZoneResponse (Maybe VPC)
- chzrsResponseStatus :: Lens' CreateHostedZoneResponse Int
- chzrsHostedZone :: Lens' CreateHostedZoneResponse HostedZone
- chzrsChangeInfo :: Lens' CreateHostedZoneResponse ChangeInfo
- chzrsDelegationSet :: Lens' CreateHostedZoneResponse DelegationSet
- chzrsLocation :: Lens' CreateHostedZoneResponse Text
Creating a Request
Creates a value of CreateHostedZone
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
data CreateHostedZone Source #
A complex type containing the hosted zone request information.
See: createHostedZone
smart constructor.
Request Lenses
chzDelegationSetId :: Lens' CreateHostedZone (Maybe Text) Source #
If you want to associate a reusable delegation set with this hosted zone, the ID that Amazon Route 53 assigned to the reusable delegation set when you created it. For more information about reusable delegation sets, see CreateReusableDelegationSet.
- Type
- String
- Default
- None
- Parent
CreatedHostedZoneRequest
chzVPC :: Lens' CreateHostedZone (Maybe VPC) Source #
The VPC that you want your hosted zone to be associated with. By providing this parameter, your newly created hosted cannot be resolved anywhere other than the given VPC.
chzHostedZoneConfig :: Lens' CreateHostedZone (Maybe HostedZoneConfig) Source #
(Optional) A complex type that contains an optional comment about your hosted zone. If you don't want to specify a comment, omit both the HostedZoneConfig
and Comment
elements.
chzName :: Lens' CreateHostedZone Text Source #
The name of the domain. For resource record types that include a domain name, specify a fully qualified domain name, for example, www.example.com. The trailing dot is optional; Amazon Route 53 assumes that the domain name is fully qualified. This means that Amazon Route 53 treats www.example.com (without a trailing dot) and www.example.com. (with a trailing dot) as identical.
If you're creating a public hosted zone, this is the name you have registered with your DNS registrar. If your domain name is registered with a registrar other than Amazon Route 53, change the name servers for your domain to the set of NameServers
that CreateHostedZone
returns in the DelegationSet element.
chzCallerReference :: Lens' CreateHostedZone Text Source #
A unique string that identifies the request and that allows failed CreateHostedZone
requests to be retried without the risk of executing the operation twice. You must use a unique CallerReference
string every time you create a hosted zone. CallerReference
can be any unique string, for example, a date/time stamp.
Destructuring the Response
createHostedZoneResponse Source #
:: Int | |
-> HostedZone | |
-> ChangeInfo | |
-> DelegationSet | |
-> Text | |
-> CreateHostedZoneResponse |
Creates a value of CreateHostedZoneResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
data CreateHostedZoneResponse Source #
A complex type containing the response information for the hosted zone.
See: createHostedZoneResponse
smart constructor.
Response Lenses
chzrsResponseStatus :: Lens' CreateHostedZoneResponse Int Source #
The response status code.
chzrsHostedZone :: Lens' CreateHostedZoneResponse HostedZone Source #
A complex type that contains general information about the hosted zone.
chzrsChangeInfo :: Lens' CreateHostedZoneResponse ChangeInfo Source #
A complex type that describes the changes made to your hosted zone.
chzrsDelegationSet :: Lens' CreateHostedZoneResponse DelegationSet Source #
A complex type that describes the name servers for this hosted zone.
chzrsLocation :: Lens' CreateHostedZoneResponse Text Source #
The unique URL representing the new hosted zone.