EC2 / Client / describe_application_status
describe_application_status¶
- EC2.Client.describe_application_status(**kwargs)¶
Describes the application status for the specified instances. Returns the aggregated application health status for each instance. The following rules apply:
The instance-level status is derived from all application status checks with the aggregation setting set to
included.Use
DescribeApplicationStatusChecksto view the configuration of individual checks.Use
EnableApplicationStatusCheckSuppressionto temporarily suppress health check results from affecting the instance-level status.
See also: AWS API Documentation
Request Syntax
response = client.describe_application_status( InstanceIds=[ 'string', ], Filters=[ { 'Name': 'string', 'Values': [ 'string', ] }, ], MaxResults=123, NextToken='string', DryRun=True|False )
- Parameters:
InstanceIds (list) –
The IDs of the instances for which to describe application status.
(string) –
Filters (list) –
The filters.
availability-zone-id– The ID of the Availability Zone.status– The instance-level application status. For valid values and their meanings, seeApplicationStatus.
(dict) –
A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.
If you specify multiple filters, the filters are joined with an
AND, and the request returns only results that match all of the specified filters.For more information, see List and filter using the CLI and API in the Amazon EC2 User Guide.
Name (string) –
The name of the filter. Filter names are case-sensitive.
Values (list) –
The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an
OR, and the request returns all results that match any of the specified values.(string) –
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.
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 isUnauthorizedOperation.
- Return type:
dict
- Returns:
Response Syntax
{ 'ApplicationStatuses': { 'Instances': [ { 'InstanceId': 'string', 'AvailabilityZone': 'string', 'AvailabilityZoneId': 'string', 'ApplicationStatus': { 'Status': 'ok'|'impaired'|'initializing'|'insufficient-data'|'not-applicable'|'suppressed', 'StatusTimeStamp': datetime(2015, 1, 1), 'StatusSince': datetime(2015, 1, 1), 'ResumeAt': datetime(2015, 1, 1), 'Details': [ { 'ApplicationStatusCheckId': 'string', 'CheckUpdateTime': datetime(2015, 1, 1), 'Aggregation': 'included'|'excluded', 'Status': 'passed'|'failed'|'initializing'|'insufficient-data'|'not-applicable', 'StatusTimeStamp': datetime(2015, 1, 1), 'StatusSince': datetime(2015, 1, 1), 'Reason': { 'Code': 'string', 'StatusCode': 123, 'Protocol': 'string' } }, ] }, 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] }, ] }, 'NextToken': 'string' }
Response Structure
(dict) –
ApplicationStatuses (dict) –
The application statuses for the specified instances.
Instances (list) –
The application status information for the instances.
(dict) –
Describes the application status for an instance.
InstanceId (string) –
The ID of the instance.
AvailabilityZone (string) –
The Availability Zone of the instance.
AvailabilityZoneId (string) –
The ID of the Availability Zone of the instance.
ApplicationStatus (dict) –
The application status for the instance.
Status (string) –
The current instance-level application status. This status is derived from application status checks with
Aggregationset toincluded. Possible values:ok– All included checks passed.impaired– At least one included check failed.initializing– At least one included check is initializing, and no included check is impaired.insufficient-data– At least one included check has insufficient data, and no included check is impaired or initializing.not-applicable– No checks withAggregationset toincludedapply to the instance.suppressed– Application status reporting is suppressed for the instance.
Checks with
Aggregationset toexcludeddo not affect this value.StatusTimeStamp (datetime) –
The date and time of the last status update.
StatusSince (datetime) –
The date and time when the current status started.
ResumeAt (datetime) –
The date and time when application status reporting resumes after suppression.
Details (list) –
Details about the application status checks for the instance.
(dict) –
Describes the details of an application status check for an instance.
ApplicationStatusCheckId (string) –
The ID of the application status check.
CheckUpdateTime (datetime) –
The date and time when the check was last updated.
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 toexcluded, the check runs independently and does not affect the instance-level status.Status (string) –
The status of the individual application status check. Possible values:
passed– The check reached its success threshold.failed– The check reached its failure threshold.initializing– The check is initializing or has not reached a success or failure threshold.insufficient-data– The check does not have enough data to determine a result.not-applicable– The check does not apply to the instance.
This value reflects the check result and is not affected by aggregation or suppression.
StatusTimeStamp (datetime) –
The date and time of the last status update for this check.
StatusSince (datetime) –
The date and time when the current status started for this check.
Reason (dict) –
The reason for the current status.
Code (string) –
The reason code for the application status check result. Possible values:
ResponseCodeMatched– The HTTP status code returned by the health check matched the configuredStatusCodeMatcher.ResponseCodeMismatch– The HTTP status code returned by the health check did not match the configuredStatusCodeMatcher.ConnectionTimeout– The connection to the target timed out.ResponseTimeout– The health check timed out while waiting for a response from the target.ConnectionRefused– The target refused the health check connection.ConnectionReset– The target reset the health check connection before returning a response.
Current health check results use the values in the preceding list. Legacy results that do not contain structured reason metadata can instead contain a producer error type, such as
Http Status CodeorHttpConnectTimeoutException.For
ResponseCodeMatchedandResponseCodeMismatch, thestatusCodefield contains the returned HTTP status code. Theprotocolfield contains the protocol used for the health check.StatusCode (integer) –
The HTTP status code returned by the health check.
Protocol (string) –
The protocol used for the health check. Possible values:
HTTPandHTTPS.
Tags (list) –
The tags assigned to the instance.
(dict) –
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.
NextToken (string) –
The token to include in another request to get the next page of items. This value is <code>null</code> when there are no more items to return.