|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.amazonaws.auth.policy.Principal
public class Principal
A principal is an AWS account or AWS web serivce, which is being allowed or denied access to a
resource through an access control policy. The principal is a property of the
Statement
object, not directly the Policy
object.
The principal is A in the statement "A has permission to do B to C where D applies."
In an access control policy statement, you can set the principal to all
authenticated AWS users through the AllUsers
member. This
is useful when you don't want to restrict access based on the identity of the
requester, but instead on other identifying characteristics such as the
requester's IP address.
Nested Class Summary | |
---|---|
static class |
Principal.Services
The services who have the right to do the assume the role action. |
static class |
Principal.WebIdentityProviders
Web identity providers, such as Login with Amazon, Facebook, or Google. |
Field Summary | |
---|---|
static Principal |
All
Principal instance that includes all the AWS accounts, AWS web services and web identity providers. |
static Principal |
AllServices
Principal instance that includes all AWS web services. |
static Principal |
AllUsers
Principal instance that includes all users, including anonymous users. |
static Principal |
AllWebProviders
Principal instance that includes all the web identity providers. |
Constructor Summary | |
---|---|
Principal(Principal.Services service)
Constructs a new principal with the specified AWS web service which is being allowed or denied access to a resource through an access control policy. |
|
Principal(Principal.WebIdentityProviders webIdentityProvider)
Constructs a new principal with the specified web identity provider. |
|
Principal(java.lang.String accountId)
Constructs a new principal with the specified AWS account ID. |
|
Principal(java.lang.String provider,
java.lang.String id)
Constructs a new principal with the specified id and provider. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object principal)
|
java.lang.String |
getId()
Returns the unique ID for this principal. |
java.lang.String |
getProvider()
Returns the provider for this principal, which indicates in what group of users this principal resides. |
int |
hashCode()
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Principal AllUsers
This is useful when you don't want to restrict access based on the identity of the requester, but instead on other identifying characteristics such as the requester's IP address.
public static final Principal AllServices
public static final Principal AllWebProviders
public static final Principal All
Constructor Detail |
---|
public Principal(Principal.Services service)
service
- An AWS service.public Principal(java.lang.String provider, java.lang.String id)
public Principal(java.lang.String accountId)
accountId
- An AWS account ID.public Principal(Principal.WebIdentityProviders webIdentityProvider)
webIdentityProvider
- An web identity provider.Method Detail |
---|
public java.lang.String getProvider()
public java.lang.String getId()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object principal)
equals
in class java.lang.Object
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |