This page describes how to use a type provider that you have created with Deployment Manager. It does not describe how to create a type provider. To learn how to create a type provider, read Creating a Type Provider.
Before you begin
- If you want to use the command-line examples in this guide, install the `gcloud` command-line tool.
- If you want to use the API examples in this guide, set up API access.
Accessing type providers
Types providers are a per-project resource and are accessible according to the permissions described on the Access Control documentation. That is:
- Project editors and viewers can create and use types available to that project.
- Type viewers can get a list of and use types available to that project.
You can also add another project as a type viewer so they can access your types. Read Sharing Types Across Projects.
Using a type provider
To use a type exposed by a type provider in your configuration, use the following syntax:
If this API is backed by an OpenAPI specification,
[COLLECTION]would be the REST identifier for the path to the resource. For example:
If the API is backed by a Google Discovery document,
[COLLECTION]is the path of resources leading to your desired resource in the API. For example, to create a service account key, the collection would be:
Now you continue configuring your type as required by the underlying API:
resources: - name: Jane type: my-project/emailAddressesTypeProvider:emailAddresses/v1beta/people properties: - displayName: Jane email: email@example.com ...
- Read about creating a configuration.
- Create a deployment.
- Learn how to create a type provider
- Learn more about Advanced API Options.