1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. cloudsso
  5. User
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.cloudsso.User

Explore with Pulumi AI

Provides a Cloud SSO User resource.

For information about Cloud SSO User and how to use it, see What is User.

NOTE: Available since v1.140.0.

NOTE: Cloud SSO Only Support cn-shanghai And us-west-1 Region

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,
         directory_id: Optional[str] = None,
         user_name: Optional[str] = None,
         description: Optional[str] = None,
         display_name: Optional[str] = None,
         email: Optional[str] = None,
         first_name: Optional[str] = None,
         last_name: Optional[str] = None,
         status: Optional[str] = None)
func NewUser(ctx *Context, name string, args UserArgs, opts ...ResourceOption) (*User, error)
public User(string name, UserArgs args, CustomResourceOptions? opts = null)
public User(String name, UserArgs args)
public User(String name, UserArgs args, CustomResourceOptions options)
type: alicloud:cloudsso:User
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. UserArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. UserArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. UserArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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 alicloudUserResource = new AliCloud.CloudSso.User("alicloudUserResource", new()
{
    DirectoryId = "string",
    UserName = "string",
    Description = "string",
    DisplayName = "string",
    Email = "string",
    FirstName = "string",
    LastName = "string",
    Status = "string",
});
Copy
example, err := cloudsso.NewUser(ctx, "alicloudUserResource", &cloudsso.UserArgs{
	DirectoryId: pulumi.String("string"),
	UserName:    pulumi.String("string"),
	Description: pulumi.String("string"),
	DisplayName: pulumi.String("string"),
	Email:       pulumi.String("string"),
	FirstName:   pulumi.String("string"),
	LastName:    pulumi.String("string"),
	Status:      pulumi.String("string"),
})
Copy
var alicloudUserResource = new User("alicloudUserResource", UserArgs.builder()
    .directoryId("string")
    .userName("string")
    .description("string")
    .displayName("string")
    .email("string")
    .firstName("string")
    .lastName("string")
    .status("string")
    .build());
Copy
alicloud_user_resource = alicloud.cloudsso.User("alicloudUserResource",
    directory_id="string",
    user_name="string",
    description="string",
    display_name="string",
    email="string",
    first_name="string",
    last_name="string",
    status="string")
Copy
const alicloudUserResource = new alicloud.cloudsso.User("alicloudUserResource", {
    directoryId: "string",
    userName: "string",
    description: "string",
    displayName: "string",
    email: "string",
    firstName: "string",
    lastName: "string",
    status: "string",
});
Copy
type: alicloud:cloudsso:User
properties:
    description: string
    directoryId: string
    displayName: string
    email: string
    firstName: string
    lastName: string
    status: string
    userName: string
Copy

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:

