# AssetModelCompositeModelProperty

Contains information about a composite model in an asset model.

This object contains the asset property definitions that you define in the composite model.

- Source: Generated at build time
- Type last changed: v2.132.0 · 9 Mar 2024

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_iotsitewise as iotsitewise } from 'aws-cdk-lib';
const assetModelCompositeModelProperty: iotsitewise.CfnAssetModel.AssetModelCompositeModelProperty = {
  name: 'name',
  type: 'type',

  // the properties below are optional
  composedAssetModelId: 'composedAssetModelId',
  compositeModelProperties: [{
    dataType: 'dataType',
    name: 'name',
    type: {
      typeName: 'typeName',

      // the properties below are optional
      attribute: {
        defaultValue: 'defaultValue',
      },
      metric: {
        expression: 'expression',
        variables: [{
          name: 'name',
          value: {
            hierarchyExternalId: 'hierarchyExternalId',
            hierarchyId: 'hierarchyId',
            hierarchyLogicalId: 'hierarchyLogicalId',
            propertyExternalId: 'propertyExternalId',
            propertyId: 'propertyId',
            propertyLogicalId: 'propertyLogicalId',
            propertyPath: [{
              name: 'name',
            }],
          },
        }],
        window: {
          tumbling: {
            interval: 'interval',

            // the properties below are optional
            offset: 'offset',
          },
        },
      },
      transform: {
        expression: 'expression',
        variables: [{
          name: 'name',
          value: {
            hierarchyExternalId: 'hierarchyExternalId',
            hierarchyId: 'hierarchyId',
            hierarchyLogicalId: 'hierarchyLogicalId',
            propertyExternalId: 'propertyExternalId',
            propertyId: 'propertyId',
            propertyLogicalId: 'propertyLogicalId',
            propertyPath: [{
              name: 'name',
            }],
          },
        }],
      },
    },

    // the properties below are optional
    dataTypeSpec: 'dataTypeSpec',
    externalId: 'externalId',
    id: 'id',
    logicalId: 'logicalId',
    unit: 'unit',
  }],
  description: 'description',
  externalId: 'externalId',
  id: 'id',
  parentAssetModelCompositeModelExternalId: 'parentAssetModelCompositeModelExternalId',
  path: ['path'],
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_iotsitewise as iotsitewise

asset_model_composite_model_property = iotsitewise.CfnAssetModel.AssetModelCompositeModelProperty(
    name="name",
    type="type",

    # the properties below are optional
    composed_asset_model_id="composedAssetModelId",
    composite_model_properties=[iotsitewise.CfnAssetModel.AssetModelPropertyProperty(
        data_type="dataType",
        name="name",
        type=iotsitewise.CfnAssetModel.PropertyTypeProperty(
            type_name="typeName",

            # the properties below are optional
            attribute=iotsitewise.CfnAssetModel.AttributeProperty(
                default_value="defaultValue"
            ),
            metric=iotsitewise.CfnAssetModel.MetricProperty(
                expression="expression",
                variables=[iotsitewise.CfnAssetModel.ExpressionVariableProperty(
                    name="name",
                    value=iotsitewise.CfnAssetModel.VariableValueProperty(
                        hierarchy_external_id="hierarchyExternalId",
                        hierarchy_id="hierarchyId",
                        hierarchy_logical_id="hierarchyLogicalId",
                        property_external_id="propertyExternalId",
                        property_id="propertyId",
                        property_logical_id="propertyLogicalId",
                        property_path=[iotsitewise.CfnAssetModel.PropertyPathDefinitionProperty(
                            name="name"
                        )]
                    )
                )],
                window=iotsitewise.CfnAssetModel.MetricWindowProperty(
                    tumbling=iotsitewise.CfnAssetModel.TumblingWindowProperty(
                        interval="interval",

                        # the properties below are optional
                        offset="offset"
                    )
                )
            ),
            transform=iotsitewise.CfnAssetModel.TransformProperty(
                expression="expression",
                variables=[iotsitewise.CfnAssetModel.ExpressionVariableProperty(
                    name="name",
                    value=iotsitewise.CfnAssetModel.VariableValueProperty(
                        hierarchy_external_id="hierarchyExternalId",
                        hierarchy_id="hierarchyId",
                        hierarchy_logical_id="hierarchyLogicalId",
                        property_external_id="propertyExternalId",
                        property_id="propertyId",
                        property_logical_id="propertyLogicalId",
                        property_path=[iotsitewise.CfnAssetModel.PropertyPathDefinitionProperty(
                            name="name"
                        )]
                    )
                )]
            )
        ),

        # the properties below are optional
        data_type_spec="dataTypeSpec",
        external_id="externalId",
        id="id",
        logical_id="logicalId",
        unit="unit"
    )],
    description="description",
    external_id="externalId",
    id="id",
    parent_asset_model_composite_model_external_id="parentAssetModelCompositeModelExternalId",
    path=["path"]
)
```

Java:

```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.iotsitewise.*;

AssetModelCompositeModelProperty assetModelCompositeModelProperty = AssetModelCompositeModelProperty.builder()
        .name("name")
        .type("type")

        // the properties below are optional
        .composedAssetModelId("composedAssetModelId")
        .compositeModelProperties(List.of(AssetModelPropertyProperty.builder()
                .dataType("dataType")
                .name("name")
                .type(PropertyTypeProperty.builder()
                        .typeName("typeName")

                        // the properties below are optional
                        .attribute(AttributeProperty.builder()
                                .defaultValue("defaultValue")
                                .build())
                        .metric(MetricProperty.builder()
                                .expression("expression")
                                .variables(List.of(ExpressionVariableProperty.builder()
                                        .name("name")
                                        .value(VariableValueProperty.builder()
                                                .hierarchyExternalId("hierarchyExternalId")
                                                .hierarchyId("hierarchyId")
                                                .hierarchyLogicalId("hierarchyLogicalId")
                                                .propertyExternalId("propertyExternalId")
                                                .propertyId("propertyId")
                                                .propertyLogicalId("propertyLogicalId")
                                                .propertyPath(List.of(PropertyPathDefinitionProperty.builder()
                                                        .name("name")
                                                        .build()))
                                                .build())
                                        .build()))
                                .window(MetricWindowProperty.builder()
                                        .tumbling(TumblingWindowProperty.builder()
                                                .interval("interval")

                                                // the properties below are optional
                                                .offset("offset")
                                                .build())
                                        .build())
                                .build())
                        .transform(TransformProperty.builder()
                                .expression("expression")
                                .variables(List.of(ExpressionVariableProperty.builder()
                                        .name("name")
                                        .value(VariableValueProperty.builder()
                                                .hierarchyExternalId("hierarchyExternalId")
                                                .hierarchyId("hierarchyId")
                                                .hierarchyLogicalId("hierarchyLogicalId")
                                                .propertyExternalId("propertyExternalId")
                                                .propertyId("propertyId")
                                                .propertyLogicalId("propertyLogicalId")
                                                .propertyPath(List.of(PropertyPathDefinitionProperty.builder()
                                                        .name("name")
                                                        .build()))
                                                .build())
                                        .build()))
                                .build())
                        .build())

                // the properties below are optional
                .dataTypeSpec("dataTypeSpec")
                .externalId("externalId")
                .id("id")
                .logicalId("logicalId")
                .unit("unit")
                .build()))
        .description("description")
        .externalId("externalId")
        .id("id")
        .parentAssetModelCompositeModelExternalId("parentAssetModelCompositeModelExternalId")
        .path(List.of("path"))
        .build();
```

C# / .NET:

```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.IoTSiteWise;

var assetModelCompositeModelProperty = new AssetModelCompositeModelProperty {
    Name = "name",
    Type = "type",

    // the properties below are optional
    ComposedAssetModelId = "composedAssetModelId",
    CompositeModelProperties = new [] { new AssetModelPropertyProperty {
        DataType = "dataType",
        Name = "name",
        Type = new PropertyTypeProperty {
            TypeName = "typeName",

            // the properties below are optional
            Attribute = new AttributeProperty {
                DefaultValue = "defaultValue"
            },
            Metric = new MetricProperty {
                Expression = "expression",
                Variables = new [] { new ExpressionVariableProperty {
                    Name = "name",
                    Value = new VariableValueProperty {
                        HierarchyExternalId = "hierarchyExternalId",
                        HierarchyId = "hierarchyId",
                        HierarchyLogicalId = "hierarchyLogicalId",
                        PropertyExternalId = "propertyExternalId",
                        PropertyId = "propertyId",
                        PropertyLogicalId = "propertyLogicalId",
                        PropertyPath = new [] { new PropertyPathDefinitionProperty {
                            Name = "name"
                        } }
                    }
                } },
                Window = new MetricWindowProperty {
                    Tumbling = new TumblingWindowProperty {
                        Interval = "interval",

                        // the properties below are optional
                        Offset = "offset"
                    }
                }
            },
            Transform = new TransformProperty {
                Expression = "expression",
                Variables = new [] { new ExpressionVariableProperty {
                    Name = "name",
                    Value = new VariableValueProperty {
                        HierarchyExternalId = "hierarchyExternalId",
                        HierarchyId = "hierarchyId",
                        HierarchyLogicalId = "hierarchyLogicalId",
                        PropertyExternalId = "propertyExternalId",
                        PropertyId = "propertyId",
                        PropertyLogicalId = "propertyLogicalId",
                        PropertyPath = new [] { new PropertyPathDefinitionProperty {
                            Name = "name"
                        } }
                    }
                } }
            }
        },

        // the properties below are optional
        DataTypeSpec = "dataTypeSpec",
        ExternalId = "externalId",
        Id = "id",
        LogicalId = "logicalId",
        Unit = "unit"
    } },
    Description = "description",
    ExternalId = "externalId",
    Id = "id",
    ParentAssetModelCompositeModelExternalId = "parentAssetModelCompositeModelExternalId",
    Path = new [] { "path" }
};
```

Golang:

```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"

assetModelCompositeModelProperty := &AssetModelCompositeModelProperty{
	Name: jsii.String("name"),
	Type: jsii.String("type"),

	// the properties below are optional
	ComposedAssetModelId: jsii.String("composedAssetModelId"),
	CompositeModelProperties: []interface{}{
		&AssetModelPropertyProperty{
			DataType: jsii.String("dataType"),
			Name: jsii.String("name"),
			Type: &PropertyTypeProperty{
				TypeName: jsii.String("typeName"),

				// the properties below are optional
				Attribute: &AttributeProperty{
					DefaultValue: jsii.String("defaultValue"),
				},
				Metric: &MetricProperty{
					Expression: jsii.String("expression"),
					Variables: []interface{}{
						&ExpressionVariableProperty{
							Name: jsii.String("name"),
							Value: &VariableValueProperty{
								HierarchyExternalId: jsii.String("hierarchyExternalId"),
								HierarchyId: jsii.String("hierarchyId"),
								HierarchyLogicalId: jsii.String("hierarchyLogicalId"),
								PropertyExternalId: jsii.String("propertyExternalId"),
								PropertyId: jsii.String("propertyId"),
								PropertyLogicalId: jsii.String("propertyLogicalId"),
								PropertyPath: []interface{}{
									&PropertyPathDefinitionProperty{
										Name: jsii.String("name"),
									},
								},
							},
						},
					},
					Window: &MetricWindowProperty{
						Tumbling: &TumblingWindowProperty{
							Interval: jsii.String("interval"),

							// the properties below are optional
							Offset: jsii.String("offset"),
						},
					},
				},
				Transform: &TransformProperty{
					Expression: jsii.String("expression"),
					Variables: []interface{}{
						&ExpressionVariableProperty{
							Name: jsii.String("name"),
							Value: &VariableValueProperty{
								HierarchyExternalId: jsii.String("hierarchyExternalId"),
								HierarchyId: jsii.String("hierarchyId"),
								HierarchyLogicalId: jsii.String("hierarchyLogicalId"),
								PropertyExternalId: jsii.String("propertyExternalId"),
								PropertyId: jsii.String("propertyId"),
								PropertyLogicalId: jsii.String("propertyLogicalId"),
								PropertyPath: []interface{}{
									&PropertyPathDefinitionProperty{
										Name: jsii.String("name"),
									},
								},
							},
						},
					},
				},
			},

			// the properties below are optional
			DataTypeSpec: jsii.String("dataTypeSpec"),
			ExternalId: jsii.String("externalId"),
			Id: jsii.String("id"),
			LogicalId: jsii.String("logicalId"),
			Unit: jsii.String("unit"),
		},
	},
	Description: jsii.String("description"),
	ExternalId: jsii.String("externalId"),
	Id: jsii.String("id"),
	ParentAssetModelCompositeModelExternalId: jsii.String("parentAssetModelCompositeModelExternalId"),
	Path: []*string{
		jsii.String("path"),
	},
}
```

## Properties

- `composedAssetModelId`: string — The ID of a component model which is reused to create this composite model.

- `compositeModelProperties`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnAssetModel.AssetModelPropertyProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iotsitewise.CfnAssetModel.AssetModelPropertyProperty.html)[] — The asset property definitions for this composite model.

- `description`: string — The description of the composite model.

  > If the composite model is a `component-model-based` composite model, the description is inherited from the `COMPONENT_MODEL` asset model and cannot be changed.

- `externalId`: string — The external ID of a composite model on this asset model.

  For more information, see [Using external IDs](https://docs.aws.amazon.com/iot-sitewise/latest/userguide/object-ids.html#external-ids) in the *AWS IoT SiteWise User Guide* .

  > One of `ExternalId` or `Path` must be specified.

- `id`: string — The ID of the asset model composite model.

  > This is a return value and can't be set.

- `name`: string (required) — The name of the composite model.

- `parentAssetModelCompositeModelExternalId`: string — The external ID of the parent composite model.

  For more information, see [Using external IDs](https://docs.aws.amazon.com/iot-sitewise/latest/userguide/object-ids.html#external-ids) in the *AWS IoT SiteWise User Guide* .

- `path`: string[] — The structured path to the property from the root of the asset using property names.

  Path is used as the ID if the asset model is a derived composite model.

  > One of `ExternalId` or `Path` must be specified.

- `type`: string (required) — The type of the composite model.

  For alarm composite models, this type is `AWS/ALARM` .
