Resource: Consent
Represents a user's consent.
JSON representation |
---|
{ "name": string, "revisionId": string, "revisionCreateTime": string, "userId": string, "policies": [ { object( |
Fields | |
---|---|
name |
Identifier. Resource name of the Consent, of the form |
revisionId |
Output 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 |
revisionCreateTime |
Output only. The timestamp that the revision was created. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
userId |
Required. User's UUID provided by the client. |
policies[] |
Optional. Represents a user's consent in terms of the resources that can be accessed and under what conditions. |
consentArtifact |
Required. The resource name of the Consent artifact that contains proof of the end user's consent, of the form |
state |
Required. Indicates the current state of this Consent. |
metadata |
Optional. User-supplied key-value pairs used to organize Consent resources. Metadata keys must:
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. An object containing a list of |
Union field expiration . Optional. Allows setting expiration time for Consents. Expired Consents are ignored in access determination methods such as [CheckDataAccess]. This value replaces any default expiration duration configured for the Consent store. expiration can be only one of the following: |
|
expireTime |
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: |
ttl |
Input only. The time to live for this Consent from when it is created. A duration in seconds with up to nine fractional digits, ending with ' |
Policy
Represents a user's consent in terms of the resources that can be accessed and under what conditions.
JSON representation |
---|
{ "resourceAttributes": [ { object( |
Fields | |
---|---|
resourceAttributes[] |
The resources that this policy applies to. A resource is a match if it matches all the attributes listed here. If empty, this policy applies to all User data mappings for the given user. |
authorizationRule |
Required. The request conditions to meet to grant access. In addition to any supported comparison operators, authorization rules may have |
State
The state of the Consent resource.
Enums | |
---|---|
STATE_UNSPECIFIED |
No state specified. Treated as ACTIVE only at the time of resource creation. |
ACTIVE |
The Consent is active and is considered when evaluating a user's consent on resources. |
ARCHIVED |
The archived state is currently not being used. |
REVOKED |
A revoked Consent is not considered when evaluating a user's consent on resources. |
DRAFT |
A draft Consent is not considered when evaluating a user's consent on resources unless explicitly specified. |
REJECTED |
When a draft Consent is rejected by a user, it is set to a rejected state. A rejected Consent is not considered when evaluating a user's consent on resources. |
Methods |
|
---|---|
|
Activates the latest revision of the specified Consent by committing a new revision with state updated to ACTIVE . |
|
Creates a new Consent in the parent consent store . |
|
Deletes the Consent and its revisions. |
|
Deletes the specified revision of a Consent . |
|
Gets the specified revision of a Consent , or the latest revision if revision_id is not specified in the resource name. |
|
Lists the Consent in the given consent store , returning each Consent's latest revision. |
|
Lists the revisions of the specified Consent in reverse chronological order. |
|
Updates the latest revision of the specified Consent by committing a new revision with the changes. |
|
Rejects the latest revision of the specified Consent by committing a new revision with state updated to REJECTED . |
|
Revokes the latest revision of the specified Consent by committing a new revision with state updated to REVOKED . |