Skip to content

create_marketplace_revenue_share_allocation

create_marketplace_revenue_share_allocation(
    catalog: CatalogName,
    product_id: MarketplaceProductId,
    effective_from: AllocationEffectiveDateString,
    revenue_share_percent: RevenueSharePercent,
    *,
    config_overrides: Optional[PartnerCentralRevenueMeasurementClientConfig] = None,
    client_token: Optional[ClientToken] = None,
    effective_until: Optional[AllocationEffectiveDateString] = None,
) -> CreateMarketplaceRevenueShareAllocationOutput

Creates a new marketplace revenue share allocation for the specified product.

Parameters:

  • catalog (CatalogName) –

    The catalog in which to create the allocation.

  • product_id (MarketplaceProductId) –

    The AWS Marketplace product identifier for the parent revenue share.

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

    A unique token to ensure idempotency of the create request.

  • effective_from (AllocationEffectiveDateString) –

    The effective start date for the allocation. Must be the first day of a month.

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

    The effective end date for the allocation. Must be the last day of a month (YYYY-MM-DD). Omit for open-ended allocations.

  • revenue_share_percent (RevenueSharePercent) –

    The revenue share percentage for this allocation.

Raises:

Examples:

Example for CreateMarketplaceRevenueShareAllocation

>>> client.create_marketplace_revenue_share_allocation(catalog='AWS', product_id='prod-abc123def4567', effective_from='2026-07-01', revenue_share_percent='15.50')
Source code in docs_src/capo_partnercentral_revenue_measurement/_services/partner_central_revenue_measurement.py
def create_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",
    effective_from: "capo_partnercentral_revenue_measurement.types.allocation_effective_date_string.AllocationEffectiveDateString",
    revenue_share_percent: "capo_partnercentral_revenue_measurement.types.revenue_share_percent.RevenueSharePercent",
    *,
    config_overrides: Optional[PartnerCentralRevenueMeasurementClientConfig] = None,
    client_token: Optional[
        "capo_partnercentral_revenue_measurement.types.client_token.ClientToken"
    ] = None,
    effective_until: Optional[
        "capo_partnercentral_revenue_measurement.types.allocation_effective_date_string.AllocationEffectiveDateString"
    ] = None,
) -> "capo_partnercentral_revenue_measurement.types.create_marketplace_revenue_share_allocation_output.CreateMarketplaceRevenueShareAllocationOutput":
    """<p>Creates a new marketplace revenue share allocation for the specified product.</p>

    Args:
        catalog: <p>The catalog in which to create the allocation.</p>
        product_id: <p>The AWS Marketplace product identifier for the parent revenue share.</p>
        client_token: <p>A unique token to ensure idempotency of the create request.</p>
        effective_from: <p>The effective start date for the allocation. Must be the first day of a month.</p>
        effective_until: <p>The effective end date for the allocation. Must be the last day of a month (YYYY-MM-DD). Omit for open-ended allocations.</p>
        revenue_share_percent: <p>The revenue share percentage for this allocation.</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 CreateMarketplaceRevenueShareAllocation

        >>> client.create_marketplace_revenue_share_allocation(catalog='AWS', product_id='prod-abc123def4567', effective_from='2026-07-01', revenue_share_percent='15.50')
    """

    def _handler(
        req: "OperationRequest[capo_partnercentral_revenue_measurement.types.create_marketplace_revenue_share_allocation_input.CreateMarketplaceRevenueShareAllocationInput]",
    ) -> OperationResponse[
        "capo_partnercentral_revenue_measurement.types.create_marketplace_revenue_share_allocation_output.CreateMarketplaceRevenueShareAllocationOutput"
    ]:
        import capo_partnercentral_revenue_measurement._operations.partner_central_revenue_measurement.create_marketplace_revenue_share_allocation

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

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("CreateMarketplaceRevenueShareAllocation"),
    )
    input_: capo_partnercentral_revenue_measurement.types.create_marketplace_revenue_share_allocation_input.CreateMarketplaceRevenueShareAllocationInput = {
        "catalog": catalog,
        "product_id": product_id,
        "effective_from": effective_from,
        "revenue_share_percent": revenue_share_percent,
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if effective_until is not None:
        input_["effective_until"] = effective_until

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