Compartment Quotas

This topic describes compartment quotas for Oracle Cloud Infrastructure.

Compartment quotas give tenant and compartment administrators better control over how resources are consumed in Oracle Cloud Infrastructure, enabling administrators to easily allocate resources to compartments using the Console. Along with compartment budgets, compartment quotas create a powerful toolset to manage your spending in Oracle Cloud Infrastructure tenancies.

You can start using compartment quotas from any compartment detail page in the Console.

About Compartment Quotas

Compartment quotas are similar to Service Limits. The biggest difference is that service limits are set by Oracle, and compartment quotas are set by administrators, using policies that allow them to allocate resources with a high level of flexibility.

Compartment quotas are set using policy statements written in a simple declarative language that is similar to the IAM policy language.

There are three types of quota policy statements:

  • set - sets the maximum number of a cloud resource that can be used for a compartment
  • unset - resets quotas back to the default service limits
  • zero - removes access to a cloud resource for a compartment
The quota policy statements look like this:
Quota policy set statement diagram
Quota policy unset statement diagram
Quota policy zero statement diagram
The language components for a quota policy statement are:
  • The action keyword, which corresponds to the type of quota being defined. This can be set, unset, or zero.
  • The name of the service family; for example: compute-core.
  • The quota or quotas keyword.
  • The name of the quota, which varies by service family. For example, a valid quota in the compute-core family is standard2-core-count.
    • You can also use wildcards to specify a range of names. For example, "/standard*/" matches all Compute quotas that start with the phrase "standard."
  • For set statements, the value of the quota.
  • The compartment that the quota covers.
  • An optional condition. For example where request.region = 'us-phoenix-1'. Currently supported conditionals are request.region and request.ad.
Authentication and Authorization

Each service in Oracle Cloud Infrastructure integrates with IAM for authentication and authorization, for all interfaces (the Console, SDK or CLI, and REST API).

An administrator in your organization needs to set up groups , compartments , and policies  that control which users can access which services, which resources, and the type of access. For example, the policies control who can create new users, create and manage the cloud network, launch instances, create buckets, download objects, etc. For more information, see Getting Started with Policies. For specific details about writing policies for each of the different services, see Policy Reference.

If you’re a regular user (not an administrator) who needs to use the Oracle Cloud Infrastructure resources that your company owns, contact your administrator to set up a user ID for you. The administrator can confirm which compartment or compartments you should be using.

For common policies used to authorize users, see Common Policies.To manage quotas in a compartment, you must belong to a group that has the correct permissions. For example:
allow group QuotaAdmins to { QUOTA_READ, QUOTA_CREATE, QUOTA_DELETE, QUOTA_UPDATE, QUOTA_INSPECT } in tenancy
For in-depth information on granting users permissions for the Quotas service, see Details for the Quotas Service in the IAM policy reference.
Permissions and Nesting

Compartment quotas can be set on the root compartment. An administrator (who must be able to manage quotas on the root compartment) can set quotas on their own compartments and any child compartments. Quotas set on a parent compartment override quotas set on child compartments. This way, an administrator of a parent compartment can create a quota on a child compartment that cannot be overridden by the child.

Scope
Quotas can have different scopes, and work at the availability domain, the region, or globally. There are a few important things to understand about scope when working with compartment quotas:
  • When setting a quota at the availability domain (AD) level, the quota is allocated to each AD. So, for example, setting a quota of 120 X7 OCPUs on a compartment actually sets a limit of 120 OCPUs per AD. To target a specific AD, use the request.ad parameter in the where clause.

  • Regional quotas apply to each region. For example, if a quota of 10 functions is set on a compartment, 10 functions will be allocated per region. To target a specific region, use the request.region parameter in the where clause.

  • Usage for sub-compartments counts towards usage for the main compartment.
