Skip to main content

detector_versions

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

Overview

Namedetector_versions
TypeResource
Idaws.frauddetector.detector_versions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
arnstringThe detector version ARN. (pattern: <code>^arn:aws[a-z-]{0,15}:frauddetector:[a-z0-9-]{3,20}:[0-9]{12}:[^\s]{2,128}$</code>)
created_timestringThe timestamp when the detector version was created.
descriptionstringThe detector version description.
detector_idstringThe detector ID. (pattern: <code>^[0-9a-z_-]+$</code>)
detector_version_idstringThe detector version ID. (pattern: <code>^([1-9][0-9]*)$</code>)
external_model_endpointsarrayThe Amazon SageMaker model endpoints included in the detector version.
last_updated_timestringThe timestamp when the detector version was last updated.
model_versionsarrayThe model versions included in the detector version.
rule_execution_modestringThe execution mode of the rule in the dectector FIRST_MATCHED indicates that Amazon Fraud Detector evaluates rules sequentially, first to last, stopping at the first matched rule. Amazon Fraud dectector then provides the outcomes for that single rule. ALL_MATCHED indicates that Amazon Fraud Detector evaluates all rules and returns the outcomes for all matched rules. You can define and edit the rule mode at the detector version level, when it is in draft status. (ALL_MATCHED, FIRST_MATCHED)
rulesarrayThe rules included in the detector version.
statusstringThe status of the detector version. (DRAFT, ACTIVE, INACTIVE)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_detector_versionselectregionGets a particular detector version.
create_detector_versioninsertregion, detectorId, rulesCreates a detector version. The detector version starts in a DRAFT status.
update_detector_versionupdateregion, detectorId, detectorVersionId, externalModelEndpoints, rulesUpdates a detector version. The detector version attributes that you can update include models, external model endpoints, rules, rule execution mode, and description. You can only update a DRAFT detector version.
update_detector_version_metadataupdateregion, detectorId, detectorVersionId, descriptionUpdates the detector version's description. You can update the metadata for any detector version (DRAFT, ACTIVE, or INACTIVE).
update_detector_version_statusupdateregion, detectorId, detectorVersionId, statusUpdates the detector version’s status. You can perform the following promotions or demotions using UpdateDetectorVersionStatus: DRAFT to ACTIVE, ACTIVE to INACTIVE, and INACTIVE to ACTIVE.
delete_detector_versiondeleteregionDeletes the detector version. You cannot delete detector versions that are in ACTIVE status. When you delete a detector version, Amazon Fraud Detector permanently deletes the detector 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 a particular detector version.

SELECT
arn,
created_time,
description,
detector_id,
detector_version_id,
external_model_endpoints,
last_updated_time,
model_versions,
rule_execution_mode,
rules,
status
FROM aws.frauddetector.detector_versions
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a detector version. The detector version starts in a DRAFT status.

INSERT INTO aws.frauddetector.detector_versions (
detectorId,
description,
externalModelEndpoints,
rules,
modelVersions,
ruleExecutionMode,
tags,
region
)
SELECT
'{{ detectorId }}' /* required */,
'{{ description }}',
'{{ externalModelEndpoints }}',
'{{ rules }}' /* required */,
'{{ modelVersions }}',
'{{ ruleExecutionMode }}',
'{{ tags }}',
'{{ region }}'
RETURNING
detector_id,
detector_version_id,
status
;

UPDATE examples

Updates a detector version. The detector version attributes that you can update include models, external model endpoints, rules, rule execution mode, and description. You can only update a DRAFT detector version.

UPDATE aws.frauddetector.detector_versions
SET
detectorId = '{{ detectorId }}',
detectorVersionId = '{{ detectorVersionId }}',
externalModelEndpoints = '{{ externalModelEndpoints }}',
rules = '{{ rules }}',
description = '{{ description }}',
modelVersions = '{{ modelVersions }}',
ruleExecutionMode = '{{ ruleExecutionMode }}'
WHERE
region = '{{ region }}' --required
AND detectorId = '{{ detectorId }}' --required
AND detectorVersionId = '{{ detectorVersionId }}' --required
AND externalModelEndpoints = '{{ externalModelEndpoints }}' --required
AND rules = '{{ rules }}' --required;

DELETE examples

Deletes the detector version. You cannot delete detector versions that are in ACTIVE status. When you delete a detector version, Amazon Fraud Detector permanently deletes the detector and the data is no longer stored in Amazon Fraud Detector.

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