# REST Resource: projects.locations.entitlements.grants

- [Resource: Grant](https://docs.cloud.google.com/iam/docs/reference/pam/rest/v1/projects.locations.entitlements.grants#Grant)
  - [JSON representation](https://docs.cloud.google.com/iam/docs/reference/pam/rest/v1/projects.locations.entitlements.grants#Grant.SCHEMA_REPRESENTATION)
- [Methods](https://docs.cloud.google.com/iam/docs/reference/pam/rest/v1/projects.locations.entitlements.grants#METHODS_SUMMARY)

## Resource: Grant

A grant represents a request from a user for obtaining the access specified in an entitlement they are eligible for.

| JSON representation |
|---|
| ``` { "name": string, "createTime": string, "updateTime": string, "requester": string, "requestedDuration": string, "justification": { object (`https://docs.cloud.google.com/iam/docs/reference/pam/rest/v1/folders.locations.entitlements.grants#Grant.Justification`) }, "state": enum (`https://docs.cloud.google.com/iam/docs/reference/pam/rest/v1/folders.locations.entitlements.grants#Grant.State`), "timeline": { object (`https://docs.cloud.google.com/iam/docs/reference/pam/rest/v1/folders.locations.entitlements.grants#Grant.Timeline`) }, "privilegedAccess": { object (`https://docs.cloud.google.com/iam/docs/reference/pam/rest/v1/PrivilegedAccess`) }, "auditTrail": { object (`https://docs.cloud.google.com/iam/docs/reference/pam/rest/v1/folders.locations.entitlements.grants#Grant.AuditTrail`) }, "additionalEmailRecipients": [ string ], "externallyModified": boolean } ``` |

| Fields ||
|---|---|
| `name` | `string` Identifier. Name of this grant. Possible formats: - `organizations/{organization-number}/locations/{region}/entitlements/{entitlement-id}/grants/{grant-id}` - `folders/{folder-number}/locations/{region}/entitlements/{entitlement-id}/grants/{grant-id}` - `projects/{project-id|project-number}/locations/{region}/entitlements/{entitlement-id}/grants/{grant-id}` The last segment of this name (`{grant-id}`) is autogenerated. |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. Create time stamp. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `updateTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. Update time stamp. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `requester` | `string` Output only. Username of the user who created this grant. |
| `requestedDuration` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#duration` format)`` Required. The amount of time access is needed for. This value should be shorter than the `maxRequestDuration` value of the entitlement. A duration in seconds with up to nine fractional digits, ending with '`s`'. Example: `"3.5s"`. |
| `justification` | ``object (`https://docs.cloud.google.com/iam/docs/reference/pam/rest/v1/folders.locations.entitlements.grants#Grant.Justification`)`` Optional. Justification of why this access is needed. |
| `state` | ``enum (`https://docs.cloud.google.com/iam/docs/reference/pam/rest/v1/folders.locations.entitlements.grants#Grant.State`)`` Output only. Current state of this grant. |
| `timeline` | ``object (`https://docs.cloud.google.com/iam/docs/reference/pam/rest/v1/folders.locations.entitlements.grants#Grant.Timeline`)`` Output only. Timeline of this grant. |
| `privilegedAccess` | ``object (`https://docs.cloud.google.com/iam/docs/reference/pam/rest/v1/PrivilegedAccess`)`` Output only. The access that would be granted by this grant. |
| `auditTrail` | ``object (`https://docs.cloud.google.com/iam/docs/reference/pam/rest/v1/folders.locations.entitlements.grants#Grant.AuditTrail`)`` Output only. Audit trail of access provided by this grant. If unspecified then access was never granted. |
| `additionalEmailRecipients[]` | `string` Optional. Additional email addresses to notify for all the actions performed on the grant. |
| `externallyModified` | `boolean` Output only. Flag set by the PAM system to indicate that policy bindings made by this grant have been modified from outside PAM. After it is set, this flag remains set forever irrespective of the grant state. A `true` value here indicates that PAM no longer has any certainty on the access a user has because of this grant. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/iam/docs/reference/pam/rest/v1/projects.locations.entitlements.grants/approve` | `ApproveGrant` is used to approve a grant. |
| ### `https://docs.cloud.google.com/iam/docs/reference/pam/rest/v1/projects.locations.entitlements.grants/create` | Creates a grant in a given project, folder, or organization and location. |
| ### `https://docs.cloud.google.com/iam/docs/reference/pam/rest/v1/projects.locations.entitlements.grants/deny` | `DenyGrant` is used to deny a grant. |
| ### `https://docs.cloud.google.com/iam/docs/reference/pam/rest/v1/projects.locations.entitlements.grants/get` | Get details of a single grant. |
| ### `https://docs.cloud.google.com/iam/docs/reference/pam/rest/v1/projects.locations.entitlements.grants/list` | Lists grants for a given entitlement. |
| ### `https://docs.cloud.google.com/iam/docs/reference/pam/rest/v1/projects.locations.entitlements.grants/revoke` | `RevokeGrant` is used to immediately revoke access for a grant. |
| ### `https://docs.cloud.google.com/iam/docs/reference/pam/rest/v1/projects.locations.entitlements.grants/search` | `SearchGrants` returns grants that are related to the calling user in the specified way. |