com.amazonaws.services.s3.model.CanonicalGrantee Java Examples
The following examples show how to use
com.amazonaws.services.s3.model.CanonicalGrantee.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AbstractS3Processor.java From localization_nifi with Apache License 2.0 | 5 votes |
protected Grantee createGrantee(final String value) { if (StringUtils.isEmpty(value)) { return null; } if (value.contains("@")) { return new EmailAddressGrantee(value); } else { return new CanonicalGrantee(value); } }
Example #2
Source File: AbstractS3Processor.java From nifi with Apache License 2.0 | 5 votes |
protected Grantee createGrantee(final String value) { if (StringUtils.isEmpty(value)) { return null; } if (value.contains("@")) { return new EmailAddressGrantee(value); } else { return new CanonicalGrantee(value); } }
Example #3
Source File: TestS3FileSystem.java From dremio-oss with Apache License 2.0 | 4 votes |
private AccessControlList getAcl(final AmazonS3 s3Client) { ArrayList<Grant> grantCollection = new ArrayList<>(); // Grant the account owner full control. Grant grant1 = new Grant(new CanonicalGrantee(s3Client.getS3AccountOwner().getId()), Permission.FullControl); grantCollection.add(grant1); // Save grants by replacing all current ACL grants with the two we just created. AccessControlList bucketAcl = new AccessControlList(); bucketAcl.grantAllPermissions(grantCollection.toArray(new Grant[0])); return bucketAcl; }