updateEnvironmentMembership method
Changes the settings of an existing environment member for an Cloud9 development environment.
May throw BadRequestException.
May throw ConflictException.
May throw ForbiddenException.
May throw InternalServerErrorException.
May throw LimitExceededException.
May throw NotFoundException.
May throw TooManyRequestsException.
Parameter environmentId :
The ID of the environment for the environment member whose settings you
want to change.
Parameter permissions :
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.
Parameter userArn :
The Amazon Resource Name (ARN) of the environment member whose settings
you want to change.
Implementation
Future<UpdateEnvironmentMembershipResult> updateEnvironmentMembership({
required String environmentId,
required MemberPermissions permissions,
required String userArn,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target':
'AWSCloud9WorkspaceManagementService.UpdateEnvironmentMembership'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'environmentId': environmentId,
'permissions': permissions.value,
'userArn': userArn,
},
);
return UpdateEnvironmentMembershipResult.fromJson(jsonResponse.body);
}