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.
Idawscc.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.

For more information, see AWS::FraudDetector::Label.

Methods

NameResourceAccessible byRequired Params
create_resourcelabelsINSERTName, region
delete_resourcelabelsDELETEIdentifier, region
update_resourcelabelsUPDATEIdentifier, PatchDocument, region
list_resourceslabels_list_onlySELECTregion
get_resourcelabelsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual label.

SELECT
region,
name,
tags,
description,
arn,
created_time,
last_updated_time
FROM awscc.frauddetector.labels
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.frauddetector.labels (
Name,
region
)
SELECT
'{{ name }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

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

/*+ update */
UPDATE awscc.frauddetector.labels
SET PatchDocument = string('{{ {
"Tags": tags,
"Description": description
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.frauddetector.labels
WHERE
Identifier = '{{ arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

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

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