Skip to content

confirm_topic_rule_destination async

confirm_topic_rule_destination(
    confirmation_token: ConfirmationToken,
    *,
    config_overrides: Optional[AsyncIoTClientConfig] = None,
) -> ConfirmTopicRuleDestinationResponse

Confirms a topic rule destination. When you create a rule requiring a destination, IoT sends a confirmation message to the endpoint or base address you specify. The message includes a token which you pass back when calling ConfirmTopicRuleDestination to confirm that you own or have access to the endpoint.

Requires permission to access the ConfirmTopicRuleDestination action.

Parameters:

  • confirmation_token (ConfirmationToken) –

    The token used to confirm ownership or access to the topic rule confirmation URL.

Raises:

Source code in docs_src/capo_iot/_services/async_io_t.py
async def confirm_topic_rule_destination(
    self,
    confirmation_token: "capo_iot.types.confirmation_token.ConfirmationToken",
    *,
    config_overrides: Optional[AsyncIoTClientConfig] = None,
) -> "capo_iot.types.confirm_topic_rule_destination_response.ConfirmTopicRuleDestinationResponse":
    """<p>Confirms a topic rule destination. When you create a rule requiring a destination, IoT sends a confirmation message to the endpoint or base address you specify. The message includes a token which you pass back when calling <code>ConfirmTopicRuleDestination</code> to confirm that you own or have access to the endpoint.</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">ConfirmTopicRuleDestination</a> action.</p>

    Args:
        confirmation_token: <p>The token used to confirm ownership or access to the topic rule confirmation URL.</p>

    Raises:
        capo_iot.errors.conflicting_resource_update_exception.ConflictingResourceUpdateException: <p>A conflicting resource update exception. This exception is thrown when two pending updates cause a conflict.</p>
        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.unauthorized_exception.UnauthorizedException: <p>You are not authorized to perform this operation.</p>
        capo_iot.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_iot.types.confirm_topic_rule_destination_request.ConfirmTopicRuleDestinationRequest]",
    ) -> AsyncOperationResponse[
        "capo_iot.types.confirm_topic_rule_destination_response.ConfirmTopicRuleDestinationResponse"
    ]:
        import capo_iot._operations.aws_iot_service.confirm_topic_rule_destination

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ConfirmTopicRuleDestination")
    )
    input_: capo_iot.types.confirm_topic_rule_destination_request.ConfirmTopicRuleDestinationRequest = {
        "confirmation_token": confirmation_token
    }

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