Method: consents.activate

Full name: projects.locations.datasets.consentStores.consents.activate

Activates the latest revision of the specified Consent by committing a new revision with state updated to ACTIVE. If the latest revision of the given consent is in the ACTIVE state, no new revision is committed. A google.rpc.Code.FAILED_PRECONDITION error occurs if the latest revision of the given consent is in the REJECTED or REVOKED state.

HTTP request

POST https://healthcare.googleapis.com/v1beta1/{name=projects/*/locations/*/datasets/*/consentStores/*/consents/*}:activate

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. The resource name of the consent to activate, of the form projects/{projectId}/locations/{locationId}/datasets/{datasetId}/consentStores/{consentStoreId}/consents/{consentId}. An google.rpc.Code.INVALID_ARGUMENT error occurs if revisionId is specified in the name.

Authorization requires the following IAM permission on the specified resource name:

  • healthcare.consents.activate

Request body

The request body contains data with the following structure:

JSON representation
{
  "consentArtifact": string,

  // Union field expiration can be only one of the following:
  "expireTime": string,
  "ttl": string
  // End of list of possible types for union field expiration.
}
Fields
consentArtifact

string

Required. The resource name of the consent artifact that contains proof of the end user's consent, of the form projects/{projectId}/locations/{locationId}/datasets/{datasetId}/consentStores/{consentStoreId}/consentArtifacts/{consent_artifact_id}. If the draft consent had a consent artifact, this consent artifact overwrites it.

Authorization requires the following IAM permission on the specified resource consentArtifact:

  • healthcare.consentArtifacts.get
Union field expiration. Allows setting expiration time for Consents. Expired consents are ignored in access determination methods such as [CheckDataAccess]. This value overrides the expiration duration configured for the consent store. expiration can be only one of the following:
expireTime

string(Timestamp format)

Timestamp in UTC of when this consent is considered expired.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

ttl

string(Duration format)

The time to live for this consent from when it is marked as active.

A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".

Response body

If successful, the response body contains an instance of Consent.

Authorization Scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloud-healthcare
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.