- 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.
PutExternalModelCommand
Creates or updates an Amazon SageMaker model endpoint. You can also use this action to update the configuration of the model endpoint, including the IAM role and/or the mapped variables.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { FraudDetectorClient, PutExternalModelCommand } from "@aws-sdk/client-frauddetector"; // ES Modules import
// const { FraudDetectorClient, PutExternalModelCommand } = require("@aws-sdk/client-frauddetector"); // CommonJS import
const client = new FraudDetectorClient(config);
const input = { // PutExternalModelRequest
modelEndpoint: "STRING_VALUE", // required
modelSource: "SAGEMAKER", // required
invokeModelEndpointRoleArn: "STRING_VALUE", // required
inputConfiguration: { // ModelInputConfiguration
eventTypeName: "STRING_VALUE",
format: "TEXT_CSV" || "APPLICATION_JSON",
useEventVariables: true || false, // required
jsonInputTemplate: "STRING_VALUE",
csvInputTemplate: "STRING_VALUE",
},
outputConfiguration: { // ModelOutputConfiguration
format: "TEXT_CSV" || "APPLICATION_JSONLINES", // required
jsonKeyToVariableMap: { // JsonKeyToVariableMap
"<keys>": "STRING_VALUE",
},
csvIndexToVariableMap: { // CsvIndexToVariableMap
"<keys>": "STRING_VALUE",
},
},
modelEndpointStatus: "ASSOCIATED" || "DISSOCIATED", // required
tags: [ // tagList
{ // Tag
key: "STRING_VALUE", // required
value: "STRING_VALUE", // required
},
],
};
const command = new PutExternalModelCommand(input);
const response = await client.send(command);
// {};
PutExternalModelCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
inputConfiguration Required | ModelInputConfiguration | undefined | The model endpoint input configuration. |
invokeModelEndpointRoleArn Required | string | undefined | The IAM role used to invoke the model endpoint. |
modelEndpoint Required | string | undefined | The model endpoints name. |
modelEndpointStatus Required | ModelEndpointStatus | undefined | The model endpoint’s status in Amazon Fraud Detector. |
modelSource Required | ModelSource | undefined | The source of the model. |
outputConfiguration Required | ModelOutputConfiguration | undefined | The model endpoint output configuration. |
tags | Tag[] | undefined | A collection of key and value pairs. |
PutExternalModelCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
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 |
ConflictException | client | An exception indicating there was a conflict during a delete operation. |
InternalServerException | server | An exception indicating an internal server error. |
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. |