Skip to main content

application_status_checks

Creates, updates, deletes, gets or lists an application_status_checks resource.

Overview

Nameapplication_status_checks
TypeResource
Idaws.ec2.application_status_checks

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
aggregationstringThe aggregation setting for the application status check. When set to included, the result of this check contributes to the instance-level application status. When set to excluded, the check runs independently and does not affect the instance-level status.
application_status_check_idstringThe ID of the application status check.
creation_timestringThe date and time when the application status check was created.
deletion_timestringThe date and time when the application status check was deleted.
device_indexintegerThe index of the network device used for the health check. The value is greater than or equal to 0.
failure_thresholdintegerThe number of consecutive failed health checks before the application status is considered impaired. The value must be greater than 0.
health_check_pathsstringThe health check paths for the application status check.
initialization_grace_period_secondsintegerThe number of seconds to wait before starting health checks after an instance is launched. Valid values: 1 to 600.
intervalintegerThe interval, in seconds, between health checks. Valid value: 60.
ip_scopestringThe IP scope used for the health check.
ip_versionstringThe IP version used for the health check.
last_updated_atstringThe date and time when the application status check was last updated.
modify_timestringThe date and time when the application status check was last modified.
pathstringThe URL path used for the health check HTTP request.
portintegerThe port used for the health check.
protocolstringThe protocol used for the health check.
status_code_matcherstringThe comma-separated list of individual HTTP status codes or ranges that indicate a successful health check response.
success_thresholdintegerThe number of consecutive successful health checks before the application status is considered healthy. The value must be greater than 0.
tagsstringThe tags assigned to the application status check.
target_tag_associationsstringThe tags associated with the application status check. Instances with these tags are automatically monitored by this check.
timeoutintegerThe amount of time, in seconds, to wait for a health check response. Valid values: 1 to 30.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_application_status_checksselectregionApplicationStatusCheckId, Filter, MaxResults, NextToken, IncludeAll, DryRunDescribes one or more application status checks. Returns configuration details for your application status checks, including protocol, port, path, thresholds, and associations. The following rules apply: If you do not specify any application status check IDs, all checks in your account are returned. Use DescribeApplicationStatus to see the actual health status of instances.
create_application_status_checkinsertregionHealthCheckPath, Aggregation, Protocol, Port, Path, DeviceIndex, IpVersion, IpScope, Interval, Timeout, FailureThreshold, SuccessThreshold, StatusCodeMatcher, InitializationGracePeriodSeconds, TagSpecification, ClientToken, DryRunCreates 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 2, 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.
associate_application_status_checkupdateApplicationStatusCheckId, regionTargetTagAssociation, InstanceId, ClientToken, DryRunAssociates an application status check with instances or tags. Once you create an association, health monitoring automatically begins for the specified instances or for instances that match the specified tags. The following rules apply: You must specify either TargetTagAssociations or InstanceIds, but not both. Specifying both results in an InvalidParameterCombination error. The application status check must already exist and belong to your account. Tag keys must not be blank. Maximum 50 tag associations per application status check. Use DisassociateApplicationStatusCheck to remove associations. When you associate tags, the application status check automatically monitors all current and future instances that have the specified tags.
delete_application_status_checkdeleteApplicationStatusCheckId, regionClientToken, DryRunDeletes an application status check. The following rules apply: Deleting a check automatically removes all of its associations. Use DescribeApplicationStatusChecks to view existing checks before deleting.
disable_application_status_check_suppressionexecregionInstanceId, ClientToken, DryRunDisables suppression of application status checks for the specified instances. After suppression is disabled, health check results resume affecting the instance-level application status. You can specify a maximum of 100 instance IDs per request.
disassociate_application_status_checkexecApplicationStatusCheckId, regionTargetTagAssociation, InstanceId, ClientToken, DryRunDisassociates an application status check from instances or tags. After disassociation, health monitoring stops for the affected instances. The following rules apply: You must specify either TargetTagAssociations or InstanceIds, but not both. Specifying both results in an InvalidParameterCombination error. The application status check must already exist and belong to your account. Tag keys must not be blank.
enable_application_status_check_suppressionexecregionInstanceId, DurationSeconds, ClientToken, DryRunSuppresses application status checks for the specified instances. While suppressed, health checks continue to run but do not affect the instance-level application status. The following rules apply: Maximum 100 instance IDs per request. Use DisableApplicationStatusCheckSuppression to resume normal health check reporting. If you do not specify DurationSeconds, suppression continues indefinitely until you call DisableApplicationStatusCheckSuppression.
modify_application_status_checkexecApplicationStatusCheckId, regionAggregation, HealthCheckPath, Protocol, Port, Path, DeviceIndex, IpVersion, IpScope, Interval, Timeout, FailureThreshold, SuccessThreshold, StatusCodeMatcher, InitializationGracePeriodSeconds, ClientToken, DryRunModifies an existing application status check. You can update the protocol, port, path, thresholds, and other configuration settings. The following rules apply: The application status check must exist and belong to your account. Changes take effect on the next health check interval.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
ApplicationStatusCheckIdstringThe ID of the application status check to modify.
regionstringAWS region (default: us-east-1)
AggregationstringThe 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.
ApplicationStatusCheckIdarrayThe IDs of the application status checks to describe.
ClientTokenstringUnique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency.
DeviceIndexintegerThe index of the network device to use for the health check. The value must be greater than or equal to 0.
DryRunbooleanChecks 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.
DurationSecondsintegerThe duration, in seconds, for which to suppress application status checks. If omitted, the application status check is suppressed indefinitely until you call DisableApplicationStatusCheckSuppression.
FailureThresholdintegerThe number of consecutive failed health checks before the application status is considered impaired. The value must be greater than 0.
FilterarrayThe filters. aggregation – The aggregation setting. Valid values: included and excluded.
HealthCheckPatharrayThe health check paths to use for the application status check.
IncludeAllbooleanSpecifies whether to include recently deleted application status checks that remain available during the deletion grace period. If you omit this parameter or set it to false, the response includes only active checks.
InitializationGracePeriodSecondsintegerThe number of seconds to wait before starting health checks after an instance is launched. Valid values: 1 to 600.
InstanceIdarrayThe IDs of the instances for which to suppress application status checks.
IntervalintegerThe interval, in seconds, between health checks. Valid value: 60.
IpScopestringThe IP scope to use for the health check. Valid value: private.
IpVersionstringThe IP version to use for the health check. Valid values: ipv4 and ipv6.
MaxResultsintegerThe maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see Pagination.
NextTokenstringThe token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.
PathstringThe URL path to use for the health check HTTP request (for example, /health or /status).
PortintegerThe port to use for the health check. Valid values: 1 to 65535.
ProtocolstringThe protocol to use for the health check. Valid values: http | https.
StatusCodeMatcherstringThe HTTP status codes that indicate a successful health check response. Specify a comma-separated list of individual status codes or ranges, for example, 200,202,300-399. For a range, the first value must be less than the second value. Maximum length: 64 characters.
SuccessThresholdintegerThe number of consecutive successful health checks before the application status is considered healthy. The value must be greater than 0.
TagSpecificationarrayThe tags to apply to the application status check.
TargetTagAssociationarrayThe tags to disassociate from the application status check. Specify the same key-value pairs that were used during association.
TimeoutintegerThe amount of time, in seconds, to wait for a health check response before considering it failed. Valid values: 1 to 30. The value must be less than Interval.

