software.amazon.awscdk.services.elasticloadbalancingv2.targets.InstanceTarget Maven / Gradle / Ivy
Show all versions of elasticloadbalancingv2-targets Show documentation
package software.amazon.awscdk.services.elasticloadbalancingv2.targets;
/**
* 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.ec2.*;
* import software.amazon.awscdk.services.elasticloadbalancingv2.targets.*;
* Instance instance;
* InstanceTarget instanceTarget = new InstanceTarget(instance, 123);
*
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.73.0 (build 6faeda3)", date = "2023-01-25T18:29:12.774Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.elasticloadbalancingv2.targets.$Module.class, fqn = "@aws-cdk/aws-elasticloadbalancingv2-targets.InstanceTarget")
public class InstanceTarget extends software.amazon.awscdk.services.elasticloadbalancingv2.targets.InstanceIdTarget {
protected InstanceTarget(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected InstanceTarget(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* Create a new Instance target.
*
* @param instance Instance to register to. This parameter is required.
* @param port Override the default port for the target group.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public InstanceTarget(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.Instance instance, final @org.jetbrains.annotations.Nullable java.lang.Number port) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(instance, "instance is required"), port });
}
/**
* Create a new Instance target.
*
* @param instance Instance to register to. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public InstanceTarget(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.Instance instance) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(instance, "instance is required") });
}
}