Skip to content

deauthorize_connection

deauthorize_connection(
    name: ConnectionName,
    *,
    config_overrides: Optional[CloudWatchEventsClientConfig] = None,
) -> DeauthorizeConnectionResponse

Removes all authorization parameters from the connection. This lets you remove the secret from the connection so you can reuse it without having to create a new connection.

Parameters:

  • name (ConnectionName) –

    The name of the connection to remove authorization from.

Raises:

Source code in docs_src/capo_cloudwatch_events/_services/cloud_watch_events.py
def deauthorize_connection(
    self,
    name: "capo_cloudwatch_events.types.connection_name.ConnectionName",
    *,
    config_overrides: Optional[CloudWatchEventsClientConfig] = None,
) -> "capo_cloudwatch_events.types.deauthorize_connection_response.DeauthorizeConnectionResponse":
    """<p>Removes all authorization parameters from the connection. This lets you remove the secret from the connection so you can reuse it without having to create a new connection.</p>

    Args:
        name: <p>The name of the connection to remove authorization from.</p>

    Raises:
        capo_cloudwatch_events.errors.concurrent_modification_exception.ConcurrentModificationException: <p>There is concurrent modification on a rule, target, archive, or replay.</p>
        capo_cloudwatch_events.errors.internal_exception.InternalException: <p>This exception occurs due to unexpected causes.</p>
        capo_cloudwatch_events.errors.resource_not_found_exception.ResourceNotFoundException: <p>An entity that you specified does not exist.</p>
        capo_cloudwatch_events.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_cloudwatch_events.types.deauthorize_connection_request.DeauthorizeConnectionRequest]",
    ) -> OperationResponse[
        "capo_cloudwatch_events.types.deauthorize_connection_response.DeauthorizeConnectionResponse"
    ]:
        import capo_cloudwatch_events._operations.aws_events.deauthorize_connection

        output, http_response = (
            capo_cloudwatch_events._operations.aws_events.deauthorize_connection.deauthorize_connection(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeauthorizeConnection")
    )
    input_: capo_cloudwatch_events.types.deauthorize_connection_request.DeauthorizeConnectionRequest = {
        "name": name
    }

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