Class: Google::Apis::ComputeV1::UsableSubnetwork

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

Overview

Subnetwork which the current user has compute.subnetworks.use permission on.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ UsableSubnetwork

Returns a new instance of UsableSubnetwork.



60234
60235
60236
# File 'lib/google/apis/compute_v1/classes.rb', line 60234

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

Instance Attribute Details

#external_ipv6_prefixString

Output only. [Output Only] The external IPv6 address range that is assigned to this subnetwork. Corresponds to the JSON property externalIpv6Prefix

Returns:

  • (String)


60173
60174
60175
# File 'lib/google/apis/compute_v1/classes.rb', line 60173

def external_ipv6_prefix
  @external_ipv6_prefix
end

#internal_ipv6_prefixString

Output only. [Output Only] The internal IPv6 address range that is assigned to this subnetwork. Corresponds to the JSON property internalIpv6Prefix

Returns:

  • (String)


60180
60181
60182
# File 'lib/google/apis/compute_v1/classes.rb', line 60180

def internal_ipv6_prefix
  @internal_ipv6_prefix
end

#ip_cidr_rangeString

The range of internal addresses that are owned by this subnetwork. Corresponds to the JSON property ipCidrRange

Returns:

  • (String)


60185
60186
60187
# File 'lib/google/apis/compute_v1/classes.rb', line 60185

def ip_cidr_range
  @ip_cidr_range
end

#ipv6_access_typeString

The access type of IPv6 address this subnet holds. It's immutable and can only be specified during creation or the first time the subnet is updated into IPV4_IPV6 dual stack. Corresponds to the JSON property ipv6AccessType

Returns:

  • (String)


60192
60193
60194
# File 'lib/google/apis/compute_v1/classes.rb', line 60192

def ipv6_access_type
  @ipv6_access_type
end

#networkString

Network URL. Corresponds to the JSON property network

Returns:

  • (String)


60197
60198
60199
# File 'lib/google/apis/compute_v1/classes.rb', line 60197

def network
  @network
end

#purposeString

Corresponds to the JSON property purpose

Returns:

  • (String)


60202
60203
60204
# File 'lib/google/apis/compute_v1/classes.rb', line 60202

def purpose
  @purpose
end

#roleString

The role of subnetwork. Currently, this field is only used when purpose is set to GLOBAL_MANAGED_PROXY orREGIONAL_MANAGED_PROXY. The value can be set toACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Envoy-based load balancers in a region. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request. Corresponds to the JSON property role

Returns:

  • (String)


60213
60214
60215
# File 'lib/google/apis/compute_v1/classes.rb', line 60213

def role
  @role
end

#secondary_ip_rangesArray<Google::Apis::ComputeV1::UsableSubnetworkSecondaryRange>

Secondary IP ranges. Corresponds to the JSON property secondaryIpRanges



60218
60219
60220
# File 'lib/google/apis/compute_v1/classes.rb', line 60218

def secondary_ip_ranges
  @secondary_ip_ranges
end

#stack_typeString

The stack type for the subnet. If set to IPV4_ONLY, new VMs in the subnet are assigned IPv4 addresses only. If set toIPV4_IPV6, new VMs in the subnet can be assigned both IPv4 and IPv6 addresses. If not specified, IPV4_ONLY is used. This field can be both set at resource creation time and updated usingpatch. Corresponds to the JSON property stackType

Returns:

  • (String)


60227
60228
60229
# File 'lib/google/apis/compute_v1/classes.rb', line 60227

def stack_type
  @stack_type
end

#subnetworkString

Subnetwork URL. Corresponds to the JSON property subnetwork

Returns:

  • (String)


60232
60233
60234
# File 'lib/google/apis/compute_v1/classes.rb', line 60232

def subnetwork
  @subnetwork
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



60239
60240
60241
60242
60243
60244
60245
60246
60247
60248
60249
60250
# File 'lib/google/apis/compute_v1/classes.rb', line 60239

def update!(**args)
  @external_ipv6_prefix = args[:external_ipv6_prefix] if args.key?(:external_ipv6_prefix)
  @internal_ipv6_prefix = args[:internal_ipv6_prefix] if args.key?(:internal_ipv6_prefix)
  @ip_cidr_range = args[:ip_cidr_range] if args.key?(:ip_cidr_range)
  @ipv6_access_type = args[:ipv6_access_type] if args.key?(:ipv6_access_type)
  @network = args[:network] if args.key?(:network)
  @purpose = args[:purpose] if args.key?(:purpose)
  @role = args[:role] if args.key?(:role)
  @secondary_ip_ranges = args[:secondary_ip_ranges] if args.key?(:secondary_ip_ranges)
  @stack_type = args[:stack_type] if args.key?(:stack_type)
  @subnetwork = args[:subnetwork] if args.key?(:subnetwork)
end