Google app


App Engine Pricing  |  App Engine Documentation  |  Google Cloud Platform

App Engine applications run as instances within the standard environment or the flexible environment.

Instances within the standard environment have access to a daily limit of resource usage that is provided at no charge defined by a set of quotas. Beyond that level, applications will incur charges as outlined below. To control your application costs, you can set a spending limit. To estimate costs for the standard environment, use the pricing calculator.

Go to the pricing calculator

For instances within the flexible environment, services and APIs are priced as described below.

If you pay in a currency other than USD, the prices listed in your currency on Cloud Platform SKUs apply.

Resource billing rates

An application can incur a variety of different costs, according to the resources and services that are used. See the tables below for details on the costs of specific resources.

Standard environment instances

Applications running in the App Engine standard environment are deployed to instance classes that you specify. This table summarizes the hourly billing rates of the various instance classes.

IowaNorthern VirginiaSouth CarolinaSão PauloBelgiumLondonFrankfurtSydneyTaiwanTokyo

Instance class Cost per hour per instance
B1
B2
B4
B4_1G
B8
F1
F2
F4
F4_1G
If you pay in a currency other than USD, the prices listed in your currency on Cloud Platform SKUs apply.

Note: For each instance, there is an initial start up cost of 15 minutes instance time.

Instances running in manual and basic scaling services are billed at hourly rates based on uptime. Billing begins when an instance starts and ends fifteen minutes after a manual instance shuts down or fifteen minutes after a basic instance has finished processing its last request. Runtime overhead is counted against the instance memory limit. This will be higher for Java than for other languages.

Important: When you are billed for instance hours, you will not see any instance classes in your billing line items. Instead, you will see the appropriate multiple of instance hours. For example, if you use an F4 instance for one hour, you do not see "F4" listed, but you see billing for four instance hours at the F1 rate.

Flexible environment instances

Applications running in the App Engine flexible environment are deployed to virtual machine types that you specify. These virtual machine resources are billed on a per-second basis with a 1 minute minimum usage cost.

This table summarizes the hourly billing rates of the various computing resources:

IowaNorthern VirginiaSouth CarolinaSão PauloBelgiumLondonFrankfurtSydneyTaiwanTokyo

Resource Unit Unit cost
vCPU per core hour
Memory per GB hour
Persistent disk per GB per month
If you pay in a currency other than USD, the prices listed in your currency on Cloud Platform SKUs apply.

Google Cloud Datastore calls

Cloud Datastore operations are billed as follows:

IowaNorthern VirginiaSouth CarolinaSão PauloBelgiumLondonFrankfurtSydneyTaiwanTokyo

Resource Free quota per day Unit Price beyond the free quota per unit
Stored data 1 GB per GB per month
Entity reads 50,000 per 100K entities
Entity writes 20,000 per 100K entities
Entity deletes 20,000 per 100K entities
Small operations
If you pay in a currency other than USD, the prices listed in your currency on Cloud Platform SKUs apply. Note: Standard network costs apply.

Search

Fees for use of the Search API are listed in the table below. Refer to the Java and Python documentation for a detailed description of each type of Search call.

IowaNorthern VirginiaSouth CarolinaSão PauloBelgiumLondonFrankfurtSydneyTaiwanTokyo

Resource Unit Price per unit
Total storage (documents and indexes) per GB per month
Queries per 10K queries
Indexing searchable documents per GB

* Storage is at Datastore rates.

If you pay in a currency other than USD, the prices listed in your currency on Cloud Platform SKUs apply.

Other resources

IowaNorthern VirginiaSouth CarolinaSão PauloBelgiumLondonFrankfurtSydneyTaiwanTokyo

Resource Unit Unit cost (in US $)
Outgoing network traffic - standard environment* Gigabytes
Outgoing network traffic - flexible environment Gigabytes Google Compute Engine Network Rates
Incoming network traffic Gigabytes
Blobstore and Task Queue stored data** Gigabytes per month
Dedicated memcache Gigabytes per hour
Logs API Gigabytes
Sending email, shared memcache, cron, APIs (Task Queues, Image, Files, Users, and Channel)

* Excludes traffic from the URL Fetch service to Google APIs at *.googleapis.com.

** Blobstore can use Google Cloud Storage buckets to store blobs, including the App Engine default bucket. Costs follow the pricing for Google Cloud Storage Multi-Regional buckets.

If you pay in a currency other than USD, the prices listed in your currency on Cloud Platform SKUs apply.

Note: If your app exceeds the free quota for a resource needed to initiate a request, such as the bandwidth quota or instance hours quota, users of the app will get a server error, such as a HTTP 503 error. For all other services, exceeding quota from a free app will generate a quota exception that your app can handle gracefully by showing a message to the users. For more details, see When a Resource is Depleted.

Managing billing

You must be a project owner to be a billing administrator and complete basic billing tasks. For more information, see the support help page on how to Manage billing administrators.

Billing settings

To use computing resources above the free quotas, add a billing account and enable billing for your project in the Google Cloud Platform Console. For further instructions, see Enabling billing.

If you already have a billing account when you create a project, billing is enabled for that project by default. If you have more than one billing account when you create a project, you must select an account to associate with your project. If you don't have a billing account when you create a project, then you must add a billing account and enable billing for that project to use resources beyond the free quotas.

If you disable an application, you should also disable billing for that application, as the app can still be charged for fixed billing costs, like datastore storage.

After you enable billing, the spending limit is set to unlimited by default. You might want to set a spending limit so there is a limit to the amount you can be charged per day.

Spending limits

The spending limit is the maximum resource cost you want to pay in a day for a project for App Engine resources. The limit is approximate, and it might be exceeded slightly while your application is disabled. You can also be charged for usage of other Google Cloud Platform resources beyond the spending limit. If you have multiple projects, you might want to set a spending limit for each project.

The spending limit should be large enough to be able to handle spikes in resource usage. When an application exceeds its daily spending limit, any operation whose free quota has been exhausted fails.

By default, the spending limit for a project is unlimited. To limit application costs, set a spending limit.

Important: Spending limits are not supported in the App Engine flexible environment

Understanding billing

To view your app's charges, in the Google Cloud Platform Console, go to Billing. Select the billing account, then go to the History page.

Only billing administrators can view the transaction history. No paper invoices are sent to the billing contact.

The transaction history shows all account activity related to resource charges and payments. The report uses the US Pacific timezone.

Note: Daily usage costs are rounded to the penny when they are displayed in the App Engine dashboard, but the transaction history accumulates the actual full costs. Therefore the sum of the daily charges may not be identical to the amount reported (and billed) in the transaction history. Daily usage is posted on dashboard the next day but it can take longer to update the transaction history, so the transaction history may not include the most recent usage history.

Daily and monthly charges

Charges are posted daily and monthly:

  • Daily: Every day you are charged for the resources you actually use. Usage up to the free quota limits is included in the usage total, but not in the billable amount. Usage above the free quota is charged at the regular rates.
  • Monthly: At the beginning of each month all daily charges for the previous month are summed, applicable taxes are computed, and the total charges are debited from the payment method that is linked to the app.

Taxes

Some countries tax App Engine fees. If taxes apply in your country of residence, your bill will include any applicable taxes. Note that the spending limit does not include taxes. Taxes are added to your charges after daily spend has been calculated, so the final charge to your account may be larger than the spending limit amount. To see any taxes in your bill, in the Google Cloud Platform Console, go to Billing. Select the billing account, then go to the History page to view the transaction history.

Grace periods

You can view your app's current billing status in the App Engine dashboard in the Cloud Platform Console. If a payment fails, the app's account is delinquent and enters a grace period status. You have until the end of the grace period to pay the outstanding balance. During the grace period, the app will continue to run with its budget constraints. If payment is not received, your quotas may be reverted to the default levels.

To clear the outstanding charges you can go to the Transaction History page where you can click Make a Payment. You may need to go to the Billing Settings page first, where you can add another payment source or correct a problem with an existing account, such as an expired card. If payment succeeds, the billing status will change to Billing Enabled.

