Google Cloud Appengine Admin V1 Client - Class Version (2.0.0-RC1)

Reference documentation and code samples for the Google Cloud Appengine Admin V1 Client class Version.

A Version resource is a specific set of source code and configuration files that are deployed into a service.

Generated from protobuf message google.appengine.v1.Version

Namespace

Google \ Cloud \ AppEngine \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ name string

Full path to the Version resource in the API. Example: apps/myapp/services/default/versions/v1. @OutputOnly

↳ id string

Relative name of the version within the service. Example: v1. Version names can contain only lowercase letters, numbers, or hyphens. Reserved names: "default", "latest", and any name with the prefix "ah-".

↳ automatic_scaling Google\Cloud\AppEngine\V1\AutomaticScaling

Automatic scaling is based on request rate, response latencies, and other application metrics. Instances are dynamically created and destroyed as needed in order to handle traffic.

↳ basic_scaling Google\Cloud\AppEngine\V1\BasicScaling

A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.

↳ manual_scaling Google\Cloud\AppEngine\V1\ManualScaling

A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time. Manually scaled versions are sometimes referred to as "backends".

↳ inbound_services array

Before an application can receive email or XMPP messages, the application must be configured to enable the service.

↳ instance_class string

Instance class that is used to run this version. Valid values are: * AutomaticScaling: F1, F2, F4, F4_1G * ManualScaling or BasicScaling: B1, B2, B4, B8, B4_1G Defaults to F1 for AutomaticScaling and B1 for ManualScaling or BasicScaling.

↳ network Google\Cloud\AppEngine\V1\Network

Extra network settings. Only applicable in the App Engine flexible environment.

↳ zones array

The Google Compute Engine zones that are supported by this version in the App Engine flexible environment. Deprecated.

↳ resources Google\Cloud\AppEngine\V1\Resources

Machine resources for this version. Only applicable in the App Engine flexible environment.

↳ runtime string

Desired runtime. Example: python27.

↳ runtime_channel string

The channel of the runtime to use. Only available for some runtimes. Defaults to the default channel.

↳ threadsafe bool

Whether multiple requests can be dispatched to this version at once.

↳ vm bool

Whether to deploy this version in a container on a virtual machine.

↳ app_engine_apis bool

Allows App Engine second generation runtimes to access the legacy bundled services.

↳ beta_settings array|Google\Protobuf\Internal\MapField

Metadata settings that are supplied to this version to enable beta runtime features.

↳ env string

App Engine execution environment for this version. Defaults to standard.

↳ serving_status int

Current serving status of this version. Only the versions with a SERVING status create instances and can be billed. SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to SERVING.

↳ created_by string

Email address of the user who created this version. @OutputOnly

↳ create_time Google\Protobuf\Timestamp

Time that this version was created. @OutputOnly

↳ disk_usage_bytes int|string

Total size in bytes of all the files that are included in this version and currently hosted on the App Engine disk. @OutputOnly

↳ runtime_api_version string

The version of the API in the given runtime environment. Please see the app.yaml reference for valid values at https://cloud.google.com/appengine/docs/standard/

↳ runtime_main_executable_path string

The path or name of the app's main executable.

↳ service_account string

The identity that the deployed version will run as. Admin API will use the App Engine Appspot service account as default if this field is neither provided in app.yaml file nor through CLI flag.

↳ handlers array<Google\Cloud\AppEngine\V1\UrlMap>

An ordered list of URL-matching patterns that should be applied to incoming requests. The first matching URL handles the request and other request handlers are not attempted. Only returned in GET requests if view=FULL is set.

↳ error_handlers array<Google\Cloud\AppEngine\V1\ErrorHandler>

Custom static error pages. Limited to 10KB per page. Only returned in GET requests if view=FULL is set.

↳ libraries array<Google\Cloud\AppEngine\V1\Library>

Configuration for third-party Python runtime libraries that are required by the application. Only returned in GET requests if view=FULL is set.

↳ api_config Google\Cloud\AppEngine\V1\ApiConfigHandler

Serving configuration for Google Cloud Endpoints. Only returned in GET requests if view=FULL is set.

↳ env_variables array|Google\Protobuf\Internal\MapField

Environment variables available to the application. Only returned in GET requests if view=FULL is set.

↳ build_env_variables array|Google\Protobuf\Internal\MapField

Environment variables available to the build environment. Only returned in GET requests if view=FULL is set.

