Class: Google::Apis::ComputeV1::NetworkInterface
- Inherits:
-
Object
- Object
- Google::Apis::ComputeV1::NetworkInterface
- Defined in:
- generated/google/apis/compute_v1/classes.rb,
generated/google/apis/compute_v1/representations.rb,
generated/google/apis/compute_v1/representations.rb
Overview
A network interface resource attached to an instance.
Instance Attribute Summary collapse
-
#access_configs ⇒ Array<Google::Apis::ComputeV1::AccessConfig>
An array of configurations for this interface.
-
#name ⇒ String
[Output Only] The name of the network interface, generated by the server.
-
#network ⇒ String
URL of the network resource for this instance.
-
#network_ip ⇒ String
An IPv4 internal network address to assign to the instance for this network interface.
-
#subnetwork ⇒ String
The URL of the Subnetwork resource for this instance.
Instance Method Summary collapse
-
#initialize(**args) ⇒ NetworkInterface
constructor
A new instance of NetworkInterface.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Google::Apis::Core::JsonObjectSupport
Methods included from Google::Apis::Core::Hashable
Constructor Details
#initialize(**args) ⇒ NetworkInterface
Returns a new instance of NetworkInterface.
5891 5892 5893 |
# File 'generated/google/apis/compute_v1/classes.rb', line 5891 def initialize(**args) update!(**args) end |
Instance Attribute Details
#access_configs ⇒ Array<Google::Apis::ComputeV1::AccessConfig>
An array of configurations for this interface. Currently, only one access
config, ONE_TO_ONE_NAT, is supported. If there are no accessConfigs specified,
then this instance will have no external internet access.
Corresponds to the JSON property accessConfigs
5849 5850 5851 |
# File 'generated/google/apis/compute_v1/classes.rb', line 5849 def access_configs @access_configs end |
#name ⇒ String
[Output Only] The name of the network interface, generated by the server. For
network devices, these are eth0, eth1, etc.
Corresponds to the JSON property name
5855 5856 5857 |
# File 'generated/google/apis/compute_v1/classes.rb', line 5855 def name @name end |
#network ⇒ String
URL of the network resource for this instance. This is required for creating an instance but optional when creating a firewall rule. If not specified when creating a firewall rule, the default network is used: global/networks/default If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
- https://www.googleapis.com/compute/v1/projects/project/global/networks/ network
- projects/project/global/networks/network
- global/networks/default
Corresponds to the JSON property
network
5869 5870 5871 |
# File 'generated/google/apis/compute_v1/classes.rb', line 5869 def network @network end |
#network_ip ⇒ String
An IPv4 internal network address to assign to the instance for this network
interface. If not specified by the user, an unused internal IP is assigned by
the system.
Corresponds to the JSON property networkIP
5876 5877 5878 |
# File 'generated/google/apis/compute_v1/classes.rb', line 5876 def network_ip @network_ip end |
#subnetwork ⇒ String
The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not provide this property. If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. If you specify this property, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs:
- https://www.googleapis.com/compute/v1/projects/project/regions/region/ subnetworks/subnetwork
- regions/region/subnetworks/subnetwork
Corresponds to the JSON property
subnetwork
5889 5890 5891 |
# File 'generated/google/apis/compute_v1/classes.rb', line 5889 def subnetwork @subnetwork end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
5896 5897 5898 5899 5900 5901 5902 |
# File 'generated/google/apis/compute_v1/classes.rb', line 5896 def update!(**args) @access_configs = args[:access_configs] if args.key?(:access_configs) @name = args[:name] if args.key?(:name) @network = args[:network] if args.key?(:network) @network_ip = args[:network_ip] if args.key?(:network_ip) @subnetwork = args[:subnetwork] if args.key?(:subnetwork) end |