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
Idawscc.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 event trigger.
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.
use_historical_databooleanWhether to use historical data 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.
statusstringThe status of the calculated attribute definition.
readinessobjectThe readiness status of the calculated attribute.
tagsarrayAn array of key-value pairs to apply to this resource.
regionstringAWS region.

For more information, see AWS::CustomerProfiles::CalculatedAttributeDefinition.

Methods

NameResourceAccessible byRequired Params
create_resourcecalculated_attribute_definitionsINSERTDomainName, CalculatedAttributeName, AttributeDetails, Statistic, region
delete_resourcecalculated_attribute_definitionsDELETEIdentifier, region
update_resourcecalculated_attribute_definitionsUPDATEIdentifier, PatchDocument, region
list_resourcescalculated_attribute_definitions_list_onlySELECTregion
get_resourcecalculated_attribute_definitionsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual calculated_attribute_definition.

SELECT
region,
domain_name,
calculated_attribute_name,
display_name,
description,
attribute_details,
conditions,
statistic,
use_historical_data,
created_at,
last_updated_at,
status,
readiness,
tags
FROM awscc.customerprofiles.calculated_attribute_definitions
WHERE
region = 'us-east-1' AND
Identifier = '{{ domain_name }}|{{ calculated_attribute_name }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.customerprofiles.calculated_attribute_definitions (
DomainName,
CalculatedAttributeName,
AttributeDetails,
Statistic,
region
)
SELECT
'{{ domain_name }}',
'{{ calculated_attribute_name }}',
'{{ attribute_details }}',
'{{ statistic }}',
'{{ region }}';

UPDATE example

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

/*+ update */
UPDATE awscc.customerprofiles.calculated_attribute_definitions
SET PatchDocument = string('{{ {
"DisplayName": display_name,
"Description": description,
"AttributeDetails": attribute_details,
"Statistic": statistic,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ domain_name }}|{{ calculated_attribute_name }}';

DELETE example

/*+ delete */
DELETE FROM awscc.customerprofiles.calculated_attribute_definitions
WHERE
Identifier = '{{ domain_name }}|{{ calculated_attribute_name }}' AND
region = 'us-east-1';

Permissions

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

profile:CreateCalculatedAttributeDefinition,
profile:TagResource