Class: Google::Apis::ComputeBeta::AccessConfig

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/compute_beta/classes.rb,
generated/google/apis/compute_beta/representations.rb,
generated/google/apis/compute_beta/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

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ AccessConfig

Returns a new instance of AccessConfig.



55
56
57
# File 'generated/google/apis/compute_beta/classes.rb', line 55

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

Instance Attribute Details

#kindString

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

Returns:

  • (String)


34
35
36
# File 'generated/google/apis/compute_beta/classes.rb', line 34

def kind
  @kind
end

#nameString

Name of this access configuration. Corresponds to the JSON property name

Returns:

  • (String)


39
40
41
# File 'generated/google/apis/compute_beta/classes.rb', line 39

def name
  @name
end

#nat_ipString

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)


48
49
50
# File 'generated/google/apis/compute_beta/classes.rb', line 48

def nat_ip
  @nat_ip
end

#typeString

The type of configuration. The default and only option is ONE_TO_ONE_NAT. Corresponds to the JSON property type

Returns:

  • (String)


53
54
55
# File 'generated/google/apis/compute_beta/classes.rb', line 53

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



60
61
62
63
64
65
# File 'generated/google/apis/compute_beta/classes.rb', line 60

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