updateDeviceFleet method

Future<void> updateDeviceFleet({
  1. required String deviceFleetName,
  2. required EdgeOutputConfig outputConfig,
  3. String? description,
  4. String? roleArn,
})

Updates a fleet of devices.

May throw ResourceInUse.

Parameter deviceFleetName : The name of the fleet.

Parameter outputConfig : Output configuration for storing sample data collected by the fleet.

Parameter description : Description of the fleet.

Parameter roleArn : The Amazon Resource Name (ARN) of the device.

Implementation

Future<void> updateDeviceFleet({
  required String deviceFleetName,
  required EdgeOutputConfig outputConfig,
  String? description,
  String? roleArn,
}) async {
  ArgumentError.checkNotNull(deviceFleetName, 'deviceFleetName');
  _s.validateStringLength(
    'deviceFleetName',
    deviceFleetName,
    1,
    63,
    isRequired: true,
  );
  ArgumentError.checkNotNull(outputConfig, 'outputConfig');
  _s.validateStringLength(
    'description',
    description,
    1,
    800,
  );
  _s.validateStringLength(
    'roleArn',
    roleArn,
    20,
    2048,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SageMaker.UpdateDeviceFleet'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'DeviceFleetName': deviceFleetName,
      'OutputConfig': outputConfig,
      if (description != null) 'Description': description,
      if (roleArn != null) 'RoleArn': roleArn,
    },
  );
}