1. Packages
  2. Harbor
  3. API Docs
  4. User
Harbor v3.10.15 published on Saturday, Sep 28, 2024 by Pulumiverse

harbor.User

Explore with Pulumi AI

harbor logo
Harbor v3.10.15 published on Saturday, Sep 28, 2024 by Pulumiverse

    Example Usage

    resource "harbor_user" "main" {
      username = "john"
      password = "Password12345!"
      full_name = "John Smith"
      email = "john@smith.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,
             full_name: Optional[str] = None,
             password: Optional[str] = None,
             username: Optional[str] = None,
             admin: Optional[bool] = None,
             comment: 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: harbor: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 Harbor.User("userResource", new()
    {
        Email = "string",
        FullName = "string",
        Password = "string",
        Username = "string",
        Admin = false,
        Comment = "string",
    });
    
    example, err := harbor.NewUser(ctx, "userResource", &harbor.UserArgs{
    	Email:    pulumi.String("string"),
    	FullName: pulumi.String("string"),
    	Password: pulumi.String("string"),
    	Username: pulumi.String("string"),
    	Admin:    pulumi.Bool(false),
    	Comment:  pulumi.String("string"),
    })
    
    var userResource = new User("userResource", UserArgs.builder()
        .email("string")
        .fullName("string")
        .password("string")
        .username("string")
        .admin(false)
        .comment("string")
        .build());
    
    user_resource = harbor.User("userResource",
        email="string",
        full_name="string",
        password="string",
        username="string",
        admin=False,
        comment="string")
    
    const userResource = new harbor.User("userResource", {
        email: "string",
        fullName: "string",
        password: "string",
        username: "string",
        admin: false,
        comment: "string",
    });
    
    type: harbor:User
    properties:
        admin: false
        comment: string
        email: string
        fullName: string
        password: string
        username: 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 address of the internal user.
    FullName string
    The Full Name of the internal user.
    Password string
    The password for the internal user.
    Username string
    The username of the internal user.
    Admin bool
    If the user will have admin rights within Harbor (Default: false)
    Comment string
    Any comments for that are need for the internal user.
    Email string
    The email address of the internal user.
    FullName string
    The Full Name of the internal user.
    Password string
    The password for the internal user.
    Username string
    The username of the internal user.
    Admin bool
    If the user will have admin rights within Harbor (Default: false)
    Comment string
    Any comments for that are need for the internal user.
    email String
    The email address of the internal user.
    fullName String
    The Full Name of the internal user.
    password String
    The password for the internal user.
    username String
    The username of the internal user.
    admin Boolean
    If the user will have admin rights within Harbor (Default: false)
    comment String
    Any comments for that are need for the internal user.
    email string
    The email address of the internal user.
    fullName string
    The Full Name of the internal user.
    password string
    The password for the internal user.
    username string
    The username of the internal user.
    admin boolean
    If the user will have admin rights within Harbor (Default: false)
    comment string
    Any comments for that are need for the internal user.
    email str
    The email address of the internal user.
    full_name str
    The Full Name of the internal user.
    password str
    The password for the internal user.
    username str
    The username of the internal user.
    admin bool
    If the user will have admin rights within Harbor (Default: false)
    comment str
    Any comments for that are need for the internal user.
    email String
    The email address of the internal user.
    fullName String
    The Full Name of the internal user.
    password String
    The password for the internal user.
    username String
    The username of the internal user.
    admin Boolean
    If the user will have admin rights within Harbor (Default: false)
    comment String
    Any comments for that are need for the internal 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.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    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,
            admin: Optional[bool] = None,
            comment: Optional[str] = None,
            email: Optional[str] = None,
            full_name: Optional[str] = None,
            password: Optional[str] = None,
            username: 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:
    Admin bool
    If the user will have admin rights within Harbor (Default: false)
    Comment string
    Any comments for that are need for the internal user.
    Email string
    The email address of the internal user.
    FullName string
    The Full Name of the internal user.
    Password string
    The password for the internal user.
    Username string
    The username of the internal user.
    Admin bool
    If the user will have admin rights within Harbor (Default: false)
    Comment string
    Any comments for that are need for the internal user.
    Email string
    The email address of the internal user.
    FullName string
    The Full Name of the internal user.
    Password string
    The password for the internal user.
    Username string
    The username of the internal user.
    admin Boolean
    If the user will have admin rights within Harbor (Default: false)
    comment String
    Any comments for that are need for the internal user.
    email String
    The email address of the internal user.
    fullName String
    The Full Name of the internal user.
    password String
    The password for the internal user.
    username String
    The username of the internal user.
    admin boolean
    If the user will have admin rights within Harbor (Default: false)
    comment string
    Any comments for that are need for the internal user.
    email string
    The email address of the internal user.
    fullName string
    The Full Name of the internal user.
    password string
    The password for the internal user.
    username string
    The username of the internal user.
    admin bool
    If the user will have admin rights within Harbor (Default: false)
    comment str
    Any comments for that are need for the internal user.
    email str
    The email address of the internal user.
    full_name str
    The Full Name of the internal user.
    password str
    The password for the internal user.
    username str
    The username of the internal user.
    admin Boolean
    If the user will have admin rights within Harbor (Default: false)
    comment String
    Any comments for that are need for the internal user.
    email String
    The email address of the internal user.
    fullName String
    The Full Name of the internal user.
    password String
    The password for the internal user.
    username String
    The username of the internal user.

    Import

    $ pulumi import harbor:index/user:User main /users/19
    

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

    Package Details

    Repository
    harbor pulumiverse/pulumi-harbor
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the harbor Terraform Provider.
    harbor logo
    Harbor v3.10.15 published on Saturday, Sep 28, 2024 by Pulumiverse