createPartnerAppPresignedUrl method
Creates a presigned URL to access an Amazon SageMaker Partner AI App.
May throw ResourceNotFound.
Parameter arn :
The ARN of the SageMaker Partner AI App to create the presigned URL for.
Parameter expiresInSeconds :
The time that will pass before the presigned URL expires.
Parameter sessionExpirationDurationInSeconds :
Indicates how long the Amazon SageMaker Partner AI App session can be
accessed for after logging in.
Implementation
Future<CreatePartnerAppPresignedUrlResponse> createPartnerAppPresignedUrl({
required String arn,
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.CreatePartnerAppPresignedUrl'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Arn': arn,
if (expiresInSeconds != null) 'ExpiresInSeconds': expiresInSeconds,
if (sessionExpirationDurationInSeconds != null)
'SessionExpirationDurationInSeconds':
sessionExpirationDurationInSeconds,
},
);
return CreatePartnerAppPresignedUrlResponse.fromJson(jsonResponse.body);
}