diff --git a/storage/google/cloud/storage/bucket.py b/storage/google/cloud/storage/bucket.py index 506d1ce6e26d..940715f72070 100644 --- a/storage/google/cloud/storage/bucket.py +++ b/storage/google/cloud/storage/bucket.py @@ -578,11 +578,14 @@ def id(self): @property def lifecycle_rules(self): - """Lifecycle rules configured for this bucket. + """Retrieve or set lifecycle rules configured for this bucket. See https://cloud.google.com/storage/docs/lifecycle and https://cloud.google.com/storage/docs/json_api/v1/buckets + :setter: Set lifestyle rules for this bucket. + :getter: Gets the lifestyle rules for this bucket. + :rtype: list(dict) :returns: A sequence of mappings describing each lifecycle rule. """ @@ -591,6 +594,14 @@ def lifecycle_rules(self): @lifecycle_rules.setter def lifecycle_rules(self, rules): + """Set lifestyle rules configured for this bucket. + + See https://cloud.google.com/storage/docs/lifecycle and + https://cloud.google.com/storage/docs/json_api/v1/buckets + + :type entries: list of dictionaries + :param entries: A sequence of mappings describing each lifecycle rule. + """ self._patch_property('lifecycle', {'rule': rules}) location = _scalar_property('location') @@ -691,10 +702,13 @@ def self_link(self): @property def storage_class(self): - """Retrieve the storage class for the bucket. + """Retrieve or set the storage class for the bucket. See https://cloud.google.com/storage/docs/storage-classes + :setter: Set the storage class for this bucket. + :getter: Gets the the storage class for this bucket. + :rtype: str or ``NoneType`` :returns: If set, one of "MULTI_REGIONAL", "REGIONAL", "NEARLINE", "COLDLINE", "STANDARD", or @@ -737,6 +751,9 @@ def versioning_enabled(self): See https://cloud.google.com/storage/docs/object-versioning for details. + :setter: Update whether versioning is enabled for this bucket. + :getter: Query whether versioning is enabled for this bucket. + :rtype: bool :returns: True if enabled, else False. """