create_application_status_check¶
Operation¶
create_application_status_check
async
¶
create_application_status_check(input: CreateApplicationStatusCheckInput, plugins: list[Plugin] | None = None) -> CreateApplicationStatusCheckOutput
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 for each account.
-
You must associate the check with instances or tags using
AssociateApplicationStatusCheckbefore health checks start. -
You must set the
Timeoutvalue to less than theIntervalvalue. -
You must start the
Pathwith a forward slash (/). Default:/. -
You can specify
Aggregationasincludedorexcluded. If you do not specify a value, it defaults toincluded, which means the check contributes to the instance-level application status. -
You can use the following default values:
Intervalis 60 seconds,Timeoutis 6 seconds,FailureThresholdis 2,SuccessThresholdis 2,StatusCodeMatcheris200,InitializationGracePeriodSecondsis 300 seconds. -
You can tag the application status check during creation. For more information, see Tag your Amazon EC2 resources.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
CreateApplicationStatusCheckInput
|
An instance of |
required |
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
Returns:
| Type | Description |
|---|---|
CreateApplicationStatusCheckOutput
|
An instance of |
Input¶
CreateApplicationStatusCheckInput
dataclass
¶
Bases: _SerdeShape
Dataclass for CreateApplicationStatusCheckInput structure.
Attributes¶
aggregation
class-attribute
instance-attribute
¶
aggregation: str | None = ...
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.
client_token
class-attribute
instance-attribute
¶
client_token: str | None = ...
A unique, case-sensitive identifier that you provide to ensure that the operation completes no more than one time. If you retry a request with the same token, the service ignores the request but does not return an error. For more information, see Ensuring idempotency.
device_index
class-attribute
instance-attribute
¶
device_index: int | None = ...
The index of the network device to use for the health check. The value must be greater than or equal to 0.
dry_run
class-attribute
instance-attribute
¶
dry_run: bool | None = ...
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.
failure_threshold
class-attribute
instance-attribute
¶
failure_threshold: int | None = ...
The number of consecutive failed health checks before the application status is considered impaired. The value must be greater than 0.
health_check_paths
class-attribute
instance-attribute
¶
health_check_paths: list[HealthCheckPathRequestObject] | None = ...
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.
initialization_grace_period_seconds
class-attribute
instance-attribute
¶
initialization_grace_period_seconds: int | None = ...
The number of seconds to wait before starting health checks after an instance is launched. Valid values: 1 to 600.
interval
class-attribute
instance-attribute
¶
interval: int | None = ...
The interval, in seconds, between health checks. Valid value: 60.
ip_scope
class-attribute
instance-attribute
¶
ip_scope: str | None = ...
The IP scope to use for the health check. Valid value: private.
ip_version
class-attribute
instance-attribute
¶
ip_version: str | None = ...
The IP version to use for the health check. Valid values: ipv4 and
ipv6.
path
class-attribute
instance-attribute
¶
path: str | None = ...
The URL path to use for the health check HTTP request (for example,
/health or /status).
port
class-attribute
instance-attribute
¶
port: int | None = ...
The port to use for the health check. Valid values: 1 to 65535.
protocol
class-attribute
instance-attribute
¶
protocol: str | None = ...
The protocol to use for the health check. Valid values: http |
https.
status_code_matcher
class-attribute
instance-attribute
¶
status_code_matcher: str | None = ...
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.
success_threshold
class-attribute
instance-attribute
¶
success_threshold: int | None = ...
The number of consecutive successful health checks before the application status is considered healthy. The value must be greater than 0.
tag_specifications
class-attribute
instance-attribute
¶
tag_specifications: list[TagSpecification] | None = ...
The tags to apply to the application status check.
Output¶
CreateApplicationStatusCheckOutput
dataclass
¶
Bases: _SerdeShape
Dataclass for CreateApplicationStatusCheckOutput structure.
Attributes¶
application_status_check
class-attribute
instance-attribute
¶
application_status_check: ApplicationStatusCheckResponseObject | None = ...
Information about the application status check.
response_metadata
class-attribute
instance-attribute
¶
Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.