Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

ServiceConsumerManagement

import { ServiceConsumerManagement } from "https://googleapis.deno.dev/v1/serviceconsumermanagement:v1.ts";

Manages the service consumers of a Service Infrastructure service.

class ServiceConsumerManagement {
constructor(client?: CredentialsClient, baseUrl?: string);
async operationsCancel(name: string, req: CancelOperationRequest): Promise<Empty>;
async operationsDelete(name: string): Promise<Empty>;
async operationsGet(name: string): Promise<Operation>;
async operationsList(name: string, opts?: OperationsListOptions): Promise<ListOperationsResponse>;
async servicesSearch(parent: string, opts?: ServicesSearchOptions): Promise<SearchTenancyUnitsResponse>;
async servicesTenancyUnitsAddProject(parent: string, req: AddTenantProjectRequest): Promise<Operation>;
async servicesTenancyUnitsApplyProjectConfig(name: string, req: ApplyTenantProjectConfigRequest): Promise<Operation>;
async servicesTenancyUnitsAttachProject(name: string, req: AttachTenantProjectRequest): Promise<Operation>;
async servicesTenancyUnitsCreate(parent: string, req: CreateTenancyUnitRequest): Promise<TenancyUnit>;
async servicesTenancyUnitsDelete(name: string): Promise<Operation>;
async servicesTenancyUnitsDeleteProject(name: string, req: DeleteTenantProjectRequest): Promise<Operation>;
async servicesTenancyUnitsList(parent: string, opts?: ServicesTenancyUnitsListOptions): Promise<ListTenancyUnitsResponse>;
async servicesTenancyUnitsRemoveProject(name: string, req: RemoveTenantProjectRequest): Promise<Operation>;
async servicesTenancyUnitsUndeleteProject(name: string, req: UndeleteTenantProjectRequest): Promise<Operation>;
}

§Constructors

§
new ServiceConsumerManagement(client?: CredentialsClient, baseUrl?: string)
[src]

§Methods

§
operationsCancel(name: string, req: CancelOperationRequest): Promise<Empty>
[src]

Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.

@param name

The name of the operation resource to be cancelled.

§
operationsDelete(name: string): Promise<Empty>
[src]

Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.

@param name

The name of the operation resource to be deleted.

§
operationsGet(name: string): Promise<Operation>
[src]

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

@param name

The name of the operation resource.

§
operationsList(name: string, opts?: OperationsListOptions): Promise<ListOperationsResponse>
[src]

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.

@param name

The name of the operation's parent resource.

§
servicesSearch(parent: string, opts?: ServicesSearchOptions): Promise<SearchTenancyUnitsResponse>
[src]

Search tenancy units for a managed service.

@param parent

Required. Service for which search is performed. services/{service} {service} the name of a service, for example 'service.googleapis.com'.

§
servicesTenancyUnitsAddProject(parent: string, req: AddTenantProjectRequest): Promise<Operation>
[src]

Add a new tenant project to the tenancy unit. There can be a maximum of 1024 tenant projects in a tenancy unit. If there are previously failed AddTenantProject calls, you might need to call RemoveTenantProject first to resolve them before you can make another call to AddTenantProject with the same tag. Operation.

@param parent

Required. Name of the tenancy unit. Such as 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'.

§
servicesTenancyUnitsApplyProjectConfig(name: string, req: ApplyTenantProjectConfigRequest): Promise<Operation>
[src]

Apply a configuration to an existing tenant project. This project must exist in an active state and have the original owner account. The caller must have permission to add a project to the given tenancy unit. The configuration is applied, but any existing settings on the project aren't modified. Specified policy bindings are applied. Existing bindings aren't modified. Specified services are activated. No service is deactivated. If specified, new billing configuration is applied. Omit a billing configuration to keep the existing one. A service account in the project is created if previously non existed. Specified labels will be appended to tenant project, note that the value of existing label key will be updated if the same label key is requested. The specified folder is ignored, as moving a tenant project to a different folder isn't supported. The operation fails if any of the steps fail, but no rollback of already applied configuration changes is attempted. Operation.

@param name

Required. Name of the tenancy unit. Such as 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'.

§
servicesTenancyUnitsAttachProject(name: string, req: AttachTenantProjectRequest): Promise<Operation>
[src]

Attach an existing project to the tenancy unit as a new tenant resource. The project could either be the tenant project reserved by calling AddTenantProject under a tenancy unit of a service producer's project of a managed service, or from a separate project. The caller is checked against a set of permissions as if calling AddTenantProject on the same service consumer. To trigger the attachment, the targeted tenant project must be in a folder. Make sure the ServiceConsumerManagement service account is the owner of that project. These two requirements are already met if the project is reserved by calling AddTenantProject. Operation.

@param name

Required. Name of the tenancy unit that the project will be attached to. Such as 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'.

§
servicesTenancyUnitsCreate(parent: string, req: CreateTenancyUnitRequest): Promise<TenancyUnit>
[src]

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 tenant_resources field set and ListTenancyUnits has to be used to get a complete TenancyUnit with all fields populated.

@param parent

Required. 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.

§
servicesTenancyUnitsDelete(name: string): Promise<Operation>
[src]

Delete a tenancy unit. Before you delete the tenancy unit, there should be no tenant resources in it that aren't in a DELETED state. Operation.

@param name

Required. Name of the tenancy unit to be deleted.

§
servicesTenancyUnitsDeleteProject(name: string, req: DeleteTenantProjectRequest): Promise<Operation>
[src]

Deletes the specified project resource identified by a tenant resource tag. The mothod removes a project lien with a 'TenantManager' origin if that was added. It will then attempt to delete the project. If that operation fails, this method also fails. After the project has been deleted, the tenant resource state is set to DELETED. To permanently remove resource metadata, call the RemoveTenantProject method. New resources with the same tag can't be added if there are existing resources in a DELETED state. Operation.

@param name

Required. Name of the tenancy unit. Such as 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'.

§
servicesTenancyUnitsList(parent: string, opts?: ServicesTenancyUnitsListOptions): Promise<ListTenancyUnitsResponse>
[src]

Find the tenancy unit for a managed service and service consumer. This method shouldn't be used in a service producer's runtime path, for example to find the tenant project number when creating VMs. Service producers must persist the tenant project's information after the project is created.

@param parent

Required. Managed service and service consumer. Required. 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 service, such as 'service.googleapis.com'.

§
servicesTenancyUnitsRemoveProject(name: string, req: RemoveTenantProjectRequest): Promise<Operation>
[src]

Removes the specified project resource identified by a tenant resource tag. The method removes the project lien with 'TenantManager' origin if that was added. It then attempts to delete the project. If that operation fails, this method also fails. Calls to remove already removed or non-existent tenant project succeed. After the project has been deleted, or if was already in a DELETED state, resource metadata is permanently removed from the tenancy unit. Operation.

@param name

Required. Name of the tenancy unit. Such as 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'.

§
servicesTenancyUnitsUndeleteProject(name: string, req: UndeleteTenantProjectRequest): Promise<Operation>
[src]

Attempts to undelete a previously deleted tenant project. The project must be in a DELETED state. There are no guarantees that an undeleted project will be in a fully restored and functional state. Call the ApplyTenantProjectConfig method to update its configuration and then validate all managed service resources. Operation.

@param name

Required. Name of the tenancy unit. Such as 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'.