2026/09/10 - AWS Resilience Hub V2 - 2 new2 updated api methods
Changes This release adds the ListTestRunSourceEvents and ListTestRunDependencies APIs, which return the alarm state changes during a test run and the dependencies the run blocked.
Lists the state-change events observed for a test run monitoring source. Events are returned for one source per call, in chronological order.
See also: AWS API Documentation
Request Syntax
client.list_test_run_source_events(
testRunId='string',
serviceArn='string',
sourceArn='string',
maxResults=123,
nextToken='string'
)
string
[REQUIRED]
The identifier of the test run to list source events for.
string
[REQUIRED]
The ARN of the service the test run belongs to.
string
[REQUIRED]
The ARN of the monitoring source to list events for, such as the ARN of a CloudWatch alarm. If the source was not monitored during the test run, the response is an empty list.
integer
Pagination page size.
string
Pagination token.
dict
Response Syntax
{
'testRunSourceEvents': [
{
'timestamp': datetime(2015, 1, 1),
'sourceArn': 'string',
'eventType': 'ALARM',
'detail': {
'alarmStateChange': {
'state': 'OK'|'ALARM'|'INSUFFICIENT_DATA',
'previousState': 'OK'|'ALARM'|'INSUFFICIENT_DATA',
'reason': 'string'
},
'error': {
'errorCode': 'ACCESS_DENIED'|'INTERNAL_ERROR',
'errorMessage': 'string'
}
}
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
testRunSourceEvents (list) --
The list of source events, in chronological order.
(dict) --
A state-change event observed for a test run monitoring source.
timestamp (datetime) --
The timestamp when the event occurred.
sourceArn (string) --
The ARN of the monitoring source the event belongs to.
eventType (string) --
The type of the event. ALARM indicates an event from a CloudWatch alarm source; the detail member carries either the alarm state change or a collection error.
detail (dict) --
The event payload.
alarmStateChange (dict) --
A CloudWatch alarm state change.
state (string) --
The state the alarm transitioned to.
previousState (string) --
The state the alarm transitioned from. Absent on the initial event, which records the alarm's state when collection began.
reason (string) --
A human-readable explanation of the state change, as reported by CloudWatch.
error (dict) --
An error that prevented event collection from the source.
errorCode (string) --
The error code.
errorMessage (string) --
A human-readable description of the error.
nextToken (string) --
Pagination token.
Lists the dependencies that a test run blocked. Each dependency reflects the discovered classification captured when the run started, so results do not change if a dependency is reclassified after the run.
See also: AWS API Documentation
Request Syntax
client.list_test_run_dependencies(
testRunId='string',
serviceArn='string',
maxResults=123,
nextToken='string'
)
string
[REQUIRED]
The identifier of the test run to list dependencies for.
string
[REQUIRED]
The ARN of the service the test run belongs to.
integer
Pagination page size.
string
Pagination token.
dict
Response Syntax
{
'dependencies': [
{
'dependencyId': 'string',
'dependencyName': 'string',
'dnsName': 'string',
'criticality': 'HARD'|'SOFT'|'UNKNOWN',
'source': 'DISCOVERED'|'MANUAL',
'location': 'string',
'sourceRegions': [
'string',
],
'provider': 'string'
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
dependencies (list) --
The list of dependencies the test run blocked.
(dict) --
Contains summary information about a dependency that a test run blocked, as captured when the run started.
dependencyId (string) --
The unique identifier of the dependency. Absent when the dependency was entered manually and was not part of dependency discovery.
dependencyName (string) --
The name of the dependency.
dnsName (string) --
The DNS name of the dependency that the test run blocked.
criticality (string) --
The criticality classification of the dependency when the run started. A dependency that was not discovered has the UNKNOWN criticality.
source (string) --
The origin of the dependency. A discovered dependency was found by dependency discovery; a manual dependency was entered when the run started.
location (string) --
The location of the dependency.
sourceRegions (list) --
The source Regions from which the dependency was detected.
(string) --
provider (string) --
The provider of the dependency.
nextToken (string) --
Pagination token.
{'resourceConfiguration': {'eks': {'labelSelector': {'matchExpressions': [{'key': 'string',
'operator': 'IN '
'| '
'NOT_IN '
'| '
'EXISTS '
'| '
'DOES_NOT_EXIST',
'values': ['string']}],
'matchLabels': {'string': 'string'}}}}}
Creates an input source for a service.
See also: AWS API Documentation
Request Syntax
client.create_input_source(
serviceArn='string',
resourceConfiguration={
'resourceTags': [
{
'key': 'string',
'values': [
'string',
]
},
],
'cfnStackArn': 'string',
'tfStateFileUrl': 'string',
'eks': {
'clusterArn': 'string',
'namespaces': [
'string',
],
'labelSelector': {
'matchLabels': {
'string': 'string'
},
'matchExpressions': [
{
'key': 'string',
'operator': 'IN'|'NOT_IN'|'EXISTS'|'DOES_NOT_EXIST',
'values': [
'string',
]
},
]
}
},
'designFileS3Url': 'string'
},
clientToken='string'
)
string
[REQUIRED]
ARN identifier.
dict
[REQUIRED]
Resource configuration for an input source. Provide exactly one field.
resourceTags (list) --
The resource tags for tag-based resource discovery.
(dict) --
A tag key-value pair used for resource discovery.
key (string) -- [REQUIRED]
Tag key.
values (list) -- [REQUIRED]
The list of tag values.
(string) --
Tag value.
cfnStackArn (string) --
ARN identifier.
tfStateFileUrl (string) --
S3 URL — virtual hosted-style or s3:// URI.
eks (dict) --
The Amazon EKS configuration for resource discovery.
clusterArn (string) -- [REQUIRED]
ARN identifier.
namespaces (list) -- [REQUIRED]
The list of Kubernetes namespaces within the EKS cluster.
(string) --
Kubernetes namespace name (RFC 1123 Label).
labelSelector (dict) --
Filters discovery to the Kubernetes objects whose labels match the selector. When omitted, all supported objects in the specified namespaces are discovered.
matchLabels (dict) --
The label key-value pairs that an object must have. All pairs must match for the object to be selected.
(string) --
A Kubernetes label key. It can include an optional DNS subdomain prefix.
(string) --
A Kubernetes label value. This value can be empty.
matchExpressions (list) --
The label requirements that an object must satisfy. All requirements in the list must match for the object to be selected.
(dict) --
A single label requirement in a label selector, expressed as a key, an operator, and an optional list of values.
key (string) -- [REQUIRED]
The label key that the requirement applies to.
operator (string) -- [REQUIRED]
The operator that relates the label key to the values.
values (list) --
The label values to compare against. Specify values when the operator is IN or NOT_IN. Leave this empty when the operator is EXISTS or DOES_NOT_EXIST.
(string) --
A Kubernetes label value. This value can be empty.
designFileS3Url (string) --
S3 URL — virtual hosted-style or s3:// URI.
string
Idempotency token.
This field is autopopulated if not provided.
dict
Response Syntax
{
'serviceArn': 'string',
'inputSourceId': 'string'
}
Response Structure
(dict) --
serviceArn (string) --
ARN identifier.
inputSourceId (string) --
The unique identifier assigned to the created input source.
{'inputSourceSummaries': {'eks': {'labelSelector': {'matchExpressions': [{'key': 'string',
'operator': 'IN '
'| '
'NOT_IN '
'| '
'EXISTS '
'| '
'DOES_NOT_EXIST',
'values': ['string']}],
'matchLabels': {'string': 'string'}}}}}
Lists input sources for a service.
See also: AWS API Documentation
Request Syntax
client.list_input_sources(
serviceArn='string',
type='CFN_STACK'|'TAGS'|'EKS'|'TERRAFORM'|'DESIGN_FILE'|'MONITORING',
maxResults=123,
nextToken='string'
)
string
[REQUIRED]
ARN identifier.
string
Filter input sources by type.
integer
Pagination page size.
string
Pagination token.
dict
Response Syntax
{
'inputSourceSummaries': [
{
'inputSourceId': 'string',
'type': 'CFN_STACK'|'TAGS'|'EKS'|'TERRAFORM'|'DESIGN_FILE'|'MONITORING',
'resourceTags': [
{
'key': 'string',
'values': [
'string',
]
},
],
'cfnStackArn': 'string',
'tfStateFileUrl': 'string',
'eks': {
'clusterArn': 'string',
'namespaces': [
'string',
],
'labelSelector': {
'matchLabels': {
'string': 'string'
},
'matchExpressions': [
{
'key': 'string',
'operator': 'IN'|'NOT_IN'|'EXISTS'|'DOES_NOT_EXIST',
'values': [
'string',
]
},
]
}
},
'designFileS3Url': 'string',
'createdAt': datetime(2015, 1, 1)
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
inputSourceSummaries (list) --
The list of input source summaries.
(dict) --
Contains summary information about an input source for a service.
inputSourceId (string) --
The unique identifier of the input source.
type (string) --
The type of the input source.
resourceTags (list) --
The resource tags used for discovery, if this input source uses tags.
(dict) --
A tag key-value pair used for resource discovery.
key (string) --
Tag key.
values (list) --
The list of tag values.
(string) --
Tag value.
cfnStackArn (string) --
ARN identifier.
tfStateFileUrl (string) --
S3 URL — virtual hosted-style or s3:// URI.
eks (dict) --
The Amazon EKS configuration, if this input source uses EKS.
clusterArn (string) --
ARN identifier.
namespaces (list) --
The list of Kubernetes namespaces within the EKS cluster.
(string) --
Kubernetes namespace name (RFC 1123 Label).
labelSelector (dict) --
Filters discovery to the Kubernetes objects whose labels match the selector. When omitted, all supported objects in the specified namespaces are discovered.
matchLabels (dict) --
The label key-value pairs that an object must have. All pairs must match for the object to be selected.
(string) --
A Kubernetes label key. It can include an optional DNS subdomain prefix.
(string) --
A Kubernetes label value. This value can be empty.
matchExpressions (list) --
The label requirements that an object must satisfy. All requirements in the list must match for the object to be selected.
(dict) --
A single label requirement in a label selector, expressed as a key, an operator, and an optional list of values.
key (string) --
The label key that the requirement applies to.
operator (string) --
The operator that relates the label key to the values.
values (list) --
The label values to compare against. Specify values when the operator is IN or NOT_IN. Leave this empty when the operator is EXISTS or DOES_NOT_EXIST.
(string) --
A Kubernetes label value. This value can be empty.
designFileS3Url (string) --
S3 URL — virtual hosted-style or s3:// URI.
createdAt (datetime) --
The timestamp when the input source was created.
nextToken (string) --
Pagination token.