Skip to content

get_revenue_attribution_allocation async

get_revenue_attribution_allocation(
    catalog: CatalogName,
    revenue_attribution_identifier: RevenueAttributionIdentifier,
    revenue_attribution_allocation_id: RevenueAttributionAllocationId,
    *,
    config_overrides: Optional[
        AsyncPartnerCentralRevenueMeasurementClientConfig
    ] = None,
    revenue_attribution_revision: Optional[RevisionToken] = None,
) -> GetRevenueAttributionAllocationOutput

Retrieves a single allocation by its RevenueAttributionAllocationId. Supports optional point-in-time version queries.

Parameters:

Raises:

Examples:

Example for GetRevenueAttributionAllocation

>>> await client.get_revenue_attribution_allocation(catalog='AWS', revenue_attribution_identifier='ra-0a1b2c3d4e5f6', revenue_attribution_allocation_id='alloc-abc123def4567')
Source code in docs_src/capo_partnercentral_revenue_measurement/_services/async_partner_central_revenue_measurement.py
async def get_revenue_attribution_allocation(
    self,
    catalog: "capo_partnercentral_revenue_measurement.types.catalog_name.CatalogName",
    revenue_attribution_identifier: "capo_partnercentral_revenue_measurement.types.revenue_attribution_identifier.RevenueAttributionIdentifier",
    revenue_attribution_allocation_id: "capo_partnercentral_revenue_measurement.types.revenue_attribution_allocation_id.RevenueAttributionAllocationId",
    *,
    config_overrides: Optional[
        AsyncPartnerCentralRevenueMeasurementClientConfig
    ] = None,
    revenue_attribution_revision: Optional[
        "capo_partnercentral_revenue_measurement.types.revision_token.RevisionToken"
    ] = None,
) -> "capo_partnercentral_revenue_measurement.types.get_revenue_attribution_allocation_output.GetRevenueAttributionAllocationOutput":
    """<p>Retrieves a single allocation by its RevenueAttributionAllocationId. Supports optional point-in-time version queries.</p>

    Args:
        catalog: <p>The catalog that contains the resource.</p>
        revenue_attribution_identifier: <p>The revenue attribution identifier.</p>
        revenue_attribution_allocation_id: <p>The allocation identifier.</p>
        revenue_attribution_revision: <p>Point-in-time revision number to query.</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 GetRevenueAttributionAllocation

        >>> await client.get_revenue_attribution_allocation(catalog='AWS', revenue_attribution_identifier='ra-0a1b2c3d4e5f6', revenue_attribution_allocation_id='alloc-abc123def4567')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_partnercentral_revenue_measurement.types.get_revenue_attribution_allocation_input.GetRevenueAttributionAllocationInput]",
    ) -> AsyncOperationResponse[
        "capo_partnercentral_revenue_measurement.types.get_revenue_attribution_allocation_output.GetRevenueAttributionAllocationOutput"
    ]:
        import capo_partnercentral_revenue_measurement._operations.partner_central_revenue_measurement.get_revenue_attribution_allocation

        (
            output,
            http_response,
        ) = await capo_partnercentral_revenue_measurement._operations.partner_central_revenue_measurement.get_revenue_attribution_allocation.async_get_revenue_attribution_allocation(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

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

        return capo_partnercentral_revenue_measurement.types.get_revenue_attribution_allocation_output.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "GetRevenueAttributionAllocation", redact_output=_redact_output
        ),
    )
    input_: capo_partnercentral_revenue_measurement.types.get_revenue_attribution_allocation_input.GetRevenueAttributionAllocationInput = {
        "catalog": catalog,
        "revenue_attribution_identifier": revenue_attribution_identifier,
        "revenue_attribution_allocation_id": revenue_attribution_allocation_id,
    }
    if revenue_attribution_revision is not None:
        input_["revenue_attribution_revision"] = revenue_attribution_revision

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