Class CfnApplicationStatusCheck

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, IApplicationStatusCheckRef, IEnvironmentAware, ITaggableV2, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.139.0 (build 26a6b54)", date="2026-09-10T17:51:43.419Z") @Stability(Stable) public class CfnApplicationStatusCheck extends CfnResource implements IInspectable, IApplicationStatusCheckRef, ITaggableV2
An application status check monitors an HTTP or HTTPS endpoint on Amazon EC2 instances and reports application-layer health.

Configure a health check with a Protocol, Port, and Path, and then associate it with EC2 instances via AWS::EC2::ApplicationStatusCheckInstanceAssociation or AWS::EC2::ApplicationStatusCheckTagAssociation.

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.*;
 CfnApplicationStatusCheck cfnApplicationStatusCheck = CfnApplicationStatusCheck.Builder.create(this, "MyCfnApplicationStatusCheck")
         .port(123)
         .protocol("protocol")
         // the properties below are optional
         .aggregation("aggregation")
         .deviceIndex(123)
         .failureThreshold(123)
         .healthCheckPaths(List.of(HealthCheckPathProperty.builder()
                 .destinations(List.of(HealthCheckPathDestinationProperty.builder()
                         .securityGroupId("securityGroupId")
                         .subnetId("subnetId")
                         .build()))
                 .source(HealthCheckPathSourceProperty.builder()
                         .securityGroupId("securityGroupId")
                         .subnetId("subnetId")
                         .build())
                 .build()))
         .initializationGracePeriodSeconds(123)
         .interval(123)
         .ipScope("ipScope")
         .ipVersion("ipVersion")
         .path("path")
         .statusCodeMatcher("statusCodeMatcher")
         .successThreshold(123)
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .timeout(123)
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnApplicationStatusCheck

      protected CfnApplicationStatusCheck(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnApplicationStatusCheck

      protected CfnApplicationStatusCheck(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnApplicationStatusCheck

      @Stability(Stable) public CfnApplicationStatusCheck(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnApplicationStatusCheckProps props)
      Create a new AWS::EC2::ApplicationStatusCheck.

      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • arnForApplicationStatusCheck

      @Stability(Stable) @NotNull public static String arnForApplicationStatusCheck(@NotNull IApplicationStatusCheckRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnApplicationStatusCheck

      @Stability(Stable) @NotNull public static Boolean isCfnApplicationStatusCheck(@NotNull Object x)
      Checks whether the given object is a CfnApplicationStatusCheck.

      Parameters:
      x - This parameter is required.
    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getApplicationStatusCheckRef

      @Stability(Stable) @NotNull public ApplicationStatusCheckReference getApplicationStatusCheckRef()
      A reference to a ApplicationStatusCheck resource.
      Specified by:
      getApplicationStatusCheckRef in interface IApplicationStatusCheckRef
    • getAttrApplicationStatusCheckId

      @Stability(Stable) @NotNull public String getAttrApplicationStatusCheckId()
      The unique identifier of the application status check.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The Amazon Resource Name (ARN) of the application status check.
    • getAttrCreationTime

      @Stability(Stable) @NotNull public String getAttrCreationTime()
      When the application status check was created (ISO 8601).
    • getCdkTagManager

      @Stability(Stable) @NotNull public TagManager getCdkTagManager()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getCdkTagManager in interface ITaggableV2
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getCfnPropertyNames

      @Stability(Stable) @NotNull protected Map<String,String> getCfnPropertyNames()
      Overrides:
      getCfnPropertyNames in class CfnResource
    • getPort

      @Stability(Stable) @NotNull public Number getPort()
      The port used for the health check.
    • setPort

      @Stability(Stable) public void setPort(@NotNull Number value)
      The port used for the health check.
    • getProtocol

      @Stability(Stable) @NotNull public String getProtocol()
      The network protocol used for the health check.
    • setProtocol

      @Stability(Stable) public void setProtocol(@NotNull String value)
      The network protocol used for the health check.
    • getAggregation

      @Stability(Stable) @Nullable public String getAggregation()
      Whether this check is included in the rolled-up application status.
    • setAggregation

      @Stability(Stable) public void setAggregation(@Nullable String value)
      Whether this check is included in the rolled-up application status.
    • getDeviceIndex

      @Stability(Stable) @Nullable public Number getDeviceIndex()
      The network interface device index used for the health check.
    • setDeviceIndex

      @Stability(Stable) public void setDeviceIndex(@Nullable Number value)
      The network interface device index used for the health check.
    • getFailureThreshold

      @Stability(Stable) @Nullable public Number getFailureThreshold()
      The number of consecutive failed probes required to mark the instance unhealthy.
    • setFailureThreshold

      @Stability(Stable) public void setFailureThreshold(@Nullable Number value)
      The number of consecutive failed probes required to mark the instance unhealthy.
    • getHealthCheckPaths

      @Stability(Stable) @Nullable public Object getHealthCheckPaths()
      The source/destination network paths used for the health check.

      Returns union: either IResolvable or Listinvalid input: '<'either IResolvable or CfnApplicationStatusCheck.HealthCheckPathProperty>

    • setHealthCheckPaths

      @Stability(Stable) public void setHealthCheckPaths(@Nullable IResolvable value)
      The source/destination network paths used for the health check.
    • setHealthCheckPaths

      @Stability(Stable) public void setHealthCheckPaths(@Nullable List<Object> value)
      The source/destination network paths used for the health check.
    • getInitializationGracePeriodSeconds

      @Stability(Stable) @Nullable public Number getInitializationGracePeriodSeconds()
      Seconds to wait after instance launch before beginning health checks.
    • setInitializationGracePeriodSeconds

      @Stability(Stable) public void setInitializationGracePeriodSeconds(@Nullable Number value)
      Seconds to wait after instance launch before beginning health checks.
    • getInterval

      @Stability(Stable) @Nullable public Number getInterval()
      The interval, in seconds, between health check probes.
    • setInterval

      @Stability(Stable) public void setInterval(@Nullable Number value)
      The interval, in seconds, between health check probes.
    • getIpScope

      @Stability(Stable) @Nullable public String getIpScope()
      The IP scope used for the health check.
    • setIpScope

      @Stability(Stable) public void setIpScope(@Nullable String value)
      The IP scope used for the health check.
    • getIpVersion

      @Stability(Stable) @Nullable public String getIpVersion()
      The IP version used for the health check.
    • setIpVersion

      @Stability(Stable) public void setIpVersion(@Nullable String value)
      The IP version used for the health check.
    • getPath

      @Stability(Stable) @Nullable public String getPath()
      The HTTP path used for the health check.
    • setPath

      @Stability(Stable) public void setPath(@Nullable String value)
      The HTTP path used for the health check.
    • getStatusCodeMatcher

      @Stability(Stable) @Nullable public String getStatusCodeMatcher()
      The HTTP status codes considered successful (e.g., "200-299").
    • setStatusCodeMatcher

      @Stability(Stable) public void setStatusCodeMatcher(@Nullable String value)
      The HTTP status codes considered successful (e.g., "200-299").
    • getSuccessThreshold

      @Stability(Stable) @Nullable public Number getSuccessThreshold()
      The number of consecutive successful probes required to mark the instance healthy.
    • setSuccessThreshold

      @Stability(Stable) public void setSuccessThreshold(@Nullable Number value)
      The number of consecutive successful probes required to mark the instance healthy.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      Tags to apply to the application status check.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      Tags to apply to the application status check.
    • getTimeout

      @Stability(Stable) @Nullable public Number getTimeout()
      The timeout, in seconds, for each health check probe.
    • setTimeout

      @Stability(Stable) public void setTimeout(@Nullable Number value)
      The timeout, in seconds, for each health check probe.