updateTopic method
Updates a topic.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalFailureException.
May throw InvalidParameterValueException.
May throw LimitExceededException.
May throw ResourceExistsException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter awsAccountId :
The ID of the Amazon Web Services account that contains the topic that you
want to update.
Parameter topic :
The definition of the topic that you want to update.
Parameter topicId :
The ID of the topic that you want to modify. This ID is unique per Amazon
Web Services Region for each Amazon Web Services account.
Parameter customInstructions :
Custom instructions for the topic.
Implementation
Future<UpdateTopicResponse> updateTopic({
required String awsAccountId,
required TopicDetails topic,
required String topicId,
CustomInstructions? customInstructions,
}) async {
final $payload = <String, dynamic>{
'Topic': topic,
if (customInstructions != null) 'CustomInstructions': customInstructions,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/accounts/${Uri.encodeComponent(awsAccountId)}/topics/${Uri.encodeComponent(topicId)}',
exceptionFnMap: _exceptionFns,
);
return UpdateTopicResponse.fromJson(response);
}