createReportGroup method

Future<CreateReportGroupOutput> createReportGroup({
  1. required ReportExportConfig exportConfig,
  2. required String name,
  3. required ReportType type,
  4. List<Tag>? tags,
})

Creates a report group. A report group contains a collection of reports.

May throw AccountLimitExceededException. May throw InvalidInputException. May throw ResourceAlreadyExistsException.

Parameter exportConfig : A ReportExportConfig object that contains information about where the report group test results are exported.

Parameter name : The name of the report group.

Parameter type : The type of report group.

Parameter tags : A list of tag key and value pairs associated with this report group.

These tags are available for use by Amazon Web Services services that support CodeBuild report group tags.

Implementation

Future<CreateReportGroupOutput> createReportGroup({
  required ReportExportConfig exportConfig,
  required String name,
  required ReportType type,
  List<Tag>? tags,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'CodeBuild_20161006.CreateReportGroup'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'exportConfig': exportConfig,
      'name': name,
      'type': type.value,
      if (tags != null) 'tags': tags,
    },
  );

  return CreateReportGroupOutput.fromJson(jsonResponse.body);
}