Class: Google::Apis::ComputeAlpha::NetworkInterface
- Inherits:
-
Object
- Object
- Google::Apis::ComputeAlpha::NetworkInterface
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- generated/google/apis/compute_alpha/classes.rb,
generated/google/apis/compute_alpha/representations.rb,
generated/google/apis/compute_alpha/representations.rb
Overview
A network interface resource attached to an instance.
Instance Attribute Summary collapse
-
#access_configs ⇒ Array<Google::Apis::ComputeAlpha::AccessConfig>
An array of configurations for this interface.
-
#alias_ip_ranges ⇒ Array<Google::Apis::ComputeAlpha::AliasIpRange>
An array of alias IP ranges for this network interface.
-
#fingerprint ⇒ String
Fingerprint hash of contents stored in this network interface.
-
#internal_ipv6_prefix_length ⇒ Fixnum
[Output Only] The prefix length of the primary internal IPv6 range.
-
#ipv6_access_configs ⇒ Array<Google::Apis::ComputeAlpha::AccessConfig>
An array of IPv6 access configurations for this interface.
-
#ipv6_access_type ⇒ String
[Output Only] One of EXTERNAL, INTERNAL to indicate whether the IP can be accessed from the Internet.
-
#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.
-
#queue_count ⇒ Fixnum
The networking queue count that's specified by users for the network interface.
-
#stack_type ⇒ String
The stack type for this network interface to identify whether the IPv6 feature is enabled or not.
-
#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.
22192 22193 22194 |
# File 'generated/google/apis/compute_alpha/classes.rb', line 22192 def initialize(**args) update!(**args) end |
Instance Attribute Details
#access_configs ⇒ Array<Google::Apis::ComputeAlpha::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
22085 22086 22087 |
# File 'generated/google/apis/compute_alpha/classes.rb', line 22085 def access_configs @access_configs end |
#alias_ip_ranges ⇒ Array<Google::Apis::ComputeAlpha::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
22091 22092 22093 |
# File 'generated/google/apis/compute_alpha/classes.rb', line 22091 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.
22100 22101 22102 |
# File 'generated/google/apis/compute_alpha/classes.rb', line 22100 def fingerprint @fingerprint end |
#internal_ipv6_prefix_length ⇒ Fixnum
[Output Only] The prefix length of the primary internal IPv6 range.
Corresponds to the JSON property internalIpv6PrefixLength
22105 22106 22107 |
# File 'generated/google/apis/compute_alpha/classes.rb', line 22105 def internal_ipv6_prefix_length @internal_ipv6_prefix_length end |
#ipv6_access_configs ⇒ Array<Google::Apis::ComputeAlpha::AccessConfig>
An array of IPv6 access configurations for this interface. Currently, only one
IPv6 access config, DIRECT_IPV6, is supported. If there is no ipv6AccessConfig
specified, then this instance will have no external IPv6 Internet access.
Corresponds to the JSON property ipv6AccessConfigs
22112 22113 22114 |
# File 'generated/google/apis/compute_alpha/classes.rb', line 22112 def ipv6_access_configs @ipv6_access_configs end |
#ipv6_access_type ⇒ String
[Output Only] One of EXTERNAL, INTERNAL to indicate whether the IP can be
accessed from the Internet. This field is always inherited from its subnetwork.
Valid only if stackType is IPV4_IPV6.
Corresponds to the JSON property ipv6AccessType
22119 22120 22121 |
# File 'generated/google/apis/compute_alpha/classes.rb', line 22119 def ipv6_access_type @ipv6_access_type end |
#ipv6_address ⇒ String
[Output Only] An IPv6 internal network address for this network interface.
Corresponds to the JSON property ipv6Address
22124 22125 22126 |
# File 'generated/google/apis/compute_alpha/classes.rb', line 22124 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
22130 22131 22132 |
# File 'generated/google/apis/compute_alpha/classes.rb', line 22130 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
22136 22137 22138 |
# File 'generated/google/apis/compute_alpha/classes.rb', line 22136 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
22150 22151 22152 |
# File 'generated/google/apis/compute_alpha/classes.rb', line 22150 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
22157 22158 22159 |
# File 'generated/google/apis/compute_alpha/classes.rb', line 22157 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
22162 22163 22164 |
# File 'generated/google/apis/compute_alpha/classes.rb', line 22162 def nic_type @nic_type end |
#queue_count ⇒ Fixnum
The networking queue count that's specified by users for the network interface.
Both Rx and Tx queues will be set to this number. It'll be empty if not
specified by the users.
Corresponds to the JSON property queueCount
22169 22170 22171 |
# File 'generated/google/apis/compute_alpha/classes.rb', line 22169 def queue_count @queue_count end |
#stack_type ⇒ String
The stack type for this network interface to identify whether the IPv6 feature
is enabled or not. If not specified, IPV4_ONLY will be used.
This field can be both set at instance creation and update network interface
operations.
Corresponds to the JSON property stackType
22177 22178 22179 |
# File 'generated/google/apis/compute_alpha/classes.rb', line 22177 def stack_type @stack_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
22190 22191 22192 |
# File 'generated/google/apis/compute_alpha/classes.rb', line 22190 def subnetwork @subnetwork end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
22197 22198 22199 22200 22201 22202 22203 22204 22205 22206 22207 22208 22209 22210 22211 22212 22213 |
# File 'generated/google/apis/compute_alpha/classes.rb', line 22197 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) @internal_ipv6_prefix_length = args[:internal_ipv6_prefix_length] if args.key?(:internal_ipv6_prefix_length) @ipv6_access_configs = args[:ipv6_access_configs] if args.key?(:ipv6_access_configs) @ipv6_access_type = args[:ipv6_access_type] if args.key?(:ipv6_access_type) @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) @queue_count = args[:queue_count] if args.key?(:queue_count) @stack_type = args[:stack_type] if args.key?(:stack_type) @subnetwork = args[:subnetwork] if args.key?(:subnetwork) end |