1. Packages
  2. AWS Classic
  3. API Docs
  4. cloud9
  5. EnvironmentMembership

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.30.0 published on Thursday, Apr 11, 2024 by Pulumi

aws.cloud9.EnvironmentMembership

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.30.0 published on Thursday, Apr 11, 2024 by Pulumi

    Provides an environment member to an AWS Cloud9 development environment.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const test = new aws.cloud9.EnvironmentEC2("test", {
        instanceType: "t2.micro",
        name: "some-env",
    });
    const testUser = new aws.iam.User("test", {name: "some-user"});
    const testEnvironmentMembership = new aws.cloud9.EnvironmentMembership("test", {
        environmentId: test.id,
        permissions: "read-only",
        userArn: testUser.arn,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    test = aws.cloud9.EnvironmentEC2("test",
        instance_type="t2.micro",
        name="some-env")
    test_user = aws.iam.User("test", name="some-user")
    test_environment_membership = aws.cloud9.EnvironmentMembership("test",
        environment_id=test.id,
        permissions="read-only",
        user_arn=test_user.arn)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloud9"
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		test, err := cloud9.NewEnvironmentEC2(ctx, "test", &cloud9.EnvironmentEC2Args{
    			InstanceType: pulumi.String("t2.micro"),
    			Name:         pulumi.String("some-env"),
    		})
    		if err != nil {
    			return err
    		}
    		testUser, err := iam.NewUser(ctx, "test", &iam.UserArgs{
    			Name: pulumi.String("some-user"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = cloud9.NewEnvironmentMembership(ctx, "test", &cloud9.EnvironmentMembershipArgs{
    			EnvironmentId: test.ID(),
    			Permissions:   pulumi.String("read-only"),
    			UserArn:       testUser.Arn,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Aws.Cloud9.EnvironmentEC2("test", new()
        {
            InstanceType = "t2.micro",
            Name = "some-env",
        });
    
        var testUser = new Aws.Iam.User("test", new()
        {
            Name = "some-user",
        });
    
        var testEnvironmentMembership = new Aws.Cloud9.EnvironmentMembership("test", new()
        {
            EnvironmentId = test.Id,
            Permissions = "read-only",
            UserArn = testUser.Arn,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.cloud9.EnvironmentEC2;
    import com.pulumi.aws.cloud9.EnvironmentEC2Args;
    import com.pulumi.aws.iam.User;
    import com.pulumi.aws.iam.UserArgs;
    import com.pulumi.aws.cloud9.EnvironmentMembership;
    import com.pulumi.aws.cloud9.EnvironmentMembershipArgs;
    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 test = new EnvironmentEC2("test", EnvironmentEC2Args.builder()        
                .instanceType("t2.micro")
                .name("some-env")
                .build());
    
            var testUser = new User("testUser", UserArgs.builder()        
                .name("some-user")
                .build());
    
            var testEnvironmentMembership = new EnvironmentMembership("testEnvironmentMembership", EnvironmentMembershipArgs.builder()        
                .environmentId(test.id())
                .permissions("read-only")
                .userArn(testUser.arn())
                .build());
    
        }
    }
    
    resources:
      test:
        type: aws:cloud9:EnvironmentEC2
        properties:
          instanceType: t2.micro
          name: some-env
      testUser:
        type: aws:iam:User
        name: test
        properties:
          name: some-user
      testEnvironmentMembership:
        type: aws:cloud9:EnvironmentMembership
        name: test
        properties:
          environmentId: ${test.id}
          permissions: read-only
          userArn: ${testUser.arn}
    

    Create EnvironmentMembership Resource

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

    Constructor syntax

    new EnvironmentMembership(name: string, args: EnvironmentMembershipArgs, opts?: CustomResourceOptions);
    @overload
    def EnvironmentMembership(resource_name: str,
                              args: EnvironmentMembershipArgs,
                              opts: Optional[ResourceOptions] = None)
    
    @overload
    def EnvironmentMembership(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              environment_id: Optional[str] = None,
                              permissions: Optional[str] = None,
                              user_arn: Optional[str] = None)
    func NewEnvironmentMembership(ctx *Context, name string, args EnvironmentMembershipArgs, opts ...ResourceOption) (*EnvironmentMembership, error)
    public EnvironmentMembership(string name, EnvironmentMembershipArgs args, CustomResourceOptions? opts = null)
    public EnvironmentMembership(String name, EnvironmentMembershipArgs args)
    public EnvironmentMembership(String name, EnvironmentMembershipArgs args, CustomResourceOptions options)
    
    type: aws:cloud9:EnvironmentMembership
    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 EnvironmentMembershipArgs
    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 EnvironmentMembershipArgs
    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 EnvironmentMembershipArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args EnvironmentMembershipArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args EnvironmentMembershipArgs
    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 environmentMembershipResource = new Aws.Cloud9.EnvironmentMembership("environmentMembershipResource", new()
    {
        EnvironmentId = "string",
        Permissions = "string",
        UserArn = "string",
    });
    
    example, err := cloud9.NewEnvironmentMembership(ctx, "environmentMembershipResource", &cloud9.EnvironmentMembershipArgs{
    	EnvironmentId: pulumi.String("string"),
    	Permissions:   pulumi.String("string"),
    	UserArn:       pulumi.String("string"),
    })
    
    var environmentMembershipResource = new EnvironmentMembership("environmentMembershipResource", EnvironmentMembershipArgs.builder()        
        .environmentId("string")
        .permissions("string")
        .userArn("string")
        .build());
    
    environment_membership_resource = aws.cloud9.EnvironmentMembership("environmentMembershipResource",
        environment_id="string",
        permissions="string",
        user_arn="string")
    
    const environmentMembershipResource = new aws.cloud9.EnvironmentMembership("environmentMembershipResource", {
        environmentId: "string",
        permissions: "string",
        userArn: "string",
    });
    
    type: aws:cloud9:EnvironmentMembership
    properties:
        environmentId: string
        permissions: string
        userArn: string
    

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

    EnvironmentId string
    The ID of the environment that contains the environment member you want to add.
    Permissions string
    The type of environment member permissions you want to associate with this environment member. Allowed values are read-only and read-write .
    UserArn string
    The Amazon Resource Name (ARN) of the environment member you want to add.
    EnvironmentId string
    The ID of the environment that contains the environment member you want to add.
    Permissions string
    The type of environment member permissions you want to associate with this environment member. Allowed values are read-only and read-write .
    UserArn string
    The Amazon Resource Name (ARN) of the environment member you want to add.
    environmentId String
    The ID of the environment that contains the environment member you want to add.
    permissions String
    The type of environment member permissions you want to associate with this environment member. Allowed values are read-only and read-write .
    userArn String
    The Amazon Resource Name (ARN) of the environment member you want to add.
    environmentId string
    The ID of the environment that contains the environment member you want to add.
    permissions string
    The type of environment member permissions you want to associate with this environment member. Allowed values are read-only and read-write .
    userArn string
    The Amazon Resource Name (ARN) of the environment member you want to add.
    environment_id str
    The ID of the environment that contains the environment member you want to add.
    permissions str
    The type of environment member permissions you want to associate with this environment member. Allowed values are read-only and read-write .
    user_arn str
    The Amazon Resource Name (ARN) of the environment member you want to add.
    environmentId String
    The ID of the environment that contains the environment member you want to add.
    permissions String
    The type of environment member permissions you want to associate with this environment member. Allowed values are read-only and read-write .
    userArn String
    The Amazon Resource Name (ARN) of the environment member you want to add.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    UserId string
    he user ID in AWS Identity and Access Management (AWS IAM) of the environment member.
    Id string
    The provider-assigned unique ID for this managed resource.
    UserId string
    he user ID in AWS Identity and Access Management (AWS IAM) of the environment member.
    id String
    The provider-assigned unique ID for this managed resource.
    userId String
    he user ID in AWS Identity and Access Management (AWS IAM) of the environment member.
    id string
    The provider-assigned unique ID for this managed resource.
    userId string
    he user ID in AWS Identity and Access Management (AWS IAM) of the environment member.
    id str
    The provider-assigned unique ID for this managed resource.
    user_id str
    he user ID in AWS Identity and Access Management (AWS IAM) of the environment member.
    id String
    The provider-assigned unique ID for this managed resource.
    userId String
    he user ID in AWS Identity and Access Management (AWS IAM) of the environment member.

    Look up Existing EnvironmentMembership Resource

    Get an existing EnvironmentMembership 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?: EnvironmentMembershipState, opts?: CustomResourceOptions): EnvironmentMembership
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            environment_id: Optional[str] = None,
            permissions: Optional[str] = None,
            user_arn: Optional[str] = None,
            user_id: Optional[str] = None) -> EnvironmentMembership
    func GetEnvironmentMembership(ctx *Context, name string, id IDInput, state *EnvironmentMembershipState, opts ...ResourceOption) (*EnvironmentMembership, error)
    public static EnvironmentMembership Get(string name, Input<string> id, EnvironmentMembershipState? state, CustomResourceOptions? opts = null)
    public static EnvironmentMembership get(String name, Output<String> id, EnvironmentMembershipState 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:
    EnvironmentId string
    The ID of the environment that contains the environment member you want to add.
    Permissions string
    The type of environment member permissions you want to associate with this environment member. Allowed values are read-only and read-write .
    UserArn string
    The Amazon Resource Name (ARN) of the environment member you want to add.
    UserId string
    he user ID in AWS Identity and Access Management (AWS IAM) of the environment member.
    EnvironmentId string
    The ID of the environment that contains the environment member you want to add.
    Permissions string
    The type of environment member permissions you want to associate with this environment member. Allowed values are read-only and read-write .
    UserArn string
    The Amazon Resource Name (ARN) of the environment member you want to add.
    UserId string
    he user ID in AWS Identity and Access Management (AWS IAM) of the environment member.
    environmentId String
    The ID of the environment that contains the environment member you want to add.
    permissions String
    The type of environment member permissions you want to associate with this environment member. Allowed values are read-only and read-write .
    userArn String
    The Amazon Resource Name (ARN) of the environment member you want to add.
    userId String
    he user ID in AWS Identity and Access Management (AWS IAM) of the environment member.
    environmentId string
    The ID of the environment that contains the environment member you want to add.
    permissions string
    The type of environment member permissions you want to associate with this environment member. Allowed values are read-only and read-write .
    userArn string
    The Amazon Resource Name (ARN) of the environment member you want to add.
    userId string
    he user ID in AWS Identity and Access Management (AWS IAM) of the environment member.
    environment_id str
    The ID of the environment that contains the environment member you want to add.
    permissions str
    The type of environment member permissions you want to associate with this environment member. Allowed values are read-only and read-write .
    user_arn str
    The Amazon Resource Name (ARN) of the environment member you want to add.
    user_id str
    he user ID in AWS Identity and Access Management (AWS IAM) of the environment member.
    environmentId String
    The ID of the environment that contains the environment member you want to add.
    permissions String
    The type of environment member permissions you want to associate with this environment member. Allowed values are read-only and read-write .
    userArn String
    The Amazon Resource Name (ARN) of the environment member you want to add.
    userId String
    he user ID in AWS Identity and Access Management (AWS IAM) of the environment member.

    Import

    Using pulumi import, import Cloud9 environment membership using the environment-id#user-arn. For example:

    $ pulumi import aws:cloud9/environmentMembership:EnvironmentMembership test environment-id#user-arn
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.30.0 published on Thursday, Apr 11, 2024 by Pulumi