describeEnvironmentMemberships method
Gets information about environment members 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 to get environment member information about.
Parameter maxResults
:
The maximum number of environment members to get information about.
Parameter nextToken
:
During a previous call, if there are more than 25 items in the list, only
the first 25 items are returned, along with a unique string called a
next token. To get the next batch of items in the list, call this
operation again, adding the next token to the call. To get all of the
items in the list, keep calling this operation with each subsequent next
token that is returned, until no more next tokens are returned.
Parameter permissions
:
The type of environment member permissions to get information about.
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.
Parameter userArn
:
The Amazon Resource Name (ARN) of an individual environment member to get
information about. If no value is specified, information about all
environment members are returned.
Implementation
Future<DescribeEnvironmentMembershipsResult> describeEnvironmentMemberships({
String? environmentId,
int? maxResults,
String? nextToken,
List<Permissions>? permissions,
String? userArn,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
0,
25,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target':
'AWSCloud9WorkspaceManagementService.DescribeEnvironmentMemberships'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (environmentId != null) 'environmentId': environmentId,
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
if (permissions != null)
'permissions': permissions.map((e) => e.toValue()).toList(),
if (userArn != null) 'userArn': userArn,
},
);
return DescribeEnvironmentMembershipsResult.fromJson(jsonResponse.body);
}