deleteReportGroup method
Deletes a report group. Before you delete a report group, you must delete its reports.
May throw InvalidInputException.
Parameter arn
:
The ARN of the report group to delete.
Parameter deleteReports
:
If true
, deletes any reports that belong to a report group
before deleting the report group.
If false
, you must delete any reports in the report group.
Use ListReportsForReportGroup
to get the reports in a report group. Use DeleteReport
to delete the reports. If you call DeleteReportGroup
for a
report group that contains one or more reports, an exception is thrown.
Implementation
Future<void> deleteReportGroup({
required String arn,
bool? deleteReports,
}) async {
ArgumentError.checkNotNull(arn, 'arn');
_s.validateStringLength(
'arn',
arn,
1,
1152921504606846976,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'CodeBuild_20161006.DeleteReportGroup'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'arn': arn,
if (deleteReports != null) 'deleteReports': deleteReports,
},
);
}