Topic 3 of 5
Three checks before any deployment: the service API is enabled in the project, there is enough quota, and the product exists in the chosen region or zone. The exam guide lists them as "Enabling APIs", "Assessing quotas and requesting increases", and "Verifying product availability across geographical locations".
Contents
Google Cloud services are enabled project by project with Service Usage, including private services created with Cloud Endpoints. The console covers most cases; for scripts you use the Google Cloud CLI and, for programmatic access, the Service Usage API client libraries.
Required role
Service Usage Admin (roles/serviceusage.serviceUsageAdmin) on the project.
Console
APIs & Services → find the API → Enable. To turn it off, open the API and click Disable API.
gcloud services enable bigquery.googleapis.com pubsub.googleapis.com gcloud services disable bigquery.googleapis.com gcloud services operations describe operations/OPERATION_ID
gcloud services operations describe.A quota restricts how much of a resource a project can use: API calls, load balancers in use, projects you can create. Quotas protect the user community by preventing overload and help you manage your own consumption.
The Cloud Quotas system monitors consumption, restricts it, and lets you request changes and automate adjustments. If you try to consume more than allowed, access is usually blocked and the task fails.
Quota
An adjustable value per project, folder, or organization. You can ask for it to go up or down.
System limit
A fixed constraint, such as a maximum file size or a schema limit. It can't be increased or decreased.
Free trial accounts may have lower quota values. When you enable billing on the project, most of them increase.
| Type | What it limits | Example |
|---|---|---|
| Allocation | How much of a resource is allocated to you | Number of VMs in a project |
| Rate | How much you can consume over a time period | 1,000 requests per day to an API |
| Concurrent | Simultaneous operations, mostly long-running ones | Compute Engine insert operations that run up to an hour |
By hierarchy level
By location
Example from the Compute Engine docs: with a global quota of 50 target pools, creating 25 in one region and 25 in another uses up the project quota in every region. With a regional quota of 7 reserved IP addresses, you can reserve only 7 per region.
The task fails with a quota error and keeps failing until there is enough room. If you don't want to change the quota value:
Allocation
Free up unused resources. With a quota of 100 VMs and 99 created, asking for 10 more fails entirely (even though one would fit): delete nine so they fit.
Rate
Wait for the next period. Per-day quotas reset at midnight Pacific Time; per-minute quotas reset one minute after the first request, in a rolling window.
Go to IAM & Admin → Quotas & System Limits. Select the project.
Select the quota and click Edit. Use the filter to find it.
Enter the new value. If it exceeds the maximum in the dialog, choose Apply for higher quota and add a description.
Submit the request. If it needs review, you get an acknowledgment email and later another with the decision.
roles/servicemanagement.quotaViewer) to view and Quota Administrator (roles/servicemanagement.quotaAdmin) to request adjustments.The Cloud Quotas dashboard is integrated with Cloud Monitoring. From Quotas & System Limits, in a quota's menu, Create usage alert opens an alert policy template: you choose the notification channel (email, SMS, Pub/Sub…) and get notified when usage reaches a percentage of the maximum. This basic alert exists only for project-level quotas. In Metrics Explorer, the Consumer Quota resource shows quota usage metrics.
Region
An independent geographic area with three or more zones in three or more physical data centers. Stockholm, Osaka, and Montreal have three zones in one or two data centers and are expanding.
Zone
A deployment area within a region. It is considered a single failure domain. Name: region + letter, e.g. us-central1-a.
ai, a number, and a letter: us-west4-ai2b shares the update rollout wave of us-west4-b.| Scope | Behavior | Examples |
|---|---|---|
| Zonal | Runs in one zone; a zone outage affects it. Only resources in the same zone can use it | VM instances, zonal disks |
| Regional | Redundant across zones in a region; any resource in the region can use it | Static external IP addresses, regional MIGs, App Engine |
| Multi-regional | Google distributes it across regions and it keeps working if one is lost | Cloud Storage, Spanner, Firestore, Cloud KMS, Artifact Registry. Note: a BigQuery multi-region stores data in a single region |
| Global | Usable from any location | Compute Engine images |
Rule of thumb
To attach a zonal persistent disk to a VM, both must be in the same zone. To assign a static IP address to a VM, both must be in the same region.
Not every product or piece of hardware is available everywhere. To check:
gcloud compute machine-types list shows which zones offer each machine type.gcloud compute machine-types list --filter="name=c4d-standard-4"
Google maintains its infrastructure without interrupting VMs: by default, most are set to live migrate, which moves them to another host in the same zone without shutting them down. The alternative is stop and reboot: the VM shuts down cleanly and restarts away from the event. Some machine series support only this second option. It is set in the VM's host maintenance policy, covered in domain D2.
| Situation | Answer | Why |
|---|---|---|
| A script must turn on BigQuery and Pub/Sub in a new project | gcloud services enable bigquery.googleapis.com pubsub.googleapis.com | Enables several services in one command. |
| Quota error creating VM number 101 with a quota of 100 | Delete unused VMs or request an adjustment | It is an allocation quota. |
| An API returns a daily quota error at 6 PM | Wait until midnight Pacific Time or request an adjustment | Per-day quotas reset at that time. |
| Request more quota without a paid support plan | Quotas & System Limits → Edit | No Customer Care contract needed. |
| Get notified at 80% of a quota | Create usage alert in Quotas & System Limits | Uses Cloud Monitoring and a notification channel. |
| Find which zones offer a machine type | gcloud compute machine-types list --filter | Availability varies by zone. |
| Keep the app running if a zone fails | Spread across several zones in the region | A zone is a single failure domain. |
❓ Can you request an increase to a system limit?
No. System limits are fixed; only quotas can be adjusted.
❓ Does using up one project's quota affect other projects?
Not for project-level quotas. It does for folder or organization quotas, which add up the usage of all children.
❓ Do you need paid support to request more quota?
No. You request it from Quotas & System Limits without a Customer Care contract.
❓ Which role do you need to enable an API?
Service Usage Admin (roles/serviceusage.serviceUsageAdmin) on the project.
❓ Can a VM in us-central1-a use a zonal disk in us-central1-b?
No. Zonal resources can only be used by resources in the same zone.
❓ What is the minimum number of zones in a region?
Three. Google intends to offer at least three zones in every general-purpose region.
❓ When do per-day quotas reset?
At midnight Pacific Time.
Did you get this topic?
Test what you just learned
A team needs to launch 200 VMs for a batch job, but the project's regional CPU quota only allows 120. They want to be warned before they run short again. What should they do?
Original questions, each with a full explanation.
Start a mock exam