1. Packages
  2. Equinix
  3. API Docs
  4. metal
  5. OrganizationMember
Equinix v0.18.0 published on Monday, Sep 23, 2024 by Equinix

equinix.metal.OrganizationMember

Explore with Pulumi AI

equinix logo
Equinix v0.18.0 published on Monday, Sep 23, 2024 by Equinix

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

    Example Usage

    example 1

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Equinix = Pulumi.Equinix;
    
    return await Deployment.RunAsync(() => 
    {
        var member = new Equinix.Metal.OrganizationMember("member", new()
        {
            Invitee = "member@example.com",
            Roles = new[]
            {
                "limited_collaborator",
            },
            ProjectsIds = new[]
            {
                projectId,
            },
            OrganizationId = organizationId,
        });
    
    });
    
    package main
    
    import (
    	"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := metal.NewOrganizationMember(ctx, "member", &metal.OrganizationMemberArgs{
    			Invitee: pulumi.String("member@example.com"),
    			Roles: pulumi.StringArray{
    				pulumi.String("limited_collaborator"),
    			},
    			ProjectsIds: pulumi.StringArray{
    				projectId,
    			},
    			OrganizationId: pulumi.Any(organizationId),
    		})
    		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.equinix.metal.OrganizationMember;
    import com.pulumi.equinix.metal.OrganizationMemberArgs;
    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 member = new OrganizationMember("member", OrganizationMemberArgs.builder()
                .invitee("member@example.com")
                .roles("limited_collaborator")
                .projectsIds(projectId)
                .organizationId(organizationId)
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_equinix as equinix
    
    member = equinix.metal.OrganizationMember("member",
        invitee="member@example.com",
        roles=["limited_collaborator"],
        projects_ids=[project_id],
        organization_id=organization_id)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as equinix from "@equinix-labs/pulumi-equinix";
    
    const member = new equinix.metal.OrganizationMember("member", {
        invitee: "member@example.com",
        roles: ["limited_collaborator"],
        projectsIds: [projectId],
        organizationId: organizationId,
    });
    
    resources:
      member:
        type: equinix:metal:OrganizationMember
        properties:
          invitee: member@example.com
          roles:
            - limited_collaborator
          projectsIds:
            - ${projectId}
          organizationId: ${organizationId}
    

    example 2

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Equinix = Pulumi.Equinix;
    
    return await Deployment.RunAsync(() => 
    {
        var owner = new Equinix.Metal.OrganizationMember("owner", new()
        {
            Invitee = "admin@example.com",
            Roles = new[]
            {
                "owner",
            },
            ProjectsIds = new[] {},
            OrganizationId = organizationId,
        });
    
    });
    
    package main
    
    import (
    	"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := metal.NewOrganizationMember(ctx, "owner", &metal.OrganizationMemberArgs{
    			Invitee: pulumi.String("admin@example.com"),
    			Roles: pulumi.StringArray{
    				pulumi.String("owner"),
    			},
    			ProjectsIds:    pulumi.StringArray{},
    			OrganizationId: pulumi.Any(organizationId),
    		})
    		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.equinix.metal.OrganizationMember;
    import com.pulumi.equinix.metal.OrganizationMemberArgs;
    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 owner = new OrganizationMember("owner", OrganizationMemberArgs.builder()
                .invitee("admin@example.com")
                .roles("owner")
                .projectsIds()
                .organizationId(organizationId)
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_equinix as equinix
    
    owner = equinix.metal.OrganizationMember("owner",
        invitee="admin@example.com",
        roles=["owner"],
        projects_ids=[],
        organization_id=organization_id)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as equinix from "@equinix-labs/pulumi-equinix";
    
    const owner = new equinix.metal.OrganizationMember("owner", {
        invitee: "admin@example.com",
        roles: ["owner"],
        projectsIds: [],
        organizationId: organizationId,
    });
    
    resources:
      owner:
        type: equinix:metal:OrganizationMember
        properties:
          invitee: admin@example.com
          roles:
            - owner
          projectsIds: []
          organizationId: ${organizationId}
    

    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.

    Constructor 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.18.0 published on Monday, Sep 23, 2024 by Equinix