createFleet method

Future<CreateFleetResponse> createFleet({
  1. required String name,
  2. Map<String, String>? tags,
})

Creates a fleet, a logical group of robots running the same robot application.

May throw InvalidParameterException. May throw InternalServerException. May throw ThrottlingException. May throw LimitExceededException.

Parameter name : The name of the fleet.

Parameter tags : A map that contains tag keys and tag values that are attached to the fleet.

Implementation

Future<CreateFleetResponse> createFleet({
  required String name,
  Map<String, String>? tags,
}) async {
  ArgumentError.checkNotNull(name, 'name');
  _s.validateStringLength(
    'name',
    name,
    1,
    255,
    isRequired: true,
  );
  final $payload = <String, dynamic>{
    'name': name,
    if (tags != null) 'tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/createFleet',
    exceptionFnMap: _exceptionFns,
  );
  return CreateFleetResponse.fromJson(response);
}