User class

Provides an Amazon Connect User resource. For more information see Amazon Connect: Getting Started

Example Usage

Basic

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

const example = new aws.connect.User("example", {
    identityInfo: {
        firstName: "example",
        lastName: "example2",
    },
    phoneConfig: {
        afterContactWorkTimeLimit: 0,
        phoneType: "SOFT_PHONE",
    },
    instanceId: exampleAwsConnectInstance.id,
    name: "example",
    password: "Password123",
    routingProfileId: exampleAwsConnectRoutingProfile.routingProfileId,
    securityProfileIds: [exampleAwsConnectSecurityProfile.securityProfileId],
});
import pulumi
import pulumi_aws as aws

example = aws.connect.User("example",
    identity_info={
        "first_name": "example",
        "last_name": "example2",
    },
    phone_config={
        "after_contact_work_time_limit": 0,
        "phone_type": "SOFT_PHONE",
    },
    instance_id=example_aws_connect_instance["id"],
    name="example",
    password="Password123",
    routing_profile_id=example_aws_connect_routing_profile["routingProfileId"],
    security_profile_ids=[example_aws_connect_security_profile["securityProfileId"]])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var example = new Aws.Connect.User("example", new()
    {
        IdentityInfo = new Aws.Connect.Inputs.UserIdentityInfoArgs
        {
            FirstName = "example",
            LastName = "example2",
        },
        PhoneConfig = new Aws.Connect.Inputs.UserPhoneConfigArgs
        {
            AfterContactWorkTimeLimit = 0,
            PhoneType = "SOFT_PHONE",
        },
        InstanceId = exampleAwsConnectInstance.Id,
        Name = "example",
        Password = "Password123",
        RoutingProfileId = exampleAwsConnectRoutingProfile.RoutingProfileId,
        SecurityProfileIds = new[]
        {
            exampleAwsConnectSecurityProfile.SecurityProfileId,
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/connect"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := connect.NewUser(ctx, "example", &connect.UserArgs{
			IdentityInfo: &connect.UserIdentityInfoArgs{
				FirstName: pulumi.String("example"),
				LastName:  pulumi.String("example2"),
			},
			PhoneConfig: &connect.UserPhoneConfigArgs{
				AfterContactWorkTimeLimit: pulumi.Int(0),
				PhoneType:                 pulumi.String("SOFT_PHONE"),
			},
			InstanceId:       pulumi.Any(exampleAwsConnectInstance.Id),
			Name:             pulumi.String("example"),
			Password:         pulumi.String("Password123"),
			RoutingProfileId: pulumi.Any(exampleAwsConnectRoutingProfile.RoutingProfileId),
			SecurityProfileIds: pulumi.StringArray{
				exampleAwsConnectSecurityProfile.SecurityProfileId,
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_connect_user" "example" {
  identity_info = {
    first_name = "example"
    last_name  = "example2"
  }
  phone_config = {
    after_contact_work_time_limit = 0
    phone_type                    = "SOFT_PHONE"
  }
  instance_id          = exampleAwsConnectInstance.id
  name                 = "example"
  password             = "Password123"
  routing_profile_id   = exampleAwsConnectRoutingProfile.routingProfileId
  security_profile_ids = [exampleAwsConnectSecurityProfile.securityProfileId]
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.connect.User;
import com.pulumi.aws.connect.UserArgs;
import com.pulumi.aws.connect.inputs.UserIdentityInfoArgs;
import com.pulumi.aws.connect.inputs.UserPhoneConfigArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 User("example", UserArgs.builder()
            .identityInfo(UserIdentityInfoArgs.builder()
                .firstName("example")
                .lastName("example2")
                .build())
            .phoneConfig(UserPhoneConfigArgs.builder()
                .afterContactWorkTimeLimit(0)
                .phoneType("SOFT_PHONE")
                .build())
            .instanceId(exampleAwsConnectInstance.id())
            .name("example")
            .password("Password123")
            .routingProfileId(exampleAwsConnectRoutingProfile.routingProfileId())
            .securityProfileIds(exampleAwsConnectSecurityProfile.securityProfileId())
            .build());

    }
}
resources:
  example:
    type: aws:connect:User
    properties:
      identityInfo:
        firstName: example
        lastName: example2
      phoneConfig:
        afterContactWorkTimeLimit: 0
        phoneType: SOFT_PHONE
      instanceId: ${exampleAwsConnectInstance.id}
      name: example
      password: Password123
      routingProfileId: ${exampleAwsConnectRoutingProfile.routingProfileId}
      securityProfileIds:
        - ${exampleAwsConnectSecurityProfile.securityProfileId}

With hierarchyGroupId

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

const example = new aws.connect.User("example", {
    identityInfo: {
        firstName: "example",
        lastName: "example2",
    },
    phoneConfig: {
        afterContactWorkTimeLimit: 0,
        phoneType: "SOFT_PHONE",
    },
    instanceId: exampleAwsConnectInstance.id,
    name: "example",
    password: "Password123",
    routingProfileId: exampleAwsConnectRoutingProfile.routingProfileId,
    hierarchyGroupId: exampleAwsConnectUserHierarchyGroup.hierarchyGroupId,
    securityProfileIds: [exampleAwsConnectSecurityProfile.securityProfileId],
});
import pulumi
import pulumi_aws as aws

example = aws.connect.User("example",
    identity_info={
        "first_name": "example",
        "last_name": "example2",
    },
    phone_config={
        "after_contact_work_time_limit": 0,
        "phone_type": "SOFT_PHONE",
    },
    instance_id=example_aws_connect_instance["id"],
    name="example",
    password="Password123",
    routing_profile_id=example_aws_connect_routing_profile["routingProfileId"],
    hierarchy_group_id=example_aws_connect_user_hierarchy_group["hierarchyGroupId"],
    security_profile_ids=[example_aws_connect_security_profile["securityProfileId"]])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var example = new Aws.Connect.User("example", new()
    {
        IdentityInfo = new Aws.Connect.Inputs.UserIdentityInfoArgs
        {
            FirstName = "example",
            LastName = "example2",
        },
        PhoneConfig = new Aws.Connect.Inputs.UserPhoneConfigArgs
        {
            AfterContactWorkTimeLimit = 0,
            PhoneType = "SOFT_PHONE",
        },
        InstanceId = exampleAwsConnectInstance.Id,
        Name = "example",
        Password = "Password123",
        RoutingProfileId = exampleAwsConnectRoutingProfile.RoutingProfileId,
        HierarchyGroupId = exampleAwsConnectUserHierarchyGroup.HierarchyGroupId,
        SecurityProfileIds = new[]
        {
            exampleAwsConnectSecurityProfile.SecurityProfileId,
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/connect"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := connect.NewUser(ctx, "example", &connect.UserArgs{
			IdentityInfo: &connect.UserIdentityInfoArgs{
				FirstName: pulumi.String("example"),
				LastName:  pulumi.String("example2"),
			},
			PhoneConfig: &connect.UserPhoneConfigArgs{
				AfterContactWorkTimeLimit: pulumi.Int(0),
				PhoneType:                 pulumi.String("SOFT_PHONE"),
			},
			InstanceId:       pulumi.Any(exampleAwsConnectInstance.Id),
			Name:             pulumi.String("example"),
			Password:         pulumi.String("Password123"),
			RoutingProfileId: pulumi.Any(exampleAwsConnectRoutingProfile.RoutingProfileId),
			HierarchyGroupId: pulumi.Any(exampleAwsConnectUserHierarchyGroup.HierarchyGroupId),
			SecurityProfileIds: pulumi.StringArray{
				exampleAwsConnectSecurityProfile.SecurityProfileId,
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_connect_user" "example" {
  identity_info = {
    first_name = "example"
    last_name  = "example2"
  }
  phone_config = {
    after_contact_work_time_limit = 0
    phone_type                    = "SOFT_PHONE"
  }
  instance_id          = exampleAwsConnectInstance.id
  name                 = "example"
  password             = "Password123"
  routing_profile_id   = exampleAwsConnectRoutingProfile.routingProfileId
  hierarchy_group_id   = exampleAwsConnectUserHierarchyGroup.hierarchyGroupId
  security_profile_ids = [exampleAwsConnectSecurityProfile.securityProfileId]
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.connect.User;
import com.pulumi.aws.connect.UserArgs;
import com.pulumi.aws.connect.inputs.UserIdentityInfoArgs;
import com.pulumi.aws.connect.inputs.UserPhoneConfigArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 User("example", UserArgs.builder()
            .identityInfo(UserIdentityInfoArgs.builder()
                .firstName("example")
                .lastName("example2")
                .build())
            .phoneConfig(UserPhoneConfigArgs.builder()
                .afterContactWorkTimeLimit(0)
                .phoneType("SOFT_PHONE")
                .build())
            .instanceId(exampleAwsConnectInstance.id())
            .name("example")
            .password("Password123")
            .routingProfileId(exampleAwsConnectRoutingProfile.routingProfileId())
            .hierarchyGroupId(exampleAwsConnectUserHierarchyGroup.hierarchyGroupId())
            .securityProfileIds(exampleAwsConnectSecurityProfile.securityProfileId())
            .build());

    }
}
resources:
  example:
    type: aws:connect:User
    properties:
      identityInfo:
        firstName: example
        lastName: example2
      phoneConfig:
        afterContactWorkTimeLimit: 0
        phoneType: SOFT_PHONE
      instanceId: ${exampleAwsConnectInstance.id}
      name: example
      password: Password123
      routingProfileId: ${exampleAwsConnectRoutingProfile.routingProfileId}
      hierarchyGroupId: ${exampleAwsConnectUserHierarchyGroup.hierarchyGroupId}
      securityProfileIds:
        - ${exampleAwsConnectSecurityProfile.securityProfileId}

With identityInfo filled

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

const example = new aws.connect.User("example", {
    identityInfo: {
        email: "example@example.com",
        firstName: "example",
        lastName: "example2",
        secondaryEmail: "secondary@example.com",
    },
    phoneConfig: {
        afterContactWorkTimeLimit: 0,
        phoneType: "SOFT_PHONE",
    },
    instanceId: exampleAwsConnectInstance.id,
    name: "example",
    password: "Password123",
    routingProfileId: exampleAwsConnectRoutingProfile.routingProfileId,
    securityProfileIds: [exampleAwsConnectSecurityProfile.securityProfileId],
});
import pulumi
import pulumi_aws as aws

example = aws.connect.User("example",
    identity_info={
        "email": "example@example.com",
        "first_name": "example",
        "last_name": "example2",
        "secondary_email": "secondary@example.com",
    },
    phone_config={
        "after_contact_work_time_limit": 0,
        "phone_type": "SOFT_PHONE",
    },
    instance_id=example_aws_connect_instance["id"],
    name="example",
    password="Password123",
    routing_profile_id=example_aws_connect_routing_profile["routingProfileId"],
    security_profile_ids=[example_aws_connect_security_profile["securityProfileId"]])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var example = new Aws.Connect.User("example", new()
    {
        IdentityInfo = new Aws.Connect.Inputs.UserIdentityInfoArgs
        {
            Email = "example@example.com",
            FirstName = "example",
            LastName = "example2",
            SecondaryEmail = "secondary@example.com",
        },
        PhoneConfig = new Aws.Connect.Inputs.UserPhoneConfigArgs
        {
            AfterContactWorkTimeLimit = 0,
            PhoneType = "SOFT_PHONE",
        },
        InstanceId = exampleAwsConnectInstance.Id,
        Name = "example",
        Password = "Password123",
        RoutingProfileId = exampleAwsConnectRoutingProfile.RoutingProfileId,
        SecurityProfileIds = new[]
        {
            exampleAwsConnectSecurityProfile.SecurityProfileId,
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/connect"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := connect.NewUser(ctx, "example", &connect.UserArgs{
			IdentityInfo: &connect.UserIdentityInfoArgs{
				Email:          pulumi.String("example@example.com"),
				FirstName:      pulumi.String("example"),
				LastName:       pulumi.String("example2"),
				SecondaryEmail: pulumi.String("secondary@example.com"),
			},
			PhoneConfig: &connect.UserPhoneConfigArgs{
				AfterContactWorkTimeLimit: pulumi.Int(0),
				PhoneType:                 pulumi.String("SOFT_PHONE"),
			},
			InstanceId:       pulumi.Any(exampleAwsConnectInstance.Id),
			Name:             pulumi.String("example"),
			Password:         pulumi.String("Password123"),
			RoutingProfileId: pulumi.Any(exampleAwsConnectRoutingProfile.RoutingProfileId),
			SecurityProfileIds: pulumi.StringArray{
				exampleAwsConnectSecurityProfile.SecurityProfileId,
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_connect_user" "example" {
  identity_info = {
    email           = "example@example.com"
    first_name      = "example"
    last_name       = "example2"
    secondary_email = "secondary@example.com"
  }
  phone_config = {
    after_contact_work_time_limit = 0
    phone_type                    = "SOFT_PHONE"
  }
  instance_id          = exampleAwsConnectInstance.id
  name                 = "example"
  password             = "Password123"
  routing_profile_id   = exampleAwsConnectRoutingProfile.routingProfileId
  security_profile_ids = [exampleAwsConnectSecurityProfile.securityProfileId]
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.connect.User;
import com.pulumi.aws.connect.UserArgs;
import com.pulumi.aws.connect.inputs.UserIdentityInfoArgs;
import com.pulumi.aws.connect.inputs.UserPhoneConfigArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 User("example", UserArgs.builder()
            .identityInfo(UserIdentityInfoArgs.builder()
                .email("example@example.com")
                .firstName("example")
                .lastName("example2")
                .secondaryEmail("secondary@example.com")
                .build())
            .phoneConfig(UserPhoneConfigArgs.builder()
                .afterContactWorkTimeLimit(0)
                .phoneType("SOFT_PHONE")
                .build())
            .instanceId(exampleAwsConnectInstance.id())
            .name("example")
            .password("Password123")
            .routingProfileId(exampleAwsConnectRoutingProfile.routingProfileId())
            .securityProfileIds(exampleAwsConnectSecurityProfile.securityProfileId())
            .build());

    }
}
resources:
  example:
    type: aws:connect:User
    properties:
      identityInfo:
        email: example@example.com
        firstName: example
        lastName: example2
        secondaryEmail: secondary@example.com
      phoneConfig:
        afterContactWorkTimeLimit: 0
        phoneType: SOFT_PHONE
      instanceId: ${exampleAwsConnectInstance.id}
      name: example
      password: Password123
      routingProfileId: ${exampleAwsConnectRoutingProfile.routingProfileId}
      securityProfileIds:
        - ${exampleAwsConnectSecurityProfile.securityProfileId}

With phoneConfig phone type as desk phone

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

const example = new aws.connect.User("example", {
    phoneConfig: {
        afterContactWorkTimeLimit: 0,
        phoneType: "SOFT_PHONE",
    },
    instanceId: exampleAwsConnectInstance.id,
    name: "example",
    password: "Password123",
    routingProfileId: exampleAwsConnectRoutingProfile.routingProfileId,
    securityProfileIds: [exampleAwsConnectSecurityProfile.securityProfileId],
});
import pulumi
import pulumi_aws as aws

example = aws.connect.User("example",
    phone_config={
        "after_contact_work_time_limit": 0,
        "phone_type": "SOFT_PHONE",
    },
    instance_id=example_aws_connect_instance["id"],
    name="example",
    password="Password123",
    routing_profile_id=example_aws_connect_routing_profile["routingProfileId"],
    security_profile_ids=[example_aws_connect_security_profile["securityProfileId"]])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var example = new Aws.Connect.User("example", new()
    {
        PhoneConfig = new Aws.Connect.Inputs.UserPhoneConfigArgs
        {
            AfterContactWorkTimeLimit = 0,
            PhoneType = "SOFT_PHONE",
        },
        InstanceId = exampleAwsConnectInstance.Id,
        Name = "example",
        Password = "Password123",
        RoutingProfileId = exampleAwsConnectRoutingProfile.RoutingProfileId,
        SecurityProfileIds = new[]
        {
            exampleAwsConnectSecurityProfile.SecurityProfileId,
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/connect"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := connect.NewUser(ctx, "example", &connect.UserArgs{
			PhoneConfig: &connect.UserPhoneConfigArgs{
				AfterContactWorkTimeLimit: pulumi.Int(0),
				PhoneType:                 pulumi.String("SOFT_PHONE"),
			},
			InstanceId:       pulumi.Any(exampleAwsConnectInstance.Id),
			Name:             pulumi.String("example"),
			Password:         pulumi.String("Password123"),
			RoutingProfileId: pulumi.Any(exampleAwsConnectRoutingProfile.RoutingProfileId),
			SecurityProfileIds: pulumi.StringArray{
				exampleAwsConnectSecurityProfile.SecurityProfileId,
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_connect_user" "example" {
  phone_config = {
    after_contact_work_time_limit = 0
    phone_type                    = "SOFT_PHONE"
  }
  instance_id          = exampleAwsConnectInstance.id
  name                 = "example"
  password             = "Password123"
  routing_profile_id   = exampleAwsConnectRoutingProfile.routingProfileId
  security_profile_ids = [exampleAwsConnectSecurityProfile.securityProfileId]
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.connect.User;
import com.pulumi.aws.connect.UserArgs;
import com.pulumi.aws.connect.inputs.UserPhoneConfigArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 User("example", UserArgs.builder()
            .phoneConfig(UserPhoneConfigArgs.builder()
                .afterContactWorkTimeLimit(0)
                .phoneType("SOFT_PHONE")
                .build())
            .instanceId(exampleAwsConnectInstance.id())
            .name("example")
            .password("Password123")
            .routingProfileId(exampleAwsConnectRoutingProfile.routingProfileId())
            .securityProfileIds(exampleAwsConnectSecurityProfile.securityProfileId())
            .build());

    }
}
resources:
  example:
    type: aws:connect:User
    properties:
      phoneConfig:
        afterContactWorkTimeLimit: 0
        phoneType: SOFT_PHONE
      instanceId: ${exampleAwsConnectInstance.id}
      name: example
      password: Password123
      routingProfileId: ${exampleAwsConnectRoutingProfile.routingProfileId}
      securityProfileIds:
        - ${exampleAwsConnectSecurityProfile.securityProfileId}

With multiple Security profile ids specified in securityProfileIds

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

const example = new aws.connect.User("example", {
    phoneConfig: {
        afterContactWorkTimeLimit: 0,
        autoAccept: false,
        deskPhoneNumber: "+112345678912",
        phoneType: "DESK_PHONE",
    },
    instanceId: exampleAwsConnectInstance.id,
    name: "example",
    password: "Password123",
    routingProfileId: exampleAwsConnectRoutingProfile.routingProfileId,
    securityProfileIds: [
        exampleAwsConnectSecurityProfile.securityProfileId,
        example2.securityProfileId,
    ],
});
import pulumi
import pulumi_aws as aws

example = aws.connect.User("example",
    phone_config={
        "after_contact_work_time_limit": 0,
        "auto_accept": False,
        "desk_phone_number": "+112345678912",
        "phone_type": "DESK_PHONE",
    },
    instance_id=example_aws_connect_instance["id"],
    name="example",
    password="Password123",
    routing_profile_id=example_aws_connect_routing_profile["routingProfileId"],
    security_profile_ids=[
        example_aws_connect_security_profile["securityProfileId"],
        example2["securityProfileId"],
    ])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var example = new Aws.Connect.User("example", new()
    {
        PhoneConfig = new Aws.Connect.Inputs.UserPhoneConfigArgs
        {
            AfterContactWorkTimeLimit = 0,
            AutoAccept = false,
            DeskPhoneNumber = "+112345678912",
            PhoneType = "DESK_PHONE",
        },
        InstanceId = exampleAwsConnectInstance.Id,
        Name = "example",
        Password = "Password123",
        RoutingProfileId = exampleAwsConnectRoutingProfile.RoutingProfileId,
        SecurityProfileIds = new[]
        {
            exampleAwsConnectSecurityProfile.SecurityProfileId,
            example2.SecurityProfileId,
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/connect"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := connect.NewUser(ctx, "example", &connect.UserArgs{
			PhoneConfig: &connect.UserPhoneConfigArgs{
				AfterContactWorkTimeLimit: pulumi.Int(0),
				AutoAccept:                pulumi.Bool(false),
				DeskPhoneNumber:           pulumi.String("+112345678912"),
				PhoneType:                 pulumi.String("DESK_PHONE"),
			},
			InstanceId:       pulumi.Any(exampleAwsConnectInstance.Id),
			Name:             pulumi.String("example"),
			Password:         pulumi.String("Password123"),
			RoutingProfileId: pulumi.Any(exampleAwsConnectRoutingProfile.RoutingProfileId),
			SecurityProfileIds: pulumi.StringArray{
				exampleAwsConnectSecurityProfile.SecurityProfileId,
				example2.SecurityProfileId,
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_connect_user" "example" {
  phone_config = {
    after_contact_work_time_limit = 0
    auto_accept                   = false
    desk_phone_number             = "+112345678912"
    phone_type                    = "DESK_PHONE"
  }
  instance_id          = exampleAwsConnectInstance.id
  name                 = "example"
  password             = "Password123"
  routing_profile_id   = exampleAwsConnectRoutingProfile.routingProfileId
  security_profile_ids = [exampleAwsConnectSecurityProfile.securityProfileId, example2.securityProfileId]
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.connect.User;
import com.pulumi.aws.connect.UserArgs;
import com.pulumi.aws.connect.inputs.UserPhoneConfigArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 User("example", UserArgs.builder()
            .phoneConfig(UserPhoneConfigArgs.builder()
                .afterContactWorkTimeLimit(0)
                .autoAccept(false)
                .deskPhoneNumber("+112345678912")
                .phoneType("DESK_PHONE")
                .build())
            .instanceId(exampleAwsConnectInstance.id())
            .name("example")
            .password("Password123")
            .routingProfileId(exampleAwsConnectRoutingProfile.routingProfileId())
            .securityProfileIds(
                exampleAwsConnectSecurityProfile.securityProfileId(),
                example2.securityProfileId())
            .build());

    }
}
resources:
  example:
    type: aws:connect:User
    properties:
      phoneConfig:
        afterContactWorkTimeLimit: 0
        autoAccept: false
        deskPhoneNumber: '+112345678912'
        phoneType: DESK_PHONE
      instanceId: ${exampleAwsConnectInstance.id}
      name: example
      password: Password123
      routingProfileId: ${exampleAwsConnectRoutingProfile.routingProfileId}
      securityProfileIds:
        - ${exampleAwsConnectSecurityProfile.securityProfileId}
        - ${example2.securityProfileId}

Import

Using pulumi import, import Amazon Connect Users using the instanceId and userId separated by a colon (:). For example:

$ pulumi import aws:connect/user:User example f1288a1f-6193-445a-b47e-af739b2:c1d4e5f6-1b3c-1b3c-1b3c-c1d4e5f6c1d4e5

Constructors

User(String name, {UserArgs? args, CustomResourceOptions? options})
Creates a new User. name The Pulumi resource name. args Arguments used to configure this User. The set of arguments for User. options Resource options controlling this resource's behavior.
User.reference(String urn)
Creates a typed reference to an existing User resource.

Properties

arn ↔ Output<String>
ARN of the user.
latefinal
childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
directoryUserId ↔ Output<String>
The identifier of the user account in the directory used for identity management. If Amazon Connect cannot access the directory, you can specify this identifier to authenticate users. If you include the identifier, we assume that Amazon Connect cannot access the directory. Otherwise, the identity information is used to authenticate users from your directory. This parameter is required if you are using an existing directory for identity management in Amazon Connect when Amazon Connect cannot access your directory to authenticate users. If you are using SAML for identity management and include this parameter, an error is returned.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
hierarchyGroupId ↔ Output<String?>
The identifier of the hierarchy group for the user.
latefinal
id ↔ Output<String>
getter/setter pairinherited
identityInfo ↔ Output<UserIdentityInfo?>
A block that contains information about the identity of the user. Documented below.
latefinal
instanceId ↔ Output<String>
Specifies the identifier of the hosting Amazon Connect Instance.
latefinal
isCustom → bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected → bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote → bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference → bool
Whether this instance represents a resource value returned over RPC.
finalinherited
name ↔ Output<String>
The user name for the account. For instances not using SAML for identity management, the user name can include up to 20 characters. If you are using SAML for identity management, the user name can include up to 64 characters from [a-zA-Z0-9_-.\@]+.
latefinal
password ↔ Output<String?>
The password for the user account. A password is required if you are using Amazon Connect for identity management. Otherwise, it is an error to include a password.
latefinal
phoneConfig ↔ Output<UserPhoneConfig>
A block that contains information about the phone settings for the user. Documented below.
latefinal
region ↔ Output<String>
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
routingProfileId ↔ Output<String>
The identifier of the routing profile for the user.
latefinal
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
securityProfileIds ↔ Output<List<String>>
A list of identifiers for the security profiles for the user. Specify a minimum of 1 and maximum of 10 security profile ids. For more information, see Best Practices for Security Profiles in the Amazon Connect Administrator Guide.
latefinal
tags ↔ Output<Map<String, String>?>
Tags to apply to the user. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
latefinal
tagsAll ↔ Output<Map<String, String>>
A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
latefinal
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
urn ↔ Output<String>
latefinalinherited
userId ↔ Output<String>
The identifier for the user.
latefinal

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() → String
Returns this resource's logical name.
inherited
getResourceType() → String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) → Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {UserState? state, CustomResourceOptions? options}) → User
Gets an existing User resource's state with the given name and id.