application_status_checks
Creates, updates, deletes, gets or lists an application_status_checks resource.
Overview
| Name | application_status_checks |
| Type | Resource |
| Id | aws.ec2.application_status_checks |
Fields
The following fields are returned by SELECT queries:
- describe_application_status_checks
| Name | Datatype | Description |
|---|---|---|
aggregation | string | The 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_id | string | The ID of the application status check. |
creation_time | string | The date and time when the application status check was created. |
deletion_time | string | The date and time when the application status check was deleted. |
device_index | integer | The index of the network device used for the health check. The value is greater than or equal to 0. |
failure_threshold | integer | The number of consecutive failed health checks before the application status is considered impaired. The value must be greater than 0. |
health_check_paths | string | The health check paths for the application status check. |
initialization_grace_period_seconds | integer | The number of seconds to wait before starting health checks after an instance is launched. Valid values: 1 to 600. |
interval | integer | The interval, in seconds, between health checks. Valid value: 60. |
ip_scope | string | The IP scope used for the health check. |
ip_version | string | The IP version used for the health check. |
last_updated_at | string | The date and time when the application status check was last updated. |
modify_time | string | The date and time when the application status check was last modified. |
path | string | The URL path used for the health check HTTP request. |
port | integer | The port used for the health check. |
protocol | string | The protocol used for the health check. |
status_code_matcher | string | The comma-separated list of individual HTTP status codes or ranges that indicate a successful health check response. |
success_threshold | integer | The number of consecutive successful health checks before the application status is considered healthy. The value must be greater than 0. |
tags | string | The tags assigned to the application status check. |
target_tag_associations | string | The tags associated with the application status check. Instances with these tags are automatically monitored by this check. |
timeout | integer | The 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_application_status_checks | select | region | ApplicationStatusCheckId, Filter, MaxResults, NextToken, IncludeAll, DryRun | 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. |
create_application_status_check | insert | region | HealthCheckPath, Aggregation, Protocol, Port, Path, DeviceIndex, IpVersion, IpScope, Interval, Timeout, FailureThreshold, SuccessThreshold, StatusCodeMatcher, InitializationGracePeriodSeconds, TagSpecification, ClientToken, DryRun | 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. |
associate_application_status_check | update | ApplicationStatusCheckId, region | TargetTagAssociation, InstanceId, ClientToken, DryRun | 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. |
delete_application_status_check | delete | ApplicationStatusCheckId, region | ClientToken, DryRun | 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. |
disable_application_status_check_suppression | exec | region | InstanceId, ClientToken, DryRun | 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. |
disassociate_application_status_check | exec | ApplicationStatusCheckId, region | TargetTagAssociation, InstanceId, ClientToken, DryRun | Disassociates 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_suppression | exec | region | InstanceId, DurationSeconds, ClientToken, DryRun | Suppresses 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_check | exec | ApplicationStatusCheckId, region | Aggregation, HealthCheckPath, Protocol, Port, Path, DeviceIndex, IpVersion, IpScope, Interval, Timeout, FailureThreshold, SuccessThreshold, StatusCodeMatcher, InitializationGracePeriodSeconds, ClientToken, DryRun | Modifies 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.
| Name | Datatype | Description |
|---|---|---|
ApplicationStatusCheckId | string | The ID of the application status check to modify. |
region | string | AWS region (default: us-east-1) |
Aggregation | string | 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. |
ApplicationStatusCheckId | array | The IDs of the application status checks to describe. |
ClientToken | string | Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency. |
DeviceIndex | integer | The index of the network device to use for the health check. The value must be greater than or equal to 0. |
DryRun | boolean | 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. |
DurationSeconds | integer | The duration, in seconds, for which to suppress application status checks. If omitted, the application status check is suppressed indefinitely until you call DisableApplicationStatusCheckSuppression. |
FailureThreshold | integer | The number of consecutive failed health checks before the application status is considered impaired. The value must be greater than 0. |
Filter | array | The filters. aggregation – The aggregation setting. Valid values: included and excluded. |
HealthCheckPath | array | The health check paths to use for the application status check. |
IncludeAll | boolean | Specifies 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. |
InitializationGracePeriodSeconds | integer | The number of seconds to wait before starting health checks after an instance is launched. Valid values: 1 to 600. |
InstanceId | array | The IDs of the instances for which to suppress application status checks. |
Interval | integer | The interval, in seconds, between health checks. Valid value: 60. |
IpScope | string | The IP scope to use for the health check. Valid value: private. |
IpVersion | string | The IP version to use for the health check. Valid values: ipv4 and ipv6. |
MaxResults | integer | The 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. |
NextToken | string | The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request. |
Path | string | The URL path to use for the health check HTTP request (for example, /health or /status). |
Port | integer | The port to use for the health check. Valid values: 1 to 65535. |
Protocol | string | The protocol to use for the health check. Valid values: http | https. |
StatusCodeMatcher | string | The 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. |
SuccessThreshold | integer | The number of consecutive successful health checks before the application status is considered healthy. The value must be greater than 0. |
TagSpecification | array | The tags to apply to the application status check. |
TargetTagAssociation | array | The tags to disassociate from the application status check. Specify the same key-value pairs that were used during association. |
Timeout | integer | The 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
- describe_application_status_checks
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
- create_application_status_check
- Manifest
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
;
# Description fields are for documentation purposes
- name: application_status_checks
props:
- name: region
value: "{{ region }}"
description: Required parameter for the application_status_checks resource.
- name: HealthCheckPath
value: "{{ HealthCheckPath }}"
description: 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.
description: 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.
- name: Aggregation
value: "{{ Aggregation }}"
description: 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.
description: 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.
- name: Protocol
value: "{{ Protocol }}"
description: The protocol to use for the health check. Valid values: http | https.
description: The protocol to use for the health check. Valid values: http | https.
- name: Port
value: {{ Port }}
description: The port to use for the health check. Valid values: 1 to 65535.
description: The port to use for the health check. Valid values: 1 to 65535.
- name: Path
value: "{{ Path }}"
description: The URL path to use for the health check HTTP request (for example, /health or /status).
description: The URL path to use for the health check HTTP request (for example, /health or /status).
- name: DeviceIndex
value: {{ DeviceIndex }}
description: The index of the network device to use for the health check. The value must be greater than or equal to 0.
description: The index of the network device to use for the health check. The value must be greater than or equal to 0.
- name: IpVersion
value: "{{ IpVersion }}"
description: The IP version to use for the health check. Valid values: ipv4 and ipv6.
description: The IP version to use for the health check. Valid values: ipv4 and ipv6.
- name: IpScope
value: "{{ IpScope }}"
description: The IP scope to use for the health check. Valid value: private.
description: The IP scope to use for the health check. Valid value: private.
- name: Interval
value: {{ Interval }}
description: The interval, in seconds, between health checks. Valid value: 60.
description: The interval, in seconds, between health checks. Valid value: 60.
- name: Timeout
value: {{ Timeout }}
description: The 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.
description: The 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.
- name: FailureThreshold
value: {{ FailureThreshold }}
description: The number of consecutive failed health checks before the application status is considered impaired. The value must be greater than 0.
description: The number of consecutive failed health checks before the application status is considered impaired. The value must be greater than 0.
- name: SuccessThreshold
value: {{ SuccessThreshold }}
description: The number of consecutive successful health checks before the application status is considered healthy. The value must be greater than 0.
description: The number of consecutive successful health checks before the application status is considered healthy. The value must be greater than 0.
- name: StatusCodeMatcher
value: "{{ StatusCodeMatcher }}"
description: The 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. Default: 200.
description: The 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. Default: 200.
- name: InitializationGracePeriodSeconds
value: {{ InitializationGracePeriodSeconds }}
description: The number of seconds to wait before starting health checks after an instance is launched. Valid values: 1 to 600.
description: The number of seconds to wait before starting health checks after an instance is launched. Valid values: 1 to 600.
- name: TagSpecification
value: "{{ TagSpecification }}"
description: The tags to apply to the application status check.
description: The tags to apply to the application status check.
- name: ClientToken
value: "{{ ClientToken }}"
description: Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency.
description: Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency.
- name: DryRun
value: {{ DryRun }}
description: 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.
description: 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.
UPDATE examples
- associate_application_status_check
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
- delete_application_status_check
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
- disable_application_status_check_suppression
- disassociate_application_status_check
- enable_application_status_check_suppression
- modify_application_status_check
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 }}
;
Disassociates 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.
EXEC aws.ec2.application_status_checks.disassociate_application_status_check
@ApplicationStatusCheckId='{{ ApplicationStatusCheckId }}' --required,
@region='{{ region }}' --required,
@TargetTagAssociation='{{ TargetTagAssociation }}',
@InstanceId='{{ InstanceId }}',
@ClientToken='{{ ClientToken }}',
@DryRun={{ DryRun }}
;
Suppresses 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.
EXEC aws.ec2.application_status_checks.enable_application_status_check_suppression
@region='{{ region }}' --required,
@InstanceId='{{ InstanceId }}',
@DurationSeconds='{{ DurationSeconds }}',
@ClientToken='{{ ClientToken }}',
@DryRun={{ DryRun }}
;
Modifies 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.
EXEC aws.ec2.application_status_checks.modify_application_status_check
@ApplicationStatusCheckId='{{ ApplicationStatusCheckId }}' --required,
@region='{{ region }}' --required,
@Aggregation='{{ Aggregation }}',
@HealthCheckPath='{{ HealthCheckPath }}',
@Protocol='{{ Protocol }}',
@Port='{{ Port }}',
@Path='{{ Path }}',
@DeviceIndex='{{ DeviceIndex }}',
@IpVersion='{{ IpVersion }}',
@IpScope='{{ IpScope }}',
@Interval='{{ Interval }}',
@Timeout='{{ Timeout }}',
@FailureThreshold='{{ FailureThreshold }}',
@SuccessThreshold='{{ SuccessThreshold }}',
@StatusCodeMatcher='{{ StatusCodeMatcher }}',
@InitializationGracePeriodSeconds='{{ InitializationGracePeriodSeconds }}',
@ClientToken='{{ ClientToken }}',
@DryRun={{ DryRun }}
;