Class: Google::Apis::ComputeV1::AccessConfig

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

An access configuration attached to an instance's network interface. Only one access config per instance is supported.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AccessConfig

Returns a new instance of AccessConfig.



540
541
542
# File 'lib/google/apis/compute_v1/classes.rb', line 540

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

Instance Attribute Details

#external_ipv6String

Applies to ipv6AccessConfigs only. The first IPv6 address of the external IPv6 range associated with this instance, prefix length is stored in externalIpv6PrefixLength in ipv6AccessConfig. To use a static external IP address, it must be unused and in the same region as the instance's zone. If not specified, Google Cloud will automatically assign an external IPv6 address from the instance's subnetwork. Corresponds to the JSON property externalIpv6

Returns:

  • (String)


475
476
477
# File 'lib/google/apis/compute_v1/classes.rb', line 475

def external_ipv6
  @external_ipv6
end

#external_ipv6_prefix_lengthFixnum

Applies to ipv6AccessConfigs only. The prefix length of the external IPv6 range. Corresponds to the JSON property externalIpv6PrefixLength

Returns:

  • (Fixnum)


481
482
483
# File 'lib/google/apis/compute_v1/classes.rb', line 481

def external_ipv6_prefix_length
  @external_ipv6_prefix_length
end

#kindString

[Output Only] Type of the resource. Always compute#accessConfig for access configs. Corresponds to the JSON property kind

Returns:

  • (String)


487
488
489
# File 'lib/google/apis/compute_v1/classes.rb', line 487

def kind
  @kind
end

#nameString

The name of this access configuration. In accessConfigs (IPv4), the default and recommended name is External NAT, but you can use any arbitrary string, such as My external IP or Network Access. In ipv6AccessConfigs, the recommend name is External IPv6. Corresponds to the JSON property name

Returns:

  • (String)


495
496
497
# File 'lib/google/apis/compute_v1/classes.rb', line 495

def name
  @name
end

#nat_ipString

Applies to accessConfigs (IPv4) only. An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance. Corresponds to the JSON property natIP

Returns:

  • (String)


504
505
506
# File 'lib/google/apis/compute_v1/classes.rb', line 504

def nat_ip
  @nat_ip
end

#network_tierString

This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD. If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier. If an AccessConfig with a valid external IP address is specified, it must match that of the networkTier associated with the Address resource owning that IP. Corresponds to the JSON property networkTier

Returns:

  • (String)


514
515
516
# File 'lib/google/apis/compute_v1/classes.rb', line 514

def network_tier
  @network_tier
end

#public_ptr_domain_nameString

The DNS domain name for the public PTR record. You can set this field only if the setPublicPtr field is enabled in accessConfig. If this field is unspecified in ipv6AccessConfig, a default PTR record will be createc for first IP in associated external IPv6 range. Corresponds to the JSON property publicPtrDomainName

Returns:

  • (String)


522
523
524
# File 'lib/google/apis/compute_v1/classes.rb', line 522

def public_ptr_domain_name
  @public_ptr_domain_name
end

#set_public_ptrBoolean Also known as: set_public_ptr?

Specifies whether a public DNS 'PTR' record should be created to map the external IP address of the instance to a DNS domain name. This field is not used in ipv6AccessConfig. A default PTR record will be created if the VM has external IPv6 range associated. Corresponds to the JSON property setPublicPtr

Returns:

  • (Boolean)


530
531
532
# File 'lib/google/apis/compute_v1/classes.rb', line 530

def set_public_ptr
  @set_public_ptr
end

#typeString

The type of configuration. In accessConfigs (IPv4), the default and only option is ONE_TO_ONE_NAT. In ipv6AccessConfigs, the default and only option is DIRECT_IPV6. Corresponds to the JSON property type

Returns:

  • (String)


538
539
540
# File 'lib/google/apis/compute_v1/classes.rb', line 538

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



545
546
547
548
549
550
551
552
553
554
555
# File 'lib/google/apis/compute_v1/classes.rb', line 545

def update!(**args)
  @external_ipv6 = args[:external_ipv6] if args.key?(:external_ipv6)
  @external_ipv6_prefix_length = args[:external_ipv6_prefix_length] if args.key?(:external_ipv6_prefix_length)
  @kind = args[:kind] if args.key?(:kind)
  @name = args[:name] if args.key?(:name)
  @nat_ip = args[:nat_ip] if args.key?(:nat_ip)
  @network_tier = args[:network_tier] if args.key?(:network_tier)
  @public_ptr_domain_name = args[:public_ptr_domain_name] if args.key?(:public_ptr_domain_name)
  @set_public_ptr = args[:set_public_ptr] if args.key?(:set_public_ptr)
  @type = args[:type] if args.key?(:type)
end