updatePublicDnsNamespace method

Future<UpdatePublicDnsNamespaceResponse> updatePublicDnsNamespace({
  1. required String id,
  2. required PublicDnsNamespaceChange namespace,
  3. String? updaterRequestId,
})

Updates a public DNS namespace.

May throw DuplicateRequest. May throw InvalidInput. May throw NamespaceNotFound. May throw ResourceInUse.

Parameter id : The ID or Amazon Resource Name (ARN) of the namespace being updated.

Parameter namespace : Updated properties for the public DNS namespace.

Parameter updaterRequestId : A unique string that identifies the request and that allows failed UpdatePublicDnsNamespace requests to be retried without the risk of running the operation twice. UpdaterRequestId can be any unique string (for example, a date/timestamp).

Implementation

Future<UpdatePublicDnsNamespaceResponse> updatePublicDnsNamespace({
  required String id,
  required PublicDnsNamespaceChange namespace,
  String? updaterRequestId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Route53AutoNaming_v20170314.UpdatePublicDnsNamespace'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Id': id,
      'Namespace': namespace,
      'UpdaterRequestId': updaterRequestId ?? _s.generateIdempotencyToken(),
    },
  );

  return UpdatePublicDnsNamespaceResponse.fromJson(jsonResponse.body);
}