(::Boolean) — Default is false (with an external IP address). Required if
no external public IP address is attached to the VM. If no external
public IP address, additional configuration is required to allow the VM
to access Google Services. See
https://cloud.google.com/vpc/docs/configure-private-google-access and
https://cloud.google.com/nat/docs/gce-example#create-nat for more
information.
#no_external_ip_address=
defno_external_ip_address=(value)->::Boolean
Parameter
value (::Boolean) — Default is false (with an external IP address). Required if
no external public IP address is attached to the VM. If no external
public IP address, additional configuration is required to allow the VM
to access Google Services. See
https://cloud.google.com/vpc/docs/configure-private-google-access and
https://cloud.google.com/nat/docs/gce-example#create-nat for more
information.
Returns
(::Boolean) — Default is false (with an external IP address). Required if
no external public IP address is attached to the VM. If no external
public IP address, additional configuration is required to allow the VM
to access Google Services. See
https://cloud.google.com/vpc/docs/configure-private-google-access and
https://cloud.google.com/nat/docs/gce-example#create-nat for more
information.
#subnetwork
defsubnetwork()->::String
Returns
(::String) —
The URL of an existing subnetwork resource in the network.
You can specify the subnetwork as a full or partial URL.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Batch V1 API - Class Google::Cloud::Batch::V1::AllocationPolicy::NetworkInterface (v1.2.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.2.0 (latest)](/ruby/docs/reference/google-cloud-batch-v1/latest/Google-Cloud-Batch-V1-AllocationPolicy-NetworkInterface)\n- [1.1.1](/ruby/docs/reference/google-cloud-batch-v1/1.1.1/Google-Cloud-Batch-V1-AllocationPolicy-NetworkInterface)\n- [1.0.0](/ruby/docs/reference/google-cloud-batch-v1/1.0.0/Google-Cloud-Batch-V1-AllocationPolicy-NetworkInterface)\n- [0.21.0](/ruby/docs/reference/google-cloud-batch-v1/0.21.0/Google-Cloud-Batch-V1-AllocationPolicy-NetworkInterface)\n- [0.20.1](/ruby/docs/reference/google-cloud-batch-v1/0.20.1/Google-Cloud-Batch-V1-AllocationPolicy-NetworkInterface)\n- [0.19.2](/ruby/docs/reference/google-cloud-batch-v1/0.19.2/Google-Cloud-Batch-V1-AllocationPolicy-NetworkInterface)\n- [0.18.3](/ruby/docs/reference/google-cloud-batch-v1/0.18.3/Google-Cloud-Batch-V1-AllocationPolicy-NetworkInterface)\n- [0.17.4](/ruby/docs/reference/google-cloud-batch-v1/0.17.4/Google-Cloud-Batch-V1-AllocationPolicy-NetworkInterface)\n- [0.16.2](/ruby/docs/reference/google-cloud-batch-v1/0.16.2/Google-Cloud-Batch-V1-AllocationPolicy-NetworkInterface)\n- [0.15.1](/ruby/docs/reference/google-cloud-batch-v1/0.15.1/Google-Cloud-Batch-V1-AllocationPolicy-NetworkInterface)\n- [0.14.0](/ruby/docs/reference/google-cloud-batch-v1/0.14.0/Google-Cloud-Batch-V1-AllocationPolicy-NetworkInterface)\n- [0.13.1](/ruby/docs/reference/google-cloud-batch-v1/0.13.1/Google-Cloud-Batch-V1-AllocationPolicy-NetworkInterface)\n- [0.12.0](/ruby/docs/reference/google-cloud-batch-v1/0.12.0/Google-Cloud-Batch-V1-AllocationPolicy-NetworkInterface)\n- [0.11.1](/ruby/docs/reference/google-cloud-batch-v1/0.11.1/Google-Cloud-Batch-V1-AllocationPolicy-NetworkInterface)\n- [0.10.5](/ruby/docs/reference/google-cloud-batch-v1/0.10.5/Google-Cloud-Batch-V1-AllocationPolicy-NetworkInterface)\n- [0.9.0](/ruby/docs/reference/google-cloud-batch-v1/0.9.0/Google-Cloud-Batch-V1-AllocationPolicy-NetworkInterface)\n- [0.8.0](/ruby/docs/reference/google-cloud-batch-v1/0.8.0/Google-Cloud-Batch-V1-AllocationPolicy-NetworkInterface)\n- [0.7.0](/ruby/docs/reference/google-cloud-batch-v1/0.7.0/Google-Cloud-Batch-V1-AllocationPolicy-NetworkInterface)\n- [0.6.0](/ruby/docs/reference/google-cloud-batch-v1/0.6.0/Google-Cloud-Batch-V1-AllocationPolicy-NetworkInterface)\n- [0.5.0](/ruby/docs/reference/google-cloud-batch-v1/0.5.0/Google-Cloud-Batch-V1-AllocationPolicy-NetworkInterface)\n- [0.4.3](/ruby/docs/reference/google-cloud-batch-v1/0.4.3/Google-Cloud-Batch-V1-AllocationPolicy-NetworkInterface)\n- [0.3.0](/ruby/docs/reference/google-cloud-batch-v1/0.3.0/Google-Cloud-Batch-V1-AllocationPolicy-NetworkInterface)\n- [0.2.0](/ruby/docs/reference/google-cloud-batch-v1/0.2.0/Google-Cloud-Batch-V1-AllocationPolicy-NetworkInterface)\n- [0.1.0](/ruby/docs/reference/google-cloud-batch-v1/0.1.0/Google-Cloud-Batch-V1-AllocationPolicy-NetworkInterface) \nReference documentation and code samples for the Batch V1 API class Google::Cloud::Batch::V1::AllocationPolicy::NetworkInterface.\n\nA network interface. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #network\n\n def network() -\u003e ::String\n\n**Returns**\n\n- (::String) --- The URL of an existing network resource.\n You can specify the network as a full or partial URL.\n\n For example, the following are all valid URLs:\n - https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}\n - projects/{project}/global/networks/{network}\n - global/networks/{network}\n\n### #network=\n\n def network=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) ---\n\n The URL of an existing network resource.\n You can specify the network as a full or partial URL.\n\n For example, the following are all valid URLs:\n - https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}\n - projects/{project}/global/networks/{network}\n- global/networks/{network} \n**Returns**\n\n- (::String) --- The URL of an existing network resource.\n You can specify the network as a full or partial URL.\n\n For example, the following are all valid URLs:\n - https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}\n - projects/{project}/global/networks/{network}\n - global/networks/{network}\n\n### #no_external_ip_address\n\n def no_external_ip_address() -\u003e ::Boolean\n\n**Returns**\n\n- (::Boolean) --- Default is false (with an external IP address). Required if no external public IP address is attached to the VM. If no external public IP address, additional configuration is required to allow the VM to access Google Services. See https://cloud.google.com/vpc/docs/configure-private-google-access and https://cloud.google.com/nat/docs/gce-example#create-nat for more information.\n\n### #no_external_ip_address=\n\n def no_external_ip_address=(value) -\u003e ::Boolean\n\n**Parameter**\n\n- **value** (::Boolean) --- Default is false (with an external IP address). Required if no external public IP address is attached to the VM. If no external public IP address, additional configuration is required to allow the VM to access Google Services. See https://cloud.google.com/vpc/docs/configure-private-google-access and https://cloud.google.com/nat/docs/gce-example#create-nat for more information. \n**Returns**\n\n- (::Boolean) --- Default is false (with an external IP address). Required if no external public IP address is attached to the VM. If no external public IP address, additional configuration is required to allow the VM to access Google Services. See https://cloud.google.com/vpc/docs/configure-private-google-access and https://cloud.google.com/nat/docs/gce-example#create-nat for more information.\n\n### #subnetwork\n\n def subnetwork() -\u003e ::String\n\n**Returns**\n\n- (::String) --- The URL of an existing subnetwork resource in the network.\n You can specify the subnetwork as a full or partial URL.\n\n For example, the following are all valid URLs:\n - https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork}\n - projects/{project}/regions/{region}/subnetworks/{subnetwork}\n - regions/{region}/subnetworks/{subnetwork}\n\n### #subnetwork=\n\n def subnetwork=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) ---\n\n The URL of an existing subnetwork resource in the network.\n You can specify the subnetwork as a full or partial URL.\n\n For example, the following are all valid URLs:\n - https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork}\n - projects/{project}/regions/{region}/subnetworks/{subnetwork}\n- regions/{region}/subnetworks/{subnetwork} \n**Returns**\n\n- (::String) --- The URL of an existing subnetwork resource in the network.\n You can specify the subnetwork as a full or partial URL.\n\n For example, the following are all valid URLs:\n - https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork}\n - projects/{project}/regions/{region}/subnetworks/{subnetwork}\n - regions/{region}/subnetworks/{subnetwork}"]]