Skip to content

delete_connection async

delete_connection(
    connection_arn: ConnectionArn,
    *,
    config_overrides: Optional[AsyncCodeStarconnectionsClientConfig] = None,
) -> DeleteConnectionOutput

The connection to be deleted.

Parameters:

  • connection_arn (ConnectionArn) –

    The Amazon Resource Name (ARN) of the connection to be deleted.

    The ARN is never reused if the connection is deleted.

Raises:

Source code in docs_src/capo_codestar_connections/_services/async_code_starconnections.py
async def delete_connection(
    self,
    connection_arn: "capo_codestar_connections.types.connection_arn.ConnectionArn",
    *,
    config_overrides: Optional[AsyncCodeStarconnectionsClientConfig] = None,
) -> "capo_codestar_connections.types.delete_connection_output.DeleteConnectionOutput":
    """<p>The connection to be deleted.</p>

    Args:
        connection_arn: <p>The Amazon Resource Name (ARN) of the connection to be deleted.</p> <note> <p>The ARN is never reused if the connection is deleted.</p> </note>

    Raises:
        capo_codestar_connections.errors.resource_not_found_exception.ResourceNotFoundException: <p>Resource not found. Verify the connection resource ARN and try again.</p>
        capo_codestar_connections.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_codestar_connections.types.delete_connection_input.DeleteConnectionInput]",
    ) -> AsyncOperationResponse[
        "capo_codestar_connections.types.delete_connection_output.DeleteConnectionOutput"
    ]:
        import capo_codestar_connections._operations.code_star_connections_20191201.delete_connection

        (
            output,
            http_response,
        ) = await capo_codestar_connections._operations.code_star_connections_20191201.delete_connection.async_delete_connection(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteConnection")
    )
    input_: capo_codestar_connections.types.delete_connection_input.DeleteConnectionInput = {
        "connection_arn": connection_arn
    }

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