↳ default_expiration Google\Protobuf\Duration

Duration that static files should be cached by web proxies and browsers. Only applicable if the corresponding StaticFilesHandler does not specify its own expiration time. Only returned in GET requests if view=FULL is set.

↳ health_check Google\Cloud\AppEngine\V1\HealthCheck

Configures health checking for instances. Unhealthy instances are stopped and replaced with new instances. Only applicable in the App Engine flexible environment. Only returned in GET requests if view=FULL is set.

↳ readiness_check Google\Cloud\AppEngine\V1\ReadinessCheck

Configures readiness health checking for instances. Unhealthy instances are not put into the backend traffic rotation. Only returned in GET requests if view=FULL is set.

↳ liveness_check Google\Cloud\AppEngine\V1\LivenessCheck

Configures liveness health checking for instances. Unhealthy instances are stopped and replaced with new instances Only returned in GET requests if view=FULL is set.

↳ nobuild_files_regex string

Files that match this pattern will not be built into this version. Only applicable for Go runtimes. Only returned in GET requests if view=FULL is set.

↳ deployment Google\Cloud\AppEngine\V1\Deployment

Code and application artifacts that make up this version. Only returned in GET requests if view=FULL is set.

↳ version_url string

Serving URL for this version. Example: "https://myversion-dot-myservice-dot-myapp.appspot.com" @OutputOnly

↳ endpoints_api_service Google\Cloud\AppEngine\V1\EndpointsApiService

Cloud Endpoints configuration. If endpoints_api_service is set, the Cloud Endpoints Extensible Service Proxy will be provided to serve the API implemented by the app.

↳ entrypoint Google\Cloud\AppEngine\V1\Entrypoint

The entrypoint for the application.

↳ vpc_access_connector Google\Cloud\AppEngine\V1\VpcAccessConnector

Enables VPC connectivity for standard apps.

getName

Full path to the Version resource in the API. Example: apps/myapp/services/default/versions/v1.

@OutputOnly

Returns
Type Description
string

setName

Full path to the Version resource in the API. Example: apps/myapp/services/default/versions/v1.

@OutputOnly

Parameter
Name Description
var string
Returns
Type Description
$this

getId

Relative name of the version within the service. Example: v1.

Version names can contain only lowercase letters, numbers, or hyphens. Reserved names: "default", "latest", and any name with the prefix "ah-".

Returns
Type Description
string

setId

Relative name of the version within the service. Example: v1.

Version names can contain only lowercase letters, numbers, or hyphens. Reserved names: "default", "latest", and any name with the prefix "ah-".

Parameter
Name Description
var string
Returns
Type Description
$this

getAutomaticScaling

Automatic scaling is based on request rate, response latencies, and other application metrics. Instances are dynamically created and destroyed as needed in order to handle traffic.

Returns
Type Description
Google\Cloud\AppEngine\V1\AutomaticScaling|null

hasAutomaticScaling

setAutomaticScaling

Automatic scaling is based on request rate, response latencies, and other application metrics. Instances are dynamically created and destroyed as needed in order to handle traffic.

Parameter
Name Description
var Google\Cloud\AppEngine\V1\AutomaticScaling
Returns
Type Description
$this

getBasicScaling

A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.

Returns
Type Description
Google\Cloud\AppEngine\V1\BasicScaling|null

hasBasicScaling

setBasicScaling

A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.

Parameter
Name Description
var Google\Cloud\AppEngine\V1\BasicScaling
Returns
Type Description
$this

getManualScaling

A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time.

Manually scaled versions are sometimes referred to as "backends".

Returns
Type Description
Google\Cloud\AppEngine\V1\ManualScaling|null

hasManualScaling

setManualScaling

A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time.

Manually scaled versions are sometimes referred to as "backends".

Parameter
Name Description
var Google\Cloud\AppEngine\V1\ManualScaling
Returns
Type Description
$this

getInboundServices

Before an application can receive email or XMPP messages, the application must be configured to enable the service.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setInboundServices

Before an application can receive email or XMPP messages, the application must be configured to enable the service.

Parameter
Name Description
var int[]
Returns
Type Description
$this

getInstanceClass

Instance class that is used to run this version. Valid values are:

  • AutomaticScaling: F1, F2, F4, F4_1G
  • ManualScaling or BasicScaling: B1, B2, B4, B8, B4_1G Defaults to F1 for AutomaticScaling and B1 for ManualScaling or BasicScaling.
