azure-native.devtestlab.User
Explore with Pulumi AI
Profile of a lab user. Azure REST API version: 2018-09-15. Prior API version in Azure Native 1.x: 2018-09-15.
Example Usage
Users_CreateOrUpdate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() => 
{
    var user = new AzureNative.DevTestLab.User("user", new()
    {
        Identity = new AzureNative.DevTestLab.Inputs.UserIdentityArgs
        {
            AppId = "{appId}",
            ObjectId = "{objectId}",
            PrincipalId = "{principalId}",
            PrincipalName = "{principalName}",
            TenantId = "{tenantId}",
        },
        LabName = "{devtestlabName}",
        Location = "{location}",
        Name = "{userName}",
        ResourceGroupName = "resourceGroupName",
        SecretStore = new AzureNative.DevTestLab.Inputs.UserSecretStoreArgs
        {
            KeyVaultId = "{keyVaultId}",
            KeyVaultUri = "{keyVaultUri}",
        },
        Tags = 
        {
            { "tagName1", "tagValue1" },
        },
    });
});
package main
import (
	devtestlab "github.com/pulumi/pulumi-azure-native-sdk/devtestlab/v2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := devtestlab.NewUser(ctx, "user", &devtestlab.UserArgs{
			Identity: &devtestlab.UserIdentityArgs{
				AppId:         pulumi.String("{appId}"),
				ObjectId:      pulumi.String("{objectId}"),
				PrincipalId:   pulumi.String("{principalId}"),
				PrincipalName: pulumi.String("{principalName}"),
				TenantId:      pulumi.String("{tenantId}"),
			},
			LabName:           pulumi.String("{devtestlabName}"),
			Location:          pulumi.String("{location}"),
			Name:              pulumi.String("{userName}"),
			ResourceGroupName: pulumi.String("resourceGroupName"),
			SecretStore: &devtestlab.UserSecretStoreArgs{
				KeyVaultId:  pulumi.String("{keyVaultId}"),
				KeyVaultUri: pulumi.String("{keyVaultUri}"),
			},
			Tags: pulumi.StringMap{
				"tagName1": pulumi.String("tagValue1"),
			},
		})
		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.User;
import com.pulumi.azurenative.devtestlab.UserArgs;
import com.pulumi.azurenative.devtestlab.inputs.UserIdentityArgs;
import com.pulumi.azurenative.devtestlab.inputs.UserSecretStoreArgs;
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 user = new User("user", UserArgs.builder()
            .identity(UserIdentityArgs.builder()
                .appId("{appId}")
                .objectId("{objectId}")
                .principalId("{principalId}")
                .principalName("{principalName}")
                .tenantId("{tenantId}")
                .build())
            .labName("{devtestlabName}")
            .location("{location}")
            .name("{userName}")
            .resourceGroupName("resourceGroupName")
            .secretStore(UserSecretStoreArgs.builder()
                .keyVaultId("{keyVaultId}")
                .keyVaultUri("{keyVaultUri}")
                .build())
            .tags(Map.of("tagName1", "tagValue1"))
            .build());
    }
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const user = new azure_native.devtestlab.User("user", {
    identity: {
        appId: "{appId}",
        objectId: "{objectId}",
        principalId: "{principalId}",
        principalName: "{principalName}",
        tenantId: "{tenantId}",
    },
    labName: "{devtestlabName}",
    location: "{location}",
    name: "{userName}",
    resourceGroupName: "resourceGroupName",
    secretStore: {
        keyVaultId: "{keyVaultId}",
        keyVaultUri: "{keyVaultUri}",
    },
    tags: {
        tagName1: "tagValue1",
    },
});
import pulumi
import pulumi_azure_native as azure_native
user = azure_native.devtestlab.User("user",
    identity={
        "app_id": "{appId}",
        "object_id": "{objectId}",
        "principal_id": "{principalId}",
        "principal_name": "{principalName}",
        "tenant_id": "{tenantId}",
    },
    lab_name="{devtestlabName}",
    location="{location}",
    name="{userName}",
    resource_group_name="resourceGroupName",
    secret_store={
        "key_vault_id": "{keyVaultId}",
        "key_vault_uri": "{keyVaultUri}",
    },
    tags={
        "tagName1": "tagValue1",
    })
