Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add docs signed_url expiration take default utc #250

Merged
merged 9 commits into from
Aug 27, 2020
16 changes: 8 additions & 8 deletions google/cloud/storage/_signing.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ def get_expiration_seconds_v2(expiration):

:type expiration: Union[Integer, datetime.datetime, datetime.timedelta]
:param expiration: Point in time when the signed URL should expire. If
expiration in datetime, then need to pass timezone
with it. Default value of ``tzinfo`` is ``UTC``.
a ``datetime`` instance is passed without an explicit
``tzinfo`` set, it will be converted to ``UTC``.
tseaver marked this conversation as resolved.
Show resolved Hide resolved

:raises: :exc:`TypeError` when expiration is not a valid type.

Expand Down Expand Up @@ -126,8 +126,8 @@ def get_expiration_seconds_v4(expiration):

:type expiration: Union[Integer, datetime.datetime, datetime.timedelta]
:param expiration: Point in time when the signed URL should expire. If
expiration in datetime, then need to pass timezone
with it. Default value of ``tzinfo`` is ``UTC``.
a ``datetime`` instance is passed without an explicit
``tzinfo`` set, it will be converted to ``UTC``.
tseaver marked this conversation as resolved.
Show resolved Hide resolved

:raises: :exc:`TypeError` when expiration is not a valid type.
:raises: :exc:`ValueError` when expiration is too large.
Expand Down Expand Up @@ -304,8 +304,8 @@ def generate_signed_url_v2(

:type expiration: Union[Integer, datetime.datetime, datetime.timedelta]
:param expiration: Point in time when the signed URL should expire. If
expiration in datetime, then need to pass timezone with
it. Default value of ``tzinfo`` is ``UTC``.
a ``datetime`` instance is passed without an explicit
``tzinfo`` set, it will be converted to ``UTC``.
tseaver marked this conversation as resolved.
Show resolved Hide resolved

:type api_access_endpoint: str
:param api_access_endpoint: (Optional) URI base. Defaults to empty string.
Expand Down Expand Up @@ -468,8 +468,8 @@ def generate_signed_url_v4(

:type expiration: Union[Integer, datetime.datetime, datetime.timedelta]
:param expiration: Point in time when the signed URL should expire. If
expiration in datetime, then need to pass timezone with
it. Default value of ``tzinfo`` is ``UTC``.
a ``datetime`` instance is passed without an explicit
``tzinfo`` set, it will be converted to ``UTC``.
tseaver marked this conversation as resolved.
Show resolved Hide resolved

:type api_access_endpoint: str
:param api_access_endpoint: (Optional) URI base. Defaults to
Expand Down
4 changes: 2 additions & 2 deletions google/cloud/storage/blob.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,8 @@ def generate_signed_url(

:type expiration: Union[Integer, datetime.datetime, datetime.timedelta]
:param expiration: Point in time when the signed URL should expire. If
expiration in datetime, then need to pass timezone
with it. Default value of ``tzinfo`` is ``UTC``.
a ``datetime`` instance is passed without an explicit
``tzinfo`` set, it will be converted to ``UTC``.
tseaver marked this conversation as resolved.
Show resolved Hide resolved

:type api_access_endpoint: str
:param api_access_endpoint: (Optional) URI base.
Expand Down
4 changes: 2 additions & 2 deletions google/cloud/storage/bucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -2956,8 +2956,8 @@ def generate_signed_url(

:type expiration: Union[Integer, datetime.datetime, datetime.timedelta]
:param expiration: Point in time when the signed URL should expire. If
expiration in datetime, then need to pass timezone
with it. Default value of ``tzinfo`` is ``UTC``.
a ``datetime`` instance is passed without an explicit
``tzinfo`` set, it will be converted to ``UTC``.
tseaver marked this conversation as resolved.
Show resolved Hide resolved

:type api_access_endpoint: str
:param api_access_endpoint: (Optional) URI base.
Expand Down
6 changes: 3 additions & 3 deletions google/cloud/storage/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -962,9 +962,9 @@ def generate_signed_post_policy_v4(
:param blob_name: Object name.

:type expiration: Union[Integer, datetime.datetime, datetime.timedelta]
:param expiration: Policy expiration time. If expiration in datetime,
then need to pass timezone with it. Default value of
``tzinfo`` is ``UTC``.
:param expiration: Policy expiration time. If a ``datetime`` instance is
passed without an explicit ``tzinfo`` set, it will be
converted to ``UTC``.
tseaver marked this conversation as resolved.
Show resolved Hide resolved

:type conditions: list
:param conditions: (Optional) List of POST policy conditions, which are
Expand Down