[[["易于理解","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-09-04。"],[],[],null,["# Getting Started with the Service Networking API\n\nThis page describes how to enable and start using the Service Networking\nAPI. For most operational use cases, Google recommends the `gcloud` [command\nline interface](/sdk/gcloud/reference/beta/services/vpc-peerings). If you need\nto program against the Service Networking API, you can use one of\nour provided [client libraries](/service-infrastructure/docs/service-networking/libraries).\n\nEnabling the service\n--------------------\n\nEnable Service Networking in the private services management\nproject. This project handles the private connections with consumer\nVPC networks. For more information, see [Enabling private\nservices access](/service-infrastructure/docs/enabling-private-services-access). \n\n### console\n\n1. Select or create a private services management project.\n\n [Go to the manage resources page](https://console.cloud.google.com/cloud-resource-manager)\n2. Enable the Service Networking API.\n\n [Enable the API](https://console.cloud.google.com/apis/library/servicenetworking.googleapis.com)\n\n### gcloud\n\nActivate the Service Networking API: \n\n```\ngcloud services enable servicenetworking.googleapis.com \\\n --project=PROJECT_ID\n```\n\nReplace \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e with the Google Cloud project ID of your\nprivate services management project.\n\nService Networking enables you to offer your [managed\nservices](/service-infrastructure/docs/glossary#managed) on internal IP addresses to service consumers.\nService consumers use [private services\naccess](/vpc/docs/private-services-access) to privately\nconnect to your service. To set up your service for private services access,\nreach out to your Google representative for more information.\n| **Note:** When you use private services access as a service producer, you are solely responsible for securing VPC networks and all resources and data available on them. Google is not responsible for how data and resources may be accessed or used by the service consumers that you are connecting with.\n| **Note:** When the Service Networking API is enabled, the service account provisioning will happen just-in-time. This means that unless we do not have a resource (for example: configuration of Private Google Access) configured which calls the API, we won't see the service account getting created. Once the service account gets provisioned, it is visible in the format service-{project number}@service-networking.iam.gserviceaccount.com and is added with roles/servicenetworking.serviceAgent policy binding on the consumer project."]]