azure-native.devtestlab.User
Explore with Pulumi AI
Profile of a lab user. API Version: 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"
"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 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(Map.ofEntries(
Map.entry("appId", "{appId}"),
Map.entry("objectId", "{objectId}"),
Map.entry("principalId", "{principalId}"),
Map.entry("principalName", "{principalName}"),
Map.entry("tenantId", "{tenantId}")
))
.labName("{devtestlabName}")
.location("{location}")
.name("{userName}")
.resourceGroupName("resourceGroupName")
.secretStore(Map.ofEntries(
Map.entry("keyVaultId", "{keyVaultId}"),
Map.entry("keyVaultUri", "{keyVaultUri}")
))
.tags(Map.of("tagName1", "tagValue1"))
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
user = azure_native.devtestlab.User("user",
identity=azure_native.devtestlab.UserIdentityArgs(
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=azure_native.devtestlab.UserSecretStoreArgs(
key_vault_id="{keyVaultId}",
key_vault_uri="{keyVaultUri}",
),
tags={
"tagName1": "tagValue1",
})
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",
},
});
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 =
{
{ "appId", "string" },
{ "objectId", "string" },
{ "principalId", "string" },
{ "principalName", "string" },
{ "tenantId", "string" },
},
Location = "string",
Name = "string",
SecretStore =
{
{ "keyVaultId", "string" },
{ "keyVaultUri", "string" },
},
Tags =
{
{ "string", "string" },
},
});
example, err := devtestlab.NewUser(ctx, "exampleuserResourceResourceFromDevtestlab", &devtestlab.UserArgs{
LabName: "string",
ResourceGroupName: "string",
Identity: map[string]interface{}{
"appId": "string",
"objectId": "string",
"principalId": "string",
"principalName": "string",
"tenantId": "string",
},
Location: "string",
Name: "string",
SecretStore: map[string]interface{}{
"keyVaultId": "string",
"keyVaultUri": "string",
},
Tags: map[string]interface{}{
"string": "string",
},
})
var exampleuserResourceResourceFromDevtestlab = new User("exampleuserResourceResourceFromDevtestlab", UserArgs.builder()
.labName("string")
.resourceGroupName("string")
.identity(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.location("string")
.name("string")
.secretStore(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.tags(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.build());
exampleuser_resource_resource_from_devtestlab = azure_native.devtestlab.User("exampleuserResourceResourceFromDevtestlab",
lab_name=string,
resource_group_name=string,
identity={
appId: string,
objectId: string,
principalId: string,
principalName: string,
tenantId: string,
},
location=string,
name=string,
secret_store={
keyVaultId: string,
keyVaultUri: 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
The User resource accepts the following input properties:
- Lab
Name string - The name of the lab.
- Resource
Group 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.
- Secret
Store Pulumi.Azure Native. Dev Test Lab. Inputs. User Secret Store - The secret store of the user.
- Dictionary<string, string>
- The tags of the resource.
- Lab
Name string - The name of the lab.
- Resource
Group stringName - The name of the resource group.
- Identity
User
Identity Args - The identity of the user.
- Location string
- The location of the resource.
- Name string
- The name of the user profile.
- Secret
Store UserSecret Store Args - The secret store of the user.
- map[string]string
- The tags of the resource.
- lab
Name String - The name of the lab.
- resource
Group StringName - The name of the resource group.
- identity
User
Identity - The identity of the user.
- location String
- The location of the resource.
- name String
- The name of the user profile.
- secret
Store UserSecret Store - The secret store of the user.
- Map<String,String>
- The tags of the resource.
- lab
Name string - The name of the lab.
- resource
Group stringName - The name of the resource group.
- identity
User
Identity - The identity of the user.
- location string
- The location of the resource.
- name string
- The name of the user profile.
- secret
Store 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
User
Identity 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.
- lab
Name String - The name of the lab.
- resource
Group 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.
- secret
Store 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:
- Created
Date string - The creation date of the user profile.
- Id string
- The provider-assigned unique ID for this managed resource.
- Provisioning
State string - The provisioning status of the resource.
- Type string
- The type of the resource.
- Unique
Identifier string - The unique immutable identifier of a resource (Guid).
- Created
Date string - The creation date of the user profile.
- Id string
- The provider-assigned unique ID for this managed resource.
- Provisioning
State string - The provisioning status of the resource.
- Type string
- The type of the resource.
- Unique
Identifier string - The unique immutable identifier of a resource (Guid).
- created
Date String - The creation date of the user profile.
- id String
- The provider-assigned unique ID for this managed resource.
- provisioning
State String - The provisioning status of the resource.
- type String
- The type of the resource.
- unique
Identifier String - The unique immutable identifier of a resource (Guid).
- created
Date string - The creation date of the user profile.
- id string
- The provider-assigned unique ID for this managed resource.
- provisioning
State string - The provisioning status of the resource.
- type string
- The type of the resource.
- unique
Identifier 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).
- created
Date String - The creation date of the user profile.
- id String
- The provider-assigned unique ID for this managed resource.
- provisioning
State String - The provisioning status of the resource.
- type String
- The type of the resource.
- unique
Identifier String - The unique immutable identifier of a resource (Guid).
Supporting Types
UserIdentity, UserIdentityArgs
- App
Id string - Set to the app Id of the client JWT making the request.
- Object
Id 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.
- Principal
Id string - Set to the principal Id of the client JWT making the request. Service principal will not have the principal Id.
- Principal
Name string - Set to the principal name / UPN of the client JWT making the request.
- Tenant
Id string - Set to the tenant ID of the client JWT making the request.
- App
Id string - Set to the app Id of the client JWT making the request.
- Object
Id 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.
- Principal
Id string - Set to the principal Id of the client JWT making the request. Service principal will not have the principal Id.
- Principal
Name string - Set to the principal name / UPN of the client JWT making the request.
- Tenant
Id string - Set to the tenant ID of the client JWT making the request.
- app
Id String - Set to the app Id of the client JWT making the request.
- object
Id 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.
- principal
Id String - Set to the principal Id of the client JWT making the request. Service principal will not have the principal Id.
- principal
Name String - Set to the principal name / UPN of the client JWT making the request.
- tenant
Id String - Set to the tenant ID of the client JWT making the request.
- app
Id string - Set to the app Id of the client JWT making the request.
- object
Id 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.
- principal
Id string - Set to the principal Id of the client JWT making the request. Service principal will not have the principal Id.
- principal
Name string - Set to the principal name / UPN of the client JWT making the request.
- tenant
Id 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.
- app
Id String - Set to the app Id of the client JWT making the request.
- object
Id 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.
- principal
Id String - Set to the principal Id of the client JWT making the request. Service principal will not have the principal Id.
- principal
Name String - Set to the principal name / UPN of the client JWT making the request.
- tenant
Id String - Set to the tenant ID of the client JWT making the request.
UserIdentityResponse, UserIdentityResponseArgs
- App
Id string - Set to the app Id of the client JWT making the request.
- Object
Id 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.
- Principal
Id string - Set to the principal Id of the client JWT making the request. Service principal will not have the principal Id.
- Principal
Name string - Set to the principal name / UPN of the client JWT making the request.
- Tenant
Id string - Set to the tenant ID of the client JWT making the request.
- App
Id string - Set to the app Id of the client JWT making the request.
- Object
Id 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.
- Principal
Id string - Set to the principal Id of the client JWT making the request. Service principal will not have the principal Id.
- Principal
Name string - Set to the principal name / UPN of the client JWT making the request.
- Tenant
Id string - Set to the tenant ID of the client JWT making the request.
- app
Id String - Set to the app Id of the client JWT making the request.
- object
Id 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.
- principal
Id String - Set to the principal Id of the client JWT making the request. Service principal will not have the principal Id.
- principal
Name String - Set to the principal name / UPN of the client JWT making the request.
- tenant
Id String - Set to the tenant ID of the client JWT making the request.
- app
Id string - Set to the app Id of the client JWT making the request.
- object
Id 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.
- principal
Id string - Set to the principal Id of the client JWT making the request. Service principal will not have the principal Id.
- principal
Name string - Set to the principal name / UPN of the client JWT making the request.
- tenant
Id 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.
- app
Id String - Set to the app Id of the client JWT making the request.
- object
Id 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.
- principal
Id String - Set to the principal Id of the client JWT making the request. Service principal will not have the principal Id.
- principal
Name String - Set to the principal name / UPN of the client JWT making the request.
- tenant
Id String - Set to the tenant ID of the client JWT making the request.
UserSecretStore, UserSecretStoreArgs
- Key
Vault stringId - The ID of the user's Key vault.
- Key
Vault stringUri - The URI of the user's Key vault.
- Key
Vault stringId - The ID of the user's Key vault.
- Key
Vault stringUri - The URI of the user's Key vault.
- key
Vault StringId - The ID of the user's Key vault.
- key
Vault StringUri - The URI of the user's Key vault.
- key
Vault stringId - The ID of the user's Key vault.
- key
Vault 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.
- key
Vault StringId - The ID of the user's Key vault.
- key
Vault StringUri - The URI of the user's Key vault.
UserSecretStoreResponse, UserSecretStoreResponseArgs
- Key
Vault stringId - The ID of the user's Key vault.
- Key
Vault stringUri - The URI of the user's Key vault.
- Key
Vault stringId - The ID of the user's Key vault.
- Key
Vault stringUri - The URI of the user's Key vault.
- key
Vault StringId - The ID of the user's Key vault.
- key
Vault StringUri - The URI of the user's Key vault.
- key
Vault stringId - The ID of the user's Key vault.
- key
Vault 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.
- key
Vault StringId - The ID of the user's Key vault.
- key
Vault 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 myresource1 /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-v1 pulumi/pulumi-azure-native
- License
- Apache-2.0