For more information, see Regions and Availability Domains.
Quota Evaluation and Precedence
The following rules apply when quota statements are evaluated:
  • Within a policy, quota statements are evaluated in order, and later statements supersede previous statements that target the same resource.
  • In cases where more than one policy is set for the same resource, the most restrictive policy is applied.
  • Service limits always take precedence over quotas. Although it is possible to specify a quota for a resource that exceeds the service limit for that resource, the service limit will still be enforced.
Usage Examples

The following example sets the quota for VM.Standard2 and BM.Standard2 compute series to 240 OCPUs (cores) in each AD on compartment MyCompartment in the US West (Phoenix) region:set compute-core quota standard2-core-count to 240 in compartment MyCompartment where request.region = us-phoenix-1The next example shows how to make an allowlist, setting every quota in a family to zero and then explicitly allocating resources:

zero compute-core quotas in tenancy set compute-core quota standard2-core-count to 240 in tenancy

This example shows how to limit creating dense I/O compute resources to only one region:

zero compute-core quotas /*dense-io*/ in tenancy set compute-core quota /*dense-io*/ to 48 in tenancy where request.region = us-phoenix-1

You can clear quotas by using an unset statement, which removes the quota for a resource - any limits on this resource will now be enforced by the service limits:

zero compute-core quotas in tenancy unset compute-core quota standard2-core-count in tenancy

Using the Console

To create a quota
  1. Open the navigation menu. Under Governance and Administration, go to Governance and click Quota Policies. From the Quota Policies screen, click Create Quota.

  2. Enter the following:

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

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

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

  3. Click Create Quota Policy.
Note

New policies can take up to 10 minutes to start working.
To edit a quota
  1. From 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. There are two ways to delete a quota from the console:

    • From 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.

Available Quotas by Service

Click a service name to view the available quotas you can set.

Analytics Cloud
Big Data
Block Volume Quotas

Family name: block-storage

Name

Scope

Description

backup-count Regional Total number of block and boot volume backups
total-storage-gb Availability domain

Maximum storage space of block and boot volumes, in GB

volume-count Availability domain

Total number of block and boot volumes

Example

set block-storage quota volume-count to 10 in compartment MyCompartment
Blockchain Platform Quotas
Compute Quotas
Compute Instances

Quotas for Compute instances are available per core (OCPU) and per shape.

Core-Based Quotas

Family name: compute-core

Name

Scope

Description

standard1-core-count Availability domain Total number of OCPUs for shapes in the VM.Standard1 and BM.Standard1 series
standard-b1-core-count Availability domain Total number of OCPUs for shapes in the VM.Standard.B1 and BM.Standard.B1 series
standard2-core-count Availability domain Total number of OCPUs for shapes in the VM.Standard2 and BM.Standard2 series
standard-e2-micro-core-count Availability domain Total number of OCPUs for shapes in the VM.Standard.E2.1.Micro series
standard-e2-core-count Availability domain Total number of OCPUs for shapes in the VM.Standard.E2 and BM.Standard.E2 series
standard-e3-core-ad-count Availability domain Total number of OCPUs for shapes in the VM.Standard.E3 and BM.Standard.E3 series
dense-io1-core-count Availability domain Total number of OCPUs for shapes in the VM.DenseIO1 and BM.DenseIO1 series
dense-io2-core-count Availability domain Total number of OCPUs for shapes in the VM.DenseIO2 and BM.DenseIO2 series
gpu2-count Availability domain Total number of GPUs for shapes in the VM.GPU2 and BM.GPU2 series
gpu3-count Availability domain Total number of GPUs for shapes in the VM.GPU3 and BM.GPU3 series
gpu4-count Availability domain Total number of GPUs for shapes in the BM.GPU4 series
hpc2-core-count Availability domain Total number of OCPUs for shapes in the BM.HPC2 series
dvh-standard2-core-count Availability domain Total number of OCPUs for DVH.Standard2.52 shapes
Example
set compute-core quota standard2-core-count to 480 in compartment MyCompartment
Shape-Based Quotas

