Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c11d9b5

Browse filesBrowse files
committed
Merge pull request #993 from dhermes/fix-983
Documenting exclusion of GCE for generate_signed_url.
2 parents 8522653 + 98a8d19 commit c11d9b5
Copy full SHA for c11d9b5

File tree

Expand file treeCollapse file tree

2 files changed

+15
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+15
-0
lines changed

‎gcloud/credentials.py

Copy file name to clipboardExpand all lines: gcloud/credentials.py
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,13 @@ def generate_signed_url(credentials, resource, expiration,
301301
content_type=None):
302302
"""Generate signed URL to provide query-string auth'n to a resource.
303303
304+
.. note::
305+
If you are on Google Compute Engine, you can't generate a signed URL.
306+
Follow https://github.com/GoogleCloudPlatform/gcloud-python/issues/922
307+
for updates on this. If you'd like to be able to generate a signed URL
308+
from GCE, you can use a standard service account from a JSON file
309+
rather than a GCE service account.
310+
304311
:type credentials: :class:`oauth2client.appengine.AppAssertionCredentials`
305312
:param credentials: Credentials object with an associated private key to
306313
sign text.

‎gcloud/storage/blob.py

Copy file name to clipboardExpand all lines: gcloud/storage/blob.py
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,14 @@ def generate_signed_url(self, expiration, method='GET',
157157
client=None, credentials=None):
158158
"""Generates a signed URL for this blob.
159159
160+
.. note::
161+
If you are on Google Compute Engine, you can't generate a signed URL.
162+
Follow
163+
https://github.com/GoogleCloudPlatform/gcloud-python/issues/922
164+
for updates on this. If you'd like to be able to generate a signed
165+
URL from GCE, you can use a standard service account from a JSON
166+
file rather than a GCE service account.
167+
160168
If you have a blob that you want to allow access to for a set
161169
amount of time, you can use this method to generate a URL that
162170
is only valid within a certain time period.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.