Skip to main content

tenants

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

Overview

Nametenants
TypeResource
Idgoogle.jobs.tenants

Fields

The following fields are returned by SELECT queries:

Successful response

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

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, tenantsIdRetrieves specified tenant.
listselectprojectsIdpageToken, pageSizeLists all tenants associated with the project.
createinsertprojectsIdCreates a new tenant entity.
patchupdateprojectsId, tenantsIdupdateMaskUpdates specified tenant.
deletedeleteprojectsId, tenantsIdDeletes specified tenant.
complete_queryexecprojectsId, tenantsIdquery, languageCodes, pageSize, company, scope, typeCompletes the specified prefix with keyword suggestions. Intended for use by a job search auto-complete search box.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
projectsIdstring
tenantsIdstring
companystring
languageCodesstring
pageSizeinteger (int32)
pageTokenstring
querystring
scopestring
typestring
updateMaskstring (google-fieldmask)

SELECT examples

Retrieves specified tenant.

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

INSERT examples

Creates a new tenant entity.

INSERT INTO google.jobs.tenants (
data__name,
data__externalId,
projectsId
)
SELECT
'{{ name }}',
'{{ externalId }}',
'{{ projectsId }}'
RETURNING
name,
externalId
;

UPDATE examples

Updates specified tenant.

UPDATE google.jobs.tenants
SET
data__name = '{{ name }}',
data__externalId = '{{ externalId }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND tenantsId = '{{ tenantsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
externalId;

DELETE examples

Deletes specified tenant.

DELETE FROM google.jobs.tenants
WHERE projectsId = '{{ projectsId }}' --required
AND tenantsId = '{{ tenantsId }}' --required;

Lifecycle Methods

Completes the specified prefix with keyword suggestions. Intended for use by a job search auto-complete search box.

EXEC google.jobs.tenants.complete_query 
@projectsId='{{ projectsId }}' --required,
@tenantsId='{{ tenantsId }}' --required,
@query='{{ query }}',
@languageCodes='{{ languageCodes }}',
@pageSize='{{ pageSize }}',
@company='{{ company }}',
@scope='{{ scope }}',
@type='{{ type }}';