ResilienceHubV2 / Client / list_service_events

list_service_events

ResilienceHubV2.Client.list_service_events(**kwargs)

Lists events for a service.

See also: AWS API Documentation

Request Syntax

response = client.list_service_events(
    serviceArn='string',
    eventTypes=[
        'SERVICE_CREATED'|'SERVICE_DELETED'|'SERVICE_SYSTEM_ASSOCIATED'|'SERVICE_SYSTEM_DISASSOCIATED'|'SERVICE_RESOURCES_ASSOCIATED'|'SERVICE_RESOURCES_DISASSOCIATED'|'SERVICE_WORKFLOW_UPDATED'|'SERVICE_INPUT_SOURCES_UPDATED'|'SERVICE_POLICY_ASSOCIATED'|'SERVICE_POLICY_DISASSOCIATED'|'SERVICE_FUNCTION_CREATED'|'SERVICE_FUNCTION_UPDATED'|'SERVICE_FUNCTION_DELETED'|'SERVICE_FUNCTION_RESOURCES_ADDED'|'SERVICE_FUNCTION_RESOURCES_REMOVED'|'SERVICE_ACHIEVABILITY_UPDATED'|'ASSERTION_CREATED'|'ASSERTION_UPDATED'|'ASSERTION_DELETED',
    ],
    startTime=datetime(2015, 1, 1),
    endTime=datetime(2015, 1, 1),
    maxResults=123,
    nextToken='string'
)
Parameters:
  • serviceArn (string) –

    [REQUIRED]

    ARN identifier.

  • eventTypes (list) –

    Filter events by type.

    • (string) –

  • startTime (datetime) – The start time for filtering events.

  • endTime (datetime) – The end time for filtering events.

  • maxResults (integer) – Pagination page size.

  • nextToken (string) – Pagination token.

Return type:

dict

Returns:

Response Syntax

