Creates an application status check for monitoring the health of applications running on your instances¶
Description¶
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
associate_application_status_checkbefore 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.
Usage¶
ec2_create_application_status_check(HealthCheckPaths, Aggregation,
Protocol, Port, Path, DeviceIndex, IpVersion, IpScope, Interval,
Timeout, FailureThreshold, SuccessThreshold, StatusCodeMatcher,
InitializationGracePeriodSeconds, TagSpecifications, ClientToken,
DryRun)
Arguments¶
HealthCheckPaths
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
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 describe_application_status. When set to excluded, the check runs independently and does not affect the instance-level status. Valid values: included | excluded.
Protocol
[required] The protocol to use for the health check. Valid values: http | https.
Port
[required] The port to use for the health check. Valid values: 1 to 65535.
Path
The URL path to use for the health check HTTP request (for example, /health or /status).
DeviceIndex
The index of the network device to use for the health check. The value must be greater than or equal to 0.
IpVersion
The IP version to use for the health check. Valid values: ipv4 and ipv6.
IpScope
The IP scope to use for the health check. Valid value: private.
Interval
The interval, in seconds, between health checks. Valid value: 60.
Timeout
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.
FailureThreshold
The number of consecutive failed health checks before the application status is considered impaired. The value must be greater than 0.
SuccessThreshold
The number of consecutive successful health checks before the application status is considered healthy. The value must be greater than 0.
StatusCodeMatcher
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.
InitializationGracePeriodSeconds
The number of seconds to wait before starting health checks after an instance is launched. Valid values: 1 to 600.
TagSpecifications
The tags to apply to the application status check.
ClientToken
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.
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 is UnauthorizedOperation.
Value¶
A list with the following syntax:
list(
ApplicationStatusCheck = list(
ApplicationStatusCheckId = "string",
Aggregation = "included"|"excluded",
HealthCheckPaths = list(
list(
Source = list(
SubnetId = "string",
SecurityGroupId = "string"
),
Destinations = list(
list(
SubnetId = "string",
SecurityGroupId = "string"
)
)
)
),
Protocol = "http"|"https",
Port = 123,
Path = "string",
DeviceIndex = 123,
IpVersion = "ipv4"|"ipv6",
IpScope = "private",
Interval = 123,
Timeout = 123,
FailureThreshold = 123,
SuccessThreshold = 123,
StatusCodeMatcher = "string",
InitializationGracePeriodSeconds = 123,
LastUpdatedAt = as.POSIXct(
"2015-01-01"
),
TargetTagAssociations = list(
list(
Key = "string",
Value = "string"
)
),
Tags = list(
list(
Key = "string",
Value = "string"
)
),
CreationTime = as.POSIXct(
"2015-01-01"
),
ModifyTime = as.POSIXct(
"2015-01-01"
),
DeletionTime = as.POSIXct(
"2015-01-01"
)
)
)
Request syntax¶
svc$create_application_status_check(
HealthCheckPaths = list(
list(
Source = list(
SubnetId = "string",
SecurityGroupId = "string"
),
Destinations = list(
list(
SubnetId = "string",
SecurityGroupId = "string"
)
)
)
),
Aggregation = "included"|"excluded",
Protocol = "http"|"https",
Port = 123,
Path = "string",
DeviceIndex = 123,
IpVersion = "ipv4"|"ipv6",
IpScope = "private",
Interval = 123,
Timeout = 123,
FailureThreshold = 123,
SuccessThreshold = 123,
StatusCodeMatcher = "string",
InitializationGracePeriodSeconds = 123,
TagSpecifications = list(
list(
ResourceType = "capacity-reservation"|"client-vpn-endpoint"|"customer-gateway"|"carrier-gateway"|"coip-pool"|"declarative-policies-report"|"dedicated-host"|"dhcp-options"|"egress-only-internet-gateway"|"elastic-ip"|"elastic-gpu"|"export-image-task"|"export-instance-task"|"fleet"|"fpga-image"|"host-reservation"|"image"|"image-usage-report"|"import-image-task"|"import-snapshot-task"|"instance"|"instance-event-window"|"internet-gateway"|"ipam"|"ipam-pool"|"ipam-scope"|"ipv4pool-ec2"|"ipv6pool-ec2"|"key-pair"|"launch-template"|"local-gateway"|"local-gateway-route-table"|"local-gateway-virtual-interface"|"local-gateway-virtual-interface-group"|"local-gateway-route-table-vpc-association"|"local-gateway-route-table-virtual-interface-group-association"|"natgateway"|"network-acl"|"network-interface"|"network-insights-analysis"|"network-insights-path"|"network-insights-access-scope"|"network-insights-access-scope-analysis"|"outpost-lag"|"placement-group"|"prefix-list"|"replace-root-volume-task"|"reserved-instances"|"route-table"|"security-group"|"security-group-rule"|"service-link-virtual-interface"|"snapshot"|"spot-fleet-request"|"spot-instances-request"|"subnet"|"subnet-cidr-reservation"|"traffic-mirror-filter"|"traffic-mirror-session"|"traffic-mirror-target"|"transit-gateway"|"transit-gateway-attachment"|"transit-gateway-connect-peer"|"transit-gateway-multicast-domain"|"transit-gateway-policy-table"|"transit-gateway-metering-policy"|"transit-gateway-route-table"|"transit-gateway-route-table-announcement"|"volume"|"vpc"|"vpc-endpoint"|"vpc-endpoint-connection"|"vpc-endpoint-service"|"vpc-endpoint-service-permission"|"vpc-peering-connection"|"vpn-connection"|"vpn-gateway"|"vpc-flow-log"|"capacity-reservation-fleet"|"traffic-mirror-filter-rule"|"vpc-endpoint-connection-device-type"|"verified-access-instance"|"verified-access-group"|"verified-access-endpoint"|"verified-access-policy"|"verified-access-trust-provider"|"vpn-connection-device-type"|"vpc-block-public-access-exclusion"|"vpc-encryption-control"|"route-server"|"route-server-endpoint"|"route-server-peer"|"ipam-resource-discovery"|"ipam-resource-discovery-association"|"instance-connect-endpoint"|"verified-access-endpoint-target"|"ipam-external-resource-verification-token"|"capacity-block"|"mac-modification-task"|"ipam-prefix-list-resolver"|"ipam-policy"|"ipam-prefix-list-resolver-target"|"ipam-internet-registry-association"|"secondary-interface"|"secondary-network"|"secondary-subnet"|"capacity-manager-data-export"|"vpn-concentrator"|"ipam-pool-allocation"|"capacity-reservation-cancellation-quote"|"application-status-check"|"capacity-reservation-modification-quote",
Tags = list(
list(
Key = "string",
Value = "string"
)
)
)
),
ClientToken = "string",
DryRun = TRUE|FALSE
)