Skip to main content

Add Grant

Request

Allows a user to add an external grant to an access policy including a managed policy. Access to this operation is controlled by the access policy being accessed.

The auth token's access policy must allow action:use/addGrant.

Security
bearerAuth
Path
projectIdProjectId (string) or * (string)required
One of:

Globally unique identifier of a project.

string(ProjectId)
accessPolicyId(AccessPolicyId (string) or ManagedPolicyId (string)) or Ern (string)required
One of:

Callers may URL encode this value. When passing an ERN, callers must URL encode this value.

One of:

Uniquely identifies an access policy within a project.

string(AccessPolicyId)
Bodyapplication/jsonrequired
granteePrincipal (string) or Group (string) or ProjectId (string)(Grantee)required
Any of:

Globally unique string identifier for a principal formatted like "principal:...".

string(Principal)
lastRevstring, [ 1 .. 256 ] characters(LastResourceRev)

An opaque string that represents the expected revision of a given resource. This is provided when a resource is updated so that if a concurrent update has occurred since the resource was read, then the collision will be detected.

Example:"abc123"
Payload
{ "grantee": "principal:abc-123:idp:example-user", "lastRev": "abc123" }

Responses

Success

Bodyapplication/json
grantIdstring(GrantId)^grant:[A-Z0-9]{13}$required

Uniquely identifies an access policy grant.

Example:"grant:ABCDEFGHIJ123"
accessPolicyIdAccessPolicyId (string) or ManagedPolicyId (string)required
One of:

Uniquely identifies an access policy within a project.

string(AccessPolicyId)
accessPolicyErnstring(Ern)^ern:(?<cloud>[^:]{1,50}):(?<service>[^:/]{1,...required

Equinix resource name, a universally unique identifier for a resource across all clouds, regions, and services. Formatted as "ern:<cloudId>:<serviceId>:<regionId>:<projectId>:<resourceType>:<resourceId>".

Example:"ern:eqix:equinix/sts:global:abc-123:SomeType:res-id"
granteePrincipal (string) or Group (string) or ProjectId (string)(Grantee)required
Any of:

Globally unique string identifier for a principal formatted like "principal:...".

string(Principal)
createdBystring(CreatedBy)^.*$required

A string indicating the principal who invoked an operation to create the resource.

Example:"principal:ABCD-EFG-12345:idp:example-user"
createdAtstring(CreatedAt)^.*$required

A string timestamp indicating when the resource was created. Formatted like: "2025-02-12T17:24:19.033772087Z"

Example:"2024-01-15T12:00:00Z"
Response
{ "grantId": "grant:ABCDEFGHIJ123", "accessPolicyId": "accesspolicy:my-policy", "accessPolicyErn": "ern:eqix:equinix/sts:global:abc-123:SomeType:res-id", "grantee": "principal:abc-123:idp:example-user", "createdBy": "principal:ABCD-EFG-12345:idp:example-user", "createdAt": "2024-01-15T12:00:00Z" }
Was this page helpful?