Skip to content

create_logging_configuration

create_logging_configuration(
    destination_configuration: DestinationConfiguration,
    *,
    config_overrides: Optional[ivschatClientConfig] = None,
    name: Optional[LoggingConfigurationName] = None,
    tags: Optional[Tags] = None,
) -> CreateLoggingConfigurationResponse

Creates a logging configuration that allows clients to store and record sent messages.

Parameters:

  • name (Optional[LoggingConfigurationName], default: None ) –

    Logging-configuration name. The value does not need to be unique.

  • destination_configuration (DestinationConfiguration) –

    A complex type that contains a destination configuration for where chat content will be logged. There can be only one type of destination (cloudWatchLogs, firehose, or s3) in a destinationConfiguration.

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

    Tags to attach to the resource. Array of maps, each of the form string:string (key:value). See Best practices and strategies in Tagging Amazon Web Services Resources and Tag Editor for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS Chat has no constraints on tags beyond what is documented there.

Raises:

Source code in docs_src/capo_ivschat/_services/ivschat.py
def create_logging_configuration(
    self,
    destination_configuration: "capo_ivschat.types.destination_configuration.DestinationConfiguration",
    *,
    config_overrides: Optional[ivschatClientConfig] = None,
    name: Optional[
        "capo_ivschat.types.logging_configuration_name.LoggingConfigurationName"
    ] = None,
    tags: Optional["capo_ivschat.types.tags.Tags"] = None,
) -> "capo_ivschat.types.create_logging_configuration_response.CreateLoggingConfigurationResponse":
    """<p>Creates a logging configuration that allows clients to store and record sent messages.</p>

    Args:
        name: <p>Logging-configuration name. The value does not need to be unique.</p>
        destination_configuration: <p>A complex type that contains a destination configuration for where chat content will be logged. There can be only one type of destination (<code>cloudWatchLogs</code>, <code>firehose</code>, or <code>s3</code>) in a <code>destinationConfiguration</code>.</p>
        tags: <p>Tags to attach to the resource. Array of maps, each of the form <code>string:string (key:value)</code>. See <a href="https://docs.aws.amazon.com/tag-editor/latest/userguide/best-practices-and-strats.html">Best practices and strategies</a> in <i>Tagging Amazon Web Services Resources and Tag Editor</i> for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS Chat has no constraints on tags beyond what is documented there.</p>

    Raises:
        capo_ivschat.errors.access_denied_exception.AccessDeniedException: <p/>
        capo_ivschat.errors.conflict_exception.ConflictException: <p/>
        capo_ivschat.errors.pending_verification.PendingVerification: <p/>
        capo_ivschat.errors.resource_not_found_exception.ResourceNotFoundException: <p/>
        capo_ivschat.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p/>
        capo_ivschat.errors.validation_exception.ValidationException: <p/>
        capo_ivschat.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_ivschat.types.create_logging_configuration_request.CreateLoggingConfigurationRequest]",
    ) -> OperationResponse[
        "capo_ivschat.types.create_logging_configuration_response.CreateLoggingConfigurationResponse"
    ]:
        import capo_ivschat._operations.amazon_interactive_video_service_chat.create_logging_configuration

        output, http_response = (
            capo_ivschat._operations.amazon_interactive_video_service_chat.create_logging_configuration.create_logging_configuration(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateLoggingConfiguration")
    )
    input_: capo_ivschat.types.create_logging_configuration_request.CreateLoggingConfigurationRequest = {
        "destination_configuration": destination_configuration
    }
    if name is not None:
        input_["name"] = name
    if tags is not None:
        input_["tags"] = tags

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