SELECT examples

Describes one or more application status checks. Returns configuration details for your application status checks, including protocol, port, path, thresholds, and associations. The following rules apply: If you do not specify any application status check IDs, all checks in your account are returned. Use DescribeApplicationStatus to see the actual health status of instances.

SELECT
aggregation,
application_status_check_id,
creation_time,
deletion_time,
device_index,
failure_threshold,
health_check_paths,
initialization_grace_period_seconds,
interval,
ip_scope,
ip_version,
last_updated_at,
modify_time,
path,
port,
protocol,
status_code_matcher,
success_threshold,
tags,
target_tag_associations,
timeout
FROM aws.ec2.application_status_checks
WHERE region = '{{ region }}' -- required
AND ApplicationStatusCheckId = '{{ ApplicationStatusCheckId }}'
AND Filter = '{{ Filter }}'
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
AND IncludeAll = '{{ IncludeAll }}'
AND DryRun = '{{ DryRun }}'
;

INSERT examples

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 2, 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.

INSERT INTO aws.ec2.application_status_checks (
region,
HealthCheckPath,
Aggregation,
Protocol,
Port,
Path,
DeviceIndex,
IpVersion,
IpScope,
Interval,
Timeout,
FailureThreshold,
SuccessThreshold,
StatusCodeMatcher,
InitializationGracePeriodSeconds,
TagSpecification,
ClientToken,
DryRun
)
SELECT
'{{ region }}',
'{{ HealthCheckPath }}',
'{{ Aggregation }}',
'{{ Protocol }}',
'{{ Port }}',
'{{ Path }}',
'{{ DeviceIndex }}',
'{{ IpVersion }}',
'{{ IpScope }}',
'{{ Interval }}',
'{{ Timeout }}',
'{{ FailureThreshold }}',
'{{ SuccessThreshold }}',
'{{ StatusCodeMatcher }}',
'{{ InitializationGracePeriodSeconds }}',
'{{ TagSpecification }}',
'{{ ClientToken }}',
'{{ DryRun }}'
RETURNING
aggregation,
application_status_check_id,
creation_time,
deletion_time,
device_index,
failure_threshold,
health_check_paths,
initialization_grace_period_seconds,
interval,
ip_scope,
ip_version,
last_updated_at,
modify_time,
path,
port,
protocol,
status_code_matcher,
success_threshold,
tags,
target_tag_associations,
timeout
;

