Class: Google::Apis::SqladminV1::Backup

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/sqladmin_v1/classes.rb,
lib/google/apis/sqladmin_v1/representations.rb,
lib/google/apis/sqladmin_v1/representations.rb

Overview

A backup resource.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Backup

Returns a new instance of Backup.



320
321
322
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 320

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#backup_intervalGoogle::Apis::SqladminV1::Interval

Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive). The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time. Corresponds to the JSON property backupInterval



194
195
196
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 194

def backup_interval
  @backup_interval
end

#backup_kindString

Output only. Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT. Corresponds to the JSON property backupKind

Returns:

  • (String)


199
200
201
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 199

def backup_kind
  @backup_kind
end

#backup_runString

Output only. The mapping to backup run resource used for IAM validations. Corresponds to the JSON property backupRun

Returns:

  • (String)


204
205
206
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 204

def backup_run
  @backup_run
end

#database_versionString

Output only. The database version of the instance of at the time this backup was made. Corresponds to the JSON property databaseVersion

Returns:

  • (String)


210
211
212
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 210

def database_version
  @database_version
end

#descriptionString

The description of this backup. Corresponds to the JSON property description

Returns:

  • (String)


215
216
217
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 215

def description
  @description
end

#errorGoogle::Apis::SqladminV1::OperationError

Database instance operation error. Corresponds to the JSON property error



220
221
222
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 220

def error
  @error
end

#expiry_timeString

Backup expiration time. A UTC timestamp of when this backup expired. Corresponds to the JSON property expiryTime

Returns:

  • (String)


225
226
227
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 225

def expiry_time
  @expiry_time
end

#instanceString

The name of the source database instance. Corresponds to the JSON property instance

Returns:

  • (String)


230
231
232
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 230

def instance
  @instance
end

#instance_deletion_timeString

Optional. Output only. Timestamp in UTC of when the instance associated with this backup is deleted. Corresponds to the JSON property instanceDeletionTime

Returns:

  • (String)


236
237
238
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 236

def instance_deletion_time
  @instance_deletion_time
end

#instance_settingsGoogle::Apis::SqladminV1::DatabaseInstance

A Cloud SQL instance resource. Corresponds to the JSON property instanceSettings



241
242
243
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 241

def instance_settings
  @instance_settings
end

#kindString

Output only. This is always sql#backup. Corresponds to the JSON property kind

Returns:

  • (String)


246
247
248
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 246

def kind
  @kind
end

#kms_keyString

Output only. This output contains the encryption configuration for a backup and the resource name of the KMS key for disk encryption. Corresponds to the JSON property kmsKey

Returns:

  • (String)


252
253
254
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 252

def kms_key
  @kms_key
end

#kms_key_versionString

Output only. This output contains the encryption status for a backup and the version of the KMS key that's used to encrypt the Cloud SQL instance. Corresponds to the JSON property kmsKeyVersion

Returns:

  • (String)


258
259
260
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 258

def kms_key_version
  @kms_key_version
end

#locationString

The storage location of the backups. The location can be multi-regional. Corresponds to the JSON property location

Returns:

  • (String)


263
264
265
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 263

def location
  @location
end

#max_chargeable_bytesFixnum

Output only. The maximum chargeable bytes for the backup. Corresponds to the JSON property maxChargeableBytes

Returns:

  • (Fixnum)


268
269
270
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 268

def max_chargeable_bytes
  @max_chargeable_bytes
end

#nameString

Output only. The resource name of the backup. Format: projects/project/ backups/backup. Corresponds to the JSON property name

Returns:

  • (String)


274
275
276
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 274

def name
  @name
end

#satisfies_pziBoolean Also known as: satisfies_pzi?

Output only. This status indicates whether the backup satisfies PZI. The status is reserved for future use. Corresponds to the JSON property satisfiesPzi

Returns:

  • (Boolean)


280
281
282
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 280

def satisfies_pzi
  @satisfies_pzi
end

#satisfies_pzsBoolean Also known as: satisfies_pzs?

Output only. This status indicates whether the backup satisfies PZS. The status is reserved for future use. Corresponds to the JSON property satisfiesPzs

Returns:

  • (Boolean)


287
288
289
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 287

def satisfies_pzs
  @satisfies_pzs
end

Output only. The URI of this resource. Corresponds to the JSON property selfLink

Returns:

  • (String)


293
294
295
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 293

def self_link
  @self_link
end

#stateString

Output only. The status of this backup. Corresponds to the JSON property state

Returns:

  • (String)


298
299
300
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 298

def state
  @state
end

#time_zoneString

Output only. This output contains a backup time zone. If a Cloud SQL for SQL Server instance has a different time zone from the backup's time zone, then the restore to the instance doesn't happen. Corresponds to the JSON property timeZone

Returns:

  • (String)


305
306
307
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 305

def time_zone
  @time_zone
end

#ttl_daysFixnum

Input only. The time-to-live (TTL) interval for this resource (in days). For example: ttlDays:7, means 7 days from the current time. The expiration time can't exceed 365 days from the time that the backup is created. Corresponds to the JSON property ttlDays

Returns:

  • (Fixnum)


312
313
314
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 312

def ttl_days
  @ttl_days
end

#typeString

Output only. The type of this backup. The type can be "AUTOMATED", "ON_DEMAND" or “FINAL”. Corresponds to the JSON property type

Returns:

  • (String)


318
319
320
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 318

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 325

def update!(**args)
  @backup_interval = args[:backup_interval] if args.key?(:backup_interval)
  @backup_kind = args[:backup_kind] if args.key?(:backup_kind)
  @backup_run = args[:backup_run] if args.key?(:backup_run)
  @database_version = args[:database_version] if args.key?(:database_version)
  @description = args[:description] if args.key?(:description)
  @error = args[:error] if args.key?(:error)
  @expiry_time = args[:expiry_time] if args.key?(:expiry_time)
  @instance = args[:instance] if args.key?(:instance)
  @instance_deletion_time = args[:instance_deletion_time] if args.key?(:instance_deletion_time)
  @instance_settings = args[:instance_settings] if args.key?(:instance_settings)
  @kind = args[:kind] if args.key?(:kind)
  @kms_key = args[:kms_key] if args.key?(:kms_key)
  @kms_key_version = args[:kms_key_version] if args.key?(:kms_key_version)
  @location = args[:location] if args.key?(:location)
  @max_chargeable_bytes = args[:max_chargeable_bytes] if args.key?(:max_chargeable_bytes)
  @name = args[:name] if args.key?(:name)
  @satisfies_pzi = args[:satisfies_pzi] if args.key?(:satisfies_pzi)
  @satisfies_pzs = args[:satisfies_pzs] if args.key?(:satisfies_pzs)
  @self_link = args[:self_link] if args.key?(:self_link)
  @state = args[:state] if args.key?(:state)
  @time_zone = args[:time_zone] if args.key?(:time_zone)
  @ttl_days = args[:ttl_days] if args.key?(:ttl_days)
  @type = args[:type] if args.key?(:type)
end