describeFirewall method

Future<DescribeFirewallResponse> describeFirewall({
  1. String? firewallArn,
  2. String? firewallName,
})

Returns the data objects for the specified firewall.

May throw InternalServerError. May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter firewallArn : The Amazon Resource Name (ARN) of the firewall.

You must specify the ARN or the name, and you can specify both.

Parameter firewallName : The descriptive name of the firewall. You can't change the name of a firewall after you create it.

You must specify the ARN or the name, and you can specify both.

Implementation

Future<DescribeFirewallResponse> describeFirewall({
  String? firewallArn,
  String? firewallName,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'NetworkFirewall_20201112.DescribeFirewall'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (firewallArn != null) 'FirewallArn': firewallArn,
      if (firewallName != null) 'FirewallName': firewallName,
    },
  );

  return DescribeFirewallResponse.fromJson(jsonResponse.body);
}