[[["易于理解","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-03。"],[[["\u003cp\u003eThis page explains how to use a type provider created with Deployment Manager, but does not cover the creation of a type provider itself.\u003c/p\u003e\n"],["\u003cp\u003eType providers are a per-project resource, and project editors and viewers can create and use types, while type viewers can only get a list of and use types.\u003c/p\u003e\n"],["\u003cp\u003eTo utilize a type exposed by a type provider in your configuration, use the specified syntax: \u003ccode\u003etype: [PROJECT_ID]/[TYPE_NAME]:[COLLECTION]\u003c/code\u003e, where \u003ccode\u003e[COLLECTION]\u003c/code\u003e is the REST identifier or resource path in the API.\u003c/p\u003e\n"],["\u003cp\u003ePre-GA products and features, like the type provider, are available "as is" under the "Pre-GA Offerings Terms" and might have limited support.\u003c/p\u003e\n"],["\u003cp\u003eTo add another project as a type viewer so they can access your types, you can read about \u003ca href=\"/deployment-manager/docs/configuration/sharing-types-across-projects\"\u003eSharing Types Across Projects\u003c/a\u003e.\u003c/p\u003e\n"]]],[],null,["# Calling a Type Provider in a Configuration\n\n| **Beta**\n|\n|\n| This product or feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA products and features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nThis page describes how to use a type provider that you have created with\nDeployment Manager. It does not describe how to create a\ntype provider. To learn how to create a type provider, read\n[Creating a Type Provider](/deployment-manager/docs/configuration/type-providers/creating-type-provider).\n\nBefore you begin\n----------------\n\n- If you want to use the command-line examples in this guide, install the [\\`gcloud\\` command-line tool](/sdk).\n- If you want to use the API examples in this guide, set up [API access](/deployment-manager/docs/reference/latest).\n\nAccessing type providers\n------------------------\n\nTypes providers are a per-project resource and are accessible according to the\npermissions described on the\n[Access Control](/deployment-manager/docs/access-control) documentation. That is:\n\n- **Project editors and viewers** can create and use types available to that project.\n- **Type viewers** can get a list of and use types available to that project.\n\nYou can also add another project as a type viewer so they can access your types.\nRead [Sharing Types Across Projects](/deployment-manager/docs/configuration/sharing-types-across-projects).\n\nUsing a type provider\n---------------------\n\nTo use a type exposed by a type provider in your configuration, use\nthe following syntax: \n\n type: [PROJECT_ID]/[TYPE_NAME]:[COLLECTION]\n\n- If this API is backed by an OpenAPI specification, `[COLLECTION]` would be\n the REST identifier for the path to the resource. For example:\n\n type: my-project/emailAddressesTypeProvider:emailAddresses/v1beta/people\n\n- If the API is backed by a Google Discovery document, `[COLLECTION]` is\n the path of resources leading to your desired resource in the API. For\n example, to create a\n [service account key](/iam/reference/rest/v1/projects.serviceAccounts.keys), the collection would be:\n\n type: my-project/example-type-provider:projects.serviceAccounts.keys\n\nNow you continue configuring your type as required by the underlying API: \n\n resources:\n - name: Jane\n type: my-project/emailAddressesTypeProvider:emailAddresses/v1beta/people\n properties:\n - displayName: Jane\n email: jane@example.com\n ...\n\nWhat's next\n-----------\n\n- Read about [creating a configuration](/deployment-manager/docs/configuration).\n- [Create a deployment](/deployment-manager/docs/deployments).\n- Learn how to [create a type provider](/deployment-manager/docs/configuration/type-providers/creating-type-provider)\n- Learn more about [Advanced API Options](/deployment-manager/docs/configuration/type-providers/advanced-configuration-options)."]]