Stay organized with collections Save and categorize content based on your preferences.
gcloud services api-keys update
(KEY
: --location
=LOCATION
) [--async
] [--display-name
=DISPLAY_NAME
] [--annotations
=[KEY
=VALUE
,…] | --clear-annotations
] [--clear-restrictions
| --api-target
=service
=SERVICE
,[…] --allowed-application
=[sha1_fingerprint
=SHA1_FINGERPRINT
,package_name
=PACKAGE_NAME
,…] | --allowed-bundle-ids
=[ALLOWED_BUNDLE_IDS
,…] | --allowed-ips
=[ALLOWED_IPS
,…] | --allowed-referrers
=[ALLOWED_REFERRERS
,…]] [GCLOUD_WIDE_FLAG …
]
gcloud services api-keys update projects/myproject/keys/my-key-id --clear-restrictions
To update display name and set allowed ips as server key restrictions:
gcloud services api-keys update projects/myproject/keys/my-key-id --display-name="test name" --allowed-ips=2620:15c:2c4:203:2776:1f90:6b3b:217,104.133.8.78
To update annotations:
gcloud services api-keys update projects/myproject/keys/my-key-id --annotations=foo=bar,abc=def
To update key's allowed referrers restriction:
gcloud services api-keys update projects/myproject/keys/my-key-id --allowed-referrers="https://www.example.com/*,http://sub.exampl\
e.com/*"
To update key's allowed ios app bundle ids:
gcloud services api-keys update projects/myproject/keys/my-key-id --allowed-bundle-ids=my.app
To update key's allowed android application:
gcloud services api-keys update projects/myproject/keys/my-key-id --allowed-application=sha1_fingerprint=foo1,package_name=bar1 --allowed-application=sha1_fingerprint=foo2,package_name=bar2
To update keys' allowed api target with multiple services:
gcloud services api-keys update projects/myproject/keys/my-key-id --api-target=service=bar.service.com --api-target=service=foo.service.com
To update keys' allowed api target with service and method:
gcloud services api-keys update projects/myproject/keys/my-key-id --flags-file=my-flags.yaml
The content of 'my-flags.yaml' is as following:
- --api-target: service: "foo.service.com" - --api-target: service: "bar.service.com" methods: - "foomethod" - "barmethod"
To set the project
attribute:
key
on the command line with a fully specified name;--project
on the command line;core/project
.This must be specified.
KEY
To set the key
attribute:
key
on the command line.This positional argument must be specified if any of the other arguments in this group are specified.
--location
=LOCATION
To set the location
attribute:
key
on the command line with a fully specified name;--location
on the command line;--async
--display-name
=DISPLAY_NAME
--annotations
=[KEY
=VALUE
,…]
--clear-annotations
--clear-restrictions
--api-target
=service
=SERVICE
,[…]
--flags-file
. See $ gcloud topic flags-file for details. See the examples section for how to use --api-target
in --flags-file
.
--allowed-application
=[sha1_fingerprint
=SHA1_FINGERPRINT
,package_name
=PACKAGE_NAME
,…]
sha1_fingerprint
and package_name
.
--allowed-bundle-ids
=[ALLOWED_BUNDLE_IDS
,…]
--allowed-ips
=[ALLOWED_IPS
,…]
--allowed-referrers
=[ALLOWED_REFERRERS
,…]
--access-token-file
, --account
, --billing-project
, --configuration
, --flags-file
, --flatten
, --format
, --help
, --impersonate-service-account
, --log-http
, --project
, --quiet
, --trace-token
, --user-output-enabled
, --verbosity
.
Run $ gcloud help
for details.
gcloud alpha services api-keys update
gcloud beta services api-keys update
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-22 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-22 UTC."],[],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4