Class InstanceTarget
(deprecated) An EC2 instance that is the target for load balancing.
Inheritance
Namespace: Amazon.CDK.AWS.ElasticLoadBalancingV2
Assembly: Amazon.CDK.AWS.ElasticLoadBalancingV2.dll
Syntax (csharp)
public class InstanceTarget : DeputyBase, IApplicationLoadBalancerTarget, INetworkLoadBalancerTarget
Syntax (vb)
Public Class InstanceTarget
Inherits DeputyBase
Implements IApplicationLoadBalancerTarget, INetworkLoadBalancerTarget
Remarks
If you register a target of this type, you are responsible for making sure the load balancer's security group can connect to the instance.
Stability: Deprecated
Aws-cdk: /aws-elasticloadbalancingv2-targets package instead.
ExampleMetadata: fixture=_generated
Examples
// 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 instanceTarget = new InstanceTarget("instanceId", 123);
Synopsis
Constructors
InstanceTarget(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
InstanceTarget(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
InstanceTarget(String, Nullable<Double>) | (deprecated) Create a new Instance target. |
Methods
AttachToApplicationTargetGroup(IApplicationTargetGroup) | (deprecated) Register this instance target with a load balancer. |
AttachToNetworkTargetGroup(INetworkTargetGroup) | (deprecated) Register this instance target with a load balancer. |
Constructors
InstanceTarget(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected InstanceTarget(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
InstanceTarget(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected InstanceTarget(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
InstanceTarget(String, Nullable<Double>)
(deprecated) Create a new Instance target.
public InstanceTarget(string instanceId, Nullable<double> port = null)
Parameters
- instanceId System.String
Instance ID of the instance to register to.
- port System.Nullable<System.Double>
Override the default port for the target group.
Remarks
Stability: Deprecated
Methods
AttachToApplicationTargetGroup(IApplicationTargetGroup)
(deprecated) Register this instance target with a load balancer.
public virtual ILoadBalancerTargetProps AttachToApplicationTargetGroup(IApplicationTargetGroup targetGroup)
Parameters
- targetGroup IApplicationTargetGroup
Returns
Remarks
Don't call this, it is called automatically when you add the target to a load balancer.
Stability: Deprecated
AttachToNetworkTargetGroup(INetworkTargetGroup)
(deprecated) Register this instance target with a load balancer.
public virtual ILoadBalancerTargetProps AttachToNetworkTargetGroup(INetworkTargetGroup targetGroup)
Parameters
- targetGroup INetworkTargetGroup
Returns
Remarks
Don't call this, it is called automatically when you add the target to a load balancer.
Stability: Deprecated