Class IAM
- All Implemented Interfaces:
Closeable, AutoCloseable
IAM lets you describe who can do what across Equinix services through several cooperating resource families:
roles()/roleAssignments()- the RBAC layer: pre-defined roles and the assignment of a role to a principal within a scope.accessPolicies()- project-scoped ABAC access policies, including theirgrants(which principals/groups/projects the policy is granted to).permissionSets()- named, reusable permission sets within a project.principalPolicies()- per-principal policies within a governance domain.policyMasks()- project-scoped masks controlling which managed policies and permission sets are available.effectivePermissions()- the computed effective permissions a principal holds within a project for a service.resourceTypes()- discovery of resource types, actions, action sets, resource type actions and a service's policy schema.
Each accessor uses lazy initialization - the internal client is created on first access and reused for subsequent calls.
Service host
IAM requests go to the Access service's own host, https://access.eqix.equinix.com,
declared as the hostName of the IAM functional area in apiParams_IAM.json. The
unified gateway https://api.equinix.com answers 404 for these paths. The OAuth
client-credentials login still goes to api.equinix.com, and the resulting bearer token is
sent to the Access host. Override the host with
getEquinixClient().setDomainEndPoint("IAM", ...).
Tokens for project-scoped endpoints
Organization-level calls such as roles().list() work with the
client-credentials token. The project-scoped endpoints (/v1/projects/{projectId}/...:
access policies, permission sets, principal policies, policy masks, effective permissions,
project roles and resource types) accept only an STS-issued access-policy token (live,
2026-11-11). Build an IAM for them with IAM(BearerTokenProvider).
Project identifiers
Two formats exist. IAM paths take the spec's ProjectId, project:<id> (for
example project:abc-123); the bare Resource Manager project UUID that Projects
returns fails the service's project-id format check. ProjectIds.of(String)
converts either form to the project: form.
Quick Start
BasicEquinixCredentials credentials = new BasicEquinixCredentials("clientId", "clientSecret");
IAM iam = new IAM(credentials);
RoleList roles = iam.roles().list();
// Project-scoped: an STS access-policy token, refreshed by the supplier.
IAM projectIam = new IAM(() -> myTokenCache.currentAccessPolicyToken());
AccessPolicy policy = projectIam.accessPolicies()
.getByUuid(ProjectIds.of(projectUuid), "accesspolicy:my-policy");
- Author:
- ianjones
- See Also:
-
Field Summary
Fields inherited from class EquinixClient
autoLoadMetros, enrichMetroRegistry, equinixClient, peeringDbApiKeyModifier and TypeFieldDescriptionprotected final booleanWhether an explicitEquinixClient.authenticate()should eagerly load the metro catalog.protected final booleanWhether the metro registry should be enriched with per-IBX detail from EIA.protected final EquinixClientprotected final StringThe PeeringDB API key configured viaEquinixConfig.getPeeringDbApiKey(), ornullwhen none was configured. -
Constructor Summary
ConstructorsConstructorDescriptionIAM(BearerTokenProvider tokenProvider) Creates an IAM client that sends caller-supplied bearer tokens instead of logging in with client credentials.IAM(BearerTokenProvider tokenProvider, EquinixConfig config) Creates an IAM client that sends caller-supplied bearer tokens, with explicitEquinixConfigoptions.IAM(EquinixCredentials equinixCredentials) Creates a new IAM client using the provided credentials.IAM(EquinixCredentials equinixCredentials, boolean isSandBoxed) Creates a new IAM client with optional sandbox mode.IAM(EquinixCredentialsProvider credentialsProvider) Creates a new IAM client whose credentials are resolved through the given provider.IAM(EquinixCredentialsProvider credentialsProvider, boolean isSandBoxed) Creates a new IAM client over a custom credentials provider, with optional sandbox mode.IAM(EquinixCredentialsProvider credentialsProvider, EquinixConfig config) Creates a new IAM client over a custom credentials provider with explicitEquinixConfigoptions.IAM(EquinixCredentials equinixCredentials, EquinixConfig config) Creates a new IAM client with explicitEquinixConfigoptions. -
Method Summary
Modifier and TypeMethodDescriptionReturns the client for project-scoped IAM access policies and their grants (/v1/projects/{projectId}/accessPolicies).Returns the client for the IAM effective-permissions computation (GET /v1/projects/{projectId}/effectivePermissions).Returns the client for project-scoped IAM permission sets (/v1/projects/{projectId}/permissionSets).Returns the client for project-scoped IAM policy masks (/v1/projects/{projectId}/policyMasks).Returns the client for project-scoped IAM principal policies (/v1/projects/{projectId}/principalPolicies).Returns the client for IAM policy-authoring discovery - resource types, actions, action sets, resource type actions and the service policy schema (/v1/projects/{projectId}/resourceTypesand friends).Returns the client for IAM role assignments - associating a principal with a role in a scope (/v1/roleAssignments).roles()Returns the client for the IAM roles catalog (GET /v1/roles,GET /v1/projects/{projectId}/roles).Methods inherited from class EquinixClient
authenticate, close, coreModifier and TypeMethodDescriptionvoidExplicitly obtains a token from the configured source (an OAuth2 client-credentials mint, or theBearerTokenProvider) and stores it for subsequent API calls.voidclose()protected Corecore()Returns the internal core client for authentication and platform-level operations.
-
Constructor Details
-
IAM
Creates a new IAM client using the provided credentials. Authentication occurs automatically on the first API call.- Parameters:
equinixCredentials- the OAuth2 credentials for authenticating with Equinix APIs
-
IAM
Creates a new IAM client with optional sandbox mode.- Parameters:
equinixCredentials- the OAuth2 credentials for authenticating with Equinix APIsisSandBoxed-trueto use the sandbox environment for testing;falsefor production
-
IAM
Creates a new IAM client whose credentials are resolved through the given provider. Authentication occurs automatically on the first API call.- Parameters:
credentialsProvider- supplies the OAuth2 credentials for authenticating with Equinix APIs
-
IAM
Creates a new IAM client over a custom credentials provider, with optional sandbox mode.- Parameters:
credentialsProvider- supplies the OAuth2 credentials for authenticating with Equinix APIsisSandBoxed-trueto use the sandbox environment for testing;falsefor production
-
IAM
Creates a new IAM client with explicitEquinixConfigoptions.- Parameters:
equinixCredentials- the OAuth2 credentials for authenticating with Equinix APIsconfig- the construction-time options
-
IAM
Creates a new IAM client over a custom credentials provider with explicitEquinixConfigoptions.- Parameters:
credentialsProvider- supplies the OAuth2 credentials for authenticating with Equinix APIsconfig- the construction-time options
-
IAM
Creates an IAM client that sends caller-supplied bearer tokens instead of logging in with client credentials. Use it for the project-scoped endpoints, which need an STS access-policy token (BearerTokenProvider.of(token), orBearerTokenProvider.from(...)to refresh it). No Equinix client id or secret is used.- Parameters:
tokenProvider- supplies the access-policy token
-
IAM
Creates an IAM client that sends caller-supplied bearer tokens, with explicitEquinixConfigoptions.- Parameters:
tokenProvider- supplies the access-policy tokenconfig- the construction-time options
-
-
Method Details
-
roles
-
roleAssignments
Returns the client for IAM role assignments - associating a principal with a role in a scope (/v1/roleAssignments).- Returns:
- the
IAMRoleAssignmentsclient
-
accessPolicies
Returns the client for project-scoped IAM access policies and their grants (/v1/projects/{projectId}/accessPolicies).- Returns:
- the
IAMAccessPoliciesclient
-
permissionSets
Returns the client for project-scoped IAM permission sets (/v1/projects/{projectId}/permissionSets).- Returns:
- the
IAMPermissionSetsclient
-
principalPolicies
Returns the client for project-scoped IAM principal policies (/v1/projects/{projectId}/principalPolicies).- Returns:
- the
IAMPrincipalPoliciesclient
-
policyMasks
Returns the client for project-scoped IAM policy masks (/v1/projects/{projectId}/policyMasks).- Returns:
- the
IAMPolicyMasksclient
-
effectivePermissions
Returns the client for the IAM effective-permissions computation (GET /v1/projects/{projectId}/effectivePermissions).- Returns:
- the
IAMEffectivePermissionsclient
-
resourceTypes
Returns the client for IAM policy-authoring discovery - resource types, actions, action sets, resource type actions and the service policy schema (/v1/projects/{projectId}/resourceTypesand friends).- Returns:
- the
IAMResourceTypesclient
-