Example usage for com.amazonaws.auth.policy.conditions IpAddressCondition IpAddressCondition

List of usage examples for com.amazonaws.auth.policy.conditions IpAddressCondition IpAddressCondition

Introduction

In this page you can find the example usage for com.amazonaws.auth.policy.conditions IpAddressCondition IpAddressCondition.

Prototype

public IpAddressCondition(String ipAddressRange) 

Source Link

Document

Constructs a new access policy condition that compares the source IP address of the incoming request to an AWS service against the specified CIDR range.

Usage

From source file:org.apache.usergrid.apm.service.AWSUtil.java

License:Apache License

public static IpAddressCondition[] getIPAddressRangeWhiteList() {

    String[] ipWhiteList = DeploymentConfig.geDeploymentConfig().getIpAddressWhiteList();
    IpAddressCondition[] ipAddressConditions = null;

    if (ipWhiteList != null) {
        ipAddressConditions = new IpAddressCondition[ipWhiteList.length];
        for (int i = 0; i < ipWhiteList.length; i++) {
            ipAddressConditions[i] = new IpAddressCondition(ipWhiteList[i]);
        }/*  w  w  w .  j  av a2 s  .  com*/
    }
    return ipAddressConditions;

}