There are more AWS SDK examples available in the AWS Doc SDK Examples
Use UpdateEnvironmentMembership
with a CLI
The following code examples show how to use UpdateEnvironmentMembership
.
- CLI
-
- AWS CLI
-
To change the settings of an existing environment member for an AWS Cloud9 development environment
This example changes the settings of the specified existing environment member for the specified AWS Cloud9 development environment.
Command:
aws cloud9 update-environment-membership --environment-id
8a34f51ce1e04a08882f1e811bd706EX
--user-arnarn:aws:iam::123456789012:user/AnotherDemoUser
--permissionsread-only
Output:
{ "membership": { "environmentId": "8a34f51ce1e04a08882f1e811bd706EX", "userId": "AIDAJ3LOROMOUXTBSU6EX", "userArn": "arn:aws:iam::123456789012:user/AnotherDemoUser", "permissions": "read-only" } }
-
For API details, see UpdateEnvironmentMembership
in AWS CLI Command Reference.
-
- PowerShell
-
- Tools for PowerShell
-
Example 1: This example changes the settings of the specified existing environment member for the specified AWS Cloud9 development environment.
Update-C9EnvironmentMembership -UserArn arn:aws:iam::123456789012:user/AnotherDemoUser -EnvironmentId ffd88420d4824eeeaeaa8a04bfde8cEX -Permission read-only
Output:
EnvironmentId : ffd88420d4824eeeaeaa8a04bfde8cEX LastAccess : 1/1/0001 12:00:00 AM Permissions : read-only UserArn : arn:aws:iam::123456789012:user/AnotherDemoUser UserId : AIDAJ3BA6O2FMJWCWXHEX
-
For API details, see UpdateEnvironmentMembership in AWS Tools for PowerShell Cmdlet Reference.
-