Lists hosted zone associations with pagination support. Specify a DNS view through the resourceArn parameter to list the hosted zone associations for that DNS view, or omit it to list all hosted zone associations in your Amazon Web Services account.
Route 53 Global Resolver is a global service that supports resolvers in multiple Amazon Web Services Regions but you must specify the US East (Ohio) Region to create, update, or otherwise work with Route 53 Global Resolver resources. That is, for example, specify --region us-east-2 on Amazon Web Services CLI commands.
Parameters:
-
max_results
(Optional[int], default:
None
)
–
The maximum number of results to retrieve in a single call.
-
next_token
(Optional[str], default:
None
)
–
A pagination token used for large sets of results that can't be returned in a single response.
-
resource_arn
(Optional[ResourceArn], default:
None
)
–
The Amazon Resource Name (ARN) of the DNS view to list hosted zone associations for. This parameter is optional; if you omit it, all hosted zone associations in your Amazon Web Services account are returned.
Raises:
Source code in docs_src/capo_route53globalresolver/_services/async_route53_global_resolver.py
| async def list_hosted_zone_associations(
self,
*,
config_overrides: Optional[AsyncRoute53GlobalResolverClientConfig] = None,
max_results: Optional[int] = None,
next_token: Optional[str] = None,
resource_arn: Optional[
"capo_route53globalresolver.types.resource_arn.ResourceArn"
] = None,
) -> "capo_route53globalresolver.types.list_hosted_zone_associations_output.ListHostedZoneAssociationsOutput":
"""<p>Lists hosted zone associations with pagination support. Specify a DNS view through the <code>resourceArn</code> parameter to list the hosted zone associations for that DNS view, or omit it to list all hosted zone associations in your Amazon Web Services account.</p> <important> <p>Route 53 Global Resolver is a global service that supports resolvers in multiple Amazon Web Services Regions but you must specify the US East (Ohio) Region to create, update, or otherwise work with Route 53 Global Resolver resources. That is, for example, specify <code>--region us-east-2</code> on Amazon Web Services CLI commands.</p> </important>
Args:
max_results: <p>The maximum number of results to retrieve in a single call.</p>
next_token: <p>A pagination token used for large sets of results that can't be returned in a single response.</p>
resource_arn: <p>The Amazon Resource Name (ARN) of the DNS view to list hosted zone associations for. This parameter is optional; if you omit it, all hosted zone associations in your Amazon Web Services account are returned.</p>
Raises:
capo_route53globalresolver.errors.access_denied_exception.AccessDeniedException: <p>You don't have permission to perform this operation. Check your IAM permissions and try again.</p>
capo_route53globalresolver.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
capo_route53globalresolver.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify the resource ID and try again.</p>
capo_route53globalresolver.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Wait a moment and try again.</p>
capo_route53globalresolver.errors.validation_exception.ValidationException: <p>The input parameters are invalid. Check the parameter values and try again.</p>
capo_route53globalresolver.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_route53globalresolver.types.list_hosted_zone_associations_input.ListHostedZoneAssociationsInput]",
) -> AsyncOperationResponse[
"capo_route53globalresolver.types.list_hosted_zone_associations_output.ListHostedZoneAssociationsOutput"
]:
import capo_route53globalresolver._operations.ec2_dns_global_resolver_customer_api.list_hosted_zone_associations
(
output,
http_response,
) = await capo_route53globalresolver._operations.ec2_dns_global_resolver_customer_api.list_hosted_zone_associations.async_list_hosted_zone_associations(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListHostedZoneAssociations")
)
input_: capo_route53globalresolver.types.list_hosted_zone_associations_input.ListHostedZoneAssociationsInput = {}
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
if resource_arn is not None:
input_["resource_arn"] = resource_arn
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|