Skip to content

create_marketplace_revenue_share_allocation

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

Creates a new allocation under the specified marketplace revenue share.

Parameters:

  • catalog (CatalogName) –

    The catalog in which to create the allocation.

  • marketplace_revenue_share_identifier (Optional[MarketplaceRevenueShareIdentifier], default: None ) –

    The parent marketplace revenue share, by ID (mrs-...) or ARN.

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

    A unique token to ensure idempotency of the create request.

  • marketplace_revenue_share_revision (Optional[RevisionToken], default: None ) –

    The revision of the parent marketplace revenue share that the caller last read, for optimistic concurrency control. A stale value returns ConflictException with Reason REVISION_MISMATCH.

  • effective_from (AllocationEffectiveDateString) –

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

  • effective_until (AllocationEffectiveDateString) –

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

  • revenue_share_percent (RevenueSharePercent) –

    The revenue share percentage for this allocation.

Raises:

Examples:

Example for CreateMarketplaceRevenueShareAllocation

>>> client.create_marketplace_revenue_share_allocation(catalog='AWS', marketplace_revenue_share_identifier='mrs-abc123def4567', marketplace_revenue_share_revision='1', effective_from='2026-07-01', effective_until='2026-12-31', 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",
    effective_from: "capo_partnercentral_revenue_measurement.types.allocation_effective_date_string.AllocationEffectiveDateString",
    effective_until: "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,
    marketplace_revenue_share_identifier: Optional[
        "capo_partnercentral_revenue_measurement.types.marketplace_revenue_share_identifier.MarketplaceRevenueShareIdentifier"
    ] = None,
    client_token: Optional[
        "capo_partnercentral_revenue_measurement.types.client_token.ClientToken"
    ] = None,
    marketplace_revenue_share_revision: Optional[
        "capo_partnercentral_revenue_measurement.types.revision_token.RevisionToken"
    ] = None,
) -> "capo_partnercentral_revenue_measurement.types.create_marketplace_revenue_share_allocation_output.CreateMarketplaceRevenueShareAllocationOutput":
    """<p>Creates a new allocation under the specified marketplace revenue share.</p>

    Args:
        catalog: <p>The catalog in which to create the allocation.</p>
        marketplace_revenue_share_identifier: <p>The parent marketplace revenue share, by ID (mrs-...) or ARN.</p>
        client_token: <p>A unique token to ensure idempotency of the create request.</p>
        marketplace_revenue_share_revision: <p>The revision of the parent marketplace revenue share that the caller last read, for optimistic concurrency control. A stale value returns ConflictException with Reason REVISION_MISMATCH.</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).</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.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed a service quota limit.</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', marketplace_revenue_share_identifier='mrs-abc123def4567', marketplace_revenue_share_revision='1', effective_from='2026-07-01', effective_until='2026-12-31', 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,
        "effective_from": effective_from,
        "effective_until": effective_until,
        "revenue_share_percent": revenue_share_percent,
    }
    if marketplace_revenue_share_identifier is not None:
        input_["marketplace_revenue_share_identifier"] = (
            marketplace_revenue_share_identifier
        )
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if marketplace_revenue_share_revision is not None:
        input_["marketplace_revenue_share_revision"] = (
            marketplace_revenue_share_revision
        )

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