1. Packages
  2. Azure Native v2
  3. API Docs
  4. sql
  5. SqlVulnerabilityAssessmentsSetting
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.82.0 published on Friday, Jan 10, 2025 by Pulumi

azure-native-v2.sql.SqlVulnerabilityAssessmentsSetting

Explore with Pulumi AI

A SQL Vulnerability Assessment. Azure REST API version: 2022-11-01-preview.

Other available API versions: 2023-02-01-preview, 2023-05-01-preview, 2023-08-01-preview, 2024-05-01-preview.

Example Usage

Create a SQL Vulnerability Assessment policy

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var sqlVulnerabilityAssessmentsSetting = new AzureNative.Sql.SqlVulnerabilityAssessmentsSetting("sqlVulnerabilityAssessmentsSetting", new()
    {
        ResourceGroupName = "vulnerabilityaseessmenttest-4799",
        ServerName = "vulnerabilityaseessmenttest-6440",
        State = AzureNative.Sql.SqlVulnerabilityAssessmentState.Enabled,
        VulnerabilityAssessmentName = "default",
    });

});
Copy
package main

import (
	sql "github.com/pulumi/pulumi-azure-native-sdk/sql/v2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := sql.NewSqlVulnerabilityAssessmentsSetting(ctx, "sqlVulnerabilityAssessmentsSetting", &sql.SqlVulnerabilityAssessmentsSettingArgs{
			ResourceGroupName:           pulumi.String("vulnerabilityaseessmenttest-4799"),
			ServerName:                  pulumi.String("vulnerabilityaseessmenttest-6440"),
			State:                       sql.SqlVulnerabilityAssessmentStateEnabled,
			VulnerabilityAssessmentName: pulumi.String("default"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.sql.SqlVulnerabilityAssessmentsSetting;
import com.pulumi.azurenative.sql.SqlVulnerabilityAssessmentsSettingArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var sqlVulnerabilityAssessmentsSetting = new SqlVulnerabilityAssessmentsSetting("sqlVulnerabilityAssessmentsSetting", SqlVulnerabilityAssessmentsSettingArgs.builder()
            .resourceGroupName("vulnerabilityaseessmenttest-4799")
            .serverName("vulnerabilityaseessmenttest-6440")
            .state("Enabled")
            .vulnerabilityAssessmentName("default")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const sqlVulnerabilityAssessmentsSetting = new azure_native.sql.SqlVulnerabilityAssessmentsSetting("sqlVulnerabilityAssessmentsSetting", {
    resourceGroupName: "vulnerabilityaseessmenttest-4799",
    serverName: "vulnerabilityaseessmenttest-6440",
    state: azure_native.sql.SqlVulnerabilityAssessmentState.Enabled,
    vulnerabilityAssessmentName: "default",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

sql_vulnerability_assessments_setting = azure_native.sql.SqlVulnerabilityAssessmentsSetting("sqlVulnerabilityAssessmentsSetting",
    resource_group_name="vulnerabilityaseessmenttest-4799",
    server_name="vulnerabilityaseessmenttest-6440",
    state=azure_native.sql.SqlVulnerabilityAssessmentState.ENABLED,
    vulnerability_assessment_name="default")
Copy
resources:
  sqlVulnerabilityAssessmentsSetting:
    type: azure-native:sql:SqlVulnerabilityAssessmentsSetting
    properties:
      resourceGroupName: vulnerabilityaseessmenttest-4799
      serverName: vulnerabilityaseessmenttest-6440
      state: Enabled
      vulnerabilityAssessmentName: default
Copy

Create SqlVulnerabilityAssessmentsSetting Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new SqlVulnerabilityAssessmentsSetting(name: string, args: SqlVulnerabilityAssessmentsSettingArgs, opts?: CustomResourceOptions);
@overload
def SqlVulnerabilityAssessmentsSetting(resource_name: str,
                                       args: SqlVulnerabilityAssessmentsSettingArgs,
                                       opts: Optional[ResourceOptions] = None)

@overload
def SqlVulnerabilityAssessmentsSetting(resource_name: str,
                                       opts: Optional[ResourceOptions] = None,
                                       resource_group_name: Optional[str] = None,
                                       server_name: Optional[str] = None,
                                       state: Optional[SqlVulnerabilityAssessmentState] = None,
                                       vulnerability_assessment_name: Optional[str] = None)
func NewSqlVulnerabilityAssessmentsSetting(ctx *Context, name string, args SqlVulnerabilityAssessmentsSettingArgs, opts ...ResourceOption) (*SqlVulnerabilityAssessmentsSetting, error)
public SqlVulnerabilityAssessmentsSetting(string name, SqlVulnerabilityAssessmentsSettingArgs args, CustomResourceOptions? opts = null)
public SqlVulnerabilityAssessmentsSetting(String name, SqlVulnerabilityAssessmentsSettingArgs args)
public SqlVulnerabilityAssessmentsSetting(String name, SqlVulnerabilityAssessmentsSettingArgs args, CustomResourceOptions options)
type: azure-native:sql:SqlVulnerabilityAssessmentsSetting
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. SqlVulnerabilityAssessmentsSettingArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. SqlVulnerabilityAssessmentsSettingArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. SqlVulnerabilityAssessmentsSettingArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. SqlVulnerabilityAssessmentsSettingArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. SqlVulnerabilityAssessmentsSettingArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var sqlVulnerabilityAssessmentsSettingResource = new AzureNative.Sql.SqlVulnerabilityAssessmentsSetting("sqlVulnerabilityAssessmentsSettingResource", new()
{
    ResourceGroupName = "string",
    ServerName = "string",
    State = "Enabled",
    VulnerabilityAssessmentName = "string",
});
Copy
example, err := sql.NewSqlVulnerabilityAssessmentsSetting(ctx, "sqlVulnerabilityAssessmentsSettingResource", &sql.SqlVulnerabilityAssessmentsSettingArgs{
	ResourceGroupName:           "string",
	ServerName:                  "string",
	State:                       "Enabled",
	VulnerabilityAssessmentName: "string",
})
Copy
var sqlVulnerabilityAssessmentsSettingResource = new SqlVulnerabilityAssessmentsSetting("sqlVulnerabilityAssessmentsSettingResource", SqlVulnerabilityAssessmentsSettingArgs.builder()
    .resourceGroupName("string")
    .serverName("string")
    .state("Enabled")
    .vulnerabilityAssessmentName("string")
    .build());
Copy
sql_vulnerability_assessments_setting_resource = azure_native.sql.SqlVulnerabilityAssessmentsSetting("sqlVulnerabilityAssessmentsSettingResource",
    resource_group_name=string,
    server_name=string,
    state=Enabled,
    vulnerability_assessment_name=string)
Copy
const sqlVulnerabilityAssessmentsSettingResource = new azure_native.sql.SqlVulnerabilityAssessmentsSetting("sqlVulnerabilityAssessmentsSettingResource", {
    resourceGroupName: "string",
    serverName: "string",
    state: "Enabled",
    vulnerabilityAssessmentName: "string",
});
Copy
type: azure-native:sql:SqlVulnerabilityAssessmentsSetting
properties:
    resourceGroupName: string
    serverName: string
    state: Enabled
    vulnerabilityAssessmentName: string
Copy

SqlVulnerabilityAssessmentsSetting Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The SqlVulnerabilityAssessmentsSetting resource accepts the following input properties:

ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
ServerName
This property is required.
Changes to this property will trigger replacement.
string
The name of the server.
State Pulumi.AzureNative.Sql.SqlVulnerabilityAssessmentState
Specifies the state of the SQL Vulnerability Assessment, whether it is enabled or disabled or a state has not been applied yet on the specific database or server.
VulnerabilityAssessmentName Changes to this property will trigger replacement. string
The name of the SQL Vulnerability Assessment.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
ServerName
This property is required.
Changes to this property will trigger replacement.
string
The name of the server.
State SqlVulnerabilityAssessmentState
Specifies the state of the SQL Vulnerability Assessment, whether it is enabled or disabled or a state has not been applied yet on the specific database or server.
VulnerabilityAssessmentName Changes to this property will trigger replacement. string
The name of the SQL Vulnerability Assessment.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
serverName
This property is required.
Changes to this property will trigger replacement.
String
The name of the server.
state SqlVulnerabilityAssessmentState
Specifies the state of the SQL Vulnerability Assessment, whether it is enabled or disabled or a state has not been applied yet on the specific database or server.
vulnerabilityAssessmentName Changes to this property will trigger replacement. String
The name of the SQL Vulnerability Assessment.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
serverName
This property is required.
Changes to this property will trigger replacement.
string
The name of the server.
state SqlVulnerabilityAssessmentState
Specifies the state of the SQL Vulnerability Assessment, whether it is enabled or disabled or a state has not been applied yet on the specific database or server.
vulnerabilityAssessmentName Changes to this property will trigger replacement. string
The name of the SQL Vulnerability Assessment.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
server_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the server.
state SqlVulnerabilityAssessmentState
Specifies the state of the SQL Vulnerability Assessment, whether it is enabled or disabled or a state has not been applied yet on the specific database or server.
vulnerability_assessment_name Changes to this property will trigger replacement. str
The name of the SQL Vulnerability Assessment.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
serverName
This property is required.
Changes to this property will trigger replacement.
String
The name of the server.
state "Enabled" | "Disabled"
Specifies the state of the SQL Vulnerability Assessment, whether it is enabled or disabled or a state has not been applied yet on the specific database or server.
vulnerabilityAssessmentName Changes to this property will trigger replacement. String
The name of the SQL Vulnerability Assessment.

Outputs

All input properties are implicitly available as output properties. Additionally, the SqlVulnerabilityAssessmentsSetting resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Name string
Resource name.
SystemData Pulumi.AzureNative.Sql.Outputs.SystemDataResponse
SystemData of SqlVulnerabilityAssessmentResource.
Type string
Resource type.
Id string
The provider-assigned unique ID for this managed resource.
Name string
Resource name.
SystemData SystemDataResponse
SystemData of SqlVulnerabilityAssessmentResource.
Type string
Resource type.
id String
The provider-assigned unique ID for this managed resource.
name String
Resource name.
systemData SystemDataResponse
SystemData of SqlVulnerabilityAssessmentResource.
type String
Resource type.
id string
The provider-assigned unique ID for this managed resource.
name string
Resource name.
systemData SystemDataResponse
SystemData of SqlVulnerabilityAssessmentResource.
type string
Resource type.
id str
The provider-assigned unique ID for this managed resource.
name str
Resource name.
system_data SystemDataResponse
SystemData of SqlVulnerabilityAssessmentResource.
type str
Resource type.
id String
The provider-assigned unique ID for this managed resource.
name String
Resource name.
systemData Property Map
SystemData of SqlVulnerabilityAssessmentResource.
type String
Resource type.

Supporting Types

SqlVulnerabilityAssessmentState
, SqlVulnerabilityAssessmentStateArgs

Enabled
Enabled
Disabled
Disabled
SqlVulnerabilityAssessmentStateEnabled
Enabled
SqlVulnerabilityAssessmentStateDisabled
Disabled
Enabled
Enabled
Disabled
Disabled
Enabled
Enabled
Disabled
Disabled
ENABLED
Enabled
DISABLED
Disabled
"Enabled"
Enabled
"Disabled"
Disabled

SystemDataResponse
, SystemDataResponseArgs

CreatedAt string
The timestamp of resource creation (UTC).
CreatedBy string
The identity that created the resource.
CreatedByType string
The type of identity that created the resource.
LastModifiedAt string
The timestamp of resource last modification (UTC)
LastModifiedBy string
The identity that last modified the resource.
LastModifiedByType string
The type of identity that last modified the resource.
CreatedAt string
The timestamp of resource creation (UTC).
CreatedBy string
The identity that created the resource.
CreatedByType string
The type of identity that created the resource.
LastModifiedAt string
The timestamp of resource last modification (UTC)
LastModifiedBy string
The identity that last modified the resource.
LastModifiedByType string
The type of identity that last modified the resource.
createdAt String
The timestamp of resource creation (UTC).
createdBy String
The identity that created the resource.
createdByType String
The type of identity that created the resource.
lastModifiedAt String
The timestamp of resource last modification (UTC)
lastModifiedBy String
The identity that last modified the resource.
lastModifiedByType String
The type of identity that last modified the resource.
createdAt string
The timestamp of resource creation (UTC).
createdBy string
The identity that created the resource.
createdByType string
The type of identity that created the resource.
lastModifiedAt string
The timestamp of resource last modification (UTC)
lastModifiedBy string
The identity that last modified the resource.
lastModifiedByType string
The type of identity that last modified the resource.
created_at str
The timestamp of resource creation (UTC).
created_by str
The identity that created the resource.
created_by_type str
The type of identity that created the resource.
last_modified_at str
The timestamp of resource last modification (UTC)
last_modified_by str
The identity that last modified the resource.
last_modified_by_type str
The type of identity that last modified the resource.
createdAt String
The timestamp of resource creation (UTC).
createdBy String
The identity that created the resource.
createdByType String
The type of identity that created the resource.
lastModifiedAt String
The timestamp of resource last modification (UTC)
lastModifiedBy String
The identity that last modified the resource.
lastModifiedByType String
The type of identity that last modified the resource.

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:sql:SqlVulnerabilityAssessmentsSetting default /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName} 
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
azure-native-v2 pulumi/pulumi-azure-native
License
Apache-2.0