Class: Google::Apis::ComputeAlpha::SnapshotRecycleBinPolicy
- Inherits:
-
Object
- Object
- Google::Apis::ComputeAlpha::SnapshotRecycleBinPolicy
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/compute_alpha/classes.rb,
lib/google/apis/compute_alpha/representations.rb,
lib/google/apis/compute_alpha/representations.rb
Overview
Represents the singleton resource Snapshot Recycle Bin Policy that configures the retention duration for snapshots in the recycle bin. You can configure the retention duration for snapshots in the recycle bin at the project or organization level. If you configure the policy at the organization level, all projects in that organization will share the same policy. If you configure the policy at the project level it will be merged with org level policy (if any) and the snapshots in that project will use that policy.
Instance Attribute Summary collapse
-
#rules ⇒ Hash<String,Google::Apis::ComputeAlpha::SnapshotRecycleBinPolicyRule>
The rules for the snapshot recycle bin policy.
-
#system_rules ⇒ Hash<String,Google::Apis::ComputeAlpha::SnapshotRecycleBinPolicyRule>
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ SnapshotRecycleBinPolicy
constructor
A new instance of SnapshotRecycleBinPolicy.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ SnapshotRecycleBinPolicy
Returns a new instance of SnapshotRecycleBinPolicy.
72835 72836 72837 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 72835 def initialize(**args) update!(**args) end |
Instance Attribute Details
#rules ⇒ Hash<String,Google::Apis::ComputeAlpha::SnapshotRecycleBinPolicyRule>
The rules for the snapshot recycle bin policy. The key is either 'default'
or namespacedName of the TagValue which can be in the format:
organization_id`/`tag_key_short_name`/`tag_value_short_name or
project_id`/`tag_key_short_name`/`tag_value_short_name or
project_number`/`tag_key_short_name`/`tag_value_short_name. The default
rule is applied if snapshots do not have any of these tags.
The value is the rule for the key.
Corresponds to the JSON property rules
72827 72828 72829 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 72827 def rules @rules end |
#system_rules ⇒ Hash<String,Google::Apis::ComputeAlpha::SnapshotRecycleBinPolicyRule>
Output only. The system rules for snapshot recycle bin policy.
Defines the default rule that applies if no customer-defined rule matches.
Corresponds to the JSON property systemRules
72833 72834 72835 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 72833 def system_rules @system_rules end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
72840 72841 72842 72843 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 72840 def update!(**args) @rules = args[:rules] if args.key?(:rules) @system_rules = args[:system_rules] if args.key?(:system_rules) end |