startAnalysisReport method

Future<StartAnalysisReportResponse> startAnalysisReport({
  1. required EnabledAnalysisType analysisType,
  2. String? firewallArn,
  3. String? firewallName,
})

Generates a traffic analysis report for the timeframe and traffic type you specify.

For information on the contents of a traffic analysis report, see AnalysisReport.

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

Parameter analysisType : The type of traffic that will be used to generate a report.

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<StartAnalysisReportResponse> startAnalysisReport({
  required EnabledAnalysisType analysisType,
  String? firewallArn,
  String? firewallName,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'NetworkFirewall_20201112.StartAnalysisReport'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'AnalysisType': analysisType.value,
      if (firewallArn != null) 'FirewallArn': firewallArn,
      if (firewallName != null) 'FirewallName': firewallName,
    },
  );

  return StartAnalysisReportResponse.fromJson(jsonResponse.body);
}