createPresignedMlflowTrackingServerUrl method
Returns a presigned URL that you can use to connect to the MLflow UI attached to your tracking server. For more information, see Launch the MLflow UI using a presigned URL.
May throw ResourceNotFound.
Parameter trackingServerName :
The name of the tracking server to connect to your MLflow UI.
Parameter expiresInSeconds :
The duration in seconds that your presigned URL is valid. The presigned
URL can be used only once.
Parameter sessionExpirationDurationInSeconds :
The duration in seconds that your MLflow UI session is valid.
Implementation
Future<CreatePresignedMlflowTrackingServerUrlResponse>
createPresignedMlflowTrackingServerUrl({
required String trackingServerName,
int? expiresInSeconds,
int? sessionExpirationDurationInSeconds,
}) async {
_s.validateNumRange(
'expiresInSeconds',
expiresInSeconds,
5,
300,
);
_s.validateNumRange(
'sessionExpirationDurationInSeconds',
sessionExpirationDurationInSeconds,
1800,
43200,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SageMaker.CreatePresignedMlflowTrackingServerUrl'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'TrackingServerName': trackingServerName,
if (expiresInSeconds != null) 'ExpiresInSeconds': expiresInSeconds,
if (sessionExpirationDurationInSeconds != null)
'SessionExpirationDurationInSeconds':
sessionExpirationDurationInSeconds,
},
);
return CreatePresignedMlflowTrackingServerUrlResponse.fromJson(
jsonResponse.body);
}