1. Packages
  2. Harbor
  3. API Docs
  4. User
Harbor v3.9.1 published on Tuesday, May 30, 2023 by Pulumiverse

harbor.User

Explore with Pulumi AI

harbor logo
Harbor v3.9.1 published on Tuesday, May 30, 2023 by Pulumiverse

    Import

    An internal user harbor user can be imported using the user id eg, `

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

    `

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Harbor = Pulumiverse.Harbor;
    
    return await Deployment.RunAsync(() => 
    {
        var main = new Harbor.User("main", new()
        {
            Email = "john@smith.com",
            FullName = "John Smith",
            Password = "Password12345!",
            Username = "john",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-harbor/sdk/v3/go/harbor"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := harbor.NewUser(ctx, "main", &harbor.UserArgs{
    			Email:    pulumi.String("john@smith.com"),
    			FullName: pulumi.String("John Smith"),
    			Password: pulumi.String("Password12345!"),
    			Username: pulumi.String("john"),
    		})
    		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.harbor.User;
    import com.pulumi.harbor.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 main = new User("main", UserArgs.builder()        
                .email("john@smith.com")
                .fullName("John Smith")
                .password("Password12345!")
                .username("john")
                .build());
    
        }
    }
    
    import pulumi
    import pulumiverse_harbor as harbor
    
    main = harbor.User("main",
        email="john@smith.com",
        full_name="John Smith",
        password="Password12345!",
        username="john")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as harbor from "@pulumiverse/harbor";
    
    const main = new harbor.User("main", {
        email: "john@smith.com",
        fullName: "John Smith",
        password: "Password12345!",
        username: "john",
    });
    
    resources:
      main:
        type: harbor:User
        properties:
          email: john@smith.com
          fullName: John Smith
          password: Password12345!
          username: john
    

    Create User Resource

    new User(name: string, args: UserArgs, opts?: CustomResourceOptions);
    @overload
    def User(resource_name: 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)
    @overload
    def User(resource_name: str,
             args: UserArgs,
             opts: Optional[ResourceOptions] = 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.
    
    
    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.

    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
    FullName string
    Password string
    Username string
    Admin bool
    Comment string
    Email string
    FullName string
    Password string
    Username string
    Admin bool
    Comment string
    email String
    fullName String
    password String
    username String
    admin Boolean
    comment String
    email string
    fullName string
    password string
    username string
    admin boolean
    comment string
    email String
    fullName String
    password String
    username String
    admin Boolean
    comment String

    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
    Comment string
    Email string
    FullName string
    Password string
    Username string
    Admin bool
    Comment string
    Email string
    FullName string
    Password string
    Username string
    admin Boolean
    comment String
    email String
    fullName String
    password String
    username String
    admin boolean
    comment string
    email string
    fullName string
    password string
    username string
    admin Boolean
    comment String
    email String
    fullName String
    password String
    username String

    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.9.1 published on Tuesday, May 30, 2023 by Pulumiverse