Example usage for com.amazonaws.services.ec2 AmazonEC2AsyncClient authorizeSecurityGroupIngress

List of usage examples for com.amazonaws.services.ec2 AmazonEC2AsyncClient authorizeSecurityGroupIngress

Introduction

In this page you can find the example usage for com.amazonaws.services.ec2 AmazonEC2AsyncClient authorizeSecurityGroupIngress.

Prototype

AuthorizeSecurityGroupIngressResult authorizeSecurityGroupIngress(
        AuthorizeSecurityGroupIngressRequest authorizeSecurityGroupIngressRequest);

Source Link

Document

Adds the specified ingress rules to a security group.

Usage

From source file:com.vmware.photon.controller.model.adapters.awsadapter.AWSUtils.java

License:Open Source License

public static void updateIngressRules(AmazonEC2AsyncClient client, String groupId, List<IpPermission> rules) {
    AuthorizeSecurityGroupIngressRequest req = new AuthorizeSecurityGroupIngressRequest().withGroupId(groupId)
            .withIpPermissions(rules);//from ww w. j a va  2s . c  o  m
    client.authorizeSecurityGroupIngress(req);
}