Family name: compute

Name

Scope

Description

bm-standard1-36-count Availability domain Number of BM.Standard1.36 instances
bm-standard-b1-44-count Availability domain Number of BM.Standard.B1.44 instances
bm-standard2-52-count Availability domain Number of BM.Standard2.52 instances
bm-standard-e2-64-count Availability domain Number of BM.Standard.E2.64 instances
bm-dense-io1-36-count Availability domain Number of BM.DenseIO1.36 instances
bm-dense-io2-52-count Availability domain Number of BM.DenseIO2.52 instances
bm-gpu2-2-count Availability domain Number of BM.GPU2.2 instances
bm-gpu3-8-count Availability domain Number of BM.GPU3.8 instances
bm-hpc2-36-count Availability domain Number of BM.HPC2.36 instances
vm-standard1-1-count Availability domain Number of VM.Standard1.1 instances
vm-standard1-2-count Availability domain Number of VM.Standard1.2 instances
vm-standard1-4-count Availability domain Number of VM.Standard1.4 instances
vm-standard1-8-count Availability domain Number of VM.Standard1.8 instances
vm-standard1-16-count Availability domain Number of VM.Standard1.16 instances
vm-standard2-1-count Availability domain Number of VM.Standard2.1 instances
vm-standard2-2-count Availability domain Number of VM.Standard2.2 instances
vm-standard2-4-count Availability domain Number of VM.Standard2.4 instances
vm-standard2-8-count Availability domain Number of VM.Standard2.8 instances
vm-standard2-16-count Availability domain Number of VM.Standard2.16 instances
vm-standard2-24-count Availability domain Number of VM.Standard2.24 instances
vm-standard-e2-1-micro-count Availability domain Number of VM.Standard.E2.1.Micro instances
vm-standard-e2-1-count Availability domain Number of VM.Standard.E2.1 instances
vm-standard-e2-2-count Availability domain Number of VM.Standard.E2.2 instances
vm-standard-e2-4-count Availability domain Number of VM.Standard.E2.4 instances
vm-standard-e2-8-count Availability domain Number of VM.Standard.E2.8 instances
standard-e3-core-ad-count Availability domain Total number of OCPUs for shapes in the VM.Standard.E3 and BM.Standard.E3 series
vm-dense-io1-4-count Availability domain Number of VM.DenseIO1.4 instances
vm-dense-io1-8-count Availability domain Number of VM.DenseIO1.8 instances
vm-dense-io1-16-count Availability domain Number of VM.DenseIO1.16 instances
vm-dense-io2-8-count Availability domain Number of VM.DenseIO2.8 instances
vm-dense-io2-16-count Availability domain Number of VM.DenseIO2.16 instances
vm-dense-io2-24-count Availability domain Number of VM.DenseIO2.24 instances
vm-gpu2-1-count Availability domain Number of VM.GPU2.1 instances
vm-gpu3-1-count Availability domain Number of VM.GPU3.1 instances
vm-gpu3-2-count Availability domain Number of VM.GPU3.2 instances
vm-gpu3-4-count Availability domain Number of VM.GPU3.4 instances
dvh-standard2-52-count Availability domain Number of DVH.Standard2.52 instances
Example
set compute quota vm-dense-io2-8-count to 10 in compartment MyCompartment where request.ad = 'us-phoenix-1-ad-2'
Custom Images

Family name: compute

Name

Scope

Description

custom-image-count Regional Number of custom images
Example
set compute quota custom-image-count to 15 in compartment MyCompartment
Instance Configurations, Instance Pools, and Cluster Networks

Family name: compute-management

Name

Scope

Description

cluster-network-count Regional Number of cluster networks
config-count Regional Number of instance configurations
pool-count Regional Number of instance pools
Example
set compute-management quota config-count to 10 in compartment MyCompartment
Autoscaling

Family name: auto-scaling

Name

Scope

Description

