[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-18。"],[],[],null,["# Create a VMware Engine network\n==============================\n\nThis document describes how to create a *Standard VMware Engine\nNetwork* using the VMware Engine portal, gcloud CLI, or\nAPI. You can create multiple VMware Engine networks to isolate\nprivate clouds and define unique VPC network peerings. VMware Engine\nnetworks handle connections to and from private clouds according to a [network\npolicy](/vmware-engine/docs/preview/networking/network-policies) that you define separately.\n| **Note:** Projects created before November 2023 have *Legacy VMware Engine Networks* that are no longer available in newer projects. Google automatically created these networks for you; as such, these steps are only applicable for standard networks. For more information on legacy and standard networks, review the [Network overview](/vmware-engine/docs/networking/vmware-engine-network).\n\nBefore you begin\n----------------\n\n### Google Cloud CLI and API requirements\n\nTo use the `gcloud` command line tool or the API to manage your VMware Engine\nresources, we recommend configuring the tools as described below. \n\n### gcloud\n\n1. Set your default project ID:\n\n ```\n gcloud config set project PROJECT_ID\n ```\n2. Set a default region and zone:\n\n ```\n gcloud config set compute/region REGION\n ``` \n\n ```\n gcloud config set compute/zone ZONE\n ```\n\nFor more information on the `gcloud vmware` tool,\n[see the Cloud SDK reference docs](/sdk/gcloud/reference/vmware).\n\n### API\n\nAPI examples in this documentation set use the `cURL` command-line tool to\nquery the API. A valid access token is required as part of the `cURL`\nrequest. There are many ways to get a valid access token; the following\nsteps use the `gcloud` tool to generate a access token:\n\n1. Login to Google Cloud:\n\n ```\n gcloud auth login\n ```\n2. Generate access token and export to TOKEN:\n\n ```\n export TOKEN=`gcloud auth print-access-token`\n ```\n3. Verify that TOKEN is set properly:\n\n ```\n echo $TOKEN\n ```\n\nNow, use the authorization token in your requests to the API. For example: \n\n```\ncurl -X GET -H \"Authorization: Bearer \\\"$TOKEN\\\"\" -H \"Content-Type: application/json; charset=utf-8\" https://vmwareengine.googleapis.com/v1/projects/PROJECT_ID/locations\n```\n\n### Python\n\nPython code samples in this documentation use the [VMware Engine library](https://cloud.google.com/python/docs/reference/vmwareengine/latest) to communicate with the API. To be able to use this approach, the library needs to be installed and the [Application Default Credentials](https://cloud.google.com/docs/authentication/application-default-credentials) should be configured.\n\n1. Download and install the Python library:\n\n ```\n pip install google-cloud-vmwareengine\n ```\n2. Configure the ADC information by executing those command in your shell:\n\n ```\n gcloud auth application-default login\n ```\n\n Or, use a Service Account key file: \n\n ```\n export GOOGLE_APPLICATION_CREDENTIALS=\"FILE_PATH\"\n ```\n\nFor more information about the library, visit the [reference page](/python/docs/reference/vmwareengine/latest) or view [code samples on GitHub](https://github.com/GoogleCloudPlatform/python-docs-samples/tree/main/vmwareengine/cloud-client).\n\nCreate a VMware Engine network\n------------------------------\n\nCreate a VMware Engine network using the Google Cloud console,\ngcloud CLI, or VMware Engine API: \n\n### Console\n\nTo create a VMware Engine network using the VMware Engine:\n\n1. In the Google Cloud console, go to the **VMware Engine networks** page.\n\n [Go to VMware Engine networks](https://console.cloud.google.com/vmwareengine/networks)\n2. Click **Select a project** and then select the organization, folder, or project\n where you want to create the VMware Engine network.\n\n3. Click **Create**. A VMware Engine network creation form opens.\n\n4. Enter a VMware Engine network name.\n\n5. Enter a description for the network, for example \"My standard VEN 1\", and\n then click **Create**.\n\n6. Optional: Confirm the creation of your network by navigating to the\n **VMware Engine networks** menu item. All VMware Engine\n networks are listed in the table on this page.\n\nThe following list describes each field during network creation in more detail:\n\n- **Name:** Permanent unique identifier of the VMware Engine network.\n- **Description:** Additional information that's visible on the details page of the VMware Engine network.\n- **Network type:** Network type identifier used to support networking use cases and standard private cloud deployments.\n- **Region:** This depends on whether you are using Standard\n VMware Engine or Legacy VMware Engine networks.\n\n - For legacy networks, this is the region where the network has connectivity.\n - For standard networks, this field is always set to global.\n\n### gcloud\n\nTo create a VMware Engine network using the gcloud CLI:\n\n1. Run [`gcloud vmware networks create` command](/sdk/gcloud/reference/vmware/networks/create):\n\n ```\n gcloud vmware networks create NETWORK_ID \\\n --type=STANDARD \\\n --description=\"DESCRIPTION\"\n ```\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eNETWORK_ID\u003c/var\u003e: the ID for your VMware Engine network.\n - \u003cvar translate=\"no\"\u003eDESCRIPTION\u003c/var\u003e: a description for this network.\n2. Optional: If you want to list all VMware Engine networks to confirm the creation of the new network, use the [`gcloud vmware networks list` command](/sdk/gcloud/reference/vmware/networks/list):\n\n ```\n gcloud vmware networks list \\\n --location=global\n ```\n\n### API\n\nTo create a VMware Engine network using the VMware Engine API, do the following:\n\n1. To create a VMware Engine network, make a `POST` request:\n\n ```\n POST \"https://vmwareengine.googleapis.com/v1/projects/PROJECT_ID/locations/global/vmwareEngineNetworks?vmware_engine_network_id=NETWORKD_ID\"\n\n '{\n \"type\": \"standard\",\n \"description\": \"DESCRIPTION\"\n }'\n ```\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the ID of the project where you want to create the network.\n - \u003cvar translate=\"no\"\u003eNETWORK_ID\u003c/var\u003e: the ID for your VMware Engine network.\n - \u003cvar translate=\"no\"\u003eDESCRIPTION\u003c/var\u003e: a description for this network.\n2. Optional: To list all VMware Engine networks to confirm the\n creation of the new network, make a `GET` request.\n Replace \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e with the project ID where the\n network is located.\n\n ```\n GET https://vmwareengine.googleapis.com/v1/projects//locations/global/vmwareEngineNetworks\n ```\n\nUpdate a VMware Engine network\n------------------------------\n\nUpdate a VMware Engine network using the Google Cloud console,\ngcloud CLI, or VMware Engine API: \n\n### Console\n\n1. In the Google Cloud console, go to the **VMware Engine networks** page.\n\n [Go to VMware Engine networks](https://console.cloud.google.com/vmwareengine/networks)\n2. Click **Select a project** and then select the organization, folder, or project that\n contains the VMware Engine network you want to update.\n\n3. Click the name of the network that you want to update.\n\n4. On the network details page, edit the description and then click **Save**.\n\n5. Optional: To view the updated description, navigate to the **VMware Engine networks**\n menu item and click the network to see the details.\n\n### gcloud\n\nTo update a VMware Engine network using the gcloud CLI,\ndo the following:\n\n1. Update the description of a VMware Engine network by running\n the [`gcloud vmware networks update` command](/sdk/gcloud/reference/vmware/networks/update):\n\n ```\n gcloud vmware networks update NETWORK_ID \\\n --description='DESCRIPTION'\n ```\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eNETWORK_ID\u003c/var\u003e: the ID for your VMware Engine network.\n - \u003cvar translate=\"no\"\u003eDESCRIPTION\u003c/var\u003e: an updated description for this network.\n2. Optional: If you want to view the updated attribute, use the\n [`gcloud vmware networks describe` command](/sdk/gcloud/reference/vmware/networks/describe):\n\n ```\n gcloud vmware networks describe NETWORK_ID\n ```\n\n### API\n\nTo update a VMware Engine network using the VMware Engine API,\ndo the following:\n\n1. To update the description of a VMware Engine network, make a\n `PATCH` request:\n\n ```\n PATCH \"https://vmwareengine.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/vmwareEngineNetworks/NETWORK_ID?update_mask=description\"\n\n '{\n \"description\":\"DESCRIPTION\"\n }'\n ```\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the project ID where the network is located.\n - \u003cvar translate=\"no\"\u003eLOCATION\u003cvar translate=\"no\"\u003e\u003c/var\u003e\u003c/var\u003e: the location of the network, either `global` for standard networks or the region for legacy networks.\n - \u003cvar translate=\"no\"\u003eNETWORK_ID\u003c/var\u003e: the ID for your VMware Engine network.\n - \u003cvar translate=\"no\"\u003eDESCRIPTION\u003c/var\u003e: an updated description for this network.\n2. Optional: If you want to view the updated attribute, make a `GET` request:\n\n ```\n GET \"https://vmwareengine.googleapis.com/v1/projects/PROJECT_ID/locations/global/vmwareEngineNetworks/NETWORK_ID\"\n ```\n\nWhat's next\n-----------\n\n- [Get sign-in credentials for management appliances](/vmware-engine/docs/vmware-platform/howto-access-vsphere-client).\n- [Manage your private cloud resources and activity](/vmware-engine/docs/private-clouds/howto-manage-private-cloud)."]]