subscribeToEvent
inline suspend fun InspectorClient.subscribeToEvent(crossinline block: SubscribeToEventRequest.Builder.() -> Unit): SubscribeToEventResponse
Enables the process of sending Amazon Simple Notification Service (SNS) notifications about a specified event to a specified SNS topic.
Samples
fun main() {
//sampleStart
// Enables the process of sending Amazon Simple Notification Service (SNS) notifications about a
// specified event to a specified SNS topic.
inspectorClient.subscribeToEvent {
resourceArn = "arn:aws:inspector:us-west-2:123456789012:target/0-nvgVhaxX/template/0-7sbz2Kz0"
event = InspectorEvent.fromValue("ASSESSMENT_RUN_COMPLETED")
topicArn = "arn:aws:sns:us-west-2:123456789012:exampletopic"
}
//sampleEnd
}