public class SetBucketPolicyRequest extends AmazonWebServiceRequest implements java.io.Serializable
Bucket policies provide access control management at the bucket level for both the bucket resource and contained object resources. Only one policy can be specified per-bucket.
See the Amazon S3 developer guide for more information on forming bucket polices.
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
bucketName
The name of the Amazon S3 bucket whose policy is being set.
|
private java.lang.String |
policyText
The policy to apply to the specified bucket.
|
NOOP
Constructor and Description |
---|
SetBucketPolicyRequest(java.lang.String bucketName,
java.lang.String policyText)
Creates a new request object, ready to be executed to set an Amazon S3
bucket's policy.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getBucketName()
Returns the name of the Amazon S3 bucket whose policy is being set.
|
java.lang.String |
getPolicyText()
Returns the policy to apply to the specified bucket.
|
void |
setBucketName(java.lang.String bucketName)
Sets the name of the Amazon S3 bucket whose policy is being set.
|
void |
setPolicyText(java.lang.String policyText)
Sets the policy to apply to the specified bucket.
|
SetBucketPolicyRequest |
withBucketName(java.lang.String bucketName)
Sets the name of the Amazon S3 bucket whose policy is being set, and
returns the updated request object so that additional method calls can be
chained together.
|
SetBucketPolicyRequest |
withPolicyText(java.lang.String policyText)
Sets the policy to apply to the specified bucket, and returns the updated
request object so that additional method calls can be chained together.
|
clone, copyBaseTo, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
private java.lang.String bucketName
private java.lang.String policyText
public SetBucketPolicyRequest(java.lang.String bucketName, java.lang.String policyText)
bucketName
- The name of the Amazon S3 bucket whose policy is being set.policyText
- The policy to apply to the specified bucket.public java.lang.String getBucketName()
public void setBucketName(java.lang.String bucketName)
bucketName
- The name of the Amazon S3 bucket whose policy is being set.public SetBucketPolicyRequest withBucketName(java.lang.String bucketName)
bucketName
- The name of the Amazon S3 bucket whose policy is being set.public java.lang.String getPolicyText()
public void setPolicyText(java.lang.String policyText)
policyText
- The policy to apply to the specified bucket.public SetBucketPolicyRequest withPolicyText(java.lang.String policyText)
policyText
- The policy to apply to the specified bucket.