updateTopicV2 method

Future<UpdateTopicV2Response> updateTopicV2({
  1. required String awsAccountId,
  2. required TopicV2Details topic,
  3. required String topicId,
  4. CustomInstructions? customInstructions,
  5. TopicV2PublishOption? publishOption,
})

Updates the definition of a Q 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 publishOption : The publish option for the topic that you want to update.

Implementation

Future<UpdateTopicV2Response> updateTopicV2({
  required String awsAccountId,
  required TopicV2Details topic,
  required String topicId,
  CustomInstructions? customInstructions,
  TopicV2PublishOption? publishOption,
}) async {
  final $payload = <String, dynamic>{
    'Topic': topic,
    if (customInstructions != null) 'CustomInstructions': customInstructions,
    if (publishOption != null) 'PublishOption': publishOption.value,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/accounts/${Uri.encodeComponent(awsAccountId)}/topicsV2/${Uri.encodeComponent(topicId)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateTopicV2Response.fromJson(response);
}