Cloud9 / Client / create_environment_membership
create_environment_membership#
- Cloud9.Client.create_environment_membership(**kwargs)#
- Adds an environment member to an Cloud9 development environment. - Warning- Cloud9 is no longer available to new customers. Existing customers of Cloud9 can continue to use the service as normal. Learn more” - See also: AWS API Documentation - Request Syntax- response = client.create_environment_membership( environmentId='string', userArn='string', permissions='read-write'|'read-only' ) - Parameters:
- environmentId (string) – - [REQUIRED] - The ID of the environment that contains the environment member you want to add. 
- userArn (string) – - [REQUIRED] - The Amazon Resource Name (ARN) of the environment member you want to add. 
- permissions (string) – - [REQUIRED] - The type of environment member permissions you want to associate with this environment member. Available values include: - read-only: Has read-only access to the environment.
- read-write: Has read-write access to the environment.
 
 
- Return type:
- dict 
- Returns:
- Response Syntax- { 'membership': { 'permissions': 'owner'|'read-write'|'read-only', 'userId': 'string', 'userArn': 'string', 'environmentId': 'string', 'lastAccess': datetime(2015, 1, 1) } } - Response Structure- (dict) – - membership (dict) – - Information about the environment member that was added. - permissions (string) – - The type of environment member permissions associated with this environment member. Available values include: - owner: Owns the environment.
- read-only: Has read-only access to the environment.
- read-write: Has read-write access to the environment.
 
- userId (string) – - The user ID in Identity and Access Management (IAM) of the environment member. 
- userArn (string) – - The Amazon Resource Name (ARN) of the environment member. 
- environmentId (string) – - The ID of the environment for the environment member. 
- lastAccess (datetime) – - The time, expressed in epoch time format, when the environment member last opened the environment. 
 
 
 
 - Exceptions- Cloud9.Client.exceptions.BadRequestException
- Cloud9.Client.exceptions.ConflictException
- Cloud9.Client.exceptions.NotFoundException
- Cloud9.Client.exceptions.ForbiddenException
- Cloud9.Client.exceptions.TooManyRequestsException
- Cloud9.Client.exceptions.LimitExceededException
- Cloud9.Client.exceptions.InternalServerErrorException
 - Examples- response = client.create_environment_membership( environmentId='8d9967e2f0624182b74e7690ad69ebEX', permissions='read-write', userArn='arn:aws:iam::123456789012:user/AnotherDemoUser', ) print(response) - Expected Output: - { 'membership': { 'environmentId': '8d9967e2f0624182b74e7690ad69ebEX', 'permissions': 'read-write', 'userArn': 'arn:aws:iam::123456789012:user/AnotherDemoUser', 'userId': 'AIDAJ3BA6O2FMJWCWXHEX', }, 'ResponseMetadata': { '...': '...', }, }