Skip to content

get_connection

get_connection(
    connection_id: ConnectionId,
    *,
    config_overrides: Optional[OutpostsClientConfig] = None,
) -> GetConnectionResponse

Amazon Web Services uses this action to install Outpost servers.

Gets information about the specified connection.

Use CloudTrail to monitor this action or Amazon Web Services managed policy for Amazon Web Services Outposts to secure it. For more information, see Amazon Web Services managed policies for Amazon Web Services Outposts and Logging Amazon Web Services Outposts API calls with Amazon Web Services CloudTrail in the Amazon Web Services Outposts User Guide.

Parameters:

  • connection_id (ConnectionId) –

    The ID of the connection.

Raises:

Source code in docs_src/capo_outposts/_services/outposts.py
def get_connection(
    self,
    connection_id: "capo_outposts.types.connection_id.ConnectionId",
    *,
    config_overrides: Optional[OutpostsClientConfig] = None,
) -> "capo_outposts.types.get_connection_response.GetConnectionResponse":
    """<note> <p> Amazon Web Services uses this action to install Outpost servers.</p> </note> <p> Gets information about the specified connection. </p> <p> Use CloudTrail to monitor this action or Amazon Web Services managed policy for Amazon Web Services Outposts to secure it. For more information, see <a href="https://docs.aws.amazon.com/outposts/latest/userguide/security-iam-awsmanpol.html"> Amazon Web Services managed policies for Amazon Web Services Outposts</a> and <a href="https://docs.aws.amazon.com/outposts/latest/userguide/logging-using-cloudtrail.html"> Logging Amazon Web Services Outposts API calls with Amazon Web Services CloudTrail</a> in the <i>Amazon Web Services Outposts User Guide</i>. </p>

    Args:
        connection_id: <p> The ID of the connection. </p>

    Raises:
        capo_outposts.errors.access_denied_exception.AccessDeniedException: <p>You do not have permission to perform this operation.</p>
        capo_outposts.errors.internal_server_exception.InternalServerException: <p>An internal error has occurred.</p>
        capo_outposts.errors.not_found_exception.NotFoundException: <p>The specified request is not valid.</p>
        capo_outposts.errors.validation_exception.ValidationException: <p>A parameter is not valid.</p>
        capo_outposts.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_outposts.types.get_connection_request.GetConnectionRequest]",
    ) -> OperationResponse[
        "capo_outposts.types.get_connection_response.GetConnectionResponse"
    ]:
        import capo_outposts._operations.outposts_olaf_service.get_connection

        output, http_response = (
            capo_outposts._operations.outposts_olaf_service.get_connection.get_connection(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetConnection")
    )
    input_: capo_outposts.types.get_connection_request.GetConnectionRequest = {
        "connection_id": connection_id
    }

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