describeArtifact method

Future<DescribeArtifactResponse> describeArtifact({
  1. required String artifactArn,
})

Describes an artifact.

May throw ResourceNotFound.

Parameter artifactArn : The Amazon Resource Name (ARN) of the artifact to describe.

Implementation

Future<DescribeArtifactResponse> describeArtifact({
  required String artifactArn,
}) async {
  ArgumentError.checkNotNull(artifactArn, 'artifactArn');
  _s.validateStringLength(
    'artifactArn',
    artifactArn,
    0,
    256,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SageMaker.DescribeArtifact'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ArtifactArn': artifactArn,
    },
  );

  return DescribeArtifactResponse.fromJson(jsonResponse.body);
}