View a markdown version of this page

CreateApplicationStatusCheck - Amazon Elastic Compute Cloud
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

CreateApplicationStatusCheck

Creates an application status check for monitoring the health of applications running on your instances. You can configure the protocol, port, path, and thresholds for the health check. The following rules apply:

  • You can create a maximum of 50 application status checks per account.

  • Health checks do not start until you associate the check with instances or tags using AssociateApplicationStatusCheck.

  • The Timeout value must be less than the Interval value.

  • The Path must start with a forward slash (/). Default: /.

  • If you do not specify Aggregation, it defaults to included, which means the check contributes to the instance-level application status.

  • Default values: Interval is 60 seconds, Timeout is 6 seconds, FailureThreshold is 2, SuccessThreshold is 5, StatusCodeMatcher is 200, InitializationGracePeriodSeconds is 300 seconds.

  • You can tag the application status check during creation. For more information, see Tag your Amazon EC2 resources.

Request Parameters

The following parameters are for this specific action. For more information about required and optional parameters that are common to all actions, see Common Query Parameters.

Aggregation

The aggregation setting for the application status check. When set to included, the result of this check contributes to the instance-level application status reported by DescribeApplicationStatus. When set to excluded, the check runs independently and does not affect the instance-level status. Valid values: included | excluded.

Type: String

Valid Values: included | excluded

Required: No

ClientToken

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency.

Type: String

Required: No

DeviceIndex

The index of the network device to use for the health check.

Type: Integer

Required: No

DryRun

Checks whether you have the required permissions for the operation, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

Type: Boolean

Required: No

FailureThreshold

The number of consecutive failed health checks before the application status is considered impaired.

Type: Integer

Required: No

HealthCheckPath.N

The health check paths to use for the application status check. Health check paths define the network path from a source subnet to one or more destination subnets for cross-Availability Zone or Availability Zone to Local Zone health checking. If omitted, health checks are performed in the same subnet as the instance.

Type: Array of HealthCheckPathRequestObject objects

Required: No

InitializationGracePeriodSeconds

The number of seconds to wait before starting health checks after an instance is launched. Valid values: 1 to 600.

Type: Integer

Valid Range: Minimum value of -1. Maximum value of 600.

Required: No

Interval

The interval, in seconds, between health checks.

Type: Integer

Required: No

IpScope

The IP scope to use for the health check. Valid values: private | public.

Type: String

Valid Values: private

Required: No

IpVersion

The IP version to use for the health check. Valid values: ipv4.

Type: String

Valid Values: ipv4 | ipv6

Required: No

Path

The URL path to use for the health check HTTP request (for example, /health or /status).

Type: String

Required: No

Port

The port to use for the health check. Valid values: 1 to 65535.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 65535.

Required: Yes

Protocol

The protocol to use for the health check. Valid values: http | https.

Type: String

Valid Values: http | https

Required: Yes

StatusCodeMatcher

The HTTP status codes that indicate a successful health check response.

Type: String

Required: No

SuccessThreshold

The number of consecutive successful health checks before the application status is considered healthy.

Type: Integer

Required: No

TagSpecification.N

The tags to apply to the application status check.

Type: Array of TagSpecification objects

Required: No

Timeout

The amount of time, in seconds, to wait for a health check response before considering it failed.

Type: Integer

Required: No

Response Elements

The following elements are returned by the service.

applicationStatusCheck

Information about the application status check.

Type: ApplicationStatusCheckResponseObject object

requestId

The ID of the request.

Type: String

Errors

For information about the errors that are common to all actions, see Common Error Types.

Examples

To create an application status check

This example creates an application status check with HTTP protocol on port 80.

Sample Request

https://ec2.amazonaws.com/?Action=CreateApplicationStatusCheck &Protocol=http &Port=80 &AUTHPARAMS

Sample Response

<CreateApplicationStatusCheckResult xmlns="http://ec2.amazonaws.com/doc/2016-11-15/"> <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId> <applicationStatusCheck> <applicationStatusCheckId>asc-0123456789abcdef0</applicationStatusCheckId> <protocol>http</protocol> <port>80</port> </applicationStatusCheck> </CreateApplicationStatusCheckResult>

See Also

For more information about using this API in one of the language-specific Amazon SDKs, see the following: