1. Packages
  2. Vercel Provider
  3. API Docs
  4. ProjectMembers
Vercel v3.1.2 published on Tuesday, May 13, 2025 by Pulumiverse

vercel.ProjectMembers

Explore with Pulumi AI

vercel logo
Vercel v3.1.2 published on Tuesday, May 13, 2025 by Pulumiverse

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vercel from "@pulumiverse/vercel";
    
    const example = new vercel.Project("example", {name: "example-with-members"});
    const exampleProjectMembers = new vercel.ProjectMembers("example", {
        projectId: example.id,
        members: [
            {
                email: "user@example.com",
                role: "PROJECT_VIEWER",
            },
            {
                username: "some-example-user",
                role: "PROJECT_DEVELOPER",
            },
        ],
    });
    
    import pulumi
    import pulumiverse_vercel as vercel
    
    example = vercel.Project("example", name="example-with-members")
    example_project_members = vercel.ProjectMembers("example",
        project_id=example.id,
        members=[
            {
                "email": "user@example.com",
                "role": "PROJECT_VIEWER",
            },
            {
                "username": "some-example-user",
                "role": "PROJECT_DEVELOPER",
            },
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-vercel/sdk/v3/go/vercel"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := vercel.NewProject(ctx, "example", &vercel.ProjectArgs{
    			Name: pulumi.String("example-with-members"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = vercel.NewProjectMembers(ctx, "example", &vercel.ProjectMembersArgs{
    			ProjectId: example.ID(),
    			Members: vercel.ProjectMembersMemberArray{
    				&vercel.ProjectMembersMemberArgs{
    					Email: pulumi.String("user@example.com"),
    					Role:  pulumi.String("PROJECT_VIEWER"),
    				},
    				&vercel.ProjectMembersMemberArgs{
    					Username: pulumi.String("some-example-user"),
    					Role:     pulumi.String("PROJECT_DEVELOPER"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vercel = Pulumiverse.Vercel;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Vercel.Project("example", new()
        {
            Name = "example-with-members",
        });
    
        var exampleProjectMembers = new Vercel.ProjectMembers("example", new()
        {
            ProjectId = example.Id,
            Members = new[]
            {
                new Vercel.Inputs.ProjectMembersMemberArgs
                {
                    Email = "user@example.com",
                    Role = "PROJECT_VIEWER",
                },
                new Vercel.Inputs.ProjectMembersMemberArgs
                {
                    Username = "some-example-user",
                    Role = "PROJECT_DEVELOPER",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vercel.Project;
    import com.pulumi.vercel.ProjectArgs;
    import com.pulumi.vercel.ProjectMembers;
    import com.pulumi.vercel.ProjectMembersArgs;
    import com.pulumi.vercel.inputs.ProjectMembersMemberArgs;
    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 example = new Project("example", ProjectArgs.builder()
                .name("example-with-members")
                .build());
    
            var exampleProjectMembers = new ProjectMembers("exampleProjectMembers", ProjectMembersArgs.builder()
                .projectId(example.id())
                .members(            
                    ProjectMembersMemberArgs.builder()
                        .email("user@example.com")
                        .role("PROJECT_VIEWER")
                        .build(),
                    ProjectMembersMemberArgs.builder()
                        .username("some-example-user")
                        .role("PROJECT_DEVELOPER")
                        .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: vercel:Project
        properties:
          name: example-with-members
      exampleProjectMembers:
        type: vercel:ProjectMembers
        name: example
        properties:
          projectId: ${example.id}
          members:
            - email: user@example.com
              role: PROJECT_VIEWER
            - username: some-example-user
              role: PROJECT_DEVELOPER
    

    Create ProjectMembers Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ProjectMembers(name: string, args: ProjectMembersArgs, opts?: CustomResourceOptions);
    @overload
    def ProjectMembers(resource_name: str,
                       args: ProjectMembersArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def ProjectMembers(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       members: Optional[Sequence[ProjectMembersMemberArgs]] = None,
                       project_id: Optional[str] = None,
                       team_id: Optional[str] = None)
    func NewProjectMembers(ctx *Context, name string, args ProjectMembersArgs, opts ...ResourceOption) (*ProjectMembers, error)
    public ProjectMembers(string name, ProjectMembersArgs args, CustomResourceOptions? opts = null)
    public ProjectMembers(String name, ProjectMembersArgs args)
    public ProjectMembers(String name, ProjectMembersArgs args, CustomResourceOptions options)
    
    type: vercel:ProjectMembers
    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 ProjectMembersArgs
    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 ProjectMembersArgs
    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 ProjectMembersArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ProjectMembersArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ProjectMembersArgs
    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 projectMembersResource = new Vercel.ProjectMembers("projectMembersResource", new()
    {
        Members = new[]
        {
            new Vercel.Inputs.ProjectMembersMemberArgs
            {
                Role = "string",
                Email = "string",
                UserId = "string",
                Username = "string",
            },
        },
        ProjectId = "string",
        TeamId = "string",
    });
    
    example, err := vercel.NewProjectMembers(ctx, "projectMembersResource", &vercel.ProjectMembersArgs{
    	Members: vercel.ProjectMembersMemberArray{
    		&vercel.ProjectMembersMemberArgs{
    			Role:     pulumi.String("string"),
    			Email:    pulumi.String("string"),
    			UserId:   pulumi.String("string"),
    			Username: pulumi.String("string"),
    		},
    	},
    	ProjectId: pulumi.String("string"),
    	TeamId:    pulumi.String("string"),
    })
    
    var projectMembersResource = new ProjectMembers("projectMembersResource", ProjectMembersArgs.builder()
        .members(ProjectMembersMemberArgs.builder()
            .role("string")
            .email("string")
            .userId("string")
            .username("string")
            .build())
        .projectId("string")
        .teamId("string")
        .build());
    
    project_members_resource = vercel.ProjectMembers("projectMembersResource",
        members=[{
            "role": "string",
            "email": "string",
            "user_id": "string",
            "username": "string",
        }],
        project_id="string",
        team_id="string")
    
    const projectMembersResource = new vercel.ProjectMembers("projectMembersResource", {
        members: [{
            role: "string",
            email: "string",
            userId: "string",
            username: "string",
        }],
        projectId: "string",
        teamId: "string",
    });
    
    type: vercel:ProjectMembers
    properties:
        members:
            - email: string
              role: string
              userId: string
              username: string
        projectId: string
        teamId: string
    

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

    Members List<Pulumiverse.Vercel.Inputs.ProjectMembersMember>
    The set of members to manage for this project.
    ProjectId string
    The ID of the existing Vercel Project.
    TeamId string
    The team ID to add the project to. Required when configuring a team resource if a default team has not been set in the provider.
    Members []ProjectMembersMemberArgs
    The set of members to manage for this project.
    ProjectId string
    The ID of the existing Vercel Project.
    TeamId string
    The team ID to add the project to. Required when configuring a team resource if a default team has not been set in the provider.
    members List<ProjectMembersMember>
    The set of members to manage for this project.
    projectId String
    The ID of the existing Vercel Project.
    teamId String
    The team ID to add the project to. Required when configuring a team resource if a default team has not been set in the provider.
    members ProjectMembersMember[]
    The set of members to manage for this project.
    projectId string
    The ID of the existing Vercel Project.
    teamId string
    The team ID to add the project to. Required when configuring a team resource if a default team has not been set in the provider.
    members Sequence[ProjectMembersMemberArgs]
    The set of members to manage for this project.
    project_id str
    The ID of the existing Vercel Project.
    team_id str
    The team ID to add the project to. Required when configuring a team resource if a default team has not been set in the provider.
    members List<Property Map>
    The set of members to manage for this project.
    projectId String
    The ID of the existing Vercel Project.
    teamId String
    The team ID to add the project to. Required when configuring a team resource if a default team has not been set in the provider.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ProjectMembers 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 ProjectMembers Resource

    Get an existing ProjectMembers 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?: ProjectMembersState, opts?: CustomResourceOptions): ProjectMembers
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            members: Optional[Sequence[ProjectMembersMemberArgs]] = None,
            project_id: Optional[str] = None,
            team_id: Optional[str] = None) -> ProjectMembers
    func GetProjectMembers(ctx *Context, name string, id IDInput, state *ProjectMembersState, opts ...ResourceOption) (*ProjectMembers, error)
    public static ProjectMembers Get(string name, Input<string> id, ProjectMembersState? state, CustomResourceOptions? opts = null)
    public static ProjectMembers get(String name, Output<String> id, ProjectMembersState state, CustomResourceOptions options)
    resources:  _:    type: vercel:ProjectMembers    get:      id: ${id}
    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:
    Members List<Pulumiverse.Vercel.Inputs.ProjectMembersMember>
    The set of members to manage for this project.
    ProjectId string
    The ID of the existing Vercel Project.
    TeamId string
    The team ID to add the project to. Required when configuring a team resource if a default team has not been set in the provider.
    Members []ProjectMembersMemberArgs
    The set of members to manage for this project.
    ProjectId string
    The ID of the existing Vercel Project.
    TeamId string
    The team ID to add the project to. Required when configuring a team resource if a default team has not been set in the provider.
    members List<ProjectMembersMember>
    The set of members to manage for this project.
    projectId String
    The ID of the existing Vercel Project.
    teamId String
    The team ID to add the project to. Required when configuring a team resource if a default team has not been set in the provider.
    members ProjectMembersMember[]
    The set of members to manage for this project.
    projectId string
    The ID of the existing Vercel Project.
    teamId string
    The team ID to add the project to. Required when configuring a team resource if a default team has not been set in the provider.
    members Sequence[ProjectMembersMemberArgs]
    The set of members to manage for this project.
    project_id str
    The ID of the existing Vercel Project.
    team_id str
    The team ID to add the project to. Required when configuring a team resource if a default team has not been set in the provider.
    members List<Property Map>
    The set of members to manage for this project.
    projectId String
    The ID of the existing Vercel Project.
    teamId String
    The team ID to add the project to. Required when configuring a team resource if a default team has not been set in the provider.

    Supporting Types

    ProjectMembersMember, ProjectMembersMemberArgs

    Role string
    The role that the user should have in the project. One of 'MEMBER', 'PROJECTDEVELOPER', or 'PROJECTVIEWER'.
    Email string
    The email of the user to add to the project. Exactly one of user_id, email, or username must be specified.
    UserId string
    The ID of the user to add to the project. Exactly one of user_id, email, or username must be specified.
    Username string
    The username of the user to add to the project. Exactly one of user_id, email, or username must be specified.
    Role string
    The role that the user should have in the project. One of 'MEMBER', 'PROJECTDEVELOPER', or 'PROJECTVIEWER'.
    Email string
    The email of the user to add to the project. Exactly one of user_id, email, or username must be specified.
    UserId string
    The ID of the user to add to the project. Exactly one of user_id, email, or username must be specified.
    Username string
    The username of the user to add to the project. Exactly one of user_id, email, or username must be specified.
    role String
    The role that the user should have in the project. One of 'MEMBER', 'PROJECTDEVELOPER', or 'PROJECTVIEWER'.
    email String
    The email of the user to add to the project. Exactly one of user_id, email, or username must be specified.
    userId String
    The ID of the user to add to the project. Exactly one of user_id, email, or username must be specified.
    username String
    The username of the user to add to the project. Exactly one of user_id, email, or username must be specified.
    role string
    The role that the user should have in the project. One of 'MEMBER', 'PROJECTDEVELOPER', or 'PROJECTVIEWER'.
    email string
    The email of the user to add to the project. Exactly one of user_id, email, or username must be specified.
    userId string
    The ID of the user to add to the project. Exactly one of user_id, email, or username must be specified.
    username string
    The username of the user to add to the project. Exactly one of user_id, email, or username must be specified.
    role str
    The role that the user should have in the project. One of 'MEMBER', 'PROJECTDEVELOPER', or 'PROJECTVIEWER'.
    email str
    The email of the user to add to the project. Exactly one of user_id, email, or username must be specified.
    user_id str
    The ID of the user to add to the project. Exactly one of user_id, email, or username must be specified.
    username str
    The username of the user to add to the project. Exactly one of user_id, email, or username must be specified.
    role String
    The role that the user should have in the project. One of 'MEMBER', 'PROJECTDEVELOPER', or 'PROJECTVIEWER'.
    email String
    The email of the user to add to the project. Exactly one of user_id, email, or username must be specified.
    userId String
    The ID of the user to add to the project. Exactly one of user_id, email, or username must be specified.
    username String
    The username of the user to add to the project. Exactly one of user_id, email, or username must be specified.

    Package Details

    Repository
    vercel pulumiverse/pulumi-vercel
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the vercel Terraform Provider.
    vercel logo
    Vercel v3.1.2 published on Tuesday, May 13, 2025 by Pulumiverse