public class SetBucketPolicyRequest extends AmazonWebServiceRequest implements 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.
NOOP
Constructor and Description |
---|
SetBucketPolicyRequest(String bucketName,
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 |
---|---|
String |
getBucketName()
Returns the name of the Amazon S3 bucket whose policy is being set.
|
Boolean |
getConfirmRemoveSelfBucketAccess() |
String |
getPolicyText()
Returns the policy to apply to the specified bucket.
|
void |
setBucketName(String bucketName)
Sets the name of the Amazon S3 bucket whose policy is being set.
|
void |
setConfirmRemoveSelfBucketAccess(Boolean confirmRemoveSelfBucketAccess)
Set this parameter to true to confirm that you want to remove your permissions to change this bucket policy in the future.
|
void |
setPolicyText(String policyText)
Sets the policy to apply to the specified bucket.
|
SetBucketPolicyRequest |
withBucketName(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 |
withConfirmRemoveSelfBucketAccess(Boolean confirmRemoveSelfBucketAccess)
Set this parameter to true to confirm that you want to remove your permissions to change this bucket policy in the future.
|
SetBucketPolicyRequest |
withPolicyText(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.
|
addHandlerContext, clone, copyBaseTo, 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 SetBucketPolicyRequest(String bucketName, 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 String getBucketName()
public void setBucketName(String bucketName)
bucketName
- The name of the Amazon S3 bucket whose policy is being set.public SetBucketPolicyRequest withBucketName(String bucketName)
bucketName
- The name of the Amazon S3 bucket whose policy is being set.public String getPolicyText()
public void setPolicyText(String policyText)
policyText
- The policy to apply to the specified bucket.public SetBucketPolicyRequest withPolicyText(String policyText)
policyText
- The policy to apply to the specified bucket.public Boolean getConfirmRemoveSelfBucketAccess()
public void setConfirmRemoveSelfBucketAccess(Boolean confirmRemoveSelfBucketAccess)
confirmRemoveSelfBucketAccess
- New value for confirmRemoveSelfBucketAccess.public SetBucketPolicyRequest withConfirmRemoveSelfBucketAccess(Boolean confirmRemoveSelfBucketAccess)
confirmRemoveSelfBucketAccess
- New value for confirmRemoveSelfBucketAccess.Copyright © 2020. All rights reserved.