Skip to content

delete_v2_logging_level async

delete_v2_logging_level(
    target_type: LogTargetType,
    target_name: LogTargetName,
    *,
    config_overrides: Optional[AsyncIoTClientConfig] = None,
) -> None

Deletes a logging level.

Requires permission to access the DeleteV2LoggingLevel action.

Parameters:

  • target_type (LogTargetType) –

    The type of resource for which you are configuring logging. Must be DEFAULT, THING_GROUP, CLIENT_ID, SOURCE_IP, or PRINCIPAL_ID.

  • target_name (LogTargetName) –

    The name of the resource for which you are configuring logging.

Raises:

Source code in docs_src/capo_iot/_services/async_io_t.py
async def delete_v2_logging_level(
    self,
    target_type: "capo_iot.types.log_target_type.LogTargetType",
    target_name: "capo_iot.types.log_target_name.LogTargetName",
    *,
    config_overrides: Optional[AsyncIoTClientConfig] = None,
) -> None:
    """<p>Deletes a 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">DeleteV2LoggingLevel</a> action.</p>

    Args:
        target_type: <p>The type of resource for which you are configuring logging. Must be <code>DEFAULT</code>, <code>THING_GROUP</code>, <code>CLIENT_ID</code>, <code>SOURCE_IP</code>, or <code>PRINCIPAL_ID</code>.</p>
        target_name: <p>The name of the resource for which you are configuring logging.</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.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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_iot.types.delete_v2_logging_level_request.DeleteV2LoggingLevelRequest]",
    ) -> AsyncOperationResponse[None]:
        import capo_iot._operations.aws_iot_service.delete_v2_logging_level

        (
            output,
            http_response,
        ) = await capo_iot._operations.aws_iot_service.delete_v2_logging_level.async_delete_v2_logging_level(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteV2LoggingLevel")
    )
    input_: capo_iot.types.delete_v2_logging_level_request.DeleteV2LoggingLevelRequest = {
        "target_type": target_type,
        "target_name": target_name,
    }

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