Skip to content

Commit

Permalink
[Storage] Fix datetime parsing docstring (#34926)
Browse files Browse the repository at this point in the history
* Adjust docstring
  • Loading branch information
vincenttran-msft authored Mar 26, 2024
1 parent b07db72 commit 157226e
Show file tree
Hide file tree
Showing 12 changed files with 54 additions and 83 deletions.
5 changes: 2 additions & 3 deletions sdk/storage/azure-storage-blob/azure/storage/blob/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -792,9 +792,8 @@ class AccessPolicy(GenAccessPolicy):
:param start:
The time at which the shared access signature becomes valid. If
omitted, start time for this call is assumed to be the time when the
storage service receives the request. Azure will always convert values
to UTC. If a date is passed in without timezone info, it is assumed to
be UTC.
storage service receives the request. The provided datetime will always
be interpreted as UTC.
:type start: ~datetime.datetime or str
"""
def __init__(self, permission=None, expiry=None, start=None):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,8 @@ def generate_account(self, services, resource_types, permission, expiry, start=N
:param start:
The time at which the shared access signature becomes valid. If
omitted, start time for this call is assumed to be the time when the
storage service receives the request. Azure will always convert values
to UTC. If a date is passed in without timezone info, it is assumed to
be UTC.
storage service receives the request. The provided datetime will always
be interpreted as UTC.
:type start: datetime or str
:param str ip:
Specifies an IP address or a range of IP addresses from which to accept requests.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,8 @@ def generate_blob(self, container_name, blob_name, snapshot=None, version_id=Non
:param start:
The time at which the shared access signature becomes valid. If
omitted, start time for this call is assumed to be the time when the
storage service receives the request. Azure will always convert values
to UTC. If a date is passed in without timezone info, it is assumed to
be UTC.
storage service receives the request. The provided datetime will always
be interpreted as UTC.
:type start: datetime or str
:param str policy_id:
A unique value up to 64 characters in length that correlates to a
Expand Down Expand Up @@ -178,9 +177,8 @@ def generate_container(self, container_name, permission=None, expiry=None,
:param start:
The time at which the shared access signature becomes valid. If
omitted, start time for this call is assumed to be the time when the
storage service receives the request. Azure will always convert values
to UTC. If a date is passed in without timezone info, it is assumed to
be UTC.
storage service receives the request. The provided datetime will always
be interpreted as UTC.
:type start: datetime or str
:param str policy_id:
A unique value up to 64 characters in length that correlates to a
Expand Down Expand Up @@ -337,15 +335,13 @@ def generate_account_sas(
:type permission: str or ~azure.storage.blob.AccountSasPermissions
:param expiry:
The time at which the shared access signature becomes invalid.
Azure will always convert values to UTC. If a date is passed in
without timezone info, it is assumed to be UTC.
The provided datetime will always be interpreted as UTC.
:type expiry: ~datetime.datetime or str
:param start:
The time at which the shared access signature becomes valid. If
omitted, start time for this call is assumed to be the time when the
storage service receives the request. Azure will always convert values
to UTC. If a date is passed in without timezone info, it is assumed to
be UTC.
storage service receives the request. The provided datetime will always
be interpreted as UTC.
:type start: ~datetime.datetime or str
:param str ip:
Specifies an IP address or a range of IP addresses from which to accept requests.
Expand Down Expand Up @@ -433,9 +429,8 @@ def generate_container_sas(
:param start:
The time at which the shared access signature becomes valid. If
omitted, start time for this call is assumed to be the time when the
storage service receives the request. Azure will always convert values
to UTC. If a date is passed in without timezone info, it is assumed to
be UTC.
storage service receives the request. The provided datetime will always
be interpreted as UTC.
:type start: ~datetime.datetime or str
:param str policy_id:
A unique value up to 64 characters in length that correlates to a
Expand Down Expand Up @@ -560,9 +555,8 @@ def generate_blob_sas(
:param start:
The time at which the shared access signature becomes valid. If
omitted, start time for this call is assumed to be the time when the
storage service receives the request. Azure will always convert values
to UTC. If a date is passed in without timezone info, it is assumed to
be UTC.
storage service receives the request. The provided datetime will always
be interpreted as UTC.
:type start: ~datetime.datetime or str
:param str policy_id:
A unique value up to 64 characters in length that correlates to a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -656,9 +656,8 @@ class AccessPolicy(BlobAccessPolicy):
:keyword start:
The time at which the shared access signature becomes valid. If
omitted, start time for this call is assumed to be the time when the
storage service receives the request. Azure will always convert values
to UTC. If a date is passed in without timezone info, it is assumed to
be UTC.
storage service receives the request. The provided datetime will always
be interpreted as UTC.
:paramtype start: ~datetime.datetime or str
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,8 @@ def generate_account(self, services, resource_types, permission, expiry, start=N
:param start:
The time at which the shared access signature becomes valid. If
omitted, start time for this call is assumed to be the time when the
storage service receives the request. Azure will always convert values
to UTC. If a date is passed in without timezone info, it is assumed to
be UTC.
storage service receives the request. The provided datetime will always
be interpreted as UTC.
:type start: datetime or str
:param str ip:
Specifies an IP address or a range of IP addresses from which to accept requests.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,13 @@ def generate_account_sas(
:type permission: str or ~azure.storage.filedatalake.AccountSasPermissions
:param expiry:
The time at which the shared access signature becomes invalid.
Azure will always convert values to UTC. If a date is passed in
without timezone info, it is assumed to be UTC.
The provided datetime will always be interpreted as UTC.
:type expiry: ~datetime.datetime or str
:keyword start:
The time at which the shared access signature becomes valid. If
omitted, start time for this call is assumed to be the time when the
storage service receives the request. Azure will always convert values
to UTC. If a date is passed in without timezone info, it is assumed to
be UTC.
storage service receives the request. The provided datetime will always
be interpreted as UTC.
:paramtype start: ~datetime.datetime or str
:keyword str ip:
Specifies an IP address or a range of IP addresses from which to accept requests.
Expand Down Expand Up @@ -137,9 +135,8 @@ def generate_file_system_sas(
:keyword start:
The time at which the shared access signature becomes valid. If
omitted, start time for this call is assumed to be the time when the
storage service receives the request. Azure will always convert values
to UTC. If a date is passed in without timezone info, it is assumed to
be UTC.
storage service receives the request. The provided datetime will always
be interpreted as UTC.
:paramtype start: datetime or str
:keyword str policy_id:
A unique value up to 64 characters in length that correlates to a
Expand Down Expand Up @@ -245,9 +242,8 @@ def generate_directory_sas(
:keyword start:
The time at which the shared access signature becomes valid. If
omitted, start time for this call is assumed to be the time when the
storage service receives the request. Azure will always convert values
to UTC. If a date is passed in without timezone info, it is assumed to
be UTC.
storage service receives the request. The provided datetime will always
be interpreted as UTC.
:paramtype start: ~datetime.datetime or str
:keyword str policy_id:
A unique value up to 64 characters in length that correlates to a
Expand Down Expand Up @@ -360,9 +356,8 @@ def generate_file_sas(
:keyword start:
The time at which the shared access signature becomes valid. If
omitted, start time for this call is assumed to be the time when the
storage service receives the request. Azure will always convert values
to UTC. If a date is passed in without timezone info, it is assumed to
be UTC.
storage service receives the request. The provided datetime will always
be interpreted as UTC.
:paramtype start: ~datetime.datetime or str
:keyword str policy_id:
A unique value up to 64 characters in length that correlates to a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,8 @@ class AccessPolicy(GenAccessPolicy):
:param start:
The time at which the shared access signature becomes valid. If
omitted, start time for this call is assumed to be the time when the
storage service receives the request. Azure will always convert values
to UTC. If a date is passed in without timezone info, it is assumed to
be UTC.
storage service receives the request. The provided datetime will always
be interpreted as UTC.
:type start: ~datetime.datetime or str
"""
def __init__(self, permission=None, expiry=None, start=None):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,8 @@ def generate_account(self, services, resource_types, permission, expiry, start=N
:param start:
The time at which the shared access signature becomes valid. If
omitted, start time for this call is assumed to be the time when the
storage service receives the request. Azure will always convert values
to UTC. If a date is passed in without timezone info, it is assumed to
be UTC.
storage service receives the request. The provided datetime will always
be interpreted as UTC.
:type start: datetime or str
:param str ip:
Specifies an IP address or a range of IP addresses from which to accept requests.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,8 @@ def generate_file(self, share_name, directory_name=None, file_name=None,
:param start:
The time at which the shared access signature becomes valid. If
omitted, start time for this call is assumed to be the time when the
storage service receives the request. Azure will always convert values
to UTC. If a date is passed in without timezone info, it is assumed to
be UTC.
storage service receives the request. The provided datetime will always
be interpreted as UTC.
:type start: datetime or str
:param str policy_id:
A unique value up to 64 characters in length that correlates to a
Expand Down Expand Up @@ -157,9 +156,8 @@ def generate_share(self, share_name, permission=None, expiry=None,
:param start:
The time at which the shared access signature becomes valid. If
omitted, start time for this call is assumed to be the time when the
storage service receives the request. Azure will always convert values
to UTC. If a date is passed in without timezone info, it is assumed to
be UTC.
storage service receives the request. The provided datetime will always
be interpreted as UTC.
:type start: datetime or str
:param str policy_id:
A unique value up to 64 characters in length that correlates to a
Expand Down Expand Up @@ -269,15 +267,13 @@ def generate_account_sas(
user is restricted to operations allowed by the permissions.
:param expiry:
The time at which the shared access signature becomes invalid.
Azure will always convert values to UTC. If a date is passed in without
timezone info, it is assumed to be UTC.
The provided datetime will always be interpreted as UTC.
:type expiry: ~datetime.datetime or str
:param start:
The time at which the shared access signature becomes valid. If
omitted, start time for this call is assumed to be the time when the
storage service receives the request. Azure will always convert values
to UTC. If a date is passed in without timezone info, it is assumed to
be UTC.
storage service receives the request. The provided datetime will always
be interpreted as UTC.
:type start: ~datetime.datetime or str
:param str ip:
Specifies an IP address or a range of IP addresses from which to accept requests.
Expand Down Expand Up @@ -355,9 +351,8 @@ def generate_share_sas(
:param start:
The time at which the shared access signature becomes valid. If
omitted, start time for this call is assumed to be the time when the
storage service receives the request. Azure will always convert values
to UTC. If a date is passed in without timezone info, it is assumed to
be UTC.
storage service receives the request. The provided datetime will always
be interpreted as UTC.
:type start: ~datetime.datetime or str
:param str policy_id:
A unique value up to 64 characters in length that correlates to a
Expand Down Expand Up @@ -452,9 +447,8 @@ def generate_file_sas(
:param start:
The time at which the shared access signature becomes valid. If
omitted, start time for this call is assumed to be the time when the
storage service receives the request. Azure will always convert values
to UTC. If a date is passed in without timezone info, it is assumed to
be UTC.
storage service receives the request. The provided datetime will always
be interpreted as UTC.
:type start: ~datetime.datetime or str
:param str policy_id:
A unique value up to 64 characters in length that correlates to a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,9 +325,8 @@ class AccessPolicy(GenAccessPolicy):
:param Optional[Union["datetime", str]] start:
The time at which the shared access signature becomes valid. If
omitted, start time for this call is assumed to be the time when the
storage service receives the request. Azure will always convert values
to UTC. If a date is passed in without timezone info, it is assumed to
be UTC.
storage service receives the request. The provided datetime will always
be interpreted as UTC.
"""

permission: Optional[Union[QueueSasPermissions, str]] #type: ignore [assignment]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,8 @@ def generate_account(self, services, resource_types, permission, expiry, start=N
:param start:
The time at which the shared access signature becomes valid. If
omitted, start time for this call is assumed to be the time when the
storage service receives the request. Azure will always convert values
to UTC. If a date is passed in without timezone info, it is assumed to
be UTC.
storage service receives the request. The provided datetime will always
be interpreted as UTC.
:type start: datetime or str
:param str ip:
Specifies an IP address or a range of IP addresses from which to accept requests.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,8 @@ def generate_queue(
:param start:
The time at which the shared access signature becomes valid. If
omitted, start time for this call is assumed to be the time when the
storage service receives the request. Azure will always convert values
to UTC. If a date is passed in without timezone info, it is assumed to
be UTC.
storage service receives the request. The provided datetime will always
be interpreted as UTC.
:type start: ~datetime.datetime or str
:param str policy_id:
A unique value up to 64 characters in length that correlates to a
Expand Down Expand Up @@ -161,15 +160,13 @@ def generate_account_sas(
:type permission: ~azure.storage.queue.AccountSasPermissions or str
:param expiry:
The time at which the shared access signature becomes invalid.
Azure will always convert values to UTC. If a date is passed in
without timezone info, it is assumed to be UTC.
The provided datetime will always be interpreted as UTC.
:type expiry: ~datetime.datetime or str
:param start:
The time at which the shared access signature becomes valid. If
omitted, start time for this call is assumed to be the time when the
storage service receives the request. Azure will always convert values
to UTC. If a date is passed in without timezone info, it is assumed to
be UTC.
storage service receives the request. The provided datetime will always
be interpreted as UTC.
:type start: ~datetime.datetime or str
:param str ip:
Specifies an IP address or a range of IP addresses from which to accept requests.
Expand Down Expand Up @@ -236,9 +233,8 @@ def generate_queue_sas(
:param start:
The time at which the shared access signature becomes valid. If
omitted, start time for this call is assumed to be the time when the
storage service receives the request. Azure will always convert values
to UTC. If a date is passed in without timezone info, it is assumed to
be UTC.
storage service receives the request. The provided datetime will always
be interpreted as UTC.
:type start: ~datetime.datetime or str
:param str policy_id:
A unique value up to 64 characters in length that correlates to a
Expand Down

0 comments on commit 157226e

Please sign in to comment.