listResolverRuleAssociations method

Future<ListResolverRuleAssociationsResponse> listResolverRuleAssociations({
  1. List<Filter>? filters,
  2. int? maxResults,
  3. String? nextToken,
})

Lists the associations that were created between Resolver rules and VPCs using the current AWS account.

May throw InvalidNextTokenException. May throw InvalidRequestException. May throw InvalidParameterException. May throw InternalServiceErrorException. May throw ThrottlingException.

Parameter filters : An optional specification to return a subset of Resolver rules, such as Resolver rules that are associated with the same VPC ID.

Parameter maxResults : The maximum number of rule associations that you want to return in the response to a ListResolverRuleAssociations request. If you don't specify a value for MaxResults, Resolver returns up to 100 rule associations.

Parameter nextToken : For the first ListResolverRuleAssociation request, omit this value.

If you have more than MaxResults rule associations, you can submit another ListResolverRuleAssociation request to get the next group of rule associations. In the next request, specify the value of NextToken from the previous response.

Implementation

Future<ListResolverRuleAssociationsResponse> listResolverRuleAssociations({
  List<Filter>? filters,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Route53Resolver.ListResolverRuleAssociations'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (filters != null) 'Filters': filters,
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return ListResolverRuleAssociationsResponse.fromJson(jsonResponse.body);
}