GCLOUD_APP_SERVICES_SET-TRAFFIC(1)

NAME

gcloud app services set-traffic - set traffic splitting settings

SYNOPSIS

gcloud app services set-traffic [SERVICES ...] --splits=SPLITS,[SPLITS,...] [--migrate] [--split-by=SPLIT_BY; default="ip"] [GCLOUD_WIDE_FLAG ...]

DESCRIPTION
This command sets the traffic split of versions across a service or a project.

POSITIONAL ARGUMENTS

    [SERVICES ...]
        The services to modify.

REQUIRED FLAGS

    --splits=SPLITS,[SPLITS,...]
        Key-value pairs describing what proportion of traffic should go to each version. The split values are added together and used as weights. The exact values do not matter, only their relation to each other. For example, v1=2,v2=2 is equivalent to v1=.5,v2=.5

OPTIONAL FLAGS

    --migrate
        The migrate flag determines whether or not to use traffic migration during the operation. Traffic migration will attempt to automatically migrate traffic from the previous version to the new version, giving the autoscaler time to respond. See the documentation here: https://cloud.google.com/appengine/docs/python/console/trafficmigration for more information.

    --split-by=SPLIT_BY; default="ip"
        Whether to split traffic based on cookies or IP addresses. SPLIT_BY must be one of: cookie, ip.

GCLOUD WIDE FLAGS
These flags are available to all commands: --account, --configuration, --flatten, --format, --help, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity. Run $ gcloud help for details.

EXAMPLES
To send all traffic to 'v2' of service 's1', run:
    $ gcloud app services set-traffic s1 --splits v2=1
To split traffic evenly between 'v1' and 'v2' of service 's1', run:
    $ gcloud app services set-traffic s1 --splits v2=.5,v1=.5
To split traffic across all services:
    $ gcloud app services set-traffic --splits v2=.5,v1=.5