DirectoryId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the Directory.
UserName
This property is required.
Changes to this property will trigger replacement.
string
The name of user. The name must be 1 to 64 characters in length and can contain letters, digits, at signs (@), periods (.), underscores (_), and hyphens (-).
Description string
The description of user. The description can be up to 1024 characters long.
DisplayName string
The display name of user. The display name can be up to 256 characters long.
Email string
The User's Contact Email Address. The email can be up to 128 characters long.
FirstName string
The first name of user. The first_name can be up to 64 characters long.
LastName string
The last name of user. The last_name can be up to 64 characters long.
Status string
The status of user. Valid values: Disabled, Enabled.
DirectoryId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the Directory.
UserName
This property is required.
Changes to this property will trigger replacement.
string
The name of user. The name must be 1 to 64 characters in length and can contain letters, digits, at signs (@), periods (.), underscores (_), and hyphens (-).
Description string
The description of user. The description can be up to 1024 characters long.
DisplayName string
The display name of user. The display name can be up to 256 characters long.
Email string
The User's Contact Email Address. The email can be up to 128 characters long.
FirstName string
The first name of user. The first_name can be up to 64 characters long.
LastName string
The last name of user. The last_name can be up to 64 characters long.
Status string
The status of user. Valid values: Disabled, Enabled.
directoryId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the Directory.
userName
This property is required.
Changes to this property will trigger replacement.
String
The name of user. The name must be 1 to 64 characters in length and can contain letters, digits, at signs (@), periods (.), underscores (_), and hyphens (-).
description String
The description of user. The description can be up to 1024 characters long.
displayName String
The display name of user. The display name can be up to 256 characters long.
email String
The User's Contact Email Address. The email can be up to 128 characters long.
firstName String
The first name of user. The first_name can be up to 64 characters long.
lastName String
The last name of user. The last_name can be up to 64 characters long.
status String
The status of user. Valid values: Disabled, Enabled.
directoryId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the Directory.
userName
This property is required.
Changes to this property will trigger replacement.
string
The name of user. The name must be 1 to 64 characters in length and can contain letters, digits, at signs (@), periods (.), underscores (_), and hyphens (-).
description string
The description of user. The description can be up to 1024 characters long.
displayName string
The display name of user. The display name can be up to 256 characters long.
email string
The User's Contact Email Address. The email can be up to 128 characters long.
firstName string
The first name of user. The first_name can be up to 64 characters long.
lastName string
The last name of user. The last_name can be up to 64 characters long.
status string
The status of user. Valid values: Disabled, Enabled.
directory_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the Directory.
user_name
This property is required.
Changes to this property will trigger replacement.
str
The name of user. The name must be 1 to 64 characters in length and can contain letters, digits, at signs (@), periods (.), underscores (_), and hyphens (-).
description str
The description of user. The description can be up to 1024 characters long.
display_name str
The display name of user. The display name can be up to 256 characters long.
email str
The User's Contact Email Address. The email can be up to 128 characters long.
first_name str
The first name of user. The first_name can be up to 64 characters long.
last_name str
The last name of user. The last_name can be up to 64 characters long.
status str
The status of user. Valid values: Disabled, Enabled.
directoryId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the Directory.
userName
This property is required.
Changes to this property will trigger replacement.
String
The name of user. The name must be 1 to 64 characters in length and can contain letters, digits, at signs (@), periods (.), underscores (_), and hyphens (-).
description String
The description of user. The description can be up to 1024 characters long.
displayName String
The display name of user. The display name can be up to 256 characters long.
email String
The User's Contact Email Address. The email can be up to 128 characters long.
firstName String
The first name of user. The first_name can be up to 64 characters long.
lastName String
The last name of user. The last_name can be up to 64 characters long.
status String
The status of user. Valid values: Disabled, Enabled.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
UserId string
The User ID of the group.
Id string
The provider-assigned unique ID for this managed resource.
UserId string
The User ID of the group.
id String
The provider-assigned unique ID for this managed resource.
userId String
The User ID of the group.
id string
The provider-assigned unique ID for this managed resource.
userId string
The User ID of the group.
id str
The provider-assigned unique ID for this managed resource.
user_id str
The User ID of the group.
id String
The provider-assigned unique ID for this managed resource.
userId String
The User ID of the group.

Look up Existing User Resource

Get an existing User resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: UserState, opts?: CustomResourceOptions): User
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        directory_id: Optional[str] = None,
        display_name: Optional[str] = None,
        email: Optional[str] = None,
        first_name: Optional[str] = None,
        last_name: Optional[str] = None,
        status: Optional[str] = None,
        user_id: Optional[str] = None,
        user_name: Optional[str] = None) -> User
func GetUser(ctx *Context, name string, id IDInput, state *UserState, opts ...ResourceOption) (*User, error)
public static User Get(string name, Input<string> id, UserState? state, CustomResourceOptions? opts = null)
public static User get(String name, Output<String> id, UserState state, CustomResourceOptions options)
resources:  _:    type: alicloud:cloudsso:User    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Description string
The description of user. The description can be up to 1024 characters long.
DirectoryId Changes to this property will trigger replacement. string
The ID of the Directory.
DisplayName string
The display name of user. The display name can be up to 256 characters long.
Email string
The User's Contact Email Address. The email can be up to 128 characters long.
FirstName string
The first name of user. The first_name can be up to 64 characters long.
LastName string
The last name of user. The last_name can be up to 64 characters long.
Status string
The status of user. Valid values: Disabled, Enabled.
UserId string
The User ID of the group.
UserName Changes to this property will trigger replacement. string
The name of user. The name must be 1 to 64 characters in length and can contain letters, digits, at signs (@), periods (.), underscores (_), and hyphens (-).
Description string
The description of user. The description can be up to 1024 characters long.
DirectoryId Changes to this property will trigger replacement. string
The ID of the Directory.
DisplayName string
The display name of user. The display name can be up to 256 characters long.
Email string
The User's Contact Email Address. The email can be up to 128 characters long.
FirstName string
The first name of user. The first_name can be up to 64 characters long.
LastName string
The last name of user. The last_name can be up to 64 characters long.
Status string
The status of user. Valid values: Disabled, Enabled.
UserId string
The User ID of the group.
UserName Changes to this property will trigger replacement. string
The name of user. The name must be 1 to 64 characters in length and can contain letters, digits, at signs (@), periods (.), underscores (_), and hyphens (-).
description String
The description of user. The description can be up to 1024 characters long.
directoryId Changes to this property will trigger replacement. String
The ID of the Directory.
displayName String
The display name of user. The display name can be up to 256 characters long.
email String
The User's Contact Email Address. The email can be up to 128 characters long.
firstName String
The first name of user. The first_name can be up to 64 characters long.
lastName String
The last name of user. The last_name can be up to 64 characters long.
status String
The status of user. Valid values: Disabled, Enabled.
userId String
The User ID of the group.
userName Changes to this property will trigger replacement. String
The name of user. The name must be 1 to 64 characters in length and can contain letters, digits, at signs (@), periods (.), underscores (_), and hyphens (-).
description string
The description of user. The description can be up to 1024 characters long.
directoryId Changes to this property will trigger replacement. string
The ID of the Directory.
displayName string
The display name of user. The display name can be up to 256 characters long.
email string
The User's Contact Email Address. The email can be up to 128 characters long.
firstName string
The first name of user. The first_name can be up to 64 characters long.
lastName string
The last name of user. The last_name can be up to 64 characters long.
status string
The status of user. Valid values: Disabled, Enabled.
userId string
The User ID of the group.
userName Changes to this property will trigger replacement. string
The name of user. The name must be 1 to 64 characters in length and can contain letters, digits, at signs (@), periods (.), underscores (_), and hyphens (-).
description str
The description of user. The description can be up to 1024 characters long.
directory_id Changes to this property will trigger replacement. str
The ID of the Directory.
display_name str
The display name of user. The display name can be up to 256 characters long.
email str
The User's Contact Email Address. The email can be up to 128 characters long.
first_name str
The first name of user. The first_name can be up to 64 characters long.
last_name str
The last name of user. The last_name can be up to 64 characters long.
status str
The status of user. Valid values: Disabled, Enabled.
user_id str
The User ID of the group.
user_name Changes to this property will trigger replacement. str
The name of user. The name must be 1 to 64 characters in length and can contain letters, digits, at signs (@), periods (.), underscores (_), and hyphens (-).
description String
The description of user. The description can be up to 1024 characters long.
directoryId Changes to this property will trigger replacement. String
The ID of the Directory.
displayName String
The display name of user. The display name can be up to 256 characters long.
email String
The User's Contact Email Address. The email can be up to 128 characters long.
firstName String
The first name of user. The first_name can be up to 64 characters long.
lastName String
The last name of user. The last_name can be up to 64 characters long.
status String
The status of user. Valid values: Disabled, Enabled.
userId String
The User ID of the group.
userName Changes to this property will trigger replacement. String
The name of user. The name must be 1 to 64 characters in length and can contain letters, digits, at signs (@), periods (.), underscores (_), and hyphens (-).

Import

Cloud SSO User can be imported using the id, e.g.

$ pulumi import alicloud:cloudsso/user:User example <directory_id>:<user_id>
Copy

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

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.