Skip to main content

models

Creates, updates, deletes, gets or lists a models resource.

Overview

Namemodels
TypeResource
Idaws.frauddetector.models

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
modelsarrayThe array of models.
next_tokenstringThe next page token to be used in subsequent requests.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_modelsselectregionGets one or more models. Gets all models for the Amazon Web Services account if no model type and no model id provided. Gets all models for the Amazon Web Services account and model type, if the model type is specified but model id is not provided. Gets a specific model if (model type, model id) tuple is specified. This is a paginated API. If you provide a null maxResults, this action retrieves a maximum of 10 records per page. If you provide a maxResults, the value must be between 1 and 10. To get the next page results, provide the pagination token from the response as part of your request. A null pagination token fetches the records from the beginning.
create_modelinsertregion, modelId, modelType, eventTypeNameCreates a model using the specified model type.
update_modelupdateregion, modelId, modelTypeUpdates model description.
delete_modeldeleteregionDeletes a model. You can delete models and model versions in Amazon Fraud Detector, provided that they are not associated with a detector version. When you delete a model, Amazon Fraud Detector permanently deletes that model and the data is no longer stored in Amazon Fraud Detector.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Gets one or more models. Gets all models for the Amazon Web Services account if no model type and no model id provided. Gets all models for the Amazon Web Services account and model type, if the model type is specified but model id is not provided. Gets a specific model if (model type, model id) tuple is specified. This is a paginated API. If you provide a null maxResults, this action retrieves a maximum of 10 records per page. If you provide a maxResults, the value must be between 1 and 10. To get the next page results, provide the pagination token from the response as part of your request. A null pagination token fetches the records from the beginning.

SELECT
models,
next_token
FROM aws.frauddetector.models
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a model using the specified model type.

INSERT INTO aws.frauddetector.models (
modelId,
modelType,
description,
eventTypeName,
tags,
region
)
SELECT
'{{ modelId }}' /* required */,
'{{ modelType }}' /* required */,
'{{ description }}',
'{{ eventTypeName }}' /* required */,
'{{ tags }}',
'{{ region }}'
;

UPDATE examples

Updates model description.

UPDATE aws.frauddetector.models
SET
modelId = '{{ modelId }}',
modelType = '{{ modelType }}',
description = '{{ description }}'
WHERE
region = '{{ region }}' --required
AND modelId = '{{ modelId }}' --required
AND modelType = '{{ modelType }}' --required;

DELETE examples

Deletes a model. You can delete models and model versions in Amazon Fraud Detector, provided that they are not associated with a detector version. When you delete a model, Amazon Fraud Detector permanently deletes that model and the data is no longer stored in Amazon Fraud Detector.

DELETE FROM aws.frauddetector.models
WHERE region = '{{ region }}' --required
;