@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
337 lines (336 loc) • 15.3 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Provides an Amazon Connect User resource. For more information see
* [Amazon Connect: Getting Started](https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-get-started.html)
*
* ## Example Usage
*
* ### Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.connect.User("example", {
* instanceId: exampleAwsConnectInstance.id,
* name: "example",
* password: "Password123",
* routingProfileId: exampleAwsConnectRoutingProfile.routingProfileId,
* securityProfileIds: [exampleAwsConnectSecurityProfile.securityProfileId],
* identityInfo: {
* firstName: "example",
* lastName: "example2",
* },
* phoneConfig: {
* afterContactWorkTimeLimit: 0,
* phoneType: "SOFT_PHONE",
* },
* });
* ```
*
* ### With hierarchyGroupId
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.connect.User("example", {
* instanceId: exampleAwsConnectInstance.id,
* name: "example",
* password: "Password123",
* routingProfileId: exampleAwsConnectRoutingProfile.routingProfileId,
* hierarchyGroupId: exampleAwsConnectUserHierarchyGroup.hierarchyGroupId,
* securityProfileIds: [exampleAwsConnectSecurityProfile.securityProfileId],
* identityInfo: {
* firstName: "example",
* lastName: "example2",
* },
* phoneConfig: {
* afterContactWorkTimeLimit: 0,
* phoneType: "SOFT_PHONE",
* },
* });
* ```
*
* ### With identityInfo filled
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.connect.User("example", {
* instanceId: exampleAwsConnectInstance.id,
* name: "example",
* password: "Password123",
* routingProfileId: exampleAwsConnectRoutingProfile.routingProfileId,
* securityProfileIds: [exampleAwsConnectSecurityProfile.securityProfileId],
* identityInfo: {
* email: "example@example.com",
* firstName: "example",
* lastName: "example2",
* secondaryEmail: "secondary@example.com",
* },
* phoneConfig: {
* afterContactWorkTimeLimit: 0,
* phoneType: "SOFT_PHONE",
* },
* });
* ```
*
* ### With phoneConfig phone type as desk phone
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.connect.User("example", {
* instanceId: exampleAwsConnectInstance.id,
* name: "example",
* password: "Password123",
* routingProfileId: exampleAwsConnectRoutingProfile.routingProfileId,
* securityProfileIds: [exampleAwsConnectSecurityProfile.securityProfileId],
* phoneConfig: {
* afterContactWorkTimeLimit: 0,
* phoneType: "SOFT_PHONE",
* },
* });
* ```
*
* ### With multiple Security profile ids specified in securityProfileIds
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.connect.User("example", {
* instanceId: exampleAwsConnectInstance.id,
* name: "example",
* password: "Password123",
* routingProfileId: exampleAwsConnectRoutingProfile.routingProfileId,
* securityProfileIds: [
* exampleAwsConnectSecurityProfile.securityProfileId,
* example2.securityProfileId,
* ],
* phoneConfig: {
* afterContactWorkTimeLimit: 0,
* autoAccept: false,
* deskPhoneNumber: "+112345678912",
* phoneType: "DESK_PHONE",
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import Amazon Connect Users using the `instance_id` and `user_id` separated by a colon (`:`). For example:
*
* ```sh
* $ pulumi import aws:connect/user:User example f1288a1f-6193-445a-b47e-af739b2:c1d4e5f6-1b3c-1b3c-1b3c-c1d4e5f6c1d4e5
* ```
*/
export declare class User extends pulumi.CustomResource {
/**
* Get an existing User resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: UserState, opts?: pulumi.CustomResourceOptions): User;
/**
* Returns true if the given object is an instance of User. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is User;
/**
* The Amazon Resource Name (ARN) of the user.
*/
readonly arn: pulumi.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.
*/
readonly directoryUserId: pulumi.Output<string>;
/**
* The identifier of the hierarchy group for the user.
*/
readonly hierarchyGroupId: pulumi.Output<string | undefined>;
/**
* A block that contains information about the identity of the user. Documented below.
*/
readonly identityInfo: pulumi.Output<outputs.connect.UserIdentityInfo | undefined>;
/**
* Specifies the identifier of the hosting Amazon Connect Instance.
*/
readonly instanceId: pulumi.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_-.\@]+`.
*/
readonly name: pulumi.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.
*/
readonly password: pulumi.Output<string | undefined>;
/**
* A block that contains information about the phone settings for the user. Documented below.
*/
readonly phoneConfig: pulumi.Output<outputs.connect.UserPhoneConfig>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
readonly region: pulumi.Output<string>;
/**
* The identifier of the routing profile for the user.
*/
readonly routingProfileId: pulumi.Output<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](https://docs.aws.amazon.com/connect/latest/adminguide/security-profile-best-practices.html) in the Amazon Connect Administrator Guide.
*/
readonly securityProfileIds: pulumi.Output<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.
*/
readonly tags: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
*/
readonly tagsAll: pulumi.Output<{
[key: string]: string;
}>;
/**
* The identifier for the user.
*/
readonly userId: pulumi.Output<string>;
/**
* Create a User resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: UserArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering User resources.
*/
export interface UserState {
/**
* The Amazon Resource Name (ARN) of the user.
*/
arn?: pulumi.Input<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.
*/
directoryUserId?: pulumi.Input<string>;
/**
* The identifier of the hierarchy group for the user.
*/
hierarchyGroupId?: pulumi.Input<string>;
/**
* A block that contains information about the identity of the user. Documented below.
*/
identityInfo?: pulumi.Input<inputs.connect.UserIdentityInfo>;
/**
* Specifies the identifier of the hosting Amazon Connect Instance.
*/
instanceId?: pulumi.Input<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_-.\@]+`.
*/
name?: pulumi.Input<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.
*/
password?: pulumi.Input<string>;
/**
* A block that contains information about the phone settings for the user. Documented below.
*/
phoneConfig?: pulumi.Input<inputs.connect.UserPhoneConfig>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
/**
* The identifier of the routing profile for the user.
*/
routingProfileId?: pulumi.Input<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](https://docs.aws.amazon.com/connect/latest/adminguide/security-profile-best-practices.html) in the Amazon Connect Administrator Guide.
*/
securityProfileIds?: pulumi.Input<pulumi.Input<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.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
*/
tagsAll?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* The identifier for the user.
*/
userId?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a User resource.
*/
export interface UserArgs {
/**
* 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.
*/
directoryUserId?: pulumi.Input<string>;
/**
* The identifier of the hierarchy group for the user.
*/
hierarchyGroupId?: pulumi.Input<string>;
/**
* A block that contains information about the identity of the user. Documented below.
*/
identityInfo?: pulumi.Input<inputs.connect.UserIdentityInfo>;
/**
* Specifies the identifier of the hosting Amazon Connect Instance.
*/
instanceId: pulumi.Input<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_-.\@]+`.
*/
name?: pulumi.Input<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.
*/
password?: pulumi.Input<string>;
/**
* A block that contains information about the phone settings for the user. Documented below.
*/
phoneConfig: pulumi.Input<inputs.connect.UserPhoneConfig>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
/**
* The identifier of the routing profile for the user.
*/
routingProfileId: pulumi.Input<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](https://docs.aws.amazon.com/connect/latest/adminguide/security-profile-best-practices.html) in the Amazon Connect Administrator Guide.
*/
securityProfileIds: pulumi.Input<pulumi.Input<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.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
}