Skip to content

disable_logging async

disable_logging(
    *,
    config_overrides: Optional[AsyncRedshiftClientConfig] = None,
    cluster_identifier: Optional[String] = None,
    log_destination_type: Optional[LogDestinationType] = None,
    log_exports: Optional[LogTypeList] = None,
) -> LoggingStatus

Stops logging information, such as queries and connection attempts, for the specified Amazon Redshift cluster.

Parameters:

  • cluster_identifier (Optional[String], default: None ) –

    The identifier of the cluster on which logging is to be stopped.

    Example: examplecluster

  • log_destination_type (Optional[LogDestinationType], default: None ) –

    The log destination type. An enum with possible values of s3, cloudwatch, and s3table. When set to s3table, stops system table publishing. When omitted, the operation disables audit logging.

  • log_exports (Optional[LogTypeList], default: None ) –

    The collection of log types to stop exporting. When LogDestinationType is s3table, the values are the names of the system tables to stop publishing. Omitting this parameter or passing all stops publishing all system tables.

Raises:

Source code in docs_src/capo_redshift/_services/async_redshift.py
async def disable_logging(
    self,
    *,
    config_overrides: Optional[AsyncRedshiftClientConfig] = None,
    cluster_identifier: Optional["capo_redshift.types.string.String"] = None,
    log_destination_type: Optional[
        "capo_redshift.types.log_destination_type.LogDestinationType"
    ] = None,
    log_exports: Optional["capo_redshift.types.log_type_list.LogTypeList"] = None,
) -> "capo_redshift.types.logging_status.LoggingStatus":
    """<p>Stops logging information, such as queries and connection attempts, for the specified Amazon Redshift cluster.</p>

    Args:
        cluster_identifier: <p>The identifier of the cluster on which logging is to be stopped.</p> <p>Example: <code>examplecluster</code> </p>
        log_destination_type: <p>The log destination type. An enum with possible values of <code>s3</code>, <code>cloudwatch</code>, and <code>s3table</code>. When set to <code>s3table</code>, stops system table publishing. When omitted, the operation disables audit logging.</p>
        log_exports: <p>The collection of log types to stop exporting. When <code>LogDestinationType</code> is <code>s3table</code>, the values are the names of the system tables to stop publishing. Omitting this parameter or passing <code>all</code> stops publishing all system tables.</p>

    Raises:
        capo_redshift.errors.cluster_not_found_fault.ClusterNotFoundFault: <p>The <code>ClusterIdentifier</code> parameter does not refer to an existing cluster. </p>
        capo_redshift.errors.invalid_cluster_state_fault.InvalidClusterStateFault: <p>The specified cluster is not in the <code>available</code> state. </p>
        capo_redshift.errors.unsupported_operation_fault.UnsupportedOperationFault: <p>The requested operation isn't supported.</p>
        capo_redshift.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_redshift.types.disable_logging_message.DisableLoggingMessage]",
    ) -> AsyncOperationResponse["capo_redshift.types.logging_status.LoggingStatus"]:
        import capo_redshift._operations.redshift_service_version20121201.disable_logging

        (
            output,
            http_response,
        ) = await capo_redshift._operations.redshift_service_version20121201.disable_logging.async_disable_logging(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DisableLogging")
    )
    input_: capo_redshift.types.disable_logging_message.DisableLoggingMessage = {}
    if cluster_identifier is not None:
        input_["cluster_identifier"] = cluster_identifier
    if log_destination_type is not None:
        input_["log_destination_type"] = log_destination_type
    if log_exports is not None:
        input_["log_exports"] = log_exports

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