Overview

Service Consumer Management API

The Service Consumer Management API allows the owner or administrator of a service to manage the consumers of the service.

Which API to use

The Service Consumer Management API is part of a larger family of APIs related to service infrastructure.

To control the behavior of a service for a specific consumer or set of consumers, use this API.

To control the default behavior of a service for all of its consumers, use the Service Management API.

To manage the relationships of a single consumer to all of the services that it consumes, use the Service Usage API. The Service Consumer Management API manages these relationships from the perspective of the service, whereas the Service Usage API manages the same relationships from the perspective of the consumer.

Concepts

A service is a network service that typically provides some REST or RPC APIs. Services are managed by the Service Management API.

A consumer is a resource defined by the Cloud Resource Manager API: a project, folder, or organization. Some capabilities in the Service Consumer Management API apply only to projects.

A service owner is a user authorized to take management actions on the service, typically by having permissions on the producer project associated with the service. The Service Consumer Management API is intended to be used by service owners.

A service can be enabled on a consumer through the Service Usage API or through the Google Cloud Console. Enabling an API establishes a relationship between the consumer and the service. Once the service is enabled for the consumer, clients can send traffic to the service that is associated with that consumer (using an API key, or an OAuth token). The consumer also becomes searchable by the service owner through the Service Consumer Management API.

A service defines some quota configuration structure for its consumers, including metrics, which define the quantities that are measured for quota enforcement, and limits, which limit how much of those metric-defined quotas may be consumed by a consumer within a given time interval (rate limits) or in total (allocation limits).

The Service Consumer Management API allows a service owner to override the default values of quota limits for a particular consumer, to raise (or lower) the available quota for that consumer.

Resource Names

The SCM API operates on state associated with the relationship between a service and a consumer. Each such relationship is a resource, with a name of the form:

services/{service_name}/{consumer_collection}/{consumer_id}

The service_name is the DNS name of the service as defined by the Service Management API, such as serviceusage.googleapis.com.

The consumer_collection can be projects, folders, or organizations:

services/{service_name}/projects/{project_id}
services/{service_name}/folders/{folder_id}
services/{service_name}/organizations/{organization_id}

All other resources in the Service Consumer Management API are subresources under this relationship resource.