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>
Optional.
-
#backup_vault ⇒ String
Required.
-
#backup_vault_service_account ⇒ String
Output only.
-
#compute_instance_backup_plan_properties ⇒ Google::Apis::BackupdrV1::ComputeInstanceBackupPlanProperties
--- ComputeInstanceBackupPlanProperties Message --- Corresponds to the JSON property
computeInstanceBackupPlanProperties. -
#create_time ⇒ String
Output only.
-
#description ⇒ String
Optional.
-
#disk_backup_plan_properties ⇒ Google::Apis::BackupdrV1::DiskBackupPlanProperties
--- DiskBackupPlanProperties Message --- Corresponds to the JSON property
diskBackupPlanProperties. -
#etag ⇒ String
Optional.
-
#labels ⇒ Hash<String,String>
Optional.
-
#log_retention_days ⇒ Fixnum
Optional.
-
#max_custom_on_demand_retention_days ⇒ Fixnum
Optional.
-
#name ⇒ String
Output only.
-
#resource_type ⇒ String
Required.
-
#revision_id ⇒ String
Output only.
-
#revision_name ⇒ String
Output only.
-
#state ⇒ String
Output only.
-
#supported_resource_types ⇒ Array<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.
1349 1350 1351 |
# File 'lib/google/apis/backupdr_v1/classes.rb', line 1349 def initialize(**args) update!(**args) end |
Instance Attribute Details
#backup_rules ⇒ Array<Google::Apis::BackupdrV1::BackupRule>
Optional. The backup rules for this BackupPlan.
Corresponds to the JSON property backupRules
1241 1242 1243 |
# File 'lib/google/apis/backupdr_v1/classes.rb', line 1241 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
1248 1249 1250 |
# File 'lib/google/apis/backupdr_v1/classes.rb', line 1248 def backup_vault @backup_vault end |
#backup_vault_service_account ⇒ String
Output only. The Google Cloud 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
1255 1256 1257 |
# File 'lib/google/apis/backupdr_v1/classes.rb', line 1255 def backup_vault_service_account @backup_vault_service_account end |
#compute_instance_backup_plan_properties ⇒ Google::Apis::BackupdrV1::ComputeInstanceBackupPlanProperties
--- ComputeInstanceBackupPlanProperties Message ---
Corresponds to the JSON property computeInstanceBackupPlanProperties
1260 1261 1262 |
# File 'lib/google/apis/backupdr_v1/classes.rb', line 1260 def compute_instance_backup_plan_properties @compute_instance_backup_plan_properties end |
#create_time ⇒ String
Output only. When the BackupPlan was created.
Corresponds to the JSON property createTime
1265 1266 1267 |
# File 'lib/google/apis/backupdr_v1/classes.rb', line 1265 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
1274 1275 1276 |
# File 'lib/google/apis/backupdr_v1/classes.rb', line 1274 def description @description end |
#disk_backup_plan_properties ⇒ Google::Apis::BackupdrV1::DiskBackupPlanProperties
--- DiskBackupPlanProperties Message ---
Corresponds to the JSON property diskBackupPlanProperties
1279 1280 1281 |
# File 'lib/google/apis/backupdr_v1/classes.rb', line 1279 def disk_backup_plan_properties @disk_backup_plan_properties 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
1286 1287 1288 |
# File 'lib/google/apis/backupdr_v1/classes.rb', line 1286 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
1292 1293 1294 |
# File 'lib/google/apis/backupdr_v1/classes.rb', line 1292 def labels @labels end |
#log_retention_days ⇒ Fixnum
Optional. Applicable only for Cloud SQL resource_type. Configures how long
logs will be stored. It is defined in “days”. This value should be greater
than or equal to minimum enforced log retention duration of the backup vault.
Corresponds to the JSON property logRetentionDays
1299 1300 1301 |
# File 'lib/google/apis/backupdr_v1/classes.rb', line 1299 def log_retention_days @log_retention_days end |
#max_custom_on_demand_retention_days ⇒ Fixnum
Optional. Optional field to configure the maximum number of days for which a
backup can be retained. This field is only applicable for on-demand backups
taken with custom retention value.
Corresponds to the JSON property maxCustomOnDemandRetentionDays
1306 1307 1308 |
# File 'lib/google/apis/backupdr_v1/classes.rb', line 1306 def max_custom_on_demand_retention_days @max_custom_on_demand_retention_days end |
#name ⇒ String
Output only. Identifier. The resource name of the BackupPlan. Format:
projects/project/locations/location/backupPlans/backup_plan`
Corresponds to the JSON propertyname`
1312 1313 1314 |
# File 'lib/google/apis/backupdr_v1/classes.rb', line 1312 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", "alloydb.googleapis.com/Cluster", "compute.googleapis.com/Disk".
Corresponds to the JSON property resourceType
1319 1320 1321 |
# File 'lib/google/apis/backupdr_v1/classes.rb', line 1319 def resource_type @resource_type end |
#revision_id ⇒ String
Output only. The user friendly revision ID of the BackupPlanRevision.
Example: v0, v1, v2, etc.
Corresponds to the JSON property revisionId
1325 1326 1327 |
# File 'lib/google/apis/backupdr_v1/classes.rb', line 1325 def revision_id @revision_id end |
#revision_name ⇒ String
Output only. The resource id of the BackupPlanRevision. Format: projects/
project/locations/location/backupPlans/backup_plan/revisions/revision_id
Corresponds to the JSON property revisionName
1332 1333 1334 |
# File 'lib/google/apis/backupdr_v1/classes.rb', line 1332 def revision_name @revision_name end |
#state ⇒ String
Output only. The State for the BackupPlan.
Corresponds to the JSON property state
1337 1338 1339 |
# File 'lib/google/apis/backupdr_v1/classes.rb', line 1337 def state @state end |
#supported_resource_types ⇒ Array<String>
Output only. All resource types to which backupPlan can be applied.
Corresponds to the JSON property supportedResourceTypes
1342 1343 1344 |
# File 'lib/google/apis/backupdr_v1/classes.rb', line 1342 def supported_resource_types @supported_resource_types end |
#update_time ⇒ String
Output only. When the BackupPlan was last updated.
Corresponds to the JSON property updateTime
1347 1348 1349 |
# File 'lib/google/apis/backupdr_v1/classes.rb', line 1347 def update_time @update_time end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 |
# File 'lib/google/apis/backupdr_v1/classes.rb', line 1354 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) @compute_instance_backup_plan_properties = args[:compute_instance_backup_plan_properties] if args.key?(:compute_instance_backup_plan_properties) @create_time = args[:create_time] if args.key?(:create_time) @description = args[:description] if args.key?(:description) @disk_backup_plan_properties = args[:disk_backup_plan_properties] if args.key?(:disk_backup_plan_properties) @etag = args[:etag] if args.key?(:etag) @labels = args[:labels] if args.key?(:labels) @log_retention_days = args[:log_retention_days] if args.key?(:log_retention_days) @max_custom_on_demand_retention_days = args[:max_custom_on_demand_retention_days] if args.key?(:max_custom_on_demand_retention_days) @name = args[:name] if args.key?(:name) @resource_type = args[:resource_type] if args.key?(:resource_type) @revision_id = args[:revision_id] if args.key?(:revision_id) @revision_name = args[:revision_name] if args.key?(:revision_name) @state = args[:state] if args.key?(:state) @supported_resource_types = args[:supported_resource_types] if args.key?(:supported_resource_types) @update_time = args[:update_time] if args.key?(:update_time) end |