Skip to content

put_verification_state_on_violation async

put_verification_state_on_violation(
    violation_id: ViolationId,
    verification_state: VerificationState,
    *,
    config_overrides: Optional[AsyncIoTClientConfig] = None,
    verification_state_description: Optional[VerificationStateDescription] = None,
) -> PutVerificationStateOnViolationResponse

The IoT Device Defender detect feature will no longer be available to new customers starting August 31, 2026. If you would like to use the detect feature, sign up prior to August 31, 2026. To learn about alternatives to IoT Device Defender detect, see IoT Device Defender detect feature availability change in the IoT Device Defender Developer Guide. There is no change to IoT Device Defender audit availability.

Set a verification state and provide a description of that verification state on a violation (detect alarm).

Parameters:

Raises:

Source code in docs_src/capo_iot/_services/async_io_t.py
async def put_verification_state_on_violation(
    self,
    violation_id: "capo_iot.types.violation_id.ViolationId",
    verification_state: "capo_iot.types.verification_state.VerificationState",
    *,
    config_overrides: Optional[AsyncIoTClientConfig] = None,
    verification_state_description: Optional[
        "capo_iot.types.verification_state_description.VerificationStateDescription"
    ] = None,
) -> "capo_iot.types.put_verification_state_on_violation_response.PutVerificationStateOnViolationResponse":
    """<note> <p>The IoT Device Defender detect feature will no longer be available to new customers starting August 31, 2026. If you would like to use the detect feature, sign up prior to August 31, 2026. To learn about alternatives to IoT Device Defender detect, see IoT Device Defender detect feature availability change in the IoT Device Defender Developer Guide. There is no change to IoT Device Defender audit availability.</p> </note> <p>Set a verification state and provide a description of that verification state on a violation (detect alarm).</p>

    Args:
        violation_id: <p>The violation ID.</p>
        verification_state: <p>The verification state of the violation.</p>
        verification_state_description: <p>The description of the verification state of the violation (detect alarm).</p>

    Raises:
        capo_iot.errors.internal_failure_exception.InternalFailureException: <p>An unexpected error has occurred.</p>
        capo_iot.errors.invalid_request_exception.InvalidRequestException: <p>The request is not valid.</p>
        capo_iot.errors.throttling_exception.ThrottlingException: <p>The rate exceeds the limit.</p>
        capo_iot.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_iot.types.put_verification_state_on_violation_request.PutVerificationStateOnViolationRequest]",
    ) -> AsyncOperationResponse[
        "capo_iot.types.put_verification_state_on_violation_response.PutVerificationStateOnViolationResponse"
    ]:
        import capo_iot._operations.aws_iot_service.put_verification_state_on_violation

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("PutVerificationStateOnViolation")
    )
    input_: capo_iot.types.put_verification_state_on_violation_request.PutVerificationStateOnViolationRequest = {
        "violation_id": violation_id,
        "verification_state": verification_state,
    }
    if verification_state_description is not None:
        input_["verification_state_description"] = verification_state_description

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