O Cloud Deployment Manager vai chegar ao fim do suporte em 31 de dezembro de 2025. Se você usa o Deployment Manager, migre para o Infrastructure Manager ou uma tecnologia de implantação alternativa até 31 de dezembro de 2025 para garantir que seus serviços continuem sem interrupções.
Como chamar um provedor de tipos em uma configuração
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Nesta página, descrevemos como usar um provedor de tipos criado com o Deployment Manager. Ela não descreve como criar provedores de tipos. Para saber como criar um provedor de tipos, leia sobre como criar um provedor de tipos.
Para usar os exemplos de API deste guia, configure o acesso de API.
Como acessar provedores de tipo
Os provedores de tipos são recursos por projeto. Eles podem ser acessados de acordo com as permissões descritas no documento Controle de acesso. Isto é:
Os editores e visualizadores de um projeto podem criar e usar os tipos disponíveis nesse projeto.
Os visualizadores de tipos podem conseguir uma lista dos tipos e usar aqueles disponíveis para o projeto.
Se a API estiver respaldada em um documento do Google Discovery, [COLLECTION] será o caminho dos recursos que direcionam para o recurso que você quer na API. Por exemplo, para criar uma chave de conta de serviço, a coleção será:
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-08-19 UTC."],[[["\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)."]]