Help

  • See the Cloud Billing guide for more information.

  • Report billing problems to Cloud Services by filling out this online form.

cloud.google.com

Google App Engine FAQ  |  App Engine Documentation  |  Google Cloud Platform

How do I sign into my Google App Engine account?

For normal Google accounts, including Gmail users, you can log into your App Engine account by visiting the Google Cloud Platform Console.

How do I create a Cloud project for App Engine?

Use the Google Cloud Platform Console to create a Cloud project.

What languages are supported by Google App Engine?

Currently, Google App Engine standard environment supports Java, Python, PHP, and Go. Additionally, your website templates can include JavaScript along with your HTML which, among other things, allows you to write AJAX-enabled web applications.

What type of certifications has App Engine received?

Google App Engine successfully completed the audit process for the SAS70 Type II, SSAE 16 Type II, ISO 27001, and ISAE 3402 Type II standards.

What are my rights to the projects I create?

Between Google and App Engine customers, the customer owns all intellectual property rights to their stored data and their application and project code. Google owns all intellectual property rights to App Engine and Google Cloud Platform's services and software.

For more information, including the definitions of these terms, see the Google Cloud Terms of Service.

What frameworks does Google App Engine Support?

Java

App Engine's Java runtime works with many popular Java frameworks including Struts 2 and Spring MVC. App Engine also supports several popular JVM-compatible languages such as JRuby and Scala. All frameworks must operate inside the restrictions of App Engine's sandbox and only use the JRE classes in the JRE class white list.

Python

App Engine can run most Python web frameworks out-of-the box with few or no modifications. A GitHub example is available that shows how to use a Python Flask skeleton with Google App Engine. More information is available in the documentation on third-party libraries.

Go

The Go runtime for App Engine includes almost all of the standard library, including the net/http package, which is sufficient for writing complete web apps. Many third-party libraries also work on App Engine without any modification.

Custom runtimes

You can use flexible environment to create a custom runtime and install a different framework in your software stack.

Can I still develop a Google App Engine app if I don't have an account?

Absolutely! Even if you don't yet have a Google App Engine account you can always download our SDK and start developing.

How many applications can I create with Google App Engine?

The number of App Engine projects you can create depends on a variety of factors, including which resources you're using and your previous usage history with Google Cloud Platform. Customers might have different quota based on these and other factors.

If you attempt to exceed your project limit, the Cloud Platform Console prompts you to fill out a request form. This happens when you try to create a project but you have already reached your quota. The form requires you to specify the number of additional projects you need, along with their corresponding email accounts, billing accounts, and intended uses.

More information on quota increase requests is available on the project quota requests page.

How can I disable one of my existing applications?

Disabling your application stops all serving requests, but your data and state are retained. You are still be billed for applicable charges, such as Compute Engine instances. To release all the resources used within the project, shut down your project.

To disable your application:

  1. In the Cloud Platform Console, go to the App Engine Settings page.

    Go to the App Engine Settings

  2. Click Disable application and follow the instructions.
  3. Disabling your app takes effect immediately. Confirm that your application has been disabled by visiting the URL of your app, such as http://[YOUR_PROJECT_ID].appspot.com/. Your application should return an HTTP 404 Not Found error.

What type of content is allowed on Google App Engine?

Please see our Terms of Service if you have questions on what kind of content is allowed with Google App Engine.

Why do I get URI error for /favicon.ico?

Applications that have not included a favicon.ico file may include the URI /favicon.ico on the list of errorful URIs. Favicon.ico is a file that is requested by a user's web browser when it attempts to load the page. Favicon.ico is your website's icon, and is typically displayed in the user's browser URL bar, next to the web address of your site.

For your application, favicon.ico should be a static image. You can upload a favicon.ico file with your application, and in your app.yaml file configure your application to serve the image when the url /favicon.ico is requested. Below are example entries in appengine-web.xml (Java) and app.yaml (Python/Go). In the Python/Go example, favicon.ico is located in static/images. For simplicity, the same file is located in the root (war) directory in the Java example.

Python/Go

app.yaml - url: /favicon\.ico static_files: static/images/favicon.ico upload: static/images/favicon\.ico

Java

appengine-web.xml <static-files> <include path="/favicon.ico" /> </static-files>

What is GQL?

GQL is a query language that is used with Datastore. Python apps can use it to query for entities. It uses a SQL-like syntax to retrieve entire entities from your application's Datastore and includes the ability to filter on properties, specify the sorting order of the results, and limit the number of entities returned. The full GQL language reference can be found here.

Is GQL available for Java?

GQL is not included in the Java SDK, however it can be used through the Cloud Datastore API. We recommend that Java developers use JDO or JPA instead of GQL because they are type-safe. Using JDO/JPA allows the developer to find out about mistakes in the IDE rather than at runtime, and allows less room for SQL injection attacks.

Why do my queries need to be covered by indexes, and how do I include them?

If you run a query that filters on multiple entity properties or orders results by multiple properties, you will need an index for that query. You must have an index for every query of that kind that you run with your application. Datastore index for a query maintains and updates a list of keys sorted in the manner that the query specifies to allow speedy access to the data in Datastore. A full explanation of Datastore indexes can be found in our documentation (Java | Python | Go).

When you develop your application with Google App Engine SDK, every query you run automatically gets indexed when necessary. If you thoroughly test your application before uploading it to your website, all of the indexes your application will need will be included in your application's datastore-indexes.xml (Java) or index.yaml (Python or Go) files. You may manually add indexes if you find a query that was not covered by your development testing. For more information on how to write indexes for your application, see the index documentation.

Why were my indexes marked as Error?

They may be exploding indexes (Python | Java | Go), or may have encountered other similar problems when writing particular entities in your datastore. You can vacuum and re-attempt to build them by following the instructions in Queries (Python | Java | Go) and Indexes (Python | Java).

Why do my indexes stay Building or Deleting for long periods of time?

Even if you don't have many entities of the corresponding kind(s), the time indexes take to build or delete can vary widely depending on the total amount of data in Datastore, indexes currently building for other apps, and Datastore load due to user requests, among other factors. In some cases, index jobs can take hours or even days to complete.

Even so, we can sometimes help with indexes that seem to be stuck. If you think this has happened to your indexes, you can post a question to the google-appengine group.

How do I authenticate users of my application?

The Users service (Java | Python | Go) allows you to authenticate users who have a Google Account, an account on their own Google Apps domain. You choose one of these forms of authentication for your app.

If your app uses Google accounts, when your application requests a user sign in, the user is directed to a Google sign-in page to enter a username and password, or to create a new account. After successfully signing in, the user is then returned to your website, and the user information is available to your application through the Users property.

Are there any third-party libraries not supported by Google App Engine?

Java

For a list of compatible and incompatible libraries and frameworks, please see The JRE Class White List.

Python

A small percentage of native C python modules, and subsets of native C python modules are not available with Google App Engine. The disabled modules fall in to the following categories:

  • Libraries that maintain databases on disk are not enabled in Python for Google App Engine
  • The system does not allow you to invoke subprocesses, as a result some module OS methods are disabled
  • Threading is not available
  • For security reasons, most C-based modules are disabled
  • Other features that are limited:
    • marshal is disabled
    • cPickle is aliased to pickle
    • System calls have been disabled

Please keep in mind that third party packages which use any of the above features will not function with Google App Engine (packages such as PostgreSQL, etc).

Go

The majority of pure Go packages work on Google App Engine. A package may not work because of one of these reasons:

  • The package imports syscall or unsafe.
  • The package uses cgo or assembly.
  • The package requires functions in packages that are locked down, such as writing to disk, or direct network access.

Why did my app get disabled?

An app may be disabled if it fails to abide by our Terms and Conditions. Additionally, if an application is found to be using an inordinate amount of system resources due to a bug or other issue leading to inefficient resource usage, we may disable the app so that the developer can fix the development issues using our development SDK before re-enabling the application on Google App Engine.

Why is my app over quota?

