Skip to main content

labels

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

Overview

Namelabels
TypeResource
Idaws.frauddetector.labels

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
labelsarrayAn array of labels.
next_tokenstringThe next page token.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_labelsselectregionGets 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_labelupdateregion, eventId, eventTypeName, assignedLabel, labelTimestampUpdates the specified event with a new label.
put_labelreplaceregion, nameCreates 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_labeldeleteregionDeletes 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.

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

SELECT examples

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

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

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

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
;