deleteArtifact method
Deletes an artifact. Either ArtifactArn
or
Source
must be specified.
May throw ResourceNotFound.
Parameter artifactArn
:
The Amazon Resource Name (ARN) of the artifact to delete.
Parameter source
:
The URI of the source.
Implementation
Future<DeleteArtifactResponse> deleteArtifact({
String? artifactArn,
ArtifactSource? source,
}) async {
_s.validateStringLength(
'artifactArn',
artifactArn,
0,
256,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SageMaker.DeleteArtifact'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (artifactArn != null) 'ArtifactArn': artifactArn,
if (source != null) 'Source': source,
},
);
return DeleteArtifactResponse.fromJson(jsonResponse.body);
}