listAssociatedFleets method

Future<ListAssociatedFleetsResult> listAssociatedFleets({
  1. required String stackName,
  2. String? nextToken,
})

Retrieves the name of the fleet that is associated with the specified stack.

Parameter stackName : The name of the stack.

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.

Implementation

Future<ListAssociatedFleetsResult> listAssociatedFleets({
  required String stackName,
  String? nextToken,
}) async {
  ArgumentError.checkNotNull(stackName, 'stackName');
  _s.validateStringLength(
    'stackName',
    stackName,
    1,
    1152921504606846976,
    isRequired: true,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    1,
    1152921504606846976,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'PhotonAdminProxyService.ListAssociatedFleets'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'StackName': stackName,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return ListAssociatedFleetsResult.fromJson(jsonResponse.body);
}