labels
Creates, updates, deletes, gets or lists a labels resource.
Overview
| Name | labels |
| Type | Resource |
| Id | aws.frauddetector.labels |
Fields
The following fields are returned by SELECT queries:
- get_labels
| Name | Datatype | Description |
|---|---|---|
labels | array | An array of labels. |
next_token | string | The next page token. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_labels | select | region | Gets all labels or a specific label if name is provided. This is a paginated API. If you provide a null maxResults, this action retrieves a maximum of 50 records per page. If you provide a maxResults, the value must be between 10 and 50. To get the next page results, provide the pagination token from the GetGetLabelsResponse as part of your request. A null pagination token fetches the records from the beginning. | |
update_event_label | update | region, eventId, eventTypeName, assignedLabel, labelTimestamp | Updates the specified event with a new label. | |
put_label | replace | region, name | Creates or updates label. A label classifies an event as fraudulent or legitimate. Labels are associated with event types and used to train supervised machine learning models in Amazon Fraud Detector. | |
delete_label | delete | region | Deletes a label. You cannot delete labels that are included in an event type in Amazon Fraud Detector. You cannot delete a label assigned to an event ID. You must first delete the relevant event ID. When you delete a label, Amazon Fraud Detector permanently deletes that label 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_labels
Gets all labels or a specific label if name is provided. This is a paginated API. If you provide a null maxResults, this action retrieves a maximum of 50 records per page. If you provide a maxResults, the value must be between 10 and 50. To get the next page results, provide the pagination token from the GetGetLabelsResponse as part of your request. A null pagination token fetches the records from the beginning.
SELECT
labels,
next_token
FROM aws.frauddetector.labels
WHERE region = '{{ region }}' -- required
;
UPDATE examples
- update_event_label
Updates the specified event with a new label.
UPDATE aws.frauddetector.labels
SET
eventId = '{{ eventId }}',
eventTypeName = '{{ eventTypeName }}',
assignedLabel = '{{ assignedLabel }}',
labelTimestamp = '{{ labelTimestamp }}'
WHERE
region = '{{ region }}' --required
AND eventId = '{{ eventId }}' --required
AND eventTypeName = '{{ eventTypeName }}' --required
AND assignedLabel = '{{ assignedLabel }}' --required
AND labelTimestamp = '{{ labelTimestamp }}' --required;
REPLACE examples
- put_label
Creates or updates label. A label classifies an event as fraudulent or legitimate. Labels are associated with event types and used to train supervised machine learning models in Amazon Fraud Detector.
REPLACE aws.frauddetector.labels
SET
name = '{{ name }}',
description = '{{ description }}',
tags = '{{ tags }}'
WHERE
region = '{{ region }}' --required
AND name = '{{ name }}' --required;
DELETE examples
- delete_label
Deletes a label. You cannot delete labels that are included in an event type in Amazon Fraud Detector. You cannot delete a label assigned to an event ID. You must first delete the relevant event ID. When you delete a label, Amazon Fraud Detector permanently deletes that label and the data is no longer stored in Amazon Fraud Detector.
DELETE FROM aws.frauddetector.labels
WHERE region = '{{ region }}' --required
;