UPDATE examples

Associates an application status check with instances or tags. Once you create an association, health monitoring automatically begins for the specified instances or for instances that match the specified tags. The following rules apply: You must specify either TargetTagAssociations or InstanceIds, but not both. Specifying both results in an InvalidParameterCombination error. The application status check must already exist and belong to your account. Tag keys must not be blank. Maximum 50 tag associations per application status check. Use DisassociateApplicationStatusCheck to remove associations. When you associate tags, the application status check automatically monitors all current and future instances that have the specified tags.

UPDATE aws.ec2.application_status_checks
SET
-- No updatable properties
WHERE
ApplicationStatusCheckId = '{{ ApplicationStatusCheckId }}' --required
AND region = '{{ region }}' --required
AND TargetTagAssociation = '{{ TargetTagAssociation}}'
AND InstanceId = '{{ InstanceId}}'
AND ClientToken = '{{ ClientToken}}'
AND DryRun = {{ DryRun}}
RETURNING
successful_results,
unsuccessful_results;

DELETE examples

Deletes an application status check. The following rules apply: Deleting a check automatically removes all of its associations. Use DescribeApplicationStatusChecks to view existing checks before deleting.

DELETE FROM aws.ec2.application_status_checks
WHERE ApplicationStatusCheckId = '{{ ApplicationStatusCheckId }}' --required
AND region = '{{ region }}' --required
AND ClientToken = '{{ ClientToken }}'
AND DryRun = '{{ DryRun }}'
;

Lifecycle Methods

Disables suppression of application status checks for the specified instances. After suppression is disabled, health check results resume affecting the instance-level application status. You can specify a maximum of 100 instance IDs per request.

EXEC aws.ec2.application_status_checks.disable_application_status_check_suppression
@region='{{ region }}' --required,
@InstanceId='{{ InstanceId }}',
@ClientToken='{{ ClientToken }}',
@DryRun={{ DryRun }}
;