createReportGroup method
Future<CreateReportGroupOutput>
createReportGroup({
- required ReportExportConfig exportConfig,
- required String name,
- required ReportType type,
- List<
Tag> ? tags,
Creates a report group. A report group contains a collection of reports.
May throw InvalidInputException. May throw ResourceAlreadyExistsException. May throw AccountLimitExceededException.
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 AWS services that support AWS CodeBuild report group tags.
Implementation
Future<CreateReportGroupOutput> createReportGroup({
required ReportExportConfig exportConfig,
required String name,
required ReportType type,
List<Tag>? tags,
}) async {
ArgumentError.checkNotNull(exportConfig, 'exportConfig');
ArgumentError.checkNotNull(name, 'name');
_s.validateStringLength(
'name',
name,
2,
128,
isRequired: true,
);
ArgumentError.checkNotNull(type, 'type');
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.toValue(),
if (tags != null) 'tags': tags,
},
);
return CreateReportGroupOutput.fromJson(jsonResponse.body);
}