azure-native.sql.DatabaseSqlVulnerabilityAssessmentRuleBaseline
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 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:
- Baseline
Name string - Database
Name string - The name of the database.
- 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.
- Vulnerability
Assessment stringName - The name of the vulnerability assessment.
- Rule
Id string - The vulnerability assessment rule ID.
- Baseline
Name string - Database
Name string - The name of the database.
- 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.
- Vulnerability
Assessment stringName - The name of the vulnerability assessment.
- Rule
Id string - The vulnerability assessment rule ID.
- baseline
Name String - database
Name String - The name of the database.
- 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.
- vulnerability
Assessment StringName - The name of the vulnerability assessment.
- rule
Id String - The vulnerability assessment rule ID.
- baseline
Name string - database
Name string - The name of the database.
- 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.
- vulnerability
Assessment stringName - The name of the vulnerability assessment.
- rule
Id 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_ 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.
- vulnerability_
assessment_ strname - The name of the vulnerability assessment.
- rule_
id str - The vulnerability assessment rule ID.
- baseline
Name String - database
Name String - The name of the database.
- 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.
- 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 DatabaseSqlVulnerabilityAssessmentRuleBaseline 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: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