Class: Google::Apis::ComputeAlpha::DiskSettingsAccessLocation

Inherits:
Object
  • Object
show all
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

AccessLocation is only used for regional snapshot. It contains which regions are allowed to create a regional snapshot from disks located in the given region/zone. It includes key-value pairs designed to store the following structure. The keys should match their corresponding values, which must be provided: access_location: locations us-central1 region: "us-central1", asia-west2 region: "asia-west2"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ DiskSettingsAccessLocation

Returns a new instance of DiskSettingsAccessLocation.



10447
10448
10449
# File 'lib/google/apis/compute_alpha/classes.rb', line 10447

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

Instance Attribute Details

#locationsHash<String,Google::Apis::ComputeAlpha::DiskSettingsAccessLocationAccessLocationPreference>

List of regions that can create a regional snapshot from the current region Corresponds to the JSON property locations



10440
10441
10442
# File 'lib/google/apis/compute_alpha/classes.rb', line 10440

def locations
  @locations
end

#policyString

Policy of which location is allowed to access snapshot. Corresponds to the JSON property policy

Returns:

  • (String)


10445
10446
10447
# File 'lib/google/apis/compute_alpha/classes.rb', line 10445

def policy
  @policy
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



10452
10453
10454
10455
# File 'lib/google/apis/compute_alpha/classes.rb', line 10452

def update!(**args)
  @locations = args[:locations] if args.key?(:locations)
  @policy = args[:policy] if args.key?(:policy)
end