1. Packages
  2. Azure Classic
  3. API Docs
  4. devtest
  5. Policy

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.devtest.Policy

Explore with Pulumi AI

Manages a Policy within a Dev Test Policy Set.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = new azure.core.ResourceGroup("example", {
    name: "example-resources",
    location: "West Europe",
});
const exampleLab = new azure.devtest.Lab("example", {
    name: "example-devtestlab",
    location: example.location,
    resourceGroupName: example.name,
    tags: {
        Sydney: "Australia",
    },
});
const examplePolicy = new azure.devtest.Policy("example", {
    name: "LabVmCount",
    policySetName: "default",
    labName: exampleLab.name,
    resourceGroupName: example.name,
    factData: "",
    threshold: "999",
    evaluatorType: "MaxValuePolicy",
    tags: {
        Acceptance: "Test",
    },
});
Copy
import pulumi
import pulumi_azure as azure

example = azure.core.ResourceGroup("example",
    name="example-resources",
    location="West Europe")
example_lab = azure.devtest.Lab("example",
    name="example-devtestlab",
    location=example.location,
    resource_group_name=example.name,
    tags={
        "Sydney": "Australia",
    })
example_policy = azure.devtest.Policy("example",
    name="LabVmCount",
    policy_set_name="default",
    lab_name=example_lab.name,
    resource_group_name=example.name,
    fact_data="",
    threshold="999",
    evaluator_type="MaxValuePolicy",
    tags={
        "Acceptance": "Test",
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/devtest"
	"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
		}
		exampleLab, err := devtest.NewLab(ctx, "example", &devtest.LabArgs{
			Name:              pulumi.String("example-devtestlab"),
			Location:          example.Location,
			ResourceGroupName: example.Name,
			Tags: pulumi.StringMap{
				"Sydney": pulumi.String("Australia"),
			},
		})
		if err != nil {
			return err
		}
		_, err = devtest.NewPolicy(ctx, "example", &devtest.PolicyArgs{
			Name:              pulumi.String("LabVmCount"),
			PolicySetName:     pulumi.String("default"),
			LabName:           exampleLab.Name,
			ResourceGroupName: example.Name,
			FactData:          pulumi.String(""),
			Threshold:         pulumi.String("999"),
			EvaluatorType:     pulumi.String("MaxValuePolicy"),
			Tags: pulumi.StringMap{
				"Acceptance": pulumi.String("Test"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var example = new Azure.Core.ResourceGroup("example", new()
    {
        Name = "example-resources",
        Location = "West Europe",
    });

    var exampleLab = new Azure.DevTest.Lab("example", new()
    {
        Name = "example-devtestlab",
        Location = example.Location,
        ResourceGroupName = example.Name,
        Tags = 
        {
            { "Sydney", "Australia" },
        },
    });

    var examplePolicy = new Azure.DevTest.Policy("example", new()
    {
        Name = "LabVmCount",
        PolicySetName = "default",
        LabName = exampleLab.Name,
        ResourceGroupName = example.Name,
        FactData = "",
        Threshold = "999",
        EvaluatorType = "MaxValuePolicy",
        Tags = 
        {
            { "Acceptance", "Test" },
        },
    });

});
Copy
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.devtest.Lab;
import com.pulumi.azure.devtest.LabArgs;
import com.pulumi.azure.devtest.Policy;
import com.pulumi.azure.devtest.PolicyArgs;
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 exampleLab = new Lab("exampleLab", LabArgs.builder()
            .name("example-devtestlab")
            .location(example.location())
            .resourceGroupName(example.name())
            .tags(Map.of("Sydney", "Australia"))
            .build());

        var examplePolicy = new Policy("examplePolicy", PolicyArgs.builder()
            .name("LabVmCount")
            .policySetName("default")
            .labName(exampleLab.name())
            .resourceGroupName(example.name())
            .factData("")
            .threshold("999")
            .evaluatorType("MaxValuePolicy")
            .tags(Map.of("Acceptance", "Test"))
            .build());

    }
}
Copy
resources:
  example:
    type: azure:core:ResourceGroup
    properties:
      name: example-resources
      location: West Europe
  exampleLab:
    type: azure:devtest:Lab
    name: example
    properties:
      name: example-devtestlab
      location: ${example.location}
      resourceGroupName: ${example.name}
      tags:
        Sydney: Australia
  examplePolicy:
    type: azure:devtest:Policy
    name: example
    properties:
      name: LabVmCount
      policySetName: default
      labName: ${exampleLab.name}
      resourceGroupName: ${example.name}
      factData: ""
      threshold: '999'
      evaluatorType: MaxValuePolicy
      tags:
        Acceptance: Test
Copy

Create Policy Resource

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

Constructor syntax

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

@overload
def Policy(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           evaluator_type: Optional[str] = None,
           lab_name: Optional[str] = None,
           policy_set_name: Optional[str] = None,
           resource_group_name: Optional[str] = None,
           threshold: Optional[str] = None,
           description: Optional[str] = None,
           fact_data: Optional[str] = None,
           name: Optional[str] = None,
           tags: Optional[Mapping[str, str]] = None)
func NewPolicy(ctx *Context, name string, args PolicyArgs, opts ...ResourceOption) (*Policy, error)
public Policy(string name, PolicyArgs args, CustomResourceOptions? opts = null)
public Policy(String name, PolicyArgs args)
public Policy(String name, PolicyArgs args, CustomResourceOptions options)
type: azure:devtest:Policy
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. PolicyArgs
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. PolicyArgs
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. PolicyArgs
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. PolicyArgs
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. PolicyArgs
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 azurePolicyResource = new Azure.DevTest.Policy("azurePolicyResource", new()
{
    EvaluatorType = "string",
    LabName = "string",
    PolicySetName = "string",
    ResourceGroupName = "string",
    Threshold = "string",
    Description = "string",
    FactData = "string",
    Name = "string",
    Tags = 
    {
        { "string", "string" },
    },
});
Copy
example, err := devtest.NewPolicy(ctx, "azurePolicyResource", &devtest.PolicyArgs{
	EvaluatorType:     pulumi.String("string"),
	LabName:           pulumi.String("string"),
	PolicySetName:     pulumi.String("string"),
	ResourceGroupName: pulumi.String("string"),
	Threshold:         pulumi.String("string"),
	Description:       pulumi.String("string"),
	FactData:          pulumi.String("string"),
	Name:              pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
Copy
var azurePolicyResource = new Policy("azurePolicyResource", PolicyArgs.builder()
    .evaluatorType("string")
    .labName("string")
    .policySetName("string")
    .resourceGroupName("string")
    .threshold("string")
    .description("string")
    .factData("string")
    .name("string")
    .tags(Map.of("string", "string"))
    .build());
Copy
azure_policy_resource = azure.devtest.Policy("azurePolicyResource",
    evaluator_type="string",
    lab_name="string",
    policy_set_name="string",
    resource_group_name="string",
    threshold="string",
    description="string",
    fact_data="string",
    name="string",
    tags={
        "string": "string",
    })
Copy
const azurePolicyResource = new azure.devtest.Policy("azurePolicyResource", {
    evaluatorType: "string",
    labName: "string",
    policySetName: "string",
    resourceGroupName: "string",
    threshold: "string",
    description: "string",
    factData: "string",
    name: "string",
    tags: {
        string: "string",
    },
});
Copy
type: azure:devtest:Policy
properties:
    description: string
    evaluatorType: string
    factData: string
    labName: string
    name: string
    policySetName: string
    resourceGroupName: string
    tags:
        string: string
    threshold: string
Copy

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

EvaluatorType
This property is required.
Changes to this property will trigger replacement.
string
The Evaluation Type used for this Policy. Possible values include: 'AllowedValuesPolicy', 'MaxValuePolicy'. Changing this forces a new resource to be created.
LabName
This property is required.
Changes to this property will trigger replacement.
string
Specifies the name of the Dev Test Lab in which the Policy should be created. Changing this forces a new resource to be created.
PolicySetName
This property is required.
Changes to this property will trigger replacement.
string
Specifies the name of the Policy Set within the Dev Test Lab where this policy should be created. Changing this forces a new resource to be created.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
Threshold This property is required. string
The Threshold for this Policy.
Description string
A description for the Policy.
FactData string
The Fact Data for this Policy.
Name Changes to this property will trigger replacement. string
Specifies the name of the Dev Test Policy. Possible values are GalleryImage, LabPremiumVmCount, LabTargetCost, LabVmCount, LabVmSize, UserOwnedLabPremiumVmCount, UserOwnedLabVmCount and UserOwnedLabVmCountInSubnet. Changing this forces a new resource to be created.
Tags Dictionary<string, string>
A mapping of tags to assign to the resource.
EvaluatorType
This property is required.
Changes to this property will trigger replacement.
string
The Evaluation Type used for this Policy. Possible values include: 'AllowedValuesPolicy', 'MaxValuePolicy'. Changing this forces a new resource to be created.
LabName
This property is required.
Changes to this property will trigger replacement.
string
Specifies the name of the Dev Test Lab in which the Policy should be created. Changing this forces a new resource to be created.
PolicySetName
This property is required.
Changes to this property will trigger replacement.
string
Specifies the name of the Policy Set within the Dev Test Lab where this policy should be created. Changing this forces a new resource to be created.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
Threshold This property is required. string
The Threshold for this Policy.
Description string
A description for the Policy.
FactData string
The Fact Data for this Policy.
Name Changes to this property will trigger replacement. string
Specifies the name of the Dev Test Policy. Possible values are GalleryImage, LabPremiumVmCount, LabTargetCost, LabVmCount, LabVmSize, UserOwnedLabPremiumVmCount, UserOwnedLabVmCount and UserOwnedLabVmCountInSubnet. Changing this forces a new resource to be created.
Tags map[string]string
A mapping of tags to assign to the resource.
evaluatorType
This property is required.
Changes to this property will trigger replacement.
String
The Evaluation Type used for this Policy. Possible values include: 'AllowedValuesPolicy', 'MaxValuePolicy'. Changing this forces a new resource to be created.
labName
This property is required.
Changes to this property will trigger replacement.
String
Specifies the name of the Dev Test Lab in which the Policy should be created. Changing this forces a new resource to be created.
policySetName
This property is required.
Changes to this property will trigger replacement.
String
Specifies the name of the Policy Set within the Dev Test Lab where this policy should be created. Changing this forces a new resource to be created.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
threshold This property is required. String
The Threshold for this Policy.
description String
A description for the Policy.
factData String
The Fact Data for this Policy.
name Changes to this property will trigger replacement. String
Specifies the name of the Dev Test Policy. Possible values are GalleryImage, LabPremiumVmCount, LabTargetCost, LabVmCount, LabVmSize, UserOwnedLabPremiumVmCount, UserOwnedLabVmCount and UserOwnedLabVmCountInSubnet. Changing this forces a new resource to be created.
tags Map<String,String>
A mapping of tags to assign to the resource.
evaluatorType
This property is required.
Changes to this property will trigger replacement.
string
The Evaluation Type used for this Policy. Possible values include: 'AllowedValuesPolicy', 'MaxValuePolicy'. Changing this forces a new resource to be created.
labName
This property is required.
Changes to this property will trigger replacement.
string
Specifies the name of the Dev Test Lab in which the Policy should be created. Changing this forces a new resource to be created.
policySetName
This property is required.
Changes to this property will trigger replacement.
string
Specifies the name of the Policy Set within the Dev Test Lab where this policy should be created. Changing this forces a new resource to be created.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
threshold This property is required. string
The Threshold for this Policy.
description string
A description for the Policy.
factData string
The Fact Data for this Policy.
name Changes to this property will trigger replacement. string
Specifies the name of the Dev Test Policy. Possible values are GalleryImage, LabPremiumVmCount, LabTargetCost, LabVmCount, LabVmSize, UserOwnedLabPremiumVmCount, UserOwnedLabVmCount and UserOwnedLabVmCountInSubnet. Changing this forces a new resource to be created.
tags {[key: string]: string}
A mapping of tags to assign to the resource.
evaluator_type
This property is required.
Changes to this property will trigger replacement.
str
The Evaluation Type used for this Policy. Possible values include: 'AllowedValuesPolicy', 'MaxValuePolicy'. Changing this forces a new resource to be created.
lab_name
This property is required.
Changes to this property will trigger replacement.
str
Specifies the name of the Dev Test Lab in which the Policy should be created. Changing this forces a new resource to be created.
policy_set_name
This property is required.
Changes to this property will trigger replacement.
str
Specifies the name of the Policy Set within the Dev Test Lab where this policy should be created. Changing this forces a new resource to be created.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
threshold This property is required. str
The Threshold for this Policy.
description str
A description for the Policy.
fact_data str
The Fact Data for this Policy.
name Changes to this property will trigger replacement. str
Specifies the name of the Dev Test Policy. Possible values are GalleryImage, LabPremiumVmCount, LabTargetCost, LabVmCount, LabVmSize, UserOwnedLabPremiumVmCount, UserOwnedLabVmCount and UserOwnedLabVmCountInSubnet. Changing this forces a new resource to be created.
tags Mapping[str, str]
A mapping of tags to assign to the resource.
evaluatorType
This property is required.
Changes to this property will trigger replacement.
String
The Evaluation Type used for this Policy. Possible values include: 'AllowedValuesPolicy', 'MaxValuePolicy'. Changing this forces a new resource to be created.
labName
This property is required.
Changes to this property will trigger replacement.
String
Specifies the name of the Dev Test Lab in which the Policy should be created. Changing this forces a new resource to be created.
policySetName
This property is required.
Changes to this property will trigger replacement.
String
Specifies the name of the Policy Set within the Dev Test Lab where this policy should be created. Changing this forces a new resource to be created.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
threshold This property is required. String
The Threshold for this Policy.
description String
A description for the Policy.
factData String
The Fact Data for this Policy.
name Changes to this property will trigger replacement. String
Specifies the name of the Dev Test Policy. Possible values are GalleryImage, LabPremiumVmCount, LabTargetCost, LabVmCount, LabVmSize, UserOwnedLabPremiumVmCount, UserOwnedLabVmCount and UserOwnedLabVmCountInSubnet. Changing this forces a new resource to be created.
tags Map<String>
A mapping of tags to assign to the resource.

Outputs

All input properties are implicitly available as output properties. Additionally, the Policy 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 Policy Resource

Get an existing Policy 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?: PolicyState, opts?: CustomResourceOptions): Policy
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        evaluator_type: Optional[str] = None,
        fact_data: Optional[str] = None,
        lab_name: Optional[str] = None,
        name: Optional[str] = None,
        policy_set_name: Optional[str] = None,
        resource_group_name: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        threshold: Optional[str] = None) -> Policy
func GetPolicy(ctx *Context, name string, id IDInput, state *PolicyState, opts ...ResourceOption) (*Policy, error)
public static Policy Get(string name, Input<string> id, PolicyState? state, CustomResourceOptions? opts = null)
public static Policy get(String name, Output<String> id, PolicyState state, CustomResourceOptions options)
resources:  _:    type: azure:devtest:Policy    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Description string
A description for the Policy.
EvaluatorType Changes to this property will trigger replacement. string
The Evaluation Type used for this Policy. Possible values include: 'AllowedValuesPolicy', 'MaxValuePolicy'. Changing this forces a new resource to be created.
FactData string
The Fact Data for this Policy.
LabName Changes to this property will trigger replacement. string
Specifies the name of the Dev Test Lab in which the Policy should be created. Changing this forces a new resource to be created.
Name Changes to this property will trigger replacement. string
Specifies the name of the Dev Test Policy. Possible values are GalleryImage, LabPremiumVmCount, LabTargetCost, LabVmCount, LabVmSize, UserOwnedLabPremiumVmCount, UserOwnedLabVmCount and UserOwnedLabVmCountInSubnet. Changing this forces a new resource to be created.
PolicySetName Changes to this property will trigger replacement. string
Specifies the name of the Policy Set within the Dev Test Lab where this policy should be created. Changing this forces a new resource to be created.
ResourceGroupName Changes to this property will trigger replacement. string
The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
Tags Dictionary<string, string>
A mapping of tags to assign to the resource.
Threshold string
The Threshold for this Policy.
Description string
A description for the Policy.
EvaluatorType Changes to this property will trigger replacement. string
The Evaluation Type used for this Policy. Possible values include: 'AllowedValuesPolicy', 'MaxValuePolicy'. Changing this forces a new resource to be created.
FactData string
The Fact Data for this Policy.
LabName Changes to this property will trigger replacement. string
Specifies the name of the Dev Test Lab in which the Policy should be created. Changing this forces a new resource to be created.
Name Changes to this property will trigger replacement. string
Specifies the name of the Dev Test Policy. Possible values are GalleryImage, LabPremiumVmCount, LabTargetCost, LabVmCount, LabVmSize, UserOwnedLabPremiumVmCount, UserOwnedLabVmCount and UserOwnedLabVmCountInSubnet. Changing this forces a new resource to be created.
PolicySetName Changes to this property will trigger replacement. string
Specifies the name of the Policy Set within the Dev Test Lab where this policy should be created. Changing this forces a new resource to be created.
ResourceGroupName Changes to this property will trigger replacement. string
The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
Tags map[string]string
A mapping of tags to assign to the resource.
Threshold string
The Threshold for this Policy.
description String
A description for the Policy.
evaluatorType Changes to this property will trigger replacement. String
The Evaluation Type used for this Policy. Possible values include: 'AllowedValuesPolicy', 'MaxValuePolicy'. Changing this forces a new resource to be created.
factData String
The Fact Data for this Policy.
labName Changes to this property will trigger replacement. String
Specifies the name of the Dev Test Lab in which the Policy should be created. Changing this forces a new resource to be created.
name Changes to this property will trigger replacement. String
Specifies the name of the Dev Test Policy. Possible values are GalleryImage, LabPremiumVmCount, LabTargetCost, LabVmCount, LabVmSize, UserOwnedLabPremiumVmCount, UserOwnedLabVmCount and UserOwnedLabVmCountInSubnet. Changing this forces a new resource to be created.
policySetName Changes to this property will trigger replacement. String
Specifies the name of the Policy Set within the Dev Test Lab where this policy should be created. Changing this forces a new resource to be created.
resourceGroupName Changes to this property will trigger replacement. String
The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
tags Map<String,String>
A mapping of tags to assign to the resource.
threshold String
The Threshold for this Policy.
description string
A description for the Policy.
evaluatorType Changes to this property will trigger replacement. string
The Evaluation Type used for this Policy. Possible values include: 'AllowedValuesPolicy', 'MaxValuePolicy'. Changing this forces a new resource to be created.
factData string
The Fact Data for this Policy.
labName Changes to this property will trigger replacement. string
Specifies the name of the Dev Test Lab in which the Policy should be created. Changing this forces a new resource to be created.
name Changes to this property will trigger replacement. string
Specifies the name of the Dev Test Policy. Possible values are GalleryImage, LabPremiumVmCount, LabTargetCost, LabVmCount, LabVmSize, UserOwnedLabPremiumVmCount, UserOwnedLabVmCount and UserOwnedLabVmCountInSubnet. Changing this forces a new resource to be created.
policySetName Changes to this property will trigger replacement. string
Specifies the name of the Policy Set within the Dev Test Lab where this policy should be created. Changing this forces a new resource to be created.
resourceGroupName Changes to this property will trigger replacement. string
The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
tags {[key: string]: string}
A mapping of tags to assign to the resource.
threshold string
The Threshold for this Policy.
description str
A description for the Policy.
evaluator_type Changes to this property will trigger replacement. str
The Evaluation Type used for this Policy. Possible values include: 'AllowedValuesPolicy', 'MaxValuePolicy'. Changing this forces a new resource to be created.
fact_data str
The Fact Data for this Policy.
lab_name Changes to this property will trigger replacement. str
Specifies the name of the Dev Test Lab in which the Policy should be created. Changing this forces a new resource to be created.
name Changes to this property will trigger replacement. str
Specifies the name of the Dev Test Policy. Possible values are GalleryImage, LabPremiumVmCount, LabTargetCost, LabVmCount, LabVmSize, UserOwnedLabPremiumVmCount, UserOwnedLabVmCount and UserOwnedLabVmCountInSubnet. Changing this forces a new resource to be created.
policy_set_name Changes to this property will trigger replacement. str
Specifies the name of the Policy Set within the Dev Test Lab where this policy should be created. Changing this forces a new resource to be created.
resource_group_name Changes to this property will trigger replacement. str
The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
tags Mapping[str, str]
A mapping of tags to assign to the resource.
threshold str
The Threshold for this Policy.
description String
A description for the Policy.
evaluatorType Changes to this property will trigger replacement. String
The Evaluation Type used for this Policy. Possible values include: 'AllowedValuesPolicy', 'MaxValuePolicy'. Changing this forces a new resource to be created.
factData String
The Fact Data for this Policy.
labName Changes to this property will trigger replacement. String
Specifies the name of the Dev Test Lab in which the Policy should be created. Changing this forces a new resource to be created.
name Changes to this property will trigger replacement. String
Specifies the name of the Dev Test Policy. Possible values are GalleryImage, LabPremiumVmCount, LabTargetCost, LabVmCount, LabVmSize, UserOwnedLabPremiumVmCount, UserOwnedLabVmCount and UserOwnedLabVmCountInSubnet. Changing this forces a new resource to be created.
policySetName Changes to this property will trigger replacement. String
Specifies the name of the Policy Set within the Dev Test Lab where this policy should be created. Changing this forces a new resource to be created.
resourceGroupName Changes to this property will trigger replacement. String
The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
tags Map<String>
A mapping of tags to assign to the resource.
threshold String
The Threshold for this Policy.

Import

Dev Test Policies can be imported using the resource id, e.g.

$ pulumi import azure:devtest/policy:Policy policy1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DevTestLab/labs/lab1/policySets/default/policies/policy1
Copy

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.