Skip to content

confirm_topic_rule_destination

confirm_topic_rule_destination(
    confirmation_token: ConfirmationToken,
    *,
    config_overrides: Optional[IoTClientConfig] = 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/io_t.py
def confirm_topic_rule_destination(
    self,
    confirmation_token: "capo_iot.types.confirmation_token.ConfirmationToken",
    *,
    config_overrides: Optional[IoTClientConfig] = 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.
    """

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

        output, http_response = (
            capo_iot._operations.aws_iot_service.confirm_topic_rule_destination.confirm_topic_rule_destination(
                req.options, req.input
            )
        )
        return OperationResponse(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 = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output