Class StsScope
java.lang.Object
com.eqixiac.equinix.sts.model.StsScope
Typed values for the STS token-exchange
scope (TokenRequest.scope(StsScope)).
The live service (2026-11-11) accepts exactly these forms and rejects anything else with
invalid_scope: "scope must be an access policy ERN or a string of the form
roleassignments:<org-id> or projectpolicies:<project-id> or
principalpolicy:<project-id>". A free-text value such as roles is rejected.
Project ids are sent bare (the service reports projectpolicies:abc as
project:abc); a project: prefix is stripped.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StsScopeaccessPolicy(String projectId, String accessPolicyId) The access-policy ERN for a policy in a project:ern:eqix:equinix/access:global:<project-id>:AccessPolicy:<policy-id>.static StsScopeaccessPolicyErn(String accessPolicyErn) An access-policy ERN given verbatim.booleangetValue()Returns the wire value sent as thescopeform field.inthashCode()static StsScopeprincipalPolicy(String projectId) principalpolicy:<project-id>: a token carrying the caller's principal policy in a project.static StsScopeprojectPolicies(String projectId) projectpolicies:<project-id>: a token carrying the project's policies.static StsScoperoleAssignments(String organizationId) roleassignments:<org-id>: a token carrying the caller's role assignments in an organization.toString()
-
Method Details
-
accessPolicyErn
An access-policy ERN given verbatim.- Parameters:
accessPolicyErn- the ERN, starting withern:- Returns:
- the scope
- Throws:
IllegalArgumentException- if the value does not start withern:or has not the seven colon-separated ERN segments
-
accessPolicy
The access-policy ERN for a policy in a project:ern:eqix:equinix/access:global:<project-id>:AccessPolicy:<policy-id>.Shape: the service's ERN validator accepts this form and rejects lower-case
accesspolicyand other service segments (observed 2026-11-11); a successful exchange with it was not verified. UseaccessPolicyErn(String)for an ERN the console or IAM gives you.- Parameters:
projectId- the project id, bare orproject:<id>accessPolicyId- the policy id, bare oraccesspolicy:<id>- Returns:
- the scope
-
roleAssignments
-
projectPolicies
-
principalPolicy
-
getValue
Returns the wire value sent as thescopeform field.- Returns:
- the scope string
-
toString
-
equals
-
hashCode
-