2020/07/24 - Amazon Fraud Detector - 2 updated api methods
Changes GetPrediction has been replaced with GetEventPrediction. PutExternalModel has been simplified to accept a role ARN.
{'externalModels': {'invokeModelEndpointRoleArn': 'string'}}
Gets the details for one or more Amazon SageMaker models that have been imported into the service. This is a paginated API. If you provide a null maxResults , this actions retrieves a maximum of 10 records per page. If you provide a maxResults , the value must be between 5 and 10. To get the next page results, provide the pagination token from the GetExternalModelsResult as part of your request. A null pagination token fetches the records from the beginning.
See also: AWS API Documentation
Request Syntax
client.get_external_models(
modelEndpoint='string',
nextToken='string',
maxResults=123
)
string
The Amazon SageMaker model endpoint.
string
The next page token for the request.
integer
The maximum number of objects to return for the request.
dict
Response Syntax
{
'externalModels': [
{
'modelEndpoint': 'string',
'eventTypeName': 'string',
'modelSource': 'SAGEMAKER',
'invokeModelEndpointRoleArn': 'string',
'inputConfiguration': {
'format': 'TEXT_CSV'|'APPLICATION_JSON',
'useEventVariables': True|False,
'jsonInputTemplate': 'string',
'csvInputTemplate': 'string'
},
'outputConfiguration': {
'format': 'TEXT_CSV'|'APPLICATION_JSONLINES',
'jsonKeyToVariableMap': {
'string': 'string'
},
'csvIndexToVariableMap': {
'string': 'string'
}
},
'modelEndpointStatus': 'ASSOCIATED'|'DISSOCIATED',
'lastUpdatedTime': 'string',
'createdTime': 'string',
'arn': 'string'
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
externalModels (list) --
Gets the Amazon SageMaker models.
(dict) --
The Amazon SageMaker model.
modelEndpoint (string) --
The Amazon SageMaker model endpoints.
eventTypeName (string) --
The event type names.
modelSource (string) --
The source of the model.
invokeModelEndpointRoleArn (string) --
The role used to invoke the model.
inputConfiguration (dict) --
The input configuration.
format (string) --
The format of the model input configuration. The format differs depending on if it is passed through to SageMaker or constructed by Amazon Fraud Detector.
useEventVariables (boolean) --
The event variables.
jsonInputTemplate (string) --
Template for constructing the JSON input-data sent to SageMaker. At event-evaluation, the placeholders for variable names in the template will be replaced with the variable values before being sent to SageMaker.
csvInputTemplate (string) --
Template for constructing the CSV input-data sent to SageMaker. At event-evaluation, the placeholders for variable-names in the template will be replaced with the variable values before being sent to SageMaker.
outputConfiguration (dict) --
The output configuration.
format (string) --
The format of the model output configuration.
jsonKeyToVariableMap (dict) --
A map of JSON keys in response from SageMaker to the Amazon Fraud Detector variables.
(string) --
(string) --
csvIndexToVariableMap (dict) --
A map of CSV index values in the SageMaker response to the Amazon Fraud Detector variables.
(string) --
(string) --
modelEndpointStatus (string) --
The Amazon Fraud Detector status for the external model endpoint
lastUpdatedTime (string) --
Timestamp of when the model was last updated.
createdTime (string) --
Timestamp of when the model was last created.
arn (string) --
The model ARN.
nextToken (string) --
The next page token to be used in subsequent requests.
{'invokeModelEndpointRoleArn': 'string'}
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.
See also: AWS API Documentation
Request Syntax
client.put_external_model(
modelEndpoint='string',
eventTypeName='string',
modelSource='SAGEMAKER',
invokeModelEndpointRoleArn='string',
inputConfiguration={
'format': 'TEXT_CSV'|'APPLICATION_JSON',
'useEventVariables': True|False,
'jsonInputTemplate': 'string',
'csvInputTemplate': 'string'
},
outputConfiguration={
'format': 'TEXT_CSV'|'APPLICATION_JSONLINES',
'jsonKeyToVariableMap': {
'string': 'string'
},
'csvIndexToVariableMap': {
'string': 'string'
}
},
modelEndpointStatus='ASSOCIATED'|'DISSOCIATED',
tags=[
{
'key': 'string',
'value': 'string'
},
]
)
string
[REQUIRED]
The model endpoints name.
string
The event type name.
string
[REQUIRED]
The source of the model.
string
[REQUIRED]
The IAM role used to invoke the model endpoint.
dict
[REQUIRED]
The model endpoint input configuration.
format (string) --
The format of the model input configuration. The format differs depending on if it is passed through to SageMaker or constructed by Amazon Fraud Detector.
useEventVariables (boolean) -- [REQUIRED]
The event variables.
jsonInputTemplate (string) --
Template for constructing the JSON input-data sent to SageMaker. At event-evaluation, the placeholders for variable names in the template will be replaced with the variable values before being sent to SageMaker.
csvInputTemplate (string) --
Template for constructing the CSV input-data sent to SageMaker. At event-evaluation, the placeholders for variable-names in the template will be replaced with the variable values before being sent to SageMaker.
dict
[REQUIRED]
The model endpoint output configuration.
format (string) -- [REQUIRED]
The format of the model output configuration.
jsonKeyToVariableMap (dict) --
A map of JSON keys in response from SageMaker to the Amazon Fraud Detector variables.
(string) --
(string) --
csvIndexToVariableMap (dict) --
A map of CSV index values in the SageMaker response to the Amazon Fraud Detector variables.
(string) --
(string) --
string
[REQUIRED]
The model endpoint’s status in Amazon Fraud Detector.
list
A collection of key and value pairs.
(dict) --
A key and value pair.
key (string) -- [REQUIRED]
A tag key.
value (string) -- [REQUIRED]
A value assigned to a tag key.
dict
Response Syntax
{}
Response Structure
(dict) --