labels
Creates, updates, deletes or gets a label
resource or lists labels
in a region
Overview
Name | labels |
Type | Resource |
Description | An label for fraud detector. |
Id | aws.frauddetector.labels |
Fields
Name | Datatype | Description |
---|---|---|
name | string | The name of the label. |
tags | array | Tags associated with this label. |
description | string | The label description. |
arn | string | The label ARN. |
created_time | string | The timestamp when the label was created. |
last_updated_time | string | The timestamp when the label was last updated. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Name, 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 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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.frauddetector.labels (
Name,
region
)
SELECT
'{{ Name }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.frauddetector.labels (
Name,
Tags,
Description,
region
)
SELECT
'{{ Name }}',
'{{ Tags }}',
'{{ Description }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: label
props:
- name: Name
value: '{{ Name }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
- name: Description
value: '{{ Description }}'
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