Skip to content

get_revenue_attribution_allocations_task

get_revenue_attribution_allocations_task(
    catalog: CatalogName,
    revenue_attribution_identifier: RevenueAttributionIdentifier,
    *,
    config_overrides: Optional[PartnerCentralRevenueMeasurementClientConfig] = None,
) -> GetRevenueAttributionAllocationsTaskOutput

Retrieves the current status of a previously submitted allocations task. When COMPLETE, includes the latest revision. When FAILED, includes error details.

Parameters:

Raises:

Examples:

Example for GetRevenueAttributionAllocationsTask

>>> client.get_revenue_attribution_allocations_task(catalog='AWS', revenue_attribution_identifier='ra-0a1b2c3d4e5f6')
Source code in docs_src/capo_partnercentral_revenue_measurement/_services/partner_central_revenue_measurement.py
def get_revenue_attribution_allocations_task(
    self,
    catalog: "capo_partnercentral_revenue_measurement.types.catalog_name.CatalogName",
    revenue_attribution_identifier: "capo_partnercentral_revenue_measurement.types.revenue_attribution_identifier.RevenueAttributionIdentifier",
    *,
    config_overrides: Optional[PartnerCentralRevenueMeasurementClientConfig] = None,
) -> "capo_partnercentral_revenue_measurement.types.get_revenue_attribution_allocations_task_output.GetRevenueAttributionAllocationsTaskOutput":
    """<p>Retrieves the current status of a previously submitted allocations task. When COMPLETE, includes the latest revision. When FAILED, includes error details.</p>

    Args:
        catalog: <p>The catalog that contains the resource.</p>
        revenue_attribution_identifier: <p>The revenue attribution identifier.</p>

    Raises:
        capo_partnercentral_revenue_measurement.errors.access_denied_exception.AccessDeniedException: <p>The request was denied due to insufficient permissions.</p>
        capo_partnercentral_revenue_measurement.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry your request.</p>
        capo_partnercentral_revenue_measurement.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_partnercentral_revenue_measurement.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Retry your request.</p>
        capo_partnercentral_revenue_measurement.errors.validation_exception.ValidationException: <p>The request failed validation due to invalid input parameters.</p>
        capo_partnercentral_revenue_measurement.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Example for GetRevenueAttributionAllocationsTask

        >>> client.get_revenue_attribution_allocations_task(catalog='AWS', revenue_attribution_identifier='ra-0a1b2c3d4e5f6')
    """

    def _handler(
        req: "OperationRequest[capo_partnercentral_revenue_measurement.types.get_revenue_attribution_allocations_task_input.GetRevenueAttributionAllocationsTaskInput]",
    ) -> OperationResponse[
        "capo_partnercentral_revenue_measurement.types.get_revenue_attribution_allocations_task_output.GetRevenueAttributionAllocationsTaskOutput"
    ]:
        import capo_partnercentral_revenue_measurement._operations.partner_central_revenue_measurement.get_revenue_attribution_allocations_task

        output, http_response = (
            capo_partnercentral_revenue_measurement._operations.partner_central_revenue_measurement.get_revenue_attribution_allocations_task.get_revenue_attribution_allocations_task(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_partnercentral_revenue_measurement.types.get_revenue_attribution_allocations_task_output.GetRevenueAttributionAllocationsTaskOutput",
    ) -> dict[str, Any]:
        import capo_partnercentral_revenue_measurement.types.get_revenue_attribution_allocations_task_output

        return capo_partnercentral_revenue_measurement.types.get_revenue_attribution_allocations_task_output.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "GetRevenueAttributionAllocationsTask", redact_output=_redact_output
        ),
    )
    input_: capo_partnercentral_revenue_measurement.types.get_revenue_attribution_allocations_task_input.GetRevenueAttributionAllocationsTaskInput = {
        "catalog": catalog,
        "revenue_attribution_identifier": revenue_attribution_identifier,
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output