- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
DescribeModelVersionsCommand
Gets all of the model versions for the specified model type or for the specified model type and model ID. You can also get details for a single, specified model version.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { FraudDetectorClient, DescribeModelVersionsCommand } from "@aws-sdk/client-frauddetector"; // ES Modules import
// const { FraudDetectorClient, DescribeModelVersionsCommand } = require("@aws-sdk/client-frauddetector"); // CommonJS import
const client = new FraudDetectorClient(config);
const input = { // DescribeModelVersionsRequest
modelId: "STRING_VALUE",
modelVersionNumber: "STRING_VALUE",
modelType: "ONLINE_FRAUD_INSIGHTS" || "TRANSACTION_FRAUD_INSIGHTS" || "ACCOUNT_TAKEOVER_INSIGHTS",
nextToken: "STRING_VALUE",
maxResults: Number("int"),
};
const command = new DescribeModelVersionsCommand(input);
const response = await client.send(command);
// { // DescribeModelVersionsResult
// modelVersionDetails: [ // modelVersionDetailList
// { // ModelVersionDetail
// modelId: "STRING_VALUE",
// modelType: "ONLINE_FRAUD_INSIGHTS" || "TRANSACTION_FRAUD_INSIGHTS" || "ACCOUNT_TAKEOVER_INSIGHTS",
// modelVersionNumber: "STRING_VALUE",
// status: "STRING_VALUE",
// trainingDataSource: "EXTERNAL_EVENTS" || "INGESTED_EVENTS",
// trainingDataSchema: { // TrainingDataSchema
// modelVariables: [ // ListOfStrings // required
// "STRING_VALUE",
// ],
// labelSchema: { // LabelSchema
// labelMapper: { // labelMapper
// "<keys>": [
// "STRING_VALUE",
// ],
// },
// unlabeledEventsTreatment: "IGNORE" || "FRAUD" || "LEGIT" || "AUTO",
// },
// },
// externalEventsDetail: { // ExternalEventsDetail
// dataLocation: "STRING_VALUE", // required
// dataAccessRoleArn: "STRING_VALUE", // required
// },
// ingestedEventsDetail: { // IngestedEventsDetail
// ingestedEventsTimeWindow: { // IngestedEventsTimeWindow
// startTime: "STRING_VALUE", // required
// endTime: "STRING_VALUE", // required
// },
// },
// trainingResult: { // TrainingResult
// dataValidationMetrics: { // DataValidationMetrics
// fileLevelMessages: [ // fileValidationMessageList
// { // FileValidationMessage
// title: "STRING_VALUE",
// content: "STRING_VALUE",
// type: "STRING_VALUE",
// },
// ],
// fieldLevelMessages: [ // fieldValidationMessageList
// { // FieldValidationMessage
// fieldName: "STRING_VALUE",
// identifier: "STRING_VALUE",
// title: "STRING_VALUE",
// content: "STRING_VALUE",
// type: "STRING_VALUE",
// },
// ],
// },
// trainingMetrics: { // TrainingMetrics
// auc: Number("float"),
// metricDataPoints: [ // metricDataPointsList
// { // MetricDataPoint
// fpr: Number("float"),
// precision: Number("float"),
// tpr: Number("float"),
// threshold: Number("float"),
// },
// ],
// },
// variableImportanceMetrics: { // VariableImportanceMetrics
// logOddsMetrics: [ // ListOfLogOddsMetrics
// { // LogOddsMetric
// variableName: "STRING_VALUE", // required
// variableType: "STRING_VALUE", // required
// variableImportance: Number("float"), // required
// },
// ],
// },
// },
// lastUpdatedTime: "STRING_VALUE",
// createdTime: "STRING_VALUE",
// arn: "STRING_VALUE",
// trainingResultV2: { // TrainingResultV2
// dataValidationMetrics: {
// fileLevelMessages: [
// {
// title: "STRING_VALUE",
// content: "STRING_VALUE",
// type: "STRING_VALUE",
// },
// ],
// fieldLevelMessages: [
// {
// fieldName: "STRING_VALUE",
// identifier: "STRING_VALUE",
// title: "STRING_VALUE",
// content: "STRING_VALUE",
// type: "STRING_VALUE",
// },
// ],
// },
// trainingMetricsV2: { // TrainingMetricsV2
// ofi: { // OFITrainingMetricsValue
// metricDataPoints: [ // OFIMetricDataPointsList
// { // OFIMetricDataPoint
// fpr: Number("float"),
// precision: Number("float"),
// tpr: Number("float"),
// threshold: Number("float"),
// },
// ],
// modelPerformance: { // OFIModelPerformance
// auc: Number("float"),
// uncertaintyRange: { // UncertaintyRange
// lowerBoundValue: Number("float"), // required
// upperBoundValue: Number("float"), // required
// },
// },
// },
// tfi: { // TFITrainingMetricsValue
// metricDataPoints: [ // TFIMetricDataPointsList
// { // TFIMetricDataPoint
// fpr: Number("float"),
// precision: Number("float"),
// tpr: Number("float"),
// threshold: Number("float"),
// },
// ],
// modelPerformance: { // TFIModelPerformance
// auc: Number("float"),
// uncertaintyRange: {
// lowerBoundValue: Number("float"), // required
// upperBoundValue: Number("float"), // required
// },
// },
// },
// ati: { // ATITrainingMetricsValue
// metricDataPoints: [ // ATIMetricDataPointsList
// { // ATIMetricDataPoint
// cr: Number("float"),
// adr: Number("float"),
// threshold: Number("float"),
// atodr: Number("float"),
// },
// ],
// modelPerformance: { // ATIModelPerformance
// asi: Number("float"),
// },
// },
// },
// variableImportanceMetrics: {
// logOddsMetrics: [
// {
// variableName: "STRING_VALUE", // required
// variableType: "STRING_VALUE", // required
// variableImportance: Number("float"), // required
// },
// ],
// },
// aggregatedVariablesImportanceMetrics: { // AggregatedVariablesImportanceMetrics
// logOddsMetrics: [ // ListOfAggregatedLogOddsMetrics
// { // AggregatedLogOddsMetric
// variableNames: "<ListOfStrings>", // required
// aggregatedVariablesImportance: Number("float"), // required
// },
// ],
// },
// },
// },
// ],
// nextToken: "STRING_VALUE",
// };
DescribeModelVersionsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
maxResults | number | undefined | The maximum number of results to return. |
modelId | string | undefined | The model ID. |
modelType | ModelTypeEnum | undefined | The model type. |
modelVersionNumber | string | undefined | The model version number. |
nextToken | string | undefined | The next token from the previous results. |
DescribeModelVersionsCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
modelVersionDetails | ModelVersionDetail[] | undefined | The model version details. |
nextToken | string | undefined | The next token. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | An exception indicating Amazon Fraud Detector does not have the needed permissions. This can occur if you submit a request, such as |
InternalServerException | server | An exception indicating an internal server error. |
ResourceNotFoundException | client | An exception indicating the specified resource was not found. |
ThrottlingException | client | An exception indicating a throttling error. |
ValidationException | client | An exception indicating a specified value is not allowed. |
FraudDetectorServiceException | Base exception class for all service exceptions from FraudDetector service. |