Managing Quota Policies

The following describes how to manage quota policies using the Console and the command line.

Using the Console

The following instructions describe how to create, edit, or delete quotas. Also see Sample Quotas for a listing of example quota policies, and Quota Policy Quick Start for more information on how you can quickly create a quota policy for any resource.

To create a quota
  1. Open the navigation menu and click Governance & Administration. Under Tenancy Management, click Quota Policies.
  2. On the Quota Policies screen, click Create Quota.

  3. Enter the following:

    • Enter a name for your quota in the Name field.

      Avoid entering confidential information.

    • Enter a description for your quota in the Description field.

    • Enter a quota policy string in the Quota Policy field.

  4. Click Create Quota Policy.
Note

New policies can take up to 10 minutes to start working.
To edit a quota
  1. On the Quota Policies screen, click the quota you want to edit to display the quota policy details page, then click the Edit Quota button.

  2. Edit the quota.

  3. Click Save Changes.
To delete a quota
  1. You can delete a quota from the console using the following two methods:

    • On the main Quota Policies page, click the context menu to the right of the quota you want to delete, then select Delete.
    • Click the quota you want to delete, then from the quota policy detail page click Delete.
  2. From the Confirm Delete dialog, click Delete, or Cancel.

Using the CLI

Prerequisites:

For detailed CLI documentation, see CLI for Quotas.

Create a quota policy that disallows use of outbound email or notification for the tenancy
oci --profile=<profile-name in oci config file> limits quota create --compartment-id <compartment id> --name <name for quota policy> --description "some quota" --statements file:///users/sme/statements.json

Where statements.json is the following:

[
"Zero email-delivery quotas in tenancy",
"Zero notifications quotas in tenancy"
]
Delete a quota policy
oci --profile=<profile-name in oci config file> limits quota delete --quota-id <quota ocid from console>
List quota
oci --profile=<profile-name in oci config file> limits quota list --compartment-id <compartment id>
Update created quota to allow notifications in the tenancy
oci --profile=<profile-name in oci config file> limits quota update --quota-id <quota ocid from console> --description "updating quota" --statements file:///users/sme/statements.json

Where statements.json is the following:

[
"Zero notifications quotas in tenancy"
]
Get Quota
oci --profile=<profile-name in oci config file> limits quota get --quota-id <quota ocid from console>