updateHostedZoneComment method

Future<UpdateHostedZoneCommentResponse> updateHostedZoneComment({
  1. required String id,
  2. String? comment,
})

Updates the comment for a specified hosted zone.

May throw NoSuchHostedZone. May throw InvalidInput.

Parameter id : The ID for the hosted zone that you want to update the comment for.

Parameter comment : The new comment for the hosted zone. If you don't specify a value for Comment, Amazon Route 53 deletes the existing value of the Comment element, if any.

Implementation

Future<UpdateHostedZoneCommentResponse> updateHostedZoneComment({
  required String id,
  String? comment,
}) async {
  ArgumentError.checkNotNull(id, 'id');
  _s.validateStringLength(
    'id',
    id,
    0,
    32,
    isRequired: true,
  );
  _s.validateStringLength(
    'comment',
    comment,
    0,
    256,
  );
  final $result = await _protocol.send(
    method: 'POST',
    requestUri: '/2013-04-01/hostedzone/${Uri.encodeComponent(id)}',
    payload: UpdateHostedZoneCommentRequest(id: id, comment: comment).toXml(
      'UpdateHostedZoneCommentRequest',
      attributes: [
        _s.XmlAttribute(_s.XmlName('xmlns'),
            'https://route53.amazonaws.com/doc/2013-04-01/'),
      ],
    ),
    exceptionFnMap: _exceptionFns,
  );
  return UpdateHostedZoneCommentResponse.fromXml($result.body);
}