Skip to main content

apps

Creates, updates, deletes, gets or lists an apps resource.

Overview

Nameapps
TypeResource
Idgoogle.appengine.apps

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
idstringIdentifier of the Application resource. This identifier is equivalent to the project ID of the Google Cloud Platform project where you want to deploy your application. Example: myapp.
namestring
authDomainstringGoogle Apps authentication domain that controls which users can access this application.Defaults to open access for any Google Account.
codeBucketstringOutput only. Google Cloud Storage bucket that can be used for storing files associated with this application. This bucket is associated with the application and can be used by the gcloud deployment commands.@OutputOnly
databaseTypestringThe type of the Cloud Firestore or Cloud Datastore database associated with this application.
defaultBucketstringOutput only. Google Cloud Storage bucket that can be used by this application to store content.@OutputOnly
defaultCookieExpirationstring (google-duration)Cookie expiration policy for this application.
defaultHostnamestringOutput only. Hostname used to reach this application, as resolved by App Engine.@OutputOnly
dispatchRulesarrayHTTP path dispatch rules for requests to the application that do not explicitly target a service or version. Rules are order-dependent. Up to 20 dispatch rules can be supported.
featureSettingsobjectThe feature specific settings to be used in the application. (id: FeatureSettings)
gcrDomainstringOutput only. The Google Container Registry domain used for storing managed build docker images for this application.
generatedCustomerMetadataobjectAdditional Google Generated Customer Metadata, this field won't be provided by default and can be requested by setting the IncludeExtraData field in GetApplicationRequest
iapobjectIdentity-Aware Proxy (id: IdentityAwareProxy)
locationIdstringLocation from which this application runs. Application instances run out of the data centers in the specified location, which is also where all of the application's end user content is stored.Defaults to us-central.View the list of supported locations (https://cloud.google.com/appengine/docs/locations).
serviceAccountstringThe service account associated with the application. This is the app-level default identity. If no identity provided during create version, Admin API will fallback to this one.
servingStatusstringServing status of this application.
sslPolicystringThe SSL policy that will be applied to the application. If set to Modern it will restrict traffic with TLS < 1.2 and allow only Modern Ciphers suite

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectappsIdincludeExtraDataGets information about an application.
createinsertCreates an App Engine application for a Google Cloud Platform project. Required fields: id - The ID of the target Cloud Platform project. location - The region (https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.For more information about App Engine applications, see Managing Projects, Applications, and Billing (https://cloud.google.com/appengine/docs/standard/python/console/).
patchupdateprojectsId, locationsId, applicationsIdupdateMaskUpdates the specified Application resource. You can update the following fields: auth_domain - Google authentication domain for controlling user access to the application. default_cookie_expiration - Cookie expiration policy for the application. iap - Identity-Aware Proxy properties for the application.
repairexecappsIdRecreates the required App Engine features for the specified App Engine application, for example a Cloud Storage bucket or App Engine service account. Use this method if you receive an error message about a missing feature, for example, Error retrieving the App Engine service account. If you have deleted your App Engine service account, this will not be able to recreate it. Instead, you should attempt to use the IAM undelete API if possible at https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/undelete?apix_params=%7B"name"%3A"projects%2F-%2FserviceAccounts%2Funique_id"%2C"resource"%3A%7B%7D%7D . If the deletion was recent, the numeric ID can be found in the Cloud Console Activity Log.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
applicationsIdstring
appsIdstring
locationsIdstring
projectsIdstring
includeExtraDatastring
updateMaskstring (google-fieldmask)

SELECT examples

Gets information about an application.

SELECT
id,
name,
authDomain,
codeBucket,
databaseType,
defaultBucket,
defaultCookieExpiration,
defaultHostname,
dispatchRules,
featureSettings,
gcrDomain,
generatedCustomerMetadata,
iap,
locationId,
serviceAccount,
servingStatus,
sslPolicy
FROM google.appengine.apps
WHERE appsId = '{{ appsId }}' -- required
AND includeExtraData = '{{ includeExtraData }}';

INSERT examples

Creates an App Engine application for a Google Cloud Platform project. Required fields: id - The ID of the target Cloud Platform project. location - The region (https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.For more information about App Engine applications, see Managing Projects, Applications, and Billing (https://cloud.google.com/appengine/docs/standard/python/console/).

INSERT INTO google.appengine.apps (
data__id,
data__dispatchRules,
data__authDomain,
data__locationId,
data__defaultCookieExpiration,
data__servingStatus,
data__serviceAccount,
data__iap,
data__databaseType,
data__featureSettings,
data__generatedCustomerMetadata,
data__sslPolicy
)
SELECT
'{{ id }}',
'{{ dispatchRules }}',
'{{ authDomain }}',
'{{ locationId }}',
'{{ defaultCookieExpiration }}',
'{{ servingStatus }}',
'{{ serviceAccount }}',
'{{ iap }}',
'{{ databaseType }}',
'{{ featureSettings }}',
'{{ generatedCustomerMetadata }}',
'{{ sslPolicy }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates the specified Application resource. You can update the following fields: auth_domain - Google authentication domain for controlling user access to the application. default_cookie_expiration - Cookie expiration policy for the application. iap - Identity-Aware Proxy properties for the application.

UPDATE google.appengine.apps
SET
data__id = '{{ id }}',
data__dispatchRules = '{{ dispatchRules }}',
data__authDomain = '{{ authDomain }}',
data__locationId = '{{ locationId }}',
data__defaultCookieExpiration = '{{ defaultCookieExpiration }}',
data__servingStatus = '{{ servingStatus }}',
data__serviceAccount = '{{ serviceAccount }}',
data__iap = '{{ iap }}',
data__databaseType = '{{ databaseType }}',
data__featureSettings = '{{ featureSettings }}',
data__generatedCustomerMetadata = '{{ generatedCustomerMetadata }}',
data__sslPolicy = '{{ sslPolicy }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND applicationsId = '{{ applicationsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;

Lifecycle Methods

Recreates the required App Engine features for the specified App Engine application, for example a Cloud Storage bucket or App Engine service account. Use this method if you receive an error message about a missing feature, for example, Error retrieving the App Engine service account. If you have deleted your App Engine service account, this will not be able to recreate it. Instead, you should attempt to use the IAM undelete API if possible at https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/undelete?apix_params=%7B"name"%3A"projects%2F-%2FserviceAccounts%2Funique_id"%2C"resource"%3A%7B%7D%7D . If the deletion was recent, the numeric ID can be found in the Cloud Console Activity Log.

EXEC google.appengine.apps.repair 
@appsId='{{ appsId }}' --required;