Configures Amazon CloudWatch log settings for a channel.
Parameters:
Raises:
Source code in docs_src/capo_mediatailor/_services/media_tailor.py
| def configure_logs_for_channel(
self,
channel_name: "capo_mediatailor.types.__string.__string",
log_types: "capo_mediatailor.types.log_types.LogTypes",
*,
config_overrides: Optional[MediaTailorClientConfig] = None,
) -> "capo_mediatailor.types.configure_logs_for_channel_response.ConfigureLogsForChannelResponse":
"""<p>Configures Amazon CloudWatch log settings for a channel.</p>
Args:
channel_name: <p>The name of the channel.</p>
log_types: <p>The types of logs to collect.</p>
Raises:
capo_mediatailor.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_mediatailor.types.configure_logs_for_channel_request.ConfigureLogsForChannelRequest]",
) -> OperationResponse[
"capo_mediatailor.types.configure_logs_for_channel_response.ConfigureLogsForChannelResponse"
]:
import capo_mediatailor._operations.media_tailor.configure_logs_for_channel
output, http_response = (
capo_mediatailor._operations.media_tailor.configure_logs_for_channel.configure_logs_for_channel(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ConfigureLogsForChannel")
)
input_: capo_mediatailor.types.configure_logs_for_channel_request.ConfigureLogsForChannelRequest = {
"channel_name": channel_name,
"log_types": log_types,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|