1. Packages
  2. Azure Native
  3. API Docs
  4. security
  5. ServerVulnerabilityAssessment
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi

azure-native.security.ServerVulnerabilityAssessment

Explore with Pulumi AI

Describes the server vulnerability assessment details on a resource

Uses Azure REST API version 2020-01-01. In version 2.x of the Azure Native provider, it used API version 2020-01-01.

Example Usage

Create a server vulnerability assessments on a resource. Only 'default' resource is supported. Once creating the resource, the server will be onboarded to vulnerability assessment by Microsoft.Security

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var serverVulnerabilityAssessment = new AzureNative.Security.ServerVulnerabilityAssessment("serverVulnerabilityAssessment", new()
    {
        ResourceGroupName = "rg1",
        ResourceName = "vm1",
        ResourceNamespace = "Microsoft.Compute",
        ResourceType = "virtualMachines",
        ServerVulnerabilityAssessment = "default",
    });

});
Copy
package main

import (
	security "github.com/pulumi/pulumi-azure-native-sdk/security/v3"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := security.NewServerVulnerabilityAssessment(ctx, "serverVulnerabilityAssessment", &security.ServerVulnerabilityAssessmentArgs{
			ResourceGroupName:             pulumi.String("rg1"),
			ResourceName:                  pulumi.String("vm1"),
			ResourceNamespace:             pulumi.String("Microsoft.Compute"),
			ResourceType:                  pulumi.String("virtualMachines"),
			ServerVulnerabilityAssessment: pulumi.String("default"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.security.ServerVulnerabilityAssessment;
import com.pulumi.azurenative.security.ServerVulnerabilityAssessmentArgs;
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 serverVulnerabilityAssessment = new ServerVulnerabilityAssessment("serverVulnerabilityAssessment", ServerVulnerabilityAssessmentArgs.builder()
            .resourceGroupName("rg1")
            .resourceName("vm1")
            .resourceNamespace("Microsoft.Compute")
            .resourceType("virtualMachines")
            .serverVulnerabilityAssessment("default")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const serverVulnerabilityAssessment = new azure_native.security.ServerVulnerabilityAssessment("serverVulnerabilityAssessment", {
    resourceGroupName: "rg1",
    resourceName: "vm1",
    resourceNamespace: "Microsoft.Compute",
    resourceType: "virtualMachines",
    serverVulnerabilityAssessment: "default",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

server_vulnerability_assessment = azure_native.security.ServerVulnerabilityAssessment("serverVulnerabilityAssessment",
    resource_group_name="rg1",
    resource_name_="vm1",
    resource_namespace="Microsoft.Compute",
    resource_type="virtualMachines",
    server_vulnerability_assessment="default")
Copy
resources:
  serverVulnerabilityAssessment:
    type: azure-native:security:ServerVulnerabilityAssessment
    properties:
      resourceGroupName: rg1
      resourceName: vm1
      resourceNamespace: Microsoft.Compute
      resourceType: virtualMachines
      serverVulnerabilityAssessment: default
Copy

Create ServerVulnerabilityAssessment Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new ServerVulnerabilityAssessment(name: string, args: ServerVulnerabilityAssessmentArgs, opts?: CustomResourceOptions);
@overload
def ServerVulnerabilityAssessment(resource_name: str,
                                  args: ServerVulnerabilityAssessmentArgs,
                                  opts: Optional[ResourceOptions] = None)

@overload
def ServerVulnerabilityAssessment(resource_name: str,
                                  opts: Optional[ResourceOptions] = None,
                                  resource_group_name: Optional[str] = None,
                                  resource_name_: Optional[str] = None,
                                  resource_namespace: Optional[str] = None,
                                  resource_type: Optional[str] = None,
                                  server_vulnerability_assessment: Optional[str] = None)
func NewServerVulnerabilityAssessment(ctx *Context, name string, args ServerVulnerabilityAssessmentArgs, opts ...ResourceOption) (*ServerVulnerabilityAssessment, error)
public ServerVulnerabilityAssessment(string name, ServerVulnerabilityAssessmentArgs args, CustomResourceOptions? opts = null)
public ServerVulnerabilityAssessment(String name, ServerVulnerabilityAssessmentArgs args)
public ServerVulnerabilityAssessment(String name, ServerVulnerabilityAssessmentArgs args, CustomResourceOptions options)
type: azure-native:security:ServerVulnerabilityAssessment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ServerVulnerabilityAssessmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ServerVulnerabilityAssessmentArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ServerVulnerabilityAssessmentArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ServerVulnerabilityAssessmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ServerVulnerabilityAssessmentArgs
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 serverVulnerabilityAssessmentResource = new AzureNative.Security.ServerVulnerabilityAssessment("serverVulnerabilityAssessmentResource", new()
{
    ResourceGroupName = "string",
    ResourceName = "string",
    ResourceNamespace = "string",
    ResourceType = "string",
    ServerVulnerabilityAssessment = "string",
});
Copy
example, err := security.NewServerVulnerabilityAssessment(ctx, "serverVulnerabilityAssessmentResource", &security.ServerVulnerabilityAssessmentArgs{
	ResourceGroupName:             pulumi.String("string"),
	ResourceName:                  pulumi.String("string"),
	ResourceNamespace:             pulumi.String("string"),
	ResourceType:                  pulumi.String("string"),
	ServerVulnerabilityAssessment: pulumi.String("string"),
})
Copy
var serverVulnerabilityAssessmentResource = new com.pulumi.azurenative.security.ServerVulnerabilityAssessment("serverVulnerabilityAssessmentResource", com.pulumi.azurenative.security.ServerVulnerabilityAssessmentArgs.builder()
    .resourceGroupName("string")
    .resourceName("string")
    .resourceNamespace("string")
    .resourceType("string")
    .serverVulnerabilityAssessment("string")
    .build());
Copy
server_vulnerability_assessment_resource = azure_native.security.ServerVulnerabilityAssessment("serverVulnerabilityAssessmentResource",
    resource_group_name="string",
    resource_name_="string",
    resource_namespace="string",
    resource_type="string",
    server_vulnerability_assessment="string")
Copy
const serverVulnerabilityAssessmentResource = new azure_native.security.ServerVulnerabilityAssessment("serverVulnerabilityAssessmentResource", {
    resourceGroupName: "string",
    resourceName: "string",
    resourceNamespace: "string",
    resourceType: "string",
    serverVulnerabilityAssessment: "string",
});
Copy
type: azure-native:security:ServerVulnerabilityAssessment
properties:
    resourceGroupName: string
    resourceName: string
    resourceNamespace: string
    resourceType: string
    serverVulnerabilityAssessment: string
Copy

ServerVulnerabilityAssessment 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 ServerVulnerabilityAssessment resource accepts the following input properties:

ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group within the user's subscription. The name is case insensitive.
ResourceName
This property is required.
Changes to this property will trigger replacement.
string
Name of the resource.
ResourceNamespace
This property is required.
Changes to this property will trigger replacement.
string
The Namespace of the resource.
ResourceType
This property is required.
Changes to this property will trigger replacement.
string
The type of the resource.
ServerVulnerabilityAssessment Changes to this property will trigger replacement. string
ServerVulnerabilityAssessment status. only a 'default' value is supported.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group within the user's subscription. The name is case insensitive.
ResourceName
This property is required.
Changes to this property will trigger replacement.
string
Name of the resource.
ResourceNamespace
This property is required.
Changes to this property will trigger replacement.
string
The Namespace of the resource.
ResourceType
This property is required.
Changes to this property will trigger replacement.
string
The type of the resource.
ServerVulnerabilityAssessment Changes to this property will trigger replacement. string
ServerVulnerabilityAssessment status. only a 'default' value is supported.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group within the user's subscription. The name is case insensitive.
resourceName
This property is required.
Changes to this property will trigger replacement.
String
Name of the resource.
resourceNamespace
This property is required.
Changes to this property will trigger replacement.
String
The Namespace of the resource.
resourceType
This property is required.
Changes to this property will trigger replacement.
String
The type of the resource.
serverVulnerabilityAssessment Changes to this property will trigger replacement. String
ServerVulnerabilityAssessment status. only a 'default' value is supported.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group within the user's subscription. The name is case insensitive.
resourceName
This property is required.
Changes to this property will trigger replacement.
string
Name of the resource.
resourceNamespace
This property is required.
Changes to this property will trigger replacement.
string
The Namespace of the resource.
resourceType
This property is required.
Changes to this property will trigger replacement.
string
The type of the resource.
serverVulnerabilityAssessment Changes to this property will trigger replacement. string
ServerVulnerabilityAssessment status. only a 'default' value is supported.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group within the user's subscription. The name is case insensitive.
resource_name
This property is required.
Changes to this property will trigger replacement.
str
Name of the resource.
resource_namespace
This property is required.
Changes to this property will trigger replacement.
str
The Namespace of the resource.
resource_type
This property is required.
Changes to this property will trigger replacement.
str
The type of the resource.
server_vulnerability_assessment Changes to this property will trigger replacement. str
ServerVulnerabilityAssessment status. only a 'default' value is supported.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group within the user's subscription. The name is case insensitive.
resourceName
This property is required.
Changes to this property will trigger replacement.
String
Name of the resource.
resourceNamespace
This property is required.
Changes to this property will trigger replacement.
String
The Namespace of the resource.
resourceType
This property is required.
Changes to this property will trigger replacement.
String
The type of the resource.
serverVulnerabilityAssessment Changes to this property will trigger replacement. String
ServerVulnerabilityAssessment status. only a 'default' value is supported.

Outputs

All input properties are implicitly available as output properties. Additionally, the ServerVulnerabilityAssessment resource produces the following output properties:

AzureApiVersion string
The Azure API version of the resource.
Id string
The provider-assigned unique ID for this managed resource.
Name string
Resource name
ProvisioningState string
The provisioningState of the vulnerability assessment capability on the VM
Type string
Resource type
AzureApiVersion string
The Azure API version of the resource.
Id string
The provider-assigned unique ID for this managed resource.
Name string
Resource name
ProvisioningState string
The provisioningState of the vulnerability assessment capability on the VM
Type string
Resource type
azureApiVersion String
The Azure API version of the resource.
id String
The provider-assigned unique ID for this managed resource.
name String
Resource name
provisioningState String
The provisioningState of the vulnerability assessment capability on the VM
type String
Resource type
azureApiVersion string
The Azure API version of the resource.
id string
The provider-assigned unique ID for this managed resource.
name string
Resource name
provisioningState string
The provisioningState of the vulnerability assessment capability on the VM
type string
Resource type
azure_api_version str
The Azure API version of the resource.
id str
The provider-assigned unique ID for this managed resource.
name str
Resource name
provisioning_state str
The provisioningState of the vulnerability assessment capability on the VM
type str
Resource type
azureApiVersion String
The Azure API version of the resource.
id String
The provider-assigned unique ID for this managed resource.
name String
Resource name
provisioningState String
The provisioningState of the vulnerability assessment capability on the VM
type String
Resource type

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:security:ServerVulnerabilityAssessment default /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/serverVulnerabilityAssessments/{serverVulnerabilityAssessment} 
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0