aws logo
AWS Classic v5.33.0, Mar 24 23

aws.cloud9.EnvironmentMembership

Provides an environment member to an AWS Cloud9 development environment.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var testEnvironmentEC2 = new Aws.Cloud9.EnvironmentEC2("testEnvironmentEC2", new()
    {
        InstanceType = "t2.micro",
    });

    var testUser = new Aws.Iam.User("testUser");

    var testEnvironmentMembership = new Aws.Cloud9.EnvironmentMembership("testEnvironmentMembership", new()
    {
        EnvironmentId = testEnvironmentEC2.Id,
        Permissions = "read-only",
        UserArn = testUser.Arn,
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/cloud9"
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/iam"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		testEnvironmentEC2, err := cloud9.NewEnvironmentEC2(ctx, "testEnvironmentEC2", &cloud9.EnvironmentEC2Args{
			InstanceType: pulumi.String("t2.micro"),
		})
		if err != nil {
			return err
		}
		testUser, err := iam.NewUser(ctx, "testUser", nil)
		if err != nil {
			return err
		}
		_, err = cloud9.NewEnvironmentMembership(ctx, "testEnvironmentMembership", &cloud9.EnvironmentMembershipArgs{
			EnvironmentId: testEnvironmentEC2.ID(),
			Permissions:   pulumi.String("read-only"),
			UserArn:       testUser.Arn,
		})
		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.aws.cloud9.EnvironmentEC2;
import com.pulumi.aws.cloud9.EnvironmentEC2Args;
import com.pulumi.aws.iam.User;
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 testEnvironmentEC2 = new EnvironmentEC2("testEnvironmentEC2", EnvironmentEC2Args.builder()        
            .instanceType("t2.micro")
            .build());

        var testUser = new User("testUser");

        var testEnvironmentMembership = new EnvironmentMembership("testEnvironmentMembership", EnvironmentMembershipArgs.builder()        
            .environmentId(testEnvironmentEC2.id())
            .permissions("read-only")
            .userArn(testUser.arn())
            .build());

    }
}
import pulumi
import pulumi_aws as aws

test_environment_ec2 = aws.cloud9.EnvironmentEC2("testEnvironmentEC2", instance_type="t2.micro")
test_user = aws.iam.User("testUser")
test_environment_membership = aws.cloud9.EnvironmentMembership("testEnvironmentMembership",
    environment_id=test_environment_ec2.id,
    permissions="read-only",
    user_arn=test_user.arn)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const testEnvironmentEC2 = new aws.cloud9.EnvironmentEC2("testEnvironmentEC2", {instanceType: "t2.micro"});
const testUser = new aws.iam.User("testUser", {});
const testEnvironmentMembership = new aws.cloud9.EnvironmentMembership("testEnvironmentMembership", {
    environmentId: testEnvironmentEC2.id,
    permissions: "read-only",
    userArn: testUser.arn,
});
resources:
  testEnvironmentEC2:
    type: aws:cloud9:EnvironmentEC2
    properties:
      instanceType: t2.micro
  testUser:
    type: aws:iam:User
  testEnvironmentMembership:
    type: aws:cloud9:EnvironmentMembership
    properties:
      environmentId: ${testEnvironmentEC2.id}
      permissions: read-only
      userArn: ${testUser.arn}

Create EnvironmentMembership Resource

new EnvironmentMembership(name: string, args: EnvironmentMembershipArgs, opts?: CustomResourceOptions);
@overload
def EnvironmentMembership(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          environment_id: Optional[str] = None,
                          permissions: Optional[str] = None,
                          user_arn: Optional[str] = None)
@overload
def EnvironmentMembership(resource_name: str,
                          args: EnvironmentMembershipArgs,
                          opts: Optional[ResourceOptions] = 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.

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.

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

Cloud9 environment membership can be imported using the environment-id#user-arn, e.g.

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

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.