Skip to main content

consent_artifacts

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

Overview

Nameconsent_artifacts
TypeResource
Idgoogle.healthcare.consent_artifacts

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. Resource name of the Consent artifact, of the form projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consentArtifacts/{consent_artifact_id}. Cannot be changed after creation.
consentContentScreenshotsarrayOptional. Screenshots, PDFs, or other binary information documenting the user's consent.
consentContentVersionstringOptional. An string indicating the version of the consent information shown to the user.
guardianSignatureobjectOptional. A signature from a guardian. (id: Signature)
metadataobjectOptional. Metadata associated with the Consent artifact. For example, the consent locale or user agent version.
userIdstringRequired. User's UUID provided by the client.
userSignatureobjectOptional. User's signature. (id: Signature)
witnessSignatureobjectOptional. A signature from a witness. (id: Signature)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, datasetsId, consentStoresId, consentArtifactsIdGets the specified Consent artifact.
listselectprojectsId, locationsId, datasetsId, consentStoresIdpageSize, pageToken, filterLists the Consent artifacts in the specified consent store.
createinsertprojectsId, locationsId, datasetsId, consentStoresIdCreates a new Consent artifact in the parent consent store.
deletedeleteprojectsId, locationsId, datasetsId, consentStoresId, consentArtifactsIdDeletes the specified Consent artifact. Fails if the artifact is referenced by the latest revision of any Consent.

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
consentArtifactsIdstring
consentStoresIdstring
datasetsIdstring
locationsIdstring
projectsIdstring
filterstring
pageSizeinteger (int32)
pageTokenstring

SELECT examples

Gets the specified Consent artifact.

SELECT
name,
consentContentScreenshots,
consentContentVersion,
guardianSignature,
metadata,
userId,
userSignature,
witnessSignature
FROM google.healthcare.consent_artifacts
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND datasetsId = '{{ datasetsId }}' -- required
AND consentStoresId = '{{ consentStoresId }}' -- required
AND consentArtifactsId = '{{ consentArtifactsId }}' -- required;

INSERT examples

Creates a new Consent artifact in the parent consent store.

INSERT INTO google.healthcare.consent_artifacts (
data__name,
data__userId,
data__userSignature,
data__guardianSignature,
data__witnessSignature,
data__consentContentScreenshots,
data__consentContentVersion,
data__metadata,
projectsId,
locationsId,
datasetsId,
consentStoresId
)
SELECT
'{{ name }}',
'{{ userId }}',
'{{ userSignature }}',
'{{ guardianSignature }}',
'{{ witnessSignature }}',
'{{ consentContentScreenshots }}',
'{{ consentContentVersion }}',
'{{ metadata }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ datasetsId }}',
'{{ consentStoresId }}'
RETURNING
name,
consentContentScreenshots,
consentContentVersion,
guardianSignature,
metadata,
userId,
userSignature,
witnessSignature
;

DELETE examples

Deletes the specified Consent artifact. Fails if the artifact is referenced by the latest revision of any Consent.

DELETE FROM google.healthcare.consent_artifacts
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND datasetsId = '{{ datasetsId }}' --required
AND consentStoresId = '{{ consentStoresId }}' --required
AND consentArtifactsId = '{{ consentArtifactsId }}' --required;