computation_models
Creates, updates, deletes or gets a computation_model resource or lists computation_models in a region
Overview
| Name | computation_models |
| Type | Resource |
| Description | Resource schema for AWS::IoTSiteWise::ComputationModel. |
| Id | awscc.iotsitewise.computation_models |
Fields
| Name | Datatype | Description |
|---|---|---|
computation_model_id | string | The ID of the computation model. |
computation_model_arn | string | The ARN of the computation model. |
computation_model_name | string | The name of the computation model. |
computation_model_description | string | A description about the computation model. |
computation_model_configuration | object | The configuration for the computation model. |
computation_model_data_binding | object | The data binding for the computation model. |
tags | array | An array of key-value pairs to apply to this resource. |
region | string | AWS region. |
For more information, see AWS::IoTSiteWise::ComputationModel.
Methods
| Name | Accessible by | Required Params |
|---|---|---|
create_resource | INSERT | ComputationModelName, ComputationModelConfiguration, ComputationModelDataBinding, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT examples
Gets all properties from an individual computation_model.
SELECT
region,
computation_model_id,
computation_model_arn,
computation_model_name,
computation_model_description,
computation_model_configuration,
computation_model_data_binding,
tags
FROM awscc.iotsitewise.computation_models
WHERE region = 'us-east-1' AND data__Identifier = '<ComputationModelId>';
INSERT example
Use the following StackQL query and manifest file to create a new computation_model resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.iotsitewise.computation_models (
ComputationModelName,
ComputationModelConfiguration,
ComputationModelDataBinding,
region
)
SELECT
'{{ ComputationModelName }}',
'{{ ComputationModelConfiguration }}',
'{{ ComputationModelDataBinding }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.iotsitewise.computation_models (
ComputationModelName,
ComputationModelDescription,
ComputationModelConfiguration,
ComputationModelDataBinding,
Tags,
region
)
SELECT
'{{ ComputationModelName }}',
'{{ ComputationModelDescription }}',
'{{ ComputationModelConfiguration }}',
'{{ ComputationModelDataBinding }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: computation_model
props:
- name: ComputationModelName
value: '{{ ComputationModelName }}'
- name: ComputationModelDescription
value: '{{ ComputationModelDescription }}'
- name: ComputationModelConfiguration
value:
AnomalyDetection:
InputProperties: '{{ InputProperties }}'
ResultProperty: '{{ ResultProperty }}'
- name: ComputationModelDataBinding
value: {}
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE example
/*+ delete */
DELETE FROM awscc.iotsitewise.computation_models
WHERE data__Identifier = '<ComputationModelId>'
AND region = 'us-east-1';
Permissions
To operate on the computation_models resource, the following permissions are required:
Create
iotsitewise:CreateComputationModel,
iotsitewise:DescribeComputationModel,
iotsitewise:ListTagsForResource,
iotsitewise:TagResource
Read
iotsitewise:DescribeComputationModel,
iotsitewise:ListTagsForResource
Update
iotsitewise:UpdateComputationModel,
iotsitewise:DescribeComputationModel,
iotsitewise:ListTagsForResource,
iotsitewise:TagResource,
iotsitewise:UntagResource
Delete
iotsitewise:DeleteComputationModel,
iotsitewise:DescribeComputationModel,
iotsitewise:ListTagsForResource
List
iotsitewise:ListComputationModels,
iotsitewise:ListTagsForResource