azure-native.sql.SqlVulnerabilityAssessmentRuleBaseline
Explore with Pulumi AI
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, 2024-05-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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The SqlVulnerabilityAssessmentRuleBaseline resource accepts the following input properties:
- Baseline
Name string - Latest
Scan bool - The latest scan flag
- Resource
Group stringName - 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<Immutable
Array<string>> - The rule baseline result
- Server
Name string - The name of the server.
- System
Database stringName - The vulnerability assessment system database name.
- Vulnerability
Assessment stringName - The name of the vulnerability assessment.
- Rule
Id string - The vulnerability assessment rule ID.
- Baseline
Name string - Latest
Scan bool - The latest scan flag
- Resource
Group stringName - 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
- Server
Name string - The name of the server.
- System
Database stringName - The vulnerability assessment system database name.
- Vulnerability
Assessment stringName - The name of the vulnerability assessment.
- Rule
Id string - The vulnerability assessment rule ID.
- baseline
Name String - latest
Scan Boolean - The latest scan flag
- resource
Group StringName - 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
- server
Name String - The name of the server.
- system
Database StringName - The vulnerability assessment system database name.
- vulnerability
Assessment StringName - The name of the vulnerability assessment.
- rule
Id String - The vulnerability assessment rule ID.
- baseline
Name string - latest
Scan boolean - The latest scan flag
- resource
Group stringName - 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
- server
Name string - The name of the server.
- system
Database stringName - The vulnerability assessment system database name.
- vulnerability
Assessment stringName - The name of the vulnerability assessment.
- rule
Id string - The vulnerability assessment rule ID.
- baseline_
name str - latest_
scan bool - The latest scan flag
- resource_
group_ strname - 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_ strname - The vulnerability assessment system database name.
- vulnerability_
assessment_ strname - The name of the vulnerability assessment.
- rule_
id str - The vulnerability assessment rule ID.
- baseline
Name String - latest
Scan Boolean - The latest scan flag
- resource
Group StringName - 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
- server
Name String - The name of the server.
- system
Database StringName - The vulnerability assessment system database name.
- vulnerability
Assessment StringName - The name of the vulnerability assessment.
- rule
Id 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.
- System
Data Pulumi.Azure Native. Sql. Outputs. System Data Response - SystemData of DatabaseSqlVulnerabilityAssessmentRuleBaselineResource.
- Type string
- Resource type.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Resource name.
- System
Data SystemData Response - SystemData of DatabaseSqlVulnerabilityAssessmentRuleBaselineResource.
- Type string
- Resource type.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Resource name.
- system
Data SystemData Response - SystemData of DatabaseSqlVulnerabilityAssessmentRuleBaselineResource.
- type String
- Resource type.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- Resource name.
- system
Data SystemData Response - SystemData of DatabaseSqlVulnerabilityAssessmentRuleBaselineResource.
- type string
- Resource type.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- Resource name.
- system_
data SystemData Response - SystemData of DatabaseSqlVulnerabilityAssessmentRuleBaselineResource.
- type str
- Resource type.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Resource name.
- system
Data Property Map - SystemData of DatabaseSqlVulnerabilityAssessmentRuleBaselineResource.
- type String
- Resource type.
Supporting Types
SystemDataResponse, SystemDataResponseArgs
- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - The type of identity that last modified the resource.
- created
At string - The timestamp of resource creation (UTC).
- created
By string - The identity that created the resource.
- created
By stringType - The type of identity that created the resource.
- last
Modified stringAt - The timestamp of resource last modification (UTC)
- last
Modified stringBy - The identity that last modified the resource.
- last
Modified stringBy Type - 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_ strtype - The type of identity that created the resource.
- last_
modified_ strat - The timestamp of resource last modification (UTC)
- last_
modified_ strby - The identity that last modified the resource.
- last_
modified_ strby_ type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - 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