createResourceGroup

Creates a resource group using the specified set of tags (key and value pairs) that are used to select the EC2 instances to be included in an Amazon Inspector assessment target. The created resource group is then used to create an Amazon Inspector assessment target. For more information, see CreateAssessmentTarget.

Samples

import aws.sdk.kotlin.services.inspector.model.ResourceGroupTag
fun main() { 
   //sampleStart 
   // Creates a resource group using the specified set of tags (key and value pairs) that are used to
// select the EC2 instances to be included in an Amazon Inspector assessment target. The created resource
// group is then used to create an Amazon Inspector assessment target.
val resp = inspectorClient.createResourceGroup {
    resourceGroupTags = listOf<ResourceGroupTag>(
        ResourceGroupTag {
            key = "Name"
            value = "example"
        }            
    )
} 
   //sampleEnd
}