associateFleet method

Future<void> associateFleet({
  1. required String fleetName,
  2. required String stackName,
})

Associates the specified fleet with the specified stack.

May throw LimitExceededException. May throw InvalidAccountStatusException. May throw ResourceNotFoundException. May throw ConcurrentModificationException. May throw IncompatibleImageException. May throw OperationNotPermittedException.

Parameter fleetName : The name of the fleet.

Parameter stackName : The name of the stack.

Implementation

Future<void> associateFleet({
  required String fleetName,
  required String stackName,
}) async {
  ArgumentError.checkNotNull(fleetName, 'fleetName');
  _s.validateStringLength(
    'fleetName',
    fleetName,
    1,
    1152921504606846976,
    isRequired: true,
  );
  ArgumentError.checkNotNull(stackName, 'stackName');
  _s.validateStringLength(
    'stackName',
    stackName,
    1,
    1152921504606846976,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'PhotonAdminProxyService.AssociateFleet'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'FleetName': fleetName,
      'StackName': stackName,
    },
  );
}