diff --git a/.changes/unreleased/added-20250214-122903.yaml b/.changes/unreleased/added-20250214-122903.yaml
new file mode 100644
index 00000000..e5a2f528
--- /dev/null
+++ b/.changes/unreleased/added-20250214-122903.yaml
@@ -0,0 +1,5 @@
+kind: added
+body: Onboard new resource/data-source `fabric_activator` (also known as reflex).
+time: 2025-02-14T12:29:03.2906058+01:00
+custom:
+ Issue: "256"
diff --git a/.changes/unreleased/fixed-20250214-123021.yaml b/.changes/unreleased/fixed-20250214-123021.yaml
new file mode 100644
index 00000000..de6f30ce
--- /dev/null
+++ b/.changes/unreleased/fixed-20250214-123021.yaml
@@ -0,0 +1,5 @@
+kind: fixed
+body: Missing preview note in list data-sources
+time: 2025-02-14T12:30:21.0523343+01:00
+custom:
+ Issue: "256"
diff --git a/docs/data-sources/activator.md b/docs/data-sources/activator.md
new file mode 100644
index 00000000..2146c470
--- /dev/null
+++ b/docs/data-sources/activator.md
@@ -0,0 +1,103 @@
+---
+# generated by https://github.com/hashicorp/terraform-plugin-docs
+page_title: "fabric_activator Data Source - terraform-provider-fabric"
+subcategory: ""
+description: |-
+ Get a Fabric Activator (also known as Reflex).
+ Use this data source to fetch a Activator https://learn.microsoft.com/fabric/real-time-intelligence/event-streams/add-destination-activator.
+ -> This item does not support Service Principal. Please use a User context authentication.
+ ~> This data-source is in preview. To access it, you must explicitly enable the preview mode in the provider level configuration.
+---
+
+# fabric_activator (Data Source)
+
+Get a Fabric Activator (also known as Reflex).
+
+Use this data source to fetch a [Activator](https://learn.microsoft.com/fabric/real-time-intelligence/event-streams/add-destination-activator).
+
+-> This item does not support Service Principal. Please use a User context authentication.
+
+~> This data-source is in **preview**. To access it, you must explicitly enable the `preview` mode in the provider level configuration.
+
+## Example Usage
+
+```terraform
+# Get item details by name
+data "fabric_activator" "example_by_name" {
+ display_name = "example"
+ workspace_id = "00000000-0000-0000-0000-000000000000"
+}
+
+# Get item details by id
+data "fabric_activator" "example_by_id" {
+ id = "11111111-1111-1111-1111-111111111111"
+ workspace_id = "00000000-0000-0000-0000-000000000000"
+}
+
+# Get item details with definition
+# Examples uses `id` but `display_name` can be used as well
+data "fabric_activator" "example_definition" {
+ id = "11111111-1111-1111-1111-111111111111"
+ workspace_id = "00000000-0000-0000-0000-000000000000"
+ format = "Default"
+ output_definition = true
+}
+
+# Access the content of the definition with JSONPath expression
+output "example_definition_content_jsonpath" {
+ value = provider::fabric::content_decode(data.fabric_activator.example_definition.definition["ReflexEntities.json"].content, ".payload.tabs[0]")
+}
+
+# Access the content of the definition as JSON object
+output "example_definition_content_object" {
+ value = provider::fabric::content_decode(data.fabric_activator.example_definition.definition["ReflexEntities.json"].content).payload.tabs[0]
+}
+
+# This is an invalid data source
+# Do not specify `id` and `display_name` in the same data source block
+# data "fabric_activator" "example" {
+# display_name = "example"
+# id = "11111111-1111-1111-1111-111111111111"
+# workspace_id = "00000000-0000-0000-0000-000000000000"
+# }
+```
+
+
+## Schema
+
+### Required
+
+- `workspace_id` (String) The Workspace ID.
+
+### Optional
+
+- `display_name` (String) The Activator display name.
+- `format` (String) The Activator format. Possible values: `Default`
+- `id` (String) The Activator ID.
+- `output_definition` (Boolean) Output definition parts as gzip base64 content? Default: `false`
+
+!> Your terraform state file may grow a lot if you output definition content. Only use it when you must use data from the definition.
+
+- `timeouts` (Attributes) (see [below for nested schema](#nestedatt--timeouts))
+
+### Read-Only
+
+- `definition` (Attributes Map) Definition parts. Possible path keys: **Default** format: `ReflexEntities.json` (see [below for nested schema](#nestedatt--definition))
+- `description` (String) The Activator description.
+
+
+
+### Nested Schema for `timeouts`
+
+Optional:
+
+- `read` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
+
+
+
+### Nested Schema for `definition`
+
+Read-Only:
+
+- `content` (String) Gzip base64 content of definition part.
+Use [`provider::fabric::content_decode`](../functions/content_decode.md) function to decode content.
diff --git a/docs/data-sources/activators.md b/docs/data-sources/activators.md
new file mode 100644
index 00000000..0853328c
--- /dev/null
+++ b/docs/data-sources/activators.md
@@ -0,0 +1,62 @@
+---
+# generated by https://github.com/hashicorp/terraform-plugin-docs
+page_title: "fabric_activators Data Source - terraform-provider-fabric"
+subcategory: ""
+description: |-
+ List a Fabric Activators (also known as Reflex).
+ Use this data source to list Activators https://learn.microsoft.com/fabric/real-time-intelligence/event-streams/add-destination-activator.
+ -> This item does not support Service Principal. Please use a User context authentication.
+ ~> This data-source is in preview. To access it, you must explicitly enable the preview mode in the provider level configuration.
+---
+
+# fabric_activators (Data Source)
+
+List a Fabric Activators (also known as Reflex).
+
+Use this data source to list [Activators](https://learn.microsoft.com/fabric/real-time-intelligence/event-streams/add-destination-activator).
+
+-> This item does not support Service Principal. Please use a User context authentication.
+
+~> This data-source is in **preview**. To access it, you must explicitly enable the `preview` mode in the provider level configuration.
+
+## Example Usage
+
+```terraform
+data "fabric_activators" "example" {
+ workspace_id = "00000000-0000-0000-0000-000000000000"
+}
+```
+
+
+## Schema
+
+### Required
+
+- `workspace_id` (String) The Workspace ID.
+
+### Optional
+
+- `timeouts` (Attributes) (see [below for nested schema](#nestedatt--timeouts))
+
+### Read-Only
+
+- `values` (Attributes List) The list of Activators. (see [below for nested schema](#nestedatt--values))
+
+
+
+### Nested Schema for `timeouts`
+
+Optional:
+
+- `read` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
+
+
+
+### Nested Schema for `values`
+
+Read-Only:
+
+- `description` (String) The Activator description.
+- `display_name` (String) The Activator display name.
+- `id` (String) The Activator ID.
+- `workspace_id` (String) The Workspace ID.
diff --git a/docs/data-sources/data_pipelines.md b/docs/data-sources/data_pipelines.md
index 5ac7d547..f0281149 100644
--- a/docs/data-sources/data_pipelines.md
+++ b/docs/data-sources/data_pipelines.md
@@ -6,6 +6,7 @@ description: |-
List a Fabric Data Pipelines.
Use this data source to list Data Pipelines https://learn.microsoft.com/fabric/data-factory/data-factory-overview#data-pipelines.
-> This item does not support Service Principal. Please use a User context authentication.
+ ~> This data-source is in preview. To access it, you must explicitly enable the preview mode in the provider level configuration.
---
# fabric_data_pipelines (Data Source)
@@ -16,6 +17,8 @@ Use this data source to list [Data Pipelines](https://learn.microsoft.com/fabric
-> This item does not support Service Principal. Please use a User context authentication.
+~> This data-source is in **preview**. To access it, you must explicitly enable the `preview` mode in the provider level configuration.
+
## Example Usage
```terraform
diff --git a/docs/data-sources/eventstreams.md b/docs/data-sources/eventstreams.md
index c5a543eb..a50a047d 100644
--- a/docs/data-sources/eventstreams.md
+++ b/docs/data-sources/eventstreams.md
@@ -6,6 +6,7 @@ description: |-
List a Fabric Eventstreams.
Use this data source to list Eventstreams https://learn.microsoft.com/fabric/real-time-intelligence/event-streams/overview.
-> This item supports Service Principal authentication.
+ ~> This data-source is in preview. To access it, you must explicitly enable the preview mode in the provider level configuration.
---
# fabric_eventstreams (Data Source)
@@ -16,6 +17,8 @@ Use this data source to list [Eventstreams](https://learn.microsoft.com/fabric/r
-> This item supports Service Principal authentication.
+~> This data-source is in **preview**. To access it, you must explicitly enable the `preview` mode in the provider level configuration.
+
## Example Usage
```terraform
diff --git a/docs/data-sources/graphql_apis.md b/docs/data-sources/graphql_apis.md
index da16afe1..3ecf1190 100644
--- a/docs/data-sources/graphql_apis.md
+++ b/docs/data-sources/graphql_apis.md
@@ -6,6 +6,7 @@ description: |-
List a Fabric GraphQL APIs.
Use this data source to list GraphQL APIs https://learn.microsoft.com/fabric/data-engineering/api-graphql-overview.
-> This item supports Service Principal authentication.
+ ~> This data-source is in preview. To access it, you must explicitly enable the preview mode in the provider level configuration.
---
# fabric_graphql_apis (Data Source)
@@ -16,6 +17,8 @@ Use this data source to list [GraphQL APIs](https://learn.microsoft.com/fabric/d
-> This item supports Service Principal authentication.
+~> This data-source is in **preview**. To access it, you must explicitly enable the `preview` mode in the provider level configuration.
+
## Example Usage
```terraform
diff --git a/docs/data-sources/kql_querysets.md b/docs/data-sources/kql_querysets.md
index d66a9c60..4124b3a7 100644
--- a/docs/data-sources/kql_querysets.md
+++ b/docs/data-sources/kql_querysets.md
@@ -6,6 +6,7 @@ description: |-
List a Fabric KQL Querysets.
Use this data source to list KQL Querysets https://learn.microsoft.com/fabric/real-time-intelligence/kusto-query-set.
-> This item supports Service Principal authentication.
+ ~> This data-source is in preview. To access it, you must explicitly enable the preview mode in the provider level configuration.
---
# fabric_kql_querysets (Data Source)
@@ -16,6 +17,8 @@ Use this data source to list [KQL Querysets](https://learn.microsoft.com/fabric/
-> This item supports Service Principal authentication.
+~> This data-source is in **preview**. To access it, you must explicitly enable the `preview` mode in the provider level configuration.
+
## Example Usage
```terraform
diff --git a/docs/data-sources/mirrored_warehouses.md b/docs/data-sources/mirrored_warehouses.md
index 13a2480a..01713036 100644
--- a/docs/data-sources/mirrored_warehouses.md
+++ b/docs/data-sources/mirrored_warehouses.md
@@ -6,6 +6,7 @@ description: |-
List a Fabric Mirrored Warehouses.
Use this data source to list Mirrored Warehouses https://learn.microsoft.com/fabric/database/mirrored-database/overview.
-> This item does not support Service Principal. Please use a User context authentication.
+ ~> This data-source is in preview. To access it, you must explicitly enable the preview mode in the provider level configuration.
---
# fabric_mirrored_warehouses (Data Source)
@@ -16,6 +17,8 @@ Use this data source to list [Mirrored Warehouses](https://learn.microsoft.com/f
-> This item does not support Service Principal. Please use a User context authentication.
+~> This data-source is in **preview**. To access it, you must explicitly enable the `preview` mode in the provider level configuration.
+
## Example Usage
```terraform
diff --git a/docs/data-sources/ml_experiments.md b/docs/data-sources/ml_experiments.md
index 3b895366..5abe7d6e 100644
--- a/docs/data-sources/ml_experiments.md
+++ b/docs/data-sources/ml_experiments.md
@@ -6,6 +6,7 @@ description: |-
List a Fabric ML Experiments.
Use this data source to list ML Experiments https://learn.microsoft.com/fabric/data-science/machine-learning-experiment.
-> This item does not support Service Principal. Please use a User context authentication.
+ ~> This data-source is in preview. To access it, you must explicitly enable the preview mode in the provider level configuration.
---
# fabric_ml_experiments (Data Source)
@@ -16,6 +17,8 @@ Use this data source to list [ML Experiments](https://learn.microsoft.com/fabric
-> This item does not support Service Principal. Please use a User context authentication.
+~> This data-source is in **preview**. To access it, you must explicitly enable the `preview` mode in the provider level configuration.
+
## Example Usage
```terraform
diff --git a/docs/data-sources/ml_models.md b/docs/data-sources/ml_models.md
index 918b8747..9620a392 100644
--- a/docs/data-sources/ml_models.md
+++ b/docs/data-sources/ml_models.md
@@ -6,6 +6,7 @@ description: |-
List a Fabric ML Models.
Use this data source to list ML Models https://learn.microsoft.com/fabric/data-science/machine-learning-model.
-> This item does not support Service Principal. Please use a User context authentication.
+ ~> This data-source is in preview. To access it, you must explicitly enable the preview mode in the provider level configuration.
---
# fabric_ml_models (Data Source)
@@ -16,6 +17,8 @@ Use this data source to list [ML Models](https://learn.microsoft.com/fabric/data
-> This item does not support Service Principal. Please use a User context authentication.
+~> This data-source is in **preview**. To access it, you must explicitly enable the `preview` mode in the provider level configuration.
+
## Example Usage
```terraform
diff --git a/docs/data-sources/paginated_reports.md b/docs/data-sources/paginated_reports.md
index df7f2fd4..30630a63 100644
--- a/docs/data-sources/paginated_reports.md
+++ b/docs/data-sources/paginated_reports.md
@@ -6,6 +6,7 @@ description: |-
List a Fabric Paginated Reports.
Use this data source to list Paginated Reports https://learn.microsoft.com/power-bi/paginated-reports/web-authoring/get-started-paginated-formatted-table.
-> This item does not support Service Principal. Please use a User context authentication.
+ ~> This data-source is in preview. To access it, you must explicitly enable the preview mode in the provider level configuration.
---
# fabric_paginated_reports (Data Source)
@@ -16,6 +17,8 @@ Use this data source to list [Paginated Reports](https://learn.microsoft.com/pow
-> This item does not support Service Principal. Please use a User context authentication.
+~> This data-source is in **preview**. To access it, you must explicitly enable the `preview` mode in the provider level configuration.
+
## Example Usage
```terraform
diff --git a/docs/data-sources/sql_endpoints.md b/docs/data-sources/sql_endpoints.md
index 9ae8e6d4..3c68e6db 100644
--- a/docs/data-sources/sql_endpoints.md
+++ b/docs/data-sources/sql_endpoints.md
@@ -6,6 +6,7 @@ description: |-
List a Fabric SQL Endpoints.
Use this data source to list SQL Endpoints https://learn.microsoft.com/fabric/data-warehouse/data-warehousing#sql-analytics-endpoint-of-the-lakehouse.
-> This item does not support Service Principal. Please use a User context authentication.
+ ~> This data-source is in preview. To access it, you must explicitly enable the preview mode in the provider level configuration.
---
# fabric_sql_endpoints (Data Source)
@@ -16,6 +17,8 @@ Use this data source to list [SQL Endpoints](https://learn.microsoft.com/fabric/
-> This item does not support Service Principal. Please use a User context authentication.
+~> This data-source is in **preview**. To access it, you must explicitly enable the `preview` mode in the provider level configuration.
+
## Example Usage
```terraform
diff --git a/docs/resources/activator.md b/docs/resources/activator.md
new file mode 100644
index 00000000..fd4b8636
--- /dev/null
+++ b/docs/resources/activator.md
@@ -0,0 +1,119 @@
+---
+# generated by https://github.com/hashicorp/terraform-plugin-docs
+page_title: "fabric_activator Resource - terraform-provider-fabric"
+subcategory: ""
+description: |-
+ Manage a Fabric Activator (also known as Reflex).
+ Use this resource to manage Activator https://learn.microsoft.com/fabric/real-time-intelligence/event-streams/add-destination-activator.
+ -> This item does not support Service Principal. Please use a User context authentication.
+ ~> This resource is in preview. To access it, you must explicitly enable the preview mode in the provider level configuration.
+---
+
+# fabric_activator (Resource)
+
+Manage a Fabric Activator (also known as Reflex).
+
+Use this resource to manage [Activator](https://learn.microsoft.com/fabric/real-time-intelligence/event-streams/add-destination-activator).
+
+-> This item does not support Service Principal. Please use a User context authentication.
+
+~> This resource is in **preview**. To access it, you must explicitly enable the `preview` mode in the provider level configuration.
+
+## Example Usage
+
+```terraform
+# Example 1 - Item without definition
+resource "fabric_activator" "example" {
+ display_name = "example"
+ workspace_id = "00000000-0000-0000-0000-000000000000"
+}
+
+# Example 2 - Item with definition bootstrapping only
+resource "fabric_activator" "example_definition_bootstrap" {
+ display_name = "example"
+ description = "example with definition bootstrapping"
+ workspace_id = "00000000-0000-0000-0000-000000000000"
+ definition_update_enabled = false
+ format = "Default"
+ definition = {
+ "ReflexEntities.json" = {
+ source = "${local.path}/ReflexEntities.json"
+ }
+ }
+}
+
+# Example 3 - Item with definition update when source or tokens changed
+resource "fabric_activator" "example_definition_update" {
+ display_name = "example"
+ description = "example with definition update when source or tokens changed"
+ workspace_id = "00000000-0000-0000-0000-000000000000"
+ format = "Default"
+ definition = {
+ "ReflexEntities.json" = {
+ source = "${local.path}/ReflexEntities.json"
+ tokens = {
+ "MyValue1" = "my value 1"
+ "MyValue2" = "my value 2"
+ }
+ }
+ }
+}
+```
+
+
+## Schema
+
+### Required
+
+- `display_name` (String) The Activator display name.
+- `workspace_id` (String) The Workspace ID.
+
+### Optional
+
+- `definition` (Attributes Map) Definition parts. Read more about [Activator definition part paths](https://learn.microsoft.com/rest/api/fabric/articles/item-management/definitions/activator-definition). Accepted path keys: **Default** format: `ReflexEntities.json` (see [below for nested schema](#nestedatt--definition))
+- `definition_update_enabled` (Boolean) Update definition on change of source content. Default: `true`.
+- `description` (String) The Activator description.
+- `format` (String) The Activator format. Possible values: `Default`
+- `timeouts` (Attributes) (see [below for nested schema](#nestedatt--timeouts))
+
+### Read-Only
+
+- `id` (String) The Activator ID.
+
+
+
+### Nested Schema for `definition`
+
+Required:
+
+- `source` (String) Path to the file with source of the definition part.
+
+The source content may include placeholders for token substitution. Use the dot with the token name `{{ .TokenName }}`.
+
+Optional:
+
+- `tokens` (Map of String) A map of key/value pairs of tokens substitutes in the source.
+
+Read-Only:
+
+- `source_content_sha256` (String) SHA256 of source's content of definition part.
+
+
+
+### Nested Schema for `timeouts`
+
+Optional:
+
+- `create` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
+- `delete` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
+- `read` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
+- `update` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
+
+## Import
+
+Import is supported using the following syntax:
+
+```shell
+# terraform import fabric_activator.example "/"
+terraform import fabric_activator.example "00000000-0000-0000-0000-000000000000/11111111-1111-1111-1111-111111111111"
+```
diff --git a/examples/data-sources/fabric_activator/data-source.tf b/examples/data-sources/fabric_activator/data-source.tf
new file mode 100644
index 00000000..23ac34b3
--- /dev/null
+++ b/examples/data-sources/fabric_activator/data-source.tf
@@ -0,0 +1,38 @@
+# Get item details by name
+data "fabric_activator" "example_by_name" {
+ display_name = "example"
+ workspace_id = "00000000-0000-0000-0000-000000000000"
+}
+
+# Get item details by id
+data "fabric_activator" "example_by_id" {
+ id = "11111111-1111-1111-1111-111111111111"
+ workspace_id = "00000000-0000-0000-0000-000000000000"
+}
+
+# Get item details with definition
+# Examples uses `id` but `display_name` can be used as well
+data "fabric_activator" "example_definition" {
+ id = "11111111-1111-1111-1111-111111111111"
+ workspace_id = "00000000-0000-0000-0000-000000000000"
+ format = "Default"
+ output_definition = true
+}
+
+# Access the content of the definition with JSONPath expression
+output "example_definition_content_jsonpath" {
+ value = provider::fabric::content_decode(data.fabric_activator.example_definition.definition["ReflexEntities.json"].content, ".payload.tabs[0]")
+}
+
+# Access the content of the definition as JSON object
+output "example_definition_content_object" {
+ value = provider::fabric::content_decode(data.fabric_activator.example_definition.definition["ReflexEntities.json"].content).payload.tabs[0]
+}
+
+# This is an invalid data source
+# Do not specify `id` and `display_name` in the same data source block
+# data "fabric_activator" "example" {
+# display_name = "example"
+# id = "11111111-1111-1111-1111-111111111111"
+# workspace_id = "00000000-0000-0000-0000-000000000000"
+# }
diff --git a/examples/data-sources/fabric_activator/outputs.tf b/examples/data-sources/fabric_activator/outputs.tf
new file mode 100644
index 00000000..32d7effc
--- /dev/null
+++ b/examples/data-sources/fabric_activator/outputs.tf
@@ -0,0 +1,7 @@
+output "example_by_id" {
+ value = data.fabric_activator.example_by_id
+}
+
+output "example_by_name" {
+ value = data.fabric_activator.example_by_name
+}
diff --git a/examples/data-sources/fabric_activator/providers.tf b/examples/data-sources/fabric_activator/providers.tf
new file mode 100644
index 00000000..0c8bdbf5
--- /dev/null
+++ b/examples/data-sources/fabric_activator/providers.tf
@@ -0,0 +1,11 @@
+terraform {
+ required_version = ">= 1.8, < 2.0"
+ required_providers {
+ fabric = {
+ source = "microsoft/fabric"
+ version = "0.0.0" # Check for the latest version on the Terraform Registry
+ }
+ }
+}
+
+provider "fabric" {}
diff --git a/examples/data-sources/fabric_activators/data-source.tf b/examples/data-sources/fabric_activators/data-source.tf
new file mode 100644
index 00000000..1d8b6d44
--- /dev/null
+++ b/examples/data-sources/fabric_activators/data-source.tf
@@ -0,0 +1,3 @@
+data "fabric_activators" "example" {
+ workspace_id = "00000000-0000-0000-0000-000000000000"
+}
diff --git a/examples/data-sources/fabric_activators/outputs.tf b/examples/data-sources/fabric_activators/outputs.tf
new file mode 100644
index 00000000..2735d438
--- /dev/null
+++ b/examples/data-sources/fabric_activators/outputs.tf
@@ -0,0 +1,3 @@
+output "example" {
+ value = data.fabric_activators.example
+}
diff --git a/examples/data-sources/fabric_activators/providers.tf b/examples/data-sources/fabric_activators/providers.tf
new file mode 100644
index 00000000..0c8bdbf5
--- /dev/null
+++ b/examples/data-sources/fabric_activators/providers.tf
@@ -0,0 +1,11 @@
+terraform {
+ required_version = ">= 1.8, < 2.0"
+ required_providers {
+ fabric = {
+ source = "microsoft/fabric"
+ version = "0.0.0" # Check for the latest version on the Terraform Registry
+ }
+ }
+}
+
+provider "fabric" {}
diff --git a/examples/resources/fabric_activator/import.sh b/examples/resources/fabric_activator/import.sh
new file mode 100644
index 00000000..2ea3f88d
--- /dev/null
+++ b/examples/resources/fabric_activator/import.sh
@@ -0,0 +1,2 @@
+# terraform import fabric_activator.example "/"
+terraform import fabric_activator.example "00000000-0000-0000-0000-000000000000/11111111-1111-1111-1111-111111111111"
diff --git a/examples/resources/fabric_activator/outputs.tf b/examples/resources/fabric_activator/outputs.tf
new file mode 100644
index 00000000..e06159cb
--- /dev/null
+++ b/examples/resources/fabric_activator/outputs.tf
@@ -0,0 +1,3 @@
+output "example" {
+ value = resource.fabric_activator.example
+}
diff --git a/examples/resources/fabric_activator/providers.tf b/examples/resources/fabric_activator/providers.tf
new file mode 100644
index 00000000..26cb5a93
--- /dev/null
+++ b/examples/resources/fabric_activator/providers.tf
@@ -0,0 +1,15 @@
+terraform {
+ required_version = ">= 1.8, < 2.0"
+ required_providers {
+ fabric = {
+ source = "microsoft/fabric"
+ version = "0.0.0" # Check for the latest version on the Terraform Registry
+ }
+ }
+}
+
+provider "fabric" {}
+
+locals {
+ path = abspath(join("/", [path.root, "..", "..", "..", "internal", "testhelp", "fixtures", "activator"]))
+}
diff --git a/examples/resources/fabric_activator/resource.tf b/examples/resources/fabric_activator/resource.tf
new file mode 100644
index 00000000..c3e286c0
--- /dev/null
+++ b/examples/resources/fabric_activator/resource.tf
@@ -0,0 +1,36 @@
+# Example 1 - Item without definition
+resource "fabric_activator" "example" {
+ display_name = "example"
+ workspace_id = "00000000-0000-0000-0000-000000000000"
+}
+
+# Example 2 - Item with definition bootstrapping only
+resource "fabric_activator" "example_definition_bootstrap" {
+ display_name = "example"
+ description = "example with definition bootstrapping"
+ workspace_id = "00000000-0000-0000-0000-000000000000"
+ definition_update_enabled = false
+ format = "Default"
+ definition = {
+ "ReflexEntities.json" = {
+ source = "${local.path}/ReflexEntities.json"
+ }
+ }
+}
+
+# Example 3 - Item with definition update when source or tokens changed
+resource "fabric_activator" "example_definition_update" {
+ display_name = "example"
+ description = "example with definition update when source or tokens changed"
+ workspace_id = "00000000-0000-0000-0000-000000000000"
+ format = "Default"
+ definition = {
+ "ReflexEntities.json" = {
+ source = "${local.path}/ReflexEntities.json"
+ tokens = {
+ "MyValue1" = "my value 1"
+ "MyValue2" = "my value 2"
+ }
+ }
+ }
+}
diff --git a/internal/pkg/fabricitem/data_item.go b/internal/pkg/fabricitem/data_item.go
index 2f743ccd..60624d99 100644
--- a/internal/pkg/fabricitem/data_item.go
+++ b/internal/pkg/fabricitem/data_item.go
@@ -84,13 +84,8 @@ func (d *DataSourceFabricItem) Configure(_ context.Context, req datasource.Confi
d.pConfigData = pConfigData
d.client = fabcore.NewClientFactoryWithClient(*pConfigData.FabricClient).NewItemsClient()
- diags := IsPreviewMode(d.Name, d.IsPreview, d.pConfigData.Preview)
- if diags != nil {
- resp.Diagnostics.Append(diags...)
-
- if diags.HasError() {
- return
- }
+ if resp.Diagnostics.Append(IsPreviewMode(d.Name, d.IsPreview, d.pConfigData.Preview)...); resp.Diagnostics.HasError() {
+ return
}
}
diff --git a/internal/pkg/fabricitem/data_item_definition.go b/internal/pkg/fabricitem/data_item_definition.go
index df02542a..329ec9fa 100644
--- a/internal/pkg/fabricitem/data_item_definition.go
+++ b/internal/pkg/fabricitem/data_item_definition.go
@@ -86,13 +86,8 @@ func (d *DataSourceFabricItemDefinition) Configure(_ context.Context, req dataso
d.pConfigData = pConfigData
d.client = fabcore.NewClientFactoryWithClient(*pConfigData.FabricClient).NewItemsClient()
- diags := IsPreviewMode(d.Name, d.IsPreview, d.pConfigData.Preview)
- if diags != nil {
- resp.Diagnostics.Append(diags...)
-
- if diags.HasError() {
- return
- }
+ if resp.Diagnostics.Append(IsPreviewMode(d.Name, d.IsPreview, d.pConfigData.Preview)...); resp.Diagnostics.HasError() {
+ return
}
}
diff --git a/internal/pkg/fabricitem/data_item_definition_properties.go b/internal/pkg/fabricitem/data_item_definition_properties.go
index bad705aa..a488d649 100644
--- a/internal/pkg/fabricitem/data_item_definition_properties.go
+++ b/internal/pkg/fabricitem/data_item_definition_properties.go
@@ -84,13 +84,8 @@ func (d *DataSourceFabricItemDefinitionProperties[Ttfprop, Titemprop]) Configure
d.pConfigData = pConfigData
d.client = fabcore.NewClientFactoryWithClient(*pConfigData.FabricClient).NewItemsClient()
- diags := IsPreviewMode(d.Name, d.IsPreview, d.pConfigData.Preview)
- if diags != nil {
- resp.Diagnostics.Append(diags...)
-
- if diags.HasError() {
- return
- }
+ if resp.Diagnostics.Append(IsPreviewMode(d.Name, d.IsPreview, d.pConfigData.Preview)...); resp.Diagnostics.HasError() {
+ return
}
}
diff --git a/internal/pkg/fabricitem/data_item_properties.go b/internal/pkg/fabricitem/data_item_properties.go
index 2cc73685..0556ebee 100644
--- a/internal/pkg/fabricitem/data_item_properties.go
+++ b/internal/pkg/fabricitem/data_item_properties.go
@@ -83,13 +83,8 @@ func (d *DataSourceFabricItemProperties[Ttfprop, Titemprop]) Configure(_ context
d.pConfigData = pConfigData
d.client = fabcore.NewClientFactoryWithClient(*pConfigData.FabricClient).NewItemsClient()
- diags := IsPreviewMode(d.Name, d.IsPreview, d.pConfigData.Preview)
- if diags != nil {
- resp.Diagnostics.Append(diags...)
-
- if diags.HasError() {
- return
- }
+ if resp.Diagnostics.Append(IsPreviewMode(d.Name, d.IsPreview, d.pConfigData.Preview)...); resp.Diagnostics.HasError() {
+ return
}
}
diff --git a/internal/pkg/fabricitem/data_items.go b/internal/pkg/fabricitem/data_items.go
index 303f685c..556d3159 100644
--- a/internal/pkg/fabricitem/data_items.go
+++ b/internal/pkg/fabricitem/data_items.go
@@ -48,7 +48,7 @@ func (d *DataSourceFabricItems) Metadata(_ context.Context, req datasource.Metad
func (d *DataSourceFabricItems) Schema(ctx context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) {
resp.Schema = schema.Schema{
- MarkdownDescription: d.MarkdownDescription,
+ MarkdownDescription: GetDataSourcePreviewNote(d.MarkdownDescription, d.IsPreview),
Attributes: map[string]schema.Attribute{
"workspace_id": schema.StringAttribute{
MarkdownDescription: "The Workspace ID.",
@@ -105,13 +105,8 @@ func (d *DataSourceFabricItems) Configure(_ context.Context, req datasource.Conf
d.pConfigData = pConfigData
d.client = fabcore.NewClientFactoryWithClient(*pConfigData.FabricClient).NewItemsClient()
- diags := IsPreviewMode(d.Name, d.IsPreview, d.pConfigData.Preview)
- if diags != nil {
- resp.Diagnostics.Append(diags...)
-
- if diags.HasError() {
- return
- }
+ if resp.Diagnostics.Append(IsPreviewMode(d.Name, d.IsPreview, d.pConfigData.Preview)...); resp.Diagnostics.HasError() {
+ return
}
}
diff --git a/internal/pkg/fabricitem/data_items_properties.go b/internal/pkg/fabricitem/data_items_properties.go
index ba83d190..e97ea4ab 100644
--- a/internal/pkg/fabricitem/data_items_properties.go
+++ b/internal/pkg/fabricitem/data_items_properties.go
@@ -103,13 +103,8 @@ func (d *DataSourceFabricItemsProperties[Ttfprop, Titemprop]) Configure(_ contex
d.pConfigData = pConfigData
- diags := IsPreviewMode(d.Name, d.IsPreview, d.pConfigData.Preview)
- if diags != nil {
- resp.Diagnostics.Append(diags...)
-
- if diags.HasError() {
- return
- }
+ if resp.Diagnostics.Append(IsPreviewMode(d.Name, d.IsPreview, d.pConfigData.Preview)...); resp.Diagnostics.HasError() {
+ return
}
}
diff --git a/internal/pkg/fabricitem/resource_item.go b/internal/pkg/fabricitem/resource_item.go
index 6d7ac36f..211aaf3b 100644
--- a/internal/pkg/fabricitem/resource_item.go
+++ b/internal/pkg/fabricitem/resource_item.go
@@ -70,13 +70,8 @@ func (r *ResourceFabricItem) Configure(_ context.Context, req resource.Configure
r.pConfigData = pConfigData
r.client = fabcore.NewClientFactoryWithClient(*pConfigData.FabricClient).NewItemsClient()
- diags := IsPreviewMode(r.Name, r.IsPreview, r.pConfigData.Preview)
- if diags != nil {
- resp.Diagnostics.Append(diags...)
-
- if diags.HasError() {
- return
- }
+ if resp.Diagnostics.Append(IsPreviewMode(r.Name, r.IsPreview, r.pConfigData.Preview)...); resp.Diagnostics.HasError() {
+ return
}
}
diff --git a/internal/pkg/fabricitem/resource_item_config_definition_properties.go b/internal/pkg/fabricitem/resource_item_config_definition_properties.go
index d56147c9..1836bc19 100644
--- a/internal/pkg/fabricitem/resource_item_config_definition_properties.go
+++ b/internal/pkg/fabricitem/resource_item_config_definition_properties.go
@@ -133,13 +133,8 @@ func (r *ResourceFabricItemConfigDefinitionProperties[Ttfprop, Titemprop, Ttfcon
r.pConfigData = pConfigData
r.client = fabcore.NewClientFactoryWithClient(*pConfigData.FabricClient).NewItemsClient()
- diags := IsPreviewMode(r.Name, r.IsPreview, r.pConfigData.Preview)
- if diags != nil {
- resp.Diagnostics.Append(diags...)
-
- if diags.HasError() {
- return
- }
+ if resp.Diagnostics.Append(IsPreviewMode(r.Name, r.IsPreview, r.pConfigData.Preview)...); resp.Diagnostics.HasError() {
+ return
}
}
diff --git a/internal/pkg/fabricitem/resource_item_config_properties.go b/internal/pkg/fabricitem/resource_item_config_properties.go
index b189dea5..8b783ad9 100644
--- a/internal/pkg/fabricitem/resource_item_config_properties.go
+++ b/internal/pkg/fabricitem/resource_item_config_properties.go
@@ -70,13 +70,8 @@ func (r *ResourceFabricItemConfigProperties[Ttfprop, Titemprop, Ttfconfig, Titem
r.pConfigData = pConfigData
r.client = fabcore.NewClientFactoryWithClient(*pConfigData.FabricClient).NewItemsClient()
- diags := IsPreviewMode(r.Name, r.IsPreview, r.pConfigData.Preview)
- if diags != nil {
- resp.Diagnostics.Append(diags...)
-
- if diags.HasError() {
- return
- }
+ if resp.Diagnostics.Append(IsPreviewMode(r.Name, r.IsPreview, r.pConfigData.Preview)...); resp.Diagnostics.HasError() {
+ return
}
}
diff --git a/internal/pkg/fabricitem/resource_item_definition.go b/internal/pkg/fabricitem/resource_item_definition.go
index e1996f66..538943f5 100644
--- a/internal/pkg/fabricitem/resource_item_definition.go
+++ b/internal/pkg/fabricitem/resource_item_definition.go
@@ -119,13 +119,8 @@ func (r *ResourceFabricItemDefinition) Configure(_ context.Context, req resource
r.pConfigData = pConfigData
r.client = fabcore.NewClientFactoryWithClient(*pConfigData.FabricClient).NewItemsClient()
- diags := IsPreviewMode(r.Name, r.IsPreview, r.pConfigData.Preview)
- if diags != nil {
- resp.Diagnostics.Append(diags...)
-
- if diags.HasError() {
- return
- }
+ if resp.Diagnostics.Append(IsPreviewMode(r.Name, r.IsPreview, r.pConfigData.Preview)...); resp.Diagnostics.HasError() {
+ return
}
}
diff --git a/internal/pkg/fabricitem/resource_item_definition_properties.go b/internal/pkg/fabricitem/resource_item_definition_properties.go
index d112d66d..a1b1a1ac 100644
--- a/internal/pkg/fabricitem/resource_item_definition_properties.go
+++ b/internal/pkg/fabricitem/resource_item_definition_properties.go
@@ -109,13 +109,8 @@ func (r *ResourceFabricItemDefinitionProperties[Ttfprop, Titemprop]) Configure(_
r.pConfigData = pConfigData
r.client = fabcore.NewClientFactoryWithClient(*pConfigData.FabricClient).NewItemsClient()
- diags := IsPreviewMode(r.Name, r.IsPreview, r.pConfigData.Preview)
- if diags != nil {
- resp.Diagnostics.Append(diags...)
-
- if diags.HasError() {
- return
- }
+ if resp.Diagnostics.Append(IsPreviewMode(r.Name, r.IsPreview, r.pConfigData.Preview)...); resp.Diagnostics.HasError() {
+ return
}
}
diff --git a/internal/pkg/fabricitem/resource_item_properties.go b/internal/pkg/fabricitem/resource_item_properties.go
index d8b4364e..7b3788b4 100644
--- a/internal/pkg/fabricitem/resource_item_properties.go
+++ b/internal/pkg/fabricitem/resource_item_properties.go
@@ -66,13 +66,8 @@ func (r *ResourceFabricItemProperties[Ttfprop, Titemprop]) Configure(_ context.C
r.pConfigData = pConfigData
r.client = fabcore.NewClientFactoryWithClient(*pConfigData.FabricClient).NewItemsClient()
- diags := IsPreviewMode(r.Name, r.IsPreview, r.pConfigData.Preview)
- if diags != nil {
- resp.Diagnostics.Append(diags...)
-
- if diags.HasError() {
- return
- }
+ if resp.Diagnostics.Append(IsPreviewMode(r.Name, r.IsPreview, r.pConfigData.Preview)...); resp.Diagnostics.HasError() {
+ return
}
}
diff --git a/internal/provider/provider.go b/internal/provider/provider.go
index 52e63bba..b0ebcf5c 100644
--- a/internal/provider/provider.go
+++ b/internal/provider/provider.go
@@ -36,6 +36,7 @@ import (
pclient "github.com/microsoft/terraform-provider-fabric/internal/provider/client"
pconfig "github.com/microsoft/terraform-provider-fabric/internal/provider/config"
putils "github.com/microsoft/terraform-provider-fabric/internal/provider/utils"
+ "github.com/microsoft/terraform-provider-fabric/internal/services/activator"
"github.com/microsoft/terraform-provider-fabric/internal/services/capacity"
"github.com/microsoft/terraform-provider-fabric/internal/services/dashboard"
"github.com/microsoft/terraform-provider-fabric/internal/services/datamart"
@@ -396,6 +397,7 @@ func (p *FabricProvider) Resources(ctx context.Context) []func() resource.Resour
mlexperiment.NewResourceMLExperiment,
mlmodel.NewResourceMLModel,
notebook.NewResourceNotebook,
+ activator.NewResourceActivator,
report.NewResourceReport,
semanticmodel.NewResourceSemanticModel,
spark.NewResourceSparkCustomPool,
@@ -446,6 +448,8 @@ func (p *FabricProvider) DataSources(ctx context.Context) []func() datasource.Da
notebook.NewDataSourceNotebook,
notebook.NewDataSourceNotebooks,
paginatedreport.NewDataSourcePaginatedReports,
+ activator.NewDataSourceActivator,
+ activator.NewDataSourceActivators,
report.NewDataSourceReport,
report.NewDataSourceReports,
semanticmodel.NewDataSourceSemanticModel,
diff --git a/internal/services/activator/base.go b/internal/services/activator/base.go
new file mode 100644
index 00000000..429125f4
--- /dev/null
+++ b/internal/services/activator/base.go
@@ -0,0 +1,32 @@
+// Copyright (c) Microsoft Corporation
+// SPDX-License-Identifier: MPL-2.0
+
+package activator
+
+import (
+ fabcore "github.com/microsoft/fabric-sdk-go/fabric/core"
+
+ "github.com/microsoft/terraform-provider-fabric/internal/common"
+ "github.com/microsoft/terraform-provider-fabric/internal/pkg/fabricitem"
+)
+
+const (
+ ItemName = "Activator"
+ ItemTFName = "activator"
+ ItemsName = "Activators"
+ ItemsTFName = "activators"
+ ItemType = fabcore.ItemTypeReflex
+ ItemDocsSPNSupport = common.DocsSPNNotSupported
+ ItemDocsURL = "https://learn.microsoft.com/fabric/real-time-intelligence/event-streams/add-destination-activator"
+ ItemDefinitionEmpty = `{}`
+ ItemDefinitionPathDocsURL = "https://learn.microsoft.com/rest/api/fabric/articles/item-management/definitions/activator-definition"
+ ItemPreview = true
+)
+
+var itemDefinitionFormats = []fabricitem.DefinitionFormat{ //nolint:gochecknoglobals
+ {
+ Type: fabricitem.DefinitionFormatDefault,
+ API: "",
+ Paths: []string{"ReflexEntities.json"},
+ },
+}
diff --git a/internal/services/activator/base_test.go b/internal/services/activator/base_test.go
new file mode 100644
index 00000000..b53d48e6
--- /dev/null
+++ b/internal/services/activator/base_test.go
@@ -0,0 +1,14 @@
+// Copyright (c) Microsoft Corporation
+// SPDX-License-Identifier: MPL-2.0
+
+package activator_test
+
+import (
+ "github.com/microsoft/terraform-provider-fabric/internal/services/activator"
+)
+
+const (
+ itemTFName = activator.ItemTFName
+ itemsTFName = activator.ItemsTFName
+ itemType = activator.ItemType
+)
diff --git a/internal/services/activator/data_activator.go b/internal/services/activator/data_activator.go
new file mode 100644
index 00000000..39c3f5fa
--- /dev/null
+++ b/internal/services/activator/data_activator.go
@@ -0,0 +1,26 @@
+// Copyright (c) Microsoft Corporation
+// SPDX-License-Identifier: MPL-2.0
+
+package activator
+
+import (
+ "github.com/hashicorp/terraform-plugin-framework/datasource"
+
+ "github.com/microsoft/terraform-provider-fabric/internal/pkg/fabricitem"
+)
+
+func NewDataSourceActivator() datasource.DataSource {
+ config := fabricitem.DataSourceFabricItemDefinition{
+ Type: ItemType,
+ Name: ItemName,
+ TFName: ItemTFName,
+ MarkdownDescription: "Get a Fabric " + ItemName + " (also known as Reflex).\n\n" +
+ "Use this data source to fetch a [" + ItemName + "](" + ItemDocsURL + ").\n\n" +
+ ItemDocsSPNSupport,
+ IsDisplayNameUnique: true,
+ DefinitionFormats: itemDefinitionFormats,
+ IsPreview: ItemPreview,
+ }
+
+ return fabricitem.NewDataSourceFabricItemDefinition(config)
+}
diff --git a/internal/services/activator/data_activator_test.go b/internal/services/activator/data_activator_test.go
new file mode 100644
index 00000000..e7510159
--- /dev/null
+++ b/internal/services/activator/data_activator_test.go
@@ -0,0 +1,253 @@
+// Copyright (c) Microsoft Corporation
+// SPDX-License-Identifier: MPL-2.0
+
+package activator_test
+
+import (
+ "regexp"
+ "testing"
+
+ at "github.com/dcarbone/terraform-plugin-framework-utils/v3/acctest"
+ "github.com/hashicorp/terraform-plugin-testing/helper/resource"
+
+ "github.com/microsoft/terraform-provider-fabric/internal/common"
+ "github.com/microsoft/terraform-provider-fabric/internal/framework/customtypes"
+ "github.com/microsoft/terraform-provider-fabric/internal/testhelp"
+ "github.com/microsoft/terraform-provider-fabric/internal/testhelp/fakes"
+)
+
+var (
+ testDataSourceItemFQN = testhelp.DataSourceFQN("fabric", itemTFName, "test")
+ testDataSourceItemHeader = at.DataSourceHeader(testhelp.TypeName("fabric", itemTFName), "test")
+)
+
+func TestUnit_ActivatorDataSource(t *testing.T) {
+ workspaceID := testhelp.RandomUUID()
+ entity := fakes.NewRandomItemWithWorkspace(itemType, workspaceID)
+
+ fakes.FakeServer.Upsert(fakes.NewRandomItemWithWorkspace(itemType, workspaceID))
+ fakes.FakeServer.Upsert(entity)
+ fakes.FakeServer.Upsert(fakes.NewRandomItemWithWorkspace(itemType, workspaceID))
+
+ resource.ParallelTest(t, testhelp.NewTestUnitCase(t, nil, fakes.FakeServer.ServerFactory, nil, []resource.TestStep{
+ // error - no attributes
+ {
+ Config: at.CompileConfig(
+ testDataSourceItemHeader,
+ map[string]any{},
+ ),
+ ExpectError: regexp.MustCompile(`The argument "workspace_id" is required, but no definition was found`),
+ },
+ // error - workspace_id - invalid UUID
+ {
+ Config: at.CompileConfig(
+ testDataSourceItemHeader,
+ map[string]any{
+ "workspace_id": "invalid uuid",
+ },
+ ),
+ ExpectError: regexp.MustCompile(customtypes.UUIDTypeErrorInvalidStringHeader),
+ },
+ // error - unexpected attribute
+ {
+ Config: at.CompileConfig(
+ testDataSourceItemHeader,
+ map[string]any{
+ "workspace_id": workspaceID,
+ "unexpected_attr": "test",
+ },
+ ),
+ ExpectError: regexp.MustCompile(`An argument named "unexpected_attr" is not expected here`),
+ },
+ // error - conflicting attributes
+ {
+ Config: at.CompileConfig(
+ testDataSourceItemHeader,
+ map[string]any{
+ "workspace_id": workspaceID,
+ "id": *entity.ID,
+ "display_name": *entity.DisplayName,
+ },
+ ),
+ ExpectError: regexp.MustCompile(`These attributes cannot be configured together: \[id,display_name\]`),
+ },
+ // error - no required attributes
+ {
+ Config: at.CompileConfig(
+ testDataSourceItemHeader,
+ map[string]any{
+ "workspace_id": workspaceID,
+ },
+ ),
+ ExpectError: regexp.MustCompile(`Exactly one of these attributes must be configured: \[id,display_name\]`),
+ },
+ // error - no required attributes
+ {
+ Config: at.CompileConfig(
+ testDataSourceItemHeader,
+ map[string]any{
+ "id": *entity.ID,
+ },
+ ),
+ ExpectError: regexp.MustCompile(`The argument "workspace_id" is required, but no definition was found`),
+ },
+ // read by id
+ {
+ Config: at.CompileConfig(
+ testDataSourceItemHeader,
+ map[string]any{
+ "workspace_id": workspaceID,
+ "id": *entity.ID,
+ },
+ ),
+ Check: resource.ComposeAggregateTestCheckFunc(
+ resource.TestCheckResourceAttrPtr(testDataSourceItemFQN, "workspace_id", entity.WorkspaceID),
+ resource.TestCheckResourceAttrPtr(testDataSourceItemFQN, "id", entity.ID),
+ resource.TestCheckResourceAttrPtr(testDataSourceItemFQN, "display_name", entity.DisplayName),
+ resource.TestCheckResourceAttrPtr(testDataSourceItemFQN, "description", entity.Description),
+ ),
+ },
+ // read by id - not found
+ {
+ Config: at.CompileConfig(
+ testDataSourceItemHeader,
+ map[string]any{
+ "workspace_id": workspaceID,
+ "id": testhelp.RandomUUID(),
+ },
+ ),
+ ExpectError: regexp.MustCompile(common.ErrorReadHeader),
+ },
+
+ // read by name
+ {
+ Config: at.CompileConfig(
+ testDataSourceItemHeader,
+ map[string]any{
+ "workspace_id": workspaceID,
+ "display_name": *entity.DisplayName,
+ },
+ ),
+ Check: resource.ComposeAggregateTestCheckFunc(
+ resource.TestCheckResourceAttrPtr(testDataSourceItemFQN, "workspace_id", entity.WorkspaceID),
+ resource.TestCheckResourceAttrPtr(testDataSourceItemFQN, "id", entity.ID),
+ resource.TestCheckResourceAttrPtr(testDataSourceItemFQN, "display_name", entity.DisplayName),
+ resource.TestCheckResourceAttrPtr(testDataSourceItemFQN, "description", entity.Description),
+ ),
+ },
+ // read by name - not found
+ {
+ Config: at.CompileConfig(
+ testDataSourceItemHeader,
+ map[string]any{
+ "workspace_id": workspaceID,
+ "display_name": testhelp.RandomName(),
+ },
+ ),
+ ExpectError: regexp.MustCompile(common.ErrorReadHeader),
+ },
+ }))
+}
+
+func TestAcc_ActivatorDataSource(t *testing.T) {
+ if testhelp.ShouldSkipTest(t) {
+ t.Skip("No SPN support")
+ }
+
+ workspace := testhelp.WellKnown()["WorkspaceDS"].(map[string]any)
+ workspaceID := workspace["id"].(string)
+
+ entity := testhelp.WellKnown()["Reflex"].(map[string]any)
+ entityID := entity["id"].(string)
+ entityDisplayName := entity["displayName"].(string)
+ entityDescription := entity["description"].(string)
+
+ resource.ParallelTest(t, testhelp.NewTestAccCase(t, nil, nil, []resource.TestStep{
+ // read by id
+ {
+ Config: at.CompileConfig(
+ testDataSourceItemHeader,
+ map[string]any{
+ "workspace_id": workspaceID,
+ "id": entityID,
+ },
+ ),
+ Check: resource.ComposeAggregateTestCheckFunc(
+ resource.TestCheckResourceAttr(testDataSourceItemFQN, "workspace_id", workspaceID),
+ resource.TestCheckResourceAttr(testDataSourceItemFQN, "id", entityID),
+ resource.TestCheckResourceAttr(testDataSourceItemFQN, "display_name", entityDisplayName),
+ resource.TestCheckResourceAttr(testDataSourceItemFQN, "description", entityDescription),
+ ),
+ },
+ // read by id - not found
+ {
+ Config: at.CompileConfig(
+ testDataSourceItemHeader,
+ map[string]any{
+ "workspace_id": workspaceID,
+ "id": testhelp.RandomUUID(),
+ },
+ ),
+ ExpectError: regexp.MustCompile(common.ErrorReadHeader),
+ },
+ // read by name
+ {
+ Config: at.CompileConfig(
+ testDataSourceItemHeader,
+ map[string]any{
+ "workspace_id": workspaceID,
+ "display_name": entityDisplayName,
+ },
+ ),
+ Check: resource.ComposeAggregateTestCheckFunc(
+ resource.TestCheckResourceAttr(testDataSourceItemFQN, "workspace_id", workspaceID),
+ resource.TestCheckResourceAttr(testDataSourceItemFQN, "id", entityID),
+ resource.TestCheckResourceAttr(testDataSourceItemFQN, "display_name", entityDisplayName),
+ resource.TestCheckResourceAttr(testDataSourceItemFQN, "description", entityDescription),
+ resource.TestCheckNoResourceAttr(testDataSourceItemFQN, "definition"),
+ ),
+ },
+ // read by name - not found
+ {
+ Config: at.CompileConfig(
+ testDataSourceItemHeader,
+ map[string]any{
+ "workspace_id": workspaceID,
+ "display_name": testhelp.RandomName(),
+ },
+ ),
+ ExpectError: regexp.MustCompile(common.ErrorReadHeader),
+ },
+ // read by id with definition - no format
+ {
+ Config: at.CompileConfig(
+ testDataSourceItemHeader,
+ map[string]any{
+ "workspace_id": workspaceID,
+ "id": entityID,
+ "output_definition": true,
+ },
+ ),
+ ExpectError: regexp.MustCompile("Invalid configuration for attribute format"),
+ },
+ // read by id with definition
+ {
+ Config: at.CompileConfig(
+ testDataSourceItemHeader,
+ map[string]any{
+ "workspace_id": workspaceID,
+ "id": entityID,
+ "output_definition": true,
+ "format": "Default",
+ },
+ ),
+ Check: resource.ComposeAggregateTestCheckFunc(
+ resource.TestCheckResourceAttr(testDataSourceItemFQN, "workspace_id", workspaceID),
+ resource.TestCheckResourceAttr(testDataSourceItemFQN, "id", entityID),
+ resource.TestCheckResourceAttr(testDataSourceItemFQN, "display_name", entityDisplayName),
+ resource.TestCheckResourceAttr(testDataSourceItemFQN, "description", entityDescription),
+ resource.TestCheckResourceAttrSet(testDataSourceItemFQN, "definition.ReflexEntities.json.content"),
+ ),
+ },
+ }))
+}
diff --git a/internal/services/activator/data_activators.go b/internal/services/activator/data_activators.go
new file mode 100644
index 00000000..2ef9a337
--- /dev/null
+++ b/internal/services/activator/data_activators.go
@@ -0,0 +1,25 @@
+// Copyright (c) Microsoft Corporation
+// SPDX-License-Identifier: MPL-2.0
+
+package activator
+
+import (
+ "github.com/hashicorp/terraform-plugin-framework/datasource"
+
+ "github.com/microsoft/terraform-provider-fabric/internal/pkg/fabricitem"
+)
+
+func NewDataSourceActivators() datasource.DataSource {
+ config := fabricitem.DataSourceFabricItems{
+ Type: ItemType,
+ Name: ItemName,
+ Names: ItemsName,
+ TFName: ItemsTFName,
+ MarkdownDescription: "List a Fabric " + ItemsName + " (also known as Reflex).\n\n" +
+ "Use this data source to list [" + ItemsName + "](" + ItemDocsURL + ").\n\n" +
+ ItemDocsSPNSupport,
+ IsPreview: ItemPreview,
+ }
+
+ return fabricitem.NewDataSourceFabricItems(config)
+}
diff --git a/internal/services/activator/data_activators_test.go b/internal/services/activator/data_activators_test.go
new file mode 100644
index 00000000..0fcbe732
--- /dev/null
+++ b/internal/services/activator/data_activators_test.go
@@ -0,0 +1,101 @@
+// Copyright (c) Microsoft Corporation
+// SPDX-License-Identifier: MPL-2.0
+
+package activator_test
+
+import (
+ "regexp"
+ "testing"
+
+ at "github.com/dcarbone/terraform-plugin-framework-utils/v3/acctest"
+ "github.com/hashicorp/terraform-plugin-testing/helper/resource"
+
+ "github.com/microsoft/terraform-provider-fabric/internal/framework/customtypes"
+ "github.com/microsoft/terraform-provider-fabric/internal/testhelp"
+ "github.com/microsoft/terraform-provider-fabric/internal/testhelp/fakes"
+)
+
+var (
+ testDataSourceItemsFQN = testhelp.DataSourceFQN("fabric", itemsTFName, "test")
+ testDataSourceItemsHeader = at.DataSourceHeader(testhelp.TypeName("fabric", itemsTFName), "test")
+)
+
+func TestUnit_ActivatorsDataSource(t *testing.T) {
+ workspaceID := testhelp.RandomUUID()
+ entity := fakes.NewRandomItemWithWorkspace(itemType, workspaceID)
+
+ fakes.FakeServer.Upsert(fakes.NewRandomItemWithWorkspace(itemType, workspaceID))
+ fakes.FakeServer.Upsert(entity)
+ fakes.FakeServer.Upsert(fakes.NewRandomItemWithWorkspace(itemType, workspaceID))
+
+ resource.ParallelTest(t, testhelp.NewTestUnitCase(t, nil, fakes.FakeServer.ServerFactory, nil, []resource.TestStep{
+ // error - no attributes
+ {
+ Config: at.CompileConfig(
+ testDataSourceItemsHeader,
+ map[string]any{},
+ ),
+ ExpectError: regexp.MustCompile(`The argument "workspace_id" is required, but no definition was found`),
+ },
+ // error - workspace_id - invalid UUID
+ {
+ Config: at.CompileConfig(
+ testDataSourceItemsHeader,
+ map[string]any{
+ "workspace_id": "invalid uuid",
+ },
+ ),
+ ExpectError: regexp.MustCompile(customtypes.UUIDTypeErrorInvalidStringHeader),
+ },
+ // error - unexpected_attr
+ {
+ Config: at.CompileConfig(
+ testDataSourceItemsHeader,
+ map[string]any{
+ "workspace_id": workspaceID,
+ "unexpected_attr": "test",
+ },
+ ),
+ ExpectError: regexp.MustCompile(`An argument named "unexpected_attr" is not expected here`),
+ },
+ // read
+ {
+ Config: at.CompileConfig(
+ testDataSourceItemsHeader,
+ map[string]any{
+ "workspace_id": workspaceID,
+ },
+ ),
+ Check: resource.ComposeAggregateTestCheckFunc(
+ resource.TestCheckResourceAttrPtr(testDataSourceItemsFQN, "workspace_id", entity.WorkspaceID),
+ resource.TestCheckResourceAttrPtr(testDataSourceItemsFQN, "values.1.id", entity.ID),
+ ),
+ },
+ }))
+}
+
+func TestAcc_ActivatorsDataSource(t *testing.T) {
+ if testhelp.ShouldSkipTest(t) {
+ t.Skip("No SPN support")
+ }
+
+ workspace := testhelp.WellKnown()["WorkspaceDS"].(map[string]any)
+ workspaceID := workspace["id"].(string)
+
+ resource.ParallelTest(t, testhelp.NewTestAccCase(t, nil, nil, []resource.TestStep{
+ // read
+ {
+ Config: at.CompileConfig(
+ testDataSourceItemsHeader,
+ map[string]any{
+ "workspace_id": workspaceID,
+ },
+ ),
+ Check: resource.ComposeAggregateTestCheckFunc(
+ resource.TestCheckResourceAttr(testDataSourceItemsFQN, "workspace_id", workspaceID),
+ resource.TestCheckResourceAttrSet(testDataSourceItemsFQN, "values.0.id"),
+ ),
+ },
+ },
+ ))
+}
diff --git a/internal/services/activator/resource_activator.go b/internal/services/activator/resource_activator.go
new file mode 100644
index 00000000..1243131e
--- /dev/null
+++ b/internal/services/activator/resource_activator.go
@@ -0,0 +1,37 @@
+// Copyright (c) Microsoft Corporation
+// SPDX-License-Identifier: MPL-2.0
+
+package activator
+
+import (
+ "github.com/hashicorp/terraform-plugin-framework-validators/mapvalidator"
+ "github.com/hashicorp/terraform-plugin-framework/resource"
+ "github.com/hashicorp/terraform-plugin-framework/schema/validator"
+
+ "github.com/microsoft/terraform-provider-fabric/internal/pkg/fabricitem"
+)
+
+func NewResourceActivator() resource.Resource {
+ config := fabricitem.ResourceFabricItemDefinition{
+ Type: ItemType,
+ Name: ItemName,
+ NameRenameAllowed: true,
+ TFName: ItemTFName,
+ MarkdownDescription: "Manage a Fabric " + ItemName + " (also known as Reflex).\n\n" +
+ "Use this resource to manage [" + ItemName + "](" + ItemDocsURL + ").\n\n" +
+ ItemDocsSPNSupport,
+ DisplayNameMaxLength: 123,
+ DescriptionMaxLength: 256,
+ DefinitionPathDocsURL: ItemDefinitionPathDocsURL,
+ DefinitionPathKeysValidator: []validator.Map{
+ mapvalidator.SizeAtMost(1),
+ mapvalidator.KeysAre(fabricitem.DefinitionPathKeysValidator(itemDefinitionFormats)...),
+ },
+ DefinitionRequired: false,
+ DefinitionEmpty: ItemDefinitionEmpty,
+ DefinitionFormats: itemDefinitionFormats,
+ IsPreview: ItemPreview,
+ }
+
+ return fabricitem.NewResourceFabricItemDefinition(config)
+}
diff --git a/internal/services/activator/resource_activator_test.go b/internal/services/activator/resource_activator_test.go
new file mode 100644
index 00000000..fb0e9037
--- /dev/null
+++ b/internal/services/activator/resource_activator_test.go
@@ -0,0 +1,350 @@
+// Copyright (c) Microsoft Corporation
+// SPDX-License-Identifier: MPL-2.0
+
+package activator_test
+
+import (
+ "errors"
+ "fmt"
+ "regexp"
+ "testing"
+
+ at "github.com/dcarbone/terraform-plugin-framework-utils/v3/acctest"
+ "github.com/hashicorp/terraform-plugin-testing/helper/resource"
+ "github.com/hashicorp/terraform-plugin-testing/terraform"
+
+ "github.com/microsoft/terraform-provider-fabric/internal/common"
+ "github.com/microsoft/terraform-provider-fabric/internal/framework/customtypes"
+ "github.com/microsoft/terraform-provider-fabric/internal/testhelp"
+ "github.com/microsoft/terraform-provider-fabric/internal/testhelp/fakes"
+)
+
+var (
+ testResourceItemFQN = testhelp.ResourceFQN("fabric", itemTFName, "test")
+ testResourceItemHeader = at.ResourceHeader(testhelp.TypeName("fabric", itemTFName), "test")
+)
+
+var testHelperLocals = at.CompileLocalsConfig(map[string]any{
+ "path": testhelp.GetFixturesDirPath("activator"),
+})
+
+func TestUnit_ActivatorResource_Attributes(t *testing.T) {
+ resource.ParallelTest(t, testhelp.NewTestUnitCase(t, &testResourceItemFQN, fakes.FakeServer.ServerFactory, nil, []resource.TestStep{
+ // error - no attributes
+ {
+ ResourceName: testResourceItemFQN,
+ Config: at.JoinConfigs(
+ testHelperLocals,
+ at.CompileConfig(
+ testResourceItemHeader,
+ map[string]any{},
+ ),
+ ),
+ ExpectError: regexp.MustCompile(`Missing required argument`),
+ },
+ // error - workspace_id - invalid UUID
+ {
+ ResourceName: testResourceItemFQN,
+ Config: at.JoinConfigs(
+ testHelperLocals,
+ at.CompileConfig(
+ testResourceItemHeader,
+ map[string]any{
+ "workspace_id": "invalid uuid",
+ "display_name": "test",
+ },
+ )),
+ ExpectError: regexp.MustCompile(customtypes.UUIDTypeErrorInvalidStringHeader),
+ },
+ // error - unexpected attribute
+ {
+ ResourceName: testResourceItemFQN,
+ Config: at.JoinConfigs(
+ testHelperLocals,
+ at.CompileConfig(
+ testResourceItemHeader,
+ map[string]any{
+ "workspace_id": "00000000-0000-0000-0000-000000000000",
+ "unexpected_attr": "test",
+ },
+ )),
+ ExpectError: regexp.MustCompile(`An argument named "unexpected_attr" is not expected here`),
+ },
+ // error - no required attributes
+ {
+ ResourceName: testResourceItemFQN,
+ Config: at.JoinConfigs(
+ testHelperLocals,
+ at.CompileConfig(
+ testResourceItemHeader,
+ map[string]any{
+ "display_name": "test",
+ },
+ )),
+ ExpectError: regexp.MustCompile(`The argument "workspace_id" is required, but no definition was found.`),
+ },
+ // error - no required attributes
+ {
+ ResourceName: testResourceItemFQN,
+ Config: at.JoinConfigs(
+ testHelperLocals,
+ at.CompileConfig(
+ testResourceItemHeader,
+ map[string]any{
+ "workspace_id": "00000000-0000-0000-0000-000000000000",
+ },
+ )),
+ ExpectError: regexp.MustCompile(`The argument "display_name" is required, but no definition was found.`),
+ },
+ }))
+}
+
+func TestUnit_ActivatorResource_ImportState(t *testing.T) {
+ workspaceID := testhelp.RandomUUID()
+ entity := fakes.NewRandomItemWithWorkspace(itemType, workspaceID)
+
+ fakes.FakeServer.Upsert(fakes.NewRandomItemWithWorkspace(itemType, workspaceID))
+ fakes.FakeServer.Upsert(entity)
+ fakes.FakeServer.Upsert(fakes.NewRandomItemWithWorkspace(itemType, workspaceID))
+
+ testCase := at.JoinConfigs(
+ testHelperLocals,
+ at.CompileConfig(
+ testResourceItemHeader,
+ map[string]any{
+ "workspace_id": *entity.WorkspaceID,
+ "display_name": *entity.DisplayName,
+ },
+ ))
+
+ resource.Test(t, testhelp.NewTestUnitCase(t, &testResourceItemFQN, fakes.FakeServer.ServerFactory, nil, []resource.TestStep{
+ {
+ ResourceName: testResourceItemFQN,
+ Config: testCase,
+ ImportStateId: "not-valid",
+ ImportState: true,
+ ExpectError: regexp.MustCompile(fmt.Sprintf(common.ErrorImportIdentifierDetails, fmt.Sprintf("WorkspaceID/%sID", string(itemType)))),
+ },
+ {
+ ResourceName: testResourceItemFQN,
+ Config: testCase,
+ ImportStateId: "test/id",
+ ImportState: true,
+ ExpectError: regexp.MustCompile(customtypes.UUIDTypeErrorInvalidStringHeader),
+ },
+ {
+ ResourceName: testResourceItemFQN,
+ Config: testCase,
+ ImportStateId: fmt.Sprintf("%s/%s", "test", *entity.ID),
+ ImportState: true,
+ ExpectError: regexp.MustCompile(customtypes.UUIDTypeErrorInvalidStringHeader),
+ },
+ {
+ ResourceName: testResourceItemFQN,
+ Config: testCase,
+ ImportStateId: fmt.Sprintf("%s/%s", *entity.WorkspaceID, "test"),
+ ImportState: true,
+ ExpectError: regexp.MustCompile(customtypes.UUIDTypeErrorInvalidStringHeader),
+ },
+ // Import state testing
+ {
+ ResourceName: testResourceItemFQN,
+ Config: testCase,
+ ImportStateId: fmt.Sprintf("%s/%s", *entity.WorkspaceID, *entity.ID),
+ ImportState: true,
+ ImportStatePersist: true,
+ ImportStateCheck: func(is []*terraform.InstanceState) error {
+ if len(is) != 1 {
+ return errors.New("expected one instance state")
+ }
+
+ if is[0].ID != *entity.ID {
+ return errors.New(testResourceItemFQN + ": unexpected ID")
+ }
+
+ return nil
+ },
+ },
+ }))
+}
+
+func TestUnit_ActivatorResource_CRUD(t *testing.T) {
+ workspaceID := testhelp.RandomUUID()
+ entityExist := fakes.NewRandomItemWithWorkspace(itemType, workspaceID)
+ entityBefore := fakes.NewRandomItemWithWorkspace(itemType, workspaceID)
+ entityAfter := fakes.NewRandomItemWithWorkspace(itemType, workspaceID)
+
+ fakes.FakeServer.Upsert(fakes.NewRandomItemWithWorkspace(itemType, workspaceID))
+ fakes.FakeServer.Upsert(entityExist)
+ fakes.FakeServer.Upsert(entityAfter)
+ fakes.FakeServer.Upsert(fakes.NewRandomItemWithWorkspace(itemType, workspaceID))
+
+ resource.Test(t, testhelp.NewTestUnitCase(t, &testResourceItemFQN, fakes.FakeServer.ServerFactory, nil, []resource.TestStep{
+ // error - create - existing entity
+ {
+ ResourceName: testResourceItemFQN,
+ Config: at.JoinConfigs(
+ testHelperLocals,
+ at.CompileConfig(
+ testResourceItemHeader,
+ map[string]any{
+ "workspace_id": *entityExist.WorkspaceID,
+ "display_name": *entityExist.DisplayName,
+ },
+ )),
+ ExpectError: regexp.MustCompile(common.ErrorCreateHeader),
+ },
+ // Create and Read
+ {
+ ResourceName: testResourceItemFQN,
+ Config: at.JoinConfigs(
+ testHelperLocals,
+ at.CompileConfig(
+ testResourceItemHeader,
+ map[string]any{
+ "workspace_id": *entityBefore.WorkspaceID,
+ "display_name": *entityBefore.DisplayName,
+ },
+ )),
+ Check: resource.ComposeAggregateTestCheckFunc(
+ resource.TestCheckResourceAttrPtr(testResourceItemFQN, "display_name", entityBefore.DisplayName),
+ resource.TestCheckResourceAttr(testResourceItemFQN, "description", ""),
+ ),
+ },
+ // Update and Read
+ {
+ ResourceName: testResourceItemFQN,
+ Config: at.JoinConfigs(
+ testHelperLocals,
+ at.CompileConfig(
+ testResourceItemHeader,
+ map[string]any{
+ "workspace_id": *entityBefore.WorkspaceID,
+ "display_name": *entityAfter.DisplayName,
+ "description": *entityAfter.Description,
+ },
+ )),
+ Check: resource.ComposeAggregateTestCheckFunc(
+ resource.TestCheckResourceAttrPtr(testResourceItemFQN, "display_name", entityAfter.DisplayName),
+ resource.TestCheckResourceAttrPtr(testResourceItemFQN, "description", entityAfter.Description),
+ ),
+ },
+ // Delete testing automatically occurs in TestCase
+ }))
+}
+
+func TestAcc_ActivatorResource_CRUD(t *testing.T) {
+ if testhelp.ShouldSkipTest(t) {
+ t.Skip("No SPN support")
+ }
+
+ workspace := testhelp.WellKnown()["WorkspaceRS"].(map[string]any)
+ workspaceID := workspace["id"].(string)
+
+ entityCreateDisplayName := testhelp.RandomName()
+ entityUpdateDisplayName := testhelp.RandomName()
+ entityUpdateDescription := testhelp.RandomName()
+
+ resource.Test(t, testhelp.NewTestAccCase(t, &testResourceItemFQN, nil, []resource.TestStep{
+ // Create and Read
+ {
+ ResourceName: testResourceItemFQN,
+ Config: at.JoinConfigs(
+ testHelperLocals,
+ at.CompileConfig(
+ testResourceItemHeader,
+ map[string]any{
+ "workspace_id": workspaceID,
+ "display_name": entityCreateDisplayName,
+ },
+ )),
+ Check: resource.ComposeAggregateTestCheckFunc(
+ resource.TestCheckResourceAttr(testResourceItemFQN, "display_name", entityCreateDisplayName),
+ resource.TestCheckResourceAttr(testResourceItemFQN, "description", ""),
+ ),
+ },
+ // Update and Read
+ {
+ ResourceName: testResourceItemFQN,
+ Config: at.JoinConfigs(
+ testHelperLocals,
+ at.CompileConfig(
+ testResourceItemHeader,
+ map[string]any{
+ "workspace_id": workspaceID,
+ "display_name": entityUpdateDisplayName,
+ "description": entityUpdateDescription,
+ },
+ )),
+ Check: resource.ComposeAggregateTestCheckFunc(
+ resource.TestCheckResourceAttr(testResourceItemFQN, "display_name", entityUpdateDisplayName),
+ resource.TestCheckResourceAttr(testResourceItemFQN, "description", entityUpdateDescription),
+ ),
+ },
+ },
+ ))
+}
+
+func TestAcc_ActivatorDefinitionResource_CRUD(t *testing.T) {
+ if testhelp.ShouldSkipTest(t) {
+ t.Skip("No SPN support")
+ }
+
+ workspace := testhelp.WellKnown()["WorkspaceRS"].(map[string]any)
+ workspaceID := workspace["id"].(string)
+
+ entityCreateDisplayName := testhelp.RandomName()
+ entityUpdateDisplayName := testhelp.RandomName()
+ entityUpdateDescription := testhelp.RandomName()
+
+ testHelperDefinition := map[string]any{
+ `"ReflexEntities.json"`: map[string]any{
+ "source": "${local.path}/ReflexEntities.json",
+ },
+ }
+
+ resource.Test(t, testhelp.NewTestAccCase(t, &testResourceItemFQN, nil, []resource.TestStep{
+ // Create and Read
+ {
+ ResourceName: testResourceItemFQN,
+ Config: at.JoinConfigs(
+ testHelperLocals,
+ at.CompileConfig(
+ testResourceItemHeader,
+ map[string]any{
+ "workspace_id": workspaceID,
+ "display_name": entityCreateDisplayName,
+ "format": "Default",
+ "definition": testHelperDefinition,
+ },
+ )),
+ Check: resource.ComposeAggregateTestCheckFunc(
+ resource.TestCheckResourceAttr(testResourceItemFQN, "display_name", entityCreateDisplayName),
+ resource.TestCheckResourceAttr(testResourceItemFQN, "description", ""),
+ resource.TestCheckResourceAttr(testResourceItemFQN, "definition_update_enabled", "true"),
+ ),
+ },
+ // Update and Read
+ {
+ ResourceName: testResourceItemFQN,
+ Config: at.JoinConfigs(
+ testHelperLocals,
+ at.CompileConfig(
+ testResourceItemHeader,
+ map[string]any{
+ "workspace_id": workspaceID,
+ "display_name": entityUpdateDisplayName,
+ "description": entityUpdateDescription,
+ "format": "Default",
+ "definition": testHelperDefinition,
+ },
+ )),
+ Check: resource.ComposeAggregateTestCheckFunc(
+ resource.TestCheckResourceAttr(testResourceItemFQN, "display_name", entityUpdateDisplayName),
+ resource.TestCheckResourceAttr(testResourceItemFQN, "description", entityUpdateDescription),
+ resource.TestCheckResourceAttr(testResourceItemFQN, "definition_update_enabled", "true"),
+ ),
+ },
+ },
+ ))
+}
diff --git a/internal/testhelp/fixtures/activator/ReflexEntities.json b/internal/testhelp/fixtures/activator/ReflexEntities.json
new file mode 100644
index 00000000..5b66ad4b
--- /dev/null
+++ b/internal/testhelp/fixtures/activator/ReflexEntities.json
@@ -0,0 +1,464 @@
+[
+ {
+ "uniqueIdentifier": "d82bbe62-3fc0-4f9e-a5fb-086c130e6611",
+ "payload": {
+ "name": "Package delivery sample",
+ "type": "samples"
+ },
+ "type": "container-v1"
+ },
+ {
+ "uniqueIdentifier": "74ef4ef2-d778-43f5-ae43-e680eef9a225",
+ "payload": {
+ "name": "Package delivery",
+ "runSettings": {
+ "startTime": "2025-02-14T10:35:18.7825742Z",
+ "stopTime": "2025-02-28T12:35:14.402Z"
+ },
+ "version": "V2_0",
+ "type": "PackageShipment",
+ "parentContainer": {
+ "targetUniqueIdentifier": "d82bbe62-3fc0-4f9e-a5fb-086c130e6611"
+ }
+ },
+ "type": "simulatorSource-v1"
+ },
+ {
+ "uniqueIdentifier": "68b4ce78-1fd8-4c63-9941-69b8708f6bc0",
+ "payload": {
+ "name": "Package delivery events",
+ "parentContainer": {
+ "targetUniqueIdentifier": "d82bbe62-3fc0-4f9e-a5fb-086c130e6611"
+ },
+ "definition": {
+ "type": "Event",
+ "instance": "{\"templateId\":\"SourceEvent\",\"templateVersion\":\"1.1\",\"steps\":[{\"name\":\"SourceEventStep\",\"id\":\"a38c07b9-00b4-447d-aa94-cc5667b7aa75\",\"rows\":[{\"name\":\"SourceSelector\",\"kind\":\"SourceReference\",\"arguments\":[{\"name\":\"entityId\",\"type\":\"string\",\"value\":\"74ef4ef2-d778-43f5-ae43-e680eef9a225\"}]}]}]}"
+ }
+ },
+ "type": "timeSeriesView-v1"
+ },
+ {
+ "uniqueIdentifier": "cf09f985-dbe2-4d0e-974c-6d1821105dea",
+ "payload": {
+ "name": "Package",
+ "parentContainer": {
+ "targetUniqueIdentifier": "d82bbe62-3fc0-4f9e-a5fb-086c130e6611"
+ },
+ "definition": {
+ "type": "Object"
+ }
+ },
+ "type": "timeSeriesView-v1"
+ },
+ {
+ "uniqueIdentifier": "1c2c9f94-f62f-4732-997f-d82bcf9b161e",
+ "payload": {
+ "name": "PackageId",
+ "parentObject": {
+ "targetUniqueIdentifier": "cf09f985-dbe2-4d0e-974c-6d1821105dea"
+ },
+ "parentContainer": {
+ "targetUniqueIdentifier": "d82bbe62-3fc0-4f9e-a5fb-086c130e6611"
+ },
+ "definition": {
+ "type": "Attribute",
+ "instance": "{\"templateId\":\"IdentityPartAttribute\",\"templateVersion\":\"1.1\",\"steps\":[{\"name\":\"IdPartStep\",\"id\":\"3f251a5e-c9c4-4764-9f25-8dc24ce4ef9b\",\"rows\":[{\"name\":\"TypeAssertion\",\"kind\":\"TypeAssertion\",\"arguments\":[{\"name\":\"op\",\"type\":\"string\",\"value\":\"Text\"},{\"name\":\"format\",\"type\":\"string\",\"value\":\"\"}]}]}]}"
+ }
+ },
+ "type": "timeSeriesView-v1"
+ },
+ {
+ "uniqueIdentifier": "4dc09ac8-09ae-4cfc-9f7c-a80ec6b73963",
+ "payload": {
+ "name": "PackageId tuple",
+ "parentObject": {
+ "targetUniqueIdentifier": "cf09f985-dbe2-4d0e-974c-6d1821105dea"
+ },
+ "parentContainer": {
+ "targetUniqueIdentifier": "d82bbe62-3fc0-4f9e-a5fb-086c130e6611"
+ },
+ "definition": {
+ "type": "Attribute",
+ "instance": "{\"templateId\":\"IdentityTupleAttribute\",\"templateVersion\":\"1.1\",\"steps\":[{\"name\":\"IdStructureStep\",\"id\":\"0febaa75-a621-4419-9157-5523ad9164d7\",\"rows\":[{\"name\":\"IdPart\",\"kind\":\"IdPart\",\"arguments\":[{\"kind\":\"AttributeReference\",\"type\":\"complex\",\"arguments\":[{\"name\":\"entityId\",\"type\":\"string\",\"value\":\"1c2c9f94-f62f-4732-997f-d82bcf9b161e\"}],\"name\":\"idPart\"}]}]}]}"
+ }
+ },
+ "type": "timeSeriesView-v1"
+ },
+ {
+ "uniqueIdentifier": "1a276fa7-527b-4e3c-a27d-f645124cb7ee",
+ "payload": {
+ "name": "Delivery events",
+ "parentObject": {
+ "targetUniqueIdentifier": "cf09f985-dbe2-4d0e-974c-6d1821105dea"
+ },
+ "parentContainer": {
+ "targetUniqueIdentifier": "d82bbe62-3fc0-4f9e-a5fb-086c130e6611"
+ },
+ "definition": {
+ "type": "Event",
+ "instance": "{\"templateId\":\"SplitEvent\",\"templateVersion\":\"1.1\",\"steps\":[{\"name\":\"SplitEventStep\",\"id\":\"3d4fc067-98a5-48ba-a4be-e6e18a5cfea5\",\"rows\":[{\"name\":\"EventSelector\",\"kind\":\"Event\",\"arguments\":[{\"kind\":\"EventReference\",\"type\":\"complex\",\"arguments\":[{\"name\":\"entityId\",\"type\":\"string\",\"value\":\"68b4ce78-1fd8-4c63-9941-69b8708f6bc0\"}],\"name\":\"event\"}]},{\"name\":\"FieldIdMapping\",\"kind\":\"FieldIdMapping\",\"arguments\":[{\"name\":\"fieldName\",\"type\":\"string\",\"value\":\"PackageId\"},{\"kind\":\"AttributeReference\",\"type\":\"complex\",\"arguments\":[{\"name\":\"entityId\",\"type\":\"string\",\"value\":\"1c2c9f94-f62f-4732-997f-d82bcf9b161e\"}],\"name\":\"idPart\"}]},{\"name\":\"SplitEventOptions\",\"kind\":\"EventOptions\",\"arguments\":[{\"name\":\"isAuthoritative\",\"type\":\"boolean\",\"value\":true}]}]}]}"
+ }
+ },
+ "type": "timeSeriesView-v1"
+ },
+ {
+ "uniqueIdentifier": "1c9b6e5e-9e82-4d50-b8d0-64b795784608",
+ "payload": {
+ "name": "Current city",
+ "parentObject": {
+ "targetUniqueIdentifier": "cf09f985-dbe2-4d0e-974c-6d1821105dea"
+ },
+ "parentContainer": {
+ "targetUniqueIdentifier": "d82bbe62-3fc0-4f9e-a5fb-086c130e6611"
+ },
+ "definition": {
+ "type": "Attribute",
+ "instance": "{\"templateId\":\"BasicEventAttribute\",\"templateVersion\":\"1.1\",\"steps\":[{\"name\":\"EventSelectStep\",\"id\":\"cd67cc24-0aa8-4612-94c2-a85fb556af0e\",\"rows\":[{\"name\":\"EventSelector\",\"kind\":\"Event\",\"arguments\":[{\"kind\":\"EventReference\",\"type\":\"complex\",\"arguments\":[{\"name\":\"entityId\",\"type\":\"string\",\"value\":\"1a276fa7-527b-4e3c-a27d-f645124cb7ee\"}],\"name\":\"event\"}]},{\"name\":\"EventFieldSelector\",\"kind\":\"EventField\",\"arguments\":[{\"name\":\"fieldName\",\"type\":\"string\",\"value\":\"City\"}]}]},{\"name\":\"EventComputeStep\",\"id\":\"93e45d92-d6a1-4579-bd7d-a90fb8c298b9\",\"rows\":[{\"name\":\"TypeAssertion\",\"kind\":\"TypeAssertion\",\"arguments\":[{\"name\":\"op\",\"type\":\"string\",\"value\":\"Text\"},{\"name\":\"format\",\"type\":\"string\",\"value\":\"\"}]}]}]}"
+ }
+ },
+ "type": "timeSeriesView-v1"
+ },
+ {
+ "uniqueIdentifier": "21361070-c0b5-4c48-bc51-a59da6c1e751",
+ "payload": {
+ "name": "Delivery attempts",
+ "parentObject": {
+ "targetUniqueIdentifier": "cf09f985-dbe2-4d0e-974c-6d1821105dea"
+ },
+ "parentContainer": {
+ "targetUniqueIdentifier": "d82bbe62-3fc0-4f9e-a5fb-086c130e6611"
+ },
+ "definition": {
+ "type": "Attribute",
+ "instance": "{\"templateId\":\"BasicEventAttribute\",\"templateVersion\":\"1.1\",\"steps\":[{\"name\":\"EventSelectStep\",\"id\":\"09952a4b-8782-4c02-9d8f-b2a3afc566f3\",\"rows\":[{\"name\":\"EventSelector\",\"kind\":\"Event\",\"arguments\":[{\"kind\":\"EventReference\",\"type\":\"complex\",\"arguments\":[{\"name\":\"entityId\",\"type\":\"string\",\"value\":\"1a276fa7-527b-4e3c-a27d-f645124cb7ee\"}],\"name\":\"event\"}]},{\"name\":\"EventFieldSelector\",\"kind\":\"EventField\",\"arguments\":[{\"name\":\"fieldName\",\"type\":\"string\",\"value\":\"DeliveryAttempts\"}]}]},{\"name\":\"EventComputeStep\",\"id\":\"b470bef1-ffe6-4aaa-a447-cb30ada3deb0\",\"rows\":[{\"name\":\"TypeAssertion\",\"kind\":\"TypeAssertion\",\"arguments\":[{\"name\":\"op\",\"type\":\"string\",\"value\":\"Number\"},{\"name\":\"format\",\"type\":\"string\",\"value\":\"\"}]}]}]}"
+ }
+ },
+ "type": "timeSeriesView-v1"
+ },
+ {
+ "uniqueIdentifier": "288a90b0-1158-4b4f-86ab-f82c4ee66ce1",
+ "payload": {
+ "name": "Delivery status",
+ "parentObject": {
+ "targetUniqueIdentifier": "cf09f985-dbe2-4d0e-974c-6d1821105dea"
+ },
+ "parentContainer": {
+ "targetUniqueIdentifier": "d82bbe62-3fc0-4f9e-a5fb-086c130e6611"
+ },
+ "definition": {
+ "type": "Attribute",
+ "instance": "{\"templateId\":\"BasicEventAttribute\",\"templateVersion\":\"1.1\",\"steps\":[{\"name\":\"EventSelectStep\",\"id\":\"51dcb897-6286-47a2-b293-041ec748a8f0\",\"rows\":[{\"name\":\"EventSelector\",\"kind\":\"Event\",\"arguments\":[{\"kind\":\"EventReference\",\"type\":\"complex\",\"arguments\":[{\"name\":\"entityId\",\"type\":\"string\",\"value\":\"1a276fa7-527b-4e3c-a27d-f645124cb7ee\"}],\"name\":\"event\"}]},{\"name\":\"EventFieldSelector\",\"kind\":\"EventField\",\"arguments\":[{\"name\":\"fieldName\",\"type\":\"string\",\"value\":\"DeliveryState\"}]}]},{\"name\":\"EventComputeStep\",\"id\":\"9959bbff-597c-46fd-a4a4-85182881db40\",\"rows\":[{\"name\":\"TypeAssertion\",\"kind\":\"TypeAssertion\",\"arguments\":[{\"name\":\"op\",\"type\":\"string\",\"value\":\"Text\"},{\"name\":\"format\",\"type\":\"string\",\"value\":\"\"}]}]}]}"
+ }
+ },
+ "type": "timeSeriesView-v1"
+ },
+ {
+ "uniqueIdentifier": "5168fdac-0239-47c2-a26f-766e6a6bd001",
+ "payload": {
+ "name": "Exception reason",
+ "parentObject": {
+ "targetUniqueIdentifier": "cf09f985-dbe2-4d0e-974c-6d1821105dea"
+ },
+ "parentContainer": {
+ "targetUniqueIdentifier": "d82bbe62-3fc0-4f9e-a5fb-086c130e6611"
+ },
+ "definition": {
+ "type": "Attribute",
+ "instance": "{\"templateId\":\"BasicEventAttribute\",\"templateVersion\":\"1.1\",\"steps\":[{\"name\":\"EventSelectStep\",\"id\":\"578497b0-467d-4d6d-9c6f-746dc8a8cadc\",\"rows\":[{\"name\":\"EventSelector\",\"kind\":\"Event\",\"arguments\":[{\"kind\":\"EventReference\",\"type\":\"complex\",\"arguments\":[{\"name\":\"entityId\",\"type\":\"string\",\"value\":\"1a276fa7-527b-4e3c-a27d-f645124cb7ee\"}],\"name\":\"event\"}]},{\"name\":\"EventFieldSelector\",\"kind\":\"EventField\",\"arguments\":[{\"name\":\"fieldName\",\"type\":\"string\",\"value\":\"Exception\"}]}]},{\"name\":\"EventComputeStep\",\"id\":\"ecd5436c-bc16-423a-b6e6-33ad1b534126\",\"rows\":[{\"name\":\"TypeAssertion\",\"kind\":\"TypeAssertion\",\"arguments\":[{\"name\":\"op\",\"type\":\"string\",\"value\":\"Text\"},{\"name\":\"format\",\"type\":\"string\",\"value\":\"\"}]}]}]}"
+ }
+ },
+ "type": "timeSeriesView-v1"
+ },
+ {
+ "uniqueIdentifier": "8abe818e-e00e-4db2-a342-a3ae966a5d73",
+ "payload": {
+ "name": "Hours in delivery",
+ "parentObject": {
+ "targetUniqueIdentifier": "cf09f985-dbe2-4d0e-974c-6d1821105dea"
+ },
+ "parentContainer": {
+ "targetUniqueIdentifier": "d82bbe62-3fc0-4f9e-a5fb-086c130e6611"
+ },
+ "definition": {
+ "type": "Attribute",
+ "instance": "{\"templateId\":\"BasicEventAttribute\",\"templateVersion\":\"1.1\",\"steps\":[{\"name\":\"EventSelectStep\",\"id\":\"89a71f67-63ac-429f-b673-1ad4f92dd7e4\",\"rows\":[{\"name\":\"EventSelector\",\"kind\":\"Event\",\"arguments\":[{\"kind\":\"EventReference\",\"type\":\"complex\",\"arguments\":[{\"name\":\"entityId\",\"type\":\"string\",\"value\":\"1a276fa7-527b-4e3c-a27d-f645124cb7ee\"}],\"name\":\"event\"}]},{\"name\":\"EventFieldSelector\",\"kind\":\"EventField\",\"arguments\":[{\"name\":\"fieldName\",\"type\":\"string\",\"value\":\"DeliveryAttemptHours\"}]}]},{\"name\":\"EventComputeStep\",\"id\":\"a445a96a-cf72-4651-b681-6538383cfb26\",\"rows\":[{\"name\":\"TypeAssertion\",\"kind\":\"TypeAssertion\",\"arguments\":[{\"name\":\"op\",\"type\":\"string\",\"value\":\"Number\"},{\"name\":\"format\",\"type\":\"string\",\"value\":\"\"}]}]}]}"
+ }
+ },
+ "type": "timeSeriesView-v1"
+ },
+ {
+ "uniqueIdentifier": "c33ed0e9-fecc-4431-84ce-ccc10e34ef6d",
+ "payload": {
+ "name": "Humidity",
+ "parentObject": {
+ "targetUniqueIdentifier": "cf09f985-dbe2-4d0e-974c-6d1821105dea"
+ },
+ "parentContainer": {
+ "targetUniqueIdentifier": "d82bbe62-3fc0-4f9e-a5fb-086c130e6611"
+ },
+ "definition": {
+ "type": "Attribute",
+ "instance": "{\"templateId\":\"BasicEventAttribute\",\"templateVersion\":\"1.1\",\"steps\":[{\"name\":\"EventSelectStep\",\"id\":\"bff35a4a-77b6-492a-abaa-eba5d521df19\",\"rows\":[{\"name\":\"EventSelector\",\"kind\":\"Event\",\"arguments\":[{\"kind\":\"EventReference\",\"type\":\"complex\",\"arguments\":[{\"name\":\"entityId\",\"type\":\"string\",\"value\":\"1a276fa7-527b-4e3c-a27d-f645124cb7ee\"}],\"name\":\"event\"}]},{\"name\":\"EventFieldSelector\",\"kind\":\"EventField\",\"arguments\":[{\"name\":\"fieldName\",\"type\":\"string\",\"value\":\"Humidity\"}]}]},{\"name\":\"EventComputeStep\",\"id\":\"fed0ea20-29b6-4a2f-b7e3-d648962b2c6f\",\"rows\":[{\"name\":\"TypeAssertion\",\"kind\":\"TypeAssertion\",\"arguments\":[{\"name\":\"op\",\"type\":\"string\",\"value\":\"Number\"},{\"name\":\"format\",\"type\":\"string\",\"value\":\"\"}]}]}]}"
+ }
+ },
+ "type": "timeSeriesView-v1"
+ },
+ {
+ "uniqueIdentifier": "3a65315d-9d5c-408c-ab64-fe62332efa04",
+ "payload": {
+ "name": "Recipient email",
+ "parentObject": {
+ "targetUniqueIdentifier": "cf09f985-dbe2-4d0e-974c-6d1821105dea"
+ },
+ "parentContainer": {
+ "targetUniqueIdentifier": "d82bbe62-3fc0-4f9e-a5fb-086c130e6611"
+ },
+ "definition": {
+ "type": "Attribute",
+ "instance": "{\"templateId\":\"BasicEventAttribute\",\"templateVersion\":\"1.1\",\"steps\":[{\"name\":\"EventSelectStep\",\"id\":\"bf938e43-3bf5-4d4d-8afb-c4ee644ce5e1\",\"rows\":[{\"name\":\"EventSelector\",\"kind\":\"Event\",\"arguments\":[{\"kind\":\"EventReference\",\"type\":\"complex\",\"arguments\":[{\"name\":\"entityId\",\"type\":\"string\",\"value\":\"1a276fa7-527b-4e3c-a27d-f645124cb7ee\"}],\"name\":\"event\"}]},{\"name\":\"EventFieldSelector\",\"kind\":\"EventField\",\"arguments\":[{\"name\":\"fieldName\",\"type\":\"string\",\"value\":\"RecipientEmail\"}]}]},{\"name\":\"EventComputeStep\",\"id\":\"b50d3e47-f008-42af-bcf2-dcea8f023a66\",\"rows\":[{\"name\":\"TypeAssertion\",\"kind\":\"TypeAssertion\",\"arguments\":[{\"name\":\"op\",\"type\":\"string\",\"value\":\"Text\"},{\"name\":\"format\",\"type\":\"string\",\"value\":\"\"}]}]}]}"
+ }
+ },
+ "type": "timeSeriesView-v1"
+ },
+ {
+ "uniqueIdentifier": "aa104d1a-78f1-4aaa-a2f1-4826f9f166d6",
+ "payload": {
+ "name": "Special care contents",
+ "parentObject": {
+ "targetUniqueIdentifier": "cf09f985-dbe2-4d0e-974c-6d1821105dea"
+ },
+ "parentContainer": {
+ "targetUniqueIdentifier": "d82bbe62-3fc0-4f9e-a5fb-086c130e6611"
+ },
+ "definition": {
+ "type": "Attribute",
+ "instance": "{\"templateId\":\"BasicEventAttribute\",\"templateVersion\":\"1.1\",\"steps\":[{\"name\":\"EventSelectStep\",\"id\":\"77946547-42c6-49d7-b49b-ad52d2f3ed0c\",\"rows\":[{\"name\":\"EventSelector\",\"kind\":\"Event\",\"arguments\":[{\"kind\":\"EventReference\",\"type\":\"complex\",\"arguments\":[{\"name\":\"entityId\",\"type\":\"string\",\"value\":\"1a276fa7-527b-4e3c-a27d-f645124cb7ee\"}],\"name\":\"event\"}]},{\"name\":\"EventFieldSelector\",\"kind\":\"EventField\",\"arguments\":[{\"name\":\"fieldName\",\"type\":\"string\",\"value\":\"SpecialCare\"}]}]},{\"name\":\"EventComputeStep\",\"id\":\"6f02fd61-79db-4764-9cbf-2fc51acf4adc\",\"rows\":[{\"name\":\"TypeAssertion\",\"kind\":\"TypeAssertion\",\"arguments\":[{\"name\":\"op\",\"type\":\"string\",\"value\":\"Text\"},{\"name\":\"format\",\"type\":\"string\",\"value\":\"\"}]}]}]}"
+ }
+ },
+ "type": "timeSeriesView-v1"
+ },
+ {
+ "uniqueIdentifier": "74347ebb-d054-4192-96e5-f4e897d291e7",
+ "payload": {
+ "name": "Temperature (°C)",
+ "parentObject": {
+ "targetUniqueIdentifier": "cf09f985-dbe2-4d0e-974c-6d1821105dea"
+ },
+ "parentContainer": {
+ "targetUniqueIdentifier": "d82bbe62-3fc0-4f9e-a5fb-086c130e6611"
+ },
+ "definition": {
+ "type": "Attribute",
+ "instance": "{\"templateId\":\"BasicEventAttribute\",\"templateVersion\":\"1.1\",\"steps\":[{\"name\":\"EventSelectStep\",\"id\":\"9bdb8939-74fd-4472-b61c-78fed5549023\",\"rows\":[{\"name\":\"EventSelector\",\"kind\":\"Event\",\"arguments\":[{\"kind\":\"EventReference\",\"type\":\"complex\",\"arguments\":[{\"name\":\"entityId\",\"type\":\"string\",\"value\":\"1a276fa7-527b-4e3c-a27d-f645124cb7ee\"}],\"name\":\"event\"}]},{\"name\":\"EventFieldSelector\",\"kind\":\"EventField\",\"arguments\":[{\"name\":\"fieldName\",\"type\":\"string\",\"value\":\"Temperature\"}]}]},{\"name\":\"EventComputeStep\",\"id\":\"a06759f4-41a0-4e84-96a7-9677e6035a87\",\"rows\":[{\"name\":\"TypeAssertion\",\"kind\":\"TypeAssertion\",\"arguments\":[{\"name\":\"op\",\"type\":\"string\",\"value\":\"Number\"},{\"name\":\"format\",\"type\":\"string\",\"value\":\"\"}]}]}]}"
+ }
+ },
+ "type": "timeSeriesView-v1"
+ },
+ {
+ "uniqueIdentifier": "bdd9e05a-48da-43b9-aa3a-6d96c81050dc",
+ "payload": {
+ "name": "Express shipping requested",
+ "parentContainer": {
+ "targetUniqueIdentifier": "d82bbe62-3fc0-4f9e-a5fb-086c130e6611"
+ },
+ "definition": {
+ "type": "Rule",
+ "instance": "{\"templateId\":\"EventTrigger\",\"templateVersion\":\"1.1\",\"steps\":[{\"name\":\"FieldsDefaultsStep\",\"id\":\"46775ecd-77cd-44e0-bb82-28772bf1dd73\",\"rows\":[{\"name\":\"EventSelector\",\"kind\":\"Event\",\"arguments\":[{\"kind\":\"EventReference\",\"type\":\"complex\",\"arguments\":[{\"name\":\"entityId\",\"type\":\"string\",\"value\":\"68b4ce78-1fd8-4c63-9941-69b8708f6bc0\"}],\"name\":\"event\"}]}]},{\"name\":\"EventDetectStep\",\"id\":\"024b8d1c-ee30-4eef-8c8a-207f13d8bfaa\",\"rows\":[{\"name\":\"EventFieldSelector\",\"kind\":\"EventField\",\"arguments\":[{\"name\":\"fieldName\",\"type\":\"string\",\"value\":\"___type\"}]},{\"name\":\"TextValueCondition\",\"kind\":\"TextValueCondition\",\"arguments\":[{\"name\":\"op\",\"type\":\"string\",\"value\":\"IsEqualTo\"},{\"name\":\"value\",\"type\":\"string\",\"value\":\"express_shipping_request\"}]}]},{\"name\":\"ActStep\",\"id\":\"4bbb4986-d943-407c-b208-c596c9892be7\",\"rows\":[{\"name\":\"TeamsBinding\",\"kind\":\"TeamsMessage\",\"arguments\":[{\"name\":\"messageLocale\",\"type\":\"string\",\"value\":\"\"},{\"name\":\"recipients\",\"type\":\"array\",\"values\":[{\"type\":\"string\",\"value\":\"daporo@MngEnv323747.onmicrosoft.com\"}]},{\"name\":\"headline\",\"type\":\"array\",\"values\":[{\"type\":\"string\",\"value\":\"Express shipping requested\"}]},{\"name\":\"optionalMessage\",\"type\":\"array\",\"values\":[{\"type\":\"string\",\"value\":\"Express shipping was just requested for this package.\"}]},{\"name\":\"additionalInformation\",\"type\":\"array\",\"values\":[]}]}]}]}",
+ "settings": {
+ "shouldRun": false,
+ "shouldApplyRuleOnUpdate": false
+ }
+ }
+ },
+ "type": "timeSeriesView-v1"
+ },
+ {
+ "uniqueIdentifier": "6d83e09a-58b0-4c31-b0a8-060c09491d64",
+ "payload": {
+ "name": "Package created",
+ "parentObject": {
+ "targetUniqueIdentifier": "cf09f985-dbe2-4d0e-974c-6d1821105dea"
+ },
+ "parentContainer": {
+ "targetUniqueIdentifier": "d82bbe62-3fc0-4f9e-a5fb-086c130e6611"
+ },
+ "definition": {
+ "type": "Rule",
+ "instance": "{\"templateId\":\"EventTrigger\",\"templateVersion\":\"1.1\",\"steps\":[{\"name\":\"FieldsDefaultsStep\",\"id\":\"fc9151b7-c0e7-4a54-9020-d1cdd10cd84b\",\"rows\":[{\"name\":\"EventSelector\",\"kind\":\"Event\",\"arguments\":[{\"kind\":\"EventReference\",\"type\":\"complex\",\"arguments\":[{\"name\":\"entityId\",\"type\":\"string\",\"value\":\"1a276fa7-527b-4e3c-a27d-f645124cb7ee\"}],\"name\":\"event\"}]}]},{\"name\":\"EventDetectStep\",\"id\":\"c60becee-e297-4310-8057-3f4bc77f62e1\",\"rows\":[{\"name\":\"EventFieldSelector\",\"kind\":\"EventField\",\"arguments\":[{\"name\":\"fieldName\",\"type\":\"string\",\"value\":\"___type\"}]},{\"name\":\"TextValueCondition\",\"kind\":\"TextValueCondition\",\"arguments\":[{\"name\":\"op\",\"type\":\"string\",\"value\":\"IsEqualTo\"},{\"name\":\"value\",\"type\":\"string\",\"value\":\"package_created\"}]}]},{\"name\":\"ActStep\",\"id\":\"f22e7ad3-6b2d-4c9c-9fff-4df5442b2732\",\"rows\":[{\"name\":\"TeamsBinding\",\"kind\":\"TeamsMessage\",\"arguments\":[{\"name\":\"messageLocale\",\"type\":\"string\",\"value\":\"\"},{\"name\":\"recipients\",\"type\":\"array\",\"values\":[{\"type\":\"string\",\"value\":\"daporo@MngEnv323747.onmicrosoft.com\"}]},{\"name\":\"headline\",\"type\":\"array\",\"values\":[{\"type\":\"string\",\"value\":\"Package created\"}]},{\"name\":\"optionalMessage\",\"type\":\"array\",\"values\":[{\"type\":\"string\",\"value\":\"This package was just created.\"}]},{\"name\":\"additionalInformation\",\"type\":\"array\",\"values\":[]}]}]}]}",
+ "settings": {
+ "shouldRun": false,
+ "shouldApplyRuleOnUpdate": false
+ }
+ }
+ },
+ "type": "timeSeriesView-v1"
+ },
+ {
+ "uniqueIdentifier": "38975709-67c7-46d9-b619-a4092e59c50c",
+ "payload": {
+ "name": "Delivered",
+ "parentObject": {
+ "targetUniqueIdentifier": "cf09f985-dbe2-4d0e-974c-6d1821105dea"
+ },
+ "parentContainer": {
+ "targetUniqueIdentifier": "d82bbe62-3fc0-4f9e-a5fb-086c130e6611"
+ },
+ "definition": {
+ "type": "Rule",
+ "instance": "{\"templateId\":\"AttributeTrigger\",\"templateVersion\":\"1.1\",\"steps\":[{\"name\":\"ScalarSelectStep\",\"id\":\"3b96790e-54f9-4007-bba5-f0ae11358177\",\"rows\":[{\"name\":\"AttributeSelector\",\"kind\":\"Attribute\",\"arguments\":[{\"kind\":\"AttributeReference\",\"type\":\"complex\",\"arguments\":[{\"name\":\"entityId\",\"type\":\"string\",\"value\":\"288a90b0-1158-4b4f-86ab-f82c4ee66ce1\"}],\"name\":\"attribute\"}]}]},{\"name\":\"ScalarDetectStep\",\"id\":\"a55712ca-0023-4433-bd92-d784631ead1d\",\"rows\":[{\"name\":\"TextValueCondition\",\"kind\":\"TextValueCondition\",\"arguments\":[{\"name\":\"op\",\"type\":\"string\",\"value\":\"IsEqualTo\"},{\"name\":\"value\",\"type\":\"string\",\"value\":\"DeliveryAttemptSuccess\"}]},{\"name\":\"OccurrenceOption\",\"kind\":\"EachTime\",\"arguments\":[]}]},{\"name\":\"ActStep\",\"id\":\"72a1a247-7d88-4323-bc9f-addd82ee6a8b\",\"rows\":[{\"name\":\"TeamsBinding\",\"kind\":\"TeamsMessage\",\"arguments\":[{\"name\":\"messageLocale\",\"type\":\"string\",\"value\":\"\"},{\"name\":\"recipients\",\"type\":\"array\",\"values\":[{\"kind\":\"AttributeReference\",\"type\":\"complex\",\"arguments\":[{\"name\":\"entityId\",\"type\":\"string\",\"value\":\"3a65315d-9d5c-408c-ab64-fe62332efa04\"}]}]},{\"name\":\"headline\",\"type\":\"array\",\"values\":[{\"type\":\"string\",\"value\":\"Package delivered\"}]},{\"name\":\"optionalMessage\",\"type\":\"array\",\"values\":[{\"type\":\"string\",\"value\":\"This package was just delivered successfully.\"}]},{\"name\":\"additionalInformation\",\"type\":\"array\",\"values\":[]}]}]}]}",
+ "settings": {
+ "shouldRun": false,
+ "shouldApplyRuleOnUpdate": false
+ }
+ }
+ },
+ "type": "timeSeriesView-v1"
+ },
+ {
+ "uniqueIdentifier": "eed2854c-8c42-49d6-a764-9ab0cf204d13",
+ "payload": {
+ "name": "Delivery failed",
+ "parentObject": {
+ "targetUniqueIdentifier": "cf09f985-dbe2-4d0e-974c-6d1821105dea"
+ },
+ "parentContainer": {
+ "targetUniqueIdentifier": "d82bbe62-3fc0-4f9e-a5fb-086c130e6611"
+ },
+ "definition": {
+ "type": "Rule",
+ "instance": "{\"templateId\":\"AttributeTrigger\",\"templateVersion\":\"1.1\",\"steps\":[{\"name\":\"ScalarSelectStep\",\"id\":\"2cb6dcd6-30a2-4d0a-ad6d-533ecef77ff4\",\"rows\":[{\"name\":\"AttributeSelector\",\"kind\":\"Attribute\",\"arguments\":[{\"kind\":\"AttributeReference\",\"type\":\"complex\",\"arguments\":[{\"name\":\"entityId\",\"type\":\"string\",\"value\":\"288a90b0-1158-4b4f-86ab-f82c4ee66ce1\"}],\"name\":\"attribute\"}]}]},{\"name\":\"ScalarDetectStep\",\"id\":\"7deb3c39-0cae-47aa-8a52-f24fb7b3a518\",\"rows\":[{\"name\":\"TextValueCondition\",\"kind\":\"TextValueCondition\",\"arguments\":[{\"name\":\"op\",\"type\":\"string\",\"value\":\"IsEqualTo\"},{\"name\":\"value\",\"type\":\"string\",\"value\":\"DeliveryAttemptFailure\"}]},{\"name\":\"OccurrenceOption\",\"kind\":\"EachTime\",\"arguments\":[]}]},{\"name\":\"ActStep\",\"id\":\"96f4b06d-394f-4075-ae12-fd9d59f160d9\",\"rows\":[{\"name\":\"TeamsBinding\",\"kind\":\"TeamsMessage\",\"arguments\":[{\"name\":\"messageLocale\",\"type\":\"string\",\"value\":\"\"},{\"name\":\"recipients\",\"type\":\"array\",\"values\":[{\"type\":\"string\",\"value\":\"daporo@MngEnv323747.onmicrosoft.com\"}]},{\"name\":\"headline\",\"type\":\"array\",\"values\":[{\"type\":\"string\",\"value\":\"Package delivery failed\"}]},{\"name\":\"optionalMessage\",\"type\":\"array\",\"values\":[{\"type\":\"string\",\"value\":\"This package had a failed delivery attempt. An attempt will be made on the next business day.\"}]},{\"name\":\"additionalInformation\",\"type\":\"array\",\"values\":[]}]}]}]}",
+ "settings": {
+ "shouldRun": false,
+ "shouldApplyRuleOnUpdate": false
+ }
+ }
+ },
+ "type": "timeSeriesView-v1"
+ },
+ {
+ "uniqueIdentifier": "d4c82157-817f-43a3-83de-79d77cda04ed",
+ "payload": {
+ "name": "Picked up",
+ "parentObject": {
+ "targetUniqueIdentifier": "cf09f985-dbe2-4d0e-974c-6d1821105dea"
+ },
+ "parentContainer": {
+ "targetUniqueIdentifier": "d82bbe62-3fc0-4f9e-a5fb-086c130e6611"
+ },
+ "definition": {
+ "type": "Rule",
+ "instance": "{\"templateId\":\"AttributeTrigger\",\"templateVersion\":\"1.1\",\"steps\":[{\"name\":\"ScalarSelectStep\",\"id\":\"53bed8b7-65eb-4df2-a7ff-94dedb28ff92\",\"rows\":[{\"name\":\"AttributeSelector\",\"kind\":\"Attribute\",\"arguments\":[{\"kind\":\"AttributeReference\",\"type\":\"complex\",\"arguments\":[{\"name\":\"entityId\",\"type\":\"string\",\"value\":\"288a90b0-1158-4b4f-86ab-f82c4ee66ce1\"}],\"name\":\"attribute\"}]}]},{\"name\":\"ScalarDetectStep\",\"id\":\"c8144f92-cf0c-41e5-93fd-6198b4b36af3\",\"rows\":[{\"name\":\"TextChanges\",\"kind\":\"TextChanges\",\"arguments\":[{\"name\":\"op\",\"type\":\"string\",\"value\":\"ChangesTo\"},{\"name\":\"value\",\"type\":\"string\",\"value\":\"InTransit\"}]},{\"name\":\"OccurrenceOption\",\"kind\":\"EachTime\",\"arguments\":[]}]},{\"name\":\"ActStep\",\"id\":\"e793e881-1631-4c51-8ab0-ec475038eb1e\",\"rows\":[{\"name\":\"TeamsBinding\",\"kind\":\"TeamsMessage\",\"arguments\":[{\"name\":\"messageLocale\",\"type\":\"string\",\"value\":\"\"},{\"name\":\"recipients\",\"type\":\"array\",\"values\":[{\"type\":\"string\",\"value\":\"daporo@MngEnv323747.onmicrosoft.com\"}]},{\"name\":\"headline\",\"type\":\"array\",\"values\":[{\"type\":\"string\",\"value\":\"Package picked up\"}]},{\"name\":\"optionalMessage\",\"type\":\"array\",\"values\":[{\"type\":\"string\",\"value\":\"This package was just picked up for delivery.\"}]},{\"name\":\"additionalInformation\",\"type\":\"array\",\"values\":[]}]}]}]}",
+ "settings": {
+ "shouldRun": false,
+ "shouldApplyRuleOnUpdate": false
+ }
+ }
+ },
+ "type": "timeSeriesView-v1"
+ },
+ {
+ "uniqueIdentifier": "52b72a50-1130-410a-8d30-ab804ab316df",
+ "payload": {
+ "name": "Above average for Seattle",
+ "parentObject": {
+ "targetUniqueIdentifier": "cf09f985-dbe2-4d0e-974c-6d1821105dea"
+ },
+ "parentContainer": {
+ "targetUniqueIdentifier": "d82bbe62-3fc0-4f9e-a5fb-086c130e6611"
+ },
+ "definition": {
+ "type": "Rule",
+ "instance": "{\"templateId\":\"AttributeTrigger\",\"templateVersion\":\"1.1\",\"steps\":[{\"name\":\"ScalarSelectStep\",\"id\":\"c95348c6-b328-423a-9942-4aaecf130cb4\",\"rows\":[{\"name\":\"AttributeSelector\",\"kind\":\"Attribute\",\"arguments\":[{\"kind\":\"AttributeReference\",\"type\":\"complex\",\"arguments\":[{\"name\":\"entityId\",\"type\":\"string\",\"value\":\"8abe818e-e00e-4db2-a342-a3ae966a5d73\"}],\"name\":\"attribute\"}]},{\"name\":\"NumberSummary\",\"kind\":\"NumberSummary\",\"arguments\":[{\"name\":\"op\",\"type\":\"string\",\"value\":\"Average\"},{\"kind\":\"TimeDrivenWindowSpec\",\"type\":\"complex\",\"arguments\":[{\"name\":\"width\",\"type\":\"timeSpan\",\"value\":3600000.0},{\"name\":\"hop\",\"type\":\"timeSpan\",\"value\":3600000.0}],\"name\":\"window\"}]}]},{\"name\":\"ScalarDetectStep\",\"id\":\"eddd950d-2ad3-4c5a-a9bf-4120d0951310\",\"rows\":[{\"name\":\"NumberBecomes\",\"kind\":\"NumberBecomes\",\"arguments\":[{\"name\":\"op\",\"type\":\"string\",\"value\":\"BecomesGreaterThan\"},{\"name\":\"value\",\"type\":\"number\",\"value\":1.0}]},{\"name\":\"OccurrenceOption\",\"kind\":\"EachTime\",\"arguments\":[]}]},{\"name\":\"DimensionalFilterStep\",\"id\":\"67fab372-d56b-49f0-a29b-0dab89d1da8d\",\"rows\":[{\"name\":\"AttributeSelector\",\"kind\":\"Attribute\",\"arguments\":[{\"kind\":\"AttributeReference\",\"type\":\"complex\",\"arguments\":[{\"name\":\"entityId\",\"type\":\"string\",\"value\":\"1c9b6e5e-9e82-4d50-b8d0-64b795784608\"}],\"name\":\"attribute\"}]},{\"name\":\"TextValueCondition\",\"kind\":\"TextValueCondition\",\"arguments\":[{\"name\":\"op\",\"type\":\"string\",\"value\":\"IsEqualTo\"},{\"name\":\"value\",\"type\":\"string\",\"value\":\"Seattle\"}]}]},{\"name\":\"ActStep\",\"id\":\"6393af7b-03e0-4c50-8481-b22381c30536\",\"rows\":[{\"name\":\"TeamsBinding\",\"kind\":\"TeamsMessage\",\"arguments\":[{\"name\":\"messageLocale\",\"type\":\"string\",\"value\":\"\"},{\"name\":\"recipients\",\"type\":\"array\",\"values\":[{\"type\":\"string\",\"value\":\"daporo@MngEnv323747.onmicrosoft.com\"}]},{\"name\":\"headline\",\"type\":\"array\",\"values\":[{\"type\":\"string\",\"value\":\"Package delivery time above average for Seattle\"}]},{\"name\":\"optionalMessage\",\"type\":\"array\",\"values\":[{\"type\":\"string\",\"value\":\"The delivery time of this package is now above average for Seattle.\"}]},{\"name\":\"additionalInformation\",\"type\":\"array\",\"values\":[]}]}]}]}",
+ "settings": {
+ "shouldRun": false,
+ "shouldApplyRuleOnUpdate": false
+ }
+ }
+ },
+ "type": "timeSeriesView-v1"
+ },
+ {
+ "uniqueIdentifier": "d0e629c4-6664-4032-ba6f-f800c87f9477",
+ "payload": {
+ "name": "Outside allowed range",
+ "parentObject": {
+ "targetUniqueIdentifier": "cf09f985-dbe2-4d0e-974c-6d1821105dea"
+ },
+ "parentContainer": {
+ "targetUniqueIdentifier": "d82bbe62-3fc0-4f9e-a5fb-086c130e6611"
+ },
+ "definition": {
+ "type": "Rule",
+ "instance": "{\"templateId\":\"AttributeTrigger\",\"templateVersion\":\"1.1\",\"steps\":[{\"name\":\"ScalarSelectStep\",\"id\":\"91831f20-7bd0-4d67-b507-7a49425775af\",\"rows\":[{\"name\":\"AttributeSelector\",\"kind\":\"Attribute\",\"arguments\":[{\"kind\":\"AttributeReference\",\"type\":\"complex\",\"arguments\":[{\"name\":\"entityId\",\"type\":\"string\",\"value\":\"c33ed0e9-fecc-4431-84ce-ccc10e34ef6d\"}],\"name\":\"attribute\"}]}]},{\"name\":\"ScalarDetectStep\",\"id\":\"46a2837f-857e-4d1d-8c42-e3458b595689\",\"rows\":[{\"name\":\"NumberRangeCondition\",\"kind\":\"NumberRangeCondition\",\"arguments\":[{\"name\":\"op\",\"type\":\"string\",\"value\":\"IsOutsideRange\"},{\"name\":\"low\",\"type\":\"number\",\"value\":30.0},{\"name\":\"includeLow\",\"type\":\"boolean\",\"value\":true},{\"name\":\"high\",\"type\":\"number\",\"value\":60.0},{\"name\":\"includeHigh\",\"type\":\"boolean\",\"value\":true}]},{\"name\":\"OccurrenceOption\",\"kind\":\"EachTime\",\"arguments\":[]}]},{\"name\":\"ActStep\",\"id\":\"d9efb5f0-0c2a-4173-823b-9dafb4ba2fae\",\"rows\":[{\"name\":\"TeamsBinding\",\"kind\":\"TeamsMessage\",\"arguments\":[{\"name\":\"messageLocale\",\"type\":\"string\",\"value\":\"\"},{\"name\":\"recipients\",\"type\":\"array\",\"values\":[{\"type\":\"string\",\"value\":\"daporo@MngEnv323747.onmicrosoft.com\"}]},{\"name\":\"headline\",\"type\":\"array\",\"values\":[{\"type\":\"string\",\"value\":\"Package humidity is either too high or too low\"}]},{\"name\":\"optionalMessage\",\"type\":\"array\",\"values\":[{\"type\":\"string\",\"value\":\"The humidity of this package has crossed above or below the allowed range.\"}]},{\"name\":\"additionalInformation\",\"type\":\"array\",\"values\":[]}]}]}]}",
+ "settings": {
+ "shouldRun": false,
+ "shouldApplyRuleOnUpdate": false
+ }
+ }
+ },
+ "type": "timeSeriesView-v1"
+ },
+ {
+ "uniqueIdentifier": "0ffc0c22-2a28-4d55-b0b2-78f1714b362f",
+ "payload": {
+ "name": "Too hot for medicine",
+ "parentObject": {
+ "targetUniqueIdentifier": "cf09f985-dbe2-4d0e-974c-6d1821105dea"
+ },
+ "parentContainer": {
+ "targetUniqueIdentifier": "d82bbe62-3fc0-4f9e-a5fb-086c130e6611"
+ },
+ "definition": {
+ "type": "Rule",
+ "instance": "{\"templateId\":\"AttributeTrigger\",\"templateVersion\":\"1.1\",\"steps\":[{\"name\":\"ScalarSelectStep\",\"id\":\"6eae9f0e-5e6e-47f2-8b20-df415dd5b0bd\",\"rows\":[{\"name\":\"AttributeSelector\",\"kind\":\"Attribute\",\"arguments\":[{\"kind\":\"AttributeReference\",\"type\":\"complex\",\"arguments\":[{\"name\":\"entityId\",\"type\":\"string\",\"value\":\"74347ebb-d054-4192-96e5-f4e897d291e7\"}],\"name\":\"attribute\"}]},{\"name\":\"NumberSummary\",\"kind\":\"NumberSummary\",\"arguments\":[{\"name\":\"op\",\"type\":\"string\",\"value\":\"Average\"},{\"kind\":\"TimeDrivenWindowSpec\",\"type\":\"complex\",\"arguments\":[{\"name\":\"width\",\"type\":\"timeSpan\",\"value\":600000.0},{\"name\":\"hop\",\"type\":\"timeSpan\",\"value\":600000.0}],\"name\":\"window\"}]}]},{\"name\":\"ScalarDetectStep\",\"id\":\"9fcf86ed-701d-4acb-a2fb-75417c15e9f6\",\"rows\":[{\"name\":\"NumberBecomes\",\"kind\":\"NumberBecomes\",\"arguments\":[{\"name\":\"op\",\"type\":\"string\",\"value\":\"BecomesGreaterThan\"},{\"name\":\"value\",\"type\":\"number\",\"value\":20.0}]},{\"name\":\"OccurrenceOption\",\"kind\":\"EachTime\",\"arguments\":[]}]},{\"name\":\"DimensionalFilterStep\",\"id\":\"30c3278b-96ab-4ecb-9265-b83d1872e47c\",\"rows\":[{\"name\":\"AttributeSelector\",\"kind\":\"Attribute\",\"arguments\":[{\"kind\":\"AttributeReference\",\"type\":\"complex\",\"arguments\":[{\"name\":\"entityId\",\"type\":\"string\",\"value\":\"aa104d1a-78f1-4aaa-a2f1-4826f9f166d6\"}],\"name\":\"attribute\"}]},{\"name\":\"TextValueCondition\",\"kind\":\"TextValueCondition\",\"arguments\":[{\"name\":\"op\",\"type\":\"string\",\"value\":\"IsEqualTo\"},{\"name\":\"value\",\"type\":\"string\",\"value\":\"Medicine\"}]}]},{\"name\":\"ActStep\",\"id\":\"9b4707de-6be5-4ea0-9af7-019b2368caa4\",\"rows\":[{\"name\":\"TeamsBinding\",\"kind\":\"TeamsMessage\",\"arguments\":[{\"name\":\"messageLocale\",\"type\":\"string\",\"value\":\"\"},{\"name\":\"recipients\",\"type\":\"array\",\"values\":[{\"type\":\"string\",\"value\":\"daporo@MngEnv323747.onmicrosoft.com\"}]},{\"name\":\"headline\",\"type\":\"array\",\"values\":[{\"type\":\"string\",\"value\":\"Package too hot for medicine\"}]},{\"name\":\"optionalMessage\",\"type\":\"array\",\"values\":[{\"type\":\"string\",\"value\":\"This temperature-sensitive package containing medicine has exceeded the allowed threshold.\"}]},{\"name\":\"additionalInformation\",\"type\":\"array\",\"values\":[]}]}]}]}",
+ "settings": {
+ "shouldRun": false,
+ "shouldApplyRuleOnUpdate": false
+ }
+ }
+ },
+ "type": "timeSeriesView-v1"
+ },
+ {
+ "uniqueIdentifier": "430db974-b98e-42e8-96c9-f0ddeb83b437",
+ "payload": {
+ "name": "Too cold for plants",
+ "parentObject": {
+ "targetUniqueIdentifier": "cf09f985-dbe2-4d0e-974c-6d1821105dea"
+ },
+ "parentContainer": {
+ "targetUniqueIdentifier": "d82bbe62-3fc0-4f9e-a5fb-086c130e6611"
+ },
+ "definition": {
+ "type": "Rule",
+ "instance": "{\"templateId\":\"AttributeTrigger\",\"templateVersion\":\"1.1\",\"steps\":[{\"name\":\"ScalarSelectStep\",\"id\":\"65e1cf43-0f80-44d7-a176-bb26dcfffcde\",\"rows\":[{\"name\":\"AttributeSelector\",\"kind\":\"Attribute\",\"arguments\":[{\"kind\":\"AttributeReference\",\"type\":\"complex\",\"arguments\":[{\"name\":\"entityId\",\"type\":\"string\",\"value\":\"74347ebb-d054-4192-96e5-f4e897d291e7\"}],\"name\":\"attribute\"}]},{\"name\":\"NumberSummary\",\"kind\":\"NumberSummary\",\"arguments\":[{\"name\":\"op\",\"type\":\"string\",\"value\":\"Average\"},{\"kind\":\"TimeDrivenWindowSpec\",\"type\":\"complex\",\"arguments\":[{\"name\":\"width\",\"type\":\"timeSpan\",\"value\":600000.0},{\"name\":\"hop\",\"type\":\"timeSpan\",\"value\":600000.0}],\"name\":\"window\"}]}]},{\"name\":\"ScalarDetectStep\",\"id\":\"27b716b0-7c83-47ee-83e0-011acfd41738\",\"rows\":[{\"name\":\"NumberBecomes\",\"kind\":\"NumberBecomes\",\"arguments\":[{\"name\":\"op\",\"type\":\"string\",\"value\":\"BecomesLessThan\"},{\"name\":\"value\",\"type\":\"number\",\"value\":5.0}]},{\"name\":\"OccurrenceOption\",\"kind\":\"EachTime\",\"arguments\":[]}]},{\"name\":\"DimensionalFilterStep\",\"id\":\"2fbc07ed-0d2a-4554-b2a9-94bdf328f54f\",\"rows\":[{\"name\":\"AttributeSelector\",\"kind\":\"Attribute\",\"arguments\":[{\"kind\":\"AttributeReference\",\"type\":\"complex\",\"arguments\":[{\"name\":\"entityId\",\"type\":\"string\",\"value\":\"aa104d1a-78f1-4aaa-a2f1-4826f9f166d6\"}],\"name\":\"attribute\"}]},{\"name\":\"TextValueCondition\",\"kind\":\"TextValueCondition\",\"arguments\":[{\"name\":\"op\",\"type\":\"string\",\"value\":\"IsEqualTo\"},{\"name\":\"value\",\"type\":\"string\",\"value\":\"Plants\"}]}]},{\"name\":\"ActStep\",\"id\":\"4e7193bd-d1ee-4b42-aff6-8cb285749397\",\"rows\":[{\"name\":\"TeamsBinding\",\"kind\":\"TeamsMessage\",\"arguments\":[{\"name\":\"messageLocale\",\"type\":\"string\",\"value\":\"\"},{\"name\":\"recipients\",\"type\":\"array\",\"values\":[{\"type\":\"string\",\"value\":\"daporo@MngEnv323747.onmicrosoft.com\"}]},{\"name\":\"headline\",\"type\":\"array\",\"values\":[{\"type\":\"string\",\"value\":\"Package too cold for plants\"}]},{\"name\":\"optionalMessage\",\"type\":\"array\",\"values\":[{\"type\":\"string\",\"value\":\"This temperature-sensitive package containing plants has dropped below the allowed threshold.\"}]},{\"name\":\"additionalInformation\",\"type\":\"array\",\"values\":[]}]}]}]}",
+ "settings": {
+ "shouldRun": false,
+ "shouldApplyRuleOnUpdate": false
+ }
+ }
+ },
+ "type": "timeSeriesView-v1"
+ },
+ {
+ "uniqueIdentifier": "e7037849-a74d-4690-bb13-fe963c5f3b86",
+ "payload": {
+ "name": "Weather",
+ "parentObject": {
+ "targetUniqueIdentifier": "cf09f985-dbe2-4d0e-974c-6d1821105dea"
+ },
+ "parentContainer": {
+ "targetUniqueIdentifier": "d82bbe62-3fc0-4f9e-a5fb-086c130e6611"
+ },
+ "definition": {
+ "type": "Rule",
+ "instance": "{\"templateId\":\"AttributeTrigger\",\"templateVersion\":\"1.1\",\"steps\":[{\"name\":\"ScalarSelectStep\",\"id\":\"777759f1-2fc3-4417-91e2-efed92a8b631\",\"rows\":[{\"name\":\"AttributeSelector\",\"kind\":\"Attribute\",\"arguments\":[{\"kind\":\"AttributeReference\",\"type\":\"complex\",\"arguments\":[{\"name\":\"entityId\",\"type\":\"string\",\"value\":\"5168fdac-0239-47c2-a26f-766e6a6bd001\"}],\"name\":\"attribute\"}]}]},{\"name\":\"ScalarDetectStep\",\"id\":\"a86014b4-541c-4c33-9ce4-fa1b4d465c7b\",\"rows\":[{\"name\":\"TextValueCondition\",\"kind\":\"TextValueCondition\",\"arguments\":[{\"name\":\"op\",\"type\":\"string\",\"value\":\"IsEqualTo\"},{\"name\":\"value\",\"type\":\"string\",\"value\":\"Weather\"}]},{\"name\":\"OccurrenceOption\",\"kind\":\"EachTime\",\"arguments\":[]}]},{\"name\":\"ActStep\",\"id\":\"c2bde524-6e11-4a3b-ae8a-de09a4020edf\",\"rows\":[{\"name\":\"TeamsBinding\",\"kind\":\"TeamsMessage\",\"arguments\":[{\"name\":\"messageLocale\",\"type\":\"string\",\"value\":\"\"},{\"name\":\"recipients\",\"type\":\"array\",\"values\":[{\"type\":\"string\",\"value\":\"daporo@MngEnv323747.onmicrosoft.com\"}]},{\"name\":\"headline\",\"type\":\"array\",\"values\":[{\"type\":\"string\",\"value\":\"Package delivery failed due to weather.\"}]},{\"name\":\"optionalMessage\",\"type\":\"array\",\"values\":[{\"type\":\"string\",\"value\":\"This package could not be delivered due to weather delays.\"}]},{\"name\":\"additionalInformation\",\"type\":\"array\",\"values\":[]}]}]}]}",
+ "settings": {
+ "shouldRun": false,
+ "shouldApplyRuleOnUpdate": false
+ }
+ }
+ },
+ "type": "timeSeriesView-v1"
+ }
+]