Class: Google::Apis::ComputeBeta::NetworkInterface
- Inherits:
-
Object
- Object
- Google::Apis::ComputeBeta::NetworkInterface
- 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
A network interface resource attached to an instance.
Instance Attribute Summary collapse
-
#access_configs ⇒ Array<Google::Apis::ComputeBeta::AccessConfig>
An array of configurations for this interface.
-
#alias_ip_ranges ⇒ Array<Google::Apis::ComputeBeta::AliasIpRange>
An array of alias IP ranges for this network interface.
-
#fingerprint ⇒ String
Fingerprint hash of contents stored in this network interface.
-
#ipv6_address ⇒ String
[Output Only] An IPv6 internal network address for this network interface.
-
#kind ⇒ String
[Output Only] Type of the resource.
-
#name ⇒ String
[Output Only] The name of the network interface, which is generated by the server.
-
#network ⇒ String
URL of the network resource for this instance.
-
#network_ip ⇒ String
An IPv4 internal IP address to assign to the instance for this network interface.
-
#nic_type ⇒ String
The type of vNIC to be used on this 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.
Constructor Details
#initialize(**args) ⇒ NetworkInterface
Returns a new instance of NetworkInterface.
19879 19880 19881 |
# File 'generated/google/apis/compute_beta/classes.rb', line 19879 def initialize(**args) update!(**args) end |
Instance Attribute Details
#access_configs ⇒ Array<Google::Apis::ComputeBeta::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
19806 19807 19808 |
# File 'generated/google/apis/compute_beta/classes.rb', line 19806 def access_configs @access_configs end |
#alias_ip_ranges ⇒ Array<Google::Apis::ComputeBeta::AliasIpRange>
An array of alias IP ranges for this network interface. You can only specify
this field for network interfaces in VPC networks.
Corresponds to the JSON property aliasIpRanges
19812 19813 19814 |
# File 'generated/google/apis/compute_beta/classes.rb', line 19812 def alias_ip_ranges @alias_ip_ranges end |
#fingerprint ⇒ String
Fingerprint hash of contents stored in this network interface. This field will
be ignored when inserting an Instance or adding a NetworkInterface. An up-to-
date fingerprint must be provided in order to update the NetworkInterface,
otherwise the request will fail with error 412 conditionNotMet.
Corresponds to the JSON property fingerprint
NOTE: Values are automatically base64 encoded/decoded in the client library.
19821 19822 19823 |
# File 'generated/google/apis/compute_beta/classes.rb', line 19821 def fingerprint @fingerprint end |
#ipv6_address ⇒ String
[Output Only] An IPv6 internal network address for this network interface.
Corresponds to the JSON property ipv6Address
19826 19827 19828 |
# File 'generated/google/apis/compute_beta/classes.rb', line 19826 def ipv6_address @ipv6_address end |
#kind ⇒ String
[Output Only] Type of the resource. Always compute#networkInterface for
network interfaces.
Corresponds to the JSON property kind
19832 19833 19834 |
# File 'generated/google/apis/compute_beta/classes.rb', line 19832 def kind @kind end |
#name ⇒ String
[Output Only] The name of the network interface, which is generated by the
server. For network devices, these are eth0, eth1, etc.
Corresponds to the JSON property name
19838 19839 19840 |
# File 'generated/google/apis/compute_beta/classes.rb', line 19838 def name @name end |
#network ⇒ String
URL of the network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred. 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
19852 19853 19854 |
# File 'generated/google/apis/compute_beta/classes.rb', line 19852 def network @network end |
#network_ip ⇒ String
An IPv4 internal IP 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
19859 19860 19861 |
# File 'generated/google/apis/compute_beta/classes.rb', line 19859 def network_ip @network_ip end |
#nic_type ⇒ String
The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet.
Corresponds to the JSON property nicType
19864 19865 19866 |
# File 'generated/google/apis/compute_beta/classes.rb', line 19864 def nic_type @nic_type end |
#subnetwork ⇒ String
The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not specify this field. If the network is in auto subnet mode, specifying the subnetwork is optional. If the network is in custom subnet mode, specifying the subnetwork is required. If you specify this field, 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
19877 19878 19879 |
# File 'generated/google/apis/compute_beta/classes.rb', line 19877 def subnetwork @subnetwork end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
19884 19885 19886 19887 19888 19889 19890 19891 19892 19893 19894 19895 |
# File 'generated/google/apis/compute_beta/classes.rb', line 19884 def update!(**args) @access_configs = args[:access_configs] if args.key?(:access_configs) @alias_ip_ranges = args[:alias_ip_ranges] if args.key?(:alias_ip_ranges) @fingerprint = args[:fingerprint] if args.key?(:fingerprint) @ipv6_address = args[:ipv6_address] if args.key?(:ipv6_address) @kind = args[:kind] if args.key?(:kind) @name = args[:name] if args.key?(:name) @network = args[:network] if args.key?(:network) @network_ip = args[:network_ip] if args.key?(:network_ip) @nic_type = args[:nic_type] if args.key?(:nic_type) @subnetwork = args[:subnetwork] if args.key?(:subnetwork) end |