Skip to content

create_report_group async

create_report_group(
    name: ReportGroupName,
    type: ReportType,
    export_config: ReportExportConfig,
    *,
    config_overrides: Optional[AsyncCodeBuildClientConfig] = None,
    tags: Optional[TagList] = None,
) -> CreateReportGroupOutput

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

Parameters:

  • name (ReportGroupName) –

    The name of the report group.

  • type (ReportType) –

    The type of report group.

  • export_config (ReportExportConfig) –

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

  • tags (Optional[TagList], default: None ) –

    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.

Raises:

Source code in docs_src/capo_codebuild/_services/async_code_build.py
async def create_report_group(
    self,
    name: "capo_codebuild.types.report_group_name.ReportGroupName",
    type: "capo_codebuild.types.report_type.ReportType",
    export_config: "capo_codebuild.types.report_export_config.ReportExportConfig",
    *,
    config_overrides: Optional[AsyncCodeBuildClientConfig] = None,
    tags: Optional["capo_codebuild.types.tag_list.TagList"] = None,
) -> "capo_codebuild.types.create_report_group_output.CreateReportGroupOutput":
    """<p> Creates a report group. A report group contains a collection of reports. </p>

    Args:
        name: <p> The name of the report group. </p>
        type: <p> The type of report group. </p>
        export_config: <p> A <code>ReportExportConfig</code> object that contains information about where the report group test results are exported. </p>
        tags: <p> A list of tag key and value pairs associated with this report group. </p> <p>These tags are available for use by Amazon Web Services services that support CodeBuild report group tags.</p>

    Raises:
        capo_codebuild.errors.account_limit_exceeded_exception.AccountLimitExceededException: <p>An Amazon Web Services service limit was exceeded for the calling Amazon Web Services account.</p>
        capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
        capo_codebuild.errors.resource_already_exists_exception.ResourceAlreadyExistsException: <p>The specified Amazon Web Services resource cannot be created, because an Amazon Web Services resource with the same settings already exists.</p>
        capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_codebuild.types.create_report_group_input.CreateReportGroupInput]",
    ) -> AsyncOperationResponse[
        "capo_codebuild.types.create_report_group_output.CreateReportGroupOutput"
    ]:
        import capo_codebuild._operations.code_build_20161006.create_report_group

        (
            output,
            http_response,
        ) = await capo_codebuild._operations.code_build_20161006.create_report_group.async_create_report_group(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateReportGroup")
    )
    input_: capo_codebuild.types.create_report_group_input.CreateReportGroupInput = {
        "name": name,
        "type": type,
        "export_config": export_config,
    }
    if tags is not None:
        input_["tags"] = tags

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output