updateTopicRuleDestination method
Future<void>
updateTopicRuleDestination({
- required String arn,
- 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
toIN_PROGRESS
by callingUpdateTopicRuleDestination
. CallingUpdateTopicRuleDestination
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
toDISABLED
by callingUpdateTopicRuleDestination
. - DISABLED
-
Confirmation was completed, and traffic to this destination is not
allowed. You can set
status
toENABLED
by callingUpdateTopicRuleDestination
. - ERROR
-
Confirmation could not be completed, for example if the confirmation timed
out. You can call
GetTopicRuleDestination
for details about the error. You can setstatus
toIN_PROGRESS
by callingUpdateTopicRuleDestination
. CallingUpdateTopicRuleDestination
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,
);
}