unsubscribe_from_event

unsubscribe_from_event(**kwargs)

Disables 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.unsubscribe_from_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 stop receiving SNS notifications.

  • event (string) --

    [REQUIRED]

    The event for which you want to stop receiving SNS notifications.

  • topicArn (string) --

    [REQUIRED]

    The ARN of the SNS topic to which SNS notifications are sent.

Returns

None

Exceptions

  • Inspector.Client.exceptions.InternalException
  • Inspector.Client.exceptions.InvalidInputException
  • Inspector.Client.exceptions.AccessDeniedException
  • Inspector.Client.exceptions.NoSuchEntityException
  • Inspector.Client.exceptions.ServiceTemporarilyUnavailableException

Examples

Disables the process of sending Amazon Simple Notification Service (SNS) notifications about a specified event to a specified SNS topic.

response = client.unsubscribe_from_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': {
        '...': '...',
    },
}