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 User Guide for more information on forming bucket polices.
AmazonS3#setBucketPolicy(SetBucketPolicyRequest)
,
Serialized FormNOOP
Constructor and Description |
---|
SetBucketPolicyRequest() |
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.
|
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 |
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 |
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()
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.Copyright © 2024. All rights reserved.