1. Packages
  2. Harness
  3. API Docs
  4. User
Harness v0.0.6 published on Saturday, Jul 1, 2023 by lbrlabs

harness.User

Explore with Pulumi AI

harness logo
Harness v0.0.6 published on Saturday, Jul 1, 2023 by lbrlabs

    Resource for creating a Harness user

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Harness = Lbrlabs.PulumiPackage.Harness;
    
    return await Deployment.RunAsync(() => 
    {
        var johnDoe = new Harness.User("johnDoe", new()
        {
            Email = "john.doe@example.com",
        });
    
    });
    
    package main
    
    import (
    	"github.com/lbrlabs/pulumi-harness/sdk/go/harness"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := harness.NewUser(ctx, "johnDoe", &harness.UserArgs{
    			Email: pulumi.String("john.doe@example.com"),
    		})
    		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.harness.User;
    import com.pulumi.harness.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 johnDoe = new User("johnDoe", UserArgs.builder()        
                .email("john.doe@example.com")
                .build());
    
        }
    }
    
    import pulumi
    import lbrlabs_pulumi_harness as harness
    
    john_doe = harness.User("johnDoe", email="john.doe@example.com")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as harness from "@lbrlabs/pulumi-harness";
    
    const johnDoe = new harness.User("johnDoe", {email: "john.doe@example.com"});
    
    resources:
      johnDoe:
        type: harness:User
        properties:
          email: john.doe@example.com
    

    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,
             group_ids: Optional[Sequence[str]] = None,
             name: 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: harness: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 userResource = new Harness.User("userResource", new()
    {
        Email = "string",
        GroupIds = new[]
        {
            "string",
        },
        Name = "string",
    });
    
    example, err := harness.NewUser(ctx, "userResource", &harness.UserArgs{
    	Email: pulumi.String("string"),
    	GroupIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Name: pulumi.String("string"),
    })
    
    var userResource = new User("userResource", UserArgs.builder()
        .email("string")
        .groupIds("string")
        .name("string")
        .build());
    
    user_resource = harness.User("userResource",
        email="string",
        group_ids=["string"],
        name="string")
    
    const userResource = new harness.User("userResource", {
        email: "string",
        groupIds: ["string"],
        name: "string",
    });
    
    type: harness:User
    properties:
        email: string
        groupIds:
            - string
        name: 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:

    Email string
    The email of the user.
    GroupIds List<string>
    The groups the user belongs to. This is only used during the creation of the user. The groups are not updated after the user is created. When using this option you should also set lifecycle = { ignore_changes = ["group_ids"] }.
    Name string
    The name of the user.
    Email string
    The email of the user.
    GroupIds []string
    The groups the user belongs to. This is only used during the creation of the user. The groups are not updated after the user is created. When using this option you should also set lifecycle = { ignore_changes = ["group_ids"] }.
    Name string
    The name of the user.
    email String
    The email of the user.
    groupIds List<String>
    The groups the user belongs to. This is only used during the creation of the user. The groups are not updated after the user is created. When using this option you should also set lifecycle = { ignore_changes = ["group_ids"] }.
    name String
    The name of the user.
    email string
    The email of the user.
    groupIds string[]
    The groups the user belongs to. This is only used during the creation of the user. The groups are not updated after the user is created. When using this option you should also set lifecycle = { ignore_changes = ["group_ids"] }.
    name string
    The name of the user.
    email str
    The email of the user.
    group_ids Sequence[str]
    The groups the user belongs to. This is only used during the creation of the user. The groups are not updated after the user is created. When using this option you should also set lifecycle = { ignore_changes = ["group_ids"] }.
    name str
    The name of the user.
    email String
    The email of the user.
    groupIds List<String>
    The groups the user belongs to. This is only used during the creation of the user. The groups are not updated after the user is created. When using this option you should also set lifecycle = { ignore_changes = ["group_ids"] }.
    name String
    The name of the user.

    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.
    IsEmailVerified bool
    Flag indicating whether or not the users email has been verified.
    IsImportedFromIdentityProvider bool
    Flag indicating whether or not the user was imported from an identity provider.
    IsPasswordExpired bool
    Flag indicating whether or not the users password has expired.
    IsTwoFactorAuthEnabled bool
    Flag indicating whether or not two-factor authentication is enabled for the user.
    IsUserLocked bool
    Flag indicating whether or not the user is locked out.
    Id string
    The provider-assigned unique ID for this managed resource.
    IsEmailVerified bool
    Flag indicating whether or not the users email has been verified.
    IsImportedFromIdentityProvider bool
    Flag indicating whether or not the user was imported from an identity provider.
    IsPasswordExpired bool
    Flag indicating whether or not the users password has expired.
    IsTwoFactorAuthEnabled bool
    Flag indicating whether or not two-factor authentication is enabled for the user.
    IsUserLocked bool
    Flag indicating whether or not the user is locked out.
    id String
    The provider-assigned unique ID for this managed resource.
    isEmailVerified Boolean
    Flag indicating whether or not the users email has been verified.
    isImportedFromIdentityProvider Boolean
    Flag indicating whether or not the user was imported from an identity provider.
    isPasswordExpired Boolean
    Flag indicating whether or not the users password has expired.
    isTwoFactorAuthEnabled Boolean
    Flag indicating whether or not two-factor authentication is enabled for the user.
    isUserLocked Boolean
    Flag indicating whether or not the user is locked out.
    id string
    The provider-assigned unique ID for this managed resource.
    isEmailVerified boolean
    Flag indicating whether or not the users email has been verified.
    isImportedFromIdentityProvider boolean
    Flag indicating whether or not the user was imported from an identity provider.
    isPasswordExpired boolean
    Flag indicating whether or not the users password has expired.
    isTwoFactorAuthEnabled boolean
    Flag indicating whether or not two-factor authentication is enabled for the user.
    isUserLocked boolean
    Flag indicating whether or not the user is locked out.
    id str
    The provider-assigned unique ID for this managed resource.
    is_email_verified bool
    Flag indicating whether or not the users email has been verified.
    is_imported_from_identity_provider bool
    Flag indicating whether or not the user was imported from an identity provider.
    is_password_expired bool
    Flag indicating whether or not the users password has expired.
    is_two_factor_auth_enabled bool
    Flag indicating whether or not two-factor authentication is enabled for the user.
    is_user_locked bool
    Flag indicating whether or not the user is locked out.
    id String
    The provider-assigned unique ID for this managed resource.
    isEmailVerified Boolean
    Flag indicating whether or not the users email has been verified.
    isImportedFromIdentityProvider Boolean
    Flag indicating whether or not the user was imported from an identity provider.
    isPasswordExpired Boolean
    Flag indicating whether or not the users password has expired.
    isTwoFactorAuthEnabled Boolean
    Flag indicating whether or not two-factor authentication is enabled for the user.
    isUserLocked Boolean
    Flag indicating whether or not the user is locked out.

    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,
            email: Optional[str] = None,
            group_ids: Optional[Sequence[str]] = None,
            is_email_verified: Optional[bool] = None,
            is_imported_from_identity_provider: Optional[bool] = None,
            is_password_expired: Optional[bool] = None,
            is_two_factor_auth_enabled: Optional[bool] = None,
            is_user_locked: Optional[bool] = None,
            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)
    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:
    Email string
    The email of the user.
    GroupIds List<string>
    The groups the user belongs to. This is only used during the creation of the user. The groups are not updated after the user is created. When using this option you should also set lifecycle = { ignore_changes = ["group_ids"] }.
    IsEmailVerified bool
    Flag indicating whether or not the users email has been verified.
    IsImportedFromIdentityProvider bool
    Flag indicating whether or not the user was imported from an identity provider.
    IsPasswordExpired bool
    Flag indicating whether or not the users password has expired.
    IsTwoFactorAuthEnabled bool
    Flag indicating whether or not two-factor authentication is enabled for the user.
    IsUserLocked bool
    Flag indicating whether or not the user is locked out.
    Name string
    The name of the user.
    Email string
    The email of the user.
    GroupIds []string
    The groups the user belongs to. This is only used during the creation of the user. The groups are not updated after the user is created. When using this option you should also set lifecycle = { ignore_changes = ["group_ids"] }.
    IsEmailVerified bool
    Flag indicating whether or not the users email has been verified.
    IsImportedFromIdentityProvider bool
    Flag indicating whether or not the user was imported from an identity provider.
    IsPasswordExpired bool
    Flag indicating whether or not the users password has expired.
    IsTwoFactorAuthEnabled bool
    Flag indicating whether or not two-factor authentication is enabled for the user.
    IsUserLocked bool
    Flag indicating whether or not the user is locked out.
    Name string
    The name of the user.
    email String
    The email of the user.
    groupIds List<String>
    The groups the user belongs to. This is only used during the creation of the user. The groups are not updated after the user is created. When using this option you should also set lifecycle = { ignore_changes = ["group_ids"] }.
    isEmailVerified Boolean
    Flag indicating whether or not the users email has been verified.
    isImportedFromIdentityProvider Boolean
    Flag indicating whether or not the user was imported from an identity provider.
    isPasswordExpired Boolean
    Flag indicating whether or not the users password has expired.
    isTwoFactorAuthEnabled Boolean
    Flag indicating whether or not two-factor authentication is enabled for the user.
    isUserLocked Boolean
    Flag indicating whether or not the user is locked out.
    name String
    The name of the user.
    email string
    The email of the user.
    groupIds string[]
    The groups the user belongs to. This is only used during the creation of the user. The groups are not updated after the user is created. When using this option you should also set lifecycle = { ignore_changes = ["group_ids"] }.
    isEmailVerified boolean
    Flag indicating whether or not the users email has been verified.
    isImportedFromIdentityProvider boolean
    Flag indicating whether or not the user was imported from an identity provider.
    isPasswordExpired boolean
    Flag indicating whether or not the users password has expired.
    isTwoFactorAuthEnabled boolean
    Flag indicating whether or not two-factor authentication is enabled for the user.
    isUserLocked boolean
    Flag indicating whether or not the user is locked out.
    name string
    The name of the user.
    email str
    The email of the user.
    group_ids Sequence[str]
    The groups the user belongs to. This is only used during the creation of the user. The groups are not updated after the user is created. When using this option you should also set lifecycle = { ignore_changes = ["group_ids"] }.
    is_email_verified bool
    Flag indicating whether or not the users email has been verified.
    is_imported_from_identity_provider bool
    Flag indicating whether or not the user was imported from an identity provider.
    is_password_expired bool
    Flag indicating whether or not the users password has expired.
    is_two_factor_auth_enabled bool
    Flag indicating whether or not two-factor authentication is enabled for the user.
    is_user_locked bool
    Flag indicating whether or not the user is locked out.
    name str
    The name of the user.
    email String
    The email of the user.
    groupIds List<String>
    The groups the user belongs to. This is only used during the creation of the user. The groups are not updated after the user is created. When using this option you should also set lifecycle = { ignore_changes = ["group_ids"] }.
    isEmailVerified Boolean
    Flag indicating whether or not the users email has been verified.
    isImportedFromIdentityProvider Boolean
    Flag indicating whether or not the user was imported from an identity provider.
    isPasswordExpired Boolean
    Flag indicating whether or not the users password has expired.
    isTwoFactorAuthEnabled Boolean
    Flag indicating whether or not two-factor authentication is enabled for the user.
    isUserLocked Boolean
    Flag indicating whether or not the user is locked out.
    name String
    The name of the user.

    Import

    Import using the email address of the user

     $ pulumi import harness:index/user:User john_doe john.doe@example.com
    

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

    Package Details

    Repository
    harness lbrlabs/pulumi-harness
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the harness Terraform Provider.
    harness logo
    Harness v0.0.6 published on Saturday, Jul 1, 2023 by lbrlabs