Skip to main content

variables

Creates, updates, deletes or gets a variable resource or lists variables in a region

Overview

Namevariables
TypeResource
DescriptionA resource schema for a Variable in Amazon Fraud Detector.
Idawscc.frauddetector.variables

Fields

NameDatatypeDescription
namestringThe name of the variable.
data_sourcestringThe source of the data.
data_typestringThe data type.
default_valuestringThe default value for the variable when no value is received.
descriptionstringThe description.
tagsarrayTags associated with this variable.
variable_typestringThe variable type. For more information see https://docs.aws.amazon.com/frauddetector/latest/ug/create-a-variable.html#variable-types
arnstringThe ARN of the variable.
created_timestringThe time when the variable was created.
last_updated_timestringThe time when the variable was last updated.
regionstringAWS region.

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

Methods

NameResourceAccessible byRequired Params
create_resourcevariablesINSERTDataType, DataSource, DefaultValue, Name, region
delete_resourcevariablesDELETEIdentifier, region
update_resourcevariablesUPDATEIdentifier, PatchDocument, region
list_resourcesvariables_list_onlySELECTregion
get_resourcevariablesSELECTIdentifier, region

SELECT examples

Gets all properties from an individual variable.

SELECT
region,
name,
data_source,
data_type,
default_value,
description,
tags,
variable_type,
arn,
created_time,
last_updated_time
FROM awscc.frauddetector.variables
WHERE
region = 'us-east-1' AND
Identifier = '{{ arn }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.frauddetector.variables (
Name,
DataSource,
DataType,
DefaultValue,
region
)
SELECT
'{{ name }}',
'{{ data_source }}',
'{{ data_type }}',
'{{ default_value }}',
'{{ region }}';

UPDATE example

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

/*+ update */
UPDATE awscc.frauddetector.variables
SET PatchDocument = string('{{ {
"DataSource": data_source,
"DataType": data_type,
"DefaultValue": default_value,
"Description": description,
"Tags": tags,
"VariableType": variable_type
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';

DELETE example

/*+ delete */
DELETE FROM awscc.frauddetector.variables
WHERE
Identifier = '{{ arn }}' AND
region = 'us-east-1';

Permissions

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

frauddetector:GetVariables,
frauddetector:CreateVariable,
frauddetector:ListTagsForResource,
frauddetector:TagResource