Skip to main content

computation_models

Creates, updates, deletes or gets a computation_model resource or lists computation_models in a region

Overview

Namecomputation_models
TypeResource
DescriptionResource schema for AWS::IoTSiteWise::ComputationModel.
Idawscc.iotsitewise.computation_models

Fields

NameDatatypeDescription
computation_model_idstringThe ID of the computation model.
computation_model_arnstringThe ARN of the computation model.
computation_model_namestringThe name of the computation model.
computation_model_descriptionstringA description about the computation model.
computation_model_configurationobjectThe configuration for the computation model.
computation_model_data_bindingobjectThe data binding for the computation model.
tagsarrayAn array of key-value pairs to apply to this resource.
regionstringAWS region.

For more information, see AWS::IoTSiteWise::ComputationModel.

Methods

NameResourceAccessible byRequired Params
create_resourcecomputation_modelsINSERTComputationModelName, ComputationModelConfiguration, ComputationModelDataBinding, region
delete_resourcecomputation_modelsDELETEIdentifier, region
update_resourcecomputation_modelsUPDATEIdentifier, PatchDocument, region
list_resourcescomputation_models_list_onlySELECTregion
get_resourcecomputation_modelsSELECTIdentifier, 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 = '{{ region }}' AND
Identifier = '{{ computation_model_id }}';

INSERT example

Use the following StackQL query and manifest file to create a new computation_model resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.iotsitewise.computation_models (
ComputationModelName,
ComputationModelConfiguration,
ComputationModelDataBinding,
region
)
SELECT
'{{ computation_model_name }}',
'{{ computation_model_configuration }}',
'{{ computation_model_data_binding }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.iotsitewise.computation_models
WHERE
Identifier = '{{ computation_model_id }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

To operate on the computation_models resource, the following permissions are required:

iotsitewise:CreateComputationModel,
iotsitewise:DescribeComputationModel,
iotsitewise:ListTagsForResource,
iotsitewise:TagResource