config-count Regional Number of autoscaling configurations
Example
Set auto-scaling quota config-count to 10 in compartment MyCompartment
Content and Experience Quotas
Data Catalog Quotas

Family name: data-catalog

Name

Scope

Description

catalog-count Regional Number of data catalogs

Example

set data-catalog quota catalog-count to 1 in compartment <MyCompartment>
Data Integration Quotas

Family name: dataintegration

Name

Scope

Description

workspace-count Regional Number of workspaces

Example

set dataintegration quota workspace-count to 10 in compartment <compartment_name>
Data Science Quotas

Family name: data-science

Name

Scope

Description

ds-block-volume-count Regional Number of block volumes
ds-block-volume-gb Regional Block Volume Size in GB
ds-gpu2-count Regional GPUs for VM.GPU2
ds-gpu3-count Regional GPUs for VM.GPU3
ds-standard2-core-regional-count Regional Number of VM.Standard2 cores
ds-standard-e2-core-regional-count Regional Number of VM.Standard E2 cores
model-count Regional Number of models
notebook-session-count Regional Number of notebook sessions
project-count Regional Number of projects

Example

The following example shows how to limit the number of data science projects in a specified compartment:

set data-science quota project-count to 10 in compartment MyCompartment
Data Transfer Quotas

Family name: data-transfer

Name

Scope

Description

active-appliance-count Regional Number of approved transfer appliances
appliance-count Regional Number of transfer appliances
job-count Regional Number of transfer jobs

Example

zero data-transfer quota job-count in tenancy
set data-transfer quota job-count to 1 in compartment Finance
set data-transfer quota appliance-count to 3 in compartment Finance
Database Quotas

Family name: database

Name

Scope

Description

adb-free-count Regional Number of Always Free Autonomous Databases. Tenancies can have a total of two Always Free Autonomous Databases, and these resources must be provisioned in the home region. For each database, you can choose the workload type (Autonomous Transaction Processing or Autonomous Data Warehouse).
adw-dedicated-ocpu-count Availability domain Number of Autonomous Data Warehouse OCPUs for databases using dedicated Exadata infrastructure. (See note about "n/a" values on the Limits, Quotas and Usage page of the Console.)
adw-dedicated-total-storage-tb Availability domain Amount of storage (in TB) for Autonomous Data Warehouse databases using dedicated Exadata infrastructure. (See note following this table about "n/a" values on the Limits, Quotas and Usage page of the Console.)
adw-ocpu-count Regional Number of Autonomous Data Warehouse OCPUs for databases using shared Exadata infrastructure.
adw-total-storage-tb Regional Amount of storage (in TB) for Autonomous Data Warehouse databases using shared Exadata infrastructure.
atp-dedicated-ocpu-count Availability domain Number of Autonomous Data Warehouse OCPUs for databases using dedicated Exadata infrastructure. (See note following this table about "n/a" values on the Limits, Quotas and Usage page of the Console.)
atp-dedicated-total-storage-tb Availability domain Amount of storage (in TB) for Autonomous Transaction Processing databases using dedicated Exadata infrastructure. (See note following this table about "n/a" values on the Limits, Quotas and Usage page of the Console.)
atp-ocpu-count Regional Number of Autonomous Transaction Processing OCPUs for databases using shared Exadata infrastructure.
atp-total-storage-tb Regional Amount of storage (in TB) for Autonomous Transaction Processing databases using shared Exadata infrastructure.
bm-dense-io1-36-count Availability domain

Number of BM.DenseIO1.36 DB systems

bm-dense-io2-52-count Availability domain Number of BM.DenseIO2.52 DB systems
exadata-base-48-count Availability domain Number of Exadata.Base.48 DB systems
exadata-full1-336-x6-count Availability domain Number of Exadata.Full1.336 - X6 DB systems
exadata-full2-368-x7-count Availability domain

Number of Exadata.Full2.368 - X7 DB systems and Autonomous Exadata Infrastructure

