create_calculated_attribute_definition
¶
create_calculated_attribute_definition(
domain_name: name,
calculated_attribute_name: typeName,
attribute_details: AttributeDetails,
statistic: Statistic,
*,
config_overrides: Optional[CustomerProfilesClientConfig] = None,
display_name: Optional[displayName] = None,
description: Optional[sensitiveText] = None,
conditions: Optional[Conditions] = None,
filter: Optional[Filter] = None,
use_historical_data: Optional[optionalBoolean] = None,
tags: Optional[TagMap] = None,
) -> CreateCalculatedAttributeDefinitionResponse
Creates a new calculated attribute definition. After creation, new object data ingested into Customer Profiles will be included in the calculated attribute, which can be retrieved for a profile using the GetCalculatedAttributeForProfile API. Defining a calculated attribute makes it available for all profiles within a domain. Each calculated attribute can only reference one ObjectType and at most, two fields from that ObjectType.
Parameters:
-
domain_name(name) –The unique name of the domain.
-
calculated_attribute_name(typeName) –The unique name of the calculated attribute.
-
display_name(Optional[displayName], default:None) –The display name of the calculated attribute.
-
description(Optional[sensitiveText], default:None) –The description of the calculated attribute.
-
attribute_details(AttributeDetails) –Mathematical expression and a list of attribute items specified in that expression.
-
conditions(Optional[Conditions], default:None) –The conditions including range, object count, and threshold for the calculated attribute.
-
filter(Optional[Filter], default:None) –Defines how to filter incoming objects to include part of the Calculated Attribute.
-
statistic(Statistic) –The aggregation operation to perform for the calculated attribute.
-
use_historical_data(Optional[optionalBoolean], default:None) –Whether historical data ingested before the Calculated Attribute was created should be included in calculations.
-
tags(Optional[TagMap], default:None) –The tags used to organize, track, or control access for this resource.
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action.
-
BadRequestException–The input you provided is invalid.
-
InternalServerException–An internal service error occurred.
-
ResourceNotFoundException–The requested resource does not exist, or access was denied.
-
ThrottlingException–You exceeded the maximum number of requests.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_customer_profiles/_services/customer_profiles.py
925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 | |