class ProjectsLocationsDatasetsConsentStores extends Resource (View source)

The "consentStores" collection of methods.

Typical usage is:

 $healthcareService = new Google\Service\CloudHealthcare(...);
 $consentStores = $healthcareService->projects_locations_datasets_consentStores;

Methods

checkDataAccess(string $consentStore, CheckDataAccessRequest $postBody, array $optParams = [])

Checks if a particular data_id of a User data mapping in the specified consent store is consented for the specified use.

create(string $parent, ConsentStore $postBody, array $optParams = [])

Creates a new consent store in the parent dataset. Attempting to create a consent store with the same ID as an existing store fails with an ALREADY_EXISTS error. (consentStores.create)

delete(string $name, array $optParams = [])

Deletes the specified consent store and removes all the consent store's data.

evaluateUserConsents(string $consentStore, EvaluateUserConsentsRequest $postBody, array $optParams = [])

Evaluates the user's Consents for all matching User data mappings. Note: User data mappings are indexed asynchronously, which can cause a slight delay between the time mappings are created or updated and when they are included in EvaluateUserConsents results. (consentStores.evaluateUserConsents)

get(string $name, array $optParams = [])

Gets the specified consent store. (consentStores.get)

getIamPolicy(string $resource, array $optParams = [])

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. (consentStores.getIamPolicy)

listProjectsLocationsDatasetsConsentStores(string $parent, array $optParams = [])

Lists the consent stores in the specified dataset.

patch(string $name, ConsentStore $postBody, array $optParams = [])

Updates the specified consent store. (consentStores.patch)

queryAccessibleData(string $consentStore, QueryAccessibleDataRequest $postBody, array $optParams = [])

Queries all data_ids that are consented for a specified use in the given consent store and writes them to a specified destination. The returned Operation includes a progress counter for the number of User data mappings processed. If the request is successful, a detailed response is returned of type QueryAccessibleDataResponse, contained in the response field when the operation finishes. The metadata field type is OperationMetadata. Errors are logged to Cloud Logging (see Viewing error logs in Cloud Logging). For example, the following sample log entry shows a failed to evaluate consent policy error that occurred during a QueryAccessibleData call to consent store projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/co nsentStores/{consent_store_id}. json jsonPayload: { @type: "type.googleap is.com/google.cloud.healthcare.logging.QueryAccessibleDataLogEntry" error: { code: 9 message: "failed to evaluate consent policy" } resourceName: "project s/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{c onsent_store_id}/consents/{consent_id}" } logName: "projects/{project_id}/log s/healthcare.googleapis.com%2Fquery_accessible_data" operation: { id: "projec ts/{project_id}/locations/{location_id}/datasets/{dataset_id}/operations/{ope ration_id}" producer: "healthcare.googleapis.com/QueryAccessibleData" } receiveTimestamp: "TIMESTAMP" resource: { labels: { consent_store_id: "{consent_store_id}" dataset_id: "{dataset_id}" location: "{location_id}" project_id: "{project_id}" } type: "healthcare_consent_store" } severity: "ERROR" timestamp: "TIMESTAMP" (consentStores.queryAccessibleData)

setIamPolicy(string $resource, SetIamPolicyRequest $postBody, array $optParams = [])

Sets the access control policy on the specified resource. Replaces any existing policy. Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors. (consentStores.setIamPolicy)

testIamPermissions(string $resource, TestIamPermissionsRequest $postBody, array $optParams = [])

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking.

Details

CheckDataAccessResponse checkDataAccess(string $consentStore, CheckDataAccessRequest $postBody, array $optParams = [])

Checks if a particular data_id of a User data mapping in the specified consent store is consented for the specified use.

(consentStores.checkDataAccess)

Parameters

string $consentStore

Required. Name of the consent store where the requested data_id is stored, of the form projects/{project_id}/locations/{lo cation_id}/datasets/{dataset_id}/consentStores/{consent_store_id}.

CheckDataAccessRequest $postBody
array $optParams

Optional parameters.

Return Value

CheckDataAccessResponse

Exceptions

Exception

ConsentStore create(string $parent, ConsentStore $postBody, array $optParams = [])

Creates a new consent store in the parent dataset. Attempting to create a consent store with the same ID as an existing store fails with an ALREADY_EXISTS error. (consentStores.create)

Parameters

string $parent

Required. The name of the dataset this consent store belongs to.

ConsentStore $postBody
array $optParams

Optional parameters.

Return Value

ConsentStore

Exceptions

Exception

HealthcareEmpty delete(string $name, array $optParams = [])

Deletes the specified consent store and removes all the consent store's data.

