@@ -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).
791
797
792
798
:raises: :class:`google.cloud.exceptions.NotFound`
793
799
(propagated from
@@ -2769,26 +2775,17 @@ def upload_from_file(
2769
2775
"md5", "crc32c" and None. The default is None.
2770
2776
2771
2777
: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
2788
+ such as delays and deadlines are respected.
2792
2789
2793
2790
:raises: :class:`~google.cloud.exceptions.GoogleCloudError`
2794
2791
if the upload response returns an error status.
@@ -2934,26 +2931,17 @@ def upload_from_filename(
2934
2931
"md5", "crc32c" and None. The default is None.
2935
2932
2936
2933
: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
3064
+ such as delays and deadlines are respected.
3086
3065
"""
3087
3066
data = _to_bytes (data , encoding = "utf-8" )
3088
3067
string_buffer = BytesIO (data )
@@ -3209,23 +3188,17 @@ def create_resumable_upload_session(
3209
3188
(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
3959
3950
self ._patch_property ("storageClass" , new_class )
0 commit comments