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

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

Introduction

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

Prototype


public void setPolicyName(String policyName) 

Source Link

Document

The name of the policy document.

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