listThirdPartyFirewallFirewallPolicies method

Future<ListThirdPartyFirewallFirewallPoliciesResponse> listThirdPartyFirewallFirewallPolicies({
  1. required int maxResults,
  2. required ThirdPartyFirewall thirdPartyFirewall,
  3. String? nextToken,
})

Retrieves a list of all of the third-party firewall policies that are associated with the third-party firewall administrator's account.

May throw InternalErrorException. May throw InvalidInputException. May throw InvalidOperationException. May throw ResourceNotFoundException.

Parameter maxResults : The maximum number of third-party firewall policies that you want Firewall Manager to return. If the specified third-party firewall vendor is associated with more than MaxResults firewall policies, the response includes a NextToken element. NextToken contains an encrypted token that identifies the first third-party firewall policies that Firewall Manager will return if you submit another request.

Parameter thirdPartyFirewall : The name of the third-party firewall vendor.

Parameter nextToken : If the previous response included a NextToken element, the specified third-party firewall vendor is associated with more third-party firewall policies. To get more third-party firewall policies, submit another ListThirdPartyFirewallFirewallPoliciesRequest request.

For the value of NextToken, specify the value of NextToken from the previous response. If the previous response didn't include a NextToken element, there are no more third-party firewall policies to get.

Implementation

Future<ListThirdPartyFirewallFirewallPoliciesResponse>
    listThirdPartyFirewallFirewallPolicies({
  required int maxResults,
  required ThirdPartyFirewall thirdPartyFirewall,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSFMS_20180101.ListThirdPartyFirewallFirewallPolicies'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'MaxResults': maxResults,
      'ThirdPartyFirewall': thirdPartyFirewall.value,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return ListThirdPartyFirewallFirewallPoliciesResponse.fromJson(
      jsonResponse.body);
}