AppMonetization / Client / create_app

create_app

AppMonetization.Client.create_app(**kwargs)

Creates an app. AWS App Monetization assigns a unique app identifier. This operation is idempotent: a repeated request with the same clientToken returns the app created by the original request.

See also: AWS API Documentation

Request Syntax

response = client.create_app(
    name='string',
    description='string',
    clientToken='string',
    tags={
        'string': 'string'
    },
    costTracking={
        'roleArn': 'string'
    }
)
Parameters:
  • name (string) –

    [REQUIRED]

    A human-readable display name for the app.

  • description (string) – A longer description of what the app does.

  • 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 app when it is created. To add tags when you create the app, you must also have 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.

  • costTracking (dict) –

    Optional cost-tracking configuration: the IAM role AWS App Monetization uses to track this app’s AWS costs. To pass a role, you must have permission for iam:PassRole on it.

    • roleArn (string) – [REQUIRED]

      The ARN of an IAM role that AWS App Monetization assumes in your account to create and manage the AWS Data Exports export for this app. The role must be in your account and partition, and its name (after any path) must start with AppMonetizationCostTracking. You need iam:PassRole on it. Its trust policy must allow appmonetization.amazonaws.com to assume it, with conditions that pin aws:SourceAccount to your account ID and aws:SourceArn to your account’s apps (arn:aws:appmonetization:::apps/*). The setup runs in the background after the call returns, and cost data starts arriving within 24-48 hours. Calling UpdateApp with a role again re-runs the setup. A CreateApp retry with the same clientToken must carry the same role: a different role, or a role added or dropped, fails with IdempotencyConflictException.

Return type:

dict

Returns:

Response Syntax

{
    'app': {
        'appId': 'string',
        'name': 'string',
        'description': 'string',
        'status': 'ACTIVE'|'DELETED',
        'createdAt': datetime(2015, 1, 1),
        'arn': 'string'
    }
}

Response Structure

  • (dict) –

    Output for CreateApp.

    • app (dict) –

      The created app, carrying its service-assigned appId and initial status. On an idempotent replay with the same clientToken, this is the app the original call created.

      • appId (string) –

        The service-assigned identifier for the app.

      • name (string) –

        A human-readable display name for the app.

      • description (string) –

        A longer description of what the app does.

      • status (string) –

        The lifecycle status of the app.

      • createdAt (datetime) –

        The time the app was created.

      • arn (string) –

        The resource ARN of this app.

Exceptions

  • AppMonetization.Client.exceptions.AccessDeniedException

  • AppMonetization.Client.exceptions.ValidationException

  • AppMonetization.Client.exceptions.ConflictException

  • AppMonetization.Client.exceptions.IdempotencyConflictException

  • AppMonetization.Client.exceptions.InternalServerException

  • AppMonetization.Client.exceptions.ServiceQuotaExceededException

  • AppMonetization.Client.exceptions.ThrottlingException