import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages the Vulnerability Assessment for an MS Managed Instance. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * * const example = new azure.core.ResourceGroup("example", { * name: "example-resources", * location: "West Europe", * }); * const exampleVirtualNetwork = new azure.network.VirtualNetwork("example", { * name: "example", * location: example.location, * resourceGroupName: example.name, * addressSpaces: ["10.0.0.0/16"], * }); * const exampleSubnet = new azure.network.Subnet("example", { * name: "example", * resourceGroupName: example.name, * virtualNetworkName: exampleVirtualNetwork.name, * addressPrefixes: ["10.0.2.0/24"], * }); * const exampleManagedInstance = new azure.mssql.ManagedInstance("example", { * name: "exampleinstance", * resourceGroupName: example.name, * location: example.location, * licenseType: "BasePrice", * skuName: "GP_Gen5", * storageSizeInGb: 32, * subnetId: exampleSubnet.id, * vcores: 4, * administratorLogin: "missadministrator", * administratorLoginPassword: "NCC-1701-D", * }); * const exampleAccount = new azure.storage.Account("example", { * name: "accteststorageaccount", * resourceGroupName: example.name, * location: example.location, * accountTier: "Standard", * accountReplicationType: "GRS", * }); * const exampleContainer = new azure.storage.Container("example", { * name: "accteststoragecontainer", * storageAccountName: exampleAccount.name, * containerAccessType: "private", * }); * const exampleManagedInstanceSecurityAlertPolicy = new azure.mssql.ManagedInstanceSecurityAlertPolicy("example", { * resourceGroupName: testAzurermResourceGroup.name, * managedInstanceName: test.name, * enabled: true, * storageEndpoint: testAzurermStorageAccount.primaryBlobEndpoint, * storageAccountAccessKey: testAzurermStorageAccount.primaryAccessKey, * retentionDays: 30, * }); * const exampleManagedInstanceVulnerabilityAssessment = new azure.mssql.ManagedInstanceVulnerabilityAssessment("example", { * managedInstanceId: exampleManagedInstance.id, * storageContainerPath: pulumi.interpolate`${exampleAccount.primaryBlobEndpoint}${exampleContainer.name}/`, * storageAccountAccessKey: exampleAccount.primaryAccessKey, * recurringScans: { * enabled: true, * emailSubscriptionAdmins: true, * emails: [ * "email@example1.com", * "email@example2.com", * ], * }, * }, { * dependsOn: [exampleManagedInstanceSecurityAlertPolicy], * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.Sql` - 2023-08-01-preview * * ## Import * * The Vulnerability Assessment can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:mssql/managedInstanceVulnerabilityAssessment:ManagedInstanceVulnerabilityAssessment example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acceptanceTestResourceGroup1/providers/Microsoft.Sql/managedInstances/instance1/vulnerabilityAssessments/Default * ``` */ export declare class ManagedInstanceVulnerabilityAssessment extends pulumi.CustomResource { /** * Get an existing ManagedInstanceVulnerabilityAssessment resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: ManagedInstanceVulnerabilityAssessmentState, opts?: pulumi.CustomResourceOptions): ManagedInstanceVulnerabilityAssessment; /** * Returns true if the given object is an instance of ManagedInstanceVulnerabilityAssessment. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is ManagedInstanceVulnerabilityAssessment; /** * The id of the MS SQL Managed Instance. Changing this forces a new resource to be created. */ readonly managedInstanceId: pulumi.Output; /** * The recurring scans settings. The `recurringScans` block supports fields documented below. */ readonly recurringScans: pulumi.Output; /** * Specifies the identifier key of the storage account for vulnerability assessment scan results. If `storageContainerSasKey` isn't specified, `storageAccountAccessKey` is required. * * > **Note:** The `storageAccountAccessKey` only applies if the storage account is not behind a virtual network or a firewall. */ readonly storageAccountAccessKey: pulumi.Output; /** * A blob storage container path to hold the scan results (e.g. ). */ readonly storageContainerPath: pulumi.Output; /** * A shared access signature (SAS Key) that has write access to the blob container specified in `storageContainerPath` parameter. If `storageAccountAccessKey` isn't specified, `storageContainerSasKey` is required. * * > **Note:** The `storageContainerSasKey` only applies if the storage account is not behind a virtual network or a firewall. */ readonly storageContainerSasKey: pulumi.Output; /** * Create a ManagedInstanceVulnerabilityAssessment resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ManagedInstanceVulnerabilityAssessmentArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ManagedInstanceVulnerabilityAssessment resources. */ export interface ManagedInstanceVulnerabilityAssessmentState { /** * The id of the MS SQL Managed Instance. Changing this forces a new resource to be created. */ managedInstanceId?: pulumi.Input; /** * The recurring scans settings. The `recurringScans` block supports fields documented below. */ recurringScans?: pulumi.Input; /** * Specifies the identifier key of the storage account for vulnerability assessment scan results. If `storageContainerSasKey` isn't specified, `storageAccountAccessKey` is required. * * > **Note:** The `storageAccountAccessKey` only applies if the storage account is not behind a virtual network or a firewall. */ storageAccountAccessKey?: pulumi.Input; /** * A blob storage container path to hold the scan results (e.g. ). */ storageContainerPath?: pulumi.Input; /** * A shared access signature (SAS Key) that has write access to the blob container specified in `storageContainerPath` parameter. If `storageAccountAccessKey` isn't specified, `storageContainerSasKey` is required. * * > **Note:** The `storageContainerSasKey` only applies if the storage account is not behind a virtual network or a firewall. */ storageContainerSasKey?: pulumi.Input; } /** * The set of arguments for constructing a ManagedInstanceVulnerabilityAssessment resource. */ export interface ManagedInstanceVulnerabilityAssessmentArgs { /** * The id of the MS SQL Managed Instance. Changing this forces a new resource to be created. */ managedInstanceId: pulumi.Input; /** * The recurring scans settings. The `recurringScans` block supports fields documented below. */ recurringScans?: pulumi.Input; /** * Specifies the identifier key of the storage account for vulnerability assessment scan results. If `storageContainerSasKey` isn't specified, `storageAccountAccessKey` is required. * * > **Note:** The `storageAccountAccessKey` only applies if the storage account is not behind a virtual network or a firewall. */ storageAccountAccessKey?: pulumi.Input; /** * A blob storage container path to hold the scan results (e.g. ). */ storageContainerPath: pulumi.Input; /** * A shared access signature (SAS Key) that has write access to the blob container specified in `storageContainerPath` parameter. If `storageAccountAccessKey` isn't specified, `storageContainerSasKey` is required. * * > **Note:** The `storageContainerSasKey` only applies if the storage account is not behind a virtual network or a firewall. */ storageContainerSasKey?: pulumi.Input; }