{
    'events': [
        {
            'eventId': 'string',
            'timestamp': datetime(2015, 1, 1),
            'eventType': 'SERVICE_CREATED'|'SERVICE_DELETED'|'SERVICE_SYSTEM_ASSOCIATED'|'SERVICE_SYSTEM_DISASSOCIATED'|'SERVICE_RESOURCES_ASSOCIATED'|'SERVICE_RESOURCES_DISASSOCIATED'|'SERVICE_WORKFLOW_UPDATED'|'SERVICE_INPUT_SOURCES_UPDATED'|'SERVICE_POLICY_ASSOCIATED'|'SERVICE_POLICY_DISASSOCIATED'|'SERVICE_FUNCTION_CREATED'|'SERVICE_FUNCTION_UPDATED'|'SERVICE_FUNCTION_DELETED'|'SERVICE_FUNCTION_RESOURCES_ADDED'|'SERVICE_FUNCTION_RESOURCES_REMOVED'|'SERVICE_ACHIEVABILITY_UPDATED'|'ASSERTION_CREATED'|'ASSERTION_UPDATED'|'ASSERTION_DELETED',
            'serviceArn': 'string',
            'actor': {
                'type': 'USER'|'SYSTEM',
                'principalId': 'string',
                'accountId': 'string',
                'userName': 'string'
            },
            'eventDetails': {
                'title': 'string',
                'description': 'string',
                'eventMetadata': {
                    'serviceCreated': {},
                    'serviceDeleted': {},
                    'serviceSystemAssociated': {
                        'systemName': 'string',
                        'systemArn': 'string'
                    },
                    'serviceSystemDisassociated': {
                        'systemId': 'string',
                        'systemName': 'string',
                        'systemArn': 'string'
                    },
                    'serviceResourcesAssociated': {
                        'resourceCount': 123,
                        'resourceTypes': [
                            'string',
                        ]
                    },
                    'serviceResourcesDisassociated': {
                        'resourceCount': 123,
                        'resourceTypes': [
                            'string',
                        ]
                    },
                    'serviceWorkflowUpdated': {
                        'serviceFunctionId': 'string',
                        'serviceFunctionName': 'string'
                    },
                    'serviceInputSourcesUpdated': {},
                    'servicePolicyAssociated': {
                        'policyName': 'string',
                        'policyArn': 'string'
                    },
                    'servicePolicyDisassociated': {
                        'policyName': 'string',
                        'policyArn': 'string'
                    },
                    'serviceFunctionCreated': {
                        'serviceFunctionId': 'string',
                        'serviceFunctionName': 'string'
                    },
                    'serviceFunctionUpdated': {
                        'serviceFunctionId': 'string',
                        'serviceFunctionName': 'string',
                        'resourcesAdded': [
                            'string',
                        ],
                        'resourcesRemoved': [
                            'string',
                        ]
                    },
                    'serviceFunctionDeleted': {
                        'serviceFunctionId': 'string',
                        'serviceFunctionName': 'string'
                    },
                    'serviceFunctionResourcesAdded': {
                        'serviceFunctionId': 'string',
                        'serviceFunctionName': 'string',
                        'resourcesAdded': [
                            'string',
                        ]
                    },
                    'serviceFunctionResourcesRemoved': {
                        'serviceFunctionId': 'string',
                        'serviceFunctionName': 'string',
                        'resourcesRemoved': [
                            'string',
                        ]
                    },
                    'serviceAchievabilityUpdated': {
                        'assessmentId': 'string',
                        'availabilitySlo': 'string',
                        'multiAzRtoRpo': 'string',
                        'multiRegionRtoRpo': 'string'
                    },
                    'assertionCreated': {
                        'assertionId': 'string',
                        'assertionName': 'string'
                    },
                    'assertionUpdated': {
                        'assertionId': 'string',
                        'assertionName': 'string'
                    },
                    'assertionDeleted': {
                        'assertionId': 'string',
                        'assertionName': 'string'
                    }
                }
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) –

    • events (list) –

      The list of service events.

      • (dict) –

        Represents an event in the service event log.

        • eventId (string) –

          The unique identifier of the event.

        • timestamp (datetime) –

          The timestamp of the event.

        • eventType (string) –

          The type of the event.

        • serviceArn (string) –

          ARN identifier.

        • actor (dict) –

          The actor that triggered the 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) –

            The title of the event.

          • description (string) –

            The description of the event.

          • eventMetadata (dict) –

            Type-specific metadata for each service event type.

            Note

            This is a Tagged Union structure. Only one of the following top level keys will be set: serviceCreated, serviceDeleted, serviceSystemAssociated, serviceSystemDisassociated, serviceResourcesAssociated, serviceResourcesDisassociated, serviceWorkflowUpdated, serviceInputSourcesUpdated, servicePolicyAssociated, servicePolicyDisassociated, serviceFunctionCreated, serviceFunctionUpdated, serviceFunctionDeleted, serviceFunctionResourcesAdded, serviceFunctionResourcesRemoved, serviceAchievabilityUpdated, assertionCreated, assertionUpdated, assertionDeleted. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

            'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
            
            • serviceCreated (dict) –

              Metadata for a service created event.

            • serviceDeleted (dict) –

              Metadata for a service deleted event.

            • serviceSystemAssociated (dict) –

              Metadata for a service system associated event.

              • systemName (string) –

                The name of the associated system.

              • systemArn (string) –

                ARN identifier.

            • serviceSystemDisassociated (dict) –

              Metadata for a service system disassociated event.

              • systemId (string) –

                The identifier of the disassociated system.

              • systemName (string) –

                The name of the disassociated system.

              • systemArn (string) –

                ARN identifier.

            • serviceResourcesAssociated (dict) –

              Metadata for a service resources associated event.

              • resourceCount (integer) –

                The number of resources associated.

              • resourceTypes (list) –

                The types of resources associated.

                • (string) –

            • serviceResourcesDisassociated (dict) –

              Metadata for a service resources disassociated event.

              • resourceCount (integer) –

                The number of resources disassociated.

              • resourceTypes (list) –

                The types of resources disassociated.

                • (string) –

            • serviceWorkflowUpdated (dict) –

              Metadata for a service workflow updated event.

              • serviceFunctionId (string) –

                The identifier of the service function.

              • serviceFunctionName (string) –

                The name of the service function.

            • serviceInputSourcesUpdated (dict) –

              Metadata for a service input sources updated event.

            • servicePolicyAssociated (dict) –

              Metadata for a service policy associated event.

              • policyName (string) –

                The name of the associated policy.

              • policyArn (string) –

                ARN identifier.

            • servicePolicyDisassociated (dict) –

              Metadata for a service policy disassociated event.

              • policyName (string) –

                The name of the disassociated policy.

              • policyArn (string) –

                ARN identifier.

            • serviceFunctionCreated (dict) –

              Metadata for a service function created event.

              • serviceFunctionId (string) –

                The identifier of the created service function.

              • serviceFunctionName (string) –

                The name of the created service function.

            • serviceFunctionUpdated (dict) –

              Metadata for a service function updated event.

              • serviceFunctionId (string) –

                The identifier of the service function.

              • serviceFunctionName (string) –

                The name of the service function.

              • resourcesAdded (list) –

                The list of resource ARNs that were added.

                • (string) –

                  ARN identifier.

              • resourcesRemoved (list) –

                The list of resource ARNs that were removed.

                • (string) –

                  ARN identifier.

            • serviceFunctionDeleted (dict) –

              Metadata for a service function deleted event.

              • serviceFunctionId (string) –

                The identifier of the deleted service function.

              • serviceFunctionName (string) –

                The name of the deleted service function.

            • serviceFunctionResourcesAdded (dict) –

              Metadata for a service function resources added event.

              • serviceFunctionId (string) –

                The identifier of the service function.

              • serviceFunctionName (string) –

                The name of the service function.

              • resourcesAdded (list) –

                The list of resource ARNs that were added.

                • (string) –

                  ARN identifier.

            • serviceFunctionResourcesRemoved (dict) –

              Metadata for a service function resources removed event.

              • serviceFunctionId (string) –

                The identifier of the service function.

              • serviceFunctionName (string) –

                The name of the service function.

              • resourcesRemoved (list) –

                The list of resource ARNs that were removed.

                • (string) –

                  ARN identifier.

            • serviceAchievabilityUpdated (dict) –

              Metadata for a service achievability updated event.

              • assessmentId (string) –

                The assessment identifier that triggered the update.

              • availabilitySlo (string) –

                The updated achievability status of the availability SLO.

              • multiAzRtoRpo (string) –

                The updated achievability status of the multi-AZ RTO and RPO targets.

              • multiRegionRtoRpo (string) –

                The updated achievability status of the multi-Region RTO and RPO targets.

            • assertionCreated (dict) –

              Metadata for an assertion created event.

              • assertionId (string) –

                The unique identifier of the created assertion.

              • assertionName (string) –

                The name of the created assertion.

            • assertionUpdated (dict) –

              Metadata for an assertion updated event.

              • assertionId (string) –

                The unique identifier of the updated assertion.

              • assertionName (string) –

                The name of the updated assertion.

            • assertionDeleted (dict) –

              Metadata for an assertion deleted event.

              • assertionId (string) –

                The unique identifier of the deleted assertion.

              • assertionName (string) –

                The name of the deleted assertion.

    • nextToken (string) –

      Pagination token.

Exceptions

  • ResilienceHubV2.Client.exceptions.InternalServerException

  • ResilienceHubV2.Client.exceptions.ResourceNotFoundException

  • ResilienceHubV2.Client.exceptions.ValidationException

  • ResilienceHubV2.Client.exceptions.AccessDeniedException