1. Packages
  2. Equinix
  3. API Docs
  4. metal
  5. OrganizationMember
Equinix v0.10.0 published on Wednesday, May 22, 2024 by Equinix

equinix.metal.OrganizationMember

Explore with Pulumi AI

equinix logo
Equinix v0.10.0 published on Wednesday, May 22, 2024 by Equinix

    Manage the membership of existing and new invitees within an Equinix Metal organization and its projects.

    Example Usage

    using System.Collections.Generic;
    using Pulumi;
    using Equinix = Pulumi.Equinix;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var organizationId = config.Require("organizationId");
        var projectId = config.Require("projectId");
        var userEmailAddress = config.Require("userEmailAddress");
        var member = new Equinix.Metal.OrganizationMember("member", new()
        {
            Invitee = userEmailAddress,
            Roles = new[]
            {
                "limited_collaborator",
            },
            ProjectsIds = new[]
            {
                projectId,
            },
            OrganizationId = organizationId,
        });
    
        return new Dictionary<string, object?>
        {
            ["memberId"] = member.Id,
            ["memberState"] = member.State,
        };
    });
    
    package main
    
    import (
    	"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		organizationId := cfg.Require("organizationId")
    		projectId := cfg.Require("projectId")
    		userEmailAddress := cfg.Require("userEmailAddress")
    		member, err := metal.NewOrganizationMember(ctx, "member", &metal.OrganizationMemberArgs{
    			Invitee: pulumi.String(userEmailAddress),
    			Roles: pulumi.StringArray{
    				pulumi.String("limited_collaborator"),
    			},
    			ProjectsIds: pulumi.StringArray{
    				pulumi.String(projectId),
    			},
    			OrganizationId: pulumi.String(organizationId),
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("memberId", member.ID())
    		ctx.Export("memberState", member.State)
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.equinix.pulumi.metal.OrganizationMember;
    import com.equinix.pulumi.metal.OrganizationMemberArgs;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var config = ctx.config();
            final var organizationId = config.get("organizationId").get();
            final var projectId = config.get("projectId").get();
            final var userEmailAddress = config.get("userEmailAddress").get();
            var member = new OrganizationMember("member", OrganizationMemberArgs.builder()        
                .invitee(userEmailAddress)
                .roles("limited_collaborator")
                .projectsIds(projectId)
                .organizationId(organizationId)
                .build());
    
            ctx.export("memberId", member.id());
            ctx.export("memberState", member.state());
        }
    }
    
    import pulumi
    import pulumi_equinix as equinix
    
    config = pulumi.Config()
    organization_id = config.require("organizationId")
    project_id = config.require("projectId")
    user_email_address = config.require("userEmailAddress")
    member = equinix.metal.OrganizationMember("member",
        invitee=user_email_address,
        roles=["limited_collaborator"],
        projects_ids=[project_id],
        organization_id=organization_id)
    pulumi.export("memberId", member.id)
    pulumi.export("memberState", member.state)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as equinix from "@equinix-labs/pulumi-equinix";
    
    const config = new pulumi.Config();
    const organizationId = config.require("organizationId");
    const projectId = config.require("projectId");
    const userEmailAddress = config.require("userEmailAddress");
    const member = new equinix.metal.OrganizationMember("member", {
        invitee: userEmailAddress,
        roles: ["limited_collaborator"],
        projectsIds: [projectId],
        organizationId: organizationId,
    });
    export const memberId = member.id;
    export const memberState = member.state;
    
    config:
      organizationId:
        type: string
      projectId:
        type: string
      userEmailAddress:
        type: string
    resources:
      member:
        type: equinix:metal:OrganizationMember
        properties:
          invitee: ${userEmailAddress}
          roles:
          - limited_collaborator
          projectsIds:
          - ${projectId}
          organizationId: ${organizationId}
    outputs:
      memberId: ${member.id}
      memberState: ${member.state}
    

    Create OrganizationMember Resource

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

    Constructor syntax

    new OrganizationMember(name: string, args: OrganizationMemberArgs, opts?: CustomResourceOptions);
    @overload
    def OrganizationMember(resource_name: str,
                           args: OrganizationMemberArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def OrganizationMember(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           invitee: Optional[str] = None,
                           organization_id: Optional[str] = None,
                           projects_ids: Optional[Sequence[str]] = None,
                           roles: Optional[Sequence[str]] = None,
                           message: Optional[str] = None)
    func NewOrganizationMember(ctx *Context, name string, args OrganizationMemberArgs, opts ...ResourceOption) (*OrganizationMember, error)
    public OrganizationMember(string name, OrganizationMemberArgs args, CustomResourceOptions? opts = null)
    public OrganizationMember(String name, OrganizationMemberArgs args)
    public OrganizationMember(String name, OrganizationMemberArgs args, CustomResourceOptions options)
    
    type: equinix:metal:OrganizationMember
    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 OrganizationMemberArgs
    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 OrganizationMemberArgs
    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 OrganizationMemberArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args OrganizationMemberArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args OrganizationMemberArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var organizationMemberResource = new Equinix.Metal.OrganizationMember("organizationMemberResource", new()
    {
        Invitee = "string",
        OrganizationId = "string",
        ProjectsIds = new[]
        {
            "string",
        },
        Roles = new[]
        {
            "string",
        },
        Message = "string",
    });
    
    example, err := metal.NewOrganizationMember(ctx, "organizationMemberResource", &metal.OrganizationMemberArgs{
    	Invitee:        pulumi.String("string"),
    	OrganizationId: pulumi.String("string"),
    	ProjectsIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Roles: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Message: pulumi.String("string"),
    })
    
    var organizationMemberResource = new OrganizationMember("organizationMemberResource", OrganizationMemberArgs.builder()        
        .invitee("string")
        .organizationId("string")
        .projectsIds("string")
        .roles("string")
        .message("string")
        .build());
    
    organization_member_resource = equinix.metal.OrganizationMember("organizationMemberResource",
        invitee="string",
        organization_id="string",
        projects_ids=["string"],
        roles=["string"],
        message="string")
    
    const organizationMemberResource = new equinix.metal.OrganizationMember("organizationMemberResource", {
        invitee: "string",
        organizationId: "string",
        projectsIds: ["string"],
        roles: ["string"],
        message: "string",
    });
    
    type: equinix:metal:OrganizationMember
    properties:
        invitee: string
        message: string
        organizationId: string
        projectsIds:
            - string
        roles:
            - string
    

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

    Invitee string
    The email address of the user to invite
    OrganizationId string
    The organization to invite the user to
    ProjectsIds List<string>
    Project IDs the member has access to within the organization. If the member is an 'admin', the projects list should be empty.
    Roles List<string>
    Organization roles (admin, collaborator, limited_collaborator, billing)
    Message string
    A message to include in the emailed invitation.
    Invitee string
    The email address of the user to invite
    OrganizationId string
    The organization to invite the user to
    ProjectsIds []string
    Project IDs the member has access to within the organization. If the member is an 'admin', the projects list should be empty.
    Roles []string
    Organization roles (admin, collaborator, limited_collaborator, billing)
    Message string
    A message to include in the emailed invitation.
    invitee String
    The email address of the user to invite
    organizationId String
    The organization to invite the user to
    projectsIds List<String>
    Project IDs the member has access to within the organization. If the member is an 'admin', the projects list should be empty.
    roles List<String>
    Organization roles (admin, collaborator, limited_collaborator, billing)
    message String
    A message to include in the emailed invitation.
    invitee string
    The email address of the user to invite
    organizationId string
    The organization to invite the user to
    projectsIds string[]
    Project IDs the member has access to within the organization. If the member is an 'admin', the projects list should be empty.
    roles string[]
    Organization roles (admin, collaborator, limited_collaborator, billing)
    message string
    A message to include in the emailed invitation.
    invitee str
    The email address of the user to invite
    organization_id str
    The organization to invite the user to
    projects_ids Sequence[str]
    Project IDs the member has access to within the organization. If the member is an 'admin', the projects list should be empty.
    roles Sequence[str]
    Organization roles (admin, collaborator, limited_collaborator, billing)
    message str
    A message to include in the emailed invitation.
    invitee String
    The email address of the user to invite
    organizationId String
    The organization to invite the user to
    projectsIds List<String>
    Project IDs the member has access to within the organization. If the member is an 'admin', the projects list should be empty.
    roles List<String>
    Organization roles (admin, collaborator, limited_collaborator, billing)
    message String
    A message to include in the emailed invitation.

    Outputs

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

    Created string
    When the invitation was created (only known in the invitation stage)
    Id string
    The provider-assigned unique ID for this managed resource.
    InvitedBy string
    The user_id of the user that sent the invitation (only known in the invitation stage)
    Nonce string
    The nonce for the invitation (only known in the invitation stage)
    State string
    The state of the membership ('invited' when an invitation is open, 'active' when the user is an organization member)
    Updated string
    When the invitation was updated (only known in the invitation stage)
    Created string
    When the invitation was created (only known in the invitation stage)
    Id string
    The provider-assigned unique ID for this managed resource.
    InvitedBy string
    The user_id of the user that sent the invitation (only known in the invitation stage)
    Nonce string
    The nonce for the invitation (only known in the invitation stage)
    State string
    The state of the membership ('invited' when an invitation is open, 'active' when the user is an organization member)
    Updated string
    When the invitation was updated (only known in the invitation stage)
    created String
    When the invitation was created (only known in the invitation stage)
    id String
    The provider-assigned unique ID for this managed resource.
    invitedBy String
    The user_id of the user that sent the invitation (only known in the invitation stage)
    nonce String
    The nonce for the invitation (only known in the invitation stage)
    state String
    The state of the membership ('invited' when an invitation is open, 'active' when the user is an organization member)
    updated String
    When the invitation was updated (only known in the invitation stage)
    created string
    When the invitation was created (only known in the invitation stage)
    id string
    The provider-assigned unique ID for this managed resource.
    invitedBy string
    The user_id of the user that sent the invitation (only known in the invitation stage)
    nonce string
    The nonce for the invitation (only known in the invitation stage)
    state string
    The state of the membership ('invited' when an invitation is open, 'active' when the user is an organization member)
    updated string
    When the invitation was updated (only known in the invitation stage)
    created str
    When the invitation was created (only known in the invitation stage)
    id str
    The provider-assigned unique ID for this managed resource.
    invited_by str
    The user_id of the user that sent the invitation (only known in the invitation stage)
    nonce str
    The nonce for the invitation (only known in the invitation stage)
    state str
    The state of the membership ('invited' when an invitation is open, 'active' when the user is an organization member)
    updated str
    When the invitation was updated (only known in the invitation stage)
    created String
    When the invitation was created (only known in the invitation stage)
    id String
    The provider-assigned unique ID for this managed resource.
    invitedBy String
    The user_id of the user that sent the invitation (only known in the invitation stage)
    nonce String
    The nonce for the invitation (only known in the invitation stage)
    state String
    The state of the membership ('invited' when an invitation is open, 'active' when the user is an organization member)
    updated String
    When the invitation was updated (only known in the invitation stage)

    Look up Existing OrganizationMember Resource

    Get an existing OrganizationMember 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?: OrganizationMemberState, opts?: CustomResourceOptions): OrganizationMember
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created: Optional[str] = None,
            invited_by: Optional[str] = None,
            invitee: Optional[str] = None,
            message: Optional[str] = None,
            nonce: Optional[str] = None,
            organization_id: Optional[str] = None,
            projects_ids: Optional[Sequence[str]] = None,
            roles: Optional[Sequence[str]] = None,
            state: Optional[str] = None,
            updated: Optional[str] = None) -> OrganizationMember
    func GetOrganizationMember(ctx *Context, name string, id IDInput, state *OrganizationMemberState, opts ...ResourceOption) (*OrganizationMember, error)
    public static OrganizationMember Get(string name, Input<string> id, OrganizationMemberState? state, CustomResourceOptions? opts = null)
    public static OrganizationMember get(String name, Output<String> id, OrganizationMemberState 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:
    Created string
    When the invitation was created (only known in the invitation stage)
    InvitedBy string
    The user_id of the user that sent the invitation (only known in the invitation stage)
    Invitee string
    The email address of the user to invite
    Message string
    A message to include in the emailed invitation.
    Nonce string
    The nonce for the invitation (only known in the invitation stage)
    OrganizationId string
    The organization to invite the user to
    ProjectsIds List<string>
    Project IDs the member has access to within the organization. If the member is an 'admin', the projects list should be empty.
    Roles List<string>
    Organization roles (admin, collaborator, limited_collaborator, billing)
    State string
    The state of the membership ('invited' when an invitation is open, 'active' when the user is an organization member)
    Updated string
    When the invitation was updated (only known in the invitation stage)
    Created string
    When the invitation was created (only known in the invitation stage)
    InvitedBy string
    The user_id of the user that sent the invitation (only known in the invitation stage)
    Invitee string
    The email address of the user to invite
    Message string
    A message to include in the emailed invitation.
    Nonce string
    The nonce for the invitation (only known in the invitation stage)
    OrganizationId string
    The organization to invite the user to
    ProjectsIds []string
    Project IDs the member has access to within the organization. If the member is an 'admin', the projects list should be empty.
    Roles []string
    Organization roles (admin, collaborator, limited_collaborator, billing)
    State string
    The state of the membership ('invited' when an invitation is open, 'active' when the user is an organization member)
    Updated string
    When the invitation was updated (only known in the invitation stage)
    created String
    When the invitation was created (only known in the invitation stage)
    invitedBy String
    The user_id of the user that sent the invitation (only known in the invitation stage)
    invitee String
    The email address of the user to invite
    message String
    A message to include in the emailed invitation.
    nonce String
    The nonce for the invitation (only known in the invitation stage)
    organizationId String
    The organization to invite the user to
    projectsIds List<String>
    Project IDs the member has access to within the organization. If the member is an 'admin', the projects list should be empty.
    roles List<String>
    Organization roles (admin, collaborator, limited_collaborator, billing)
    state String
    The state of the membership ('invited' when an invitation is open, 'active' when the user is an organization member)
    updated String
    When the invitation was updated (only known in the invitation stage)
    created string
    When the invitation was created (only known in the invitation stage)
    invitedBy string
    The user_id of the user that sent the invitation (only known in the invitation stage)
    invitee string
    The email address of the user to invite
    message string
    A message to include in the emailed invitation.
    nonce string
    The nonce for the invitation (only known in the invitation stage)
    organizationId string
    The organization to invite the user to
    projectsIds string[]
    Project IDs the member has access to within the organization. If the member is an 'admin', the projects list should be empty.
    roles string[]
    Organization roles (admin, collaborator, limited_collaborator, billing)
    state string
    The state of the membership ('invited' when an invitation is open, 'active' when the user is an organization member)
    updated string
    When the invitation was updated (only known in the invitation stage)
    created str
    When the invitation was created (only known in the invitation stage)
    invited_by str
    The user_id of the user that sent the invitation (only known in the invitation stage)
    invitee str
    The email address of the user to invite
    message str
    A message to include in the emailed invitation.
    nonce str
    The nonce for the invitation (only known in the invitation stage)
    organization_id str
    The organization to invite the user to
    projects_ids Sequence[str]
    Project IDs the member has access to within the organization. If the member is an 'admin', the projects list should be empty.
    roles Sequence[str]
    Organization roles (admin, collaborator, limited_collaborator, billing)
    state str
    The state of the membership ('invited' when an invitation is open, 'active' when the user is an organization member)
    updated str
    When the invitation was updated (only known in the invitation stage)
    created String
    When the invitation was created (only known in the invitation stage)
    invitedBy String
    The user_id of the user that sent the invitation (only known in the invitation stage)
    invitee String
    The email address of the user to invite
    message String
    A message to include in the emailed invitation.
    nonce String
    The nonce for the invitation (only known in the invitation stage)
    organizationId String
    The organization to invite the user to
    projectsIds List<String>
    Project IDs the member has access to within the organization. If the member is an 'admin', the projects list should be empty.
    roles List<String>
    Organization roles (admin, collaborator, limited_collaborator, billing)
    state String
    The state of the membership ('invited' when an invitation is open, 'active' when the user is an organization member)
    updated String
    When the invitation was updated (only known in the invitation stage)

    Package Details

    Repository
    equinix equinix/pulumi-equinix
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the equinix Terraform Provider.
    equinix logo
    Equinix v0.10.0 published on Wednesday, May 22, 2024 by Equinix