Skip to main content

calculated_attribute_definitions

Creates, updates, deletes or gets a calculated_attribute_definition resource or lists calculated_attribute_definitions in a region

Overview

Namecalculated_attribute_definitions
TypeResource
DescriptionA calculated attribute definition for Customer Profiles
Idaws.customerprofiles.calculated_attribute_definitions

Fields

NameDatatypeDescription
domain_namestringThe unique name of the domain.
calculated_attribute_namestringThe unique name of the calculated attribute.
display_namestringThe display name of the calculated attribute.
descriptionstringThe description of the calculated attribute.
attribute_detailsobjectMathematical expression and a list of attribute items specified in that expression.
conditionsobjectThe conditions including range, object count, and threshold for the calculated attribute.
statisticstringThe aggregation operation to perform for the calculated attribute.
created_atstringThe timestamp of when the calculated attribute definition was created.
last_updated_atstringThe timestamp of when the calculated attribute definition was most recently edited.
tagsarrayAn array of key-value pairs to apply to this resource.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTDomainName, CalculatedAttributeName, AttributeDetails, Statistic, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all calculated_attribute_definitions in a region.

SELECT
region,
domain_name,
calculated_attribute_name,
display_name,
description,
attribute_details,
conditions,
statistic,
created_at,
last_updated_at,
tags
FROM aws.customerprofiles.calculated_attribute_definitions
WHERE region = 'us-east-1';

Gets all properties from an individual calculated_attribute_definition.

SELECT
region,
domain_name,
calculated_attribute_name,
display_name,
description,
attribute_details,
conditions,
statistic,
created_at,
last_updated_at,
tags
FROM aws.customerprofiles.calculated_attribute_definitions
WHERE region = 'us-east-1' AND data__Identifier = '<DomainName>|<CalculatedAttributeName>';

INSERT example

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

/*+ create */
INSERT INTO aws.customerprofiles.calculated_attribute_definitions (
DomainName,
CalculatedAttributeName,
AttributeDetails,
Statistic,
region
)
SELECT
'{{ DomainName }}',
'{{ CalculatedAttributeName }}',
'{{ AttributeDetails }}',
'{{ Statistic }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.customerprofiles.calculated_attribute_definitions
WHERE data__Identifier = '<DomainName|CalculatedAttributeName>'
AND region = 'us-east-1';

Permissions

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

Create

profile:CreateCalculatedAttributeDefinition,
profile:TagResource

Read

profile:GetCalculatedAttributeDefinition

Update

profile:GetCalculatedAttributeDefinition,
profile:UpdateCalculatedAttributeDefinition,
profile:UntagResource,
profile:TagResource

Delete

profile:DeleteCalculatedAttributeDefinition

List

profile:ListCalculatedAttributeDefinitions