disassociateTeamMember method
Removes a user from a project. Removing a user from a project also removes the IAM policies from that user that allowed access to the project and its resources. Disassociating a team member does not remove that user's profile from AWS CodeStar. It does not remove the user from IAM.
May throw ProjectNotFoundException. May throw ValidationException. May throw InvalidServiceRoleException. May throw ConcurrentModificationException.
Parameter projectId
:
The ID of the AWS CodeStar project from which you want to remove a team
member.
Parameter userArn
:
The Amazon Resource Name (ARN) of the IAM user or group whom you want to
remove from the project.
Implementation
Future<void> disassociateTeamMember({
required String projectId,
required String userArn,
}) async {
ArgumentError.checkNotNull(projectId, 'projectId');
_s.validateStringLength(
'projectId',
projectId,
2,
15,
isRequired: true,
);
ArgumentError.checkNotNull(userArn, 'userArn');
_s.validateStringLength(
'userArn',
userArn,
32,
95,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'CodeStar_20170419.DisassociateTeamMember'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'projectId': projectId,
'userArn': userArn,
},
);
}