1. Packages
  2. Azure Classic
  3. API Docs
  4. securitycenter
  5. Assessment

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

azure.securitycenter.Assessment

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Manages the Security Center Assessment for Azure Security Center.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    import * as std from "@pulumi/std";
    
    const example = new azure.core.ResourceGroup("example", {
        name: "example-resources",
        location: "West Europe",
    });
    const exampleVirtualNetwork = new azure.network.VirtualNetwork("example", {
        name: "example-network",
        resourceGroupName: example.name,
        location: example.location,
        addressSpaces: ["10.0.0.0/16"],
    });
    const internal = new azure.network.Subnet("internal", {
        name: "internal",
        resourceGroupName: example.name,
        virtualNetworkName: exampleVirtualNetwork.name,
        addressPrefixes: ["10.0.2.0/24"],
    });
    const exampleLinuxVirtualMachineScaleSet = new azure.compute.LinuxVirtualMachineScaleSet("example", {
        name: "example-vmss",
        resourceGroupName: example.name,
        location: example.location,
        sku: "Standard_F2",
        instances: 1,
        adminUsername: "adminuser",
        adminSshKeys: [{
            username: "adminuser",
            publicKey: std.file({
                input: "~/.ssh/id_rsa.pub",
            }).then(invoke => invoke.result),
        }],
        sourceImageReference: {
            publisher: "Canonical",
            offer: "0001-com-ubuntu-server-jammy",
            sku: "22_04-lts",
            version: "latest",
        },
        osDisk: {
            storageAccountType: "Standard_LRS",
            caching: "ReadWrite",
        },
        networkInterfaces: [{
            name: "example",
            primary: true,
            ipConfigurations: [{
                name: "internal",
                primary: true,
                subnetId: internal.id,
            }],
        }],
    });
    const exampleAssessmentPolicy = new azure.securitycenter.AssessmentPolicy("example", {
        displayName: "Test Display Name",
        severity: "Medium",
        description: "Test Description",
    });
    const exampleAssessment = new azure.securitycenter.Assessment("example", {
        assessmentPolicyId: exampleAssessmentPolicy.id,
        targetResourceId: exampleLinuxVirtualMachineScaleSet.id,
        status: {
            code: "Healthy",
        },
    });
    
    import pulumi
    import pulumi_azure as azure
    import pulumi_std as std
    
    example = azure.core.ResourceGroup("example",
        name="example-resources",
        location="West Europe")
    example_virtual_network = azure.network.VirtualNetwork("example",
        name="example-network",
        resource_group_name=example.name,
        location=example.location,
        address_spaces=["10.0.0.0/16"])
    internal = azure.network.Subnet("internal",
        name="internal",
        resource_group_name=example.name,
        virtual_network_name=example_virtual_network.name,
        address_prefixes=["10.0.2.0/24"])
    example_linux_virtual_machine_scale_set = azure.compute.LinuxVirtualMachineScaleSet("example",
        name="example-vmss",
        resource_group_name=example.name,
        location=example.location,
        sku="Standard_F2",
        instances=1,
        admin_username="adminuser",
        admin_ssh_keys=[{
            "username": "adminuser",
            "public_key": std.file(input="~/.ssh/id_rsa.pub").result,
        }],
        source_image_reference={
            "publisher": "Canonical",
            "offer": "0001-com-ubuntu-server-jammy",
            "sku": "22_04-lts",
            "version": "latest",
        },
        os_disk={
            "storage_account_type": "Standard_LRS",
            "caching": "ReadWrite",
        },
        network_interfaces=[{
            "name": "example",
            "primary": True,
            "ip_configurations": [{
                "name": "internal",
                "primary": True,
                "subnet_id": internal.id,
            }],
        }])
    example_assessment_policy = azure.securitycenter.AssessmentPolicy("example",
        display_name="Test Display Name",
        severity="Medium",
        description="Test Description")
    example_assessment = azure.securitycenter.Assessment("example",
        assessment_policy_id=example_assessment_policy.id,
        target_resource_id=example_linux_virtual_machine_scale_set.id,
        status={
            "code": "Healthy",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute"
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/securitycenter"
    	"github.com/pulumi/pulumi-std/sdk/go/std"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
    			Name:     pulumi.String("example-resources"),
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
    			Name:              pulumi.String("example-network"),
    			ResourceGroupName: example.Name,
    			Location:          example.Location,
    			AddressSpaces: pulumi.StringArray{
    				pulumi.String("10.0.0.0/16"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		internal, err := network.NewSubnet(ctx, "internal", &network.SubnetArgs{
    			Name:               pulumi.String("internal"),
    			ResourceGroupName:  example.Name,
    			VirtualNetworkName: exampleVirtualNetwork.Name,
    			AddressPrefixes: pulumi.StringArray{
    				pulumi.String("10.0.2.0/24"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		invokeFile, err := std.File(ctx, &std.FileArgs{
    			Input: "~/.ssh/id_rsa.pub",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		exampleLinuxVirtualMachineScaleSet, err := compute.NewLinuxVirtualMachineScaleSet(ctx, "example", &compute.LinuxVirtualMachineScaleSetArgs{
    			Name:              pulumi.String("example-vmss"),
    			ResourceGroupName: example.Name,
    			Location:          example.Location,
    			Sku:               pulumi.String("Standard_F2"),
    			Instances:         pulumi.Int(1),
    			AdminUsername:     pulumi.String("adminuser"),
    			AdminSshKeys: compute.LinuxVirtualMachineScaleSetAdminSshKeyArray{
    				&compute.LinuxVirtualMachineScaleSetAdminSshKeyArgs{
    					Username:  pulumi.String("adminuser"),
    					PublicKey: pulumi.String(invokeFile.Result),
    				},
    			},
    			SourceImageReference: &compute.LinuxVirtualMachineScaleSetSourceImageReferenceArgs{
    				Publisher: pulumi.String("Canonical"),
    				Offer:     pulumi.String("0001-com-ubuntu-server-jammy"),
    				Sku:       pulumi.String("22_04-lts"),
    				Version:   pulumi.String("latest"),
    			},
    			OsDisk: &compute.LinuxVirtualMachineScaleSetOsDiskArgs{
    				StorageAccountType: pulumi.String("Standard_LRS"),
    				Caching:            pulumi.String("ReadWrite"),
    			},
    			NetworkInterfaces: compute.LinuxVirtualMachineScaleSetNetworkInterfaceArray{
    				&compute.LinuxVirtualMachineScaleSetNetworkInterfaceArgs{
    					Name:    pulumi.String("example"),
    					Primary: pulumi.Bool(true),
    					IpConfigurations: compute.LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationArray{
    						&compute.LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationArgs{
    							Name:     pulumi.String("internal"),
    							Primary:  pulumi.Bool(true),
    							SubnetId: internal.ID(),
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleAssessmentPolicy, err := securitycenter.NewAssessmentPolicy(ctx, "example", &securitycenter.AssessmentPolicyArgs{
    			DisplayName: pulumi.String("Test Display Name"),
    			Severity:    pulumi.String("Medium"),
    			Description: pulumi.String("Test Description"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = securitycenter.NewAssessment(ctx, "example", &securitycenter.AssessmentArgs{
    			AssessmentPolicyId: exampleAssessmentPolicy.ID(),
    			TargetResourceId:   exampleLinuxVirtualMachineScaleSet.ID(),
    			Status: &securitycenter.AssessmentStatusArgs{
    				Code: pulumi.String("Healthy"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    using Std = Pulumi.Std;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Core.ResourceGroup("example", new()
        {
            Name = "example-resources",
            Location = "West Europe",
        });
    
        var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("example", new()
        {
            Name = "example-network",
            ResourceGroupName = example.Name,
            Location = example.Location,
            AddressSpaces = new[]
            {
                "10.0.0.0/16",
            },
        });
    
        var @internal = new Azure.Network.Subnet("internal", new()
        {
            Name = "internal",
            ResourceGroupName = example.Name,
            VirtualNetworkName = exampleVirtualNetwork.Name,
            AddressPrefixes = new[]
            {
                "10.0.2.0/24",
            },
        });
    
        var exampleLinuxVirtualMachineScaleSet = new Azure.Compute.LinuxVirtualMachineScaleSet("example", new()
        {
            Name = "example-vmss",
            ResourceGroupName = example.Name,
            Location = example.Location,
            Sku = "Standard_F2",
            Instances = 1,
            AdminUsername = "adminuser",
            AdminSshKeys = new[]
            {
                new Azure.Compute.Inputs.LinuxVirtualMachineScaleSetAdminSshKeyArgs
                {
                    Username = "adminuser",
                    PublicKey = Std.File.Invoke(new()
                    {
                        Input = "~/.ssh/id_rsa.pub",
                    }).Apply(invoke => invoke.Result),
                },
            },
            SourceImageReference = new Azure.Compute.Inputs.LinuxVirtualMachineScaleSetSourceImageReferenceArgs
            {
                Publisher = "Canonical",
                Offer = "0001-com-ubuntu-server-jammy",
                Sku = "22_04-lts",
                Version = "latest",
            },
            OsDisk = new Azure.Compute.Inputs.LinuxVirtualMachineScaleSetOsDiskArgs
            {
                StorageAccountType = "Standard_LRS",
                Caching = "ReadWrite",
            },
            NetworkInterfaces = new[]
            {
                new Azure.Compute.Inputs.LinuxVirtualMachineScaleSetNetworkInterfaceArgs
                {
                    Name = "example",
                    Primary = true,
                    IpConfigurations = new[]
                    {
                        new Azure.Compute.Inputs.LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationArgs
                        {
                            Name = "internal",
                            Primary = true,
                            SubnetId = @internal.Id,
                        },
                    },
                },
            },
        });
    
        var exampleAssessmentPolicy = new Azure.SecurityCenter.AssessmentPolicy("example", new()
        {
            DisplayName = "Test Display Name",
            Severity = "Medium",
            Description = "Test Description",
        });
    
        var exampleAssessment = new Azure.SecurityCenter.Assessment("example", new()
        {
            AssessmentPolicyId = exampleAssessmentPolicy.Id,
            TargetResourceId = exampleLinuxVirtualMachineScaleSet.Id,
            Status = new Azure.SecurityCenter.Inputs.AssessmentStatusArgs
            {
                Code = "Healthy",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.network.VirtualNetwork;
    import com.pulumi.azure.network.VirtualNetworkArgs;
    import com.pulumi.azure.network.Subnet;
    import com.pulumi.azure.network.SubnetArgs;
    import com.pulumi.azure.compute.LinuxVirtualMachineScaleSet;
    import com.pulumi.azure.compute.LinuxVirtualMachineScaleSetArgs;
    import com.pulumi.azure.compute.inputs.LinuxVirtualMachineScaleSetAdminSshKeyArgs;
    import com.pulumi.azure.compute.inputs.LinuxVirtualMachineScaleSetSourceImageReferenceArgs;
    import com.pulumi.azure.compute.inputs.LinuxVirtualMachineScaleSetOsDiskArgs;
    import com.pulumi.azure.compute.inputs.LinuxVirtualMachineScaleSetNetworkInterfaceArgs;
    import com.pulumi.azure.securitycenter.AssessmentPolicy;
    import com.pulumi.azure.securitycenter.AssessmentPolicyArgs;
    import com.pulumi.azure.securitycenter.Assessment;
    import com.pulumi.azure.securitycenter.AssessmentArgs;
    import com.pulumi.azure.securitycenter.inputs.AssessmentStatusArgs;
    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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
                .name("example-resources")
                .location("West Europe")
                .build());
    
            var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
                .name("example-network")
                .resourceGroupName(example.name())
                .location(example.location())
                .addressSpaces("10.0.0.0/16")
                .build());
    
            var internal = new Subnet("internal", SubnetArgs.builder()
                .name("internal")
                .resourceGroupName(example.name())
                .virtualNetworkName(exampleVirtualNetwork.name())
                .addressPrefixes("10.0.2.0/24")
                .build());
    
            var exampleLinuxVirtualMachineScaleSet = new LinuxVirtualMachineScaleSet("exampleLinuxVirtualMachineScaleSet", LinuxVirtualMachineScaleSetArgs.builder()
                .name("example-vmss")
                .resourceGroupName(example.name())
                .location(example.location())
                .sku("Standard_F2")
                .instances(1)
                .adminUsername("adminuser")
                .adminSshKeys(LinuxVirtualMachineScaleSetAdminSshKeyArgs.builder()
                    .username("adminuser")
                    .publicKey(StdFunctions.file(FileArgs.builder()
                        .input("~/.ssh/id_rsa.pub")
                        .build()).result())
                    .build())
                .sourceImageReference(LinuxVirtualMachineScaleSetSourceImageReferenceArgs.builder()
                    .publisher("Canonical")
                    .offer("0001-com-ubuntu-server-jammy")
                    .sku("22_04-lts")
                    .version("latest")
                    .build())
                .osDisk(LinuxVirtualMachineScaleSetOsDiskArgs.builder()
                    .storageAccountType("Standard_LRS")
                    .caching("ReadWrite")
                    .build())
                .networkInterfaces(LinuxVirtualMachineScaleSetNetworkInterfaceArgs.builder()
                    .name("example")
                    .primary(true)
                    .ipConfigurations(LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationArgs.builder()
                        .name("internal")
                        .primary(true)
                        .subnetId(internal.id())
                        .build())
                    .build())
                .build());
    
            var exampleAssessmentPolicy = new AssessmentPolicy("exampleAssessmentPolicy", AssessmentPolicyArgs.builder()
                .displayName("Test Display Name")
                .severity("Medium")
                .description("Test Description")
                .build());
    
            var exampleAssessment = new Assessment("exampleAssessment", AssessmentArgs.builder()
                .assessmentPolicyId(exampleAssessmentPolicy.id())
                .targetResourceId(exampleLinuxVirtualMachineScaleSet.id())
                .status(AssessmentStatusArgs.builder()
                    .code("Healthy")
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: example-resources
          location: West Europe
      exampleVirtualNetwork:
        type: azure:network:VirtualNetwork
        name: example
        properties:
          name: example-network
          resourceGroupName: ${example.name}
          location: ${example.location}
          addressSpaces:
            - 10.0.0.0/16
      internal:
        type: azure:network:Subnet
        properties:
          name: internal
          resourceGroupName: ${example.name}
          virtualNetworkName: ${exampleVirtualNetwork.name}
          addressPrefixes:
            - 10.0.2.0/24
      exampleLinuxVirtualMachineScaleSet:
        type: azure:compute:LinuxVirtualMachineScaleSet
        name: example
        properties:
          name: example-vmss
          resourceGroupName: ${example.name}
          location: ${example.location}
          sku: Standard_F2
          instances: 1
          adminUsername: adminuser
          adminSshKeys:
            - username: adminuser
              publicKey:
                fn::invoke:
                  Function: std:file
                  Arguments:
                    input: ~/.ssh/id_rsa.pub
                  Return: result
          sourceImageReference:
            publisher: Canonical
            offer: 0001-com-ubuntu-server-jammy
            sku: 22_04-lts
            version: latest
          osDisk:
            storageAccountType: Standard_LRS
            caching: ReadWrite
          networkInterfaces:
            - name: example
              primary: true
              ipConfigurations:
                - name: internal
                  primary: true
                  subnetId: ${internal.id}
      exampleAssessmentPolicy:
        type: azure:securitycenter:AssessmentPolicy
        name: example
        properties:
          displayName: Test Display Name
          severity: Medium
          description: Test Description
      exampleAssessment:
        type: azure:securitycenter:Assessment
        name: example
        properties:
          assessmentPolicyId: ${exampleAssessmentPolicy.id}
          targetResourceId: ${exampleLinuxVirtualMachineScaleSet.id}
          status:
            code: Healthy
    

    Create Assessment Resource

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

    Constructor syntax

    new Assessment(name: string, args: AssessmentArgs, opts?: CustomResourceOptions);
    @overload
    def Assessment(resource_name: str,
                   args: AssessmentArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def Assessment(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   assessment_policy_id: Optional[str] = None,
                   status: Optional[AssessmentStatusArgs] = None,
                   target_resource_id: Optional[str] = None,
                   additional_data: Optional[Mapping[str, str]] = None)
    func NewAssessment(ctx *Context, name string, args AssessmentArgs, opts ...ResourceOption) (*Assessment, error)
    public Assessment(string name, AssessmentArgs args, CustomResourceOptions? opts = null)
    public Assessment(String name, AssessmentArgs args)
    public Assessment(String name, AssessmentArgs args, CustomResourceOptions options)
    
    type: azure:securitycenter:Assessment
    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 AssessmentArgs
    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 AssessmentArgs
    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 AssessmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AssessmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AssessmentArgs
    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 assessmentResource = new Azure.SecurityCenter.Assessment("assessmentResource", new()
    {
        AssessmentPolicyId = "string",
        Status = new Azure.SecurityCenter.Inputs.AssessmentStatusArgs
        {
            Code = "string",
            Cause = "string",
            Description = "string",
        },
        TargetResourceId = "string",
        AdditionalData = 
        {
            { "string", "string" },
        },
    });
    
    example, err := securitycenter.NewAssessment(ctx, "assessmentResource", &securitycenter.AssessmentArgs{
    	AssessmentPolicyId: pulumi.String("string"),
    	Status: &securitycenter.AssessmentStatusArgs{
    		Code:        pulumi.String("string"),
    		Cause:       pulumi.String("string"),
    		Description: pulumi.String("string"),
    	},
    	TargetResourceId: pulumi.String("string"),
    	AdditionalData: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var assessmentResource = new Assessment("assessmentResource", AssessmentArgs.builder()
        .assessmentPolicyId("string")
        .status(AssessmentStatusArgs.builder()
            .code("string")
            .cause("string")
            .description("string")
            .build())
        .targetResourceId("string")
        .additionalData(Map.of("string", "string"))
        .build());
    
    assessment_resource = azure.securitycenter.Assessment("assessmentResource",
        assessment_policy_id="string",
        status={
            "code": "string",
            "cause": "string",
            "description": "string",
        },
        target_resource_id="string",
        additional_data={
            "string": "string",
        })
    
    const assessmentResource = new azure.securitycenter.Assessment("assessmentResource", {
        assessmentPolicyId: "string",
        status: {
            code: "string",
            cause: "string",
            description: "string",
        },
        targetResourceId: "string",
        additionalData: {
            string: "string",
        },
    });
    
    type: azure:securitycenter:Assessment
    properties:
        additionalData:
            string: string
        assessmentPolicyId: string
        status:
            cause: string
            code: string
            description: string
        targetResourceId: string
    

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

    AssessmentPolicyId string
    The ID of the security Assessment policy to apply to this resource. Changing this forces a new security Assessment to be created.
    Status AssessmentStatus
    A status block as defined below.
    TargetResourceId string
    The ID of the target resource. Changing this forces a new security Assessment to be created.
    AdditionalData Dictionary<string, string>
    A map of additional data to associate with the assessment.
    AssessmentPolicyId string
    The ID of the security Assessment policy to apply to this resource. Changing this forces a new security Assessment to be created.
    Status AssessmentStatusArgs
    A status block as defined below.
    TargetResourceId string
    The ID of the target resource. Changing this forces a new security Assessment to be created.
    AdditionalData map[string]string
    A map of additional data to associate with the assessment.
    assessmentPolicyId String
    The ID of the security Assessment policy to apply to this resource. Changing this forces a new security Assessment to be created.
    status AssessmentStatus
    A status block as defined below.
    targetResourceId String
    The ID of the target resource. Changing this forces a new security Assessment to be created.
    additionalData Map<String,String>
    A map of additional data to associate with the assessment.
    assessmentPolicyId string
    The ID of the security Assessment policy to apply to this resource. Changing this forces a new security Assessment to be created.
    status AssessmentStatus
    A status block as defined below.
    targetResourceId string
    The ID of the target resource. Changing this forces a new security Assessment to be created.
    additionalData {[key: string]: string}
    A map of additional data to associate with the assessment.
    assessment_policy_id str
    The ID of the security Assessment policy to apply to this resource. Changing this forces a new security Assessment to be created.
    status AssessmentStatusArgs
    A status block as defined below.
    target_resource_id str
    The ID of the target resource. Changing this forces a new security Assessment to be created.
    additional_data Mapping[str, str]
    A map of additional data to associate with the assessment.
    assessmentPolicyId String
    The ID of the security Assessment policy to apply to this resource. Changing this forces a new security Assessment to be created.
    status Property Map
    A status block as defined below.
    targetResourceId String
    The ID of the target resource. Changing this forces a new security Assessment to be created.
    additionalData Map<String>
    A map of additional data to associate with the assessment.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Assessment Resource

    Get an existing Assessment resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: AssessmentState, opts?: CustomResourceOptions): Assessment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            additional_data: Optional[Mapping[str, str]] = None,
            assessment_policy_id: Optional[str] = None,
            status: Optional[AssessmentStatusArgs] = None,
            target_resource_id: Optional[str] = None) -> Assessment
    func GetAssessment(ctx *Context, name string, id IDInput, state *AssessmentState, opts ...ResourceOption) (*Assessment, error)
    public static Assessment Get(string name, Input<string> id, AssessmentState? state, CustomResourceOptions? opts = null)
    public static Assessment get(String name, Output<String> id, AssessmentState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AdditionalData Dictionary<string, string>
    A map of additional data to associate with the assessment.
    AssessmentPolicyId string
    The ID of the security Assessment policy to apply to this resource. Changing this forces a new security Assessment to be created.
    Status AssessmentStatus
    A status block as defined below.
    TargetResourceId string
    The ID of the target resource. Changing this forces a new security Assessment to be created.
    AdditionalData map[string]string
    A map of additional data to associate with the assessment.
    AssessmentPolicyId string
    The ID of the security Assessment policy to apply to this resource. Changing this forces a new security Assessment to be created.
    Status AssessmentStatusArgs
    A status block as defined below.
    TargetResourceId string
    The ID of the target resource. Changing this forces a new security Assessment to be created.
    additionalData Map<String,String>
    A map of additional data to associate with the assessment.
    assessmentPolicyId String
    The ID of the security Assessment policy to apply to this resource. Changing this forces a new security Assessment to be created.
    status AssessmentStatus
    A status block as defined below.
    targetResourceId String
    The ID of the target resource. Changing this forces a new security Assessment to be created.
    additionalData {[key: string]: string}
    A map of additional data to associate with the assessment.
    assessmentPolicyId string
    The ID of the security Assessment policy to apply to this resource. Changing this forces a new security Assessment to be created.
    status AssessmentStatus
    A status block as defined below.
    targetResourceId string
    The ID of the target resource. Changing this forces a new security Assessment to be created.
    additional_data Mapping[str, str]
    A map of additional data to associate with the assessment.
    assessment_policy_id str
    The ID of the security Assessment policy to apply to this resource. Changing this forces a new security Assessment to be created.
    status AssessmentStatusArgs
    A status block as defined below.
    target_resource_id str
    The ID of the target resource. Changing this forces a new security Assessment to be created.
    additionalData Map<String>
    A map of additional data to associate with the assessment.
    assessmentPolicyId String
    The ID of the security Assessment policy to apply to this resource. Changing this forces a new security Assessment to be created.
    status Property Map
    A status block as defined below.
    targetResourceId String
    The ID of the target resource. Changing this forces a new security Assessment to be created.

    Supporting Types

    AssessmentStatus, AssessmentStatusArgs

    Code string
    Specifies the programmatic code of the assessment status. Possible values are Healthy, Unhealthy and NotApplicable.
    Cause string
    Specifies the cause of the assessment status.
    Description string
    Specifies the human readable description of the assessment status.
    Code string
    Specifies the programmatic code of the assessment status. Possible values are Healthy, Unhealthy and NotApplicable.
    Cause string
    Specifies the cause of the assessment status.
    Description string
    Specifies the human readable description of the assessment status.
    code String
    Specifies the programmatic code of the assessment status. Possible values are Healthy, Unhealthy and NotApplicable.
    cause String
    Specifies the cause of the assessment status.
    description String
    Specifies the human readable description of the assessment status.
    code string
    Specifies the programmatic code of the assessment status. Possible values are Healthy, Unhealthy and NotApplicable.
    cause string
    Specifies the cause of the assessment status.
    description string
    Specifies the human readable description of the assessment status.
    code str
    Specifies the programmatic code of the assessment status. Possible values are Healthy, Unhealthy and NotApplicable.
    cause str
    Specifies the cause of the assessment status.
    description str
    Specifies the human readable description of the assessment status.
    code String
    Specifies the programmatic code of the assessment status. Possible values are Healthy, Unhealthy and NotApplicable.
    cause String
    Specifies the cause of the assessment status.
    description String
    Specifies the human readable description of the assessment status.

    Import

    Security Assessment can be imported using the resource id, e.g.

    $ pulumi import azure:securitycenter/assessment:Assessment example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1/providers/Microsoft.Security/assessments/00000000-0000-0000-0000-000000000000
    

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

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi