Describing, Listing, and Deleting Types

This page describes how to describe, list, and delete types from your project.

Before you begin

Describing Type Providers

A type provider is a third-party API that has been integrated with Deployment Manager as a type. You can describe a single type provider, get a list of all type providers, or get a list of all types provided by a type provider.

Describing a single type provider

You can describe a type provider to get information such as the descriptor document URL and advanced API options that have been set for this API.

gcloud

Run the type-providers describe command to describe a type provider:

gcloud beta deployment-manager type-providers describe [TYPE_PROVIDER_NAME]

The gcloud tool returns a response similar to the following:

collectionOverrides:
- collection: /emailAddresses/v1beta/people
  options:
    inputMappings:
    - fieldName: emailAddress.displayName
      location: BODY
      methodMatch: ^create$
      value: $.resource.properties.displayName
    - fieldName: displayName
      location: PATH
      methodMatch: ^update$
      value: $.resource.properties.displayName
description: ''
descriptorUrl: https://www.example.com/emailAddresses/beta/rest
id: '2359554699942999151'
insertTime: '2017-02-06T15:45:04.241-08:00'
name: test-api
operation:
  endTime: '2017-02-06T15:45:04.743-08:00'
  id: '5242470992516002927'
  kind: deploymentmanager#operation
  name: operation-1486424704162-547e5387a18d1-40c505fc-a29b95cc
  operationType: insert
  progress: 100
  startTime: '2017-02-06T15:45:04.317-08:00'
  status: DONE
  targetId: '2359554699942999151'
  targetLink: https://www.googleapis.com/deploymentmanager/v2beta/projects/example-project/global/typeProviders/test-api
  user: phunl@google.com

API

Make a GET request to the following URI:

https://www.googleapis.com/deploymentmanager/v2beta/projects/[PROJECT_ID]/global/typeProviders/[TYPE_PROVIDER_NAME]

Getting a list of types provided by a type provider

A type provider exposes all resources of the underlying API as base types. You can get a list of base types provided by a type provider.

gcloud

To get a list of base types provided by a type provider:

gcloud beta deployment-manager types list --provider=[TYPE_PROVIDER]

API

Make a GET request to the following URI:

GET https://www.googleapis.com/deploymentmanager/v2beta/projects/[PROJECT_ID]/global/typeProviders/[TYPE_PROVIDER_NAME]/types

Deployment Manager returns a list of resources like:

{
 "types": [
  {
   "kind": "deploymentmanager#typeInfo",
   "name": "/api/v1/resources/{resourceId}",
   "title": "Example API",
   "documentationLink": "https://www.example.com/docs"
  },
  {
   "kind": "deploymentmanager#typeInfo",
   "name": "/api/v1/resources/{resourceId}/endpoints",
   "title": "Example API",
   "documentationLink": "https://www.example.com/docs"
  },
  {
   "kind": "deploymentmanager#typeInfo",
   "name": "/api/v1/moreResources/{resourceId}",
   "title": "Example API",
   "documentationLink": "https://www.example.com/docs"
  },...

Listing type providers

You can get a list of your type providers using the gcloud tool, or the API.

gcloud

To list your type providers, make a type-providers list request:

gcloud beta deployment-manager type-providers list

API

In the API, make a GET request to the global type providers list:

GET https://www.googleapis.com/deploymentmanager/v2/projects/[PROJECT_ID]/global/typeProviders

For more information, see the documentation for the list method.

Describing composite types

A composite type is a set of templates that have been permanently added to Deployment Manager as a type. You can describe a single composite type or get a list of composite types available to the project.

Describing a single composite type

You can describe a single composite type to get information about the type.

gcloud

Run the types describe command to describe a type:

gcloud beta deployment-manager types describe [COMPOSITE_TYPE_NAME] --provider composite

API

Make a GET request to the following URI:

https://www.googleapis.com/deploymentmanager/v2beta/projects/[PROJECT_ID]/global/compositeTypes/[COMPOSITE_TYPE_NAME]

Listing composite types

You can get a list of your composite types using the gcloud tool, or the API.

gcloud

To list your composite types, make a types list request:

gcloud beta deployment-manager types list --provider composite

API

In the API, make a GET request to the global types list:

GET https://www.googleapis.com/deploymentmanager/v2/projects/[PROJECT_ID]/global/types

For more information, see the documentation for the list method.

Deleting a type provider

gcloud

To delete a type provider, make a type-providers delete request. For example:

gcloud beta deployment-manager type-providers delete [TYPE_PROVIDER]

API

In the API, make a DELETE request to the type provider you want to delete:

DELETE https://www.googleapis.com/deploymentmanager/v2beta/projects/[PROJECT_ID]/global/typeProviders/[TYPE_PROVIDER]

For more information, see the documentation for the delete method.

Deleting a composite type

gcloud

To delete a composite type, make a types delete request. For example:

gcloud beta deployment-manager types delete [COMPOSITE_TYPE]

API

In the API, make a DELETE request to the type you want to delete:

DELETE https://www.googleapis.com/deploymentmanager/v2beta/projects/[PROJECT_ID]/global/compositeTypes/[COMPOSITE_TYPE]

For more information, see the documentation for the delete method.

What's next

Cette page vous a-t-elle été utile ? Évaluez-la :

Envoyer des commentaires concernant…

Cloud Deployment Manager Documentation