Inspector / Client / subscribe_to_event
subscribe_to_event#
- Inspector.Client.subscribe_to_event(**kwargs)#
- Enables the process of sending Amazon Simple Notification Service (SNS) notifications about a specified event to a specified SNS topic. - See also: AWS API Documentation - Request Syntax - response = client.subscribe_to_event( resourceArn='string', event='ASSESSMENT_RUN_STARTED'|'ASSESSMENT_RUN_COMPLETED'|'ASSESSMENT_RUN_STATE_CHANGED'|'FINDING_REPORTED'|'OTHER', topicArn='string' ) - Parameters:
- resourceArn (string) – - [REQUIRED] - The ARN of the assessment template that is used during the event for which you want to receive SNS notifications. 
- event (string) – - [REQUIRED] - The event for which you want to receive SNS notifications. 
- topicArn (string) – - [REQUIRED] - The ARN of the SNS topic to which the SNS notifications are sent. 
 
- Returns:
- None 
 - Exceptions - Inspector.Client.exceptions.InternalException
- Inspector.Client.exceptions.InvalidInputException
- Inspector.Client.exceptions.LimitExceededException
- Inspector.Client.exceptions.AccessDeniedException
- Inspector.Client.exceptions.NoSuchEntityException
- Inspector.Client.exceptions.ServiceTemporarilyUnavailableException
 - Examples - Enables the process of sending Amazon Simple Notification Service (SNS) notifications about a specified event to a specified SNS topic. - response = client.subscribe_to_event( event='ASSESSMENT_RUN_COMPLETED', resourceArn='arn:aws:inspector:us-west-2:123456789012:target/0-nvgVhaxX/template/0-7sbz2Kz0', topicArn='arn:aws:sns:us-west-2:123456789012:exampletopic', ) print(response) - Expected Output: - { 'ResponseMetadata': { '...': '...', }, }