azure-native.synapse.SqlPoolVulnerabilityAssessmentRuleBaseline
Explore with Pulumi AI
A Sql pool vulnerability assessment rule baseline. Azure REST API version: 2021-06-01. Prior API version in Azure Native 1.x: 2021-03-01.
Other available API versions: 2021-06-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 sqlPoolVulnerabilityAssessmentRuleBaseline = new AzureNative.Synapse.SqlPoolVulnerabilityAssessmentRuleBaseline("sqlPoolVulnerabilityAssessmentRuleBaseline", new()
{
BaselineName = "default",
BaselineResults = new[]
{
new AzureNative.Synapse.Inputs.SqlPoolVulnerabilityAssessmentRuleBaselineItemArgs
{
Result = new[]
{
"userA",
"SELECT",
},
},
new AzureNative.Synapse.Inputs.SqlPoolVulnerabilityAssessmentRuleBaselineItemArgs
{
Result = new[]
{
"userB",
"SELECT",
},
},
new AzureNative.Synapse.Inputs.SqlPoolVulnerabilityAssessmentRuleBaselineItemArgs
{
Result = new[]
{
"userC",
"SELECT",
"tableId_4",
},
},
},
ResourceGroupName = "vulnerabilityaseessmenttest-4799",
RuleId = "VA1001",
SqlPoolName = "testdb",
VulnerabilityAssessmentName = "default",
WorkspaceName = "vulnerabilityaseessmenttest-6440",
});
});
package main
import (
synapse "github.com/pulumi/pulumi-azure-native-sdk/synapse/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := synapse.NewSqlPoolVulnerabilityAssessmentRuleBaseline(ctx, "sqlPoolVulnerabilityAssessmentRuleBaseline", &synapse.SqlPoolVulnerabilityAssessmentRuleBaselineArgs{
BaselineName: pulumi.String("default"),
BaselineResults: synapse.SqlPoolVulnerabilityAssessmentRuleBaselineItemArray{
&synapse.SqlPoolVulnerabilityAssessmentRuleBaselineItemArgs{
Result: pulumi.StringArray{
pulumi.String("userA"),
pulumi.String("SELECT"),
},
},
&synapse.SqlPoolVulnerabilityAssessmentRuleBaselineItemArgs{
Result: pulumi.StringArray{
pulumi.String("userB"),
pulumi.String("SELECT"),
},
},
&synapse.SqlPoolVulnerabilityAssessmentRuleBaselineItemArgs{
Result: pulumi.StringArray{
pulumi.String("userC"),
pulumi.String("SELECT"),
pulumi.String("tableId_4"),
},
},
},
ResourceGroupName: pulumi.String("vulnerabilityaseessmenttest-4799"),
RuleId: pulumi.String("VA1001"),
SqlPoolName: pulumi.String("testdb"),
VulnerabilityAssessmentName: pulumi.String("default"),
WorkspaceName: pulumi.String("vulnerabilityaseessmenttest-6440"),
})
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.synapse.SqlPoolVulnerabilityAssessmentRuleBaseline;
import com.pulumi.azurenative.synapse.SqlPoolVulnerabilityAssessmentRuleBaselineArgs;
import com.pulumi.azurenative.synapse.inputs.SqlPoolVulnerabilityAssessmentRuleBaselineItemArgs;
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 sqlPoolVulnerabilityAssessmentRuleBaseline = new SqlPoolVulnerabilityAssessmentRuleBaseline("sqlPoolVulnerabilityAssessmentRuleBaseline", SqlPoolVulnerabilityAssessmentRuleBaselineArgs.builder()
.baselineName("default")
.baselineResults(
SqlPoolVulnerabilityAssessmentRuleBaselineItemArgs.builder()
.result(
"userA",
"SELECT")
.build(),
SqlPoolVulnerabilityAssessmentRuleBaselineItemArgs.builder()
.result(
"userB",
"SELECT")
.build(),
SqlPoolVulnerabilityAssessmentRuleBaselineItemArgs.builder()
.result(
"userC",
"SELECT",
"tableId_4")
.build())
.resourceGroupName("vulnerabilityaseessmenttest-4799")
.ruleId("VA1001")
.sqlPoolName("testdb")
.vulnerabilityAssessmentName("default")
.workspaceName("vulnerabilityaseessmenttest-6440")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
sql_pool_vulnerability_assessment_rule_baseline = azure_native.synapse.SqlPoolVulnerabilityAssessmentRuleBaseline("sqlPoolVulnerabilityAssessmentRuleBaseline",
baseline_name="default",
baseline_results=[
{
"result": [
"userA",
"SELECT",
],
},
{
"result": [
"userB",
"SELECT",
],
},
{
"result": [
"userC",
"SELECT",
"tableId_4",
],
},
],
resource_group_name="vulnerabilityaseessmenttest-4799",
rule_id="VA1001",
sql_pool_name="testdb",
vulnerability_assessment_name="default",
workspace_name="vulnerabilityaseessmenttest-6440")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const sqlPoolVulnerabilityAssessmentRuleBaseline = new azure_native.synapse.SqlPoolVulnerabilityAssessmentRuleBaseline("sqlPoolVulnerabilityAssessmentRuleBaseline", {
baselineName: "default",
baselineResults: [
{
result: [
"userA",
"SELECT",
],
},
{
result: [
"userB",
"SELECT",
],
},
{
result: [
"userC",
"SELECT",
"tableId_4",
],
},
],
resourceGroupName: "vulnerabilityaseessmenttest-4799",
ruleId: "VA1001",
sqlPoolName: "testdb",
vulnerabilityAssessmentName: "default",
workspaceName: "vulnerabilityaseessmenttest-6440",
});
resources:
sqlPoolVulnerabilityAssessmentRuleBaseline:
type: azure-native:synapse:SqlPoolVulnerabilityAssessmentRuleBaseline
properties:
baselineName: default
baselineResults:
- result:
- userA
- SELECT
- result:
- userB
- SELECT
- result:
- userC
- SELECT
- tableId_4
resourceGroupName: vulnerabilityaseessmenttest-4799
ruleId: VA1001
sqlPoolName: testdb
vulnerabilityAssessmentName: default
workspaceName: vulnerabilityaseessmenttest-6440
Create SqlPoolVulnerabilityAssessmentRuleBaseline Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SqlPoolVulnerabilityAssessmentRuleBaseline(name: string, args: SqlPoolVulnerabilityAssessmentRuleBaselineArgs, opts?: CustomResourceOptions);
@overload
def SqlPoolVulnerabilityAssessmentRuleBaseline(resource_name: str,
args: SqlPoolVulnerabilityAssessmentRuleBaselineArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SqlPoolVulnerabilityAssessmentRuleBaseline(resource_name: str,
opts: Optional[ResourceOptions] = None,
baseline_results: Optional[Sequence[SqlPoolVulnerabilityAssessmentRuleBaselineItemArgs]] = None,
resource_group_name: Optional[str] = None,
rule_id: Optional[str] = None,
sql_pool_name: Optional[str] = None,
vulnerability_assessment_name: Optional[str] = None,
workspace_name: Optional[str] = None,
baseline_name: Optional[str] = None)
func NewSqlPoolVulnerabilityAssessmentRuleBaseline(ctx *Context, name string, args SqlPoolVulnerabilityAssessmentRuleBaselineArgs, opts ...ResourceOption) (*SqlPoolVulnerabilityAssessmentRuleBaseline, error)
public SqlPoolVulnerabilityAssessmentRuleBaseline(string name, SqlPoolVulnerabilityAssessmentRuleBaselineArgs args, CustomResourceOptions? opts = null)
public SqlPoolVulnerabilityAssessmentRuleBaseline(String name, SqlPoolVulnerabilityAssessmentRuleBaselineArgs args)
public SqlPoolVulnerabilityAssessmentRuleBaseline(String name, SqlPoolVulnerabilityAssessmentRuleBaselineArgs args, CustomResourceOptions options)
type: azure-native:synapse:SqlPoolVulnerabilityAssessmentRuleBaseline
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 SqlPoolVulnerabilityAssessmentRuleBaselineArgs
- 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 SqlPoolVulnerabilityAssessmentRuleBaselineArgs
- 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 SqlPoolVulnerabilityAssessmentRuleBaselineArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SqlPoolVulnerabilityAssessmentRuleBaselineArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SqlPoolVulnerabilityAssessmentRuleBaselineArgs
- 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 sqlPoolVulnerabilityAssessmentRuleBaselineResource = new AzureNative.Synapse.SqlPoolVulnerabilityAssessmentRuleBaseline("sqlPoolVulnerabilityAssessmentRuleBaselineResource", new()
{
BaselineResults = new[]
{
new AzureNative.Synapse.Inputs.SqlPoolVulnerabilityAssessmentRuleBaselineItemArgs
{
Result = new[]
{
"string",
},
},
},
ResourceGroupName = "string",
RuleId = "string",
SqlPoolName = "string",
VulnerabilityAssessmentName = "string",
WorkspaceName = "string",
BaselineName = "string",
});
example, err := synapse.NewSqlPoolVulnerabilityAssessmentRuleBaseline(ctx, "sqlPoolVulnerabilityAssessmentRuleBaselineResource", &synapse.SqlPoolVulnerabilityAssessmentRuleBaselineArgs{
BaselineResults: synapse.SqlPoolVulnerabilityAssessmentRuleBaselineItemArray{
&synapse.SqlPoolVulnerabilityAssessmentRuleBaselineItemArgs{
Result: pulumi.StringArray{
pulumi.String("string"),
},
},
},
ResourceGroupName: pulumi.String("string"),
RuleId: pulumi.String("string"),
SqlPoolName: pulumi.String("string"),
VulnerabilityAssessmentName: pulumi.String("string"),
WorkspaceName: pulumi.String("string"),
BaselineName: pulumi.String("string"),
})
var sqlPoolVulnerabilityAssessmentRuleBaselineResource = new SqlPoolVulnerabilityAssessmentRuleBaseline("sqlPoolVulnerabilityAssessmentRuleBaselineResource", SqlPoolVulnerabilityAssessmentRuleBaselineArgs.builder()
.baselineResults(SqlPoolVulnerabilityAssessmentRuleBaselineItemArgs.builder()
.result("string")
.build())
.resourceGroupName("string")
.ruleId("string")
.sqlPoolName("string")
.vulnerabilityAssessmentName("string")
.workspaceName("string")
.baselineName("string")
.build());
sql_pool_vulnerability_assessment_rule_baseline_resource = azure_native.synapse.SqlPoolVulnerabilityAssessmentRuleBaseline("sqlPoolVulnerabilityAssessmentRuleBaselineResource",
baseline_results=[{
"result": ["string"],
}],
resource_group_name="string",
rule_id="string",
sql_pool_name="string",
vulnerability_assessment_name="string",
workspace_name="string",
baseline_name="string")
const sqlPoolVulnerabilityAssessmentRuleBaselineResource = new azure_native.synapse.SqlPoolVulnerabilityAssessmentRuleBaseline("sqlPoolVulnerabilityAssessmentRuleBaselineResource", {
baselineResults: [{
result: ["string"],
}],
resourceGroupName: "string",
ruleId: "string",
sqlPoolName: "string",
vulnerabilityAssessmentName: "string",
workspaceName: "string",
baselineName: "string",
});
type: azure-native:synapse:SqlPoolVulnerabilityAssessmentRuleBaseline
properties:
baselineName: string
baselineResults:
- result:
- string
resourceGroupName: string
ruleId: string
sqlPoolName: string
vulnerabilityAssessmentName: string
workspaceName: string
SqlPoolVulnerabilityAssessmentRuleBaseline 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 SqlPoolVulnerabilityAssessmentRuleBaseline resource accepts the following input properties:
- Baseline
Results List<Pulumi.Azure Native. Synapse. Inputs. Sql Pool Vulnerability Assessment Rule Baseline Item> - The rule baseline result
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Rule
Id string - The vulnerability assessment rule ID.
- Sql
Pool stringName - SQL pool name
- Vulnerability
Assessment stringName - The name of the vulnerability assessment.
- Workspace
Name string - The name of the workspace.
- Baseline
Name string - The name of the vulnerability assessment rule baseline (default implies a baseline on a Sql pool level rule and master for workspace level rule).
- Baseline
Results []SqlPool Vulnerability Assessment Rule Baseline Item Args - The rule baseline result
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Rule
Id string - The vulnerability assessment rule ID.
- Sql
Pool stringName - SQL pool name
- Vulnerability
Assessment stringName - The name of the vulnerability assessment.
- Workspace
Name string - The name of the workspace.
- Baseline
Name string - The name of the vulnerability assessment rule baseline (default implies a baseline on a Sql pool level rule and master for workspace level rule).
- baseline
Results List<SqlPool Vulnerability Assessment Rule Baseline Item> - The rule baseline result
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- rule
Id String - The vulnerability assessment rule ID.
- sql
Pool StringName - SQL pool name
- vulnerability
Assessment StringName - The name of the vulnerability assessment.
- workspace
Name String - The name of the workspace.
- baseline
Name String - The name of the vulnerability assessment rule baseline (default implies a baseline on a Sql pool level rule and master for workspace level rule).
- baseline
Results SqlPool Vulnerability Assessment Rule Baseline Item[] - The rule baseline result
- resource
Group stringName - The name of the resource group. The name is case insensitive.
- rule
Id string - The vulnerability assessment rule ID.
- sql
Pool stringName - SQL pool name
- vulnerability
Assessment stringName - The name of the vulnerability assessment.
- workspace
Name string - The name of the workspace.
- baseline
Name string - The name of the vulnerability assessment rule baseline (default implies a baseline on a Sql pool level rule and master for workspace level rule).
- baseline_
results Sequence[SqlPool Vulnerability Assessment Rule Baseline Item Args] - The rule baseline result
- resource_
group_ strname - The name of the resource group. The name is case insensitive.
- rule_
id str - The vulnerability assessment rule ID.
- sql_
pool_ strname - SQL pool name
- vulnerability_
assessment_ strname - The name of the vulnerability assessment.
- workspace_
name str - The name of the workspace.
- baseline_
name str - The name of the vulnerability assessment rule baseline (default implies a baseline on a Sql pool level rule and master for workspace level rule).
- baseline
Results List<Property Map> - The rule baseline result
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- rule
Id String - The vulnerability assessment rule ID.
- sql
Pool StringName - SQL pool name
- vulnerability
Assessment StringName - The name of the vulnerability assessment.
- workspace
Name String - The name of the workspace.
- baseline
Name String - The name of the vulnerability assessment rule baseline (default implies a baseline on a Sql pool level rule and master for workspace level rule).
Outputs
All input properties are implicitly available as output properties. Additionally, the SqlPoolVulnerabilityAssessmentRuleBaseline resource produces the following output properties:
Supporting Types
SqlPoolVulnerabilityAssessmentRuleBaselineItem, SqlPoolVulnerabilityAssessmentRuleBaselineItemArgs
- Result List<string>
- The rule baseline result
- Result []string
- The rule baseline result
- result List<String>
- The rule baseline result
- result string[]
- The rule baseline result
- result Sequence[str]
- The rule baseline result
- result List<String>
- The rule baseline result
SqlPoolVulnerabilityAssessmentRuleBaselineItemResponse, SqlPoolVulnerabilityAssessmentRuleBaselineItemResponseArgs
- Result List<string>
- The rule baseline result
- Result []string
- The rule baseline result
- result List<String>
- The rule baseline result
- result string[]
- The rule baseline result
- result Sequence[str]
- The rule baseline result
- result List<String>
- The rule baseline result
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:synapse:SqlPoolVulnerabilityAssessmentRuleBaseline default /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0