tenants
Creates, updates, deletes, gets or lists a tenants
resource.
Overview
Name | tenants |
Type | Resource |
Id | google.jobs.tenants |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Required 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". |
externalId | string | Required. Client side tenant identifier, used to uniquely identify the tenant. The maximum number of allowed characters is 255. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | projectsId, tenantsId | Retrieves specified tenant. |
list | SELECT | projectsId | Lists all tenants associated with the project. |
create | INSERT | projectsId | Creates a new tenant entity. |
delete | DELETE | projectsId, tenantsId | Deletes specified tenant. |
patch | UPDATE | projectsId, tenantsId | Updates specified tenant. |
complete_query | EXEC | projectsId, tenantsId | Completes 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.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.jobs.tenants (
projectsId,
name,
externalId
)
SELECT
'{{ projectsId }}',
'{{ name }}',
'{{ externalId }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: externalId
value: string
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 }}';