1. Packages
  2. Azure Native v1
  3. API Docs
  4. devtestlab
  5. Environment
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi

azure-native.devtestlab.Environment

Explore with Pulumi AI

azure-native-v1 logo
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi

    An environment, which is essentially an ARM template deployment. API Version: 2018-09-15.

    Example Usage

    Environments_CreateOrUpdate

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var environment = new AzureNative.DevTestLab.Environment("environment", new()
        {
            DeploymentProperties = new AzureNative.DevTestLab.Inputs.EnvironmentDeploymentPropertiesArgs
            {
                ArmTemplateId = "/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/artifactSources/{artifactSourceName}/armTemplates/{armTemplateName}",
                Parameters = new[] {},
            },
            LabName = "{labName}",
            Name = "{environmentName}",
            ResourceGroupName = "resourceGroupName",
            UserName = "@me",
        });
    
    });
    
    package main
    
    import (
    	devtestlab "github.com/pulumi/pulumi-azure-native-sdk/devtestlab"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := devtestlab.NewEnvironment(ctx, "environment", &devtestlab.EnvironmentArgs{
    			DeploymentProperties: devtestlab.EnvironmentDeploymentPropertiesResponse{
    				ArmTemplateId: pulumi.String("/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/artifactSources/{artifactSourceName}/armTemplates/{armTemplateName}"),
    				Parameters:    devtestlab.ArmTemplateParameterPropertiesArray{},
    			},
    			LabName:           pulumi.String("{labName}"),
    			Name:              pulumi.String("{environmentName}"),
    			ResourceGroupName: pulumi.String("resourceGroupName"),
    			UserName:          pulumi.String("@me"),
    		})
    		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.devtestlab.Environment;
    import com.pulumi.azurenative.devtestlab.EnvironmentArgs;
    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 environment = new Environment("environment", EnvironmentArgs.builder()        
                .deploymentProperties(Map.ofEntries(
                    Map.entry("armTemplateId", "/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/artifactSources/{artifactSourceName}/armTemplates/{armTemplateName}"),
                    Map.entry("parameters", )
                ))
                .labName("{labName}")
                .name("{environmentName}")
                .resourceGroupName("resourceGroupName")
                .userName("@me")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    environment = azure_native.devtestlab.Environment("environment",
        deployment_properties=azure_native.devtestlab.EnvironmentDeploymentPropertiesResponseArgs(
            arm_template_id="/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/artifactSources/{artifactSourceName}/armTemplates/{armTemplateName}",
            parameters=[],
        ),
        lab_name="{labName}",
        name="{environmentName}",
        resource_group_name="resourceGroupName",
        user_name="@me")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const environment = new azure_native.devtestlab.Environment("environment", {
        deploymentProperties: {
            armTemplateId: "/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/artifactSources/{artifactSourceName}/armTemplates/{armTemplateName}",
            parameters: [],
        },
        labName: "{labName}",
        name: "{environmentName}",
        resourceGroupName: "resourceGroupName",
        userName: "@me",
    });
    
    resources:
      environment:
        type: azure-native:devtestlab:Environment
        properties:
          deploymentProperties:
            armTemplateId: /subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/artifactSources/{artifactSourceName}/armTemplates/{armTemplateName}
            parameters: []
          labName: '{labName}'
          name: '{environmentName}'
          resourceGroupName: resourceGroupName
          userName: '@me'
    

    Create Environment Resource

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

    Constructor syntax

    new Environment(name: string, args: EnvironmentArgs, opts?: CustomResourceOptions);
    @overload
    def Environment(resource_name: str,
                    args: EnvironmentArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def Environment(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    lab_name: Optional[str] = None,
                    resource_group_name: Optional[str] = None,
                    user_name: Optional[str] = None,
                    arm_template_display_name: Optional[str] = None,
                    deployment_properties: Optional[EnvironmentDeploymentPropertiesArgs] = None,
                    location: Optional[str] = None,
                    name: Optional[str] = None,
                    tags: Optional[Mapping[str, str]] = None)
    func NewEnvironment(ctx *Context, name string, args EnvironmentArgs, opts ...ResourceOption) (*Environment, error)
    public Environment(string name, EnvironmentArgs args, CustomResourceOptions? opts = null)
    public Environment(String name, EnvironmentArgs args)
    public Environment(String name, EnvironmentArgs args, CustomResourceOptions options)
    
    type: azure-native:devtestlab:Environment
    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 EnvironmentArgs
    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 EnvironmentArgs
    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 EnvironmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args EnvironmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args EnvironmentArgs
    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 environmentResource = new AzureNative.Devtestlab.Environment("environmentResource", new()
    {
        LabName = "string",
        ResourceGroupName = "string",
        UserName = "string",
        ArmTemplateDisplayName = "string",
        DeploymentProperties = 
        {
            { "armTemplateId", "string" },
            { "parameters", new[]
            {
                
                {
                    { "name", "string" },
                    { "value", "string" },
                },
            } },
        },
        Location = "string",
        Name = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := devtestlab.NewEnvironment(ctx, "environmentResource", &devtestlab.EnvironmentArgs{
    	LabName:                "string",
    	ResourceGroupName:      "string",
    	UserName:               "string",
    	ArmTemplateDisplayName: "string",
    	DeploymentProperties: map[string]interface{}{
    		"armTemplateId": "string",
    		"parameters": []map[string]interface{}{
    			map[string]interface{}{
    				"name":  "string",
    				"value": "string",
    			},
    		},
    	},
    	Location: "string",
    	Name:     "string",
    	Tags: map[string]interface{}{
    		"string": "string",
    	},
    })
    
    var environmentResource = new Environment("environmentResource", EnvironmentArgs.builder()
        .labName("string")
        .resourceGroupName("string")
        .userName("string")
        .armTemplateDisplayName("string")
        .deploymentProperties(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
        .location("string")
        .name("string")
        .tags(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
        .build());
    
    environment_resource = azure_native.devtestlab.Environment("environmentResource",
        lab_name=string,
        resource_group_name=string,
        user_name=string,
        arm_template_display_name=string,
        deployment_properties={
            armTemplateId: string,
            parameters: [{
                name: string,
                value: string,
            }],
        },
        location=string,
        name=string,
        tags={
            string: string,
        })
    
    const environmentResource = new azure_native.devtestlab.Environment("environmentResource", {
        labName: "string",
        resourceGroupName: "string",
        userName: "string",
        armTemplateDisplayName: "string",
        deploymentProperties: {
            armTemplateId: "string",
            parameters: [{
                name: "string",
                value: "string",
            }],
        },
        location: "string",
        name: "string",
        tags: {
            string: "string",
        },
    });
    
    type: azure-native:devtestlab:Environment
    properties:
        armTemplateDisplayName: string
        deploymentProperties:
            armTemplateId: string
            parameters:
                - name: string
                  value: string
        labName: string
        location: string
        name: string
        resourceGroupName: string
        tags:
            string: string
        userName: string
    

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

    LabName string
    The name of the lab.
    ResourceGroupName string
    The name of the resource group.
    UserName string
    The name of the user profile.
    ArmTemplateDisplayName string
    The display name of the Azure Resource Manager template that produced the environment.
    DeploymentProperties Pulumi.AzureNative.DevTestLab.Inputs.EnvironmentDeploymentProperties
    The deployment properties of the environment.
    Location string
    The location of the resource.
    Name string
    The name of the environment.
    Tags Dictionary<string, string>
    The tags of the resource.
    LabName string
    The name of the lab.
    ResourceGroupName string
    The name of the resource group.
    UserName string
    The name of the user profile.
    ArmTemplateDisplayName string
    The display name of the Azure Resource Manager template that produced the environment.
    DeploymentProperties EnvironmentDeploymentPropertiesArgs
    The deployment properties of the environment.
    Location string
    The location of the resource.
    Name string
    The name of the environment.
    Tags map[string]string
    The tags of the resource.
    labName String
    The name of the lab.
    resourceGroupName String
    The name of the resource group.
    userName String
    The name of the user profile.
    armTemplateDisplayName String
    The display name of the Azure Resource Manager template that produced the environment.
    deploymentProperties EnvironmentDeploymentProperties
    The deployment properties of the environment.
    location String
    The location of the resource.
    name String
    The name of the environment.
    tags Map<String,String>
    The tags of the resource.
    labName string
    The name of the lab.
    resourceGroupName string
    The name of the resource group.
    userName string
    The name of the user profile.
    armTemplateDisplayName string
    The display name of the Azure Resource Manager template that produced the environment.
    deploymentProperties EnvironmentDeploymentProperties
    The deployment properties of the environment.
    location string
    The location of the resource.
    name string
    The name of the environment.
    tags {[key: string]: string}
    The tags of the resource.
    lab_name str
    The name of the lab.
    resource_group_name str
    The name of the resource group.
    user_name str
    The name of the user profile.
    arm_template_display_name str
    The display name of the Azure Resource Manager template that produced the environment.
    deployment_properties EnvironmentDeploymentPropertiesArgs
    The deployment properties of the environment.
    location str
    The location of the resource.
    name str
    The name of the environment.
    tags Mapping[str, str]
    The tags of the resource.
    labName String
    The name of the lab.
    resourceGroupName String
    The name of the resource group.
    userName String
    The name of the user profile.
    armTemplateDisplayName String
    The display name of the Azure Resource Manager template that produced the environment.
    deploymentProperties Property Map
    The deployment properties of the environment.
    location String
    The location of the resource.
    name String
    The name of the environment.
    tags Map<String>
    The tags of the resource.

    Outputs

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

    CreatedByUser string
    The creator of the environment.
    Id string
    The provider-assigned unique ID for this managed resource.
    ProvisioningState string
    The provisioning status of the resource.
    ResourceGroupId string
    The identifier of the resource group containing the environment's resources.
    Type string
    The type of the resource.
    UniqueIdentifier string
    The unique immutable identifier of a resource (Guid).
    CreatedByUser string
    The creator of the environment.
    Id string
    The provider-assigned unique ID for this managed resource.
    ProvisioningState string
    The provisioning status of the resource.
    ResourceGroupId string
    The identifier of the resource group containing the environment's resources.
    Type string
    The type of the resource.
    UniqueIdentifier string
    The unique immutable identifier of a resource (Guid).
    createdByUser String
    The creator of the environment.
    id String
    The provider-assigned unique ID for this managed resource.
    provisioningState String
    The provisioning status of the resource.
    resourceGroupId String
    The identifier of the resource group containing the environment's resources.
    type String
    The type of the resource.
    uniqueIdentifier String
    The unique immutable identifier of a resource (Guid).
    createdByUser string
    The creator of the environment.
    id string
    The provider-assigned unique ID for this managed resource.
    provisioningState string
    The provisioning status of the resource.
    resourceGroupId string
    The identifier of the resource group containing the environment's resources.
    type string
    The type of the resource.
    uniqueIdentifier string
    The unique immutable identifier of a resource (Guid).
    created_by_user str
    The creator of the environment.
    id str
    The provider-assigned unique ID for this managed resource.
    provisioning_state str
    The provisioning status of the resource.
    resource_group_id str
    The identifier of the resource group containing the environment's resources.
    type str
    The type of the resource.
    unique_identifier str
    The unique immutable identifier of a resource (Guid).
    createdByUser String
    The creator of the environment.
    id String
    The provider-assigned unique ID for this managed resource.
    provisioningState String
    The provisioning status of the resource.
    resourceGroupId String
    The identifier of the resource group containing the environment's resources.
    type String
    The type of the resource.
    uniqueIdentifier String
    The unique immutable identifier of a resource (Guid).

    Supporting Types

    ArmTemplateParameterProperties, ArmTemplateParameterPropertiesArgs

    Name string
    The name of the template parameter.
    Value string
    The value of the template parameter.
    Name string
    The name of the template parameter.
    Value string
    The value of the template parameter.
    name String
    The name of the template parameter.
    value String
    The value of the template parameter.
    name string
    The name of the template parameter.
    value string
    The value of the template parameter.
    name str
    The name of the template parameter.
    value str
    The value of the template parameter.
    name String
    The name of the template parameter.
    value String
    The value of the template parameter.

    ArmTemplateParameterPropertiesResponse, ArmTemplateParameterPropertiesResponseArgs

    Name string
    The name of the template parameter.
    Value string
    The value of the template parameter.
    Name string
    The name of the template parameter.
    Value string
    The value of the template parameter.
    name String
    The name of the template parameter.
    value String
    The value of the template parameter.
    name string
    The name of the template parameter.
    value string
    The value of the template parameter.
    name str
    The name of the template parameter.
    value str
    The value of the template parameter.
    name String
    The name of the template parameter.
    value String
    The value of the template parameter.

    EnvironmentDeploymentProperties, EnvironmentDeploymentPropertiesArgs

    ArmTemplateId string
    The Azure Resource Manager template's identifier.
    Parameters List<Pulumi.AzureNative.DevTestLab.Inputs.ArmTemplateParameterProperties>
    The parameters of the Azure Resource Manager template.
    ArmTemplateId string
    The Azure Resource Manager template's identifier.
    Parameters []ArmTemplateParameterProperties
    The parameters of the Azure Resource Manager template.
    armTemplateId String
    The Azure Resource Manager template's identifier.
    parameters List<ArmTemplateParameterProperties>
    The parameters of the Azure Resource Manager template.
    armTemplateId string
    The Azure Resource Manager template's identifier.
    parameters ArmTemplateParameterProperties[]
    The parameters of the Azure Resource Manager template.
    arm_template_id str
    The Azure Resource Manager template's identifier.
    parameters Sequence[ArmTemplateParameterProperties]
    The parameters of the Azure Resource Manager template.
    armTemplateId String
    The Azure Resource Manager template's identifier.
    parameters List<Property Map>
    The parameters of the Azure Resource Manager template.

    EnvironmentDeploymentPropertiesResponse, EnvironmentDeploymentPropertiesResponseArgs

    ArmTemplateId string
    The Azure Resource Manager template's identifier.
    Parameters List<Pulumi.AzureNative.DevTestLab.Inputs.ArmTemplateParameterPropertiesResponse>
    The parameters of the Azure Resource Manager template.
    ArmTemplateId string
    The Azure Resource Manager template's identifier.
    Parameters []ArmTemplateParameterPropertiesResponse
    The parameters of the Azure Resource Manager template.
    armTemplateId String
    The Azure Resource Manager template's identifier.
    parameters List<ArmTemplateParameterPropertiesResponse>
    The parameters of the Azure Resource Manager template.
    armTemplateId string
    The Azure Resource Manager template's identifier.
    parameters ArmTemplateParameterPropertiesResponse[]
    The parameters of the Azure Resource Manager template.
    arm_template_id str
    The Azure Resource Manager template's identifier.
    parameters Sequence[ArmTemplateParameterPropertiesResponse]
    The parameters of the Azure Resource Manager template.
    armTemplateId String
    The Azure Resource Manager template's identifier.
    parameters List<Property Map>
    The parameters of the Azure Resource Manager template.

    Import

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

    $ pulumi import azure-native:devtestlab:Environment {environmentName} /subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/users/{uniqueIdentifier}/environments/{environmentName} 
    

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

    Package Details

    Repository
    azure-native-v1 pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native-v1 logo
    These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
    Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi