[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-11 (世界標準時間)。"],[],[],null,["# Secure your data with a service perimeter\n\nVPC Service Controls helps you reduce the risk of unauthorized copying or\ntransfer of data from your Google-managed services.\n\nWith VPC Service Controls, you can configure service perimeters around the\nresources of your Google-managed services and control the movement of data\nacross the perimeter boundary.\n\nCreate a service perimeter\n--------------------------\n\nTo create a service perimeter, follow the\n[VPC Service Controls guide to creating a service perimeter](/vpc-service-controls/docs/create-service-perimeters).\n\nWhen you design the service perimeter, include the following services:\n\n- Migration Center API (`migrationcenter.googleapis.com`)\n- Cloud Storage API (`storage.googleapis.com`)\n- Resource Manager API (`cloudresourcemanager.googleapis.com`)\n- Cloud Logging API (`logging.googleapis.com`)\n\nAllow traffic with inbound data transfer rules\n----------------------------------------------\n\nBy default, the service perimeter is designed to prevent inbound data transfer\nfrom services outside of the perimeter.\nIf you plan to use data import to upload data from outside the perimeter,\nor use the discovery client to collect your infrastructure data,\nconfigure data access rules to allow this.\n\n### Enable data import\n\nTo enable data import, specify the\n[inbound data transfer rules](/vpc-service-controls/docs/ingress-egress-rules#ingress-rules-reference)\nusing the following syntax: \n\n - ingressFrom:\n identities:\n - serviceAccount: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eSERVICE_ACCOUNT\u003c/span\u003e\u003c/var\u003e\n sources:\n - accessLevel: \\\"*\\\"\n - ingressTo:\n operations:\n - serviceName: storage.googleapis.com\n methodSelectors:\n - method: google.storage.buckets.testIamPermissions\n - method: google.storage.objects.create\n resources:\n - projects/\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eSERVICE_ACCOUNT\u003c/var\u003e: the per-product, per-project service\n account that you use to upload data to Migration Center, with the\n following format:\n `service-`\u003cvar translate=\"no\"\u003ePROJECT_NUMBER\u003c/var\u003e`@gcp-sa-migcenter.iam.gserviceaccount.com.`\n\n Here \u003cvar translate=\"no\"\u003ePROJECT_NUMBER\u003c/var\u003e is the unique identifier of the\n Google Cloud project where you enabled the Migration Center API.\n For more information on project numbers, see\n [Identifying projects](/resource-manager/docs/creating-managing-projects#identifying_projects).\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the ID of the project inside the perimeter\n that you want to upload the data to.\n\nYou can't use\n[`ANY_SERVICE_ACCOUNT` and `ANY_USER_ACCOUNT`](/vpc-service-controls/docs/ingress-egress-rules#unsupported-features)\nidentity types with signed URLs.\nFor more information, see\n[Allow access to protected resources from outside the perimeter](/vpc-service-controls/docs/use-access-levels).\n\n### Enable data collection with discovery client\n\nTo enable data collection with the discovery client, specify\nthe inbound data transfer rules with the following syntax: \n\n - ingressFrom:\n identities:\n - serviceAccount: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eSERVICE_ACCOUNT\u003c/span\u003e\u003c/var\u003e\n sources:\n - accessLevel: \\\"*\\\"\n - ingressTo:\n operations:\n - serviceName: storage.googleapis.com\n methodSelectors:\n - method: \\\"*\\\"\n resources:\n - projects/\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eSERVICE_ACCOUNT\u003c/var\u003e: the service account that you\n used to create the discovery client. For more information, review\n the [discovery client installation process](/migration-center/docs/installation-process#create_a_service_account).\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the ID of the project inside the perimeter\n that you want to upload the data to."]]