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

harbor.ProjectMemberUser

Explore with Pulumi AI

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

    Import

    Harbor project member user can be imported using the project id and member id eg, `

     $ pulumi import harbor:index/projectMemberUser:ProjectMemberUser main /projects/10/members/200
    

    `

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Harbor = Pulumiverse.Harbor;
    
    return await Deployment.RunAsync(() => 
    {
        var mainProject = new Harbor.Project("mainProject");
    
        var mainProjectMemberUser = new Harbor.ProjectMemberUser("mainProjectMemberUser", new()
        {
            ProjectId = mainProject.Id,
            UserName = "testing1",
            Role = "projectadmin",
        });
    
    });
    
    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 {
    		mainProject, err := harbor.NewProject(ctx, "mainProject", nil)
    		if err != nil {
    			return err
    		}
    		_, err = harbor.NewProjectMemberUser(ctx, "mainProjectMemberUser", &harbor.ProjectMemberUserArgs{
    			ProjectId: mainProject.ID(),
    			UserName:  pulumi.String("testing1"),
    			Role:      pulumi.String("projectadmin"),
    		})
    		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.Project;
    import com.pulumi.harbor.ProjectMemberUser;
    import com.pulumi.harbor.ProjectMemberUserArgs;
    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 mainProject = new Project("mainProject");
    
            var mainProjectMemberUser = new ProjectMemberUser("mainProjectMemberUser", ProjectMemberUserArgs.builder()        
                .projectId(mainProject.id())
                .userName("testing1")
                .role("projectadmin")
                .build());
    
        }
    }
    
    import pulumi
    import pulumiverse_harbor as harbor
    
    main_project = harbor.Project("mainProject")
    main_project_member_user = harbor.ProjectMemberUser("mainProjectMemberUser",
        project_id=main_project.id,
        user_name="testing1",
        role="projectadmin")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as harbor from "@pulumiverse/harbor";
    
    const mainProject = new harbor.Project("mainProject", {});
    const mainProjectMemberUser = new harbor.ProjectMemberUser("mainProjectMemberUser", {
        projectId: mainProject.id,
        userName: "testing1",
        role: "projectadmin",
    });
    
    resources:
      mainProject:
        type: harbor:Project
      mainProjectMemberUser:
        type: harbor:ProjectMemberUser
        properties:
          projectId: ${mainProject.id}
          userName: testing1
          role: projectadmin
    

    Create ProjectMemberUser Resource

    new ProjectMemberUser(name: string, args: ProjectMemberUserArgs, opts?: CustomResourceOptions);
    @overload
    def ProjectMemberUser(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          project_id: Optional[str] = None,
                          role: Optional[str] = None,
                          user_name: Optional[str] = None)
    @overload
    def ProjectMemberUser(resource_name: str,
                          args: ProjectMemberUserArgs,
                          opts: Optional[ResourceOptions] = None)
    func NewProjectMemberUser(ctx *Context, name string, args ProjectMemberUserArgs, opts ...ResourceOption) (*ProjectMemberUser, error)
    public ProjectMemberUser(string name, ProjectMemberUserArgs args, CustomResourceOptions? opts = null)
    public ProjectMemberUser(String name, ProjectMemberUserArgs args)
    public ProjectMemberUser(String name, ProjectMemberUserArgs args, CustomResourceOptions options)
    
    type: harbor:ProjectMemberUser
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args ProjectMemberUserArgs
    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 ProjectMemberUserArgs
    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 ProjectMemberUserArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ProjectMemberUserArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ProjectMemberUserArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    ProjectMemberUser 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 ProjectMemberUser resource accepts the following input properties:

    ProjectId string
    Role string
    UserName string
    ProjectId string
    Role string
    UserName string
    projectId String
    role String
    userName String
    projectId string
    role string
    userName string
    projectId String
    role String
    userName String

    Outputs

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

    Id string

    The provider-assigned unique ID for this managed resource.

    MemberId int
    Id string

    The provider-assigned unique ID for this managed resource.

    MemberId int
    id String

    The provider-assigned unique ID for this managed resource.

    memberId Integer
    id string

    The provider-assigned unique ID for this managed resource.

    memberId number
    id str

    The provider-assigned unique ID for this managed resource.

    member_id int
    id String

    The provider-assigned unique ID for this managed resource.

    memberId Number

    Look up Existing ProjectMemberUser Resource

    Get an existing ProjectMemberUser 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?: ProjectMemberUserState, opts?: CustomResourceOptions): ProjectMemberUser
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            member_id: Optional[int] = None,
            project_id: Optional[str] = None,
            role: Optional[str] = None,
            user_name: Optional[str] = None) -> ProjectMemberUser
    func GetProjectMemberUser(ctx *Context, name string, id IDInput, state *ProjectMemberUserState, opts ...ResourceOption) (*ProjectMemberUser, error)
    public static ProjectMemberUser Get(string name, Input<string> id, ProjectMemberUserState? state, CustomResourceOptions? opts = null)
    public static ProjectMemberUser get(String name, Output<String> id, ProjectMemberUserState 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:
    MemberId int
    ProjectId string
    Role string
    UserName string
    MemberId int
    ProjectId string
    Role string
    UserName string
    memberId Integer
    projectId String
    role String
    userName String
    memberId number
    projectId string
    role string
    userName string
    memberId Number
    projectId String
    role 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