ResilienceHubV2 / Paginator / ListPolicyEvents
ListPolicyEvents¶
- class ResilienceHubV2.Paginator.ListPolicyEvents¶
paginator = client.get_paginator('list_policy_events')
- paginate(**kwargs)¶
Creates an iterator that will paginate through responses from
ResilienceHubV2.Client.list_policy_events().See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate( policyArn='string', eventTypes=[ 'POLICY_ATTACHED_TO_SERVICE'|'POLICY_DETACHED_FROM_SERVICE'|'POLICY_SHARING_REVOKED'|'POLICY_DELETED', ], startTime=datetime(2015, 1, 1), endTime=datetime(2015, 1, 1), PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } )
- Parameters:
policyArn (string) –
[REQUIRED]
ARN identifier.
eventTypes (list) –
The type of events to include in the results.
(string) –
startTime (datetime) – The start time for filtering events.
endTime (datetime) – The end time for filtering events.
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
{ 'events': [ { 'eventId': 'string', 'timestamp': datetime(2015, 1, 1), 'eventType': 'POLICY_ATTACHED_TO_SERVICE'|'POLICY_DETACHED_FROM_SERVICE'|'POLICY_SHARING_REVOKED'|'POLICY_DELETED', 'policyArn': 'string', 'actor': { 'type': 'USER'|'SYSTEM', 'principalId': 'string', 'accountId': 'string', 'userName': 'string' }, 'eventDetails': { 'title': 'string', 'description': 'string', 'eventMetadata': { 'policyAttachedToService': { 'serviceArn': 'string', 'accountId': 'string' }, 'policyDetachedFromService': { 'serviceArn': 'string', 'accountId': 'string' }, 'policySharingRevoked': { 'affectedServiceCount': 123 }, 'policyDeleted': { 'affectedServiceCount': 123 } } } }, ], 'NextToken': 'string' }
Response Structure
(dict) –
events (list) –
The list of policy events.
(dict) –
An event on the timeline of a resilience policy.
eventId (string) –
The identifier of the event.
timestamp (datetime) –
The time the event occurred.
eventType (string) –
The type of the event.
policyArn (string) –
ARN identifier.
actor (dict) –
Identifies the actor that triggered an event.
type (string) –
The type of actor, either USER or SYSTEM.
principalId (string) –
The principal ID of the actor.
accountId (string) –
The AWS account ID of the actor.
userName (string) –
The user name of the actor.
eventDetails (dict) –
The details of the event.
title (string) –
A short summary of the event.
description (string) –
A description of the event.
eventMetadata (dict) –
The event-specific metadata, with one member populated according to the event type.
Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
policyAttachedToService,policyDetachedFromService,policySharingRevoked,policyDeleted. 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'}
policyAttachedToService (dict) –
Contains details about the service that started using the policy, such as the account that owns the service.
serviceArn (string) –
ARN identifier.
accountId (string) –
The account that owns the service.
policyDetachedFromService (dict) –
Contains details about the service that stopped using the policy, such as the account that owns the service.
serviceArn (string) –
ARN identifier.
accountId (string) –
The account that owns the service.
policySharingRevoked (dict) –
Contains details about a policy for which organization sharing was revoked, including the number of services that were affected.
affectedServiceCount (integer) –
The number of services that were using the policy when sharing was revoked.
policyDeleted (dict) –
Contains details about a policy that was deleted, including the number of services that were affected.
affectedServiceCount (integer) –
The number of services that were using the policy when it was deleted.
NextToken (string) –
A token to resume pagination.