@@ -2022,6 +2022,9 @@ def rename_blob(
|
2022 | 2022 | This method will first duplicate the data and then delete the
|
2023 | 2023 | old blob. This means that with very large objects renaming
|
2024 | 2024 | could be a very (temporarily) costly or a very slow operation.
|
| 2025 | +If you need more control over the copy and deletion, instead |
| 2026 | +use `google.cloud.storage.blob.Blob.copy_to` and |
| 2027 | +`google.cloud.storage.blob.Blob.delete` directly. |
2025 | 2028 |
|
2026 | 2029 | :type blob: :class:`google.cloud.storage.blob.Blob`
|
2027 | 2030 | :param blob: The blob to be renamed.
|
@@ -2079,25 +2082,29 @@ def rename_blob(
|
2079 | 2082 | :param if_source_generation_match: (Optional) Makes the operation
|
2080 | 2083 | conditional on whether the source
|
2081 | 2084 | object's generation matches the
|
2082 |
| -given value. |
| 2085 | +given value. Also used in the |
| 2086 | +delete request. |
2083 | 2087 |
|
2084 | 2088 | :type if_source_generation_not_match: long
|
2085 | 2089 | :param if_source_generation_not_match: (Optional) Makes the operation
|
2086 | 2090 | conditional on whether the source
|
2087 | 2091 | object's generation does not match
|
2088 |
| -the given value. |
| 2092 | +the given value. Also used in the |
| 2093 | +delete request. |
2089 | 2094 |
|
2090 | 2095 | :type if_source_metageneration_match: long
|
2091 | 2096 | :param if_source_metageneration_match: (Optional) Makes the operation
|
2092 | 2097 | conditional on whether the source
|
2093 | 2098 | object's current metageneration
|
2094 |
| -matches the given value. |
| 2099 | +matches the given value.Also used in the |
| 2100 | +delete request. |
2095 | 2101 |
|
2096 | 2102 | :type if_source_metageneration_not_match: long
|
2097 | 2103 | :param if_source_metageneration_not_match: (Optional) Makes the operation
|
2098 | 2104 | conditional on whether the source
|
2099 | 2105 | object's current metageneration
|
2100 | 2106 | does not match the given value.
|
| 2107 | +Also used in the delete request. |
2101 | 2108 |
|
2102 | 2109 | :type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy
|
2103 | 2110 | :param retry: (Optional) How to retry the RPC. A None value will disable retries.
|
@@ -2139,10 +2146,10 @@ def rename_blob(
|
2139 | 2146 | blob.delete(
|
2140 | 2147 | client=client,
|
2141 | 2148 | timeout=timeout,
|
2142 |
| -if_generation_match=if_generation_match, |
2143 |
| -if_generation_not_match=if_generation_not_match, |
2144 |
| -if_metageneration_match=if_metageneration_match, |
2145 |
| -if_metageneration_not_match=if_metageneration_not_match, |
| 2149 | +if_generation_match=if_source_generation_match, |
| 2150 | +if_generation_not_match=if_source_generation_not_match, |
| 2151 | +if_metageneration_match=if_source_metageneration_match, |
| 2152 | +if_metageneration_not_match=if_source_metageneration_not_match, |
2146 | 2153 | retry=retry,
|
2147 | 2154 | )
|
2148 | 2155 | return new_blob
|
|
0 commit comments