App Engine places quota limits on the amount of each system resource that an application can consume in a day. All applications have a default quota configuration, the "free quotas", which should allow for roughly 5 million pageviews a month for an efficient application. You can read more about system quotas in the quota documentation.

As your application grows, it may need a higher resource allocation than the default quota configuration provides. You can purchase additional computing resources by enabling billing for your application. Billing enables developers to raise the limits on all system resources and pay for even higher limits on CPU, bandwidth, storage, and email usage.

How do I report an application that is in violation of your Terms and Conditions?

To report an application that is in violation of the Google App Engine Terms and Condition, please contact us. We will determine if the application is in violation, and if necessary, contact the application's developer over the violation.

Should I use the SDK for serving external requests?

The dev_appserver is designed for local testing and disallows external connections by default. You can override this using the -a <hostname> flag when running it, but doing so is not recommended because the SDK has not been hardened for security and may contain vulnerabilities.

How do I serve compressed content?

Google App Engine does its best to serve gzipped content to browsers that support it. Taking advantage of this scheme is automatic and requires no modifications to applications.

We use a combination of request headers (Accept-Encoding, User-Agent) and response headers (Content-Type) to determine whether or not the end-user can take advantage of gzipped content. This approach avoids some well-known bugs with gzipped content in popular browsers. To force gzipped content to be served, clients may supply 'gzip' as the value of both the Accept-Encoding and User-Agent request headers. Content will never be gzipped if no Accept-Encoding header is present.

This is covered further in the runtime environment documentation (Python | Java | PHP | Go).

Does Google App Engine support SSL (HTTPS)?

Google App Engine allows you to serve SSL (HTTPS) traffic through your appspot.com domain. Simply add the 'secure' parameter to your app.yaml handler for the URLs through which you wish to support secure traffic. For complete information on how to configure your application for secure traffic, see the docs on app configuration (Java | Python | Go).

You can also serve SSL (HTTPS) traffic using a custom domain. You can also use naked domains if you use a custom domain with SSL.

Can I Use Strict-Transport-Security Headers in my project?

It is possible to use Strict-Transport-Security in App Engine. In order to add HTTP Strict-Transport-Security headers (HSTS) to your app, you must be implement the headers within your app's code, not within your app's config file (app.yaml or appengine-web.xml). Projects with custom domains will not be able to use Strict-Transport-Security headers unless your domain is whitelisted. To place your domain in the whitelist, contact [email protected]

Can I use SSL (HTTPS) on App Engine with my custom domain?

You can serve SSL through your custom domain.

Do tools like appcfg use SSL (HTTPS)?

The SDK tools which use login (appcfg, remote_api, appengine_rpc) all use SSL when communicating your email address and password.

The Python and Go SDKs have the ability to validate the SSL certificate over the remote connection. To do this you must have the ssl Python module installed on your system. If you are using Python 2.5, you can install the module from http://pypi.python.org/pypi/ssl/. If there is an error validating the SSL certificate, the tools will raise an InvalidCertificateException explaining what went wrong.

The Java SDK also enables SSL by default. If an error is encountered while validating the SSL certificate it will throw a javax.net.ssl.SSLHandshakeException.

I'd like to map my app to a naked domain (such as http://example.com).