resources:
  user:
    type: azure-native:devtestlab:User
    properties:
      identity:
        appId: '{appId}'
        objectId: '{objectId}'
        principalId: '{principalId}'
        principalName: '{principalName}'
        tenantId: '{tenantId}'
      labName: '{devtestlabName}'
      location: '{location}'
      name: '{userName}'
      resourceGroupName: resourceGroupName
      secretStore:
        keyVaultId: '{keyVaultId}'
        keyVaultUri: '{keyVaultUri}'
      tags:
        tagName1: tagValue1
Create User Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new User(name: string, args: UserArgs, opts?: CustomResourceOptions);@overload
def User(resource_name: str,
         args: UserArgs,
         opts: Optional[ResourceOptions] = None)
@overload
def User(resource_name: str,
         opts: Optional[ResourceOptions] = None,
         lab_name: Optional[str] = None,
         resource_group_name: Optional[str] = None,
         identity: Optional[UserIdentityArgs] = None,
         location: Optional[str] = None,
         name: Optional[str] = None,
         secret_store: Optional[UserSecretStoreArgs] = None,
         tags: Optional[Mapping[str, str]] = None)func NewUser(ctx *Context, name string, args UserArgs, opts ...ResourceOption) (*User, error)public User(string name, UserArgs args, CustomResourceOptions? opts = null)type: azure-native:devtestlab:User
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 UserArgs
- 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 UserArgs
- 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 UserArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args UserArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args UserArgs
- 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 exampleuserResourceResourceFromDevtestlab = new AzureNative.DevTestLab.User("exampleuserResourceResourceFromDevtestlab", new()
{
    LabName = "string",
    ResourceGroupName = "string",
    Identity = new AzureNative.DevTestLab.Inputs.UserIdentityArgs
    {
        AppId = "string",
        ObjectId = "string",
        PrincipalId = "string",
        PrincipalName = "string",
        TenantId = "string",
    },
    Location = "string",
    Name = "string",
    SecretStore = new AzureNative.DevTestLab.Inputs.UserSecretStoreArgs
    {
        KeyVaultId = "string",
        KeyVaultUri = "string",
    },
    Tags = 
    {
        { "string", "string" },
    },
});
example, err := devtestlab.NewUser(ctx, "exampleuserResourceResourceFromDevtestlab", &devtestlab.UserArgs{
	LabName:           pulumi.String("string"),
	ResourceGroupName: pulumi.String("string"),
	Identity: &devtestlab.UserIdentityArgs{
		AppId:         pulumi.String("string"),
		ObjectId:      pulumi.String("string"),
		PrincipalId:   pulumi.String("string"),
		PrincipalName: pulumi.String("string"),
		TenantId:      pulumi.String("string"),
	},
	Location: pulumi.String("string"),
	Name:     pulumi.String("string"),
	SecretStore: &devtestlab.UserSecretStoreArgs{
		KeyVaultId:  pulumi.String("string"),
		KeyVaultUri: pulumi.String("string"),
	},
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
var exampleuserResourceResourceFromDevtestlab = new User("exampleuserResourceResourceFromDevtestlab", UserArgs.builder()
    .labName("string")
    .resourceGroupName("string")
    .identity(UserIdentityArgs.builder()
        .appId("string")
        .objectId("string")
        .principalId("string")
        .principalName("string")
        .tenantId("string")
        .build())
    .location("string")
    .name("string")
    .secretStore(UserSecretStoreArgs.builder()
        .keyVaultId("string")
        .keyVaultUri("string")
        .build())
    .tags(Map.of("string", "string"))
    .build());
exampleuser_resource_resource_from_devtestlab = azure_native.devtestlab.User("exampleuserResourceResourceFromDevtestlab",
    lab_name="string",
    resource_group_name="string",
    identity={
        "app_id": "string",
        "object_id": "string",
        "principal_id": "string",
        "principal_name": "string",
        "tenant_id": "string",
    },
    location="string",
    name="string",
    secret_store={
        "key_vault_id": "string",
        "key_vault_uri": "string",
    },
    tags={
        "string": "string",
    })
const exampleuserResourceResourceFromDevtestlab = new azure_native.devtestlab.User("exampleuserResourceResourceFromDevtestlab", {
    labName: "string",
    resourceGroupName: "string",
    identity: {
        appId: "string",
        objectId: "string",
        principalId: "string",
        principalName: "string",
        tenantId: "string",
    },
    location: "string",
    name: "string",
    secretStore: {
        keyVaultId: "string",
        keyVaultUri: "string",
    },
    tags: {
        string: "string",
    },
});
type: azure-native:devtestlab:User
properties:
    identity:
        appId: string
        objectId: string
        principalId: string
        principalName: string
        tenantId: string
    labName: string
    location: string
    name: string
    resourceGroupName: string
    secretStore:
        keyVaultId: string
        keyVaultUri: string
    tags:
        string: string
User 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 User resource accepts the following input properties:
- LabName string
- The name of the lab.
- ResourceGroup stringName 
- The name of the resource group.
- Identity
Pulumi.Azure Native. Dev Test Lab. Inputs. User Identity 
- The identity of the user.
- Location string
- The location of the resource.
- Name string
- The name of the user profile.
- SecretStore Pulumi.Azure Native. Dev Test Lab. Inputs. User Secret Store 
- The secret store of the user.
- Dictionary<string, string>
- The tags of the resource.
- LabName string
- The name of the lab.
- ResourceGroup stringName 
- The name of the resource group.
- Identity
UserIdentity Args 
- The identity of the user.
- Location string
- The location of the resource.
- Name string
- The name of the user profile.
- SecretStore UserSecret Store Args 
- The secret store of the user.
- map[string]string
- The tags of the resource.
- labName String
- The name of the lab.
- resourceGroup StringName 
- The name of the resource group.
- identity
UserIdentity 
- The identity of the user.
- location String
- The location of the resource.
- name String
- The name of the user profile.
- secretStore UserSecret Store 
- The secret store of the user.
- Map<String,String>
- The tags of the resource.
- labName string
- The name of the lab.
- resourceGroup stringName 
- The name of the resource group.
- identity
UserIdentity 
- The identity of the user.
- location string
- The location of the resource.
- name string
- The name of the user profile.
- secretStore UserSecret Store 
- The secret store of the user.
- {[key: string]: string}
- The tags of the resource.
- lab_name str
- The name of the lab.
- resource_group_ strname 
- The name of the resource group.
- identity
UserIdentity Args 
- The identity of the user.
- location str
- The location of the resource.
- name str
- The name of the user profile.
- secret_store UserSecret Store Args 
- The secret store of the user.
- Mapping[str, str]
- The tags of the resource.
- labName String
- The name of the lab.
- resourceGroup StringName 
- The name of the resource group.
- identity Property Map
- The identity of the user.
- location String
- The location of the resource.
- name String
- The name of the user profile.
- secretStore Property Map
- The secret store of the user.
- Map<String>
- The tags of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the User resource produces the following output properties:
- CreatedDate string
- The creation date of the user profile.
- Id string
- The provider-assigned unique ID for this managed resource.
- ProvisioningState string
- The provisioning status of the resource.
- Type string
- The type of the resource.
- UniqueIdentifier string
- The unique immutable identifier of a resource (Guid).
- CreatedDate string
- The creation date of the user profile.
- Id string
- The provider-assigned unique ID for this managed resource.
- ProvisioningState string
- The provisioning status of the resource.
- Type string
- The type of the resource.
- UniqueIdentifier string
- The unique immutable identifier of a resource (Guid).
- createdDate String
- The creation date of the user profile.
- id String
- The provider-assigned unique ID for this managed resource.
- provisioningState String
- The provisioning status of the resource.
- type String
- The type of the resource.
- uniqueIdentifier String
- The unique immutable identifier of a resource (Guid).
- createdDate string
- The creation date of the user profile.
- id string
- The provider-assigned unique ID for this managed resource.
- provisioningState string
- The provisioning status of the resource.
- type string
- The type of the resource.
- uniqueIdentifier string
- The unique immutable identifier of a resource (Guid).
- created_date str
- The creation date of the user profile.
- id str
- The provider-assigned unique ID for this managed resource.
- provisioning_state str
- The provisioning status of the resource.
- type str
- The type of the resource.
- unique_identifier str
- The unique immutable identifier of a resource (Guid).
- createdDate String
- The creation date of the user profile.
- id String
- The provider-assigned unique ID for this managed resource.
- provisioningState String
- The provisioning status of the resource.
- type String
- The type of the resource.
- uniqueIdentifier String
- The unique immutable identifier of a resource (Guid).
Supporting Types
UserIdentity, UserIdentityArgs    
- AppId string
- Set to the app Id of the client JWT making the request.
- ObjectId string
- Set to the object Id of the client JWT making the request. Not all users have object Id. For CSP (reseller) scenarios for example, object Id is not available.
- PrincipalId string
- Set to the principal Id of the client JWT making the request. Service principal will not have the principal Id.
- PrincipalName string
- Set to the principal name / UPN of the client JWT making the request.
- TenantId string
- Set to the tenant ID of the client JWT making the request.
- AppId string
- Set to the app Id of the client JWT making the request.
- ObjectId string
- Set to the object Id of the client JWT making the request. Not all users have object Id. For CSP (reseller) scenarios for example, object Id is not available.
- PrincipalId string
- Set to the principal Id of the client JWT making the request. Service principal will not have the principal Id.
- PrincipalName string
- Set to the principal name / UPN of the client JWT making the request.
- TenantId string
- Set to the tenant ID of the client JWT making the request.
- appId String
- Set to the app Id of the client JWT making the request.
- objectId String
- Set to the object Id of the client JWT making the request. Not all users have object Id. For CSP (reseller) scenarios for example, object Id is not available.
- principalId String
- Set to the principal Id of the client JWT making the request. Service principal will not have the principal Id.
- principalName String
- Set to the principal name / UPN of the client JWT making the request.
- tenantId String
- Set to the tenant ID of the client JWT making the request.
- appId string
- Set to the app Id of the client JWT making the request.
- objectId string
- Set to the object Id of the client JWT making the request. Not all users have object Id. For CSP (reseller) scenarios for example, object Id is not available.
- principalId string
- Set to the principal Id of the client JWT making the request. Service principal will not have the principal Id.
- principalName string
- Set to the principal name / UPN of the client JWT making the request.
- tenantId string
- Set to the tenant ID of the client JWT making the request.
- app_id str
- Set to the app Id of the client JWT making the request.
- object_id str
- Set to the object Id of the client JWT making the request. Not all users have object Id. For CSP (reseller) scenarios for example, object Id is not available.
- principal_id str
- Set to the principal Id of the client JWT making the request. Service principal will not have the principal Id.
- principal_name str
- Set to the principal name / UPN of the client JWT making the request.
- tenant_id str
- Set to the tenant ID of the client JWT making the request.
- appId String
- Set to the app Id of the client JWT making the request.
- objectId String
- Set to the object Id of the client JWT making the request. Not all users have object Id. For CSP (reseller) scenarios for example, object Id is not available.
- principalId String
- Set to the principal Id of the client JWT making the request. Service principal will not have the principal Id.
- principalName String
- Set to the principal name / UPN of the client JWT making the request.
- tenantId String
- Set to the tenant ID of the client JWT making the request.
UserIdentityResponse, UserIdentityResponseArgs      
- AppId string
- Set to the app Id of the client JWT making the request.
- ObjectId string
- Set to the object Id of the client JWT making the request. Not all users have object Id. For CSP (reseller) scenarios for example, object Id is not available.
- PrincipalId string
- Set to the principal Id of the client JWT making the request. Service principal will not have the principal Id.
- PrincipalName string
- Set to the principal name / UPN of the client JWT making the request.
- TenantId string
- Set to the tenant ID of the client JWT making the request.
- AppId string
- Set to the app Id of the client JWT making the request.
- ObjectId string
- Set to the object Id of the client JWT making the request. Not all users have object Id. For CSP (reseller) scenarios for example, object Id is not available.
- PrincipalId string
- Set to the principal Id of the client JWT making the request. Service principal will not have the principal Id.
- PrincipalName string
- Set to the principal name / UPN of the client JWT making the request.
- TenantId string
- Set to the tenant ID of the client JWT making the request.
- appId String
- Set to the app Id of the client JWT making the request.
- objectId String
- Set to the object Id of the client JWT making the request. Not all users have object Id. For CSP (reseller) scenarios for example, object Id is not available.
- principalId String
- Set to the principal Id of the client JWT making the request. Service principal will not have the principal Id.
- principalName String
- Set to the principal name / UPN of the client JWT making the request.
- tenantId String
- Set to the tenant ID of the client JWT making the request.
- appId string
- Set to the app Id of the client JWT making the request.
- objectId string
- Set to the object Id of the client JWT making the request. Not all users have object Id. For CSP (reseller) scenarios for example, object Id is not available.
- principalId string
- Set to the principal Id of the client JWT making the request. Service principal will not have the principal Id.
- principalName string
- Set to the principal name / UPN of the client JWT making the request.
- tenantId string
- Set to the tenant ID of the client JWT making the request.
- app_id str
- Set to the app Id of the client JWT making the request.
- object_id str
- Set to the object Id of the client JWT making the request. Not all users have object Id. For CSP (reseller) scenarios for example, object Id is not available.
- principal_id str
- Set to the principal Id of the client JWT making the request. Service principal will not have the principal Id.
- principal_name str
- Set to the principal name / UPN of the client JWT making the request.
- tenant_id str
- Set to the tenant ID of the client JWT making the request.
- appId String
- Set to the app Id of the client JWT making the request.
- objectId String
- Set to the object Id of the client JWT making the request. Not all users have object Id. For CSP (reseller) scenarios for example, object Id is not available.
- principalId String
- Set to the principal Id of the client JWT making the request. Service principal will not have the principal Id.
- principalName String
- Set to the principal name / UPN of the client JWT making the request.
- tenantId String
- Set to the tenant ID of the client JWT making the request.
UserSecretStore, UserSecretStoreArgs      
- KeyVault stringId 
- The ID of the user's Key vault.
- KeyVault stringUri 
- The URI of the user's Key vault.
- KeyVault stringId 
- The ID of the user's Key vault.
- KeyVault stringUri 
- The URI of the user's Key vault.
- keyVault StringId 
- The ID of the user's Key vault.
- keyVault StringUri 
- The URI of the user's Key vault.
- keyVault stringId 
- The ID of the user's Key vault.
- keyVault stringUri 
- The URI of the user's Key vault.
- key_vault_ strid 
- The ID of the user's Key vault.
- key_vault_ struri 
- The URI of the user's Key vault.
- keyVault StringId 
- The ID of the user's Key vault.
- keyVault StringUri 
- The URI of the user's Key vault.
UserSecretStoreResponse, UserSecretStoreResponseArgs        
- KeyVault stringId 
- The ID of the user's Key vault.
- KeyVault stringUri 
- The URI of the user's Key vault.
- KeyVault stringId 
- The ID of the user's Key vault.
- KeyVault stringUri 
- The URI of the user's Key vault.
- keyVault StringId 
- The ID of the user's Key vault.
- keyVault StringUri 
- The URI of the user's Key vault.
- keyVault stringId 
- The ID of the user's Key vault.
- keyVault stringUri 
- The URI of the user's Key vault.
- key_vault_ strid 
- The ID of the user's Key vault.
- key_vault_ struri 
- The URI of the user's Key vault.
- keyVault StringId 
- The ID of the user's Key vault.
- keyVault StringUri 
- The URI of the user's Key vault.
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:devtestlab:User {userName} /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{name} 
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0