[ aws . ec2 ]

create-application-status-check

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

See also: AWS API Documentation

Synopsis

  create-application-status-check
[--health-check-paths <value>]
[--aggregation <value>]
--protocol <value>
--port <value>
[--path <value>]
[--device-index <value>]
[--ip-version <value>]
[--ip-scope <value>]
[--interval <value>]
[--timeout <value>]
[--failure-threshold <value>]
[--success-threshold <value>]
[--status-code-matcher <value>]
[--initialization-grace-period-seconds <value>]
[--tag-specifications <value>]
[--client-token <value>]
[--dry-run | --no-dry-run]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]
[--debug]
[--endpoint-url <value>]
[--no-verify-ssl]
[--no-paginate]
[--output <value>]
[--query <value>]
[--profile <value>]
[--region <value>]
[--version <value>]
[--color <value>]
[--no-sign-request]
[--ca-bundle <value>]
[--cli-read-timeout <value>]
[--cli-connect-timeout <value>]
[--cli-binary-format <value>]
[--no-cli-pager]
[--cli-auto-prompt]
[--no-cli-auto-prompt]
[--cli-error-format <value>]

Options

--health-check-paths (list)

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.

(structure)

Describes a health check path for an application status check request.

Source -> (structure)

The source for the health check path.

SubnetId -> (string)

The ID of the subnet for the source.

SecurityGroupId -> (string)

The ID of the security group for the source.

Destinations -> (list)

The destinations for the health check path.

(structure)

Describes a destination for a health check path in a request. Destinations can be in a different Availability Zone than the source (cross-AZ) or in a Local Zone (AZ to Local Zone), enabling remote health validation of your application.

SubnetId -> (string)

The ID of the subnet for the destination.

SecurityGroupId -> (string)

The ID of the security group for the destination.

Shorthand Syntax:

Source={SubnetId=string,SecurityGroupId=string},Destinations=[{SubnetId=string,SecurityGroupId=string},{SubnetId=string,SecurityGroupId=string}] ...

JSON Syntax:

[
  {
    "Source": {
      "SubnetId": "string",
      "SecurityGroupId": "string"
    },
    "Destinations": [
      {
        "SubnetId": "string",
        "SecurityGroupId": "string"
      }
      ...
    ]
  }
  ...
]

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

Possible values:

  • included
  • excluded

--protocol (string) [required]

The protocol to use for the health check. Valid values: http | https .

Possible values:

  • http
  • https

--port (integer) [required]

The port to use for the health check. Valid values: 1 to 65535.

Constraints:

  • min: 1
  • max: 65535

--path (string)

The URL path to use for the health check HTTP request (for example, /health or /status ).

--device-index (integer)

The index of the network device to use for the health check. The value must be greater than or equal to 0.

--ip-version (string)

The IP version to use for the health check. Valid values: ipv4 and ipv6 .

Possible values:

  • ipv4
  • ipv6

--ip-scope (string)

The IP scope to use for the health check. Valid value: private .

Possible values:

  • private

--interval (integer)

The interval, in seconds, between health checks. Valid value: 60.

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

--failure-threshold (integer)

The number of consecutive failed health checks before the application status is considered impaired. The value must be greater than 0.

--success-threshold (integer)

The number of consecutive successful health checks before the application status is considered healthy. The value must be greater than 0.

--status-code-matcher (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. Default: 200 .

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

Constraints:

  • min: -1
  • max: 600

--tag-specifications (list)

The tags to apply to the application status check.

(structure)

The tags to apply to a resource when the resource is being created. When you specify a tag, you must specify the resource type to tag, otherwise the request will fail.

Note

The Valid Values lists all the resource types that can be tagged. However, the action you’re using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you’re using, you’ll get an error.

ResourceType -> (string)

The type of resource to tag on creation.

Possible values:

  • 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
  • secondary-interface
  • secondary-network
  • secondary-subnet
  • capacity-manager-data-export
  • vpn-concentrator
  • ipam-pool-allocation
  • capacity-reservation-cancellation-quote
  • application-status-check

Tags -> (list)

The tags to apply to the resource.

(structure)

Describes a tag.

Key -> (string)

The key of the tag.

Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

Value -> (string)

The value of the tag.

Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

Shorthand Syntax:

ResourceType=string,Tags=[{Key=string,Value=string},{Key=string,Value=string}] ...

JSON Syntax:

[
  {
    "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"|"secondary-interface"|"secondary-network"|"secondary-subnet"|"capacity-manager-data-export"|"vpn-concentrator"|"ipam-pool-allocation"|"capacity-reservation-cancellation-quote"|"application-status-check",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
      ...
    ]
  }
  ...
]

--client-token (string)

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency .

