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
:raises ValueError: if both ``project`` is ``None`` and the client's
1443
1488
project is also ``None``.
@@ -1469,6 +1514,9 @@ def list_buckets(
1469
1514
iffieldsisnotNone:
1470
1515
extra_params["fields"] =fields
1471
1516
1517
+
ifsoft_deletedisnotNone:
1518
+
extra_params["softDeleted"] =soft_deleted
1519
+
1472
1520
returnself._list_resource(
1473
1521
"/b",
1474
1522
_item_to_bucket,
@@ -1480,6 +1528,71 @@ def list_buckets(
1480
1528
retry=retry,
1481
1529
)
1482
1530
1531
+
defrestore_bucket(
1532
+
self,
1533
+
bucket_name,
1534
+
generation,
1535
+
projection="noAcl",
1536
+
if_metageneration_match=None,
1537
+
if_metageneration_not_match=None,
1538
+
timeout=_DEFAULT_TIMEOUT,
1539
+
retry=DEFAULT_RETRY,
1540
+
):
1541
+
"""Restores a soft-deleted bucket.
1542
+
1543
+
:type bucket_name: str
1544
+
:param bucket_name: The name of the bucket to be restored.
1545
+
1546
+
:type generation: int
1547
+
:param generation: Selects the specific revision of the bucket.
1548
+
1549
+
:type projection: str
1550
+
:param projection:
1551
+
(Optional) Specifies the set of properties to return. If used, must
1552
+
be 'full' or 'noAcl'. Defaults to 'noAcl'.
1553
+
1554
+
if_metageneration_match (Optional[int]):
1555
+
Make the operation conditional on whether the
1556
+
blob's current metageneration matches the given value.
1557
+
1558
+
if_metageneration_not_match (Optional[int]):
1559
+
Make the operation conditional on whether the blob's
1560
+
current metageneration does not match the given value.
1561
+
1562
+
:type timeout: float or tuple
1563
+
:param timeout:
1564
+
(Optional) The amount of time, in seconds, to wait
1565
+
for the server response. See: :ref:`configuring_timeouts`
1566
+
1567
+
:type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy
1568
+
:param retry:
1569
+
(Optional) How to retry the RPC.
1570
+
1571
+
Users can configure non-default retry behavior. A ``None`` value will
1572
+
disable retries. See [Configuring Retries](https://cloud.google.com/python/docs/reference/storage/latest/retry_timeout).
0 commit comments