updateEnvironmentMembership method
Future<UpdateEnvironmentMembershipResult>
updateEnvironmentMembership({
- required String environmentId,
- required MemberPermissions permissions,
- required String userArn,
Changes the settings of an existing environment member for an AWS Cloud9 development environment.
May throw BadRequestException. May throw ConflictException. May throw NotFoundException. May throw ForbiddenException. May throw TooManyRequestsException. May throw LimitExceededException. May throw InternalServerErrorException.
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 {
ArgumentError.checkNotNull(environmentId, 'environmentId');
ArgumentError.checkNotNull(permissions, 'permissions');
ArgumentError.checkNotNull(userArn, 'userArn');
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.toValue(),
'userArn': userArn,
},
);
return UpdateEnvironmentMembershipResult.fromJson(jsonResponse.body);
}