updateTopicRuleDestination method

Future<void> updateTopicRuleDestination({
  1. required String arn,
  2. required TopicRuleDestinationStatus status,
})

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

May throw InternalException. May throw InvalidRequestException. May throw ServiceUnavailableException. May throw UnauthorizedException. May throw ConflictingResourceUpdateException.

Parameter arn : The ARN of the topic rule destination.

Parameter status : 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.

Implementation

Future<void> updateTopicRuleDestination({
  required String arn,
  required TopicRuleDestinationStatus status,
}) async {
  ArgumentError.checkNotNull(arn, 'arn');
  ArgumentError.checkNotNull(status, 'status');
  final $payload = <String, dynamic>{
    'arn': arn,
    'status': status.toValue(),
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri: '/destinations',
    exceptionFnMap: _exceptionFns,
  );
}