exadata-half1-168-x6-count Availability domain Number of Exadata.Half1.168 - X6 DB systems
exadata-half2-184-x7-count Availability domain

Number of Exadata.Half2.184 - X7 DB systems and Autonomous Exadata Infrastructure

exadata-quarter1-84-x6-count Availability domain Number of Exadata.Quarter1.84 - X6 DB systems
exadata-quarter2-92-x7-count Availability domain

Number of Exadata.Quarter2.92 - X7 DB systems and Autonomous Exadata Infrastructure

vm-block-storage-gb Availability domain Total size of block storage attachments across all virtual machine DB systems, in GB
vm-standard1-ocpu-count Availability domain Number of VM.Standard1.x OCPUs
vm-standard2-ocpu-count Availability domain Number of VM.Standard2.x OCPUs
Note

When viewing the Limits, Quotas and Usage page of the Console, you will see the value "n/a" in the Service Limit column for storage and OCPU resources related to Autonomous Transaction Processing and Autonomous Data Warehouse with dedicated Exadata infrastructure. You might also see this value in the Available column for these resources. This is because limits for these resources are based on the capacity of your provisioned Exadata hardware, and are not service limits controlled by Oracle Cloud Infrastructure. If you define compartment quota policies for either of these resources, the Available column will display a value for the amount that is available to be allocated, based on your existing usage in the Exadata hardware.

For information about shapes that are not listed, including non-metered shapes, contact Oracle Support.

Examples

The following example shows how to limit the number of Autonomous Data Warehouse resources in a compartment:

#Limits the Autonomous Data Warehouse CPU core count to 2 in the MyCompartment compartment
set database quota adw-ocpu-count to 2 in compartment MyCompartment

This example shows how to set a quota for OCPU cores in an Autonomous Data Warehouse with dedicated Exadata infrastructure:

#Limits the number of Autonomous Data Warehouse dedicated Exadata infrastructure OCPUs to 20 in the MyCompartment compartment
set database quota adw-dedicated-ocpu-count to 20 in compartment MyCompartment

This example shows how to set a quota for Autonomous Exadata Infrastructure quarter rack resources in a compartment:

#Limits the usage of Exadata.Quarter2.92 X7 shapes to 1 in the MyCompartment compartment
set database quota exadata-quarter2-92-x7-count to 1 in compartment MyCompartment

To limit the number of virtual machine DB systems in a compartment, you must set a quota for the number of CPU cores and a separate quota for the block storage:


#Sets a quota for virtual machine Standard Edition OCPUs to 2 in the MyCompartment compartment
set database quota vm-standard1-ocpu-count to 2 in compartment MyCompartment

#Sets the virtual machine DB system block storage quota to 1024 GB in the same compartment
set database quota vm-block-storage-gb to 1024 in compartment MyCompartment

The following example shows how to prevent the usage of all database resources in the tenancy except for two Exadata full rack X7 resources in a specified compartment:

zero database quotas in tenancy
set database quota exadata-full2-368-x7-count to 2 in compartment MyCompartment

This example of nested quotas shows how to distribute limits for a resource type in a compartment among its subcompartments:

#Allows usage of 3 Autonomous Data Warehouse OCPUs in parent compartment Compartment1
set database quota adw-ocpu-count to 3 in compartment Compartment1

#Allows usage of 1 Autonomous Data Warehouse OCPU in child compartment Compartment1.1
set database quota adw-ocpu-count to 1 in compartment Compartment1.1

#Allows usage of 2 Autonomous Data Warehouse OCPUs in child compartment Compartment1.2
set database quota adw-ocpu-count to 2 in compartment Compartment1.2
Digital Assistant Quotas
DNS Quotas

Family name: dns

Name

Scope

Description

global-zone-count Global Number of public DNS zones
steering-policy-count Global Number of traffic management steering policies
steering-policy-attachment-count Global Number of traffic management steering policy attachments

