Skip to main content

consents_revisions

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

Overview​

Nameconsents_revisions
TypeResource
Idgoogle.healthcare.consents_revisions

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringIdentifier. Resource name of the Consent, of the form projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consents/{consent_id}. Cannot be changed after creation.
consentArtifactstringRequired. The resource name of the Consent artifact that contains proof of the end user's consent, of the form projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consentArtifacts/{consent_artifact_id}.
expireTimestring (google-datetime)Timestamp in UTC of when this Consent is considered expired.
metadataobjectOptional. User-supplied key-value pairs used to organize Consent resources. Metadata keys must: - be between 1 and 63 characters long - have a UTF-8 encoding of maximum 128 bytes - begin with a letter - consist of up to 63 characters including lowercase letters, numeric characters, underscores, and dashes Metadata values must be: - be between 1 and 63 characters long - have a UTF-8 encoding of maximum 128 bytes - consist of up to 63 characters including lowercase letters, numeric characters, underscores, and dashes No more than 64 metadata entries can be associated with a given consent.
policiesarrayOptional. Represents a user's consent in terms of the resources that can be accessed and under what conditions.
revisionCreateTimestring (google-datetime)Output only. The timestamp that the revision was created.
revisionIdstringOutput only. The revision ID of the Consent. The format is an 8-character hexadecimal string. Refer to a specific revision of a Consent by appending @{revision_id} to the Consent's resource name.
statestringRequired. Indicates the current state of this Consent. (STATE_UNSPECIFIED, ACTIVE, ARCHIVED, REVOKED, DRAFT, REJECTED)
ttlstring (google-duration)Input only. The time to live for this Consent from when it is created.
userIdstringRequired. User's UUID provided by the client.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_revisionsselectprojectsId, locationsId, datasetsId, consentStoresId, consentsIdfilter, pageSize, pageTokenLists the revisions of the specified Consent in reverse chronological order.
delete_revisiondeleteprojectsId, locationsId, datasetsId, consentStoresId, consentsIdDeletes the specified revision of a Consent. An INVALID_ARGUMENT error occurs if the specified revision is the latest revision.

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

SELECT examples​

Lists the revisions of the specified Consent in reverse chronological order.

SELECT
name,
consentArtifact,
expireTime,
metadata,
policies,
revisionCreateTime,
revisionId,
state,
ttl,
userId
FROM google.healthcare.consents_revisions
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND datasetsId = '{{ datasetsId }}' -- required
AND consentStoresId = '{{ consentStoresId }}' -- required
AND consentsId = '{{ consentsId }}' -- required
AND filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
;

DELETE examples​

Deletes the specified revision of a Consent. An INVALID_ARGUMENT error occurs if the specified revision is the latest revision.

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