Skip to main content

tenants

Creates, updates, deletes, gets or lists a tenants resource.

Overview

Nametenants
TypeResource
Idgoogle.jobs.tenants

Fields

NameDatatypeDescription
namestringRequired during tenant update. The resource name for a tenant. This is generated by the service when a tenant is created. The format is "projects/{project_id}/tenants/{tenant_id}", for example, "projects/foo/tenants/bar".
externalIdstringRequired. Client side tenant identifier, used to uniquely identify the tenant. The maximum number of allowed characters is 255.

Methods

NameAccessible byRequired ParamsDescription
getSELECTprojectsId, tenantsIdRetrieves specified tenant.
listSELECTprojectsIdLists all tenants associated with the project.
createINSERTprojectsIdCreates a new tenant entity.
deleteDELETEprojectsId, tenantsIdDeletes specified tenant.
patchUPDATEprojectsId, tenantsIdUpdates specified tenant.
complete_queryEXECprojectsId, tenantsIdCompletes the specified prefix with keyword suggestions. Intended for use by a job search auto-complete search box.

SELECT examples

Lists all tenants associated with the project.

SELECT
name,
externalId
FROM google.jobs.tenants
WHERE projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new tenants resource.

/*+ create */
INSERT INTO google.jobs.tenants (
projectsId,
name,
externalId
)
SELECT
'{{ projectsId }}',
'{{ name }}',
'{{ externalId }}'
;

UPDATE example

Updates a tenants resource.

/*+ update */
UPDATE google.jobs.tenants
SET
name = '{{ name }}',
externalId = '{{ externalId }}'
WHERE
projectsId = '{{ projectsId }}'
AND tenantsId = '{{ tenantsId }}';

DELETE example

Deletes the specified tenants resource.

/*+ delete */
DELETE FROM google.jobs.tenants
WHERE projectsId = '{{ projectsId }}'
AND tenantsId = '{{ tenantsId }}';