Sets the logging level.
Requires permission to access the SetV2LoggingLevel action.
Parameters:
Raises:
Source code in docs_src/capo_iot/_services/io_t.py
| def set_v2_logging_level(
self,
log_target: "capo_iot.types.log_target.LogTarget",
log_level: "capo_iot.types.log_level.LogLevel",
*,
config_overrides: Optional[IoTClientConfig] = None,
) -> None:
"""<p>Sets the logging level.</p> <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions">SetV2LoggingLevel</a> action.</p>
Args:
log_target: <p>The log target.</p>
log_level: <p>The log level.</p>
Raises:
capo_iot.errors.internal_exception.InternalException: <p>An unexpected error has occurred.</p>
capo_iot.errors.invalid_request_exception.InvalidRequestException: <p>The request is not valid.</p>
capo_iot.errors.limit_exceeded_exception.LimitExceededException: <p>A limit has been exceeded.</p>
capo_iot.errors.not_configured_exception.NotConfiguredException: <p>The resource is not configured.</p>
capo_iot.errors.service_unavailable_exception.ServiceUnavailableException: <p>The service is temporarily unavailable.</p>
capo_iot.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_iot.types.set_v2_logging_level_request.SetV2LoggingLevelRequest]",
) -> OperationResponse[None]:
import capo_iot._operations.aws_iot_service.set_v2_logging_level
output, http_response = (
capo_iot._operations.aws_iot_service.set_v2_logging_level.set_v2_logging_level(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("SetV2LoggingLevel")
)
input_: capo_iot.types.set_v2_logging_level_request.SetV2LoggingLevelRequest = {
"log_target": log_target,
"log_level": log_level,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|