ListServiceStates - Application Signals

ListServiceStates

Returns information about the last deployment and other change states of services. This API provides visibility into recent changes that may have affected service performance, helping with troubleshooting and change correlation.

Request Syntax

POST /service/states HTTP/1.1 Content-type: application/json { "AttributeFilters": [ { "AttributeFilterName": "string", "AttributeFilterValues": [ "string" ] } ], "AwsAccountId": "string", "EndTime": number, "IncludeLinkedAccounts": boolean, "MaxResults": number, "NextToken": "string", "StartTime": number }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

AttributeFilters

A list of attribute filters to narrow down the services. You can filter by platform, environment, or other service attributes.

Type: Array of AttributeFilter objects

Array Members: Minimum number of 0 items. Maximum number of 20 items.

Required: No

AwsAccountId

The AWS account ID to filter service states by. Use this to limit results to services from a specific account.

Type: String

Pattern: [0-9]{12}

Required: No

EndTime

The end of the time period to retrieve service state information for. When used in a raw HTTP Query API, it is formatted as epoch time in seconds. For example, 1698778057.

Type: Timestamp

Required: Yes

IncludeLinkedAccounts

If you are using this operation in a monitoring account, specify true to include service states from source accounts in the returned data.

Type: Boolean

Required: No

MaxResults

The maximum number of service states to return in one operation. If you omit this parameter, the default of 20 is used.

Type: Integer

Valid Range: Maximum value of 250.

Required: No

NextToken

Include this value, if it was returned by the previous operation, to get the next set of service states.

Type: String

Required: No

StartTime

The start of the time period to retrieve service state information for. When used in a raw HTTP Query API, it is formatted as epoch time in seconds. For example, 1698778057.

Type: Timestamp

Required: Yes

Response Syntax

HTTP/1.1 200 Content-type: application/json { "EndTime": number, "NextToken": "string", "ServiceStates": [ { "AttributeFilters": [ { "AttributeFilterName": "string", "AttributeFilterValues": [ "string" ] } ], "LatestChangeEvents": [ { "AccountId": "string", "ChangeEventType": "string", "Entity": { "string" : "string" }, "EventId": "string", "EventName": "string", "Region": "string", "Timestamp": number, "UserName": "string" } ], "Service": { "string" : "string" } } ], "StartTime": number }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

EndTime

The end of the time period that the returned information applies to. When used in a raw HTTP Query API, it is formatted as epoch time in seconds. For example, 1698778057.

Type: Timestamp

NextToken

Include this value in your next use of this API to get the next set of service states.

Type: String

ServiceStates

An array of structures, where each structure contains information about the state of one service, including its latest change events such as deployments.

Type: Array of ServiceState objects

Array Members: Minimum number of 0 items. Maximum number of 250 items.

StartTime

The start of the time period that the returned information applies to. When used in a raw HTTP Query API, it is formatted as epoch time in seconds. For example, 1698778057.

Type: Timestamp

Errors

For information about the errors that are common to all actions, see Common Errors.

ThrottlingException

The request was throttled because of quota limits.

HTTP Status Code: 429

ValidationException

The resource is not valid.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: