Skip to content

list_vpc_association_authorizations async

list_vpc_association_authorizations(
    hosted_zone_id: ResourceId,
    *,
    config_overrides: Optional[AsyncRoute53ClientConfig] = None,
    next_token: Optional[PaginationToken] = None,
    max_results: Optional[int] = None,
) -> ListVPCAssociationAuthorizationsResponse

Gets a list of the VPCs that were created by other accounts and that can be associated with a specified hosted zone because you've submitted one or more CreateVPCAssociationAuthorization requests.

The response includes a VPCs element with a VPC child element for each VPC that can be associated with the hosted zone.

Parameters:

  • hosted_zone_id (ResourceId) –

    The ID of the hosted zone for which you want a list of VPCs that can be associated with the hosted zone.

  • next_token (Optional[PaginationToken], default: None ) –

    Optional: If a response includes a NextToken element, there are more VPCs that can be associated with the specified hosted zone. To get the next page of results, submit another request, and include the value of NextToken from the response in the nexttoken parameter in another ListVPCAssociationAuthorizations request.

  • max_results (Optional[int], default: None ) –

    Optional: An integer that specifies the maximum number of VPCs that you want Amazon Route 53 to return. If you don't specify a value for MaxResults, Route 53 returns up to 50 VPCs per page.

Raises:

Source code in docs_src/capo_route_53/_services/async_route53.py
async def list_vpc_association_authorizations(
    self,
    hosted_zone_id: "capo_route_53.types.resource_id.ResourceId",
    *,
    config_overrides: Optional[AsyncRoute53ClientConfig] = None,
    next_token: Optional[
        "capo_route_53.types.pagination_token.PaginationToken"
    ] = None,
    max_results: Optional[int] = None,
) -> "capo_route_53.types.list_vpc_association_authorizations_response.ListVPCAssociationAuthorizationsResponse":
    """<p>Gets a list of the VPCs that were created by other accounts and that can be associated with a specified hosted zone because you've submitted one or more <code>CreateVPCAssociationAuthorization</code> requests. </p> <p>The response includes a <code>VPCs</code> element with a <code>VPC</code> child element for each VPC that can be associated with the hosted zone.</p>

    Args:
        hosted_zone_id: <p>The ID of the hosted zone for which you want a list of VPCs that can be associated with the hosted zone.</p>
        next_token: <p> <i>Optional</i>: If a response includes a <code>NextToken</code> element, there are more VPCs that can be associated with the specified hosted zone. To get the next page of results, submit another request, and include the value of <code>NextToken</code> from the response in the <code>nexttoken</code> parameter in another <code>ListVPCAssociationAuthorizations</code> request.</p>
        max_results: <p> <i>Optional</i>: An integer that specifies the maximum number of VPCs that you want Amazon Route 53 to return. If you don't specify a value for <code>MaxResults</code>, Route 53 returns up to 50 VPCs per page.</p>

    Raises:
        capo_route_53.errors.invalid_input.InvalidInput: <p>The input is not valid.</p>
        capo_route_53.errors.invalid_pagination_token.InvalidPaginationToken: <p>The value that you specified to get the second or subsequent page of results is invalid.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_route_53.types.list_vpc_association_authorizations_request.ListVPCAssociationAuthorizationsRequest]",
    ) -> AsyncOperationResponse[
        "capo_route_53.types.list_vpc_association_authorizations_response.ListVPCAssociationAuthorizationsResponse"
    ]:
        import capo_route_53._operations.aws_dns_v20130401.list_vpc_association_authorizations

        (
            output,
            http_response,
        ) = await capo_route_53._operations.aws_dns_v20130401.list_vpc_association_authorizations.async_list_vpc_association_authorizations(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListVPCAssociationAuthorizations")
    )
    input_: capo_route_53.types.list_vpc_association_authorizations_request.ListVPCAssociationAuthorizationsRequest = {
        "hosted_zone_id": hosted_zone_id
    }
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output