describeUserStackAssociations method

Future<DescribeUserStackAssociationsResult> describeUserStackAssociations({
  1. AuthenticationType? authenticationType,
  2. int? maxResults,
  3. String? nextToken,
  4. String? stackName,
  5. String? userName,
})

Retrieves a list that describes the UserStackAssociation objects. You must specify either or both of the following:

  • The stack name
  • The user name (email address of the user associated with the stack) and the authentication type for the user

May throw InvalidParameterCombinationException. May throw OperationNotPermittedException.

Parameter authenticationType : The authentication type for the user who is associated with the stack. You must specify USERPOOL.

Parameter maxResults : The maximum size of each page of results.

Parameter nextToken : The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.

Parameter stackName : The name of the stack that is associated with the user.

Parameter userName : The email address of the user who is associated with the stack.

Implementation

Future<DescribeUserStackAssociationsResult> describeUserStackAssociations({
  AuthenticationType? authenticationType,
  int? maxResults,
  String? nextToken,
  String? stackName,
  String? userName,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    0,
    500,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    1,
    1152921504606846976,
  );
  _s.validateStringLength(
    'stackName',
    stackName,
    1,
    1152921504606846976,
  );
  _s.validateStringLength(
    'userName',
    userName,
    1,
    128,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'PhotonAdminProxyService.DescribeUserStackAssociations'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (authenticationType != null)
        'AuthenticationType': authenticationType.toValue(),
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
      if (stackName != null) 'StackName': stackName,
      if (userName != null) 'UserName': userName,
    },
  );

  return DescribeUserStackAssociationsResult.fromJson(jsonResponse.body);
}