public class GetBucketPolicyRequest extends AmazonWebServiceRequest implements java.io.Serializable
Gets the policy for the specified bucket. Only the owner of the bucket can
retrieve the policy. If no policy has been set for the bucket, then an empty
result object with a null
policy text field will be returned.
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.
Constructor and Description |
---|
GetBucketPolicyRequest(java.lang.String bucketName)
Creates a new request object, ready to be executed to retrieve the bucket
policy of an Amazon S3 bucket.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getBucketName()
Returns the name of the Amazon S3 bucket whose policy is being retrieved.
|
void |
setBucketName(java.lang.String bucketName)
Sets the name of the Amazon S3 bucket whose policy is being retrieved.
|
GetBucketPolicyRequest |
withBucketName(java.lang.String bucketName)
Sets the name of the Amazon S3 bucket whose policy is being retrieved,
and returns the updated request object so that additional method calls
can be chained together.
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public GetBucketPolicyRequest(java.lang.String bucketName)
bucketName
- The name of the Amazon S3 bucket whose policy is being
retrieved.public java.lang.String getBucketName()
public void setBucketName(java.lang.String bucketName)
bucketName
- The name of the Amazon S3 bucket whose policy is being
retrieved.public GetBucketPolicyRequest withBucketName(java.lang.String bucketName)
bucketName
- The name of the Amazon S3 bucket whose policy is being
retrieved.Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.