Skip to content

update_revenue_attribution async

update_revenue_attribution(
    catalog: CatalogName,
    identifier: RevenueAttributionIdentifier,
    revision: RevisionToken,
    *,
    config_overrides: Optional[
        AsyncPartnerCentralRevenueMeasurementClientConfig
    ] = None,
    client_token: Optional[ClientToken] = None,
    description: Optional[str] = None,
) -> UpdateRevenueAttributionOutput

Updates an existing revenue attribution record.

Parameters:

  • catalog (CatalogName) –

    The catalog that the revenue attribution belongs to.

  • identifier (RevenueAttributionIdentifier) –

    The unique identifier of the revenue attribution to update. Accepts a direct ID or ARN.

  • client_token (Optional[ClientToken], default: None ) –

    A unique token to ensure idempotency of the update request.

  • description (Optional[str], default: None ) –

    The updated description of the revenue attribution.

  • revision (RevisionToken) –

    The current revision of the revenue attribution. Must match the server's current value.

Raises:

Examples:

Example for UpdateRevenueAttribution

>>> await client.update_revenue_attribution(catalog='AWS', identifier='ra-0a1b2c3d4e5f6', revision='1')
Source code in docs_src/capo_partnercentral_revenue_measurement/_services/async_partner_central_revenue_measurement.py
async def update_revenue_attribution(
    self,
    catalog: "capo_partnercentral_revenue_measurement.types.catalog_name.CatalogName",
    identifier: "capo_partnercentral_revenue_measurement.types.revenue_attribution_identifier.RevenueAttributionIdentifier",
    revision: "capo_partnercentral_revenue_measurement.types.revision_token.RevisionToken",
    *,
    config_overrides: Optional[
        AsyncPartnerCentralRevenueMeasurementClientConfig
    ] = None,
    client_token: Optional[
        "capo_partnercentral_revenue_measurement.types.client_token.ClientToken"
    ] = None,
    description: Optional[str] = None,
) -> "capo_partnercentral_revenue_measurement.types.update_revenue_attribution_output.UpdateRevenueAttributionOutput":
    """<p>Updates an existing revenue attribution record.</p>

    Args:
        catalog: <p>The catalog that the revenue attribution belongs to.</p>
        identifier: <p>The unique identifier of the revenue attribution to update. Accepts a direct ID or ARN.</p>
        client_token: <p>A unique token to ensure idempotency of the update request.</p>
        description: <p>The updated description of the revenue attribution.</p>
        revision: <p>The current revision of the revenue attribution. Must match the server's current value.</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.conflict_exception.ConflictException: <p>The request could not be completed due to a conflict with the current state of the resource.</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 UpdateRevenueAttribution

        >>> await client.update_revenue_attribution(catalog='AWS', identifier='ra-0a1b2c3d4e5f6', revision='1')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_partnercentral_revenue_measurement.types.update_revenue_attribution_input.UpdateRevenueAttributionInput]",
    ) -> AsyncOperationResponse[
        "capo_partnercentral_revenue_measurement.types.update_revenue_attribution_output.UpdateRevenueAttributionOutput"
    ]:
        import capo_partnercentral_revenue_measurement._operations.partner_central_revenue_measurement.update_revenue_attribution

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateRevenueAttribution")
    )
    input_: capo_partnercentral_revenue_measurement.types.update_revenue_attribution_input.UpdateRevenueAttributionInput = {
        "catalog": catalog,
        "identifier": identifier,
        "revision": revision,
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if description is not None:
        input_["description"] = description

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