--dry-run | --no-dry-run (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 .

--cli-input-json | --cli-input-yaml (string) Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. Similarly, if provided yaml-input it will print a sample input YAML that can be used with --cli-input-yaml. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command. The generated JSON skeleton is not stable between versions of the AWS CLI and there are no backwards compatibility guarantees in the JSON skeleton generated.

Global Options

--debug (boolean)

Turn on debug logging.

--endpoint-url (string)

Override command’s default URL with the given URL.

--no-verify-ssl (boolean)

By default, the AWS CLI uses SSL when communicating with AWS services. For each SSL connection, the AWS CLI will verify SSL certificates. This option overrides the default behavior of verifying SSL certificates.

--no-paginate (boolean)

Disable automatic pagination. If automatic pagination is disabled, the AWS CLI will only make one call, for the first page of results.

--output (string)

The formatting style for command output.

  • json
  • text
  • table
  • yaml
  • yaml-stream
  • off

--query (string)

A JMESPath query to use in filtering the response data.

--profile (string)

Use a specific profile from your credential file.

--region (string)

The region to use. Overrides config/env settings.

--version (string)

Display the version of this tool.

--color (string)

Turn on/off color output.

  • on
  • off
  • auto

--no-sign-request (boolean)

Do not sign requests. Credentials will not be loaded if this argument is provided.

--ca-bundle (string)

The CA certificate bundle to use when verifying SSL certificates. Overrides config/env settings.

--cli-read-timeout (int)

The maximum socket read time in seconds. If the value is set to 0, the socket read will be blocking and not timeout. The default value is 60 seconds.

--cli-connect-timeout (int)

The maximum socket connect time in seconds. If the value is set to 0, the socket connect will be blocking and not timeout. The default value is 60 seconds.

--cli-binary-format (string)

The formatting style to be used for binary blobs. The default format is base64. The base64 format expects binary blobs to be provided as a base64 encoded string. The raw-in-base64-out format preserves compatibility with AWS CLI V1 behavior and binary values must be passed literally. When providing contents from a file that map to a binary blob fileb:// will always be treated as binary and use the file contents directly regardless of the cli-binary-format setting. When using file:// the file contents will need to properly formatted for the configured cli-binary-format.

  • base64
  • raw-in-base64-out

--no-cli-pager (boolean)

Disable cli pager for output.

--cli-auto-prompt (boolean)

Automatically prompt for CLI input parameters.

--no-cli-auto-prompt (boolean)

Disable automatically prompt for CLI input parameters.

--cli-error-format (string)

The formatting style for error output. By default, errors are displayed in enhanced format.

  • legacy
  • json
  • yaml
  • text
  • table
  • enhanced

Output

ApplicationStatusCheck -> (structure)

Information about the application status check.

ApplicationStatusCheckId -> (string)

The ID of the application status check.

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.

Possible values:

  • included
  • excluded

HealthCheckPaths -> (list)

The health check paths for the application status check.

(structure)

Describes a health check path for an application status check.

Source -> (structure)

The source for the health check path.

SubnetId -> (string)

The ID of the subnet for the source.

SecurityGroupId -> (string)

The ID of the security group for the source.

Destinations -> (list)

The destinations for the health check path.

(structure)

Describes a destination for a health check path.

SubnetId -> (string)

The ID of the subnet for the destination.

SecurityGroupId -> (string)

The ID of the security group for the destination.

Protocol -> (string)

The protocol used for the health check.

Possible values:

  • http
  • https

Port -> (integer)

The port used for the health check.

Path -> (string)

The URL path used for the health check HTTP request.

DeviceIndex -> (integer)

The index of the network device used for the health check. The value is greater than or equal to 0.

IpVersion -> (string)

The IP version used for the health check.

Possible values:

  • ipv4
  • ipv6

IpScope -> (string)

The IP scope used for the health check.

Possible values:

  • private

Interval -> (integer)

The interval, in seconds, between health checks. Valid value: 60.

Timeout -> (integer)

The amount of time, in seconds, to wait for a health check response. Valid values: 1 to 30.

FailureThreshold -> (integer)

The number of consecutive failed health checks before the application status is considered impaired. The value must be greater than 0.

SuccessThreshold -> (integer)

The number of consecutive successful health checks before the application status is considered healthy. The value must be greater than 0.

StatusCodeMatcher -> (string)

The comma-separated list of individual HTTP status codes or ranges that indicate a successful health check response.

InitializationGracePeriodSeconds -> (integer)

The number of seconds to wait before starting health checks after an instance is launched. Valid values: 1 to 600.

Constraints:

  • min: -1
  • max: 600

LastUpdatedAt -> (timestamp)

The date and time when the application status check was last updated.

TargetTagAssociations -> (list)

The tags associated with the application status check. Instances with these tags are automatically monitored by this check.

(structure)

Describes a tag key-value pair for an application status check association.

Key -> (string)

The key of the tag.

Value -> (string)

The value of the tag.

Tags -> (list)

The tags assigned to the application status check.

(structure)

Describes a tag.

Key -> (string)

The key of the tag.

Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

Value -> (string)

The value of the tag.

Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

CreationTime -> (timestamp)

The date and time when the application status check was created.

ModifyTime -> (timestamp)

The date and time when the application status check was last modified.

DeletionTime -> (timestamp)

The date and time when the application status check was deleted.