azure-native.sql.SqlVulnerabilityAssessmentsSetting
Explore with Pulumi AI
A SQL Vulnerability Assessment. 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
Create a SQL Vulnerability Assessment policy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var sqlVulnerabilityAssessmentsSetting = new AzureNative.Sql.SqlVulnerabilityAssessmentsSetting("sqlVulnerabilityAssessmentsSetting", new()
{
ResourceGroupName = "vulnerabilityaseessmenttest-4799",
ServerName = "vulnerabilityaseessmenttest-6440",
State = AzureNative.Sql.SqlVulnerabilityAssessmentState.Enabled,
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.NewSqlVulnerabilityAssessmentsSetting(ctx, "sqlVulnerabilityAssessmentsSetting", &sql.SqlVulnerabilityAssessmentsSettingArgs{
ResourceGroupName: pulumi.String("vulnerabilityaseessmenttest-4799"),
ServerName: pulumi.String("vulnerabilityaseessmenttest-6440"),
State: sql.SqlVulnerabilityAssessmentStateEnabled,
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.SqlVulnerabilityAssessmentsSetting;
import com.pulumi.azurenative.sql.SqlVulnerabilityAssessmentsSettingArgs;
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 sqlVulnerabilityAssessmentsSetting = new SqlVulnerabilityAssessmentsSetting("sqlVulnerabilityAssessmentsSetting", SqlVulnerabilityAssessmentsSettingArgs.builder()
.resourceGroupName("vulnerabilityaseessmenttest-4799")
.serverName("vulnerabilityaseessmenttest-6440")
.state("Enabled")
.vulnerabilityAssessmentName("default")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
sql_vulnerability_assessments_setting = azure_native.sql.SqlVulnerabilityAssessmentsSetting("sqlVulnerabilityAssessmentsSetting",
resource_group_name="vulnerabilityaseessmenttest-4799",
server_name="vulnerabilityaseessmenttest-6440",
state=azure_native.sql.SqlVulnerabilityAssessmentState.ENABLED,
vulnerability_assessment_name="default")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const sqlVulnerabilityAssessmentsSetting = new azure_native.sql.SqlVulnerabilityAssessmentsSetting("sqlVulnerabilityAssessmentsSetting", {
resourceGroupName: "vulnerabilityaseessmenttest-4799",
serverName: "vulnerabilityaseessmenttest-6440",
state: azure_native.sql.SqlVulnerabilityAssessmentState.Enabled,
vulnerabilityAssessmentName: "default",
});
resources:
sqlVulnerabilityAssessmentsSetting:
type: azure-native:sql:SqlVulnerabilityAssessmentsSetting
properties:
resourceGroupName: vulnerabilityaseessmenttest-4799
serverName: vulnerabilityaseessmenttest-6440
state: Enabled
vulnerabilityAssessmentName: default
Create SqlVulnerabilityAssessmentsSetting Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SqlVulnerabilityAssessmentsSetting(name: string, args: SqlVulnerabilityAssessmentsSettingArgs, opts?: CustomResourceOptions);
@overload
def SqlVulnerabilityAssessmentsSetting(resource_name: str,
args: SqlVulnerabilityAssessmentsSettingArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SqlVulnerabilityAssessmentsSetting(resource_name: str,
opts: Optional[ResourceOptions] = None,
resource_group_name: Optional[str] = None,
server_name: Optional[str] = None,
state: Optional[SqlVulnerabilityAssessmentState] = None,
vulnerability_assessment_name: Optional[str] = None)
func NewSqlVulnerabilityAssessmentsSetting(ctx *Context, name string, args SqlVulnerabilityAssessmentsSettingArgs, opts ...ResourceOption) (*SqlVulnerabilityAssessmentsSetting, error)
public SqlVulnerabilityAssessmentsSetting(string name, SqlVulnerabilityAssessmentsSettingArgs args, CustomResourceOptions? opts = null)
public SqlVulnerabilityAssessmentsSetting(String name, SqlVulnerabilityAssessmentsSettingArgs args)
public SqlVulnerabilityAssessmentsSetting(String name, SqlVulnerabilityAssessmentsSettingArgs args, CustomResourceOptions options)
type: azure-native:sql:SqlVulnerabilityAssessmentsSetting
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 SqlVulnerabilityAssessmentsSettingArgs
- 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 SqlVulnerabilityAssessmentsSettingArgs
- 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 SqlVulnerabilityAssessmentsSettingArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SqlVulnerabilityAssessmentsSettingArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SqlVulnerabilityAssessmentsSettingArgs
- 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 sqlVulnerabilityAssessmentsSettingResource = new AzureNative.Sql.SqlVulnerabilityAssessmentsSetting("sqlVulnerabilityAssessmentsSettingResource", new()
{
ResourceGroupName = "string",
ServerName = "string",
State = AzureNative.Sql.SqlVulnerabilityAssessmentState.Enabled,
VulnerabilityAssessmentName = "string",
});
example, err := sql.NewSqlVulnerabilityAssessmentsSetting(ctx, "sqlVulnerabilityAssessmentsSettingResource", &sql.SqlVulnerabilityAssessmentsSettingArgs{
ResourceGroupName: pulumi.String("string"),
ServerName: pulumi.String("string"),
State: sql.SqlVulnerabilityAssessmentStateEnabled,
VulnerabilityAssessmentName: pulumi.String("string"),
})
var sqlVulnerabilityAssessmentsSettingResource = new SqlVulnerabilityAssessmentsSetting("sqlVulnerabilityAssessmentsSettingResource", SqlVulnerabilityAssessmentsSettingArgs.builder()
.resourceGroupName("string")
.serverName("string")
.state("Enabled")
.vulnerabilityAssessmentName("string")
.build());
sql_vulnerability_assessments_setting_resource = azure_native.sql.SqlVulnerabilityAssessmentsSetting("sqlVulnerabilityAssessmentsSettingResource",
resource_group_name="string",
server_name="string",
state=azure_native.sql.SqlVulnerabilityAssessmentState.ENABLED,
vulnerability_assessment_name="string")
const sqlVulnerabilityAssessmentsSettingResource = new azure_native.sql.SqlVulnerabilityAssessmentsSetting("sqlVulnerabilityAssessmentsSettingResource", {
resourceGroupName: "string",
serverName: "string",
state: azure_native.sql.SqlVulnerabilityAssessmentState.Enabled,
vulnerabilityAssessmentName: "string",
});
type: azure-native:sql:SqlVulnerabilityAssessmentsSetting
properties:
resourceGroupName: string
serverName: string
state: Enabled
vulnerabilityAssessmentName: string
SqlVulnerabilityAssessmentsSetting 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 SqlVulnerabilityAssessmentsSetting resource accepts the following input properties:
- 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.
- Server
Name string - The name of the server.
- State
Pulumi.
Azure Native. Sql. Sql Vulnerability Assessment State - Specifies the state of the SQL Vulnerability Assessment, whether it is enabled or disabled or a state has not been applied yet on the specific database or server.
- Vulnerability
Assessment stringName - The name of the SQL Vulnerability Assessment.
- 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.
- Server
Name string - The name of the server.
- State
Sql
Vulnerability Assessment State - Specifies the state of the SQL Vulnerability Assessment, whether it is enabled or disabled or a state has not been applied yet on the specific database or server.
- Vulnerability
Assessment stringName - The name of the SQL Vulnerability Assessment.
- 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.
- server
Name String - The name of the server.
- state
Sql
Vulnerability Assessment State - Specifies the state of the SQL Vulnerability Assessment, whether it is enabled or disabled or a state has not been applied yet on the specific database or server.
- vulnerability
Assessment StringName - The name of the SQL Vulnerability Assessment.
- 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.
- server
Name string - The name of the server.
- state
Sql
Vulnerability Assessment State - Specifies the state of the SQL Vulnerability Assessment, whether it is enabled or disabled or a state has not been applied yet on the specific database or server.
- vulnerability
Assessment stringName - The name of the SQL Vulnerability Assessment.
- 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.
- server_
name str - The name of the server.
- state
Sql
Vulnerability Assessment State - Specifies the state of the SQL Vulnerability Assessment, whether it is enabled or disabled or a state has not been applied yet on the specific database or server.
- vulnerability_
assessment_ strname - The name of the SQL Vulnerability Assessment.
- 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.
- server
Name String - The name of the server.
- state "Enabled" | "Disabled"
- Specifies the state of the SQL Vulnerability Assessment, whether it is enabled or disabled or a state has not been applied yet on the specific database or server.
- vulnerability
Assessment StringName - The name of the SQL Vulnerability Assessment.
Outputs
All input properties are implicitly available as output properties. Additionally, the SqlVulnerabilityAssessmentsSetting 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 SqlVulnerabilityAssessmentResource.
- 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 SqlVulnerabilityAssessmentResource.
- 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 SqlVulnerabilityAssessmentResource.
- 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 SqlVulnerabilityAssessmentResource.
- 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 SqlVulnerabilityAssessmentResource.
- 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 SqlVulnerabilityAssessmentResource.
- type String
- Resource type.
Supporting Types
SqlVulnerabilityAssessmentState, SqlVulnerabilityAssessmentStateArgs
- Enabled
- Enabled
- Disabled
- Disabled
- Sql
Vulnerability Assessment State Enabled - Enabled
- Sql
Vulnerability Assessment State Disabled - Disabled
- Enabled
- Enabled
- Disabled
- Disabled
- Enabled
- Enabled
- Disabled
- Disabled
- ENABLED
- Enabled
- DISABLED
- Disabled
- "Enabled"
- Enabled
- "Disabled"
- Disabled
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:SqlVulnerabilityAssessmentsSetting default /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0