Reference documentation and code samples for the Google Cloud Vpc Access V1 Client class Subnet.
The subnet in which to house the connector
Generated from protobuf messagegoogle.cloud.vpcaccess.v1.Connector.Subnet
Namespace
Google \ Cloud \ VpcAccess \ V1 \ Connector
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ name
string
Subnet name (relative, not fully qualified). E.g. if the full subnet selfLink is https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetName} the correct input for this field would be {subnetName}
↳ project_id
string
Project in which the subnet exists. If not set, this project is assumed to be the project for which the connector create request was issued.
getName
Subnet name (relative, not fully qualified).
E.g. if the full subnet selfLink is
https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetName}
the correct input for this field would be {subnetName}
Returns
Type
Description
string
setName
Subnet name (relative, not fully qualified).
E.g. if the full subnet selfLink is
https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetName}
the correct input for this field would be {subnetName}
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getProjectId
Project in which the subnet exists.
If not set, this project is assumed to be the project for which
the connector create request was issued.
Returns
Type
Description
string
setProjectId
Project in which the subnet exists.
If not set, this project is assumed to be the project for which
the connector create request was issued.
[[["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-04 UTC."],[],[],null,["# Google Cloud Vpc Access V1 Client - Class Subnet (2.0.5)\n\nVersion latestkeyboard_arrow_down\n\n- [2.0.5 (latest)](/php/docs/reference/cloud-vpc-access/latest/V1.Connector.Subnet)\n- [2.0.4](/php/docs/reference/cloud-vpc-access/2.0.4/V1.Connector.Subnet)\n- [1.3.5](/php/docs/reference/cloud-vpc-access/1.3.5/V1.Connector.Subnet)\n- [1.2.2](/php/docs/reference/cloud-vpc-access/1.2.2/V1.Connector.Subnet)\n- [1.1.1](/php/docs/reference/cloud-vpc-access/1.1.1/V1.Connector.Subnet)\n- [1.0.5](/php/docs/reference/cloud-vpc-access/1.0.5/V1.Connector.Subnet) \nReference documentation and code samples for the Google Cloud Vpc Access V1 Client class Subnet.\n\nThe subnet in which to house the connector\n\nGenerated from protobuf message `google.cloud.vpcaccess.v1.Connector.Subnet`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ VpcAccess \\\\ V1 \\\\ Connector\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nSubnet name (relative, not fully qualified).\n\nE.g. if the full subnet selfLink is\nhttps://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetName}\nthe correct input for this field would be {subnetName}\n\n### setName\n\nSubnet name (relative, not fully qualified).\n\nE.g. if the full subnet selfLink is\nhttps://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetName}\nthe correct input for this field would be {subnetName}\n\n### getProjectId\n\nProject in which the subnet exists.\n\nIf not set, this project is assumed to be the project for which\nthe connector create request was issued.\n\n### setProjectId\n\nProject in which the subnet exists.\n\nIf not set, this project is assumed to be the project for which\nthe connector create request was issued."]]