Search

vcli geolocationroutes

Handle Geolocation routing targets

Synopsis

Handle Geolocation routing targets, such as listing, add, delete or update.

Weights(represented by ~) can be used to set priority between tags on the same location. For example: –geolocation-to-tag=“Europe:1~1,Europe:2~2 - Will give nodes with tag ID: 2 higher priority than tag ID: 1 for clients within Europe as the weight: 2 is higher.

Examples:

 geolocationroutes list
 geolocationroutes ls -f id=1
 geolocationroutes ls -f name="MyGeolocationRoute*"
 geolocationroutes add myGeolocationRoute --reject --geolocation="Sweden,Norway"
 geolocationroutes add myGeolocationRoute --geolocation="Yorkshire:1,United States:2"
 geolocationroutes add myGeolocationRoute --geolocation="Stockholm:2673730:1,Helsinki:2" (Including geoname_id when the name of the location is not unique)
 geolocationroutes add myGeolocationRoute --geolocation="Europe:1~1,Europe:2~2,Asia:3" --subdecision=weight (~<number> represents weight(optional))
 geolocationroutes add myGeolocationRoute --geolocation-csv=my_geolocations.csv
 geolocationroutes update 1 --name newname
 geolocationroutes delete 1
 geolocationroutes inspect 1
 geolocationroutes suggestions Stockholm
 geolocationroutes gelocationlookup --geoname-ids=2673730,2673731

CSV:
	Note: For reject, only location name is required (mandatory geoname ID if location is not unique).

	Fields(csv line):
	  Location name,Tag ID,weight(optional),Geoname ID(mandatory if location name is not unique)

	Example:
	  Stockholm,1,2,2673730
	  Yorkshire,1,2
	  Sweden,2,2
	  Europe,2,3
	  North America,4

Weights:
	Represented by <Tag ID>~<weight>. Can be used to set priority between tags on the same location.
	For example: --geolocation="Europe:1~1,Europe:2~2 - Will give nodes with tag ID: 2
	higher priority than tag ID: 1 for clients within Europe because the weight: 2 is higher.
	

Options

  -h, --help   help for geolocationroutes

Options inherited from parent commands

  -c, --config string   configuration file for the CLI (default ~/.vcli.yml)
                        Could also be set via VARNISH_CONTROLLER_CLI_CONFIG=/path/to/config.yml
      --csv             Output the response table as CSV format.
  -j, --json            Output the response table as JSON format.

SEE ALSO


®Varnish Software, Wallingatan 12, 111 60 Stockholm, Organization nr. 556805-6203