Stay organized with collections Save and categorize content based on your preferences.
gcloud alpha compute sign-url
URL
--expires-in
=EXPIRES_IN
--key-file
=LOCAL_FILE_PATH
--key-name
=KEY_NAME
[--validate
] [GCLOUD_WIDE_FLAG …
]
(ALPHA)
gcloud alpha compute sign-url
generates a signed URL for the specified URL and optionally validates the response by sending a request to the signed URL.
Cloud CDN Signed URLs give you a way to serve responses from the globally distributed CDN cache, even if the request needs to be authorized.
Signed URLs are a mechanism to temporarily give a client access to a private resource without requiring additional authorization. To achieve this, the full request URL that should be allowed is hashed and cryptographically signed. By using the signed URL you give it, that one request will be considered authorized to receive the requested content.
Generally, a signed URL can be used by anyone who has it. However, it is usually only intended to be used by the client that was directly given the URL. To mitigate this, they expire at a time chosen by the issuer. To minimize the risk of a signed URL being shared, it is recommended that the signed URL be set to expire as soon as possible.
A 128-bit secret key is used for signing the URLs.
The URLs to sign have the following restrictions:
Expires
, KeyName
or Signature
, since they are used for signing.URL
--expires-in
=EXPIRES_IN
12h
will cause the signed URL to be valid up to 12 hours. See $ gcloud topic datetimes for information on duration formats.
--key-file
=LOCAL_FILE_PATH
head -c 16 /dev/random | base64 | tr +/ -_ > [KEY_FILE_NAME]
--key-name
=KEY_NAME
--validate
If the signed URL is valid, the result should be the same as the response code sent by the backend. If it isn't, recheck the key name and the contents of the key file, and ensure that expires-in is set to at least several seconds and that the clock on the computer running this command is accurate.
If not provided, the generated signed URL is not verified.
--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 compute sign-url
gcloud beta compute sign-url
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