Example usage for com.amazonaws.services.identitymanagement.model PutGroupPolicyRequest setGroupName

List of usage examples for com.amazonaws.services.identitymanagement.model PutGroupPolicyRequest setGroupName

Introduction

In this page you can find the example usage for com.amazonaws.services.identitymanagement.model PutGroupPolicyRequest setGroupName.

Prototype


public void setGroupName(String groupName) 

Source Link

Document

The name of the group to associate the policy with.

Usage

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);
    request.setPolicyName(policyName);/*from w  w w  .  j  a v a 2  s.  c  o m*/
    request.setPolicyDocument(bucketGroupPolicy.policyDocumentForBucket(bucketName));
    iam.putGroupPolicy(request);
}