A "naked domain" lets users access your app directly at the domain name (http://example.com), without requiring a subdomain such as http://www.example.com or http://myapp.example.com. You can set up your App Engine app with a naked domain in the Google Cloud Platform project console. See using custom domains.

Naked domains are also supported if you are using a custom domain with SSL.

Static IP Addresses and App Engine apps

App Engine does not currently provide a way to map static IP addresses to an application. In order to optimize the network path between an end user and an App Engine application, end users on different ISPs or geographic locations might use different IP addresses to access the same App Engine application. DNS might return different IP addresses to access App Engine over time or from different network locations.

Outbound services, such as the URL Fetch, Sockets and Mail APIs, make use of a large pool of IP addresses. The IP address ranges in this pool are subject to routine changes. In fact, two sequential API calls from the same application may appear to originate from two different IP addresses.

App Engine's current range of outgoing IP addresses are encoded in the sender policy framework (SPF) record of _cloud-netblocks.googleusercontent.com. You may need to recursively perform DNS SPF lookups to resolve the entire list of IP ranges. Start by resolving _cloud-netblocks.googleusercontent.com as follows:

nslookup -q=TXT _cloud-netblocks.googleusercontent.com 8.8.8.8

The response returned from this will contain all of the current _cloud-netblocks for App Engine. (Keep in mind that these results are not static: Google may introduce new _cloud-netblocks entries at any time.) For example, this query could return the following:

Non-authoritative answer: _cloud-netblocks.googleusercontent.com text = "v=spf1 include:_cloud-netblocks1.googleusercontent.com include:_cloud-netblocks2.googleusercontent.com include:_cloud-netblocks3.googleusercontent.com ?all

From this query response, you would then query each of the returned _cloud-netblocksN listed in the response. Using the previous example response with the three _cloud-netblocksN entries, you would do the following three queries to find all the IP ranges:

nslookup -q=TXT _cloud-netblocks1.googleusercontent.com 8.8.8.8 nslookup -q=TXT _cloud-netblocks2.googleusercontent.com 8.8.8.8 nslookup -q=TXT _cloud-netblocks3.googleusercontent.com 8.8.8.8

The SPF records returned from the query of each of those above entries will be IP ranges that you can use for App Engine outgoing traffic. For example, the query of _cloud-netblocks1 above could return the following:

Non-authoritative answer: _cloud-netblocks1.googleusercontent.com text = "v=spf1 ip4:8.34.208.0/20 ip4:8.35.192.0/21 ip4:8.35.200.0/23 ip4:108.59.80.0/20 ip4:108.170.192.0/20 ip4:108.170.208.0/21 ip4:108.170.216.0/22 ip4:108.170.220.0/23 ip4:108.170.222.0/24 ?all"

From this example, we see that both the 8.34.208.0/20 and 8.35.192.0/21 IP ranges can be used for App Engine traffic.

Note that using static IP address filtering is not considered a safe and effective means of protection. For example, an attacker could set up a malicious App Engine app which could share the same IP address range as your application. Instead, we suggest that you take a defense in depth approach using OAuth and Certs.

How do I define cron jobs for my application?

Please consult the language specific documentation for information on defining cron jobs for your application (Java | Python | Go | PHP).

What are task queues?

Task queues provide a mechanism for dynamically adding new requests to be fulfilled at a later point in time. If an app needs to execute some background work, it can use the Task Queue API to organize that work into small, discrete units called Tasks. Tasks are inserted into one or more Queues. App Engine automatically detects new Tasks and executes them when system resources permit. For more details, see the documentation for the Task Queue API (Java | Python | Go | PHP).

Can I use Google groups to grant access to my App Engine project?

If you add a Google group to your App Engine project, members of that group will have access to that project's resources, for example, Datastore, Task Queues, Memcache, etc.

How do I prevent users/subnets from accessing my app?

App Engine provides a DoS Protection Service that enables you to blacklist IP addresses or subnets. For more details, see the documentation for the DoS Protection Service (Java | Python | Go | PHP).

How do I get more information on application outages and accessibility issues with my application?

The Google Cloud Status Dashboard provides status information on the services that are part of Google Cloud Platform.

For China, Google App Engine accessibility may be intermittent. See the Google Transparency Report for accessibility issues on other Google products in China.

cloud.google.com

Quotas  |  App Engine Documentation  |  Google Cloud Platform

An App Engine application can consume resources up to certain quotas.

You can view the daily usage and quota consumption of App Engine resources for your project in the Google Cloud Platform Console Quota Details page.

Billable limits and safety limits

App Engine has three kinds of quotas or limits:

  • Free quotas: Every application gets an amount of each resource for free. Free quotas can only be exceeded by paid applications, up to the application's spending limit or the safety limit, whichever applies first.
  • Spending limits: If you are the project owner and the billing administrator, you can set the spending limit to manage application costs in the Google Cloud Platform Console in the App Engine Settings. Spending limits might be exceeded slightly as the application is disabled.
  • Safety limits: Safety limits are set by Google to protect the integrity of the App Engine system. These quotas ensure that no single app can over-consume resources to the detriment of other apps. If you go above these limits you'll get an error whether you are paid or free.

Spending limits

If you are a project owner and a billing administrator, you can enable billing for a project so that it can use additional resources beyond the free quotas. You will be charged for the resources your application uses above the free quota thresholds.

After you enable billing for your application, you might want to set a spending limit so there is an approximate limit to the amount you can be charged per day. By default, the spending limit is unlimited, so it's a good idea to specify a spending limit to gain more control over application costs. Note that spending limits might be exceeded slightly as the application is disabled.

When you enable billing for your application, the application's safety limits increase. See the Resources section for details.

Important: Spending limits are not supported in the App Engine flexible environment. Instead, consider creating budgets and setting alarms.

Safety limits

Safety limits include daily quotas and per-minute quotas:

  • Daily quotas are refreshed daily at midnight Pacific time. Paid applications can exceed this free quota until their spending limit is exhausted.
  • Per-minute quotas protect the application from consuming all of its resources in very short periods of time, and prevent other applications from monopolizing a given resource. If your application consumes a resource too quickly and depletes one of the per-minute quotas, the word "Limited" appears next to the appropriate quota on the Quota Details screen in the Cloud Platform Console. Requests for resources that have hit their per-minute maximum will be denied.

See When a Resource is Depleted for details about what happens when a quota is exceeded and how to handle quota overage conditions.

Tip: For paid apps, the maximum per-minute quotas accommodate high traffic levels, enough to handle a spike in traffic from your site getting mentioned in news stories. If you believe a particular quota does not meet this requirement, please create a feature request issue in the issue tracker. Please note that filing a feature request will not assure an actual quota bump for a particular app, but it will help us understand which quota is potentially too low for general use cases.

If you're expecting extremely high traffic levels, or for some reason your app requires particularly high quotas (e.g. because of significant product launch or large load tests), we recommend you sign up for Silver, Gold or Platinum support.

How resources are replenished

App Engine tracks your application's resource usage against system quotas. App Engine resets all resource measurements at the beginning of each calendar day (except for Stored Data, which always represents the amount of datastore storage in use). When free applications reach their quota for a resource, they cannot use that resource until the quota is replenished. Paid apps can exceed the free quota until their spending limit is exhausted.

Daily quotas are replenished daily at midnight Pacific time. Per-minute quotas are refreshed every 60 seconds.

When a resource is depleted

When an application consumes all of an allocated resource, the resource becomes unavailable until the quota is replenished. This may mean that your application will not work until the quota is replenished.

For resources that are required to initiate a request, when the resource is depleted, App Engine by default returns an HTTP 403 or 503 error code for the request instead of calling a request handler. The following resources have this behavior:

  • Bandwidth, incoming and outgoing
  • Instance hours

Tip: You can configure your application to serve a custom error page when your application exceeds a quota. For details, see the configuration file reference for Python, Java, and Go.

For all other resources, when the resource is depleted, an attempt in the application to consume the resource results in an exception. This exception can be caught by the application and handled, such as by displaying a friendly error message to the user. In the Python API, this exception is apiproxy_errors.OverQuotaError. In the API for Java, this exception is com.google.apphosting.api.ApiProxy.OverQuotaException. In the Go API, the appengine.IsOverQuota function reports whether an error represents an API call failure due to insufficient available quota.

The following example illustrates how to catch the OverQuotaError, which may be raised by the SendMessage() method if an email-related quota has been exceeded:

try: mail.SendMessage(to='[email protected]', from='[email protected]', subject='Test Email', body='Testing') except apiproxy_errors.OverQuotaError, message: # Log the error. logging.error(message) # Display an informative message to the user. self.response.out.write('The email could not be sent. ' 'Please try again later.')

Is your app exceeding the default limits? If you need a higher mail quota, you can use SendGrid to send email. For any other quota increase, if you have Silver, Gold, or Platinum support package, you can contact your support representative to request higher throughput limits. Otherwise, you can file a feature request.

Quotas for the App Engine flexible environment

When you deploy an application to the App Engine flexible environment, some Google Cloud Platform resources are consumed. You might not be able to modify these resources, however, these resources count against your quota.

Resources

An application may use the following resources, subject to quotas. Resources measured against billable limits are indicated with "(billable)." Resource amounts represent an allocation over a 24 hour period.

The cost of additional resources is listed on the Pricing page.

Default Google Cloud Storage bucket

Applications can use a Default Google Cloud Storage bucket, which has free quota and doesn't require billing to be enabled for the app. You create this free default bucket in the Google Cloud Platform Console App Engine settings page for your project.

The following quotas apply specifically to use of the default bucket. See pricing for Google Cloud Storage Multi-Regional buckets for a description of these quotas.

Default Google Cloud Storage bucket stored data, I/O, and egress There are limits to the total amount of data that may be stored in the Default Google Cloud Storage bucket on a free basis.

New Pricing for Cloud Storage Operations and Network Egress Changes Starting in December, 2016. In December 2016, we will begin charging for operations on the Default Google Cloud Storage bucket. There will be a free quota for daily usage as shown below. For more detailed definitions and pricing information please see Google Cloud Storage pricing. In addition, network egress from the Default bucket will count against the 1GB daily Outgoing Bandwidth quota.

Resource Free Default Limit Billing Enabled Default Limit
Default Google Cloud Storage Bucket Stored Data 5 GB First 5 GB free; no maximum
Default Google Cloud Storage Bucket Class A Operations 20,000 ops/day First 20,000 ops/day free; no maximum
Default Google Cloud Storage Bucket Class B Operations 50,000 ops/day First 50,000 ops/day free; no maximum
Default Google Cloud Storage Bucket Network Egress Up to the Outgoing Bandwidth quota Up to the Outgoing Bandwidth quota free; no maximum

Blobstore

The following quotas apply specifically to use of the blobstore.

Blobstore stored data The total amount of data stored in the blobstore. Available for both paid and free apps. Resource Free Default Limit Billing Enabled Default Limit
Blobstore Stored Data 5 GB First 5 GB free; no maximum

Channel

Channel API calls The total number of times the application accessed the Channel service. Channels created The number of channels created by the application. Channel hours requested The number of hours of channel connect time requested by the application. Channel data sent The amount of data sent over the Channel service. This also counts toward the Outgoing Bandwidth quota. Resource Free Default Limit Billing Enabled Default Limit Daily Limit Maximum Rate Daily Limit Maximum Rate
Channel API Calls 657,000 calls 3,000 calls/minute 91,995,495 calls 32,000 calls/minute
Channels Created 100 channels 6 creations/minute Based on your spending limit 60 creations/minute
Channel Hours Requested 200 hours 12 hours requested/minute Based on your spending limit 180 hours requested/minute
Channel Data Sent Up to the Outgoing Bandwidth quota 22 MB/minute 1 TB 740 MB/minute

Code and static data storage

Static data No single static data file may be larger than 32MB. Total storage The storage quota applies to the total amount of code and static data stored by all versions of your app. The total stored size of code and static files is listed in the Main Dashboard table. Individual sizes are displayed on the Versions and Backends screens respectively. Free apps may only upload up to 1 GB of code and static data. Paid apps may upload more, but will be charged $ 0.026 per GB per month for any code and static data storage that exceeds 1 GB.

US/EuropeAsia (Japan)

Resource Cost
Code & Static Data Storage - First 1 GB Free
Code & Static Data Storage - Exceeding 1 GB

Datastore

The Stored Data (billable) quota refers to all data stored for the application in Datastore, Blobstore, and Task Queue. Other quotas in the "Datastore" section of the Quota Details screen in the Google Cloud Platform Console refer specifically to the Datastore service.

Stored data (billable)

The total amount of data stored in datastore entities and corresponding indexes, task queues, and the Blobstore.

It's important to note that data stored in the datastore may incur significant overhead. This overhead depends on the number and types of associated properties, and includes space used by built-in and custom indexes. Each entity stored in the datastore requires the following metadata:

  • The entity key, including the kind, the ID or key name, and the keys of the entity's ancestors.
  • The name and value of each property. Since the datastore is schemaless, the name of each property must be stored with the property value for any given entity.
  • Any built-in and custom index rows that refer to this entity. Each row contains the entity kind, any number of property values depending on the index definition, and the entity key.

See How Entities and Indexes are Stored for a complete breakdown of the metadata required to store entities and indexes at the Bigtable level.

Number of indexes The number of Datastore indexes that exist for the application. This includes indexes that were created in the past and no longer appear in the application's configuration but have not been deleted. See the Datastore limits page for additional details about limits. Write operations The total number of Datastore write operations. Read operations The total number of Datastore read operations. Small operations The total number of Datastore small operations. Small operations include calls to allocate Datastore IDs or keys-only queries.

US/EuropeAsia (Japan)

Resource Free Default Daily Limit Billing Enabled Default Limit
Stored Data (billable) 1 GB *1 GB free; no maximum
Number of Indexes 200 * 200
Entity Reads 50,000
Entity Writes 20,000
Entity Deletes 20,000
Small Operations Unlimited Not applicable

*Not a daily limit but a total limit. Auto-generated single property ascending indexes are not counted towards this limit.

Note: Datastore operations generated by the Datastore Admin and Datastore Viewer count against your application quota.

Deployments

Deployments The number of times the application has been uploaded by a developer. The current quota is 10,000 per day.

An application is limited to 10,000 uploaded files per version. Each file is limited to a maximum size of 32 megabytes. Additionally, if the total size of all files for all versions exceeds the initial free 1 gigabyte, then there will be a $ 0.026 per GB per month charge.

Instance hours

Instance usage is billed by instance uptime, at a given hourly rate. Billable time starts when an instance starts, and ends fifteen minutes after it shuts down. There is no billing for idle instances above the maximum number of idle instances set in the Performance Settings tab of the Cloud Platform Console.

There are separate free daily quotas for frontend and backend instances. Note that when you use the Modules API, the module's instance class determines which quota applies.

Resource or API Call Free Quota
Frontend Instances (Automatic Scaling Modules) 28 free instance-hours per day
Backend Instances (Basic and Manual Scaling Modules) 9 free instance-hours per day

Logs

The Logs API is metered when log data is retrieved, and is available for both paid and free apps.

The logs ingestion allotment refers to request logs and application logs data for an application, and is available for both paid and free apps. Logging for App Engine apps is provided by Stackdriver. See Stackdriver pricing for more information on rates and limits.

Resource Free Default Limit Billing Enabled Default Limit
Logs data retrieval 100 megabytes No maximum for paid app.
Logs ingestion allotment 5 gigabytes Log data kept for a maximum of 7 days. Log data kept for a maximum of 30 days. See Stackdriver pricing for more information.

Mail

App Engine bills for email use "by message," counting each email to each recipient. For example, sending one email to ten recipients counts as ten messages.

Mail API calls The total number of times the application accessed the mail service to send a message. Messages sent The total number of messages that have been sent by the application. Note that the maximum quota for messages sent stays at free levels until the first charge for your application has cleared. Admins Messages Sent The total number of messages to application admins that have been sent by the application. (The total size limit for each admin email, including headers, attachments, and body, is 16KB). Message body data sent The amount of data sent in the body of email messages. This also counts toward the Outgoing Bandwidth quota. Attachments sent The total number of attachments sent with email messages. Attachment data sent The amount of data sent as attachments to email messages. This also counts toward the Outgoing Bandwidth quota. Resource Free default limit Billing enabled default limit Maximum rate for all apps
Mail API calls 10 calls 7,000 calls 32 calls/minute
Recipients emailed 10 messages 100 messages 8 messages/minute
Admins emailed 5,000 mails 5,000 mails 24 mails/minute
Message body data sent 60 MB 60 MB 340 KB/minute
Attachments sent 2,000 attachments 2,000 attachments 8 attachments/minute
Attachment data sent 100 MB 100 MB 10 MB/minute

You can add up to a maximum of 50 authorized senders for the Mail API.

Sending mail above your daily mail quota

If your app needs to send more than 7,000 messages per day, you can use a third-party mail provider, such as SendGrid, Mailjet, or Mailgun, which have higher quotas.

Requests

Outgoing bandwidth (billable)

The amount of data sent by the application in response to requests.

This includes:

  • data served in response to both secure requests and non-secure requests by application servers, static file servers, or the Blobstore
  • data sent in email messages
  • data sent over XMPP or the Channel API
  • data in outgoing HTTP requests sent by the URL fetch service.
Incoming bandwidth

The amount of data received by the application from requests. Each incoming HTTP request can be no larger than 32MB.

This includes:

  • data received by the application in secure requests and non-secure requests
  • uploads to the Blobstore
  • data received in response to HTTP requests by the URL fetch service
Secure outgoing bandwidth The amount of data sent by the application over a secure connection in response to requests. Secure outgoing bandwidth also counts toward the Outgoing Bandwidth quota. Secure incoming bandwidth The amount of data received by the application over a secure connection from requests. Secure incoming bandwidth also counts toward the Incoming Bandwidth quota. Resource Free Default Limit Billing Enabled Default Limit Daily Limit Maximum Rate Daily Limit Maximum Rate
Outgoing Bandwidth (billable, includes HTTPS) 1 GB 56 MB/minute 1 GB free; 14,400 GB maximum 10 GB/minute
Incoming Bandwidth (includes HTTPS) 1 GB; 14,400 GB maximum 56 MB/minute None None

Search

Free quotas for Search are listed in the table below. Refer to the Java, Python, and Go documentation for a detailed description of each type of Search call.

Once billing is turned on, Search API resources are charged according to the rates on the pricing schedule.

Resource or API Call Free Quota
Total Storage (Documents and Indexes) 0.25 GB
Queries 1000 queries per day
Adding documents to Indexes 0.01 GB per day

The application console quota section displays a raw count of API requests. Note that when indexing multiple documents in a single call, the call count is increased by the number of documents.

The Search API imposes these limits to ensure the reliability of the service:

  • 100 aggregated minutes of query execution time per minute, within an app and an index.
  • 15,000 Documents added/deleted per minute
In addition, there is a limit of 10GB storage per index. When an app tries to exceed this amount, an insufficient quota error is returned. This limit may be increased to up to 200GB by submitting a request.

Note: Although these limits are enforced by the minute, the Cloud Platform Console displays the daily totals for each. Customers with Silver, Gold, or Platinum support can request higher throughput limits by contacting their support representative.

Sockets

Daily data and per-minute (burst) data limits Applications using sockets are rate limited on a per minute and a per day basis. Per minute limits are set to handle burst behavior from applications. Resource Per Day Limits Per Minute (Burst) Limits
Socket Bind Count3,456,00019,200
Socket Create Count3,456,00019,200
Socket Connect Count3,456,00019,200
Socket Send Count663,552,0003,686,400
Socket Receive Count663,552,0003,686,400
Socket Bytes Received3.3 TB2.4 GB
Socket Bytes Sent3.3 TB2.4 GB

Task Queue

Task Queue API calls The total number of times the application called the Task Queue API to enqueue a task. Task Queue stored task count The total number of tasks the application has enqueued that are not yet executed. Task Queue stored task bytes The bytes consumed by tasks the application has enqueued that are not yet executed. This quota is counted as part of Stored Data (billable).

When a task executes, its associated requests count toward the application request quotas

These limits apply to all task queues:

Resource Free Default Limit Billing Enabled Default Limit Daily Limit Maximum Rate Daily Limit Maximum Rate
Task Queue API Calls 100,000 n/a 1,000,000,000 n/a
Task Queue Management Calls (using the Cloud Platform Console) 10,000 n/a 10,000 n/a
Resource Free Default Limit Billing Enabled Default Limit
Task Queue Stored Task Count 1,000,000 10,000,000,000
Task Queue Stored Task Bytes 500 MB. Configurable up to 1 GB. None. Configurable up to the Stored Data (billable).
Maximum number of queues (includes both push and pull queues but not the default queue) 10 queues. 100 queues.

Note: Once a task has been executed or deleted, the storage it uses is freed. Your storage quota is updated at regular intervals and might not show the reclaimed space immediately. You can configure the Stored Task Bytes Limit by adjusting your queue configuration. See the Python, Java, or Go, or PHP documentation for more details.

The following limits apply to task queues according to their type:

Push Queue Limits
Maximum task size100KB
Queue execution rate500 task invocations per second per queue
Maximum countdown/ETA for a task30 days from the current date and time
Maximum number of tasks that can be added in a batch100 tasks
Maximum number of tasks that can be added in a transaction5 tasks
Default maximum number of task queues100 queues. Contact Support to request an increase.
Pull Queue Limits
Maximum task size1MB
Maximum countdown/ETA for a task 30 days from the current date and time
Maximum number of tasks that can be added in a batch 100 tasks
Maximum number of tasks that can be added in a transaction 5 tasks
Maximum number of tasks that you can lease in a single operation 1000 tasks
Maximum payload size when leasing a batch of tasks32MB (1MB when using the REST API)
Default maximum number of task queues100 queues. Contact Support to request an increase.

URL Fetch

URL Fetch API calls The total number of times the application accessed the URL fetch service to perform an HTTP or HTTPS request. URL Fetch data sent The amount of data sent to the URL fetch service in requests. This also counts toward the Outgoing Bandwidth quota. URL Fetch data received The amount of data received from the URL fetch service in responses. This also counts toward the Incoming Bandwidth quota. Resource Free Default Limit Billing Enabled Default Limit Daily Limit Maximum Rate Daily Limit Maximum Rate
UrlFetch API Calls 657,000 calls 3,000 calls/minute 860,000,000 calls 660,000 calls/minute
UrlFetch Data Sent 4 GB 22 MB/minute 4.5 TB 3,600 MB/minute
UrlFetch Data Received 4 GB 22 MB/minute 4.5 TB 3,600 MB/minute

XMPP

XMPP API calls The total number of times the application accessed the XMPP service. XMPP data sent The amount of data sent via the XMPP service. This also counts toward the Outgoing Bandwidth quota. Recipients messaged The total number of recipients to whom the application has sent XMPP messages. Invitations sent The total number of chat invitations sent by the application. Stanzas sent XMPP stanzas sent when the application sends a message, invitation, or presence information. Resource Free Default Limit Billing Enabled Default Limit Daily Limit Maximum Rate Daily Limit Maximum Rate
XMPP API Calls 46,000,000 calls 257,280 calls/minute 46,000,000 calls 257,280 calls/minute
XMPP Data Sent 1 GB 5.81 GB/minute 1,046 GB 5.81 GB/minute
XMPP Recipients Messaged 46,000,000 recipients 257,280 recipients/minute 46,000,000 recipients 257,280 recipients/minute
XMPP Invitations Sent 100,000 invitations 2,000 invitations/minute 100,000 invitations 2,000 invitations/minute
XMPP Stanzas Sent 10,000 stanzas n/a Based on your spending limit n/a

cloud.google.com

Gmail Service  |  Apps Script  |  Google Developers

MethodReturn typeBrief description createDraft(recipient, subject, body)GmailDraftCreates a draft email message. createDraft(recipient, subject, body, options)GmailDraftCreates a draft email message with optional arguments. createLabel(name)GmailLabelCreate a new user label of the given name. deleteLabel(label)GmailAppDeletes the specified label. getAliases()String[]Gets a list of the emails that are set up as aliases for this account in Gmail. getChatThreads()GmailThread[]Retrieves all chat threads irrespective of labels. getChatThreads(start, max)GmailThread[]Retrieves a range of chat threads irrespective of labels. getDraft(draftId)GmailDraftRetrieve an email message draft by ID. getDraftMessages()GmailMessage[]Retrieves all draft messages. getDrafts()GmailDraft[]Gets all Gmail draft messages. getInboxThreads()GmailThread[]Retrieves all Inbox threads irrespective of labels. getInboxThreads(start, max)GmailThread[]Retrieves a range of Inbox threads irrespective of labels. getInboxUnreadCount()IntegerGets the number of unread threads in the inbox. getMessageById(id)GmailMessageGets a message by ID. getMessagesForThread(thread)GmailMessage[]Retrieve all messages in the specified thread. getMessagesForThreads(threads)GmailMessage[][]Retrieve all messages in the specified threads. getPriorityInboxThreads()GmailThread[]Retrieves all Priority Inbox threads irrespective of labels. getPriorityInboxThreads(start, max)GmailThread[]Retrieves a range of Priority Inbox threads irrespective of labels. getPriorityInboxUnreadCount()IntegerGets the number of unread threads in the Priority Inbox. getSpamThreads()GmailThread[]Retrieves all spam threads irrespective of labels. getSpamThreads(start, max)GmailThread[]Retrieves a range of spam threads irrespective of labels. getSpamUnreadCount()IntegerGets the number of unread threads that are spam. getStarredThreads()GmailThread[]Retrieves all starred threads irrespective of labels. getStarredThreads(start, max)GmailThread[]Retrieves a range of starred threads irrespective of labels. getStarredUnreadCount()IntegerGets the number of unread threads that are starred. getThreadById(id)GmailThreadGets a thread by ID. getTrashThreads()GmailThread[]Retrieves all trash threads irrespective of labels. getTrashThreads(start, max)GmailThread[]Retrieves a range of trash threads irrespective of labels. getUserLabelByName(name)GmailLabelRetrieves a label given the label name. getUserLabels()GmailLabel[]Retrieves a list of user-created labels. markMessageRead(message)GmailAppMarks this message read and forces the message to refresh. markMessageUnread(message)GmailAppMarks this message unread and forces the message to refresh. markMessagesRead(messages)GmailAppMarks these messages read and forces the messages to refresh. markMessagesUnread(messages)GmailAppMarks these messages unread and forces the messages to refresh. markThreadImportant(thread)GmailAppMarks this thread as important and forces the thread to refresh. markThreadRead(thread)GmailAppMarks this thread as read and forces the thread to refresh. markThreadUnimportant(thread)GmailAppMarks this thread as unimportant and forces the thread to refresh. markThreadUnread(thread)GmailAppMarks this thread unread and forces the thread to refresh. markThreadsImportant(threads)GmailAppMarks these threads as important and forces the threads to refresh. markThreadsRead(threads)GmailAppMarks these threads as read and forces the threads to refresh. markThreadsUnimportant(threads)GmailAppMarks these threads as unimportant and forces the threads to refresh. markThreadsUnread(threads)GmailAppMarks these threads as unread and forces the threads to refresh. moveMessageToTrash(message)GmailAppMoves the message to the trash and forces the message to refresh. moveMessagesToTrash(messages)GmailAppMoves the specified messages to the trash and forces the messages to refresh. moveThreadToArchive(thread)GmailAppMoves this thread to the archive and forces the thread to refresh. moveThreadToInbox(thread)GmailAppMoves this thread to the inbox and forces the thread to refresh. moveThreadToSpam(thread)GmailAppMoves this thread to spam and forces the thread to refresh. moveThreadToTrash(thread)GmailAppMoves this thread to the trash and forces the thread to refresh. moveThreadsToArchive(threads)GmailAppMoves these threads to the archive and forces the threads to refresh. moveThreadsToInbox(threads)GmailAppMoves these threads to the inbox and forces the threads to refresh. moveThreadsToSpam(threads)GmailAppMoves these threads to spam and forces the threads to refresh. moveThreadsToTrash(threads)GmailAppMoves these threads to the trash and forces the threads to refresh. refreshMessage(message)GmailAppReloads the message and associated state from Gmail (useful in case the labels, read state, etc., have changed). refreshMessages(messages)GmailAppReloads the messages and associated state from Gmail (useful in case the labels, read state, etc., have changed). refreshThread(thread)GmailAppReloads the thread and associated state from Gmail (useful in case the labels, read state, etc., have changed). refreshThreads(threads)GmailAppReloads the threads and associated state from Gmail (useful in case the labels, read state, etc., have changed). search(query)GmailThread[]Search Gmail with the given query. search(query, start, max)GmailThread[]Search Gmail with the given query. sendEmail(recipient, subject, body)GmailAppSends an email message. sendEmail(recipient, subject, body, options)GmailAppSends an email message with optional arguments. starMessage(message)GmailAppAdds a star to this message and forces the message to refresh. starMessages(messages)GmailAppAdds stars to these messages and forces the messages to refresh. unstarMessage(message)GmailAppRemoves a star from this message and forces the message to refresh. unstarMessages(messages)GmailAppRemoves stars from these messages and forces the messages to refresh.

developers.google.com

Spreadsheet Service  |  Apps Script  |  Google Developers

MethodReturn typeBrief description activate()RangeMake this range the active range. autoFill(destination, series)voidFills the destinationRange with data based on the data in this range. autoFillToNeighbor(series)voidCalculates a range to fill with new data based on neighboring cells and automatically fills that range with new values based on the data contained in this range. breakApart()RangeBreak any multi-column cells in the range into individual cells again. canEdit()BooleanDetermines whether the user has permission to edit every cell in the range. clear()RangeClears the range of contents, formats, and data-validation rules. clear(options)RangeClears the range of contents, format, data-validation rules, and/or comments, as specified with the given advanced options. clearContent()RangeClears the content of the range, leaving the formatting intact. clearDataValidations()RangeClears the data-validation rules for the range. clearFormat()RangeClears formatting for this range. clearNote()RangeClears the note in the given cell or cells. copyFormatToRange(gridId, column, columnEnd, row, rowEnd)voidCopy the formatting of the range to the given location. copyFormatToRange(sheet, column, columnEnd, row, rowEnd)voidCopy the formatting of the range to the given location. copyTo(destination)voidCopies the data from a range of cells to another range of cells. copyTo(destination, options)voidCopies the data from a range of cells to another range of cells. copyValuesToRange(gridId, column, columnEnd, row, rowEnd)voidCopy the content of the range to the given location. copyValuesToRange(sheet, column, columnEnd, row, rowEnd)voidCopy the content of the range to the given location. getA1Notation()StringReturns a string description of the range, in A1 notation. getBackground()StringReturns the background color of the top-left cell in the range (i.e., '#ffffff'). getBackgrounds()String[][]Returns the background colors of the cells in the range (i.e., '#ffffff'). getCell(row, column)RangeReturns a given cell within a range. getColumn()IntegerReturns the starting column position for this range. getDataSourceUrl()StringReturns a URL for the data in this range, which can be used to create charts and queries. getDataTable()DataTableReturn the data inside this object as a DataTable. getDataTable(firstRowIsHeader)DataTableReturn the data inside this Range as a DataTable. getDataValidation()DataValidationReturns the data-validation rule for the top-left cell in the range. getDataValidations()DataValidation[][]Returns the data-validation rules for all cells in the range. getDisplayValue()StringReturns the displayed value of the top-left cell in the range. getDisplayValues()String[][]Returns the rectangular grid of values for this range. getFontColor()StringReturns the font color of the cell in the top-left corner of the range, in CSS notation (like '#ffffff' or 'white'). getFontColors()String[][]Returns the font colors of the cells in the range in CSS notation (like '#ffffff' or 'white'). getFontFamilies()String[][]Returns the font families of the cells in the range. getFontFamily()StringReturns the font family of the cell in the top-left corner of the range. getFontLine()StringGets the line style of the cell in the top-left corner of the range ('underline', 'line-through', or 'none'). getFontLines()String[][]Gets the line style of the cells in the range ('underline', 'line-through', or 'none'). getFontSize()IntegerReturns the font size in point size of the cell in the top-left corner of the range. getFontSizes()Integer[][]Returns the font sizes of the cells in the range. getFontStyle()StringReturns the font style ('italic' or 'normal') of the cell in the top-left corner of the range. getFontStyles()String[][]Returns the font styles of the cells in the range. getFontWeight()StringReturns the font weight (normal/bold) of the cell in the top-left corner of the range. getFontWeights()String[][]Returns the font weights of the cells in the range. getFormula()StringReturns the formula (A1 notation) for the top-left cell of the range, or an empty string if the cell is empty or doesn't contain a formula. getFormulaR1C1()StringReturns the formula (R1C1 notation) for a given cell, or null if none. getFormulas()String[][]Returns the formulas (A1 notation) for the cells in the range. getFormulasR1C1()String[][]Returns the formulas (R1C1 notation) for the cells in the range. getGridId()IntegerReturns the grid ID of the range's parent sheet. getHeight()IntegerReturns the height of the range. getHorizontalAlignment()StringReturns the horizontal alignment of the text (left/center/right) of the cell in the top-left corner of the range. getHorizontalAlignments()String[][]Returns the horizontal alignments of the cells in the range. getLastColumn()IntegerReturns the end column position. getLastRow()IntegerReturns the end row position. getMergedRanges()Range[]Returns an array of Range objects representing merged cells that either are fully within the current range, or contain at least one cell in the current range." getNote()StringReturns the note associated with the given range. getNotes()String[][]Returns the notes associated with the cells in the range. getNumColumns()IntegerReturns the number of columns in this range. getNumRows()IntegerReturns the number of rows in this range. getNumberFormat()StringGet the number or date formatting of the top-left cell of the given range. getNumberFormats()String[][]Returns the number or date formats for the cells in the range. getRow()IntegerReturns the row position for this range. getRowIndex()IntegerReturns the row position for this range. getSheet()SheetReturns the sheet this range belongs to. getValue()ObjectReturns the value of the top-left cell in the range. getValues()Object[][]Returns the rectangular grid of values for this range. getVerticalAlignment()StringReturns the vertical alignment (top/middle/bottom) of the cell in the top-left corner of the range. getVerticalAlignments()String[][]Returns the vertical alignments of the cells in the range. getWidth()IntegerReturns the width of the range in columns. getWrap()BooleanReturns the wrapping policy of the cell in the top-left corner of the range. getWraps()Boolean[][]Returns the wrapping policy of the cells in the range. isBlank()BooleanReturns true if the range is totally blank. isEndColumnBounded()BooleanDetermines whether the end of the range is bound to a particular column. isEndRowBounded()BooleanDetermines whether the end of the range is bound to a particular row. isPartOfMerge()BooleanReturns true if the cells in the current range overlap any merged cells. isStartColumnBounded()BooleanDetermines whether the start of the range is bound to a particular column. isStartRowBounded()BooleanDetermines whether the start of the range is bound to a particular row. merge()RangeMerges the cells in the range together into a single block. mergeAcross()RangeMerge the cells in the range across the columns of the range. mergeVertically()RangeMerges the cells in the range together. moveTo(target)voidCut and paste (both format and values) from this range to the target range. offset(rowOffset, columnOffset)RangeReturns a new range that is offset from this range by the given number of rows and columns (which can be negative). offset(rowOffset, columnOffset, numRows)RangeReturns a new range that is relative to the current range, whose upper left point is offset from the current range by the given rows and columns, and with the given height in cells. offset(rowOffset, columnOffset, numRows, numColumns)RangeReturns a new range that is relative to the current range, whose upper left point is offset from the current range by the given rows and columns, and with the given height and width in cells. protect()ProtectionCreates an object that can protect the range from being edited except by users who have permission. randomize()RangeRandomizes the order of the rows in the given range. setBackground(color)RangeSets the background color of all cells in the range in CSS notation (like '#ffffff' or 'white'). setBackgroundRGB(red, green, blue)RangeSets the background to the given RGB color. setBackgrounds(color)RangeSets a rectangular grid of background colors (must match dimensions of this range). setBorder(top, left, bottom, right, vertical, horizontal)RangeSets the border property. setBorder(top, left, bottom, right, vertical, horizontal, color, style)RangeSets the border property with color and/or style. setDataValidation(rule)RangeSets one data-validation rule for all cells in the range. setDataValidations(rules)RangeSets the data-validation rules for all cells in the range. setFontColor(color)RangeSets the font color in CSS notation (like '#ffffff' or 'white'). setFontColors(colors)RangeSets a rectangular grid of font colors (must match dimensions of this range). setFontFamilies(fontFamilies)RangeSets a rectangular grid of font families (must match dimensions of this range). setFontFamily(fontFamily)RangeSets the font family, such as "Arial" or "Helvetica". setFontLine(fontLine)RangeSets the font line style of the given range ('underline', 'line-through', or 'none'). setFontLines(fontLines)RangeSets a rectangular grid of line styles (must match dimensions of this range). setFontSize(size)RangeSets the font size, with the size being the point size to use. setFontSizes(sizes)RangeSets a rectangular grid of font sizes (must match dimensions of this range). setFontStyle(fontStyle)RangeSet the font style for the given range ('italic' or 'normal'). setFontStyles(fontStyles)RangeSets a rectangular grid of font styles (must match dimensions of this range). setFontWeight(fontWeight)RangeSet the font weight for the given range (normal/bold). setFontWeights(fontWeights)RangeSets a rectangular grid of font weights (must match dimensions of this range). setFormula(formula)RangeUpdates the formula for this range. setFormulaR1C1(formula)RangeUpdates the formula for this range. setFormulas(formulas)RangeSets a rectangular grid of formulas (must match dimensions of this range). setFormulasR1C1(formulas)RangeSets a rectangular grid of formulas (must match dimensions of this range). setHorizontalAlignment(alignment)RangeSet the horizontal (left to right) alignment for the given range (left/center/right). setHorizontalAlignments(alignments)RangeSets a rectangular grid of horizontal alignments. setNote(note)RangeSets the note to the given value. setNotes(notes)RangeSets a rectangular grid of notes (must match dimensions of this range). setNumberFormat(numberFormat)RangeSets the number or date format to the given formatting string. setNumberFormats(numberFormats)RangeSets a rectangular grid of number or date formats (must match dimensions of this range). setValue(value)RangeSets the value of the range. setValues(values)RangeSets a rectangular grid of values (must match dimensions of this range). setVerticalAlignment(alignment)RangeSet the vertical (top to bottom) alignment for the given range (top/middle/bottom). setVerticalAlignments(alignments)RangeSets a rectangular grid of vertical alignments (must match dimensions of this range). setWrap(isWrapEnabled)RangeSet the cell wrap of the given range. setWraps(isWrapEnabled)RangeSets a rectangular grid of word wrap policies (must match dimensions of this range). sort(sortSpecObj)RangeSorts the cells in the given range.

developers.google.com

Quotas for Google Services  |  Apps Script  |  Google Developers

Apps Script services impose daily quotas and hard limitations on some features. If you exceed a quota or limitation, your script will throw an exception and terminate execution.

Current quotas

Quotas are set at different levels for users of consumer accounts (like gmail.com), Google Apps free edition (discontinued), or G Suite.

Daily quotas are refreshed at the end of a 24-hour window; the exact time of this refresh, however, varies between users.

The table below lists the daily quotas as of December 2016. You can confirm the current on the Quota Limits tab of the Apps Script Dashboard. The quotas shown below are provided solely to assist you in testing scripts. All quotas are subject to elimination, reduction, or change at any time, without notice.

Feature Consumer (gmail.com) Google Apps free edition (legacy) G Suite Early Access
Calendar events created 5,000 / day 10,000 / day 10,000 / day Flexible
Contacts created 1,000 / day 2,000 / day 2,000 / day Flexible
Documents created 250 / day 500 / day 1,500 / day Flexible
Email recipients per day 100* / day 100* / day 1,500* / day 1,500* / day
Email read/write (excluding send) 20,000 / day 40,000 / day 50,000 / day Flexible
Groups read 2,000 / day 5,000 / day 10,000 / day Flexible
JDBC connection 10,000 / day 10,000 / day 50,000 / day Flexible
JDBC failed connection 100 / day 100 / day 500 / day 500 / day
Properties read/write 50,000 / day 100,000 / day 500,000 / day Flexible
Spreadsheets created 250 / day 500 / day 3,200 / day Flexible
Triggers total runtime 90 min / day 3 hr / day 6 hr / day 6 hr / day
URL Fetch calls 20,000 / day 50,000 / day 100,000 / day Flexible
URL Fetch data received 100MB / day 100MB / day 100MB / day 100MB / day
Note: Newly created G Suite domains are subject to the consumer limit for the first billing cycle if they have six or more users, or several billing cycles if they have fewer users. For more information, see the Help Center page on sending limits.

Current limitations

The table below lists hard limitations as of December 2016. The limits shown below are provided solely to assist you in testing scripts. All limits are subject to elimination, reduction, or change at any time, without notice.

Feature Consumer (gmail.com) Google Apps free edition (legacy) G Suite Basic/Business/Edu/Gov Early Access
Script runtime 6 min / execution 6 min / execution 6 min / execution 30 min / execution
Custom function runtime 30 sec / execution 30 sec / execution 30 sec / execution 30 sec / execution
Email attachments 250 / msg 250 / msg 250 / msg 250 / msg
Email body size 200kB / msg 200kB / msg 400kB / msg 400kB / msg
Email recipients per message 50 / msg 50 / msg 50 / msg 50 / msg
Email total attachments size 25MB / msg 25MB / msg 25MB / msg 25MB / msg
Properties value size 9kB / val 9kB / val 9kB / val 9kB / val
Properties total storage 500kB / property store 500kB / property store 500kB / property store 500kB / property store
Triggers 20 / user / script 20 / user / script 20 / user / script 20 / user / script
URL Fetch headers 100 / call 100 / call 100 / call 100 / call
URL Fetch header size 8kB / call 8kB / call 8kB / call 8kB / call
URL Fetch POST size 10MB / call 10MB / call 10MB / call 10MB / call
URL Fetch URL length 2kB / call 2kB / call 2kB / call 2kB / call

Flexible Quotas Early Access

This feature is part of the Early Access feature set. As such only some developers currently have access to it.

Normally, if a script execution exceeds one of the above quotas or limitations, the script execution stops and an appropriate error message is returned. This can potentially leave the script's data in an indefinite state.

Under the flexible quota system, such hard quota limits are removed. Scripts do not stop when they reach a quota limit. Rather, they are delayed until quota becomes available, at which point the script execution resumes. Once quotas begin being used, they are refilled at a regular rate. For reasonable usage, script delays are rare.

Exception messages

If a script reaches a quota or limitation, it will throw an exception with a message similar to the following:

  • Limit exceeded: Email Attachments Per Message. This indicates that the script exceeded one of the quotas or limitations listed above.
  • Service invoked too many times: Calendar. This indicates that the script called the given service too many times in one day.
  • Service invoked too many times in a short time: Calendar. Try Utilities.sleep(1000) between calls. This indicates that the script called the given service too many times in a short period.
  • Service using too much computer time for one day. This indicates that the script exceeded the total allowable execution time for one day. It most commonly occurs for scripts that run on a trigger, which have a lower daily limit than scripts executed manually.
  • Script invoked too many times per second for this Google user account. This indicates that the script began executing too many times in a short period. It most commonly occurs for custom functions that are called repeatedly in a single spreadsheet. To avoid this error, code your custom functions so that they only need to be called once per range of data, as explained in the guide to custom functions.
  • There are too many scripts running simultaneously for this Google user account. This indicates that you have too many scripts executing at once, although not necessarily the same script. Like the exception above, this most commonly occurs for custom functions that are called repeatedly in a single spreadsheet.

developers.google.com


Смотрите также