Method: services.tenancyUnits.create

Creates a tenancy unit with no tenant resources. If tenancy unit already exists, it will be returned, however, in this case, returned TenancyUnit does not have tenantResources field set and ListTenancyUnit has to be used to get a complete TenancyUnit with all fields populated.

HTTP request

POST https://serviceconsumermanagement.googleapis.com/v1/{parent=services/*/*/*}/tenancyUnits

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

services/{service}/{collection id}/{resource id} {collection id} is the cloud resource collection type representing the service consumer, for example 'projects', or 'organizations'. {resource id} is the consumer numeric id, such as project number: '123456'. {service} the name of a managed service, such as 'service.googleapis.com'. Enables service binding using the new tenancy unit.

Authorization requires the following Google IAM permission on the specified resource parent:

  • serviceconsumermanagement.tenancyu.create

Request body

The request body contains data with the following structure:

JSON representation
{
  "tenancyUnitId": string
}
Fields
tenancyUnitId

string

Optional service producer-provided identifier of the tenancy unit. Must be no longer than 40 characters and preferably URI friendly. If it isn't provided, a UID for the tenancy unit is automatically generated. The identifier must be unique across a managed service. If the tenancy unit already exists for the managed service and service consumer pair, calling tenancyUnits.create returns the existing tenancy unit if the provided identifier is identical or empty, otherwise the call fails.

Response body

If successful, the response body contains a newly created instance of TenancyUnit.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

Try it!