|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.amazonaws.AmazonWebServiceRequest
com.amazonaws.services.s3.model.SetBucketPolicyRequest
public class SetBucketPolicyRequest
Sets the policy associated with the specified bucket. Only the owner of the bucket can set a bucket policy. If a policy already exists for the specified bucket, the new policy replaces the existing policy.
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.
AmazonS3.setBucketPolicy(SetBucketPolicyRequest)
Constructor Summary | |
---|---|
SetBucketPolicyRequest(String bucketName,
String policyText)
Creates a new request object, ready to be executed to set an Amazon S3 bucket's policy. |
Method Summary | |
---|---|
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. |
Methods inherited from class com.amazonaws.AmazonWebServiceRequest |
---|
copyPrivateRequestParameters, getDelegationToken, getRequestClientOptions, getRequestCredentials, setDelegationToken, setRequestCredentials |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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.Method Detail |
---|
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.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |