1. Packages
  2. Azure Native
  3. API Docs
  4. sql
  5. DatabaseSqlVulnerabilityAssessmentRuleBaseline
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.DatabaseSqlVulnerabilityAssessmentRuleBaseline

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 databaseSqlVulnerabilityAssessmentRuleBaseline = new AzureNative.Sql.DatabaseSqlVulnerabilityAssessmentRuleBaseline("databaseSqlVulnerabilityAssessmentRuleBaseline", new()
        {
            BaselineName = "default",
            DatabaseName = "testdb",
            LatestScan = false,
            ResourceGroupName = "vulnerabilityaseessmenttest-4799",
            Results = new[]
            {
                new[]
                {
                    "userA",
                    "SELECT",
                },
                new[]
                {
                    "userB",
                    "SELECT",
                },
                new[]
                {
                    "userC",
                    "SELECT",
                },
            },
            RuleId = "VA1001",
            ServerName = "vulnerabilityaseessmenttest-6440",
            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.NewDatabaseSqlVulnerabilityAssessmentRuleBaseline(ctx, "databaseSqlVulnerabilityAssessmentRuleBaseline", &sql.DatabaseSqlVulnerabilityAssessmentRuleBaselineArgs{
    			BaselineName:      pulumi.String("default"),
    			DatabaseName:      pulumi.String("testdb"),
    			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"),
    			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.DatabaseSqlVulnerabilityAssessmentRuleBaseline;
    import com.pulumi.azurenative.sql.DatabaseSqlVulnerabilityAssessmentRuleBaselineArgs;
    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 databaseSqlVulnerabilityAssessmentRuleBaseline = new DatabaseSqlVulnerabilityAssessmentRuleBaseline("databaseSqlVulnerabilityAssessmentRuleBaseline", DatabaseSqlVulnerabilityAssessmentRuleBaselineArgs.builder()
                .baselineName("default")
                .databaseName("testdb")
                .latestScan(false)
                .resourceGroupName("vulnerabilityaseessmenttest-4799")
                .results(            
                                    
                        "userA",
                        "SELECT",
                                    
                        "userB",
                        "SELECT",
                                    
                        "userC",
                        "SELECT")
                .ruleId("VA1001")
                .serverName("vulnerabilityaseessmenttest-6440")
                .vulnerabilityAssessmentName("default")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    database_sql_vulnerability_assessment_rule_baseline = azure_native.sql.DatabaseSqlVulnerabilityAssessmentRuleBaseline("databaseSqlVulnerabilityAssessmentRuleBaseline",
        baseline_name="default",
        database_name="testdb",
        latest_scan=False,
        resource_group_name="vulnerabilityaseessmenttest-4799",
        results=[
            [
                "userA",
                "SELECT",
            ],
            [
                "userB",
                "SELECT",
            ],
            [
                "userC",
                "SELECT",
            ],
        ],
        rule_id="VA1001",
        server_name="vulnerabilityaseessmenttest-6440",
        vulnerability_assessment_name="default")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const databaseSqlVulnerabilityAssessmentRuleBaseline = new azure_native.sql.DatabaseSqlVulnerabilityAssessmentRuleBaseline("databaseSqlVulnerabilityAssessmentRuleBaseline", {
        baselineName: "default",
        databaseName: "testdb",
        latestScan: false,
        resourceGroupName: "vulnerabilityaseessmenttest-4799",
        results: [
            [
                "userA",
                "SELECT",
            ],
            [
                "userB",
                "SELECT",
            ],
            [
                "userC",
                "SELECT",
            ],
        ],
        ruleId: "VA1001",
        serverName: "vulnerabilityaseessmenttest-6440",
        vulnerabilityAssessmentName: "default",
    });
    
    resources:
      databaseSqlVulnerabilityAssessmentRuleBaseline:
        type: azure-native:sql:DatabaseSqlVulnerabilityAssessmentRuleBaseline
        properties:
          baselineName: default
          databaseName: testdb
          latestScan: false
          resourceGroupName: vulnerabilityaseessmenttest-4799
          results:
            - - userA
              - SELECT
            - - userB
              - SELECT
            - - userC
              - SELECT
          ruleId: VA1001
          serverName: vulnerabilityaseessmenttest-6440
          vulnerabilityAssessmentName: default
    

    Create DatabaseSqlVulnerabilityAssessmentRuleBaseline Resource

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

    Constructor syntax

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

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

    BaselineName string
    DatabaseName string
    The name of the database.
    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.
    VulnerabilityAssessmentName string
    The name of the vulnerability assessment.
    RuleId string
    The vulnerability assessment rule ID.
    BaselineName string
    DatabaseName string
    The name of the database.
    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.
    VulnerabilityAssessmentName string
    The name of the vulnerability assessment.
    RuleId string
    The vulnerability assessment rule ID.
    baselineName String
    databaseName String
    The name of the database.
    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.
    vulnerabilityAssessmentName String
    The name of the vulnerability assessment.
    ruleId String
    The vulnerability assessment rule ID.
    baselineName string
    databaseName string
    The name of the database.
    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.
    vulnerabilityAssessmentName string
    The name of the vulnerability assessment.
    ruleId string
    The vulnerability assessment rule ID.
    baseline_name str
    database_name str
    The name of the database.
    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.
    vulnerability_assessment_name str
    The name of the vulnerability assessment.
    rule_id str
    The vulnerability assessment rule ID.
    baselineName String
    databaseName String
    The name of the database.
    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.
    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 DatabaseSqlVulnerabilityAssessmentRuleBaseline 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:DatabaseSqlVulnerabilityAssessmentRuleBaseline Scan123 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/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