detectors
Creates, updates, deletes or gets a detector
resource or lists detectors
in a region
Overview
Name | detectors |
Type | Resource |
Description | A resource schema for a Detector in Amazon Fraud Detector. |
Id | aws.frauddetector.detectors |
Fields
Name | Datatype | Description |
---|---|---|
detector_id | string | The ID of the detector |
detector_version_status | string | The desired detector version status for the detector |
detector_version_id | string | The active version ID of the detector |
rule_execution_mode | string | |
tags | array | Tags associated with this detector. |
description | string | The description of the detector. |
rules | array | |
event_type | object | The event type to associate this detector with. |
arn | string | The ARN of the detector. |
created_time | string | The time when the detector was created. |
last_updated_time | string | The time when the detector was last updated. |
associated_models | array | The models to associate with this detector. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | DetectorId, EventType, Rules, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all detectors
in a region.
SELECT
region,
detector_id,
detector_version_status,
detector_version_id,
rule_execution_mode,
tags,
description,
rules,
event_type,
arn,
created_time,
last_updated_time,
associated_models
FROM aws.frauddetector.detectors
WHERE region = 'us-east-1';
Gets all properties from an individual detector
.
SELECT
region,
detector_id,
detector_version_status,
detector_version_id,
rule_execution_mode,
tags,
description,
rules,
event_type,
arn,
created_time,
last_updated_time,
associated_models
FROM aws.frauddetector.detectors
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';
INSERT
example
Use the following StackQL query and manifest file to create a new detector
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.frauddetector.detectors (
DetectorId,
Rules,
EventType,
region
)
SELECT
'{{ DetectorId }}',
'{{ Rules }}',
'{{ EventType }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.frauddetector.detectors (
DetectorId,
DetectorVersionStatus,
RuleExecutionMode,
Tags,
Description,
Rules,
EventType,
AssociatedModels,
region
)
SELECT
'{{ DetectorId }}',
'{{ DetectorVersionStatus }}',
'{{ RuleExecutionMode }}',
'{{ Tags }}',
'{{ Description }}',
'{{ Rules }}',
'{{ EventType }}',
'{{ AssociatedModels }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: detector
props:
- name: DetectorId
value: '{{ DetectorId }}'
- name: DetectorVersionStatus
value: '{{ DetectorVersionStatus }}'
- name: RuleExecutionMode
value: '{{ RuleExecutionMode }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
- name: Description
value: '{{ Description }}'
- name: Rules
value:
- RuleId: '{{ RuleId }}'
RuleVersion: '{{ RuleVersion }}'
DetectorId: '{{ DetectorId }}'
Expression: '{{ Expression }}'
Language: '{{ Language }}'
Outcomes:
- Name: '{{ Name }}'
Tags:
- null
Description: '{{ Description }}'
Arn: '{{ Arn }}'
Description: '{{ Description }}'
Tags:
- null
CreatedTime: '{{ CreatedTime }}'
LastUpdatedTime: '{{ LastUpdatedTime }}'
- name: EventType
value:
Name: '{{ Name }}'
Tags:
- null
Description: '{{ Description }}'
EventVariables:
- Arn: '{{ Arn }}'
Inline: '{{ Inline }}'
Name: '{{ Name }}'
DataSource: '{{ DataSource }}'
DataType: '{{ DataType }}'
DefaultValue: '{{ DefaultValue }}'
VariableType: '{{ VariableType }}'
Description: '{{ Description }}'
Tags:
- null
CreatedTime: '{{ CreatedTime }}'
LastUpdatedTime: '{{ LastUpdatedTime }}'
Labels:
- Name: '{{ Name }}'
Tags:
- null
Description: '{{ Description }}'
EntityTypes:
- Arn: '{{ Arn }}'
Inline: '{{ Inline }}'
Name: '{{ Name }}'
Description: '{{ Description }}'
Tags:
- null
CreatedTime: '{{ CreatedTime }}'
LastUpdatedTime: '{{ LastUpdatedTime }}'
- name: AssociatedModels
value:
- Arn: '{{ Arn }}'
DELETE
example
/*+ delete */
DELETE FROM aws.frauddetector.detectors
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';
Permissions
To operate on the detectors
resource, the following permissions are required:
Create
frauddetector:PutDetector,
frauddetector:CreateDetectorVersion,
frauddetector:UpdateDetectorVersionStatus,
frauddetector:CreateRule,
frauddetector:CreateVariable,
frauddetector:PutLabel,
frauddetector:PutOutcome,
frauddetector:PutEntityType,
frauddetector:PutEventType,
frauddetector:DescribeDetector,
frauddetector:GetDetectors,
frauddetector:GetDetectorVersion,
frauddetector:GetRules,
frauddetector:GetVariables,
frauddetector:GetEventTypes,
frauddetector:GetExternalModels,
frauddetector:GetModelVersion,
frauddetector:GetLabels,
frauddetector:GetOutcomes,
frauddetector:GetEntityTypes,
frauddetector:ListTagsForResource
Update
frauddetector:GetDetectors,
frauddetector:GetDetectorVersion,
frauddetector:PutDetector,
frauddetector:UpdateDetectorVersion,
frauddetector:UpdateDetectorVersionStatus,
frauddetector:UpdateDetectorVersionMetadata,
frauddetector:UpdateRuleVersion,
frauddetector:UpdateRuleMetadata,
frauddetector:CreateRule,
frauddetector:CreateVariable,
frauddetector:UpdateVariable,
frauddetector:GetVariables,
frauddetector:PutLabel,
frauddetector:PutOutcome,
frauddetector:PutEntityType,
frauddetector:PutEventType,
frauddetector:GetRules,
frauddetector:GetEventTypes,
frauddetector:GetLabels,
frauddetector:GetOutcomes,
frauddetector:GetEntityTypes,
frauddetector:GetExternalModels,
frauddetector:GetModelVersion,
frauddetector:DeleteEventType,
frauddetector:DeleteVariable,
frauddetector:DeleteLabel,
frauddetector:DeleteEntityType,
frauddetector:ListTagsForResource,
frauddetector:TagResource,
frauddetector:UntagResource
Delete
frauddetector:GetDetectors,
frauddetector:GetDetectorVersion,
frauddetector:DescribeDetector,
frauddetector:GetRules,
frauddetector:GetVariables,
frauddetector:GetEventTypes,
frauddetector:GetLabels,
frauddetector:GetOutcomes,
frauddetector:GetEntityTypes,
frauddetector:DeleteDetector,
frauddetector:DeleteDetectorVersion,
frauddetector:DeleteRule,
frauddetector:DeleteEventType,
frauddetector:DeleteVariable,
frauddetector:DeleteLabel,
frauddetector:DeleteOutcome,
frauddetector:DeleteEntityType,
frauddetector:ListTagsForResource
Read
frauddetector:GetDetectors,
frauddetector:GetDetectorVersion,
frauddetector:DescribeDetector,
frauddetector:GetRules,
frauddetector:GetVariables,
frauddetector:GetEventTypes,
frauddetector:GetExternalModels,
frauddetector:GetModelVersion,
frauddetector:GetLabels,
frauddetector:GetOutcomes,
frauddetector:GetEntityTypes,
frauddetector:ListTagsForResource
List
frauddetector:GetDetectors,
frauddetector:GetDetectorVersion,
frauddetector:DescribeDetector,
frauddetector:GetRules,
frauddetector:GetVariables,
frauddetector:GetEventTypes,
frauddetector:GetExternalModels,
frauddetector:GetModelVersion,
frauddetector:GetLabels,
frauddetector:GetOutcomes,
frauddetector:GetEntityTypes,
frauddetector:ListTagsForResource