Skip to content
v2.278.0

CfnCalculatedAttributeDefinitionProps Struct ​

Properties for defining a CfnCalculatedAttributeDefinition.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_customerprofiles as customerprofiles } from 'aws-cdk-lib';
const cfnCalculatedAttributeDefinitionProps: customerprofiles.CfnCalculatedAttributeDefinitionProps = {
  attributeDetails: {
    attributes: [{
      name: 'name',
    }],
    expression: 'expression',
  },
  calculatedAttributeName: 'calculatedAttributeName',
  domainName: 'domainName',
  statistic: 'statistic',

  // the properties below are optional
  conditions: {
    objectCount: 123,
    range: {
      timestampFormat: 'timestampFormat',
      timestampSource: 'timestampSource',
      unit: 'unit',
      value: 123,
      valueRange: {
        end: 123,
        start: 123,
      },
    },
    threshold: {
      operator: 'operator',
      value: 'value',
    },
  },
  description: 'description',
  displayName: 'displayName',
  filter: {
    groups: [{
      dimensions: [{
        attributes: {
          attributesKey: {
            dimensionType: 'dimensionType',
            values: ['values'],
          },
        },
      }],
      type: 'type',
    }],
    include: 'include',
  },
  tags: [{
    key: 'key',
    value: 'value',
  }],
  useHistoricalData: false,
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_customerprofiles as customerprofiles

cfn_calculated_attribute_definition_props = customerprofiles.CfnCalculatedAttributeDefinitionProps(
    attribute_details=customerprofiles.CfnCalculatedAttributeDefinition.AttributeDetailsProperty(
        attributes=[customerprofiles.CfnCalculatedAttributeDefinition.AttributeItemProperty(
            name="name"
        )],
        expression="expression"
    ),
    calculated_attribute_name="calculatedAttributeName",
    domain_name="domainName",
    statistic="statistic",

    # the properties below are optional
    conditions=customerprofiles.CfnCalculatedAttributeDefinition.ConditionsProperty(
        object_count=123,
        range=customerprofiles.CfnCalculatedAttributeDefinition.RangeProperty(
            timestamp_format="timestampFormat",
            timestamp_source="timestampSource",
            unit="unit",
            value=123,
            value_range=customerprofiles.CfnCalculatedAttributeDefinition.ValueRangeProperty(
                end=123,
                start=123
            )
        ),
        threshold=customerprofiles.CfnCalculatedAttributeDefinition.ThresholdProperty(
            operator="operator",
            value="value"
        )
    ),
    description="description",
    display_name="displayName",
    filter=customerprofiles.CfnCalculatedAttributeDefinition.FilterProperty(
        groups=[customerprofiles.CfnCalculatedAttributeDefinition.FilterGroupProperty(
            dimensions=[customerprofiles.CfnCalculatedAttributeDefinition.FilterDimensionProperty(
                attributes={
                    "attributes_key": customerprofiles.CfnCalculatedAttributeDefinition.FilterAttributeDimensionProperty(
                        dimension_type="dimensionType",
                        values=["values"]
                    )
                }
            )],
            type="type"
        )],
        include="include"
    ),
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    use_historical_data=False
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.customerprofiles.*;

CfnCalculatedAttributeDefinitionProps cfnCalculatedAttributeDefinitionProps = CfnCalculatedAttributeDefinitionProps.builder()
        .attributeDetails(AttributeDetailsProperty.builder()
                .attributes(List.of(AttributeItemProperty.builder()
                        .name("name")
                        .build()))
                .expression("expression")
                .build())
        .calculatedAttributeName("calculatedAttributeName")
        .domainName("domainName")
        .statistic("statistic")

        // the properties below are optional
        .conditions(ConditionsProperty.builder()
                .objectCount(123)
                .range(RangeProperty.builder()
                        .timestampFormat("timestampFormat")
                        .timestampSource("timestampSource")
                        .unit("unit")
                        .value(123)
                        .valueRange(ValueRangeProperty.builder()
                                .end(123)
                                .start(123)
                                .build())
                        .build())
                .threshold(ThresholdProperty.builder()
                        .operator("operator")
                        .value("value")
                        .build())
                .build())
        .description("description")
        .displayName("displayName")
        .filter(FilterProperty.builder()
                .groups(List.of(FilterGroupProperty.builder()
                        .dimensions(List.of(FilterDimensionProperty.builder()
                                .attributes(Map.of(
                                        "attributesKey", FilterAttributeDimensionProperty.builder()
                                                .dimensionType("dimensionType")
                                                .values(List.of("values"))
                                                .build()))
                                .build()))
                        .type("type")
                        .build()))
                .include("include")
                .build())
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .useHistoricalData(false)
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CustomerProfiles;

var cfnCalculatedAttributeDefinitionProps = new CfnCalculatedAttributeDefinitionProps {
    AttributeDetails = new AttributeDetailsProperty {
        Attributes = new [] { new AttributeItemProperty {
            Name = "name"
        } },
        Expression = "expression"
    },
    CalculatedAttributeName = "calculatedAttributeName",
    DomainName = "domainName",
    Statistic = "statistic",

    // the properties below are optional
    Conditions = new ConditionsProperty {
        ObjectCount = 123,
        Range = new RangeProperty {
            TimestampFormat = "timestampFormat",
            TimestampSource = "timestampSource",
            Unit = "unit",
            Value = 123,
            ValueRange = new ValueRangeProperty {
                End = 123,
                Start = 123
            }
        },
        Threshold = new ThresholdProperty {
            Operator = "operator",
            Value = "value"
        }
    },
    Description = "description",
    DisplayName = "displayName",
    Filter = new FilterProperty {
        Groups = new [] { new FilterGroupProperty {
            Dimensions = new [] { new FilterDimensionProperty {
                Attributes = new Dictionary<string, object> {
                    { "attributesKey", new FilterAttributeDimensionProperty {
                        DimensionType = "dimensionType",
                        Values = new [] { "values" }
                    } }
                }
            } },
            Type = "type"
        } },
        Include = "include"
    },
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } },
    UseHistoricalData = false
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnCalculatedAttributeDefinitionProps := &CfnCalculatedAttributeDefinitionProps{
	AttributeDetails: &AttributeDetailsProperty{
		Attributes: []interface{}{
			&AttributeItemProperty{
				Name: jsii.String("name"),
			},
		},
		Expression: jsii.String("expression"),
	},
	CalculatedAttributeName: jsii.String("calculatedAttributeName"),
	DomainName: jsii.String("domainName"),
	Statistic: jsii.String("statistic"),

	// the properties below are optional
	Conditions: &ConditionsProperty{
		ObjectCount: jsii.Number(123),
		Range: &RangeProperty{
			TimestampFormat: jsii.String("timestampFormat"),
			TimestampSource: jsii.String("timestampSource"),
			Unit: jsii.String("unit"),
			Value: jsii.Number(123),
			ValueRange: &ValueRangeProperty{
				End: jsii.Number(123),
				Start: jsii.Number(123),
			},
		},
		Threshold: &ThresholdProperty{
			Operator: jsii.String("operator"),
			Value: jsii.String("value"),
		},
	},
	Description: jsii.String("description"),
	DisplayName: jsii.String("displayName"),
	Filter: &FilterProperty{
		Groups: []interface{}{
			&FilterGroupProperty{
				Dimensions: []interface{}{
					&FilterDimensionProperty{
						Attributes: map[string]interface{}{
							"attributesKey": &FilterAttributeDimensionProperty{
								"dimensionType": jsii.String("dimensionType"),
								"values": []*string{
									jsii.String("values"),
								},
							},
						},
					},
				},
				Type: jsii.String("type"),
			},
		},
		Include: jsii.String("include"),
	},
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
	UseHistoricalData: jsii.Boolean(false),
}

Properties ​

attributeDetailsIResolvable | CfnCalculatedAttributeDefinition.AttributeDetailsPropertyattribute_detailstyping.Union[IResolvable, AttributeDetailsProperty]attributeDetailsIResolvableAttributeDetailsIResolvableAttributeDetailsinterface{} required #
Mathematical expression and a list of attribute items specified in that expression.
calculatedAttributeNamestringcalculated_attribute_namestrcalculatedAttributeNameStringCalculatedAttributeNamestringCalculatedAttributeName*string required #
The name of an attribute defined in a profile object type.
conditionsoptionalIResolvable | CfnCalculatedAttributeDefinition.ConditionsPropertyconditionsoptionaltyping.Union[IResolvable, ConditionsProperty]conditionsoptionalIResolvableConditionsoptionalIResolvableConditionsoptionalinterface{} #
The conditions including range, object count, and threshold for the calculated attribute.
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #
The description of the calculated attribute.
displayNameoptionalstringdisplay_nameoptionalstrdisplayNameoptionalStringDisplayNameoptionalstringDisplayNameoptional*string #
The display name of the calculated attribute.
domainNamestringdomain_namestrdomainNameStringDomainNamestringDomainName*string required #
The unique name of the domain.
filteroptionalIResolvable | CfnCalculatedAttributeDefinition.FilterPropertyfilteroptionaltyping.Union[IResolvable, FilterProperty]filteroptionalIResolvableFilteroptionalIResolvableFilteroptionalinterface{} #
Defines how to filter the objects coming in for calculated attributes.
statisticstringstatisticstrstatisticStringStatisticstringStatistic*string required #
The aggregation operation to perform for the calculated attribute.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #
An array of key-value pairs to apply to this resource.
useHistoricalDataoptionalboolean | IResolvableuse_historical_dataoptionaltyping.Union[bool, IResolvable]useHistoricalDataoptionalBooleanUseHistoricalDataoptionalboolUseHistoricalDataoptionalinterface{} #
Whether historical data ingested before the Calculated Attribute was created should be included in calculations.