Returns
Type Description
string

setInstanceClass

Instance class that is used to run this version. Valid values are:

  • AutomaticScaling: F1, F2, F4, F4_1G
  • ManualScaling or BasicScaling: B1, B2, B4, B8, B4_1G Defaults to F1 for AutomaticScaling and B1 for ManualScaling or BasicScaling.
Parameter
Name Description
var string
Returns
Type Description
$this

getNetwork

Extra network settings.

Only applicable in the App Engine flexible environment.

Returns
Type Description
Google\Cloud\AppEngine\V1\Network|null

hasNetwork

clearNetwork

setNetwork

Extra network settings.

Only applicable in the App Engine flexible environment.

Parameter
Name Description
var Google\Cloud\AppEngine\V1\Network
Returns
Type Description
$this

getZones

The Google Compute Engine zones that are supported by this version in the App Engine flexible environment. Deprecated.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setZones

The Google Compute Engine zones that are supported by this version in the App Engine flexible environment. Deprecated.

Parameter
Name Description
var string[]
Returns
Type Description
$this

getResources

Machine resources for this version.

Only applicable in the App Engine flexible environment.

Returns
Type Description
Google\Cloud\AppEngine\V1\Resources|null

hasResources

clearResources

setResources

Machine resources for this version.

Only applicable in the App Engine flexible environment.

Parameter
Name Description
var Google\Cloud\AppEngine\V1\Resources
Returns
Type Description
$this

getRuntime

Desired runtime. Example: python27.

Returns
Type Description
string

setRuntime

Desired runtime. Example: python27.

Parameter
Name Description
var string
Returns
Type Description
$this

getRuntimeChannel

The channel of the runtime to use. Only available for some runtimes. Defaults to the default channel.

Returns
Type Description
string

setRuntimeChannel

The channel of the runtime to use. Only available for some runtimes. Defaults to the default channel.

Parameter
Name Description
var string
Returns
Type Description
$this

getThreadsafe

Whether multiple requests can be dispatched to this version at once.

Returns
Type Description
bool

setThreadsafe

Whether multiple requests can be dispatched to this version at once.

Parameter
Name Description
var bool
Returns
Type Description
$this

getVm

Whether to deploy this version in a container on a virtual machine.

Returns
Type Description
bool

setVm

Whether to deploy this version in a container on a virtual machine.

Parameter
Name Description
var bool
Returns
Type Description
$this

getAppEngineApis

Allows App Engine second generation runtimes to access the legacy bundled services.

Returns
Type Description
bool

setAppEngineApis

Allows App Engine second generation runtimes to access the legacy bundled services.

Parameter
Name Description
var bool
Returns
Type Description
$this

getBetaSettings

Metadata settings that are supplied to this version to enable beta runtime features.

Returns
Type Description
Google\Protobuf\Internal\MapField

setBetaSettings

Metadata settings that are supplied to this version to enable beta runtime features.

Parameter
Name Description
var array|Google\Protobuf\Internal\MapField
Returns
Type Description
$this

getEnv

App Engine execution environment for this version.

Defaults to standard.

Returns
Type Description
string

setEnv

App Engine execution environment for this version.

Defaults to standard.

Parameter
Name Description
var string
Returns
Type Description
$this

getServingStatus

Current serving status of this version. Only the versions with a SERVING status create instances and can be billed.

SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to SERVING.

Returns
Type Description
int

setServingStatus

Current serving status of this version. Only the versions with a SERVING status create instances and can be billed.

SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to SERVING.

Parameter
Name Description
var int
Returns
Type Description
$this

getCreatedBy

Email address of the user who created this version.

@OutputOnly

Returns
Type Description
string

setCreatedBy

Email address of the user who created this version.

@OutputOnly

Parameter
Name Description
var string
Returns
Type Description
$this

getCreateTime

Time that this version was created.

@OutputOnly

Returns
Type Description
Google\Protobuf\Timestamp|null

hasCreateTime

clearCreateTime

setCreateTime

Time that this version was created.

@OutputOnly

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getDiskUsageBytes

Total size in bytes of all the files that are included in this version and currently hosted on the App Engine disk.

@OutputOnly

Returns
Type Description
int|string

setDiskUsageBytes

Total size in bytes of all the files that are included in this version and currently hosted on the App Engine disk.

