AppMonetization / Client / create_one_time_price

create_one_time_price

AppMonetization.Client.create_one_time_price(**kwargs)

Creates a one-time price for an app. The one-time price exists on the draft (DRAFT) offering until published.

See also: AWS API Documentation

Request Syntax

response = client.create_one_time_price(
    appId='string',
    definition={
        'name': 'string',
        'price': {
            'currencyCode': 'string',
            'amount': 'string'
        },
        'metricId': 'string',
        'capacity': 123
    },
    clientToken='string',
    tags={
        'string': 'string'
    }
)
Parameters:
  • appId (string) –

    [REQUIRED]

    The ID of the app the one-time price belongs to.

  • definition (dict) –

    [REQUIRED]

    The definition of the one-time price to create, including its display name, price, metric, and credited capacity.

    • name (string) – [REQUIRED]

      A human-readable display name for the one-time price.

    • price (dict) – [REQUIRED]

      The amount and currency charged for one purchase of the one-time price.

      • currencyCode (string) – [REQUIRED]

        The ISO 4217 currency code (three uppercase letters, for example, “USD”).

      • amount (string) – [REQUIRED]

        An arbitrary-precision decimal represented as a string (for example, “9.99”).

    • metricId (string) – [REQUIRED]

      The metric one purchase credits.

    • capacity (integer) – [REQUIRED]

      The units of metricId one purchase credits.

  • clientToken (string) –

    A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, the service ignores the request but does not return an error.

    This field is autopopulated if not provided.

  • tags (dict) –

    Optional tags to add to the one-time price when it is created. Tagging on create also requires permission for appmonetization:TagResource.

    • (string) –

      A tag key. Keys that begin with aws: (in any letter case) are reserved and rejected.

      • (string) –

        A tag value.

Return type:

dict

Returns:

Response Syntax

{
    'oneTimePrice': {
        'arn': 'string',
        'appId': 'string',
        'oneTimePriceId': 'string',
        'definition': {
            'name': 'string',
            'price': {
                'currencyCode': 'string',
                'amount': 'string'
            },
            'metricId': 'string',
            'capacity': 123
        },
        'stage': 'DRAFT'|'PUBLISHED'
    }
}

Response Structure

  • (dict) –

    Output for CreateOneTimePrice.

    • oneTimePrice (dict) –

      The newly created one-time price.

      • arn (string) –

        The Amazon Resource Name (ARN) of the one-time price.

      • appId (string) –

        The ID of the app the one-time price belongs to.

      • oneTimePriceId (string) –

        The service-assigned ID of the one-time price.

      • definition (dict) –

        The definition of the one-time price, including its display name, price, metric, and credited capacity.

        • name (string) –

          A human-readable display name for the one-time price.

        • price (dict) –

          The amount and currency charged for one purchase of the one-time price.

          • currencyCode (string) –

            The ISO 4217 currency code (three uppercase letters, for example, “USD”).

          • amount (string) –

            An arbitrary-precision decimal represented as a string (for example, “9.99”).

        • metricId (string) –

          The metric one purchase credits.

        • capacity (integer) –

          The units of metricId one purchase credits.

      • stage (string) –

        The offering stage the one-time price was read from.

Exceptions