(consentStores.delete)

Parameters

string $name

Required. The resource name of the consent store to delete.

array $optParams

Optional parameters.

Return Value

HealthcareEmpty

Exceptions

Exception

EvaluateUserConsentsResponse evaluateUserConsents(string $consentStore, EvaluateUserConsentsRequest $postBody, array $optParams = [])

Evaluates the user's Consents for all matching User data mappings. Note: User data mappings are indexed asynchronously, which can cause a slight delay between the time mappings are created or updated and when they are included in EvaluateUserConsents results. (consentStores.evaluateUserConsents)

Parameters

string $consentStore

Required. Name of the consent store to retrieve User data mappings from.

EvaluateUserConsentsRequest $postBody
array $optParams

Optional parameters.

Return Value

EvaluateUserConsentsResponse

Exceptions

Exception

ConsentStore get(string $name, array $optParams = [])

Gets the specified consent store. (consentStores.get)

Parameters

string $name

Required. The resource name of the consent store to get.

array $optParams

Optional parameters.

Return Value

ConsentStore

Exceptions

Exception

Policy getIamPolicy(string $resource, array $optParams = [])

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. (consentStores.getIamPolicy)

Parameters

string $resource

REQUIRED: The resource for which the policy is being requested. See Resource names for the appropriate value for this field.

array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

ListConsentStoresResponse listProjectsLocationsDatasetsConsentStores(string $parent, array $optParams = [])

Lists the consent stores in the specified dataset.

(consentStores.listProjectsLocationsDatasetsConsentStores)

Parameters

string $parent

Required. Name of the dataset.

array $optParams

Optional parameters.

Return Value

ListConsentStoresResponse

Exceptions

Exception

ConsentStore patch(string $name, ConsentStore $postBody, array $optParams = [])

Updates the specified consent store. (consentStores.patch)

Parameters

string $name

Identifier. Resource name of the consent store, of the form projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/con sentStores/{consent_store_id}. Cannot be changed after creation.

ConsentStore $postBody
array $optParams

Optional parameters.

Return Value

ConsentStore

Exceptions

Exception

Operation queryAccessibleData(string $consentStore, QueryAccessibleDataRequest $postBody, array $optParams = [])

Queries all data_ids that are consented for a specified use in the given consent store and writes them to a specified destination. The returned Operation includes a progress counter for the number of User data mappings processed. If the request is successful, a detailed response is returned of type QueryAccessibleDataResponse, contained in the response field when the operation finishes. The metadata field type is OperationMetadata. Errors are logged to Cloud Logging (see Viewing error logs in Cloud Logging). For example, the following sample log entry shows a failed to evaluate consent policy error that occurred during a QueryAccessibleData call to consent store projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/co nsentStores/{consent_store_id}. json jsonPayload: { @type: "type.googleap is.com/google.cloud.healthcare.logging.QueryAccessibleDataLogEntry" error: { code: 9 message: "failed to evaluate consent policy" } resourceName: "project s/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{c onsent_store_id}/consents/{consent_id}" } logName: "projects/{project_id}/log s/healthcare.googleapis.com%2Fquery_accessible_data" operation: { id: "projec ts/{project_id}/locations/{location_id}/datasets/{dataset_id}/operations/{ope ration_id}" producer: "healthcare.googleapis.com/QueryAccessibleData" } receiveTimestamp: "TIMESTAMP" resource: { labels: { consent_store_id: "{consent_store_id}" dataset_id: "{dataset_id}" location: "{location_id}" project_id: "{project_id}" } type: "healthcare_consent_store" } severity: "ERROR" timestamp: "TIMESTAMP" (consentStores.queryAccessibleData)

Parameters

string $consentStore

Required. Name of the consent store to retrieve User data mappings from.

QueryAccessibleDataRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Policy setIamPolicy(string $resource, SetIamPolicyRequest $postBody, array $optParams = [])

Sets the access control policy on the specified resource. Replaces any existing policy. Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors. (consentStores.setIamPolicy)

Parameters

string $resource

REQUIRED: The resource for which the policy is being specified. See Resource names for the appropriate value for this field.

SetIamPolicyRequest $postBody
array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

TestIamPermissionsResponse testIamPermissions(string $resource, TestIamPermissionsRequest $postBody, array $optParams = [])

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking.

This operation may "fail open" without warning. (consentStores.testIamPermissions)

Parameters

string $resource

REQUIRED: The resource for which the policy detail is being requested. See Resource names for the appropriate value for this field.

TestIamPermissionsRequest $postBody
array $optParams

Optional parameters.

Return Value

TestIamPermissionsResponse

Exceptions

Exception