createConnector

Creates a connector that links an external cloud provider to Amazon Inspector for vulnerability scanning.

Samples

// Create an Azure customer managed connector for VM scanning at SUBSCRIPTION scope
val resp = inspector2Client.createConnector {
    name = "my-azure-connector"
    description = "Azure subscription scanner"
    provider = ConnectorCloudProvider.fromValue("AZURE")
    providerDetail = ProviderDetailCreate.Azure(AzureProviderDetailCreate {
        awsConfigConnectorArn = "arn:aws:config:us-east-1:123456789012:connector/azure/a7bc5463-04ce-4b52-901e-f26f7292a4a7/2fbed4bd-5b95-4947-a751-8defc76ecdae"
        scopeConfiguration = AzureScopeConfigurationInput {
            vmScanning = ScopeConfigurationInput {
                scopeType = ScopeType.fromValue("SUBSCRIPTION")
                scopeValues = listOf<String>(
                    "552802f5-1492-4184-bbae-7291c9939b16"
                )
            }
        }
        azureRegions = listOf<String>(
            "eastus"
        )
        autoInstallVmScanner = true
    }
    )
    tags = mapOf<String, String>(
        "env" to "prod",
        "owner" to "security-team"
    )
}