createDeviceFleet method

Future<void> createDeviceFleet({
  1. required String deviceFleetName,
  2. required EdgeOutputConfig outputConfig,
  3. String? description,
  4. bool? enableIotRoleAlias,
  5. String? roleArn,
  6. List<Tag>? tags,
})

Creates a device fleet.

May throw ResourceInUse. May throw ResourceLimitExceeded.

Parameter deviceFleetName : The name of the fleet that the device belongs to.

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

Parameter description : A 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) that has access to Amazon Web Services Internet of Things (IoT).

Parameter tags : Creates tags for the specified fleet.

Implementation

Future<void> createDeviceFleet({
  required String deviceFleetName,
  required EdgeOutputConfig outputConfig,
  String? description,
  bool? enableIotRoleAlias,
  String? roleArn,
  List<Tag>? tags,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SageMaker.CreateDeviceFleet'
  };
  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,
      if (tags != null) 'Tags': tags,
    },
  );
}