createFirewallDomainList method

Future<CreateFirewallDomainListResponse> createFirewallDomainList({
  1. required String name,
  2. String? creatorRequestId,
  3. List<Tag>? tags,
})

Creates an empty firewall domain list for use in DNS Firewall rules. You can populate the domains for the new list with a file, using ImportFirewallDomains, or with domain strings, using UpdateFirewallDomains.

May throw AccessDeniedException. May throw InternalServiceErrorException. May throw LimitExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter name : A name that lets you identify the domain list to manage and use it.

Parameter creatorRequestId : A unique string that identifies the request and that allows you to retry failed requests without the risk of running the operation twice. CreatorRequestId can be any unique string, for example, a date/time stamp.

Parameter tags : A list of the tag keys and values that you want to associate with the domain list.

Implementation

Future<CreateFirewallDomainListResponse> createFirewallDomainList({
  required String name,
  String? creatorRequestId,
  List<Tag>? tags,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Route53Resolver.CreateFirewallDomainList'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Name': name,
      'CreatorRequestId': creatorRequestId ?? _s.generateIdempotencyToken(),
      if (tags != null) 'Tags': tags,
    },
  );

  return CreateFirewallDomainListResponse.fromJson(jsonResponse.body);
}