update_environment_membership

update_environment_membership(**kwargs)

Changes the settings of an existing environment member for an Cloud9 development environment.

See also: AWS API Documentation

Request Syntax

response = client.update_environment_membership(
    environmentId='string',
    userArn='string',
    permissions='read-write'|'read-only'
)
Parameters
  • environmentId (string) --

    [REQUIRED]

    The ID of the environment for the environment member whose settings you want to change.

  • userArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the environment member whose settings you want to change.

  • permissions (string) --

    [REQUIRED]

    The replacement 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 whose settings were changed.

      • 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.update_environment_membership(
    environmentId='8d9967e2f0624182b74e7690ad69ebEX',
    permissions='read-only',
    userArn='arn:aws:iam::123456789012:user/AnotherDemoUser',
)

print(response)

Expected Output:

{
    'membership': {
        'environmentId': '8d9967e2f0624182b74e7690ad69eb31',
        'permissions': 'read-only',
        'userArn': 'arn:aws:iam::123456789012:user/AnotherDemoUser',
        'userId': 'AIDAJ3BA6O2FMJWCWXHEX',
    },
    'ResponseMetadata': {
        '...': '...',
    },
}