Skip to content

accept_connection_proposal

accept_connection_proposal(
    attach_point: AttachPoint,
    activation_key: ActivationKey,
    *,
    config_overrides: Optional[InterconnectClientConfig] = None,
    description: Optional[ConnectionDescription] = None,
    tags: Optional[TagMap] = None,
    client_token: Optional[str] = None,
) -> AcceptConnectionProposalResponse

Accepts a connection proposal which was generated at a supported partner's portal.

The proposal contains the Environment and bandwidth that were chosen on the partner's portal and cannot be modified.

Upon accepting the proposal a connection will be made between the AWS network as accessed via the selected Attach Point and the network previously selected network on the partner's portal.

Parameters:

  • attach_point (AttachPoint) –

    The Attach Point to which the connection should be associated.

  • activation_key (ActivationKey) –

    An Activation Key that was generated on a supported partner's portal. This key captures the desired parameters from the initial creation request.

    The details of this request can be described using with DescribeConnectionProposal.

  • description (Optional[ConnectionDescription], default: None ) –

    A description to distinguish this Connection.

  • tags (Optional[TagMap], default: None ) –

    The tags to associate with the resulting Connection.

  • client_token (Optional[str], default: None ) –

    Idempotency token used for the request.

Raises:

Examples:

Accept Connection Proposal

>>> client.accept_connection_proposal(activation_key='<Activation Key Data>', attach_point={'directConnectGateway': '90392BE3-219C-47FD-BBA5-03DF76D2542A'})
Source code in docs_src/capo_interconnect/_services/interconnect.py
def accept_connection_proposal(
    self,
    attach_point: "capo_interconnect.types.attach_point.AttachPoint",
    activation_key: "capo_interconnect.types.activation_key.ActivationKey",
    *,
    config_overrides: Optional[InterconnectClientConfig] = None,
    description: Optional[
        "capo_interconnect.types.connection_description.ConnectionDescription"
    ] = None,
    tags: Optional["capo_interconnect.types.tag_map.TagMap"] = None,
    client_token: Optional[str] = None,
) -> "capo_interconnect.types.accept_connection_proposal_response.AcceptConnectionProposalResponse":
    """<p>Accepts a connection proposal which was generated at a supported partner's portal.</p> <p>The proposal contains the Environment and bandwidth that were chosen on the partner's portal and cannot be modified.</p> <p>Upon accepting the proposal a connection will be made between the AWS network as accessed via the selected Attach Point and the network previously selected network on the partner's portal.</p>

    Args:
        attach_point: <p>The Attach Point to which the connection should be associated.</p>
        activation_key: <p>An Activation Key that was generated on a supported partner's portal. This key captures the desired parameters from the initial creation request.</p> <p>The details of this request can be described using with <a>DescribeConnectionProposal</a>. </p>
        description: <p>A description to distinguish this <a>Connection</a>.</p>
        tags: <p>The tags to associate with the resulting <a>Connection</a>.</p>
        client_token: <p>Idempotency token used for the request.</p>

    Raises:
        capo_interconnect.errors.access_denied_exception.AccessDeniedException: <p>The calling principal is not allowed to access the specified resource, or the resource does not exist.</p>
        capo_interconnect.errors.interconnect_client_exception.InterconnectClientException: <p>The request was denied due to incorrect client supplied parameters.</p>
        capo_interconnect.errors.interconnect_server_exception.InterconnectServerException: <p>The request resulted in an exception internal to the service.</p>
        capo_interconnect.errors.interconnect_validation_exception.InterconnectValidationException: <p>The input fails to satisfy the constraints specified.</p>
        capo_interconnect.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request specifies a resource that does not exist on the server.</p>
        capo_interconnect.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The requested operation would result in the calling principal exceeding their allotted quota.</p>
        capo_interconnect.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_interconnect.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Accept Connection Proposal

        >>> client.accept_connection_proposal(activation_key='<Activation Key Data>', attach_point={'directConnectGateway': '90392BE3-219C-47FD-BBA5-03DF76D2542A'})
    """

    def _handler(
        req: "OperationRequest[capo_interconnect.types.accept_connection_proposal_request.AcceptConnectionProposalRequest]",
    ) -> OperationResponse[
        "capo_interconnect.types.accept_connection_proposal_response.AcceptConnectionProposalResponse"
    ]:
        import capo_interconnect._operations.interconnect.accept_connection_proposal

        output, http_response = (
            capo_interconnect._operations.interconnect.accept_connection_proposal.accept_connection_proposal(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_interconnect.types.accept_connection_proposal_request.AcceptConnectionProposalRequest",
    ) -> dict[str, Any]:
        import capo_interconnect.types.accept_connection_proposal_request

        return capo_interconnect.types.accept_connection_proposal_request.redact_sensitive(
            input_
        )

    def _redact_output(
        output: "capo_interconnect.types.accept_connection_proposal_response.AcceptConnectionProposalResponse",
    ) -> dict[str, Any]:
        import capo_interconnect.types.accept_connection_proposal_response

        return capo_interconnect.types.accept_connection_proposal_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "AcceptConnectionProposal",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_interconnect.types.accept_connection_proposal_request.AcceptConnectionProposalRequest = {
        "attach_point": attach_point,
        "activation_key": activation_key,
    }
    if description is not None:
        input_["description"] = description
    if tags is not None:
        input_["tags"] = tags
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output