updateTrafficPolicyComment method

Future<UpdateTrafficPolicyCommentResponse> updateTrafficPolicyComment({
  1. required String comment,
  2. required String id,
  3. required int version,
})

Updates the comment for a specified traffic policy version.

May throw InvalidInput. May throw NoSuchTrafficPolicy. May throw ConcurrentModification.

Parameter comment : The new comment for the specified traffic policy and version.

Parameter id : The value of Id for the traffic policy that you want to update the comment for.

Parameter version : The value of Version for the traffic policy that you want to update the comment for.

Implementation

Future<UpdateTrafficPolicyCommentResponse> updateTrafficPolicyComment({
  required String comment,
  required String id,
  required int version,
}) async {
  ArgumentError.checkNotNull(comment, 'comment');
  _s.validateStringLength(
    'comment',
    comment,
    0,
    1024,
    isRequired: true,
  );
  ArgumentError.checkNotNull(id, 'id');
  _s.validateStringLength(
    'id',
    id,
    1,
    36,
    isRequired: true,
  );
  ArgumentError.checkNotNull(version, 'version');
  _s.validateNumRange(
    'version',
    version,
    1,
    1000,
    isRequired: true,
  );
  final $result = await _protocol.send(
    method: 'POST',
    requestUri:
        '/2013-04-01/trafficpolicy/${Uri.encodeComponent(id)}/${Uri.encodeComponent(version.toString())}',
    payload: UpdateTrafficPolicyCommentRequest(
            comment: comment, id: id, version: version)
        .toXml(
      'UpdateTrafficPolicyCommentRequest',
      attributes: [
        _s.XmlAttribute(_s.XmlName('xmlns'),
            'https://route53.amazonaws.com/doc/2013-04-01/'),
      ],
    ),
    exceptionFnMap: _exceptionFns,
  );
  return UpdateTrafficPolicyCommentResponse.fromXml($result.body);
}