Skip to content

update_topic_rule_destination

update_topic_rule_destination(
    arn: AwsArn,
    status: TopicRuleDestinationStatus,
    *,
    config_overrides: Optional[IoTClientConfig] = None,
) -> UpdateTopicRuleDestinationResponse

Updates a topic rule destination. You use this to change the status, endpoint URL, or confirmation URL of the destination.

Requires permission to access the UpdateTopicRuleDestination action.

Parameters:

  • arn (AwsArn) –

    The ARN of the topic rule destination.

  • status (TopicRuleDestinationStatus) –

    The status of the topic rule destination. Valid values are:

    IN_PROGRESS

    A topic rule destination was created but has not been confirmed. You can set status to IN_PROGRESS by calling UpdateTopicRuleDestination. Calling UpdateTopicRuleDestination causes a new confirmation challenge to be sent to your confirmation endpoint.

    ENABLED

    Confirmation was completed, and traffic to this destination is allowed. You can set status to DISABLED by calling UpdateTopicRuleDestination.

    DISABLED

    Confirmation was completed, and traffic to this destination is not allowed. You can set status to ENABLED by calling UpdateTopicRuleDestination.

    ERROR

    Confirmation could not be completed, for example if the confirmation timed out. You can call GetTopicRuleDestination for details about the error. You can set status to IN_PROGRESS by calling UpdateTopicRuleDestination. Calling UpdateTopicRuleDestination causes a new confirmation challenge to be sent to your confirmation endpoint.

Raises:

Source code in docs_src/capo_iot/_services/io_t.py
def update_topic_rule_destination(
    self,
    arn: "capo_iot.types.aws_arn.AwsArn",
    status: "capo_iot.types.topic_rule_destination_status.TopicRuleDestinationStatus",
    *,
    config_overrides: Optional[IoTClientConfig] = None,
) -> "capo_iot.types.update_topic_rule_destination_response.UpdateTopicRuleDestinationResponse":
    """<p>Updates a topic rule destination. You use this to change the status, endpoint URL, or confirmation URL of the destination.</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">UpdateTopicRuleDestination</a> action.</p>

    Args:
        arn: <p>The ARN of the topic rule destination.</p>
        status: <p>The status of the topic rule destination. Valid values are:</p> <dl> <dt>IN_PROGRESS</dt> <dd> <p>A topic rule destination was created but has not been confirmed. You can set <code>status</code> to <code>IN_PROGRESS</code> by calling <code>UpdateTopicRuleDestination</code>. Calling <code>UpdateTopicRuleDestination</code> causes a new confirmation challenge to be sent to your confirmation endpoint.</p> </dd> <dt>ENABLED</dt> <dd> <p>Confirmation was completed, and traffic to this destination is allowed. You can set <code>status</code> to <code>DISABLED</code> by calling <code>UpdateTopicRuleDestination</code>.</p> </dd> <dt>DISABLED</dt> <dd> <p>Confirmation was completed, and traffic to this destination is not allowed. You can set <code>status</code> to <code>ENABLED</code> by calling <code>UpdateTopicRuleDestination</code>.</p> </dd> <dt>ERROR</dt> <dd> <p>Confirmation could not be completed, for example if the confirmation timed out. You can call <code>GetTopicRuleDestination</code> for details about the error. You can set <code>status</code> to <code>IN_PROGRESS</code> by calling <code>UpdateTopicRuleDestination</code>. Calling <code>UpdateTopicRuleDestination</code> causes a new confirmation challenge to be sent to your confirmation endpoint.</p> </dd> </dl>

    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.update_topic_rule_destination_request.UpdateTopicRuleDestinationRequest]",
    ) -> OperationResponse[
        "capo_iot.types.update_topic_rule_destination_response.UpdateTopicRuleDestinationResponse"
    ]:
        import capo_iot._operations.aws_iot_service.update_topic_rule_destination

        output, http_response = (
            capo_iot._operations.aws_iot_service.update_topic_rule_destination.update_topic_rule_destination(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateTopicRuleDestination")
    )
    input_: capo_iot.types.update_topic_rule_destination_request.UpdateTopicRuleDestinationRequest = {
        "arn": arn,
        "status": status,
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output