Skip to content
v2.278.0

SourceIpConfigProperty Struct ​

Information about a source IP condition.

You can use this condition to route based on the IP address of the source that connects to the load balancer. If a client is behind a proxy, this is the IP address of the proxy not the IP address of the client.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_elasticloadbalancingv2 as elbv2 } from 'aws-cdk-lib';
const sourceIpConfigProperty: elbv2.CfnListenerRule.SourceIpConfigProperty = {
  ipAddressType: 'ipAddressType',
  values: ['values'],
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_elasticloadbalancingv2 as elbv2

source_ip_config_property = elbv2.CfnListenerRule.SourceIpConfigProperty(
    ip_address_type="ipAddressType",
    values=["values"]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.elasticloadbalancingv2.*;

SourceIpConfigProperty sourceIpConfigProperty = SourceIpConfigProperty.builder()
        .ipAddressType("ipAddressType")
        .values(List.of("values"))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ElasticLoadBalancingV2;

var sourceIpConfigProperty = new SourceIpConfigProperty {
    IpAddressType = "ipAddressType",
    Values = new [] { "values" }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

sourceIpConfigProperty := &SourceIpConfigProperty{
	IpAddressType: jsii.String("ipAddressType"),
	Values: []*string{
		jsii.String("values"),
	},
}

Properties ​

ipAddressTypeoptionalstringip_address_typeoptionalstripAddressTypeoptionalStringIpAddressTypeoptionalstringIpAddressTypeoptional*string #
valuesoptionalstring[]valuesoptionaltyping.List[str]valuesoptionalList<String>Valuesoptionalstring[]Valuesoptional*[]*string #
The source IP addresses, in CIDR format. You can use both IPv4 and IPv6 addresses. Wildcards are not supported.

If you specify multiple addresses, the condition is satisfied if the source IP address of the request matches one of the CIDR blocks. This condition is not satisfied by the addresses in the X-Forwarded-For header.