1. Packages
  2. Azure Native
  3. API Docs
  4. sql
  5. SqlVulnerabilityAssessmentsSetting
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.50.1 published on Tuesday, Jul 16, 2024 by Pulumi

azure-native.sql.SqlVulnerabilityAssessmentsSetting

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.50.1 published on Tuesday, Jul 16, 2024 by Pulumi

    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.

    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",
        });
    
    });
    
    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
    	})
    }
    
    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());
    
        }
    }
    
    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")
    
    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",
    });
    
    resources:
      sqlVulnerabilityAssessmentsSetting:
        type: azure-native:sql:SqlVulnerabilityAssessmentsSetting
        properties:
          resourceGroupName: vulnerabilityaseessmenttest-4799
          serverName: vulnerabilityaseessmenttest-6440
          state: Enabled
          vulnerabilityAssessmentName: default
    

    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 string
    The unique name of the resource.
    args SqlVulnerabilityAssessmentsSettingArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args 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 string
    The unique name of the resource.
    args SqlVulnerabilityAssessmentsSettingArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SqlVulnerabilityAssessmentsSettingArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args 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 = AzureNative.Sql.SqlVulnerabilityAssessmentState.Enabled,
        VulnerabilityAssessmentName = "string",
    });
    
    example, err := sql.NewSqlVulnerabilityAssessmentsSetting(ctx, "sqlVulnerabilityAssessmentsSettingResource", &sql.SqlVulnerabilityAssessmentsSettingArgs{
    	ResourceGroupName:           pulumi.String("string"),
    	ServerName:                  pulumi.String("string"),
    	State:                       sql.SqlVulnerabilityAssessmentStateEnabled,
    	VulnerabilityAssessmentName: pulumi.String("string"),
    })
    
    var sqlVulnerabilityAssessmentsSettingResource = new SqlVulnerabilityAssessmentsSetting("sqlVulnerabilityAssessmentsSettingResource", SqlVulnerabilityAssessmentsSettingArgs.builder()
        .resourceGroupName("string")
        .serverName("string")
        .state("Enabled")
        .vulnerabilityAssessmentName("string")
        .build());
    
    sql_vulnerability_assessments_setting_resource = azure_native.sql.SqlVulnerabilityAssessmentsSetting("sqlVulnerabilityAssessmentsSettingResource",
        resource_group_name="string",
        server_name="string",
        state=azure_native.sql.SqlVulnerabilityAssessmentState.ENABLED,
        vulnerability_assessment_name="string")
    
    const sqlVulnerabilityAssessmentsSettingResource = new azure_native.sql.SqlVulnerabilityAssessmentsSetting("sqlVulnerabilityAssessmentsSettingResource", {
        resourceGroupName: "string",
        serverName: "string",
        state: azure_native.sql.SqlVulnerabilityAssessmentState.Enabled,
        vulnerabilityAssessmentName: "string",
    });
    
    type: azure-native:sql:SqlVulnerabilityAssessmentsSetting
    properties:
        resourceGroupName: string
        serverName: string
        state: Enabled
        vulnerabilityAssessmentName: string
    

    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

    The SqlVulnerabilityAssessmentsSetting resource accepts the following input properties:

    ResourceGroupName 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 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 string
    The name of the SQL Vulnerability Assessment.
    ResourceGroupName 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 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 string
    The name of the SQL Vulnerability Assessment.
    resourceGroupName 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 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 String
    The name of the SQL Vulnerability Assessment.
    resourceGroupName 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 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 string
    The name of the SQL Vulnerability Assessment.
    resource_group_name 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 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 str
    The name of the SQL Vulnerability Assessment.
    resourceGroupName 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 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 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} 
    

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

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
    Azure Native v2.50.1 published on Tuesday, Jul 16, 2024 by Pulumi