Class: Google::Apis::BackupdrV1::BackupPlan
- Inherits:
-
Object
- Object
- Google::Apis::BackupdrV1::BackupPlan
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/backupdr_v1/classes.rb,
lib/google/apis/backupdr_v1/representations.rb,
lib/google/apis/backupdr_v1/representations.rb
Overview
A BackupPlan
specifies some common fields, such as description
as well as
one or more BackupRule
messages. Each BackupRule
has a retention policy
and defines a schedule by which the system is to perform backup workloads.
Instance Attribute Summary collapse
-
#backup_rules ⇒ Array<Google::Apis::BackupdrV1::BackupRule>
Required.
-
#backup_vault ⇒ String
Required.
-
#backup_vault_service_account ⇒ String
Output only.
-
#create_time ⇒ String
Output only.
-
#description ⇒ String
Optional.
-
#etag ⇒ String
Optional.
-
#labels ⇒ Hash<String,String>
Optional.
-
#name ⇒ String
Output only.
-
#resource_type ⇒ String
Required.
-
#state ⇒ String
Output only.
-
#update_time ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ BackupPlan
constructor
A new instance of BackupPlan.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ BackupPlan
Returns a new instance of BackupPlan.
880 881 882 |
# File 'lib/google/apis/backupdr_v1/classes.rb', line 880 def initialize(**args) update!(**args) end |
Instance Attribute Details
#backup_rules ⇒ Array<Google::Apis::BackupdrV1::BackupRule>
Required. The backup rules for this BackupPlan
. There must be at least one
BackupRule
message.
Corresponds to the JSON property backupRules
814 815 816 |
# File 'lib/google/apis/backupdr_v1/classes.rb', line 814 def backup_rules @backup_rules end |
#backup_vault ⇒ String
Required. Resource name of backup vault which will be used as storage location
for backups. Format: projects/project
/locations/location
/backupVaults/
backupvault
Corresponds to the JSON property backupVault
821 822 823 |
# File 'lib/google/apis/backupdr_v1/classes.rb', line 821 def backup_vault @backup_vault end |
#backup_vault_service_account ⇒ String
Output only. The Google Cloud Platform Service Account to be used by the
BackupVault for taking backups. Specify the email address of the Backup Vault
Service Account.
Corresponds to the JSON property backupVaultServiceAccount
828 829 830 |
# File 'lib/google/apis/backupdr_v1/classes.rb', line 828 def backup_vault_service_account @backup_vault_service_account end |
#create_time ⇒ String
Output only. When the BackupPlan
was created.
Corresponds to the JSON property createTime
833 834 835 |
# File 'lib/google/apis/backupdr_v1/classes.rb', line 833 def create_time @create_time end |
#description ⇒ String
Optional. The description of the BackupPlan
resource. The description allows
for additional details about BackupPlan
and its use cases to be provided. An
example description is the following: "This is a backup plan that performs a
daily backup at 6pm and retains data for 3 months". The description must be at
most 2048 characters.
Corresponds to the JSON property description
842 843 844 |
# File 'lib/google/apis/backupdr_v1/classes.rb', line 842 def description @description end |
#etag ⇒ String
Optional. etag
is returned from the service in the response. As a user of
the service, you may provide an etag value in this field to prevent stale
resources.
Corresponds to the JSON property etag
849 850 851 |
# File 'lib/google/apis/backupdr_v1/classes.rb', line 849 def etag @etag end |
#labels ⇒ Hash<String,String>
Optional. This collection of key/value pairs allows for custom labels to be
supplied by the user. Example, "tag": "Weekly"
.
Corresponds to the JSON property labels
855 856 857 |
# File 'lib/google/apis/backupdr_v1/classes.rb', line 855 def labels @labels end |
#name ⇒ String
Output only. Identifier. The resource name of the BackupPlan
. Format:
projects/
project/locations/
location/backupPlans/
backup_plan`
Corresponds to the JSON property
name`
861 862 863 |
# File 'lib/google/apis/backupdr_v1/classes.rb', line 861 def name @name end |
#resource_type ⇒ String
Required. The resource type to which the BackupPlan
will be applied.
Examples include, "compute.googleapis.com/Instance", "sqladmin.googleapis.com/
Instance" and "storage.googleapis.com/Bucket".
Corresponds to the JSON property resourceType
868 869 870 |
# File 'lib/google/apis/backupdr_v1/classes.rb', line 868 def resource_type @resource_type end |
#state ⇒ String
Output only. The State
for the BackupPlan
.
Corresponds to the JSON property state
873 874 875 |
# File 'lib/google/apis/backupdr_v1/classes.rb', line 873 def state @state end |
#update_time ⇒ String
Output only. When the BackupPlan
was last updated.
Corresponds to the JSON property updateTime
878 879 880 |
# File 'lib/google/apis/backupdr_v1/classes.rb', line 878 def update_time @update_time end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
885 886 887 888 889 890 891 892 893 894 895 896 897 |
# File 'lib/google/apis/backupdr_v1/classes.rb', line 885 def update!(**args) @backup_rules = args[:backup_rules] if args.key?(:backup_rules) @backup_vault = args[:backup_vault] if args.key?(:backup_vault) @backup_vault_service_account = args[:backup_vault_service_account] if args.key?(:backup_vault_service_account) @create_time = args[:create_time] if args.key?(:create_time) @description = args[:description] if args.key?(:description) @etag = args[:etag] if args.key?(:etag) @labels = args[:labels] if args.key?(:labels) @name = args[:name] if args.key?(:name) @resource_type = args[:resource_type] if args.key?(:resource_type) @state = args[:state] if args.key?(:state) @update_time = args[:update_time] if args.key?(:update_time) end |