Skip to content

put_report_definition async

put_report_definition(
    report_id: ReportId,
    report_description: ReportDescription,
    report_frequency: ReportFrequency,
    format: Format,
    destination_s3_location: S3Location,
    *,
    config_overrides: Optional[AsyncApplicationCostProfilerClientConfig] = None,
) -> PutReportDefinitionResult

Creates the report definition for a report in Application Cost Profiler.

Parameters:

  • report_id (ReportId) –

    Required. ID of the report. You can choose any valid string matching the pattern for the ID.

  • report_description (ReportDescription) –

    Required. Description of the report.

  • report_frequency (ReportFrequency) –

    Required. The cadence to generate the report.

  • format (Format) –

    Required. The format to use for the generated report.

  • destination_s3_location (S3Location) –

    Required. Amazon Simple Storage Service (Amazon S3) location where Application Cost Profiler uploads the report.

Raises:

Source code in docs_src/capo_applicationcostprofiler/_services/async_application_cost_profiler.py
async def put_report_definition(
    self,
    report_id: "capo_applicationcostprofiler.types.report_id.ReportId",
    report_description: "capo_applicationcostprofiler.types.report_description.ReportDescription",
    report_frequency: "capo_applicationcostprofiler.types.report_frequency.ReportFrequency",
    format: "capo_applicationcostprofiler.types.format.Format",
    destination_s3_location: "capo_applicationcostprofiler.types.s3_location.S3Location",
    *,
    config_overrides: Optional[AsyncApplicationCostProfilerClientConfig] = None,
) -> "capo_applicationcostprofiler.types.put_report_definition_result.PutReportDefinitionResult":
    """<p>Creates the report definition for a report in Application Cost Profiler.</p>

    Args:
        report_id: <p>Required. ID of the report. You can choose any valid string matching the pattern for the ID.</p>
        report_description: <p>Required. Description of the report.</p>
        report_frequency: <p>Required. The cadence to generate the report.</p>
        format: <p>Required. The format to use for the generated report.</p>
        destination_s3_location: <p>Required. Amazon Simple Storage Service (Amazon S3) location where Application Cost Profiler uploads the report.</p>

    Raises:
        capo_applicationcostprofiler.errors.access_denied_exception.AccessDeniedException: <p>You do not have permission to perform this action.</p>
        capo_applicationcostprofiler.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry your request.</p>
        capo_applicationcostprofiler.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>Your request exceeds one or more of the service quotas.</p>
        capo_applicationcostprofiler.errors.throttling_exception.ThrottlingException: <p>The calls to AWS Application Cost Profiler API are throttled. The request was denied.</p>
        capo_applicationcostprofiler.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints for the API.</p>
        capo_applicationcostprofiler.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_applicationcostprofiler.types.put_report_definition_request.PutReportDefinitionRequest]",
    ) -> AsyncOperationResponse[
        "capo_applicationcostprofiler.types.put_report_definition_result.PutReportDefinitionResult"
    ]:
        import capo_applicationcostprofiler._operations.aws_application_cost_profiler.put_report_definition

        (
            output,
            http_response,
        ) = await capo_applicationcostprofiler._operations.aws_application_cost_profiler.put_report_definition.async_put_report_definition(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("PutReportDefinition")
    )
    input_: capo_applicationcostprofiler.types.put_report_definition_request.PutReportDefinitionRequest = {
        "report_id": report_id,
        "report_description": report_description,
        "report_frequency": report_frequency,
        "format": format,
        "destination_s3_location": destination_s3_location,
    }

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