azure-native.security.SqlVulnerabilityAssessmentBaselineRule
Explore with Pulumi AI
Rule results. Azure REST API version: 2023-02-01-preview. Prior API version in Azure Native 1.x: 2020-07-01-preview.
Example Usage
Create a baseline
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var sqlVulnerabilityAssessmentBaselineRule = new AzureNative.Security.SqlVulnerabilityAssessmentBaselineRule("sqlVulnerabilityAssessmentBaselineRule", new()
{
LatestScan = false,
ResourceId = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master",
Results = new[]
{
new[]
{
"userA",
"SELECT",
},
new[]
{
"userB",
"SELECT",
},
},
RuleId = "VA1234",
WorkspaceId = "55555555-6666-7777-8888-999999999999",
});
});
package main
import (
security "github.com/pulumi/pulumi-azure-native-sdk/security/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := security.NewSqlVulnerabilityAssessmentBaselineRule(ctx, "sqlVulnerabilityAssessmentBaselineRule", &security.SqlVulnerabilityAssessmentBaselineRuleArgs{
LatestScan: pulumi.Bool(false),
ResourceId: pulumi.String("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master"),
Results: pulumi.StringArrayArray{
pulumi.StringArray{
pulumi.String("userA"),
pulumi.String("SELECT"),
},
pulumi.StringArray{
pulumi.String("userB"),
pulumi.String("SELECT"),
},
},
RuleId: pulumi.String("VA1234"),
WorkspaceId: pulumi.String("55555555-6666-7777-8888-999999999999"),
})
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.security.SqlVulnerabilityAssessmentBaselineRule;
import com.pulumi.azurenative.security.SqlVulnerabilityAssessmentBaselineRuleArgs;
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 sqlVulnerabilityAssessmentBaselineRule = new SqlVulnerabilityAssessmentBaselineRule("sqlVulnerabilityAssessmentBaselineRule", SqlVulnerabilityAssessmentBaselineRuleArgs.builder()
.latestScan(false)
.resourceId("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master")
.results(
"userA",
"SELECT",
"userB",
"SELECT")
.ruleId("VA1234")
.workspaceId("55555555-6666-7777-8888-999999999999")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
sql_vulnerability_assessment_baseline_rule = azure_native.security.SqlVulnerabilityAssessmentBaselineRule("sqlVulnerabilityAssessmentBaselineRule",
latest_scan=False,
resource_id="subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master",
results=[
[
"userA",
"SELECT",
],
[
"userB",
"SELECT",
],
],
rule_id="VA1234",
workspace_id="55555555-6666-7777-8888-999999999999")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const sqlVulnerabilityAssessmentBaselineRule = new azure_native.security.SqlVulnerabilityAssessmentBaselineRule("sqlVulnerabilityAssessmentBaselineRule", {
latestScan: false,
resourceId: "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master",
results: [
[
"userA",
"SELECT",
],
[
"userB",
"SELECT",
],
],
ruleId: "VA1234",
workspaceId: "55555555-6666-7777-8888-999999999999",
});
resources:
sqlVulnerabilityAssessmentBaselineRule:
type: azure-native:security:SqlVulnerabilityAssessmentBaselineRule
properties:
latestScan: false
resourceId: subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master
results:
- - userA
- SELECT
- - userB
- SELECT
ruleId: VA1234
workspaceId: 55555555-6666-7777-8888-999999999999
Create a baseline using the latest scan results
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var sqlVulnerabilityAssessmentBaselineRule = new AzureNative.Security.SqlVulnerabilityAssessmentBaselineRule("sqlVulnerabilityAssessmentBaselineRule", new()
{
LatestScan = true,
ResourceId = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master",
Results = new[] {},
RuleId = "VA1234",
WorkspaceId = "55555555-6666-7777-8888-999999999999",
});
});
package main
import (
security "github.com/pulumi/pulumi-azure-native-sdk/security/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := security.NewSqlVulnerabilityAssessmentBaselineRule(ctx, "sqlVulnerabilityAssessmentBaselineRule", &security.SqlVulnerabilityAssessmentBaselineRuleArgs{
LatestScan: pulumi.Bool(true),
ResourceId: pulumi.String("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master"),
Results: pulumi.StringArrayArray{},
RuleId: pulumi.String("VA1234"),
WorkspaceId: pulumi.String("55555555-6666-7777-8888-999999999999"),
})
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.security.SqlVulnerabilityAssessmentBaselineRule;
import com.pulumi.azurenative.security.SqlVulnerabilityAssessmentBaselineRuleArgs;
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 sqlVulnerabilityAssessmentBaselineRule = new SqlVulnerabilityAssessmentBaselineRule("sqlVulnerabilityAssessmentBaselineRule", SqlVulnerabilityAssessmentBaselineRuleArgs.builder()
.latestScan(true)
.resourceId("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master")
.results()
.ruleId("VA1234")
.workspaceId("55555555-6666-7777-8888-999999999999")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
sql_vulnerability_assessment_baseline_rule = azure_native.security.SqlVulnerabilityAssessmentBaselineRule("sqlVulnerabilityAssessmentBaselineRule",
latest_scan=True,
resource_id="subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master",
results=[],
rule_id="VA1234",
workspace_id="55555555-6666-7777-8888-999999999999")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const sqlVulnerabilityAssessmentBaselineRule = new azure_native.security.SqlVulnerabilityAssessmentBaselineRule("sqlVulnerabilityAssessmentBaselineRule", {
latestScan: true,
resourceId: "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master",
results: [],
ruleId: "VA1234",
workspaceId: "55555555-6666-7777-8888-999999999999",
});
resources:
sqlVulnerabilityAssessmentBaselineRule:
type: azure-native:security:SqlVulnerabilityAssessmentBaselineRule
properties:
latestScan: true
resourceId: subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master
results: []
ruleId: VA1234
workspaceId: 55555555-6666-7777-8888-999999999999
Create SqlVulnerabilityAssessmentBaselineRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SqlVulnerabilityAssessmentBaselineRule(name: string, args: SqlVulnerabilityAssessmentBaselineRuleArgs, opts?: CustomResourceOptions);
@overload
def SqlVulnerabilityAssessmentBaselineRule(resource_name: str,
args: SqlVulnerabilityAssessmentBaselineRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SqlVulnerabilityAssessmentBaselineRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
resource_id: Optional[str] = None,
workspace_id: Optional[str] = None,
latest_scan: Optional[bool] = None,
results: Optional[Sequence[Sequence[str]]] = None,
rule_id: Optional[str] = None)
func NewSqlVulnerabilityAssessmentBaselineRule(ctx *Context, name string, args SqlVulnerabilityAssessmentBaselineRuleArgs, opts ...ResourceOption) (*SqlVulnerabilityAssessmentBaselineRule, error)
public SqlVulnerabilityAssessmentBaselineRule(string name, SqlVulnerabilityAssessmentBaselineRuleArgs args, CustomResourceOptions? opts = null)
public SqlVulnerabilityAssessmentBaselineRule(String name, SqlVulnerabilityAssessmentBaselineRuleArgs args)
public SqlVulnerabilityAssessmentBaselineRule(String name, SqlVulnerabilityAssessmentBaselineRuleArgs args, CustomResourceOptions options)
type: azure-native:security:SqlVulnerabilityAssessmentBaselineRule
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 SqlVulnerabilityAssessmentBaselineRuleArgs
- 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 SqlVulnerabilityAssessmentBaselineRuleArgs
- 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 SqlVulnerabilityAssessmentBaselineRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SqlVulnerabilityAssessmentBaselineRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SqlVulnerabilityAssessmentBaselineRuleArgs
- 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 sqlVulnerabilityAssessmentBaselineRuleResource = new AzureNative.Security.SqlVulnerabilityAssessmentBaselineRule("sqlVulnerabilityAssessmentBaselineRuleResource", new()
{
ResourceId = "string",
WorkspaceId = "string",
LatestScan = false,
Results = new[]
{
new[]
{
"string",
},
},
RuleId = "string",
});
example, err := security.NewSqlVulnerabilityAssessmentBaselineRule(ctx, "sqlVulnerabilityAssessmentBaselineRuleResource", &security.SqlVulnerabilityAssessmentBaselineRuleArgs{
ResourceId: pulumi.String("string"),
WorkspaceId: pulumi.String("string"),
LatestScan: pulumi.Bool(false),
Results: pulumi.StringArrayArray{
pulumi.StringArray{
pulumi.String("string"),
},
},
RuleId: pulumi.String("string"),
})
var sqlVulnerabilityAssessmentBaselineRuleResource = new SqlVulnerabilityAssessmentBaselineRule("sqlVulnerabilityAssessmentBaselineRuleResource", SqlVulnerabilityAssessmentBaselineRuleArgs.builder()
.resourceId("string")
.workspaceId("string")
.latestScan(false)
.results("string")
.ruleId("string")
.build());
sql_vulnerability_assessment_baseline_rule_resource = azure_native.security.SqlVulnerabilityAssessmentBaselineRule("sqlVulnerabilityAssessmentBaselineRuleResource",
resource_id="string",
workspace_id="string",
latest_scan=False,
results=[["string"]],
rule_id="string")
const sqlVulnerabilityAssessmentBaselineRuleResource = new azure_native.security.SqlVulnerabilityAssessmentBaselineRule("sqlVulnerabilityAssessmentBaselineRuleResource", {
resourceId: "string",
workspaceId: "string",
latestScan: false,
results: [["string"]],
ruleId: "string",
});
type: azure-native:security:SqlVulnerabilityAssessmentBaselineRule
properties:
latestScan: false
resourceId: string
results:
- - string
ruleId: string
workspaceId: string
SqlVulnerabilityAssessmentBaselineRule 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 SqlVulnerabilityAssessmentBaselineRule resource accepts the following input properties:
- Resource
Id string - The identifier of the resource.
- Workspace
Id string - The workspace Id.
- Latest
Scan bool - Take results from latest scan.
- Results
List<Immutable
Array<string>> - Expected results to be inserted into the baseline. Leave this field empty it LatestScan == true.
- Rule
Id string - The rule Id.
- Resource
Id string - The identifier of the resource.
- Workspace
Id string - The workspace Id.
- Latest
Scan bool - Take results from latest scan.
- Results [][]string
- Expected results to be inserted into the baseline. Leave this field empty it LatestScan == true.
- Rule
Id string - The rule Id.
- resource
Id String - The identifier of the resource.
- workspace
Id String - The workspace Id.
- latest
Scan Boolean - Take results from latest scan.
- results List<List<String>>
- Expected results to be inserted into the baseline. Leave this field empty it LatestScan == true.
- rule
Id String - The rule Id.
- resource
Id string - The identifier of the resource.
- workspace
Id string - The workspace Id.
- latest
Scan boolean - Take results from latest scan.
- results string[][]
- Expected results to be inserted into the baseline. Leave this field empty it LatestScan == true.
- rule
Id string - The rule Id.
- resource_
id str - The identifier of the resource.
- workspace_
id str - The workspace Id.
- latest_
scan bool - Take results from latest scan.
- results Sequence[Sequence[str]]
- Expected results to be inserted into the baseline. Leave this field empty it LatestScan == true.
- rule_
id str - The rule Id.
- resource
Id String - The identifier of the resource.
- workspace
Id String - The workspace Id.
- latest
Scan Boolean - Take results from latest scan.
- results List<List<String>>
- Expected results to be inserted into the baseline. Leave this field empty it LatestScan == true.
- rule
Id String - The rule Id.
Outputs
All input properties are implicitly available as output properties. Additionally, the SqlVulnerabilityAssessmentBaselineRule resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Resource name
- Properties
Pulumi.
Azure Native. Security. Outputs. Rule Results Properties Response - Rule results properties.
- Type string
- Resource type
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Resource name
- Properties
Rule
Results Properties Response - Rule results properties.
- Type string
- Resource type
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Resource name
- properties
Rule
Results Properties Response - Rule results properties.
- type String
- Resource type
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- Resource name
- properties
Rule
Results Properties Response - Rule results properties.
- type string
- Resource type
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- Resource name
- properties
Rule
Results Properties Response - Rule results properties.
- type str
- Resource type
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Resource name
- properties Property Map
- Rule results properties.
- type String
- Resource type
Supporting Types
RuleResultsPropertiesResponse, RuleResultsPropertiesResponseArgs
- Results
List<Immutable
Array<string>> - Expected results in the baseline.
- Results [][]string
- Expected results in the baseline.
- results List<List<String>>
- Expected results in the baseline.
- results string[][]
- Expected results in the baseline.
- results Sequence[Sequence[str]]
- Expected results in the baseline.
- results List<List<String>>
- Expected results in the baseline.
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:security:SqlVulnerabilityAssessmentBaselineRule VA1234 /{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/baselineRules/{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