Deletes a report group. Before you delete a report group, you must delete its reports.
Parameters:
-
arn
(NonEmptyString)
–
The ARN of the report group to delete.
-
delete_reports
(Optional[Boolean], default:
None
)
–
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.
Raises:
Source code in docs_src/capo_codebuild/_services/code_build.py
| def delete_report_group(
self,
arn: "capo_codebuild.types.non_empty_string.NonEmptyString",
*,
config_overrides: Optional[CodeBuildClientConfig] = None,
delete_reports: Optional["capo_codebuild.types.boolean.Boolean"] = None,
) -> "capo_codebuild.types.delete_report_group_output.DeleteReportGroupOutput":
"""<p>Deletes a report group. Before you delete a report group, you must delete its reports. </p>
Args:
arn: <p>The ARN of the report group to delete. </p>
delete_reports: <p>If <code>true</code>, deletes any reports that belong to a report group before deleting the report group. </p> <p>If <code>false</code>, you must delete any reports in the report group. Use <a href="https://docs.aws.amazon.com/codebuild/latest/APIReference/API_ListReportsForReportGroup.html">ListReportsForReportGroup</a> to get the reports in a report group. Use <a href="https://docs.aws.amazon.com/codebuild/latest/APIReference/API_DeleteReport.html">DeleteReport</a> to delete the reports. If you call <code>DeleteReportGroup</code> for a report group that contains one or more reports, an exception is thrown. </p>
Raises:
capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_codebuild.types.delete_report_group_input.DeleteReportGroupInput]",
) -> OperationResponse[
"capo_codebuild.types.delete_report_group_output.DeleteReportGroupOutput"
]:
import capo_codebuild._operations.code_build_20161006.delete_report_group
output, http_response = (
capo_codebuild._operations.code_build_20161006.delete_report_group.delete_report_group(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteReportGroup")
)
input_: capo_codebuild.types.delete_report_group_input.DeleteReportGroupInput = {
"arn": arn
}
if delete_reports is not None:
input_["delete_reports"] = delete_reports
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|