Class: Google::Cloud::Compute::V1::LocationPolicy

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/compute/v1/compute.rb

Overview

Configuration for location policy among multiple possible locations (e.g. preferences for zone selection among zones in a single region).

Defined Under Namespace

Modules: TargetShape Classes: LocationsEntry

Instance Attribute Summary collapse

Instance Attribute Details

#locations::Google::Protobuf::Map{::String => ::Google::Cloud::Compute::V1::LocationPolicyLocation}

Returns Location configurations mapped by location name. Currently only zone names are supported and must be represented as valid internal URLs, such as zones/us-central1-a. The bulkInsert operation doesn't create instances in an AI zone, even if an AI zone is available in the specified region. For example, if you set a DENY preference for us-central1-a, Compute Engine will consider us-central1-b and us-central1-c for instance creation, but not us-central1-ai1a. Also, you can't use the locations[] configuration to allow instance creation in an AI zone. To include an AI zone in bulkInsert operations, use the locationPolicy.zones[] field.

Returns:

  • (::Google::Protobuf::Map{::String => ::Google::Cloud::Compute::V1::LocationPolicyLocation})

    Location configurations mapped by location name. Currently only zone names are supported and must be represented as valid internal URLs, such as zones/us-central1-a. The bulkInsert operation doesn't create instances in an AI zone, even if an AI zone is available in the specified region. For example, if you set a DENY preference for us-central1-a, Compute Engine will consider us-central1-b and us-central1-c for instance creation, but not us-central1-ai1a. Also, you can't use the locations[] configuration to allow instance creation in an AI zone. To include an AI zone in bulkInsert operations, use the locationPolicy.zones[] field.



52790
52791
52792
52793
52794
52795
52796
52797
52798
52799
52800
52801
52802
52803
52804
52805
52806
52807
52808
52809
52810
52811
52812
52813
52814
52815
52816
52817
52818
52819
52820
52821
52822
52823
52824
52825
52826
# File 'proto_docs/google/cloud/compute/v1/compute.rb', line 52790

class LocationPolicy
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::Google::Cloud::Compute::V1::LocationPolicyLocation]
  class LocationsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Strategy for distributing VMs across zones in a region.
  module TargetShape
    # A value indicating that the enum field is not set.
    UNDEFINED_TARGET_SHAPE = 0

    # GCE picks zones for creating VM instances to fulfill the requested
    # number of VMs within present resource constraints and to maximize
    # utilization of unused zonal reservations. Recommended for batch workloads
    # that do not require high availability.
    ANY = 64_972

    # GCE always selects a single zone for all the VMs, optimizing for resource
    # quotas, available reservations and general capacity. Recommended for
    # batch workloads that cannot tollerate distribution over multiple zones.
    # This the default shape in Bulk Insert and Capacity Advisor APIs.
    ANY_SINGLE_ZONE = 61_100_880

    # GCE prioritizes acquisition of resources, scheduling VMs in zones
    # where resources are available while distributing VMs as evenly as
    # possible across allowed zones to minimize the impact of zonal failure.
    # Recommended for highly available serving workloads.
    BALANCED = 468_409_608
  end
end

#target_shape::String

Returns Strategy for distributing VMs across zones in a region. Check the TargetShape enum for the list of possible values.

Returns:

  • (::String)

    Strategy for distributing VMs across zones in a region. Check the TargetShape enum for the list of possible values.



52790
52791
52792
52793
52794
52795
52796
52797
52798
52799
52800
52801
52802
52803
52804
52805
52806
52807
52808
52809
52810
52811
52812
52813
52814
52815
52816
52817
52818
52819
52820
52821
52822
52823
52824
52825
52826
# File 'proto_docs/google/cloud/compute/v1/compute.rb', line 52790

class LocationPolicy
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::Google::Cloud::Compute::V1::LocationPolicyLocation]
  class LocationsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Strategy for distributing VMs across zones in a region.
  module TargetShape
    # A value indicating that the enum field is not set.
    UNDEFINED_TARGET_SHAPE = 0

    # GCE picks zones for creating VM instances to fulfill the requested
    # number of VMs within present resource constraints and to maximize
    # utilization of unused zonal reservations. Recommended for batch workloads
    # that do not require high availability.
    ANY = 64_972

    # GCE always selects a single zone for all the VMs, optimizing for resource
    # quotas, available reservations and general capacity. Recommended for
    # batch workloads that cannot tollerate distribution over multiple zones.
    # This the default shape in Bulk Insert and Capacity Advisor APIs.
    ANY_SINGLE_ZONE = 61_100_880

    # GCE prioritizes acquisition of resources, scheduling VMs in zones
    # where resources are available while distributing VMs as evenly as
    # possible across allowed zones to minimize the impact of zonal failure.
    # Recommended for highly available serving workloads.
    BALANCED = 468_409_608
  end
end

#zones::Array<::Google::Cloud::Compute::V1::LocationPolicyZoneConfiguration>

Returns The bulkInsert operation applies any preferences set in the locations field to the specific zones listed in the zones field if the same zones are specified in both fields.

Returns:



52790
52791
52792
52793
52794
52795
52796
52797
52798
52799
52800
52801
52802
52803
52804
52805
52806
52807
52808
52809
52810
52811
52812
52813
52814
52815
52816
52817
52818
52819
52820
52821
52822
52823
52824
52825
52826
# File 'proto_docs/google/cloud/compute/v1/compute.rb', line 52790

class LocationPolicy
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::Google::Cloud::Compute::V1::LocationPolicyLocation]
  class LocationsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Strategy for distributing VMs across zones in a region.
  module TargetShape
    # A value indicating that the enum field is not set.
    UNDEFINED_TARGET_SHAPE = 0

    # GCE picks zones for creating VM instances to fulfill the requested
    # number of VMs within present resource constraints and to maximize
    # utilization of unused zonal reservations. Recommended for batch workloads
    # that do not require high availability.
    ANY = 64_972

    # GCE always selects a single zone for all the VMs, optimizing for resource
    # quotas, available reservations and general capacity. Recommended for
    # batch workloads that cannot tollerate distribution over multiple zones.
    # This the default shape in Bulk Insert and Capacity Advisor APIs.
    ANY_SINGLE_ZONE = 61_100_880

    # GCE prioritizes acquisition of resources, scheduling VMs in zones
    # where resources are available while distributing VMs as evenly as
    # possible across allowed zones to minimize the impact of zonal failure.
    # Recommended for highly available serving workloads.
    BALANCED = 468_409_608
  end
end