create_application_status_check
async
¶
create_application_status_check(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = None,
health_check_paths: Optional[HealthCheckPathRequestList] = None,
aggregation: Optional[AggregationStatusEnum] = None,
protocol: Optional[NetworkProtocolEnum] = None,
port: Optional[PortNumber] = None,
path: Optional[String] = None,
device_index: Optional[Integer] = None,
ip_version: Optional[IpVersionEnum] = None,
ip_scope: Optional[IpScopeEnum] = None,
interval: Optional[Integer] = None,
timeout: Optional[Integer] = None,
failure_threshold: Optional[Integer] = None,
success_threshold: Optional[Integer] = None,
status_code_matcher: Optional[String] = None,
initialization_grace_period_seconds: Optional[
InitializationGracePeriodSeconds
] = None,
tag_specifications: Optional[TagSpecificationList] = None,
client_token: Optional[String] = None,
dry_run: Optional[Boolean] = None,
) -> CreateApplicationStatusCheckResult
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:
-
health_check_paths(Optional[HealthCheckPathRequestList], default: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.
-
aggregation(Optional[AggregationStatusEnum], default: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 byDescribeApplicationStatus. When set toexcluded, the check runs independently and does not affect the instance-level status. Valid values:included|excluded. -
protocol(Optional[NetworkProtocolEnum], default:None) –The protocol to use for the health check. Valid values:
http|https. -
port(Optional[PortNumber], default:None) –The port to use for the health check. Valid values: 1 to 65535.
-
path(Optional[String], default:None) –The URL path to use for the health check HTTP request (for example,
/healthor/status). -
device_index(Optional[Integer], default:None) –The index of the network device to use for the health check. The value must be greater than or equal to 0.
-
ip_version(Optional[IpVersionEnum], default:None) –The IP version to use for the health check. Valid values:
ipv4andipv6. -
ip_scope(Optional[IpScopeEnum], default:None) –The IP scope to use for the health check. Valid value:
private. -
interval(Optional[Integer], default:None) –The interval, in seconds, between health checks. Valid value: 60.
-
timeout(Optional[Integer], default:None) –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. -
failure_threshold(Optional[Integer], default:None) –The number of consecutive failed health checks before the application status is considered impaired. The value must be greater than 0.
-
success_threshold(Optional[Integer], default:None) –The number of consecutive successful health checks before the application status is considered healthy. The value must be greater than 0.
-
status_code_matcher(Optional[String], default: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. -
initialization_grace_period_seconds(Optional[InitializationGracePeriodSeconds], default:None) –The number of seconds to wait before starting health checks after an instance is launched. Valid values: 1 to 600.
-
tag_specifications(Optional[TagSpecificationList], default:None) –The tags to apply to the application status check.
-
client_token(Optional[String], default: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.
-
dry_run(Optional[Boolean], default: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 isUnauthorizedOperation.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To create an application status check This example creates an application status check that monitors HTTP health on port 80.
>>> await client.create_application_status_check(protocol='http', port=80, path='/health', aggregation='included')
Source code in docs_src/capo_ec2/_services/async_ec2.py
6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 | |