You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 31, 2026. It is now read-only.
Copy file name to clipboardExpand all lines: google/cloud/storage/blob.py
+65-74Lines changed: 65 additions & 74 deletions
Original file line number
Diff line number
Diff line change
@@ -787,7 +787,13 @@ def delete(
787
787
788
788
:type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy
789
789
:param retry:
790
-
(Optional) How to retry the RPC. See: :ref:`configuring_retries`
790
+
(Optional) How to retry the RPC.
791
+
The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, a conditional retry
792
+
policy which will only enable retries if ``if_generation_match`` or ``generation``
793
+
is set, in order to ensure requests are idempotent before retrying them.
794
+
Change the value to ``DEFAULT_RETRY`` or another `google.api_core.retry.Retry` object
795
+
to enable retries regardless of generation precondition setting.
796
+
See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout).
:type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy
2772
-
:param retry: (Optional) How to retry the RPC. A None value will disable
2773
-
retries. A google.api_core.retry.Retry value will enable retries,
2774
-
and the object will define retriable response codes and errors and
2775
-
configure backoff and timeout options.
2776
-
2777
-
A google.cloud.storage.retry.ConditionalRetryPolicy value wraps a
2778
-
Retry object and activates it only if certain conditions are met.
2779
-
This class exists to provide safe defaults for RPC calls that are
2780
-
not technically safe to retry normally (due to potential data
2781
-
duplication or other side-effects) but become safe to retry if a
2782
-
condition such as if_generation_match is set.
2783
-
2784
-
See the retry.py source code and docstrings in this package
2785
-
(google.cloud.storage.retry) for information on retry types and how
2786
-
to configure them.
2778
+
:param retry: (Optional) How to retry the RPC.
2779
+
The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, a conditional retry
2780
+
policy which will only enable retries if ``if_generation_match`` or ``generation``
2781
+
is set, in order to ensure requests are idempotent before retrying them.
2782
+
Change the value to ``DEFAULT_RETRY`` or another `google.api_core.retry.Retry` object
2783
+
to enable retries regardless of generation precondition setting.
2784
+
See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout).
2787
2785
2788
2786
Media operations (downloads and uploads) do not support non-default
2789
-
predicates in a Retry object. The default will always be used. Other
2790
-
configuration changes for Retry objects such as delays and deadlines
2791
-
are respected.
2787
+
predicates in a Retry object. Other configuration changes for Retry objects
:type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy
2937
-
:param retry: (Optional) How to retry the RPC. A None value will disable
2938
-
retries. A google.api_core.retry.Retry value will enable retries,
2939
-
and the object will define retriable response codes and errors and
2940
-
configure backoff and timeout options.
2941
-
2942
-
A google.cloud.storage.retry.ConditionalRetryPolicy value wraps a
2943
-
Retry object and activates it only if certain conditions are met.
2944
-
This class exists to provide safe defaults for RPC calls that are
2945
-
not technically safe to retry normally (due to potential data
2946
-
duplication or other side-effects) but become safe to retry if a
2947
-
condition such as if_generation_match is set.
2948
-
2949
-
See the retry.py source code and docstrings in this package
2950
-
(google.cloud.storage.retry) for information on retry types and how
2951
-
to configure them.
2934
+
:param retry: (Optional) How to retry the RPC.
2935
+
The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, a conditional retry
2936
+
policy which will only enable retries if ``if_generation_match`` or ``generation``
2937
+
is set, in order to ensure requests are idempotent before retrying them.
2938
+
Change the value to ``DEFAULT_RETRY`` or another `google.api_core.retry.Retry` object
2939
+
to enable retries regardless of generation precondition setting.
2940
+
See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout).
2952
2941
2953
2942
Media operations (downloads and uploads) do not support non-default
2954
-
predicates in a Retry object. The default will always be used. Other
2955
-
configuration changes for Retry objects such as delays and deadlines
2956
-
are respected.
2943
+
predicates in a Retry object. Other configuration changes for Retry objects
2944
+
such as delays and deadlines are respected.
2957
2945
"""
2958
2946
2959
2947
self._handle_filename_and_upload(
@@ -3063,26 +3051,17 @@ def upload_from_string(
3063
3051
"md5", "crc32c" and None. The default is None.
3064
3052
3065
3053
:type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy
3066
-
:param retry: (Optional) How to retry the RPC. A None value will disable
3067
-
retries. A google.api_core.retry.Retry value will enable retries,
3068
-
and the object will define retriable response codes and errors and
3069
-
configure backoff and timeout options.
3070
-
3071
-
A google.cloud.storage.retry.ConditionalRetryPolicy value wraps a
3072
-
Retry object and activates it only if certain conditions are met.
3073
-
This class exists to provide safe defaults for RPC calls that are
3074
-
not technically safe to retry normally (due to potential data
3075
-
duplication or other side-effects) but become safe to retry if a
3076
-
condition such as if_generation_match is set.
3077
-
3078
-
See the retry.py source code and docstrings in this package
3079
-
(google.cloud.storage.retry) for information on retry types and how
3080
-
to configure them.
3054
+
:param retry: (Optional) How to retry the RPC.
3055
+
The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, a conditional retry
3056
+
policy which will only enable retries if ``if_generation_match`` or ``generation``
3057
+
is set, in order to ensure requests are idempotent before retrying them.
3058
+
Change the value to ``DEFAULT_RETRY`` or another `google.api_core.retry.Retry` object
3059
+
to enable retries regardless of generation precondition setting.
3060
+
See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout).
3081
3061
3082
3062
Media operations (downloads and uploads) do not support non-default
3083
-
predicates in a Retry object. The default will always be used. Other
3084
-
configuration changes for Retry objects such as delays and deadlines
3085
-
are respected.
3063
+
predicates in a Retry object. Other configuration changes for Retry objects
(Optional) See :ref:`using-if-metageneration-not-match`
3210
3189
3211
3190
:type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy
3212
-
:param retry: (Optional) How to retry the RPC. A None value will disable
3213
-
retries. A google.api_core.retry.Retry value will enable retries,
3214
-
and the object will define retriable response codes and errors and
3215
-
configure backoff and timeout options.
3216
-
A google.cloud.storage.retry.ConditionalRetryPolicy value wraps a
3217
-
Retry object and activates it only if certain conditions are met.
3218
-
This class exists to provide safe defaults for RPC calls that are
3219
-
not technically safe to retry normally (due to potential data
3220
-
duplication or other side-effects) but become safe to retry if a
3221
-
condition such as if_generation_match is set.
3222
-
See the retry.py source code and docstrings in this package
3223
-
(google.cloud.storage.retry) for information on retry types and how
3224
-
to configure them.
3191
+
:param retry: (Optional) How to retry the RPC.
3192
+
The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, a conditional retry
3193
+
policy which will only enable retries if ``if_generation_match`` or ``generation``
3194
+
is set, in order to ensure requests are idempotent before retrying them.
3195
+
Change the value to ``DEFAULT_RETRY`` or another `google.api_core.retry.Retry` object
3196
+
to enable retries regardless of generation precondition setting.
3197
+
See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout).
3198
+
3225
3199
Media operations (downloads and uploads) do not support non-default
3226
-
predicates in a Retry object. The default will always be used. Other
3227
-
configuration changes for Retry objects such as delays and deadlines
3228
-
are respected.
3200
+
predicates in a Retry object. Other configuration changes for Retry objects
3201
+
such as delays and deadlines are respected.
3229
3202
3230
3203
:rtype: str
3231
3204
:returns: The resumable upload session URL. The upload can be
@@ -3631,7 +3604,13 @@ def compose(
3631
3604
3632
3605
:type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy
3633
3606
:param retry:
3634
-
(Optional) How to retry the RPC. See: :ref:`configuring_retries`
3607
+
(Optional) How to retry the RPC.
3608
+
The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, a conditional retry
3609
+
policy which will only enable retries if ``if_generation_match`` or ``generation``
3610
+
is set, in order to ensure requests are idempotent before retrying them.
3611
+
Change the value to ``DEFAULT_RETRY`` or another `google.api_core.retry.Retry` object
3612
+
to enable retries regardless of generation precondition setting.
3613
+
See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout).
3635
3614
"""
3636
3615
sources_len=len(sources)
3637
3616
client=self._require_client(client)
@@ -3793,7 +3772,13 @@ def rewrite(
3793
3772
3794
3773
:type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy
3795
3774
:param retry:
3796
-
(Optional) How to retry the RPC. See: :ref:`configuring_retries`
3775
+
(Optional) How to retry the RPC.
3776
+
The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, a conditional retry
3777
+
policy which will only enable retries if ``if_generation_match`` or ``generation``
3778
+
is set, in order to ensure requests are idempotent before retrying them.
3779
+
Change the value to ``DEFAULT_RETRY`` or another `google.api_core.retry.Retry` object
3780
+
to enable retries regardless of generation precondition setting.
3781
+
See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout).
3797
3782
3798
3783
:rtype: tuple
3799
3784
:returns: ``(token, bytes_rewritten, total_bytes)``, where ``token``
@@ -3953,7 +3938,13 @@ def update_storage_class(
3953
3938
3954
3939
:type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy
3955
3940
:param retry:
3956
-
(Optional) How to retry the RPC. See: :ref:`configuring_retries`
3941
+
(Optional) How to retry the RPC.
3942
+
The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, a conditional retry
3943
+
policy which will only enable retries if ``if_generation_match`` or ``generation``
3944
+
is set, in order to ensure requests are idempotent before retrying them.
3945
+
Change the value to ``DEFAULT_RETRY`` or another `google.api_core.retry.Retry` object
3946
+
to enable retries regardless of generation precondition setting.
3947
+
See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout).
3957
3948
"""
3958
3949
# Update current blob's storage class prior to rewrite
Copy file name to clipboardExpand all lines: google/cloud/storage/bucket.py
+28-4Lines changed: 28 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1656,7 +1656,13 @@ def delete_blob(
1656
1656
1657
1657
:type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy
1658
1658
:param retry:
1659
-
(Optional) How to retry the RPC. See: :ref:`configuring_retries`
1659
+
(Optional) How to retry the RPC.
1660
+
The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, a conditional retry
1661
+
policy which will only enable retries if ``if_generation_match`` or ``generation``
1662
+
is set, in order to ensure requests are idempotent before retrying them.
1663
+
Change the value to ``DEFAULT_RETRY`` or another `google.api_core.retry.Retry` object
1664
+
to enable retries regardless of generation precondition setting.
1665
+
See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout).
1660
1666
1661
1667
:raises: :class:`google.cloud.exceptions.NotFound` Raises a NotFound
1662
1668
if the blob isn't found. To suppress
@@ -1757,7 +1763,13 @@ def delete_blobs(
1757
1763
1758
1764
:type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy
1759
1765
:param retry:
1760
-
(Optional) How to retry the RPC. See: :ref:`configuring_retries`
1766
+
(Optional) How to retry the RPC.
1767
+
The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, a conditional retry
1768
+
policy which will only enable retries if ``if_generation_match`` or ``generation``
1769
+
is set, in order to ensure requests are idempotent before retrying them.
1770
+
Change the value to ``DEFAULT_RETRY`` or another `google.api_core.retry.Retry` object
1771
+
to enable retries regardless of generation precondition setting.
1772
+
See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout).
:type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy
1904
1916
:param retry:
1905
-
(Optional) How to retry the RPC. See: :ref:`configuring_retries`
1917
+
(Optional) How to retry the RPC.
1918
+
The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, a conditional retry
1919
+
policy which will only enable retries if ``if_generation_match`` or ``generation``
1920
+
is set, in order to ensure requests are idempotent before retrying them.
1921
+
Change the value to ``DEFAULT_RETRY`` or another `google.api_core.retry.Retry` object
1922
+
to enable retries regardless of generation precondition setting.
1923
+
See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout).
1906
1924
1907
1925
:rtype: :class:`google.cloud.storage.blob.Blob`
1908
1926
:returns: The new Blob.
@@ -2049,7 +2067,13 @@ def rename_blob(
2049
2067
2050
2068
:type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy
2051
2069
:param retry:
2052
-
(Optional) How to retry the RPC. See: :ref:`configuring_retries`
2070
+
(Optional) How to retry the RPC.
2071
+
The default value is ``DEFAULT_RETRY_IF_GENERATION_SPECIFIED``, a conditional retry
2072
+
policy which will only enable retries if ``if_generation_match`` or ``generation``
2073
+
is set, in order to ensure requests are idempotent before retrying them.
2074
+
Change the value to ``DEFAULT_RETRY`` or another `google.api_core.retry.Retry` object
2075
+
to enable retries regardless of generation precondition setting.
2076
+
See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout).
0 commit comments