|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.amazonaws.auth.policy.conditions.SNSConditionFactory
public class SNSConditionFactory
Factory for creating access control policy conditions specific to Amazon
Simple Notification Service. This class provides access to the AWS access
control policy condition keys specific to Amazon SNS, as well as methods for
quickly creating common SNS specific policy conditions such as
newEndpointCondition(String)
.
Field Summary | |
---|---|
static String |
ENDPOINT_CONDITION_KEY
Condition key for The URL, e-mail address, or ARN from a Subscribe request or a previously confirmed subscription. |
static String |
PROTOCOL_CONDITION_KEY
Condition key for the protocol value from a Subscribe request or a previously confirmed subscription. |
Method Summary | |
---|---|
static Condition |
newEndpointCondition(String endpointPattern)
Constructs a new access policy condition that compares the requested endpoint used to subscribe to an Amazon SNS topic with the specified endpoint pattern. |
static Condition |
newProtocolCondition(String protocol)
Constructs a new AWS access control policy condition that allows an access control statement to restrict subscriptions to an Amazon SNS topic based on the protocol being used for the subscription. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String ENDPOINT_CONDITION_KEY
This condition key may only be used with StringCondition
objects.
public static final String PROTOCOL_CONDITION_KEY
This condition key may only be used with StringCondition
objects.
Method Detail |
---|
public static Condition newEndpointCondition(String endpointPattern)
For example, this condition can restrict subscriptions to a topic to email addresses in a certain domain ("*@my-company.com").
Policy policy = new Policy("MyTopicPolicy"); policy.withStatements(new Statement("RestrictSubscriptions", Effect.Allow) .withPrincipals(new Principal("*")).withActions(SNSActions.Subscribe) .withResources(new Resource(myTopicArn)) .withConditions(SNSConditionFactory.newEndpointCondition("*@my-company.com")));
endpointPattern
- The endpoint pattern against which to compare the requested
endpoint for an Amazon SNS topic subscription.
public static Condition newProtocolCondition(String protocol)
protocol
- The protocol against which to compare the requested protocol
for an Amazon SNS topic subscription.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |