1. Packages
  2. Harness Provider
  3. API Docs
  4. platform
  5. User
Harness v0.4.4 published on Tuesday, Nov 12, 2024 by Pulumi

harness.platform.User

Explore with Pulumi AI

harness logo
Harness v0.4.4 published on Tuesday, Nov 12, 2024 by Pulumi

    Example Usage

    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,
             email: Optional[str] = None,
             user_groups: Optional[Sequence[str]] = None,
             org_id: Optional[str] = None,
             project_id: Optional[str] = None,
             role_bindings: Optional[Sequence[UserRoleBindingArgs]] = 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: harness:platform: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 harnessUserResource = new Harness.Platform.User("harnessUserResource", new()
    {
        Email = "string",
        UserGroups = new[]
        {
            "string",
        },
        OrgId = "string",
        ProjectId = "string",
        RoleBindings = new[]
        {
            new Harness.Platform.Inputs.UserRoleBindingArgs
            {
                ManagedRole = false,
                ResourceGroupIdentifier = "string",
                ResourceGroupName = "string",
                RoleIdentifier = "string",
                RoleName = "string",
            },
        },
    });
    
    example, err := platform.NewUser(ctx, "harnessUserResource", &platform.UserArgs{
    	Email: pulumi.String("string"),
    	UserGroups: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	OrgId:     pulumi.String("string"),
    	ProjectId: pulumi.String("string"),
    	RoleBindings: platform.UserRoleBindingArray{
    		&platform.UserRoleBindingArgs{
    			ManagedRole:             pulumi.Bool(false),
    			ResourceGroupIdentifier: pulumi.String("string"),
    			ResourceGroupName:       pulumi.String("string"),
    			RoleIdentifier:          pulumi.String("string"),
    			RoleName:                pulumi.String("string"),
    		},
    	},
    })
    
    var harnessUserResource = new User("harnessUserResource", UserArgs.builder()
        .email("string")
        .userGroups("string")
        .orgId("string")
        .projectId("string")
        .roleBindings(UserRoleBindingArgs.builder()
            .managedRole(false)
            .resourceGroupIdentifier("string")
            .resourceGroupName("string")
            .roleIdentifier("string")
            .roleName("string")
            .build())
        .build());
    
    harness_user_resource = harness.platform.User("harnessUserResource",
        email="string",
        user_groups=["string"],
        org_id="string",
        project_id="string",
        role_bindings=[{
            "managed_role": False,
            "resource_group_identifier": "string",
            "resource_group_name": "string",
            "role_identifier": "string",
            "role_name": "string",
        }])
    
    const harnessUserResource = new harness.platform.User("harnessUserResource", {
        email: "string",
        userGroups: ["string"],
        orgId: "string",
        projectId: "string",
        roleBindings: [{
            managedRole: false,
            resourceGroupIdentifier: "string",
            resourceGroupName: "string",
            roleIdentifier: "string",
            roleName: "string",
        }],
    });
    
    type: harness:platform:User
    properties:
        email: string
        orgId: string
        projectId: string
        roleBindings:
            - managedRole: false
              resourceGroupIdentifier: string
              resourceGroupName: string
              roleIdentifier: string
              roleName: string
        userGroups:
            - 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:

    Email string
    The email of the user.
    UserGroups List<string>
    The user group of the user.
    OrgId string
    Organization identifier of the user.
    ProjectId string
    Project identifier of the user.
    RoleBindings List<UserRoleBinding>
    Role Bindings of the user. Cannot be updated.
    Email string
    The email of the user.
    UserGroups []string
    The user group of the user.
    OrgId string
    Organization identifier of the user.
    ProjectId string
    Project identifier of the user.
    RoleBindings []UserRoleBindingArgs
    Role Bindings of the user. Cannot be updated.
    email String
    The email of the user.
    userGroups List<String>
    The user group of the user.
    orgId String
    Organization identifier of the user.
    projectId String
    Project identifier of the user.
    roleBindings List<UserRoleBinding>
    Role Bindings of the user. Cannot be updated.
    email string
    The email of the user.
    userGroups string[]
    The user group of the user.
    orgId string
    Organization identifier of the user.
    projectId string
    Project identifier of the user.
    roleBindings UserRoleBinding[]
    Role Bindings of the user. Cannot be updated.
    email str
    The email of the user.
    user_groups Sequence[str]
    The user group of the user.
    org_id str
    Organization identifier of the user.
    project_id str
    Project identifier of the user.
    role_bindings Sequence[UserRoleBindingArgs]
    Role Bindings of the user. Cannot be updated.
    email String
    The email of the user.
    userGroups List<String>
    The user group of the user.
    orgId String
    Organization identifier of the user.
    projectId String
    Project identifier of the user.
    roleBindings List<Property Map>
    Role Bindings of the user. Cannot be updated.

    Outputs

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

    Disabled bool
    Whether or not the user account is disabled.
    ExternallyManaged bool
    Whether or not the user account is externally managed.
    Id string
    The provider-assigned unique ID for this managed resource.
    Identifier string
    Unique identifier of the user.
    Locked bool
    Whether or not the user account is locked.
    Name string
    Name of the user.
    Disabled bool
    Whether or not the user account is disabled.
    ExternallyManaged bool
    Whether or not the user account is externally managed.
    Id string
    The provider-assigned unique ID for this managed resource.
    Identifier string
    Unique identifier of the user.
    Locked bool
    Whether or not the user account is locked.
    Name string
    Name of the user.
    disabled Boolean
    Whether or not the user account is disabled.
    externallyManaged Boolean
    Whether or not the user account is externally managed.
    id String
    The provider-assigned unique ID for this managed resource.
    identifier String
    Unique identifier of the user.
    locked Boolean
    Whether or not the user account is locked.
    name String
    Name of the user.
    disabled boolean
    Whether or not the user account is disabled.
    externallyManaged boolean
    Whether or not the user account is externally managed.
    id string
    The provider-assigned unique ID for this managed resource.
    identifier string
    Unique identifier of the user.
    locked boolean
    Whether or not the user account is locked.
    name string
    Name of the user.
    disabled bool
    Whether or not the user account is disabled.
    externally_managed bool
    Whether or not the user account is externally managed.
    id str
    The provider-assigned unique ID for this managed resource.
    identifier str
    Unique identifier of the user.
    locked bool
    Whether or not the user account is locked.
    name str
    Name of the user.
    disabled Boolean
    Whether or not the user account is disabled.
    externallyManaged Boolean
    Whether or not the user account is externally managed.
    id String
    The provider-assigned unique ID for this managed resource.
    identifier String
    Unique identifier of the user.
    locked Boolean
    Whether or not the user account is locked.
    name String
    Name of the user.

    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,
            disabled: Optional[bool] = None,
            email: Optional[str] = None,
            externally_managed: Optional[bool] = None,
            identifier: Optional[str] = None,
            locked: Optional[bool] = None,
            name: Optional[str] = None,
            org_id: Optional[str] = None,
            project_id: Optional[str] = None,
            role_bindings: Optional[Sequence[UserRoleBindingArgs]] = None,
            user_groups: Optional[Sequence[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)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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:
    Disabled bool
    Whether or not the user account is disabled.
    Email string
    The email of the user.
    ExternallyManaged bool
    Whether or not the user account is externally managed.
    Identifier string
    Unique identifier of the user.
    Locked bool
    Whether or not the user account is locked.
    Name string
    Name of the user.
    OrgId string
    Organization identifier of the user.
    ProjectId string
    Project identifier of the user.
    RoleBindings List<UserRoleBinding>
    Role Bindings of the user. Cannot be updated.
    UserGroups List<string>
    The user group of the user.
    Disabled bool
    Whether or not the user account is disabled.
    Email string
    The email of the user.
    ExternallyManaged bool
    Whether or not the user account is externally managed.
    Identifier string
    Unique identifier of the user.
    Locked bool
    Whether or not the user account is locked.
    Name string
    Name of the user.
    OrgId string
    Organization identifier of the user.
    ProjectId string
    Project identifier of the user.
    RoleBindings []UserRoleBindingArgs
    Role Bindings of the user. Cannot be updated.
    UserGroups []string
    The user group of the user.
    disabled Boolean
    Whether or not the user account is disabled.
    email String
    The email of the user.
    externallyManaged Boolean
    Whether or not the user account is externally managed.
    identifier String
    Unique identifier of the user.
    locked Boolean
    Whether or not the user account is locked.
    name String
    Name of the user.
    orgId String
    Organization identifier of the user.
    projectId String
    Project identifier of the user.
    roleBindings List<UserRoleBinding>
    Role Bindings of the user. Cannot be updated.
    userGroups List<String>
    The user group of the user.
    disabled boolean
    Whether or not the user account is disabled.
    email string
    The email of the user.
    externallyManaged boolean
    Whether or not the user account is externally managed.
    identifier string
    Unique identifier of the user.
    locked boolean
    Whether or not the user account is locked.
    name string
    Name of the user.
    orgId string
    Organization identifier of the user.
    projectId string
    Project identifier of the user.
    roleBindings UserRoleBinding[]
    Role Bindings of the user. Cannot be updated.
    userGroups string[]
    The user group of the user.
    disabled bool
    Whether or not the user account is disabled.
    email str
    The email of the user.
    externally_managed bool
    Whether or not the user account is externally managed.
    identifier str
    Unique identifier of the user.
    locked bool
    Whether or not the user account is locked.
    name str
    Name of the user.
    org_id str
    Organization identifier of the user.
    project_id str
    Project identifier of the user.
    role_bindings Sequence[UserRoleBindingArgs]
    Role Bindings of the user. Cannot be updated.
    user_groups Sequence[str]
    The user group of the user.
    disabled Boolean
    Whether or not the user account is disabled.
    email String
    The email of the user.
    externallyManaged Boolean
    Whether or not the user account is externally managed.
    identifier String
    Unique identifier of the user.
    locked Boolean
    Whether or not the user account is locked.
    name String
    Name of the user.
    orgId String
    Organization identifier of the user.
    projectId String
    Project identifier of the user.
    roleBindings List<Property Map>
    Role Bindings of the user. Cannot be updated.
    userGroups List<String>
    The user group of the user.

    Supporting Types

    UserRoleBinding, UserRoleBindingArgs

    ManagedRole bool
    Managed Role of the user.
    ResourceGroupIdentifier string
    Resource Group Identifier of the user.
    ResourceGroupName string
    Resource Group Name of the user.
    RoleIdentifier string
    Role Identifier of the user.
    RoleName string
    Role Name Identifier of the user.
    ManagedRole bool
    Managed Role of the user.
    ResourceGroupIdentifier string
    Resource Group Identifier of the user.
    ResourceGroupName string
    Resource Group Name of the user.
    RoleIdentifier string
    Role Identifier of the user.
    RoleName string
    Role Name Identifier of the user.
    managedRole Boolean
    Managed Role of the user.
    resourceGroupIdentifier String
    Resource Group Identifier of the user.
    resourceGroupName String
    Resource Group Name of the user.
    roleIdentifier String
    Role Identifier of the user.
    roleName String
    Role Name Identifier of the user.
    managedRole boolean
    Managed Role of the user.
    resourceGroupIdentifier string
    Resource Group Identifier of the user.
    resourceGroupName string
    Resource Group Name of the user.
    roleIdentifier string
    Role Identifier of the user.
    roleName string
    Role Name Identifier of the user.
    managed_role bool
    Managed Role of the user.
    resource_group_identifier str
    Resource Group Identifier of the user.
    resource_group_name str
    Resource Group Name of the user.
    role_identifier str
    Role Identifier of the user.
    role_name str
    Role Name Identifier of the user.
    managedRole Boolean
    Managed Role of the user.
    resourceGroupIdentifier String
    Resource Group Identifier of the user.
    resourceGroupName String
    Resource Group Name of the user.
    roleIdentifier String
    Role Identifier of the user.
    roleName String
    Role Name Identifier of the user.

    Import

    Import account level

    $ pulumi import harness:platform/user:User john_doe <email_id>
    

    Import org level

    $ pulumi import harness:platform/user:User john_doe <email_id>/<org_id>
    

    Import project level

    $ pulumi import harness:platform/user:User john_doe <email_id>/<org_id>/<project_id>
    

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

    Package Details

    Repository
    harness pulumi/pulumi-harness
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the harness Terraform Provider.
    harness logo
    Harness v0.4.4 published on Tuesday, Nov 12, 2024 by Pulumi