|
|||||||
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 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.
Field Summary | |
---|---|
static Principal |
AllUsers
Principal instance that includes all users, including anonymous users. |
Constructor Summary | |
---|---|
Principal(String accountId)
Constructs a new principal with the specified AWS account ID. |
Method Summary | |
---|---|
String |
getId()
Returns the unique ID for this principal. |
String |
getProvider()
Returns the provider for this principal, which indicates in what group of users this principal resides. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, 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.
Constructor Detail |
---|
public Principal(String accountId)
accountId
- An AWS account ID.Method Detail |
---|
public String getProvider()
public String getId()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |