Class IpTarget
- All Implemented Interfaces:
IApplicationLoadBalancerTarget
,INetworkLoadBalancerTarget
,software.amazon.jsii.JsiiSerializable
Specify IP addresses from the subnets of the virtual private cloud (VPC) for the target group, the RFC 1918 range (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16), and the RFC 6598 range (100.64.0.0/10). You can't specify publicly routable IP addresses.
If you register a target of this type, you are responsible for making sure the load balancer's security group can send packets to the IP address.
Example:
// 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.targets.*; IpTarget ipTarget = new IpTarget("ipAddress", 123, "availabilityZone");
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.elasticloadbalancingv2.IApplicationLoadBalancerTarget
IApplicationLoadBalancerTarget.Jsii$Default, IApplicationLoadBalancerTarget.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.elasticloadbalancingv2.INetworkLoadBalancerTarget
INetworkLoadBalancerTarget.Jsii$Default, INetworkLoadBalancerTarget.Jsii$Proxy
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionattachToApplicationTargetGroup
(IApplicationTargetGroup targetGroup) Register this instance target with a load balancer.attachToNetworkTargetGroup
(INetworkTargetGroup targetGroup) Register this instance target with a load balancer.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
IpTarget
protected IpTarget(software.amazon.jsii.JsiiObjectRef objRef) -
IpTarget
protected IpTarget(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
IpTarget
@Stability(Stable) public IpTarget(@NotNull String ipAddress, @Nullable Number port, @Nullable String availabilityZone) Create a new IPAddress target.The availabilityZone parameter determines whether the target receives traffic from the load balancer nodes in the specified Availability Zone or from all enabled Availability Zones for the load balancer.
This parameter is not supported if the target type of the target group is instance. If the IP address is in a subnet of the VPC for the target group, the Availability Zone is automatically detected and this parameter is optional. If the IP address is outside the VPC, this parameter is required.
With an Application Load Balancer, if the IP address is outside the VPC for the target group, the only supported value is all.
Default is automatic.
- Parameters:
ipAddress
- The IP Address to load balance to. This parameter is required.port
- Override the group's default port.availabilityZone
- Availability zone to send traffic from.
-
IpTarget
Create a new IPAddress target.The availabilityZone parameter determines whether the target receives traffic from the load balancer nodes in the specified Availability Zone or from all enabled Availability Zones for the load balancer.
This parameter is not supported if the target type of the target group is instance. If the IP address is in a subnet of the VPC for the target group, the Availability Zone is automatically detected and this parameter is optional. If the IP address is outside the VPC, this parameter is required.
With an Application Load Balancer, if the IP address is outside the VPC for the target group, the only supported value is all.
Default is automatic.
- Parameters:
ipAddress
- The IP Address to load balance to. This parameter is required.port
- Override the group's default port.
-
IpTarget
Create a new IPAddress target.The availabilityZone parameter determines whether the target receives traffic from the load balancer nodes in the specified Availability Zone or from all enabled Availability Zones for the load balancer.
This parameter is not supported if the target type of the target group is instance. If the IP address is in a subnet of the VPC for the target group, the Availability Zone is automatically detected and this parameter is optional. If the IP address is outside the VPC, this parameter is required.
With an Application Load Balancer, if the IP address is outside the VPC for the target group, the only supported value is all.
Default is automatic.
- Parameters:
ipAddress
- The IP Address to load balance to. This parameter is required.
-
-
Method Details
-
attachToApplicationTargetGroup
@Stability(Stable) @NotNull public LoadBalancerTargetProps attachToApplicationTargetGroup(@NotNull IApplicationTargetGroup targetGroup) Register this instance target with a load balancer.Don't call this, it is called automatically when you add the target to a load balancer.
- Specified by:
attachToApplicationTargetGroup
in interfaceIApplicationLoadBalancerTarget
- Parameters:
targetGroup
- This parameter is required.
-
attachToNetworkTargetGroup
@Stability(Stable) @NotNull public LoadBalancerTargetProps attachToNetworkTargetGroup(@NotNull INetworkTargetGroup targetGroup) Register this instance target with a load balancer.Don't call this, it is called automatically when you add the target to a load balancer.
- Specified by:
attachToNetworkTargetGroup
in interfaceINetworkLoadBalancerTarget
- Parameters:
targetGroup
- This parameter is required.
-