com.amazonaws.services.sns.model
Class AddPermissionRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.sns.model.AddPermissionRequest

public class AddPermissionRequest
extends AmazonWebServiceRequest

Container for the parameters to the AddPermission operation.

The AddPermission action adds a statement to a topic's access control policy, granting access for the specified AWS accounts to the specified actions.

See Also:
AmazonSNS.addPermission(AddPermissionRequest)

Constructor Summary
AddPermissionRequest()
          Default constructor for a new AddPermissionRequest object.
AddPermissionRequest(String topicArn, String label, List<String> aWSAccountIds, List<String> actionNames)
          Constructs a new AddPermissionRequest object.
 
Method Summary
 boolean equals(Object obj)
           
 List<String> getActionNames()
          The action you want to allow for the specified principal(s).
 List<String> getAWSAccountIds()
          The AWS account IDs of the users (principals) who will be given access to the specified actions.
 String getLabel()
          A unique identifier for the new policy statement.
 String getTopicArn()
          The ARN of the topic whose access control policy you wish to modify.
 int hashCode()
           
 void setActionNames(Collection<String> actionNames)
          The action you want to allow for the specified principal(s).
 void setAWSAccountIds(Collection<String> aWSAccountIds)
          The AWS account IDs of the users (principals) who will be given access to the specified actions.
 void setLabel(String label)
          A unique identifier for the new policy statement.
 void setTopicArn(String topicArn)
          The ARN of the topic whose access control policy you wish to modify.
 String toString()
          Returns a string representation of this object; useful for testing and debugging.
 AddPermissionRequest withActionNames(Collection<String> actionNames)
          The action you want to allow for the specified principal(s).
 AddPermissionRequest withActionNames(String... actionNames)
          The action you want to allow for the specified principal(s).
 AddPermissionRequest withAWSAccountIds(Collection<String> aWSAccountIds)
          The AWS account IDs of the users (principals) who will be given access to the specified actions.
 AddPermissionRequest withAWSAccountIds(String... aWSAccountIds)
          The AWS account IDs of the users (principals) who will be given access to the specified actions.
 AddPermissionRequest withLabel(String label)
          A unique identifier for the new policy statement.
 AddPermissionRequest withTopicArn(String topicArn)
          The ARN of the topic whose access control policy you wish to modify.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getDelegationToken, getRequestClientOptions, getRequestCredentials, setDelegationToken, setRequestCredentials
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AddPermissionRequest

public AddPermissionRequest()
Default constructor for a new AddPermissionRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.


AddPermissionRequest

public AddPermissionRequest(String topicArn,
                            String label,
                            List<String> aWSAccountIds,
                            List<String> actionNames)
Constructs a new AddPermissionRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
topicArn - The ARN of the topic whose access control policy you wish to modify.
label - A unique identifier for the new policy statement.
aWSAccountIds - The AWS account IDs of the users (principals) who will be given access to the specified actions. The users must have AWS accounts, but do not need to be signed up for this service.
actionNames - The action you want to allow for the specified principal(s).
Method Detail

getTopicArn

public String getTopicArn()
The ARN of the topic whose access control policy you wish to modify.

Returns:
The ARN of the topic whose access control policy you wish to modify.

setTopicArn

public void setTopicArn(String topicArn)
The ARN of the topic whose access control policy you wish to modify.

Parameters:
topicArn - The ARN of the topic whose access control policy you wish to modify.

withTopicArn

public AddPermissionRequest withTopicArn(String topicArn)
The ARN of the topic whose access control policy you wish to modify.

Returns a reference to this object so that method calls can be chained together.

Parameters:
topicArn - The ARN of the topic whose access control policy you wish to modify.
Returns:
A reference to this updated object so that method calls can be chained together.

getLabel

public String getLabel()
A unique identifier for the new policy statement.

Returns:
A unique identifier for the new policy statement.

setLabel

public void setLabel(String label)
A unique identifier for the new policy statement.

Parameters:
label - A unique identifier for the new policy statement.

withLabel

public AddPermissionRequest withLabel(String label)
A unique identifier for the new policy statement.

Returns a reference to this object so that method calls can be chained together.

Parameters:
label - A unique identifier for the new policy statement.
Returns:
A reference to this updated object so that method calls can be chained together.

getAWSAccountIds

public List<String> getAWSAccountIds()
The AWS account IDs of the users (principals) who will be given access to the specified actions. The users must have AWS accounts, but do not need to be signed up for this service.

Returns:
The AWS account IDs of the users (principals) who will be given access to the specified actions. The users must have AWS accounts, but do not need to be signed up for this service.

setAWSAccountIds

public void setAWSAccountIds(Collection<String> aWSAccountIds)
The AWS account IDs of the users (principals) who will be given access to the specified actions. The users must have AWS accounts, but do not need to be signed up for this service.

Parameters:
aWSAccountIds - The AWS account IDs of the users (principals) who will be given access to the specified actions. The users must have AWS accounts, but do not need to be signed up for this service.

withAWSAccountIds

public AddPermissionRequest withAWSAccountIds(String... aWSAccountIds)
The AWS account IDs of the users (principals) who will be given access to the specified actions. The users must have AWS accounts, but do not need to be signed up for this service.

Returns a reference to this object so that method calls can be chained together.

Parameters:
aWSAccountIds - The AWS account IDs of the users (principals) who will be given access to the specified actions. The users must have AWS accounts, but do not need to be signed up for this service.
Returns:
A reference to this updated object so that method calls can be chained together.

withAWSAccountIds

public AddPermissionRequest withAWSAccountIds(Collection<String> aWSAccountIds)
The AWS account IDs of the users (principals) who will be given access to the specified actions. The users must have AWS accounts, but do not need to be signed up for this service.

Returns a reference to this object so that method calls can be chained together.

Parameters:
aWSAccountIds - The AWS account IDs of the users (principals) who will be given access to the specified actions. The users must have AWS accounts, but do not need to be signed up for this service.
Returns:
A reference to this updated object so that method calls can be chained together.

getActionNames

public List<String> getActionNames()
The action you want to allow for the specified principal(s).

Returns:
The action you want to allow for the specified principal(s).

setActionNames

public void setActionNames(Collection<String> actionNames)
The action you want to allow for the specified principal(s).

Parameters:
actionNames - The action you want to allow for the specified principal(s).

withActionNames

public AddPermissionRequest withActionNames(String... actionNames)
The action you want to allow for the specified principal(s).

Returns a reference to this object so that method calls can be chained together.

Parameters:
actionNames - The action you want to allow for the specified principal(s).
Returns:
A reference to this updated object so that method calls can be chained together.

withActionNames

public AddPermissionRequest withActionNames(Collection<String> actionNames)
The action you want to allow for the specified principal(s).

Returns a reference to this object so that method calls can be chained together.

Parameters:
actionNames - The action you want to allow for the specified principal(s).
Returns:
A reference to this updated object so that method calls can be chained together.

toString

public String toString()
Returns a string representation of this object; useful for testing and debugging.

Overrides:
toString in class Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.