updateDeviceFleet method

Future<void> updateDeviceFleet({
  1. required String deviceFleetName,
  2. required EdgeOutputConfig outputConfig,
  3. String? description,
  4. bool? enableIotRoleAlias,
  5. 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 enableIotRoleAlias : Whether to create an Amazon Web Services IoT Role Alias during device fleet creation. The name of the role alias generated will match this pattern: "SageMakerEdge-{DeviceFleetName}".

For example, if your device fleet is called "demo-fleet", the name of the role alias will be "SageMakerEdge-demo-fleet".

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

Implementation

Future<void> updateDeviceFleet({
  required String deviceFleetName,
  required EdgeOutputConfig outputConfig,
  String? description,
  bool? enableIotRoleAlias,
  String? roleArn,
}) async {
  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 (enableIotRoleAlias != null)
        'EnableIotRoleAlias': enableIotRoleAlias,
      if (roleArn != null) 'RoleArn': roleArn,
    },
  );
}