@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class AddPolicyStatementRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
NOOP
Constructor and Description |
---|
AddPolicyStatementRequest() |
Modifier and Type | Method and Description |
---|---|
AddPolicyStatementRequest |
clone()
Creates a shallow clone of this object for all fields except the handler context.
|
boolean |
equals(Object obj) |
List<String> |
getAction()
The action that the principal can use on the resource.
|
String |
getArn()
The Amazon Resource Name (ARN) of the resource that will be accessed by the principal.
|
String |
getCondition()
A set of condition keys that you can use in key policies.
|
String |
getEffect()
Determines whether the permissions specified in the policy are to be allowed (
Allow ) or denied (
Deny ). |
List<String> |
getPrincipal()
The Amazon Web Services service or Amazon Web Services account that can access the resource defined as ARN.
|
String |
getStatementId()
A statement identifier that differentiates the statement from others in the same policy.
|
int |
hashCode() |
void |
setAction(Collection<String> action)
The action that the principal can use on the resource.
|
void |
setArn(String arn)
The Amazon Resource Name (ARN) of the resource that will be accessed by the principal.
|
void |
setCondition(String condition)
A set of condition keys that you can use in key policies.
|
void |
setEffect(String effect)
Determines whether the permissions specified in the policy are to be allowed (
Allow ) or denied (
Deny ). |
void |
setPrincipal(Collection<String> principal)
The Amazon Web Services service or Amazon Web Services account that can access the resource defined as ARN.
|
void |
setStatementId(String statementId)
A statement identifier that differentiates the statement from others in the same policy.
|
String |
toString()
Returns a string representation of this object.
|
AddPolicyStatementRequest |
withAction(Collection<String> action)
The action that the principal can use on the resource.
|
AddPolicyStatementRequest |
withAction(String... action)
The action that the principal can use on the resource.
|
AddPolicyStatementRequest |
withArn(String arn)
The Amazon Resource Name (ARN) of the resource that will be accessed by the principal.
|
AddPolicyStatementRequest |
withCondition(String condition)
A set of condition keys that you can use in key policies.
|
AddPolicyStatementRequest |
withEffect(StatementEffect effect)
Determines whether the permissions specified in the policy are to be allowed (
Allow ) or denied (
Deny ). |
AddPolicyStatementRequest |
withEffect(String effect)
Determines whether the permissions specified in the policy are to be allowed (
Allow ) or denied (
Deny ). |
AddPolicyStatementRequest |
withPrincipal(Collection<String> principal)
The Amazon Web Services service or Amazon Web Services account that can access the resource defined as ARN.
|
AddPolicyStatementRequest |
withPrincipal(String... principal)
The Amazon Web Services service or Amazon Web Services account that can access the resource defined as ARN.
|
AddPolicyStatementRequest |
withStatementId(String statementId)
A statement identifier that differentiates the statement from others in the same policy.
|
addHandlerContext, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getHandlerContext, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestCredentialsProvider, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
public List<String> getAction()
The action that the principal can use on the resource.
For example, entityresolution:GetIdMappingJob
, entityresolution:GetMatchingJob
.
For example, entityresolution:GetIdMappingJob
, entityresolution:GetMatchingJob
.
public void setAction(Collection<String> action)
The action that the principal can use on the resource.
For example, entityresolution:GetIdMappingJob
, entityresolution:GetMatchingJob
.
action
- The action that the principal can use on the resource.
For example, entityresolution:GetIdMappingJob
, entityresolution:GetMatchingJob
.
public AddPolicyStatementRequest withAction(String... action)
The action that the principal can use on the resource.
For example, entityresolution:GetIdMappingJob
, entityresolution:GetMatchingJob
.
NOTE: This method appends the values to the existing list (if any). Use
setAction(java.util.Collection)
or withAction(java.util.Collection)
if you want to override the
existing values.
action
- The action that the principal can use on the resource.
For example, entityresolution:GetIdMappingJob
, entityresolution:GetMatchingJob
.
public AddPolicyStatementRequest withAction(Collection<String> action)
The action that the principal can use on the resource.
For example, entityresolution:GetIdMappingJob
, entityresolution:GetMatchingJob
.
action
- The action that the principal can use on the resource.
For example, entityresolution:GetIdMappingJob
, entityresolution:GetMatchingJob
.
public void setArn(String arn)
The Amazon Resource Name (ARN) of the resource that will be accessed by the principal.
arn
- The Amazon Resource Name (ARN) of the resource that will be accessed by the principal.public String getArn()
The Amazon Resource Name (ARN) of the resource that will be accessed by the principal.
public AddPolicyStatementRequest withArn(String arn)
The Amazon Resource Name (ARN) of the resource that will be accessed by the principal.
arn
- The Amazon Resource Name (ARN) of the resource that will be accessed by the principal.public void setCondition(String condition)
A set of condition keys that you can use in key policies.
condition
- A set of condition keys that you can use in key policies.public String getCondition()
A set of condition keys that you can use in key policies.
public AddPolicyStatementRequest withCondition(String condition)
A set of condition keys that you can use in key policies.
condition
- A set of condition keys that you can use in key policies.public void setEffect(String effect)
Determines whether the permissions specified in the policy are to be allowed (Allow
) or denied (
Deny
).
If you set the value of the effect
parameter to Deny
for the
AddPolicyStatement
operation, you must also set the value of the effect
parameter in
the policy
to Deny
for the PutPolicy
operation.
effect
- Determines whether the permissions specified in the policy are to be allowed (Allow
) or
denied (Deny
).
If you set the value of the effect
parameter to Deny
for the
AddPolicyStatement
operation, you must also set the value of the effect
parameter in the policy
to Deny
for the PutPolicy
operation.
StatementEffect
public String getEffect()
Determines whether the permissions specified in the policy are to be allowed (Allow
) or denied (
Deny
).
If you set the value of the effect
parameter to Deny
for the
AddPolicyStatement
operation, you must also set the value of the effect
parameter in
the policy
to Deny
for the PutPolicy
operation.
Allow
) or
denied (Deny
).
If you set the value of the effect
parameter to Deny
for the
AddPolicyStatement
operation, you must also set the value of the effect
parameter in the policy
to Deny
for the PutPolicy
operation.
StatementEffect
public AddPolicyStatementRequest withEffect(String effect)
Determines whether the permissions specified in the policy are to be allowed (Allow
) or denied (
Deny
).
If you set the value of the effect
parameter to Deny
for the
AddPolicyStatement
operation, you must also set the value of the effect
parameter in
the policy
to Deny
for the PutPolicy
operation.
effect
- Determines whether the permissions specified in the policy are to be allowed (Allow
) or
denied (Deny
).
If you set the value of the effect
parameter to Deny
for the
AddPolicyStatement
operation, you must also set the value of the effect
parameter in the policy
to Deny
for the PutPolicy
operation.
StatementEffect
public AddPolicyStatementRequest withEffect(StatementEffect effect)
Determines whether the permissions specified in the policy are to be allowed (Allow
) or denied (
Deny
).
If you set the value of the effect
parameter to Deny
for the
AddPolicyStatement
operation, you must also set the value of the effect
parameter in
the policy
to Deny
for the PutPolicy
operation.
effect
- Determines whether the permissions specified in the policy are to be allowed (Allow
) or
denied (Deny
).
If you set the value of the effect
parameter to Deny
for the
AddPolicyStatement
operation, you must also set the value of the effect
parameter in the policy
to Deny
for the PutPolicy
operation.
StatementEffect
public List<String> getPrincipal()
The Amazon Web Services service or Amazon Web Services account that can access the resource defined as ARN.
public void setPrincipal(Collection<String> principal)
The Amazon Web Services service or Amazon Web Services account that can access the resource defined as ARN.
principal
- The Amazon Web Services service or Amazon Web Services account that can access the resource defined as
ARN.public AddPolicyStatementRequest withPrincipal(String... principal)
The Amazon Web Services service or Amazon Web Services account that can access the resource defined as ARN.
NOTE: This method appends the values to the existing list (if any). Use
setPrincipal(java.util.Collection)
or withPrincipal(java.util.Collection)
if you want to
override the existing values.
principal
- The Amazon Web Services service or Amazon Web Services account that can access the resource defined as
ARN.public AddPolicyStatementRequest withPrincipal(Collection<String> principal)
The Amazon Web Services service or Amazon Web Services account that can access the resource defined as ARN.
principal
- The Amazon Web Services service or Amazon Web Services account that can access the resource defined as
ARN.public void setStatementId(String statementId)
A statement identifier that differentiates the statement from others in the same policy.
statementId
- A statement identifier that differentiates the statement from others in the same policy.public String getStatementId()
A statement identifier that differentiates the statement from others in the same policy.
public AddPolicyStatementRequest withStatementId(String statementId)
A statement identifier that differentiates the statement from others in the same policy.
statementId
- A statement identifier that differentiates the statement from others in the same policy.public String toString()
toString
in class Object
Object.toString()
public AddPolicyStatementRequest clone()
AmazonWebServiceRequest
clone
in class AmazonWebServiceRequest
Object.clone()