public class AddPermissionRequest extends AmazonWebServiceRequest implements java.io.Serializable
Adds a statement to a topic's access control policy, granting access for the specified AWS accounts to the specified actions.
Constructor and Description |
---|
AddPermissionRequest()
Default constructor for AddPermissionRequest object.
|
AddPermissionRequest(java.lang.String topicArn,
java.lang.String label,
java.util.List<java.lang.String> aWSAccountIds,
java.util.List<java.lang.String> actionNames)
Constructs a new AddPermissionRequest object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.util.List<java.lang.String> |
getActionNames()
The action you want to allow for the specified principal(s).
|
java.util.List<java.lang.String> |
getAWSAccountIds()
The AWS account IDs of the users (principals) who will be given access to
the specified actions.
|
java.lang.String |
getLabel()
A unique identifier for the new policy statement.
|
java.lang.String |
getTopicArn()
The ARN of the topic whose access control policy you wish to modify.
|
int |
hashCode() |
void |
setActionNames(java.util.Collection<java.lang.String> actionNames)
The action you want to allow for the specified principal(s).
|
void |
setAWSAccountIds(java.util.Collection<java.lang.String> aWSAccountIds)
The AWS account IDs of the users (principals) who will be given access to
the specified actions.
|
void |
setLabel(java.lang.String label)
A unique identifier for the new policy statement.
|
void |
setTopicArn(java.lang.String topicArn)
The ARN of the topic whose access control policy you wish to modify.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
AddPermissionRequest |
withActionNames(java.util.Collection<java.lang.String> actionNames)
The action you want to allow for the specified principal(s).
|
AddPermissionRequest |
withActionNames(java.lang.String... actionNames)
The action you want to allow for the specified principal(s).
|
AddPermissionRequest |
withAWSAccountIds(java.util.Collection<java.lang.String> aWSAccountIds)
The AWS account IDs of the users (principals) who will be given access to
the specified actions.
|
AddPermissionRequest |
withAWSAccountIds(java.lang.String... aWSAccountIds)
The AWS account IDs of the users (principals) who will be given access to
the specified actions.
|
AddPermissionRequest |
withLabel(java.lang.String label)
A unique identifier for the new policy statement.
|
AddPermissionRequest |
withTopicArn(java.lang.String topicArn)
The ARN of the topic whose access control policy you wish to modify.
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public AddPermissionRequest()
public AddPermissionRequest(java.lang.String topicArn, java.lang.String label, java.util.List<java.lang.String> aWSAccountIds, java.util.List<java.lang.String> actionNames)
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).
Valid values: Any Amazon SNS action name, for example
Publish
.
public java.lang.String getTopicArn()
The ARN of the topic whose access control policy you wish to modify.
The ARN of the topic whose access control policy you wish to modify.
public void setTopicArn(java.lang.String topicArn)
The ARN of the topic whose access control policy you wish to modify.
topicArn
- The ARN of the topic whose access control policy you wish to modify.
public AddPermissionRequest withTopicArn(java.lang.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.
topicArn
- The ARN of the topic whose access control policy you wish to modify.
public java.lang.String getLabel()
A unique identifier for the new policy statement.
A unique identifier for the new policy statement.
public void setLabel(java.lang.String label)
A unique identifier for the new policy statement.
label
- A unique identifier for the new policy statement.
public AddPermissionRequest withLabel(java.lang.String label)
A unique identifier for the new policy statement.
Returns a reference to this object so that method calls can be chained together.
label
- A unique identifier for the new policy statement.
public java.util.List<java.lang.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.
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.
public void setAWSAccountIds(java.util.Collection<java.lang.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.
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.
public AddPermissionRequest withAWSAccountIds(java.lang.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.
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.
public AddPermissionRequest withAWSAccountIds(java.util.Collection<java.lang.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.
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.
public java.util.List<java.lang.String> getActionNames()
The action you want to allow for the specified principal(s).
Valid values: Any Amazon SNS action name, for example
Publish
.
The action you want to allow for the specified principal(s).
Valid values: Any Amazon SNS action name, for example
Publish
.
public void setActionNames(java.util.Collection<java.lang.String> actionNames)
The action you want to allow for the specified principal(s).
Valid values: Any Amazon SNS action name, for example
Publish
.
actionNames
- The action you want to allow for the specified principal(s).
Valid values: Any Amazon SNS action name, for example
Publish
.
public AddPermissionRequest withActionNames(java.lang.String... actionNames)
The action you want to allow for the specified principal(s).
Valid values: Any Amazon SNS action name, for example
Publish
.
Returns a reference to this object so that method calls can be chained together.
actionNames
- The action you want to allow for the specified principal(s).
Valid values: Any Amazon SNS action name, for example
Publish
.
public AddPermissionRequest withActionNames(java.util.Collection<java.lang.String> actionNames)
The action you want to allow for the specified principal(s).
Valid values: Any Amazon SNS action name, for example
Publish
.
Returns a reference to this object so that method calls can be chained together.
actionNames
- The action you want to allow for the specified principal(s).
Valid values: Any Amazon SNS action name, for example
Publish
.
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.