Skip to main content

labels

Creates, updates, deletes or gets a label resource or lists labels in a region

Overview

Namelabels
TypeResource
DescriptionAn label for fraud detector.
Idaws.frauddetector.labels

Fields

NameDatatypeDescription
namestringThe name of the label.
tagsarrayTags associated with this label.
descriptionstringThe label description.
arnstringThe label ARN.
created_timestringThe timestamp when the label was created.
last_updated_timestringThe timestamp when the label was last updated.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTName, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all labels in a region.

SELECT
region,
name,
tags,
description,
arn,
created_time,
last_updated_time
FROM aws.frauddetector.labels
WHERE region = 'us-east-1';

Gets all properties from an individual label.

SELECT
region,
name,
tags,
description,
arn,
created_time,
last_updated_time
FROM aws.frauddetector.labels
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';

INSERT example

Use the following StackQL query and manifest file to create a new label resource, using stack-deploy.

/*+ create */
INSERT INTO aws.frauddetector.labels (
Name,
region
)
SELECT
'{{ Name }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.frauddetector.labels
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';

Permissions

To operate on the labels resource, the following permissions are required:

Create

frauddetector:GetLabels,
frauddetector:PutLabel,
frauddetector:ListTagsForResource,
frauddetector:TagResource

Read

frauddetector:GetLabels,
frauddetector:ListTagsForResource

Update

frauddetector:GetLabels,
frauddetector:PutLabel,
frauddetector:ListTagsForResource,
frauddetector:TagResource,
frauddetector:UntagResource

Delete

frauddetector:GetLabels,
frauddetector:DeleteLabel

List

frauddetector:GetLabels,
frauddetector:ListTagsForResource