createMlflowTrackingServer method

Future<CreateMlflowTrackingServerResponse> createMlflowTrackingServer({
  1. required String artifactStoreUri,
  2. required String roleArn,
  3. required String trackingServerName,
  4. bool? automaticModelRegistration,
  5. String? mlflowVersion,
  6. String? s3BucketOwnerAccountId,
  7. bool? s3BucketOwnerVerification,
  8. List<Tag>? tags,
  9. TrackingServerSize? trackingServerSize,
  10. String? weeklyMaintenanceWindowStart,
})

Creates an MLflow Tracking Server using a general purpose Amazon S3 bucket as the artifact store. For more information, see Create an MLflow Tracking Server.

May throw ResourceLimitExceeded.

Parameter artifactStoreUri : The S3 URI for a general purpose bucket to use as the MLflow Tracking Server artifact store.

Parameter roleArn : The Amazon Resource Name (ARN) for an IAM role in your account that the MLflow Tracking Server uses to access the artifact store in Amazon S3. The role should have AmazonS3FullAccess permissions. For more information on IAM permissions for tracking server creation, see Set up IAM permissions for MLflow.

Parameter trackingServerName : A unique string identifying the tracking server name. This string is part of the tracking server ARN.

Parameter automaticModelRegistration : Whether to enable or disable automatic registration of new MLflow models to the SageMaker Model Registry. To enable automatic model registration, set this value to True. To disable automatic model registration, set this value to False. If not specified, AutomaticModelRegistration defaults to False.

Parameter mlflowVersion : The version of MLflow that the tracking server uses. To see which MLflow versions are available to use, see How it works.

Parameter s3BucketOwnerAccountId : Expected Amazon Web Services account ID that owns the Amazon S3 bucket for artifact storage. Defaults to caller's account ID if not provided.

Parameter s3BucketOwnerVerification : Enable Amazon S3 Ownership checks when interacting with Amazon S3 buckets from a SageMaker Managed MLflow Tracking Server. Defaults to True if not provided.

Parameter tags : Tags consisting of key-value pairs used to manage metadata for the tracking server.

Parameter trackingServerSize : The size of the tracking server you want to create. You can choose between "Small", "Medium", and "Large". The default MLflow Tracking Server configuration size is "Small". You can choose a size depending on the projected use of the tracking server such as the volume of data logged, number of users, and frequency of use.

We recommend using a small tracking server for teams of up to 25 users, a medium tracking server for teams of up to 50 users, and a large tracking server for teams of up to 100 users.

Parameter weeklyMaintenanceWindowStart : The day and time of the week in Coordinated Universal Time (UTC) 24-hour standard time that weekly maintenance updates are scheduled. For example: TUE:03:30.

Implementation

Future<CreateMlflowTrackingServerResponse> createMlflowTrackingServer({
  required String artifactStoreUri,
  required String roleArn,
  required String trackingServerName,
  bool? automaticModelRegistration,
  String? mlflowVersion,
  String? s3BucketOwnerAccountId,
  bool? s3BucketOwnerVerification,
  List<Tag>? tags,
  TrackingServerSize? trackingServerSize,
  String? weeklyMaintenanceWindowStart,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SageMaker.CreateMlflowTrackingServer'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ArtifactStoreUri': artifactStoreUri,
      'RoleArn': roleArn,
      'TrackingServerName': trackingServerName,
      if (automaticModelRegistration != null)
        'AutomaticModelRegistration': automaticModelRegistration,
      if (mlflowVersion != null) 'MlflowVersion': mlflowVersion,
      if (s3BucketOwnerAccountId != null)
        'S3BucketOwnerAccountId': s3BucketOwnerAccountId,
      if (s3BucketOwnerVerification != null)
        'S3BucketOwnerVerification': s3BucketOwnerVerification,
      if (tags != null) 'Tags': tags,
      if (trackingServerSize != null)
        'TrackingServerSize': trackingServerSize.value,
      if (weeklyMaintenanceWindowStart != null)
        'WeeklyMaintenanceWindowStart': weeklyMaintenanceWindowStart,
    },
  );

  return CreateMlflowTrackingServerResponse.fromJson(jsonResponse.body);
}