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
- get (all properties)
- list (identifiers only)
| 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. |
| Name | Datatype | Description |
|---|---|---|
computation_model_id | string | The ID of the computation model. |
region | string | AWS region. |
For more information, see AWS::IoTSiteWise::ComputationModel.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | computation_models | INSERT | ComputationModelName, ComputationModelConfiguration, ComputationModelDataBinding, region |
delete_resource | computation_models | DELETE | Identifier, region |
update_resource | computation_models | UPDATE | Identifier, PatchDocument, region |
list_resources | computation_models_list_only | SELECT | region |
get_resource | computation_models | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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
Identifier = '{{ computation_model_id }}';
Lists all computation_models in a region.
SELECT
region,
computation_model_id
FROM awscc.iotsitewise.computation_models_list_only
WHERE
region = 'us-east-1';
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
'{{ computation_model_name }}',
'{{ computation_model_configuration }}',
'{{ computation_model_data_binding }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.iotsitewise.computation_models (
ComputationModelName,
ComputationModelDescription,
ComputationModelConfiguration,
ComputationModelDataBinding,
Tags,
region
)
SELECT
'{{ computation_model_name }}',
'{{ computation_model_description }}',
'{{ computation_model_configuration }}',
'{{ computation_model_data_binding }}',
'{{ 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: computation_model_name
value: '{{ computation_model_name }}'
- name: computation_model_description
value: '{{ computation_model_description }}'
- name: computation_model_configuration
value:
anomaly_detection:
input_properties: '{{ input_properties }}'
result_property: '{{ result_property }}'
- name: computation_model_data_binding
value: {}
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a computation_model resource, using stack-deploy.
/*+ update */
UPDATE awscc.iotsitewise.computation_models
SET PatchDocument = string('{{ {
"ComputationModelName": computation_model_name,
"ComputationModelDescription": computation_model_description,
"ComputationModelConfiguration": computation_model_configuration,
"ComputationModelDataBinding": computation_model_data_binding,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ computation_model_id }}';
DELETE example
/*+ delete */
DELETE FROM awscc.iotsitewise.computation_models
WHERE
Identifier = '{{ computation_model_id }}' AND
region = 'us-east-1';
Permissions
To operate on the computation_models resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
iotsitewise:CreateComputationModel,
iotsitewise:DescribeComputationModel,
iotsitewise:ListTagsForResource,
iotsitewise:TagResource
iotsitewise:DescribeComputationModel,
iotsitewise:ListTagsForResource
iotsitewise:UpdateComputationModel,
iotsitewise:DescribeComputationModel,
iotsitewise:ListTagsForResource,
iotsitewise:TagResource,
iotsitewise:UntagResource
iotsitewise:DeleteComputationModel,
iotsitewise:DescribeComputationModel,
iotsitewise:ListTagsForResource
iotsitewise:ListComputationModels,
iotsitewise:ListTagsForResource