variables
Creates, updates, deletes or gets a variable
resource or lists variables
in a region
Overview
Name | variables |
Type | Resource |
Description | A resource schema for a Variable in Amazon Fraud Detector. |
Id | aws.frauddetector.variables |
Fields
Name | Datatype | Description |
---|---|---|
name | string | The name of the variable. |
data_source | string | The source of the data. |
data_type | string | The data type. |
default_value | string | The default value for the variable when no value is received. |
description | string | The description. |
tags | array | Tags associated with this variable. |
variable_type | string | The variable type. For more information see https://docs.aws.amazon.com/frauddetector/latest/ug/create-a-variable.html#variable-types |
arn | string | The ARN of the variable. |
created_time | string | The time when the variable was created. |
last_updated_time | string | The time when the variable was last updated. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | DataType, DataSource, DefaultValue, 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 variables
in a region.
SELECT
region,
name,
data_source,
data_type,
default_value,
description,
tags,
variable_type,
arn,
created_time,
last_updated_time
FROM aws.frauddetector.variables
WHERE region = 'us-east-1';
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 aws.frauddetector.variables
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';
INSERT
example
Use the following StackQL query and manifest file to create a new variable
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.frauddetector.variables (
Name,
DataSource,
DataType,
DefaultValue,
region
)
SELECT
'{{ Name }}',
'{{ DataSource }}',
'{{ DataType }}',
'{{ DefaultValue }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.frauddetector.variables (
Name,
DataSource,
DataType,
DefaultValue,
Description,
Tags,
VariableType,
region
)
SELECT
'{{ Name }}',
'{{ DataSource }}',
'{{ DataType }}',
'{{ DefaultValue }}',
'{{ Description }}',
'{{ Tags }}',
'{{ VariableType }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: variable
props:
- name: Name
value: '{{ Name }}'
- name: DataSource
value: '{{ DataSource }}'
- name: DataType
value: '{{ DataType }}'
- name: DefaultValue
value: '{{ DefaultValue }}'
- name: Description
value: '{{ Description }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
- name: VariableType
value: '{{ VariableType }}'
DELETE
example
/*+ delete */
DELETE FROM aws.frauddetector.variables
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';
Permissions
To operate on the variables
resource, the following permissions are required:
Create
frauddetector:GetVariables,
frauddetector:CreateVariable,
frauddetector:ListTagsForResource,
frauddetector:TagResource
Read
frauddetector:GetVariables,
frauddetector:ListTagsForResource
Update
frauddetector:GetVariables,
frauddetector:UpdateVariable,
frauddetector:ListTagsForResource,
frauddetector:TagResource,
frauddetector:UntagResource
Delete
frauddetector:GetVariables,
frauddetector:DeleteVariable
List
frauddetector:GetVariables,
frauddetector:ListTagsForResource