Example

zero dns quotas in compartment MyCompartment
zero dns quota global-zone-count in compartment MyCompartment
zero dns quota steering-policy-count in compartment MyCompartment
zero dns quota steering-policy-attachment-count in compartment MyCompartment
Events Quotas

Family name: events

Name

Scope

Description

rule-count Regional Number of rules

Example

Set events quota rule-count to 10 in compartment MyCompartment
Zero events quota rule-count in compartment MyCompartment
Email Delivery Quotas

Family name: email-delivery

Name

Scope

Description

approved-sender-count Regional Number of approved senders

Example

zero email-delivery quota approved-sender-count in compartment MyCompartment
File Storage Quotas

Family name: filesystem

Name

Scope

Description

mount-target-count Availability domain Number of mount targets
file-system-count Availability domain Number of file systems

Example

Set filesystem quota file-system-count to 5 in compartment MyCompartment
Zero filesystem quota file-system-count in compartment MyCompartment
Set filesystem quota mount-target-count to 1 in compartment MyCompartment
Zero filesystem quota mount-target-count in compartment MyCompartment
Management Agent Quotas

Family name: management-agent

Name

Scope

Description

management-agent-count Regional Number of management agents
management-agent-install-key-count Regional Number of management agent install keys

Examples

The following example limits the number of management agents that users can install in MyCompartment to 200.

set management-agent quota management-agent-count to 200 in compartment MyCompartment

The following example limits the number of management agent install keys that users can create in MyCompartment to 10.

set management-agent quota management-agent-install-key-count to 10 in compartment MyCompartment
Networking Quotas
VCN Quotas

Family name: vcn

Name

Scope

Description

vcn-count Regional Number of virtual cloud networks
reserved-public-ip-count Regional Number of reserved regional public IP addresses
Example
Set vcn quota vcn-count to 10 in compartment MyCompartment
NoSQL Database Cloud Quotas

For Oracle NoSQL Database Cloud quotas and examples, see Service Quotas.

Notifications Quotas

Family name: notifications

Name

Scope

Description

topic-count Regional Number of topics

Example

set notifications quota topic-count to 10 in compartment MyCompartment
Object Storage Quotas

Family name: object-storage

Name

Scope

Description

storage-bytes Regional Total storage size in bytes

Examples

Set object-storage quota storage-bytes to 10000000000 in tenancy

Set object-storage quota storage-bytes to 5000000000 in compartment MyCompartment

Zero object-storage quota storage-bytes in compartment AnotherCompartment

Unset object-storage quota storage-bytes in tenancy
Resource Manager Quotas

Family name: resource-manager

Name

Scope

Description

concurrent-job-count Regional Number of concurrent Jobs per compartment
configuration-source-provider-count Regional Number of configuration source providers per compartment
stack-count Regional Number of of stacks per compartment

Example

set resource-manager quota concurrent-job-count to 1 in compartment MyCompartment
zero resource-manager quota stack-count in compartment MyCompartment
set resource-manager quota configuration-source-provider-count to 5 in compartment MyCompartment
Service Connector Hub Quotas

Family name: service-connector-hub

Name

Scope

Description

service-connector-count Regional Number of service connectors

Example

set service-connector-hub quota service-connector-count to 10 in compartment preview
Streaming Quotas

Family name: streaming

Name

Scope

Description

partition-count Regional Number of partitions

Example

set streaming quota partition-count to 10 in compartment MyCompartment
Vault Quotas

Family name: kms

Name

Scope

Description

virtual-private-vault-count Regional Number of virtual private vaults

Example

set kms quota virtual-private-vault-count to 10 in compartment MyCompartment
set kms quota virtual-vault-count to 10 in compartment MyCompartment
WAF Quotas

Family name: waas

Name

Scope

Description

waas-policy-count Regional Number of WAF policies

Example

zero waas quota waas-policy-count in compartment MyCompartment