@OutputOnly

Parameter
Name Description
var int|string
Returns
Type Description
$this

getRuntimeApiVersion

The version of the API in the given runtime environment. Please see the app.yaml reference for valid values at https://cloud.google.com/appengine/docs/standard/

Returns
Type Description
string

setRuntimeApiVersion

The version of the API in the given runtime environment. Please see the app.yaml reference for valid values at https://cloud.google.com/appengine/docs/standard/

Parameter
Name Description
var string
Returns
Type Description
$this

getRuntimeMainExecutablePath

The path or name of the app's main executable.

Returns
Type Description
string

setRuntimeMainExecutablePath

The path or name of the app's main executable.

Parameter
Name Description
var string
Returns
Type Description
$this

getServiceAccount

The identity that the deployed version will run as.

Admin API will use the App Engine Appspot service account as default if this field is neither provided in app.yaml file nor through CLI flag.

Returns
Type Description
string

setServiceAccount

The identity that the deployed version will run as.

Admin API will use the App Engine Appspot service account as default if this field is neither provided in app.yaml file nor through CLI flag.

Parameter
Name Description
var string
Returns
Type Description
$this

getHandlers

An ordered list of URL-matching patterns that should be applied to incoming requests. The first matching URL handles the request and other request handlers are not attempted.

Only returned in GET requests if view=FULL is set.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setHandlers

An ordered list of URL-matching patterns that should be applied to incoming requests. The first matching URL handles the request and other request handlers are not attempted.

Only returned in GET requests if view=FULL is set.

Parameter
Name Description
var array<Google\Cloud\AppEngine\V1\UrlMap>
Returns
Type Description
$this

getErrorHandlers

Custom static error pages. Limited to 10KB per page.

Only returned in GET requests if view=FULL is set.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setErrorHandlers

Custom static error pages. Limited to 10KB per page.

Only returned in GET requests if view=FULL is set.

Parameter
Name Description
var array<Google\Cloud\AppEngine\V1\ErrorHandler>
Returns
Type Description
$this

getLibraries

Configuration for third-party Python runtime libraries that are required by the application.

Only returned in GET requests if view=FULL is set.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setLibraries

Configuration for third-party Python runtime libraries that are required by the application.

Only returned in GET requests if view=FULL is set.

Parameter
Name Description
var array<Google\Cloud\AppEngine\V1\Library>
Returns
Type Description
$this

getApiConfig

Serving configuration for Google Cloud Endpoints.

Only returned in GET requests if view=FULL is set.

Returns
Type Description
Google\Cloud\AppEngine\V1\ApiConfigHandler|null

hasApiConfig

clearApiConfig

setApiConfig

Serving configuration for Google Cloud Endpoints.

Only returned in GET requests if view=FULL is set.

Parameter
Name Description
var Google\Cloud\AppEngine\V1\ApiConfigHandler
Returns
Type Description
$this

getEnvVariables

Environment variables available to the application.

Only returned in GET requests if view=FULL is set.

Returns
Type Description
Google\Protobuf\Internal\MapField

setEnvVariables

Environment variables available to the application.

Only returned in GET requests if view=FULL is set.

Parameter
Name Description
var array|Google\Protobuf\Internal\MapField
Returns
Type Description
$this

getBuildEnvVariables

Environment variables available to the build environment.

Only returned in GET requests if view=FULL is set.

Returns
Type Description
Google\Protobuf\Internal\MapField

setBuildEnvVariables

Environment variables available to the build environment.

Only returned in GET requests if view=FULL is set.

Parameter
Name Description
var array|Google\Protobuf\Internal\MapField
Returns
Type Description
$this

getDefaultExpiration

Duration that static files should be cached by web proxies and browsers.

Only applicable if the corresponding StaticFilesHandler does not specify its own expiration time. Only returned in GET requests if view=FULL is set.

Returns
Type Description
Google\Protobuf\Duration|null

hasDefaultExpiration

clearDefaultExpiration

setDefaultExpiration

Duration that static files should be cached by web proxies and browsers.

Only applicable if the corresponding StaticFilesHandler does not specify its own expiration time. Only returned in GET requests if view=FULL is set.

Parameter
Name Description
var Google\Protobuf\Duration
Returns
Type Description
$this

getHealthCheck

Configures health checking for instances. Unhealthy instances are stopped and replaced with new instances.

