ResilienceHubV2 / Paginator / ListTestRunSourceEvents
ListTestRunSourceEvents¶
- class ResilienceHubV2.Paginator.ListTestRunSourceEvents¶
paginator = client.get_paginator('list_test_run_source_events')
- paginate(**kwargs)¶
Creates an iterator that will paginate through responses from
ResilienceHubV2.Client.list_test_run_source_events().See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate( testRunId='string', serviceArn='string', sourceArn='string', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } )
- Parameters:
testRunId (string) –
[REQUIRED]
The identifier of the test run to list source events for.
serviceArn (string) –
[REQUIRED]
The ARN of the service the test run belongs to.
sourceArn (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.
PaginationConfig (dict) –
A dictionary that provides parameters to control pagination.
MaxItems (integer) –
The total number of items to return. If the total number of items available is more than the value specified in max-items then a
NextTokenwill be provided in the output that you can use to resume pagination.PageSize (integer) –
The size of each page.
StartingToken (string) –
A token to specify where to start paginating. This is the
NextTokenfrom a previous response.
- Return type:
dict
- Returns:
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.
Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
alarmStateChange,error. If a client receives an unknown member it will setSDK_UNKNOWN_MEMBERas the top level key, which maps to the name or tag of the unknown member. The structure ofSDK_UNKNOWN_MEMBERis as follows:'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
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) –
A token to resume pagination.