public static Condition NewCondition(IpAddressComparisonType type, string ipAddressRange) { return(new Condition(type.ToString(), "aws:SourceIp", ipAddressRange)); }
/// <summary> /// 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. When the condition evaluates to true (i.e. when the incoming /// source IP address is within the CIDR range or not) depends on the /// specified IpAddressComparisonType. /// </summary> /// <param name="type">The type of comparison to to perform.</paramparam> /// <param name="ipAddressRange">The CIDR IP range involved in the policy condition.</param> public static Condition NewCondition(IpAddressComparisonType type, string ipAddressRange) { return(new Condition(type.ToString(), SOURCE_IP_CONDITION_KEY, ipAddressRange)); }
/// <summary> /// 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. When the condition evaluates to true (i.e. when the incoming /// source IP address is within the CIDR range or not) depends on the /// specified IpAddressComparisonType. /// </summary> /// <param name="type">The type of comparison to to perform.</paramparam> /// <param name="ipAddressRange">The CIDR IP range involved in the policy condition.</param> public static Condition NewCondition(IpAddressComparisonType type, string ipAddressRange) { return new Condition(type.ToString(), SOURCE_IP_CONDITION_KEY, ipAddressRange); }