Java 类com.amazonaws.services.s3.model.BucketPolicy 实例源码

项目:aws-doc-sdk-examples    文件:GetBucketPolicy.java   
public static void main(String[] args)
{
   final String USAGE = "\n" +
      "Usage:\n" +
      "    GetBucketPolicy <bucket>\n\n" +
      "Where:\n" +
      "    bucket - the bucket to get the policy from.\n\n" +
      "Example:\n" +
      "    GetBucketPolicy testbucket\n\n";

   if (args.length < 1) {
      System.out.println(USAGE);
      System.exit(1);
   }

   String bucket_name = args[0];
   String policy_text = null;

   System.out.format("Getting policy for bucket: \"%s\"\n\n", bucket_name);

   final AmazonS3 s3 = AmazonS3ClientBuilder.defaultClient();
   try {
      BucketPolicy bucket_policy = s3.getBucketPolicy(bucket_name);
      policy_text = bucket_policy.getPolicyText();
   } catch (AmazonServiceException e) {
      System.err.println(e.getErrorMessage());
      System.exit(1);
   }

   if (policy_text == null) {
      System.out.println("The specified bucket has no bucket policy.");
   } else {
      System.out.println("Returned policy:");
      System.out.println("----");
      System.out.println(policy_text);
      System.out.println("----\n");
   }

   System.out.println("Done!");
}
项目:elasticsearch_my    文件:AmazonS3Wrapper.java   
@Override
public BucketPolicy getBucketPolicy(String bucketName) throws AmazonClientException, AmazonServiceException {
    return delegate.getBucketPolicy(bucketName);
}
项目:elasticsearch_my    文件:AmazonS3Wrapper.java   
@Override
public BucketPolicy getBucketPolicy(GetBucketPolicyRequest getBucketPolicyRequest) throws AmazonClientException, AmazonServiceException {
    return delegate.getBucketPolicy(getBucketPolicyRequest);
}
项目:syndesis    文件:AmazonS3ClientMock.java   
@Override
public BucketPolicy getBucketPolicy(String bucketName) throws AmazonClientException, AmazonServiceException {
    throw new UnsupportedOperationException();
}
项目:syndesis    文件:AmazonS3ClientMock.java   
@Override
public BucketPolicy getBucketPolicy(String bucketName) throws AmazonClientException, AmazonServiceException {
    throw new UnsupportedOperationException();
}
项目:syndesis    文件:AmazonS3ClientMock.java   
@Override
public BucketPolicy getBucketPolicy(String bucketName) throws AmazonClientException, AmazonServiceException {
    throw new UnsupportedOperationException();
}
项目:connectors    文件:AmazonS3ClientMock.java   
@Override
public BucketPolicy getBucketPolicy(String bucketName) throws AmazonClientException, AmazonServiceException {
    throw new UnsupportedOperationException();
}
项目:connectors    文件:AmazonS3ClientMock.java   
@Override
public BucketPolicy getBucketPolicy(String bucketName) throws AmazonClientException, AmazonServiceException {
    throw new UnsupportedOperationException();
}
项目:connectors    文件:AmazonS3ClientMock.java   
@Override
public BucketPolicy getBucketPolicy(String bucketName) throws AmazonClientException, AmazonServiceException {
    throw new UnsupportedOperationException();
}
项目:S3Decorators    文件:S3Decorator.java   
@Override
public BucketPolicy getBucketPolicy(String bucketName) throws SdkClientException, AmazonServiceException {
  return call(() -> getDelegate().getBucketPolicy(bucketName));
}
项目:S3Decorators    文件:S3Decorator.java   
@Override
public BucketPolicy getBucketPolicy(GetBucketPolicyRequest getBucketPolicyRequest) throws SdkClientException, AmazonServiceException {
  return call(() -> getDelegate().getBucketPolicy(getBucketPolicyRequest));
}
项目:Camel    文件:AmazonS3ClientMock.java   
@Override
public BucketPolicy getBucketPolicy(String bucketName) throws AmazonClientException, AmazonServiceException {
    throw new UnsupportedOperationException();
}
项目:presto    文件:MockAmazonS3.java   
@Override
public BucketPolicy getBucketPolicy(String bucketName)
        throws AmazonClientException
{
    return null;
}
项目:presto    文件:MockAmazonS3.java   
@Override
public BucketPolicy getBucketPolicy(GetBucketPolicyRequest getBucketPolicyRequest)
        throws AmazonClientException
{
    return null;
}
项目:Scribengin    文件:AmazonS3Mock.java   
@Override
public BucketPolicy getBucketPolicy(String bucketName) throws AmazonClientException, AmazonServiceException {
  // TODO Auto-generated method stub
  return null;
}
项目:Scribengin    文件:AmazonS3Mock.java   
@Override
public BucketPolicy getBucketPolicy(GetBucketPolicyRequest getBucketPolicyRequest) throws AmazonClientException,
    AmazonServiceException {
  // TODO Auto-generated method stub
  return null;
}