Only applicable in the App Engine flexible environment. Only returned in GET requests if view=FULL is set.

Returns
Type Description
Google\Cloud\AppEngine\V1\HealthCheck|null

hasHealthCheck

clearHealthCheck

setHealthCheck

Configures health checking for instances. Unhealthy instances are stopped and replaced with new instances.

Only applicable in the App Engine flexible environment. Only returned in GET requests if view=FULL is set.

Parameter
Name Description
var Google\Cloud\AppEngine\V1\HealthCheck
Returns
Type Description
$this

getReadinessCheck

Configures readiness health checking for instances.

Unhealthy instances are not put into the backend traffic rotation. Only returned in GET requests if view=FULL is set.

Returns
Type Description
Google\Cloud\AppEngine\V1\ReadinessCheck|null

hasReadinessCheck

clearReadinessCheck

setReadinessCheck

Configures readiness health checking for instances.

Unhealthy instances are not put into the backend traffic rotation. Only returned in GET requests if view=FULL is set.

Parameter
Name Description
var Google\Cloud\AppEngine\V1\ReadinessCheck
Returns
Type Description
$this

getLivenessCheck

Configures liveness health checking for instances.

Unhealthy instances are stopped and replaced with new instances Only returned in GET requests if view=FULL is set.

Returns
Type Description
Google\Cloud\AppEngine\V1\LivenessCheck|null

hasLivenessCheck

clearLivenessCheck

setLivenessCheck

Configures liveness health checking for instances.

Unhealthy instances are stopped and replaced with new instances Only returned in GET requests if view=FULL is set.

Parameter
Name Description
var Google\Cloud\AppEngine\V1\LivenessCheck
Returns
Type Description
$this

getNobuildFilesRegex

Files that match this pattern will not be built into this version.

Only applicable for Go runtimes. Only returned in GET requests if view=FULL is set.

Returns
Type Description
string

setNobuildFilesRegex

Files that match this pattern will not be built into this version.

Only applicable for Go runtimes. Only returned in GET requests if view=FULL is set.

Parameter
Name Description
var string
Returns
Type Description
$this

getDeployment

Code and application artifacts that make up this version.

Only returned in GET requests if view=FULL is set.

Returns
Type Description
Google\Cloud\AppEngine\V1\Deployment|null

hasDeployment

clearDeployment

setDeployment

Code and application artifacts that make up this version.

Only returned in GET requests if view=FULL is set.

Parameter
Name Description
var Google\Cloud\AppEngine\V1\Deployment
Returns
Type Description
$this

getVersionUrl

Serving URL for this version. Example: "https://myversion-dot-myservice-dot-myapp.appspot.com" @OutputOnly

Returns
Type Description
string

setVersionUrl

Serving URL for this version. Example: "https://myversion-dot-myservice-dot-myapp.appspot.com" @OutputOnly

Parameter
Name Description
var string
Returns
Type Description
$this

getEndpointsApiService

Cloud Endpoints configuration.

If endpoints_api_service is set, the Cloud Endpoints Extensible Service Proxy will be provided to serve the API implemented by the app.

Returns
Type Description
Google\Cloud\AppEngine\V1\EndpointsApiService|null

hasEndpointsApiService

clearEndpointsApiService

setEndpointsApiService

Cloud Endpoints configuration.

If endpoints_api_service is set, the Cloud Endpoints Extensible Service Proxy will be provided to serve the API implemented by the app.

Parameter
Name Description
var Google\Cloud\AppEngine\V1\EndpointsApiService
Returns
Type Description
$this

getEntrypoint

The entrypoint for the application.

Returns
Type Description
Google\Cloud\AppEngine\V1\Entrypoint|null

hasEntrypoint

clearEntrypoint

setEntrypoint

The entrypoint for the application.

Parameter
Name Description
var Google\Cloud\AppEngine\V1\Entrypoint
Returns
Type Description
$this

getVpcAccessConnector

Enables VPC connectivity for standard apps.

Returns
Type Description
Google\Cloud\AppEngine\V1\VpcAccessConnector|null

hasVpcAccessConnector

clearVpcAccessConnector

setVpcAccessConnector

Enables VPC connectivity for standard apps.

Parameter
Name Description
var Google\Cloud\AppEngine\V1\VpcAccessConnector
Returns
Type Description
$this

getScaling

Returns
Type Description
string