Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses:Standard environment instance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class)automatic scaling in the standard environment: automatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) automatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) automaticScaling.standard_scheduler_settings.max_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) automaticScaling.standard_scheduler_settings.min_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) automaticScaling.standard_scheduler_settings.target_cpu_utilization (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) automaticScaling.standard_scheduler_settings.target_throughput_utilization (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)basic scaling or manual scaling in the standard environment: serving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status) manual_scaling.instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling)Flexible environment serving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status)automatic scaling in the flexible environment: automatic_scaling.min_total_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) automatic_scaling.max_total_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) automatic_scaling.cool_down_period_sec (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) automatic_scaling.cpu_utilization.target_utilization (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)manual scaling in the flexible environment: manual_scaling.instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling)
Scopes
You will need authorization for the https://www.googleapis.com/auth/cloud-platform scope to make a valid call.
If unset, the scope for this method defaults to https://www.googleapis.com/auth/cloud-platform.
You can set the scope for this method like this: appengine1 --scope <scope> apps services-versions-patch ...
Required Scalar Arguments
- <apps-id> (string)
- Part of
name
. Name of the resource to update. Example: apps/myapp/services/default/versions/1.
- Part of
- <services-id> (string)
- Part of
name
. See documentation ofappsId
.
- Part of
- <versions-id> (string)
- Part of
name
. See documentation ofappsId
.
- Part of
Required Request Value
The request value is a data-structure with various fields. Each field may be a simple scalar or another data-structure. In the latter case it is advised to set the field-cursor to the data-structure's field to specify values more concisely.
For example, a structure like this:
Version:
api-config:
auth-fail-action: string
login: string
script: string
security-level: string
url: string
app-engine-apis: boolean
automatic-scaling:
cool-down-period: string
cpu-utilization:
aggregation-window-length: string
target-utilization: number
disk-utilization:
target-read-bytes-per-second: integer
target-read-ops-per-second: integer
target-write-bytes-per-second: integer
target-write-ops-per-second: integer
max-concurrent-requests: integer
max-idle-instances: integer
max-pending-latency: string
max-total-instances: integer
min-idle-instances: integer
min-pending-latency: string
min-total-instances: integer
network-utilization:
target-received-bytes-per-second: integer
target-received-packets-per-second: integer
target-sent-bytes-per-second: integer
target-sent-packets-per-second: integer
request-utilization:
target-concurrent-requests: integer
target-request-count-per-second: integer
standard-scheduler-settings:
max-instances: integer
min-instances: integer
target-cpu-utilization: number
target-throughput-utilization: number
basic-scaling:
idle-timeout: string
max-instances: integer
beta-settings: { string: string }
build-env-variables: { string: string }
create-time: string
created-by: string
default-expiration: string
deployment:
cloud-build-options:
app-yaml-path: string
cloud-build-timeout: string
container:
image: string
zip:
files-count: integer
source-url: string
disk-usage-bytes: string
endpoints-api-service:
config-id: string
disable-trace-sampling: boolean
name: string
rollout-strategy: string
entrypoint:
shell: string
env: string
env-variables: { string: string }
flexible-runtime-settings:
operating-system: string
runtime-version: string
health-check:
check-interval: string
disable-health-check: boolean
healthy-threshold: integer
host: string
restart-threshold: integer
timeout: string
unhealthy-threshold: integer
id: string
inbound-services: [string]
instance-class: string
liveness-check:
check-interval: string
failure-threshold: integer
host: string
initial-delay: string
path: string
success-threshold: integer
timeout: string
manual-scaling:
instances: integer
name: string
network:
forwarded-ports: [string]
instance-ip-mode: string
instance-tag: string
name: string
session-affinity: boolean
subnetwork-name: string
nobuild-files-regex: string
readiness-check:
app-start-timeout: string
check-interval: string
failure-threshold: integer
host: string
path: string
success-threshold: integer
timeout: string
resources:
cpu: number
disk-gb: number
kms-key-reference: string
memory-gb: number
runtime: string
runtime-api-version: string
runtime-channel: string
runtime-main-executable-path: string
service-account: string
serving-status: string
threadsafe: boolean
version-url: string
vm: boolean
vpc-access-connector:
egress-setting: string
name: string
zones: [string]
can be set completely with the following arguments which are assumed to be executed in the given order. Note how the cursor position is adjusted to the respective structures, allowing simple field names to be used most of the time.
-r .api-config auth-fail-action=amet.
- Action to take when users access resources that require authentication. Defaults to redirect.
login=ipsum
- Level of login required to access this resource. Defaults to optional.
script=lorem
- Path to the script from the application root directory.
security-level=accusam
- Security (HTTPS) enforcement for this URL.
-
url=gubergren
- URL to serve the endpoint at.
-
.. app-engine-apis=true
- Allows App Engine second generation runtimes to access the legacy bundled services.
automatic-scaling cool-down-period=at
- The time period that the Autoscaler (https://cloud.google.com/compute/docs/autoscaler/) should wait before it starts collecting information from a new instance. This prevents the autoscaler from collecting information when the instance is initializing, during which the collected usage would not be reliable. Only applicable in the App Engine flexible environment.
cpu-utilization aggregation-window-length=sit
- Period of time over which CPU utilization is calculated.
-
target-utilization=0.9656885462742262
- Target CPU utilization ratio to maintain when scaling. Must be between 0 and 1.
-
..disk-utilization target-read-bytes-per-second=48
- Target bytes read per second.
target-read-ops-per-second=18
- Target ops read per seconds.
target-write-bytes-per-second=79
- Target bytes written per second.
-
target-write-ops-per-second=35
- Target ops written per second.
-
.. max-concurrent-requests=97
- Number of concurrent requests an automatic scaling instance can accept before the scheduler spawns a new instance.Defaults to a runtime-specific value.
max-idle-instances=95
- Maximum number of idle instances that should be maintained for this version.
max-pending-latency=justo
- Maximum amount of time that a request should wait in the pending queue before starting a new instance to handle it.
max-total-instances=49
- Maximum number of instances that should be started to handle requests for this version.
min-idle-instances=90
- Minimum number of idle instances that should be maintained for this version. Only applicable for the default version of a service.
min-pending-latency=nonumy
- Minimum amount of time a request should wait in the pending queue before starting a new instance to handle it.
min-total-instances=58
- Minimum number of running instances that should be maintained for this version.
network-utilization target-received-bytes-per-second=88
- Target bytes received per second.
target-received-packets-per-second=0
- Target packets received per second.
target-sent-bytes-per-second=43
- Target bytes sent per second.
-
target-sent-packets-per-second=10
- Target packets sent per second.
-
..request-utilization target-concurrent-requests=35
- Target number of concurrent requests.
-
target-request-count-per-second=62
- Target requests per second.
-
..standard-scheduler-settings max-instances=67
- Maximum number of instances to run for this version. Set to zero to disable max_instances configuration.
min-instances=76
- Minimum number of instances to run for this version. Set to zero to disable min_instances configuration.
target-cpu-utilization=0.9082902847882928
- Target CPU utilization ratio to maintain when scaling.
-
target-throughput-utilization=0.99648082360283
- Target throughput utilization ratio to maintain when scaling
-
...basic-scaling idle-timeout=amet
- Duration of time after the last request that an instance must wait before the instance is shut down.
-
max-instances=64
- Maximum number of instances to create for this version.
-
.. beta-settings=key=at
- Metadata settings that are supplied to this version to enable beta runtime features.
- the value will be associated with the given
key
build-env-variables=key=sit
- Environment variables available to the build environment.Only returned in GET requests if view=FULL is set.
- the value will be associated with the given
key
create-time=vero
- Time that this version was created.@OutputOnly
created-by=duo
- Email address of the user who created this version.@OutputOnly
default-expiration=sadipscing
- Duration that static files should be cached by web proxies and browsers. Only applicable if the corresponding StaticFilesHandler (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StaticFilesHandler) does not specify its own expiration time.Only returned in GET requests if view=FULL is set.
deployment.cloud-build-options app-yaml-path=ut
- Path to the yaml file used in deployment, used to determine runtime configuration details.Required for flexible environment builds.See https://cloud.google.com/appengine/docs/standard/python/config/appref for more details.
-
cloud-build-timeout=rebum.
- The Cloud Build timeout used as part of any dependent builds performed by version creation. Defaults to 10 minutes.
-
..container image=duo
- URI to the hosted container image in Google Container Registry. The URI must be fully qualified and include a tag or digest. Examples: "gcr.io/my-project/image:tag" or "gcr.io/my-project/image@digest"
-
..zip files-count=38
- An estimate of the number of files in a zip for a zip deployment. If set, must be greater than or equal to the actual number of files. Used for optimizing performance; if not provided, deployment may be slow.
-
source-url=sadipscing
- URL of the zip file to deploy from. Must be a URL to a resource in Google Cloud Storage in the form 'http(s)://storage.googleapis.com//'.
-
... disk-usage-bytes=tempor
- Total size in bytes of all the files that are included in this version and currently hosted on the App Engine disk.@OutputOnly
endpoints-api-service config-id=sea
- Endpoints service configuration ID as specified by the Service Management API. For example "2016-09-19r1".By default, the rollout strategy for Endpoints is RolloutStrategy.FIXED. This means that Endpoints starts up with a particular configuration ID. When a new configuration is rolled out, Endpoints must be given the new configuration ID. The config_id field is used to give the configuration ID and is required in this case.Endpoints also has a rollout strategy called RolloutStrategy.MANAGED. When using this, Endpoints fetches the latest configuration and does not need the configuration ID. In this case, config_id must be omitted.
disable-trace-sampling=false
- Enable or disable trace sampling. By default, this is set to false for enabled.
name=lorem
- Endpoints service name which is the name of the "service" resource in the Service Management API. For example "myapi.endpoints.myproject.cloud.goog"
-
rollout-strategy=magna
- Endpoints rollout strategy. If FIXED, config_id must be specified. If MANAGED, config_id must be omitted.
-
..entrypoint shell=takimata
- The format should be a shell command that can be fed to bash -c.
-
.. env=rebum.
- App Engine execution environment for this version.Defaults to standard.
env-variables=key=at
- Environment variables available to the application.Only returned in GET requests if view=FULL is set.
- the value will be associated with the given
key
flexible-runtime-settings operating-system=invidunt
- The operating system of the application runtime.
-
runtime-version=clita
- The runtime version of an App Engine flexible application.
-
..health-check check-interval=stet
- Interval between health checks.
disable-health-check=false
- Whether to explicitly disable health checks for this instance.
healthy-threshold=64
- Number of consecutive successful health checks required before receiving traffic.
host=sit
- Host header to send when performing an HTTP health check. Example: "myapp.appspot.com"
restart-threshold=75
- Number of consecutive failed health checks required before an instance is restarted.
timeout=rebum.
- Time before the health check is considered failed.
-
unhealthy-threshold=82
- Number of consecutive failed health checks required before removing traffic.
-
.. id=consetetur
- 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-".
inbound-services=dolores
- Before an application can receive email or XMPP messages, the application must be configured to enable the service.
- Each invocation of this argument appends the given value to the array.
instance-class=sed
- 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_1GDefaults to F1 for AutomaticScaling and B1 for ManualScaling or BasicScaling.
liveness-check check-interval=invidunt
- Interval between health checks.
failure-threshold=37
- Number of consecutive failed checks required before considering the VM unhealthy.
host=dolor
- Host header to send when performing a HTTP Liveness check. Example: "myapp.appspot.com"
initial-delay=aliquyam
- The initial delay before starting to execute the checks.
path=magna
- The request path.
success-threshold=59
- Number of consecutive successful checks required before considering the VM healthy.
-
timeout=nonumy
- Time before the check is considered failed.
-
..manual-scaling instances=83
- Number of instances to assign to the service at the start. This number can later be altered by using the Modules API (https://cloud.google.com/appengine/docs/python/modules/functions) set_num_instances() function.
-
.. name=sanctus
- Full path to the Version resource in the API. Example: apps/myapp/services/default/versions/v1.@OutputOnly
network forwarded-ports=accusam
- List of ports, or port pairs, to forward from the virtual machine to the application container. Only applicable in the App Engine flexible environment.
- Each invocation of this argument appends the given value to the array.
instance-ip-mode=tempor
- The IP mode for instances. Only applicable in the App Engine flexible environment.
instance-tag=sed
- Tag to apply to the instance during creation. Only applicable in the App Engine flexible environment.
name=est
- Google Compute Engine network where the virtual machines are created. Specify the short name, not the resource path.Defaults to default.
session-affinity=false
- Enable session affinity. Only applicable in the App Engine flexible environment.
-
subnetwork-name=diam
- Google Cloud Platform sub-network where the virtual machines are created. Specify the short name, not the resource path.If a subnetwork name is specified, a network name will also be required unless it is for the default network. If the network that the instance is being created in is a Legacy network, then the IP address is allocated from the IPv4Range. If the network that the instance is being created in is an auto Subnet Mode Network, then only network name should be specified (not the subnetwork_name) and the IP address is created from the IPCidrRange of the subnetwork that exists in that zone for that network. If the network that the instance is being created in is a custom Subnet Mode Network, then the subnetwork_name must be specified and the IP address is created from the IPCidrRange of the subnetwork.If specified, the subnetwork must exist in the same region as the App Engine flexible environment application.
-
.. nobuild-files-regex=at
- 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.
readiness-check app-start-timeout=erat
- A maximum time limit on application initialization, measured from moment the application successfully replies to a healthcheck until it is ready to serve traffic.
check-interval=justo
- Interval between health checks.
failure-threshold=96
- Number of consecutive failed checks required before removing traffic.
host=accusam
- Host header to send when performing a HTTP Readiness check. Example: "myapp.appspot.com"
path=dolores
- The request path.
success-threshold=5
- Number of consecutive successful checks required before receiving traffic.
-
timeout=no
- Time before the check is considered failed.
-
..resources cpu=0.632624334091124
- Number of CPU cores needed.
disk-gb=0.4406559501659777
- Disk size (GB) needed.
kms-key-reference=sea
- The name of the encryption key that is stored in Google Cloud KMS. Only should be used by Cloud Composer to encrypt the vm disk
-
memory-gb=0.8051858500096339
- Memory (GB) needed.
-
.. runtime=stet
- Desired runtime. Example: python27.
runtime-api-version=gubergren
- 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//config/appref
runtime-channel=ipsum
- The channel of the runtime to use. Only available for some runtimes. Defaults to the default channel.
runtime-main-executable-path=no
- The path or name of the app's main executable.
service-account=sit
- 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.
serving-status=kasd
- 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.
threadsafe=true
- Whether multiple requests can be dispatched to this version at once.
version-url=lorem
- Serving URL for this version. Example: "https://myversion-dot-myservice-dot-myapp.appspot.com"@OutputOnly
vm=false
- Whether to deploy this version in a container on a virtual machine.
vpc-access-connector egress-setting=sed
- The egress setting for the connector, controlling what traffic is diverted through it.
-
name=nonumy
- Full Serverless VPC Access Connector name e.g. projects/my-project/locations/us-central1/connectors/c1.
-
.. zones=sea
- The Google Compute Engine zones that are supported by this version in the App Engine flexible environment. Deprecated.
- Each invocation of this argument appends the given value to the array.
About Cursors
The cursor position is key to comfortably set complex nested structures. The following rules apply:
- The cursor position is always set relative to the current one, unless the field name starts with the
.
character. Fields can be nested such as in-r f.s.o
. - The cursor position is set relative to the top-level structure if it starts with
.
, e.g.-r .s.s
- You can also set nested fields without setting the cursor explicitly. For example, to set a value relative to the current cursor position, you would specify
-r struct.sub_struct=bar
. - You can move the cursor one level up by using
..
. Each additional.
moves it up one additional level. E.g....
would go three levels up.
Optional Output Flags
The method's return value a JSON encoded structure, which will be written to standard output by default.
- -o out
- out specifies the destination to which to write the server's result to.
It will be a JSON-encoded structure.
The destination may be
-
to indicate standard output, or a filepath that is to contain the received bytes. If unset, it defaults to standard output.
- out specifies the destination to which to write the server's result to.
It will be a JSON-encoded structure.
The destination may be
Optional Method Properties
You may set the following properties to further configure the call. Please note that -p
is followed by one
or more key-value-pairs, and is called like this -p k1=v1 k2=v2
even though the listing below repeats the
-p
for completeness.
- -p update-mask=string
- Standard field mask for the set of fields to be updated.
Optional General Properties
The following properties can configure any call, and are not specific to this method.
-
-p $-xgafv=string
- V1 error format.
-
-p access-token=string
- OAuth access token.
-
-p alt=string
- Data format for response.
-
-p callback=string
- JSONP
-
-p fields=string
- Selector specifying which fields to include in a partial response.
-
-p key=string
- API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
-
-p oauth-token=string
- OAuth 2.0 token for the current user.
-
-p pretty-print=boolean
- Returns response with indentations and line breaks.
-
-p quota-user=string
- Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
-
-p upload-type=string
- Legacy upload protocol for media (e.g. "media", "multipart").
-
-p upload-protocol=string
- Upload protocol for media (e.g. "raw", "multipart").