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
Timeoutvalue must be less than theIntervalvalue. -
The
Pathmust start with a forward slash (/). Default:/. -
If you do not specify
Aggregation, it defaults toincluded, which means the check contributes to the instance-level application status. -
Default values:
Intervalis 60 seconds,Timeoutis 6 seconds,FailureThresholdis 2,SuccessThresholdis 5,StatusCodeMatcheris200,InitializationGracePeriodSecondsis 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 byDescribeApplicationStatus. When set toexcluded, the check runs independently and does not affect the instance-level status. Valid values:included|excluded.Type: String
Valid Values:
included | excludedRequired: 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 isUnauthorizedOperation.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:
privateRequired: No
- IpVersion
-
The IP version to use for the health check. Valid values:
ipv4.Type: String
Valid Values:
ipv4 | ipv6Required: No
- Path
-
The URL path to use for the health check HTTP request (for example,
/healthor/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 | httpsRequired: 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 AWS SDKs, see the following: