AmplifyGen3 / Client / list_plan_violations

list_plan_violations

AmplifyGen3.Client.list_plan_violations(**kwargs)

List the violations preventing an account to change flat rate plans. An empty list means the account already fits the target plan. If you allow the ListPlanViolations permission for your account, any requestor can see all project names that violate a downgrade from all Regions.

See also: AWS API Documentation

Request Syntax

response = client.list_plan_violations(
    TargetPlan='BASIC'|'PRO',
    MaxResults=123,
    NextToken='string'
)
Parameters:
  • TargetPlan (string) –

    [REQUIRED]

    The plan to check the account’s resources against.

  • MaxResults (integer) – The maximum number of violations to return in one page.

  • NextToken (string) – A pagination token returned from a previous request.

Return type:

dict

Returns:

Response Syntax

{
    'Violations': [
        {
            'Code': 'APP_LIMIT'|'ENVIRONMENT_LIMIT'|'BACKEND_LIMIT'|'BRANCH_LIMIT'|'BRANCH_STORAGE_LIMIT'|'DATABASE_MAX_CAPACITY_LIMIT'|'DATABASE_BACKUP_RETENTION_LIMIT'|'GRADUAL_DEPLOY'|'VPC_BINDING'|'OIDC',
            'Message': 'string',
            'RegionLimits': [
                {
                    'Region': 'string',
                    'Current': 123,
                    'TargetLimit': 123
                },
            ],
            'AppLimits': [
                {
                    'Arn': 'string',
                    'Region': 'string',
                    'Current': 123,
                    'TargetLimit': 123
                },
            ],
            'Resources': [
                {
                    'Arn': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • Violations (list) –

      The reasons the account’s resources do not fit the target plan. Empty when the account fits the target plan

      • (dict) –

        One reason an account’s resources do not fit a target plan.

        • Code (string) –

          The code that identifies the type of violation.

        • Message (string) –

          A human-readable description of the violation.

        • RegionLimits (list) –

          The per-Region breakdown for a limit that the account exceeds under the target plan.

          • (dict) –

            A Region where the account’s usage of a limit exceeds the target plan’s limit.

            • Region (string) –

              The AWS Region.

            • Current (integer) –

              The account’s current usage in the Region.

            • TargetLimit (integer) –

              The target plan’s limit for the Region.

        • AppLimits (list) –

          The per-app breakdown for a per-app limit that apps exceed under the target plan.

          • (dict) –

            An app whose usage of a per-app limit exceeds the target plan’s limit.

            • Arn (string) –

              The Amazon Resource Name (ARN) of the app.

            • Region (string) –

              The AWS Region of the app.

            • Current (integer) –

              The app’s current usage.

            • TargetLimit (integer) –

              The target plan’s limit for each app.

        • Resources (list) –

          The resources the target plan does not support.

          • (dict) –

            A resource the target plan does not support.

            • Arn (string) –

              The Amazon Resource Name (ARN) of the resource.

    • NextToken (string) –

      A pagination token to retrieve the next page of results. Absent on the last page.

Exceptions