user_data_mappings
Creates, updates, deletes, gets or lists a user_data_mappings
resource.
Overview
Name | user_data_mappings |
Type | Resource |
Id | google.healthcare.user_data_mappings |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Resource name of the User data mapping, of the form projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/userDataMappings/{user_data_mapping_id} . |
archiveTime | string | Output only. Indicates the time when this mapping was archived. |
archived | boolean | Output only. Indicates whether this mapping is archived. |
dataId | string | Required. A unique identifier for the mapped resource. |
resourceAttributes | array | Attributes of the resource. Only explicitly set attributes are displayed here. Attribute definitions with defaults set implicitly apply to these User data mappings. Attributes listed here must be single valued, that is, exactly one value is specified for the field "values" in each Attribute. |
userId | string | Required. User's UUID provided by the client. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | consentStoresId, datasetsId, locationsId, projectsId, userDataMappingsId | Gets the specified User data mapping. |
list | SELECT | consentStoresId, datasetsId, locationsId, projectsId | Lists the User data mappings in the specified consent store. |
create | INSERT | consentStoresId, datasetsId, locationsId, projectsId | Creates a new User data mapping in the parent consent store. |
delete | DELETE | consentStoresId, datasetsId, locationsId, projectsId, userDataMappingsId | Deletes the specified User data mapping. |
patch | UPDATE | consentStoresId, datasetsId, locationsId, projectsId, userDataMappingsId | Updates the specified User data mapping. |
archive | EXEC | consentStoresId, datasetsId, locationsId, projectsId, userDataMappingsId | Archives the specified User data mapping. |
SELECT
examples
Lists the User data mappings in the specified consent store.
SELECT
name,
archiveTime,
archived,
dataId,
resourceAttributes,
userId
FROM google.healthcare.user_data_mappings
WHERE consentStoresId = '{{ consentStoresId }}'
AND datasetsId = '{{ datasetsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new user_data_mappings
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.healthcare.user_data_mappings (
consentStoresId,
datasetsId,
locationsId,
projectsId,
name,
dataId,
userId,
resourceAttributes
)
SELECT
'{{ consentStoresId }}',
'{{ datasetsId }}',
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ dataId }}',
'{{ userId }}',
'{{ resourceAttributes }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: dataId
value: string
- name: userId
value: string
- name: resourceAttributes
value:
- - name: attributeDefinitionId
value: string
- name: values
value:
- string
- name: archived
value: boolean
- name: archiveTime
value: string
UPDATE
example
Updates a user_data_mappings
resource.
/*+ update */
UPDATE google.healthcare.user_data_mappings
SET
name = '{{ name }}',
dataId = '{{ dataId }}',
userId = '{{ userId }}',
resourceAttributes = '{{ resourceAttributes }}'
WHERE
consentStoresId = '{{ consentStoresId }}'
AND datasetsId = '{{ datasetsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND userDataMappingsId = '{{ userDataMappingsId }}';
DELETE
example
Deletes the specified user_data_mappings
resource.
/*+ delete */
DELETE FROM google.healthcare.user_data_mappings
WHERE consentStoresId = '{{ consentStoresId }}'
AND datasetsId = '{{ datasetsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND userDataMappingsId = '{{ userDataMappingsId }}';