Gets information about a specified hosted zone including the four name servers assigned to the hosted zone.
returns the VPCs associated with the specified hosted zone and does not reflect the VPC associations by Route 53 Profiles. To get the associations to a Profile, call the ListProfileAssociations API.
Parameters:
-
id
(ResourceId)
–
The ID of the hosted zone that you want to get information about.
Raises:
Examples:
To get information about a hosted zone
The following example gets information about the Z3M3LMPEXAMPLE hosted zone.
>>> await client.get_hosted_zone(id='Z3M3LMPEXAMPLE')
Source code in docs_src/capo_route_53/_services/async_route53.py
| async def get_hosted_zone(
self,
id: "capo_route_53.types.resource_id.ResourceId",
*,
config_overrides: Optional[AsyncRoute53ClientConfig] = None,
) -> "capo_route_53.types.get_hosted_zone_response.GetHostedZoneResponse":
"""<p>Gets information about a specified hosted zone including the four name servers assigned to the hosted zone.</p> <p> <code></code> returns the VPCs associated with the specified hosted zone and does not reflect the VPC associations by Route 53 Profiles. To get the associations to a Profile, call the <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53profiles_ListProfileAssociations.html">ListProfileAssociations</a> API.</p>
Args:
id: <p>The ID of the hosted zone that you want to get information about.</p>
Raises:
capo_route_53.errors.invalid_input.InvalidInput: <p>The input is not valid.</p>
capo_route_53.errors.no_such_hosted_zone.NoSuchHostedZone: <p>No hosted zone exists with the ID that you specified.</p>
capo_route_53.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To get information about a hosted zone
The following example gets information about the Z3M3LMPEXAMPLE hosted zone.
>>> await client.get_hosted_zone(id='Z3M3LMPEXAMPLE')
"""
async def _handler(
req: "AsyncOperationRequest[capo_route_53.types.get_hosted_zone_request.GetHostedZoneRequest]",
) -> AsyncOperationResponse[
"capo_route_53.types.get_hosted_zone_response.GetHostedZoneResponse"
]:
import capo_route_53._operations.aws_dns_v20130401.get_hosted_zone
(
output,
http_response,
) = await capo_route_53._operations.aws_dns_v20130401.get_hosted_zone.async_get_hosted_zone(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetHostedZone")
)
input_: capo_route_53.types.get_hosted_zone_request.GetHostedZoneRequest = {
"id": id
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|