Skip to content

update_marketplace_revenue_share_allocation async

update_marketplace_revenue_share_allocation(
    catalog: CatalogName,
    product_id: MarketplaceProductId,
    marketplace_revenue_share_allocation_id: MarketplaceRevenueShareAllocationId,
    marketplace_revenue_share_revision: RevisionToken,
    *,
    config_overrides: Optional[
        AsyncPartnerCentralRevenueMeasurementClientConfig
    ] = None,
    client_token: Optional[ClientToken] = None,
    effective_from: Optional[AllocationEffectiveDateString] = None,
    effective_until: Optional[AllocationEffectiveDateString] = None,
    revenue_share_percent: Optional[RevenueSharePercent] = None,
    status: Optional[AllocationStatus] = None,
) -> UpdateMarketplaceRevenueShareAllocationOutput

Updates an existing marketplace revenue share allocation. Supports modifying effective dates, revenue share percentage, and status with time-based mutability rules.

Parameters:

  • catalog (CatalogName) –

    The catalog containing the allocation.

  • product_id (MarketplaceProductId) –

    The AWS Marketplace product identifier for the parent revenue share.

  • marketplace_revenue_share_allocation_id (MarketplaceRevenueShareAllocationId) –

    The identifier of the allocation to update.

  • marketplace_revenue_share_revision (RevisionToken) –

    The current revision of the parent share. Must match for optimistic concurrency control.

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

    A unique token to ensure idempotency of the update request.

  • effective_from (Optional[AllocationEffectiveDateString], default: None ) –

    The new effective start date. Must be the first day of a month. Only modifiable on future-dated allocations.

  • effective_until (Optional[AllocationEffectiveDateString], default: None ) –

    The new effective end date. Must be the last day of a month and on or after today.

  • revenue_share_percent (Optional[RevenueSharePercent], default: None ) –

    The new revenue share percentage. Only modifiable on future-dated allocations.

  • status (Optional[AllocationStatus], default: None ) –

    The new status. Set to INACTIVE for soft-delete. Only modifiable on future-dated allocations.

Raises:

Examples:

Example for UpdateMarketplaceRevenueShareAllocation

>>> await client.update_marketplace_revenue_share_allocation(catalog='AWS', product_id='prod-abc123def4567', marketplace_revenue_share_allocation_id='mrsa-abc123def4567', marketplace_revenue_share_revision='1', revenue_share_percent='20.00')
Source code in docs_src/capo_partnercentral_revenue_measurement/_services/async_partner_central_revenue_measurement.py
async def update_marketplace_revenue_share_allocation(
    self,
    catalog: "capo_partnercentral_revenue_measurement.types.catalog_name.CatalogName",
    product_id: "capo_partnercentral_revenue_measurement.types.marketplace_product_id.MarketplaceProductId",
    marketplace_revenue_share_allocation_id: "capo_partnercentral_revenue_measurement.types.marketplace_revenue_share_allocation_id.MarketplaceRevenueShareAllocationId",
    marketplace_revenue_share_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,
    effective_from: Optional[
        "capo_partnercentral_revenue_measurement.types.allocation_effective_date_string.AllocationEffectiveDateString"
    ] = None,
    effective_until: Optional[
        "capo_partnercentral_revenue_measurement.types.allocation_effective_date_string.AllocationEffectiveDateString"
    ] = None,
    revenue_share_percent: Optional[
        "capo_partnercentral_revenue_measurement.types.revenue_share_percent.RevenueSharePercent"
    ] = None,
    status: Optional[
        "capo_partnercentral_revenue_measurement.types.allocation_status.AllocationStatus"
    ] = None,
) -> "capo_partnercentral_revenue_measurement.types.update_marketplace_revenue_share_allocation_output.UpdateMarketplaceRevenueShareAllocationOutput":
    """<p>Updates an existing marketplace revenue share allocation. Supports modifying effective dates, revenue share percentage, and status with time-based mutability rules.</p>

    Args:
        catalog: <p>The catalog containing the allocation.</p>
        product_id: <p>The AWS Marketplace product identifier for the parent revenue share.</p>
        marketplace_revenue_share_allocation_id: <p>The identifier of the allocation to update.</p>
        marketplace_revenue_share_revision: <p>The current revision of the parent share. Must match for optimistic concurrency control.</p>
        client_token: <p>A unique token to ensure idempotency of the update request.</p>
        effective_from: <p>The new effective start date. Must be the first day of a month. Only modifiable on future-dated allocations.</p>
        effective_until: <p>The new effective end date. Must be the last day of a month and on or after today.</p>
        revenue_share_percent: <p>The new revenue share percentage. Only modifiable on future-dated allocations.</p>
        status: <p>The new status. Set to INACTIVE for soft-delete. Only modifiable on future-dated allocations.</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 UpdateMarketplaceRevenueShareAllocation

        >>> await client.update_marketplace_revenue_share_allocation(catalog='AWS', product_id='prod-abc123def4567', marketplace_revenue_share_allocation_id='mrsa-abc123def4567', marketplace_revenue_share_revision='1', revenue_share_percent='20.00')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_partnercentral_revenue_measurement.types.update_marketplace_revenue_share_allocation_input.UpdateMarketplaceRevenueShareAllocationInput]",
    ) -> AsyncOperationResponse[
        "capo_partnercentral_revenue_measurement.types.update_marketplace_revenue_share_allocation_output.UpdateMarketplaceRevenueShareAllocationOutput"
    ]:
        import capo_partnercentral_revenue_measurement._operations.partner_central_revenue_measurement.update_marketplace_revenue_share_allocation

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

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("UpdateMarketplaceRevenueShareAllocation"),
    )
    input_: capo_partnercentral_revenue_measurement.types.update_marketplace_revenue_share_allocation_input.UpdateMarketplaceRevenueShareAllocationInput = {
        "catalog": catalog,
        "product_id": product_id,
        "marketplace_revenue_share_allocation_id": marketplace_revenue_share_allocation_id,
        "marketplace_revenue_share_revision": marketplace_revenue_share_revision,
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if effective_from is not None:
        input_["effective_from"] = effective_from
    if effective_until is not None:
        input_["effective_until"] = effective_until
    if revenue_share_percent is not None:
        input_["revenue_share_percent"] = revenue_share_percent
    if status is not None:
        input_["status"] = status

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