# CfnComputationModelProps

Struct · External

Properties for defining a `CfnComputationModel`.

Used as props by: [CfnComputationModel](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iotsitewise.CfnComputationModel.html)

- Source: Generated at build time
- Type last changed: v2.211.0 · 13 Aug 2025

## 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';

declare const computationModelDataBindingValueProperty_: iotsitewise.CfnComputationModel.ComputationModelDataBindingValueProperty;
const cfnComputationModelProps: iotsitewise.CfnComputationModelProps = {
  computationModelConfiguration: {
    anomalyDetection: {
      inputProperties: 'inputProperties',
      resultProperty: 'resultProperty',
    },
  },
  computationModelDataBinding: {
    computationModelDataBindingKey: {
      assetModelProperty: {
        assetModelId: 'assetModelId',
        propertyId: 'propertyId',
      },
      assetProperty: {
        assetId: 'assetId',
        propertyId: 'propertyId',
      },
      list: [computationModelDataBindingValueProperty_],
    },
  },
  computationModelName: 'computationModelName',

  // the properties below are optional
  computationModelDescription: 'computationModelDescription',
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
```

Python:

```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_iotsitewise as iotsitewise

# computation_model_data_binding_value_property_: iotsitewise.CfnComputationModel.ComputationModelDataBindingValueProperty

cfn_computation_model_props = iotsitewise.CfnComputationModelProps(
    computation_model_configuration=iotsitewise.CfnComputationModel.ComputationModelConfigurationProperty(
        anomaly_detection=iotsitewise.CfnComputationModel.AnomalyDetectionComputationModelConfigurationProperty(
            input_properties="inputProperties",
            result_property="resultProperty"
        )
    ),
    computation_model_data_binding={
        "computation_model_data_binding_key": iotsitewise.CfnComputationModel.ComputationModelDataBindingValueProperty(
            asset_model_property=iotsitewise.CfnComputationModel.AssetModelPropertyBindingValueProperty(
                asset_model_id="assetModelId",
                property_id="propertyId"
            ),
            asset_property=iotsitewise.CfnComputationModel.AssetPropertyBindingValueProperty(
                asset_id="assetId",
                property_id="propertyId"
            ),
            list=[computation_model_data_binding_value_property_]
        )
    },
    computation_model_name="computationModelName",

    # the properties below are optional
    computation_model_description="computationModelDescription",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
```

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

ComputationModelDataBindingValueProperty computationModelDataBindingValueProperty_;

CfnComputationModelProps cfnComputationModelProps = CfnComputationModelProps.builder()
        .computationModelConfiguration(ComputationModelConfigurationProperty.builder()
                .anomalyDetection(AnomalyDetectionComputationModelConfigurationProperty.builder()
                        .inputProperties("inputProperties")
                        .resultProperty("resultProperty")
                        .build())
                .build())
        .computationModelDataBinding(Map.of(
                "computationModelDataBindingKey", ComputationModelDataBindingValueProperty.builder()
                        .assetModelProperty(AssetModelPropertyBindingValueProperty.builder()
                                .assetModelId("assetModelId")
                                .propertyId("propertyId")
                                .build())
                        .assetProperty(AssetPropertyBindingValueProperty.builder()
                                .assetId("assetId")
                                .propertyId("propertyId")
                                .build())
                        .list(List.of(computationModelDataBindingValueProperty_))
                        .build()))
        .computationModelName("computationModelName")

        // the properties below are optional
        .computationModelDescription("computationModelDescription")
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .build();
```

C#:

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

ComputationModelDataBindingValueProperty computationModelDataBindingValueProperty_;

var cfnComputationModelProps = new CfnComputationModelProps {
    ComputationModelConfiguration = new ComputationModelConfigurationProperty {
        AnomalyDetection = new AnomalyDetectionComputationModelConfigurationProperty {
            InputProperties = "inputProperties",
            ResultProperty = "resultProperty"
        }
    },
    ComputationModelDataBinding = new Dictionary<string, object> {
        { "computationModelDataBindingKey", new ComputationModelDataBindingValueProperty {
            AssetModelProperty = new AssetModelPropertyBindingValueProperty {
                AssetModelId = "assetModelId",
                PropertyId = "propertyId"
            },
            AssetProperty = new AssetPropertyBindingValueProperty {
                AssetId = "assetId",
                PropertyId = "propertyId"
            },
            List = new [] { computationModelDataBindingValueProperty_ }
        } }
    },
    ComputationModelName = "computationModelName",

    // the properties below are optional
    ComputationModelDescription = "computationModelDescription",
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
```

Go:

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

var computationModelDataBindingValueProperty_ ComputationModelDataBindingValueProperty

cfnComputationModelProps := &CfnComputationModelProps{
	ComputationModelConfiguration: &ComputationModelConfigurationProperty{
		AnomalyDetection: &AnomalyDetectionComputationModelConfigurationProperty{
			InputProperties: jsii.String("inputProperties"),
			ResultProperty: jsii.String("resultProperty"),
		},
	},
	ComputationModelDataBinding: map[string]interface{}{
		"computationModelDataBindingKey": &ComputationModelDataBindingValueProperty{
			"assetModelProperty": &AssetModelPropertyBindingValueProperty{
				"assetModelId": jsii.String("assetModelId"),
				"propertyId": jsii.String("propertyId"),
			},
			"assetProperty": &AssetPropertyBindingValueProperty{
				"assetId": jsii.String("assetId"),
				"propertyId": jsii.String("propertyId"),
			},
			"list": []interface{}{
				computationModelDataBindingValueProperty_,
			},
		},
	},
	ComputationModelName: jsii.String("computationModelName"),

	// the properties below are optional
	ComputationModelDescription: jsii.String("computationModelDescription"),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}
```

## Properties

- `computationModelConfiguration`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnComputationModel.ComputationModelConfigurationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iotsitewise.CfnComputationModel.ComputationModelConfigurationProperty.html) (required) — The configuration for the computation model.

- `computationModelDataBinding`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | { [key: string]: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnComputationModel.ComputationModelDataBindingValueProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iotsitewise.CfnComputationModel.ComputationModelDataBindingValueProperty.html) } (required) — The data binding for the computation model.

  Key is a variable name defined in configuration. Value is a `ComputationModelDataBindingValue` referenced by the variable.

- `computationModelDescription`: string — The description of the computation model.

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

- `tags`: [CfnTag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — A list of key-value pairs that contain metadata for the asset.

  For more information, see [Tagging your AWS IoT SiteWise resources](https://docs.aws.amazon.com/iot-sitewise/latest/userguide/tag-resources.html) in the *AWS IoT SiteWise User Guide* .
