# REST Resource: projects.locations.datasets.consentStores

## Resource: ConsentStore

Represents a consent store.

| JSON representation |
|---|
| ``` { "name": string, "defaultConsentTtl": string, "labels": { string: string, ... }, "enableConsentCreateOnUpdate": boolean } ``` |

| Fields ||
|---|---|
| `name` | `string` Identifier. Resource name of the consent store, of the form `projects/{projectId}/locations/{locationId}/datasets/{datasetId}/consentStores/{consentStoreId}`. Cannot be changed after creation. |
| `defaultConsentTtl` | ``string(`https://protobuf.dev/reference/protobuf/google.protobuf#duration` format)`` Optional. Default time to live for Consents created in this store. Must be at least 24 hours. Updating this field will not affect the expiration time of existing consents. A duration in seconds with up to nine fractional digits, ending with '`s`'. Example: `"3.5s"`. |
| `labels` | `map (key: string, value: string)` Optional. User-supplied key-value pairs used to organize consent stores. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: \[\\p{Ll}\\p{Lo}\]\[\\p{Ll}\\p{Lo}\\p{N}_-\]{0,62}. Label values must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: \[\\p{Ll}\\p{Lo}\\p{N}_-\]{0,63}. No more than 64 labels can be associated with a given store. For more information: <https://cloud.google.com/healthcare/docs/how-tos/labeling-resources> An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `enableConsentCreateOnUpdate` | `boolean` Optional. If `true`, \[UpdateConsent\] \[google.cloud.healthcare.v1.consent.UpdateConsent\] creates the Consent if it does not already exist. If unspecified, defaults to `false`. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.consentStores/checkDataAccess` | Checks if a particular data_id of a `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.consentStores.userDataMappings#UserDataMapping` in the specified `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.consentStores#ConsentStore` is consented for the specified use. |
| ### `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.consentStores/create` | Creates a new `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.consentStores#ConsentStore` in the parent dataset. |
| ### `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.consentStores/delete` | Deletes the specified `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.consentStores#ConsentStore` and removes all the consent store's data. |
| ### `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.consentStores/evaluateUserConsents` | Evaluates the user's `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.consentStores.consents#Consent` for all matching `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.consentStores.userDataMappings#UserDataMapping`. |
| ### `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.consentStores/get` | Gets the specified `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.consentStores#ConsentStore`. |
| ### `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.consentStores/getIamPolicy` | Gets the access control policy for a resource. |
| ### `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.consentStores/list` | Lists the `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.consentStores#ConsentStore` in the specified dataset. |
| ### `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.consentStores/patch` | Updates the specified `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.consentStores#ConsentStore`. |
| ### `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.consentStores/queryAccessibleData` | Queries all data_ids that are consented for a specified use in the given `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.consentStores#ConsentStore` and writes them to a specified destination. |
| ### `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.consentStores/setIamPolicy` | Sets the access control policy on the specified resource. |
| ### `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.consentStores/testIamPermissions` | Returns permissions that a caller has on the specified resource. |