event_types
Creates, updates, deletes or gets an event_type resource or lists event_types in a region
Overview
| Name | event_types |
| Type | Resource |
| Description | A resource schema for an EventType in Amazon Fraud Detector. |
| Id | awscc.frauddetector.event_types |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
name | string | The name for the event type |
tags | array | Tags associated with this event type. |
description | string | The description of the event type. |
event_variables | array | |
labels | array | |
entity_types | array | |
arn | string | The ARN of the event type. |
created_time | string | The time when the event type was created. |
last_updated_time | string | The time when the event type was last updated. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
arn | string | The ARN of the event type. |
region | string | AWS region. |
For more information, see AWS::FraudDetector::EventType.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | event_types | INSERT | EntityTypes, EventVariables, Labels, Name, region |
delete_resource | event_types | DELETE | Identifier, region |
update_resource | event_types | UPDATE | Identifier, PatchDocument, region |
list_resources | event_types_list_only | SELECT | region |
get_resource | event_types | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual event_type.
SELECT
region,
name,
tags,
description,
event_variables,
labels,
entity_types,
arn,
created_time,
last_updated_time
FROM awscc.frauddetector.event_types
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';
Lists all event_types in a region.
SELECT
region,
arn
FROM awscc.frauddetector.event_types_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new event_type resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.frauddetector.event_types (
Name,
EventVariables,
Labels,
EntityTypes,
region
)
SELECT
'{{ name }}',
'{{ event_variables }}',
'{{ labels }}',
'{{ entity_types }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.frauddetector.event_types (
Name,
Tags,
Description,
EventVariables,
Labels,
EntityTypes,
region
)
SELECT
'{{ name }}',
'{{ tags }}',
'{{ description }}',
'{{ event_variables }}',
'{{ labels }}',
'{{ entity_types }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: event_type
props:
- name: name
value: '{{ name }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
- name: description
value: '{{ description }}'
- name: event_variables
value:
- arn: '{{ arn }}'
inline: '{{ inline }}'
name: '{{ name }}'
data_source: '{{ data_source }}'
data_type: '{{ data_type }}'
default_value: '{{ default_value }}'
variable_type: '{{ variable_type }}'
description: '{{ description }}'
tags:
- null
created_time: '{{ created_time }}'
last_updated_time: '{{ last_updated_time }}'
- name: labels
value:
- name: '{{ name }}'
tags:
- null
description: '{{ description }}'
- name: entity_types
value:
- arn: '{{ arn }}'
inline: '{{ inline }}'
name: '{{ name }}'
description: '{{ description }}'
tags:
- null
created_time: '{{ created_time }}'
last_updated_time: '{{ last_updated_time }}'
UPDATE example
Use the following StackQL query and manifest file to update a event_type resource, using stack-deploy.
/*+ update */
UPDATE awscc.frauddetector.event_types
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.event_types
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:
| Parameter | Description |
|---|---|
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 event_types resource, the following permissions are required:
- Create
- Update
- Delete
- Read
- List
frauddetector:BatchCreateVariable,
frauddetector:BatchGetVariable,
frauddetector:CreateVariable,
frauddetector:GetVariables,
frauddetector:PutLabel,
frauddetector:PutEntityType,
frauddetector:PutEventType,
frauddetector:GetEventTypes,
frauddetector:GetLabels,
frauddetector:GetEntityTypes,
frauddetector:ListTagsForResource,
frauddetector:TagResource
frauddetector:BatchCreateVariable,
frauddetector:BatchGetVariable,
frauddetector:CreateVariable,
frauddetector:UpdateVariable,
frauddetector:GetVariables,
frauddetector:PutLabel,
frauddetector:PutEntityType,
frauddetector:PutEventType,
frauddetector:GetEventTypes,
frauddetector:GetLabels,
frauddetector:GetEntityTypes,
frauddetector:DeleteEventType,
frauddetector:DeleteVariable,
frauddetector:DeleteLabel,
frauddetector:DeleteEntityType,
frauddetector:ListTagsForResource,
frauddetector:TagResource,
frauddetector:UntagResource
frauddetector:BatchGetVariable,
frauddetector:GetVariables,
frauddetector:GetEventTypes,
frauddetector:GetLabels,
frauddetector:GetEntityTypes,
frauddetector:DeleteEventType,
frauddetector:DeleteVariable,
frauddetector:DeleteLabel,
frauddetector:DeleteEntityType,
frauddetector:ListTagsForResource
frauddetector:BatchGetVariable,
frauddetector:GetVariables,
frauddetector:GetEventTypes,
frauddetector:GetLabels,
frauddetector:GetEntityTypes,
frauddetector:ListTagsForResource
frauddetector:BatchGetVariable,
frauddetector:GetVariables,
frauddetector:GetEventTypes,
frauddetector:GetLabels,
frauddetector:GetEntityTypes,
frauddetector:ListTagsForResource