Cloud Natural Language offers you some control over where the resources for your project are stored and processed. In particular, you can configure Cloud Natural Language to store your data at rest and perform machine learning processing on your data only in the European Union or the United States.
By default Cloud Natural Language stores and processes resources in a Global location, which means that Cloud Natural Language doesn't guarantee that your resources will remain within a particular location or region. If you choose the European Union location, Google will store your data and perform machine learning with it only in the European Union. If you choose the United States location, Google will store your data and perform machine learning with it only in the United States. You and your users can access the data from any location.
Setting the location using the API
Cloud Natural Language supports a global API endpoint (language.googleapis.com
),
a European Union endpoint (eu-language.googleapis.com
), and a United States
endpoint (us-language.googleapis.com
).
To store and process your data in the European Union only, use the URI
eu-language.googleapis.com
in place of language.googleapis.com
for your REST API calls.
To store and process your data in the United States only, use the URI
us-language.googleapis.com
in place of language.googleapis.com
for your REST API calls.
Setting the location using client libraries
The client libraries access the global API endpoint (language.googleapis.com
)
by default. To store and process your data in the European Union or United States only, you need to
explicitly set the endpoint. The code samples below show how to configure this setting.
Python
To authenticate to Natural Language, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
Java
Node.js
To authenticate to Natural Language, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.