List of usage examples for com.amazonaws.services.identitymanagement.model PutGroupPolicyRequest setPolicyDocument
public void setPolicyDocument(String policyDocument)
The policy document.
From source file:org.cloudfoundry.community.servicebroker.s3.service.Iam.java
License:Apache License
public void applyGroupPolicy(String groupName, String policyName, String bucketName) { // https://forums.aws.amazon.com/message.jspa?messageID=356160 PutGroupPolicyRequest request = new PutGroupPolicyRequest(); logger.info("Putting policy document on group '{}': {}", groupName, bucketGroupPolicy.policyDocumentForBucket(bucketName)); request.setGroupName(groupName);//from ww w . j a va2 s . c o m request.setPolicyName(policyName); request.setPolicyDocument(bucketGroupPolicy.policyDocumentForBucket(bucketName)); iam.putGroupPolicy(request); }