1. Packages
  2. Azure Native
  3. API Docs
  4. sql
  5. SqlVulnerabilityAssessmentRuleBaseline
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.47.1 published on Monday, Jun 24, 2024 by Pulumi

azure-native.sql.SqlVulnerabilityAssessmentRuleBaseline

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.47.1 published on Monday, Jun 24, 2024 by Pulumi

    A database sql vulnerability assessment rule baseline. 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

    Creates or updates a database's vulnerability assessment rule baseline.

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var sqlVulnerabilityAssessmentRuleBaseline = new AzureNative.Sql.SqlVulnerabilityAssessmentRuleBaseline("sqlVulnerabilityAssessmentRuleBaseline", new()
        {
            BaselineName = "default",
            LatestScan = false,
            ResourceGroupName = "vulnerabilityaseessmenttest-4799",
            Results = new[]
            {
                new[]
                {
                    "userA",
                    "SELECT",
                },
                new[]
                {
                    "userB",
                    "SELECT",
                },
                new[]
                {
                    "userC",
                    "SELECT",
                },
            },
            RuleId = "VA1001",
            ServerName = "vulnerabilityaseessmenttest-6440",
            SystemDatabaseName = "master",
            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.NewSqlVulnerabilityAssessmentRuleBaseline(ctx, "sqlVulnerabilityAssessmentRuleBaseline", &sql.SqlVulnerabilityAssessmentRuleBaselineArgs{
    			BaselineName:      pulumi.String("default"),
    			LatestScan:        pulumi.Bool(false),
    			ResourceGroupName: pulumi.String("vulnerabilityaseessmenttest-4799"),
    			Results: pulumi.StringArrayArray{
    				pulumi.StringArray{
    					pulumi.String("userA"),
    					pulumi.String("SELECT"),
    				},
    				pulumi.StringArray{
    					pulumi.String("userB"),
    					pulumi.String("SELECT"),
    				},
    				pulumi.StringArray{
    					pulumi.String("userC"),
    					pulumi.String("SELECT"),
    				},
    			},
    			RuleId:                      pulumi.String("VA1001"),
    			ServerName:                  pulumi.String("vulnerabilityaseessmenttest-6440"),
    			SystemDatabaseName:          pulumi.String("master"),
    			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.SqlVulnerabilityAssessmentRuleBaseline;
    import com.pulumi.azurenative.sql.SqlVulnerabilityAssessmentRuleBaselineArgs;
    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 sqlVulnerabilityAssessmentRuleBaseline = new SqlVulnerabilityAssessmentRuleBaseline("sqlVulnerabilityAssessmentRuleBaseline", SqlVulnerabilityAssessmentRuleBaselineArgs.builder()
                .baselineName("default")
                .latestScan(false)
                .resourceGroupName("vulnerabilityaseessmenttest-4799")
                .results(            
                                    
                        "userA",
                        "SELECT",
                                    
                        "userB",
                        "SELECT",
                                    
                        "userC",
                        "SELECT")
                .ruleId("VA1001")
                .serverName("vulnerabilityaseessmenttest-6440")
                .systemDatabaseName("master")
                .vulnerabilityAssessmentName("default")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    sql_vulnerability_assessment_rule_baseline = azure_native.sql.SqlVulnerabilityAssessmentRuleBaseline("sqlVulnerabilityAssessmentRuleBaseline",
        baseline_name="default",
        latest_scan=False,
        resource_group_name="vulnerabilityaseessmenttest-4799",
        results=[
            [
                "userA",
                "SELECT",
            ],
            [
                "userB",
                "SELECT",
            ],
            [
                "userC",
                "SELECT",
            ],
        ],
        rule_id="VA1001",
        server_name="vulnerabilityaseessmenttest-6440",
        system_database_name="master",
        vulnerability_assessment_name="default")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const sqlVulnerabilityAssessmentRuleBaseline = new azure_native.sql.SqlVulnerabilityAssessmentRuleBaseline("sqlVulnerabilityAssessmentRuleBaseline", {
        baselineName: "default",
        latestScan: false,
        resourceGroupName: "vulnerabilityaseessmenttest-4799",
        results: [
            [
                "userA",
                "SELECT",
            ],
            [
                "userB",
                "SELECT",
            ],
            [
                "userC",
                "SELECT",
            ],
        ],
        ruleId: "VA1001",
        serverName: "vulnerabilityaseessmenttest-6440",
        systemDatabaseName: "master",
        vulnerabilityAssessmentName: "default",
    });
    
    resources:
      sqlVulnerabilityAssessmentRuleBaseline:
        type: azure-native:sql:SqlVulnerabilityAssessmentRuleBaseline
        properties:
          baselineName: default
          latestScan: false
          resourceGroupName: vulnerabilityaseessmenttest-4799
          results:
            - - userA
              - SELECT
            - - userB
              - SELECT
            - - userC
              - SELECT
          ruleId: VA1001
          serverName: vulnerabilityaseessmenttest-6440
          systemDatabaseName: master
          vulnerabilityAssessmentName: default
    

    Create SqlVulnerabilityAssessmentRuleBaseline Resource

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

    Constructor syntax

    new SqlVulnerabilityAssessmentRuleBaseline(name: string, args: SqlVulnerabilityAssessmentRuleBaselineArgs, opts?: CustomResourceOptions);
    @overload
    def SqlVulnerabilityAssessmentRuleBaseline(resource_name: str,
                                               args: SqlVulnerabilityAssessmentRuleBaselineArgs,
                                               opts: Optional[ResourceOptions] = None)
    
    @overload
    def SqlVulnerabilityAssessmentRuleBaseline(resource_name: str,
                                               opts: Optional[ResourceOptions] = None,
                                               baseline_name: Optional[str] = None,
                                               latest_scan: Optional[bool] = None,
                                               resource_group_name: Optional[str] = None,
                                               results: Optional[Sequence[Sequence[str]]] = None,
                                               server_name: Optional[str] = None,
                                               system_database_name: Optional[str] = None,
                                               vulnerability_assessment_name: Optional[str] = None,
                                               rule_id: Optional[str] = None)
    func NewSqlVulnerabilityAssessmentRuleBaseline(ctx *Context, name string, args SqlVulnerabilityAssessmentRuleBaselineArgs, opts ...ResourceOption) (*SqlVulnerabilityAssessmentRuleBaseline, error)
    public SqlVulnerabilityAssessmentRuleBaseline(string name, SqlVulnerabilityAssessmentRuleBaselineArgs args, CustomResourceOptions? opts = null)
    public SqlVulnerabilityAssessmentRuleBaseline(String name, SqlVulnerabilityAssessmentRuleBaselineArgs args)
    public SqlVulnerabilityAssessmentRuleBaseline(String name, SqlVulnerabilityAssessmentRuleBaselineArgs args, CustomResourceOptions options)
    
    type: azure-native:sql:SqlVulnerabilityAssessmentRuleBaseline
    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 SqlVulnerabilityAssessmentRuleBaselineArgs
    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 SqlVulnerabilityAssessmentRuleBaselineArgs
    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 SqlVulnerabilityAssessmentRuleBaselineArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SqlVulnerabilityAssessmentRuleBaselineArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SqlVulnerabilityAssessmentRuleBaselineArgs
    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 sqlVulnerabilityAssessmentRuleBaselineResource = new AzureNative.Sql.SqlVulnerabilityAssessmentRuleBaseline("sqlVulnerabilityAssessmentRuleBaselineResource", new()
    {
        BaselineName = "string",
        LatestScan = false,
        ResourceGroupName = "string",
        Results = new[]
        {
            new[]
            {
                "string",
            },
        },
        ServerName = "string",
        SystemDatabaseName = "string",
        VulnerabilityAssessmentName = "string",
        RuleId = "string",
    });
    
    example, err := sql.NewSqlVulnerabilityAssessmentRuleBaseline(ctx, "sqlVulnerabilityAssessmentRuleBaselineResource", &sql.SqlVulnerabilityAssessmentRuleBaselineArgs{
    BaselineName: pulumi.String("string"),
    LatestScan: pulumi.Bool(false),
    ResourceGroupName: pulumi.String("string"),
    Results: pulumi.StringArrayArray{
    pulumi.StringArray{
    pulumi.String("string"),
    },
    },
    ServerName: pulumi.String("string"),
    SystemDatabaseName: pulumi.String("string"),
    VulnerabilityAssessmentName: pulumi.String("string"),
    RuleId: pulumi.String("string"),
    })
    
    var sqlVulnerabilityAssessmentRuleBaselineResource = new SqlVulnerabilityAssessmentRuleBaseline("sqlVulnerabilityAssessmentRuleBaselineResource", SqlVulnerabilityAssessmentRuleBaselineArgs.builder()
        .baselineName("string")
        .latestScan(false)
        .resourceGroupName("string")
        .results("string")
        .serverName("string")
        .systemDatabaseName("string")
        .vulnerabilityAssessmentName("string")
        .ruleId("string")
        .build());
    
    sql_vulnerability_assessment_rule_baseline_resource = azure_native.sql.SqlVulnerabilityAssessmentRuleBaseline("sqlVulnerabilityAssessmentRuleBaselineResource",
        baseline_name="string",
        latest_scan=False,
        resource_group_name="string",
        results=[["string"]],
        server_name="string",
        system_database_name="string",
        vulnerability_assessment_name="string",
        rule_id="string")
    
    const sqlVulnerabilityAssessmentRuleBaselineResource = new azure_native.sql.SqlVulnerabilityAssessmentRuleBaseline("sqlVulnerabilityAssessmentRuleBaselineResource", {
        baselineName: "string",
        latestScan: false,
        resourceGroupName: "string",
        results: [["string"]],
        serverName: "string",
        systemDatabaseName: "string",
        vulnerabilityAssessmentName: "string",
        ruleId: "string",
    });
    
    type: azure-native:sql:SqlVulnerabilityAssessmentRuleBaseline
    properties:
        baselineName: string
        latestScan: false
        resourceGroupName: string
        results:
            - - string
        ruleId: string
        serverName: string
        systemDatabaseName: string
        vulnerabilityAssessmentName: string
    

    SqlVulnerabilityAssessmentRuleBaseline 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 SqlVulnerabilityAssessmentRuleBaseline resource accepts the following input properties:

    BaselineName string
    LatestScan bool
    The latest scan flag
    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.
    Results List<ImmutableArray<string>>
    The rule baseline result
    ServerName string
    The name of the server.
    SystemDatabaseName string
    The vulnerability assessment system database name.
    VulnerabilityAssessmentName string
    The name of the vulnerability assessment.
    RuleId string
    The vulnerability assessment rule ID.
    BaselineName string
    LatestScan bool
    The latest scan flag
    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.
    Results [][]string
    The rule baseline result
    ServerName string
    The name of the server.
    SystemDatabaseName string
    The vulnerability assessment system database name.
    VulnerabilityAssessmentName string
    The name of the vulnerability assessment.
    RuleId string
    The vulnerability assessment rule ID.
    baselineName String
    latestScan Boolean
    The latest scan flag
    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.
    results List<List<String>>
    The rule baseline result
    serverName String
    The name of the server.
    systemDatabaseName String
    The vulnerability assessment system database name.
    vulnerabilityAssessmentName String
    The name of the vulnerability assessment.
    ruleId String
    The vulnerability assessment rule ID.
    baselineName string
    latestScan boolean
    The latest scan flag
    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.
    results string[][]
    The rule baseline result
    serverName string
    The name of the server.
    systemDatabaseName string
    The vulnerability assessment system database name.
    vulnerabilityAssessmentName string
    The name of the vulnerability assessment.
    ruleId string
    The vulnerability assessment rule ID.
    baseline_name str
    latest_scan bool
    The latest scan flag
    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.
    results Sequence[Sequence[str]]
    The rule baseline result
    server_name str
    The name of the server.
    system_database_name str
    The vulnerability assessment system database name.
    vulnerability_assessment_name str
    The name of the vulnerability assessment.
    rule_id str
    The vulnerability assessment rule ID.
    baselineName String
    latestScan Boolean
    The latest scan flag
    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.
    results List<List<String>>
    The rule baseline result
    serverName String
    The name of the server.
    systemDatabaseName String
    The vulnerability assessment system database name.
    vulnerabilityAssessmentName String
    The name of the vulnerability assessment.
    ruleId String
    The vulnerability assessment rule ID.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SqlVulnerabilityAssessmentRuleBaseline 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 DatabaseSqlVulnerabilityAssessmentRuleBaselineResource.
    Type string
    Resource type.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Resource name.
    SystemData SystemDataResponse
    SystemData of DatabaseSqlVulnerabilityAssessmentRuleBaselineResource.
    Type string
    Resource type.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Resource name.
    systemData SystemDataResponse
    SystemData of DatabaseSqlVulnerabilityAssessmentRuleBaselineResource.
    type String
    Resource type.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    Resource name.
    systemData SystemDataResponse
    SystemData of DatabaseSqlVulnerabilityAssessmentRuleBaselineResource.
    type string
    Resource type.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    Resource name.
    system_data SystemDataResponse
    SystemData of DatabaseSqlVulnerabilityAssessmentRuleBaselineResource.
    type str
    Resource type.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Resource name.
    systemData Property Map
    SystemData of DatabaseSqlVulnerabilityAssessmentRuleBaselineResource.
    type String
    Resource type.

    Supporting Types

    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:SqlVulnerabilityAssessmentRuleBaseline Scan123 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines/{baselineName}/rules/{ruleId} 
    

    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.47.1 published on Monday, Jun 24, 2024 by Pulumi