Skip to content

accept_direct_connect_gateway_association_proposal async

accept_direct_connect_gateway_association_proposal(
    direct_connect_gateway_id: DirectConnectGatewayId,
    proposal_id: DirectConnectGatewayAssociationProposalId,
    associated_gateway_owner_account: OwnerAccount,
    *,
    config_overrides: Optional[AsyncDirectConnectClientConfig] = None,
    override_allowed_prefixes_to_direct_connect_gateway: Optional[
        RouteFilterPrefixList
    ] = None,
) -> AcceptDirectConnectGatewayAssociationProposalResult

Accepts a proposal request to attach a virtual private gateway or transit gateway to a Direct Connect gateway.

Parameters:

  • direct_connect_gateway_id (DirectConnectGatewayId) –

    The ID of the Direct Connect gateway.

  • proposal_id (DirectConnectGatewayAssociationProposalId) –

    The ID of the request proposal.

  • associated_gateway_owner_account (OwnerAccount) –

    The ID of the Amazon Web Services account that owns the virtual private gateway or transit gateway.

  • override_allowed_prefixes_to_direct_connect_gateway (Optional[RouteFilterPrefixList], default: None ) –

    Overrides the Amazon VPC prefixes advertised to the Direct Connect gateway.

    For information about how to set the prefixes, see Allowed Prefixes in the Direct Connect User Guide.

Raises:

Source code in docs_src/capo_direct_connect/_services/async_direct_connect.py
async def accept_direct_connect_gateway_association_proposal(
    self,
    direct_connect_gateway_id: "capo_direct_connect.types.direct_connect_gateway_id.DirectConnectGatewayId",
    proposal_id: "capo_direct_connect.types.direct_connect_gateway_association_proposal_id.DirectConnectGatewayAssociationProposalId",
    associated_gateway_owner_account: "capo_direct_connect.types.owner_account.OwnerAccount",
    *,
    config_overrides: Optional[AsyncDirectConnectClientConfig] = None,
    override_allowed_prefixes_to_direct_connect_gateway: Optional[
        "capo_direct_connect.types.route_filter_prefix_list.RouteFilterPrefixList"
    ] = None,
) -> "capo_direct_connect.types.accept_direct_connect_gateway_association_proposal_result.AcceptDirectConnectGatewayAssociationProposalResult":
    """<p>Accepts a proposal request to attach a virtual private gateway or transit gateway to a Direct Connect gateway.</p>

    Args:
        direct_connect_gateway_id: <p>The ID of the Direct Connect gateway.</p>
        proposal_id: <p>The ID of the request proposal.</p>
        associated_gateway_owner_account: <p>The ID of the Amazon Web Services account that owns the virtual private gateway or transit gateway.</p>
        override_allowed_prefixes_to_direct_connect_gateway: <p>Overrides the Amazon VPC prefixes advertised to the Direct Connect gateway.</p> <p>For information about how to set the prefixes, see <a href="https://docs.aws.amazon.com/directconnect/latest/UserGuide/multi-account-associate-vgw.html#allowed-prefixes">Allowed Prefixes</a> in the <i>Direct Connect User Guide</i>.</p>

    Raises:
        capo_direct_connect.errors.direct_connect_client_exception.DirectConnectClientException: <p>One or more parameters are not valid.</p>
        capo_direct_connect.errors.direct_connect_server_exception.DirectConnectServerException: <p>A server-side error occurred.</p>
        capo_direct_connect.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_direct_connect.types.accept_direct_connect_gateway_association_proposal_request.AcceptDirectConnectGatewayAssociationProposalRequest]",
    ) -> AsyncOperationResponse[
        "capo_direct_connect.types.accept_direct_connect_gateway_association_proposal_result.AcceptDirectConnectGatewayAssociationProposalResult"
    ]:
        import capo_direct_connect._operations.overture_service.accept_direct_connect_gateway_association_proposal

        (
            output,
            http_response,
        ) = await capo_direct_connect._operations.overture_service.accept_direct_connect_gateway_association_proposal.async_accept_direct_connect_gateway_association_proposal(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("AcceptDirectConnectGatewayAssociationProposal"),
    )
    input_: capo_direct_connect.types.accept_direct_connect_gateway_association_proposal_request.AcceptDirectConnectGatewayAssociationProposalRequest = {
        "direct_connect_gateway_id": direct_connect_gateway_id,
        "proposal_id": proposal_id,
        "associated_gateway_owner_account": associated_gateway_owner_account,
    }
    if override_allowed_prefixes_to_direct_connect_gateway is not None:
        input_["override_allowed_prefixes_to_direct_connect_gateway"] = (
            override_allowed_prefixes_to_direct_connect_gateway
        )

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