From a861859a287afbbf58930535e75894b0f488e3b3 Mon Sep 17 00:00:00 2001 From: Johnson Yang Date: Wed, 27 Oct 2021 11:02:30 -0700 Subject: [PATCH 1/4] IoT Central Public API 1.1-preview Oct Release (#16514) * Add new 2.0-preview.1 version for IoT Central * fix typo on enum value * rollback 1.0 changes, applied 2.0-preview.1 * fix typo * remove non-used examples * fix style * update version from 2.0-preview.1 to 1.1-preview * update code review comments, fix patch consumes with json-patch support, fix examples for fileupload * add nextLink to collection of orgs * fix typo * fix wrong position of paging * fix the paging * add . to description * update default to use enum for api-version * add oct release with query, cde v2, device filter, device template filter, relationship, edge template, simplified template patching * update examples * fix lint error, model validation * fix missing type in examples, remove url format * fix ID case * fix id case * fix ID case * add iotc query language reference * fix typo --- custom-words.txt | 5 + .../dataexports_destinations_create_adx.json | 42 + .../dataexports_destinations_create_blob.json | 34 + ...aexports_destinations_create_eventhub.json | 32 + ...dataexports_destinations_create_queue.json | 32 + ...dataexports_destinations_create_topic.json | 32 + ...taexports_destinations_create_webhook.json | 38 + .../dataexports_destinations_delete.json | 13 + ...dataexports_destinations_exports_list.json | 32 + .../dataexports_destinations_get.json | 33 + .../dataexports_destinations_list.json | 86 + ...taexports_destinations_update_webhook.json | 35 + .../examples/dataexports_exports_create.json | 50 + .../examples/dataexports_exports_delete.json | 13 + ...dataexports_exports_destinations_list.json | 26 + .../examples/dataexports_exports_get.json | 33 + .../examples/dataexports_exports_list.json | 67 + .../examples/dataexports_exports_update.json | 42 + .../devices_relationships_create.json | 26 + .../devices_relationships_delete.json | 14 + .../examples/devices_relationships_get.json | 21 + .../examples/devices_relationships_list.json | 36 + .../devices_relationships_update.json | 24 + .../examples/devicetemplates_create.json | 182 ++ .../examples/devicetemplates_get.json | 91 + .../examples/devicetemplates_list.json | 91 + .../examples/devicetemplates_update.json | 352 ++++ .../1.1-preview/examples/fileUpload_get.json | 1 - .../1.1-preview/examples/query_run.json | 65 + .../preview/1.1-preview/iotcentral.json | 1606 ++++++++++++++++- 30 files changed, 3078 insertions(+), 76 deletions(-) create mode 100644 specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_create_adx.json create mode 100644 specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_create_blob.json create mode 100644 specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_create_eventhub.json create mode 100644 specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_create_queue.json create mode 100644 specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_create_topic.json create mode 100644 specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_create_webhook.json create mode 100644 specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_delete.json create mode 100644 specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_exports_list.json create mode 100644 specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_get.json create mode 100644 specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_list.json create mode 100644 specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_update_webhook.json create mode 100644 specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_exports_create.json create mode 100644 specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_exports_delete.json create mode 100644 specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_exports_destinations_list.json create mode 100644 specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_exports_get.json create mode 100644 specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_exports_list.json create mode 100644 specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_exports_update.json create mode 100644 specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_relationships_create.json create mode 100644 specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_relationships_delete.json create mode 100644 specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_relationships_get.json create mode 100644 specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_relationships_list.json create mode 100644 specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_relationships_update.json create mode 100644 specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devicetemplates_update.json create mode 100644 specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/query_run.json diff --git a/custom-words.txt b/custom-words.txt index f8be822eecfc..18f964100357 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -2414,6 +2414,11 @@ pmem rawphysical rawvirtual sesparse +blobstorage +dataexplorer +servicebusqueue +servicebustopic +dataexports stackset CSPM autoprovisioning diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_create_adx.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_create_adx.json new file mode 100644 index 000000000000..9f7dddc333e1 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_create_adx.json @@ -0,0 +1,42 @@ +{ + "title": "Create data export ADX destination", + "description": "Create an ADX destination with an Id.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "destinationId": "destination1", + "api-version": "1.1-preview", + "body": { + "displayName": "Azure Data Explorer", + "type": "dataexplorer@v1", + "clusterUrl": "https://[clusterName].westus2.kusto.windows.net", + "database": "database1", + "table": "table1", + "authorization": { + "type": "servicePrincipal", + "clientId": "3b420743-2020-44c6-9b70-cc42f945db0x", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "clientSecret": "[Secret]" + } + } + }, + "responses": { + "200": { + "body": { + "id": "destination1", + "displayName": "Azure Data Explorer", + "type": "dataexplorer@v1", + "clusterUrl": "https://[clusterName].westus2.kusto.windows.net", + "database": "database1", + "table": "table1", + "authorization": { + "type": "servicePrincipal", + "clientId": "3b420743-2020-44c6-9b70-cc42f945db0x", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "clientSecret": "*****" + }, + "status": "waiting" + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_create_blob.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_create_blob.json new file mode 100644 index 000000000000..b5e713f1eacd --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_create_blob.json @@ -0,0 +1,34 @@ +{ + "title": "Create data export Blob Storage destination", + "description": "Create a Blob Storage destination with an Id.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "destinationId": "destination1", + "api-version": "1.1-preview", + "body": { + "displayName": "Blob Storage", + "type": "blobstorage@v1", + "authorization": { + "type": "connectionString", + "connectionString": "DefaultEndpointsProtocol=https;AccountName=[accountName];AccountKey=[key];EndpointSuffix=core.windows.net", + "containerName": "test" + } + } + }, + "responses": { + "200": { + "body": { + "id": "destination1", + "displayName": "Blob Storage", + "type": "blobstorage@v1", + "authorization": { + "type": "connectionString", + "connectionString": "DefaultEndpointsProtocol=https;AccountName=[accountName];AccountKey=*****;EndpointSuffix=core.windows.net", + "containerName": "test" + }, + "status": "waiting" + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_create_eventhub.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_create_eventhub.json new file mode 100644 index 000000000000..8434210d4359 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_create_eventhub.json @@ -0,0 +1,32 @@ +{ + "title": "Create data export Event Hub destination", + "description": "Create an Event hub destination with an Id.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "destinationId": "destination1", + "api-version": "1.1-preview", + "body": { + "displayName": "Event Hub", + "type": "eventhubs@v1", + "authorization": { + "type": "connectionString", + "connectionString": "Endpoint=sb://[hubName].servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=[Key];EntityPath=entityPath1" + } + } + }, + "responses": { + "200": { + "body": { + "id": "destination1", + "displayName": "Event Hub", + "type": "eventhubs@v1", + "authorization": { + "type": "connectionString", + "connectionString": "Endpoint=sb://[hubName].servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=*****;EntityPath=entityPath1" + }, + "status": "waiting" + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_create_queue.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_create_queue.json new file mode 100644 index 000000000000..81baaf783c76 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_create_queue.json @@ -0,0 +1,32 @@ +{ + "title": "Create data export Service Bus Queue destination", + "description": "Create an Service Bus Queue destination with an Id.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "destinationId": "destination1", + "api-version": "1.1-preview", + "body": { + "displayName": "Service Bus Queue", + "type": "servicebusqueue@v1", + "authorization": { + "type": "connectionString", + "connectionString": "Endpoint=sb://[namespance].servicebus.windows.net/;SharedAccessKeyName=xxx;SharedAccessKey=[key];EntityPath=[name]" + } + } + }, + "responses": { + "200": { + "body": { + "id": "destination1", + "displayName": "Service Bus Queue", + "type": "servicebusqueue@v1", + "authorization": { + "type": "connectionString", + "connectionString": "Endpoint=sb://[namespace].servicebus.windows.net/;SharedAccessKeyName=xxx;SharedAccessKey=*****;EntityPath=[name]" + }, + "status": "waiting" + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_create_topic.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_create_topic.json new file mode 100644 index 000000000000..34d7c59356e1 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_create_topic.json @@ -0,0 +1,32 @@ +{ + "title": "Create data export Event Hub destination", + "description": "Create an Event hub destination with an Id.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "destinationId": "destination1", + "api-version": "1.1-preview", + "body": { + "displayName": "Service Bus Topic", + "type": "servicebustopic@v1", + "authorization": { + "type": "connectionString", + "connectionString": "Endpoint=sb://[namespace].servicebus.windows.net/;SharedAccessKeyName=xxx;SharedAccessKey=[key];EntityPath=[name]" + } + } + }, + "responses": { + "200": { + "body": { + "id": "destination1", + "displayName": "Service Bus Topic", + "type": "servicebustopic@v1", + "authorization": { + "type": "connectionString", + "connectionString": "Endpoint=sb://[namespace].servicebus.windows.net/;SharedAccessKeyName=xxx;SharedAccessKey=*****;EntityPath=[name]" + }, + "status": "waiting" + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_create_webhook.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_create_webhook.json new file mode 100644 index 000000000000..299cd1626b54 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_create_webhook.json @@ -0,0 +1,38 @@ +{ + "title": "Create data export Webhook destination", + "description": "Create a Webhook destination with an Id.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "destinationId": "destination1", + "api-version": "1.1-preview", + "body": { + "displayName": "Webhook No Auth", + "type": "webhook@v1", + "url": "https://webhook.site/9bda8769-d540-4d92-946b-48c5a01e59bd", + "headerCustomizations": { + "x-custom-region": { + "value": "westcentralus", + "secret": false + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "destination1", + "displayName": "Webhook No Auth", + "type": "webhook@v1", + "url": "https://webhook.site/9bda8769-d540-4d92-946b-48c5a01e59bd", + "headerCustomizations": { + "x-custom-region": { + "value": "westcentralus", + "secret": false + } + }, + "status": "waiting" + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_delete.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_delete.json new file mode 100644 index 000000000000..1de306e3b487 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_delete.json @@ -0,0 +1,13 @@ +{ + "title": "Delete data export destination", + "description": "Delete a data export destination with Id.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "destinationId": "destination1", + "api-version": "1.1-preview" + }, + "responses": { + "204": {} + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_exports_list.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_exports_list.json new file mode 100644 index 000000000000..b44d5372e464 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_exports_list.json @@ -0,0 +1,32 @@ +{ + "title": "List all data exports connected to the given destination", + "description": "Get a list of data exports connected to the given destination, returned exports include everything except the destination.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "api-version": "1.1-preview", + "destinationId": "destination1" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "newTest", + "displayName": "Test Export 1", + "enabled": true, + "source": "telemetry", + "filter": "SELECT * FROM devices WHERE $displayName != \"abc\" AND $id = \"a\"", + "enrichments": { + "abc": { + "path": "$templateDisplayName" + } + }, + "destinations": [], + "status": "healthy" + } + ] + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_get.json new file mode 100644 index 000000000000..89cd1fbba408 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_get.json @@ -0,0 +1,33 @@ +{ + "title": "Get data export destination", + "description": "Get a data export destination with Id.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "destinationId": "destination1", + "api-version": "1.1-preview" + }, + "responses": { + "200": { + "body": { + "id": "1021f12a-6969-4eff-8518-57cac5f128ab", + "displayName": "Webhook No Auth", + "type": "webhook@v1", + "url": "https://webhook.site/9bda8769-d540-4d92-946b-48c5a01e59bd", + "headerCustomizations": { + "x-custom-region": { + "value": "westcentralus", + "secret": false + } + }, + "status": "error", + "errors": [ + { + "code": "InvalidResponse", + "message": "The webhook returned a 4xx status code." + } + ] + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_list.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_list.json new file mode 100644 index 000000000000..e777d670cd11 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_list.json @@ -0,0 +1,86 @@ +{ + "title": "List data export destinations in your application", + "description": "Get a list of data export destinations in your application.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "api-version": "1.1-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "1021f12a-6969-4eff-8518-57cac5f128ab", + "displayName": "Webhook No Auth", + "type": "webhook@v1", + "url": "https://webhook.site/9bda8769-d540-4d92-946b-48c5a01e59bd", + "headerCustomizations": { + "x-custom-region": { + "value": "westcentralus", + "secret": false + } + }, + "status": "waiting" + }, + { + "id": "70bb70e7-e308-4628-95aa-706596646f02", + "displayName": "Service Bus Queue", + "type": "servicebusqueue@v1", + "authorization": { + "type": "connectionString", + "connectionString": "Endpoint=sb://[namespace].servicebus.windows.net/;SharedAccessKeyName=xxx;SharedAccessKey=*****;EntityPath=[queue name]" + }, + "status": "waiting" + }, + { + "id": "7308456f-c72b-43d8-99ba-22a49ea5d51a", + "displayName": "Service Bus Topic", + "type": "servicebustopic@v1", + "authorization": { + "type": "connectionString", + "connectionString": "Endpoint=sb://[namespace].servicebus.windows.net/;SharedAccessKeyName=xxx;SharedAccessKey=*****;EntityPath=[topic name]" + }, + "status": "waiting" + }, + { + "id": "b3bfe8f0-ea63-42f9-82e1-bbade5250aba", + "displayName": "Azure Data Explorer", + "type": "dataexplorer@v1", + "clusterUrl": "https://[clusterName].westus2.kusto.windows.net", + "database": "iiot", + "table": "demo", + "authorization": { + "type": "servicePrincipal", + "clientId": "5b420743-2020-44c6-9b70-cc42f945db0c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "clientSecret": "*****" + }, + "status": "waiting" + }, + { + "id": "beb083d0-cec9-4e7e-8e4b-22b88e8e3479", + "displayName": "Azure Blob Storage", + "type": "blobstorage@v1", + "authorization": { + "type": "connectionString", + "connectionString": "DefaultEndpointsProtocol=https;AccountName=[accountName];AccountKey=*****;EndpointSuffix=core.windows.net", + "containerName": "test" + }, + "status": "waiting" + }, + { + "id": "c0e2a49f-6d5b-4bc1-b448-069806b72781", + "displayName": "Event Hub", + "type": "eventhubs@v1", + "authorization": { + "type": "connectionString", + "connectionString": "Endpoint=sb://[namespace].servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=*****;EntityPath=[hub name]" + }, + "status": "waiting" + } + ] + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_update_webhook.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_update_webhook.json new file mode 100644 index 000000000000..18c8ad7066dd --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_destinations_update_webhook.json @@ -0,0 +1,35 @@ +{ + "title": "Update data export Webhook destination", + "description": "Updatea Webhook destination with an Id.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "destinationId": "destination1", + "api-version": "1.1-preview", + "body": { + "headerCustomizations": { + "x-custom-region": { + "value": "eastus", + "secret": false + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "destination1", + "displayName": "Webhook No Auth", + "type": "webhook@v1", + "url": "https://webhook.site/9bda8769-d540-4d92-946b-48c5a01e59bd", + "headerCustomizations": { + "x-custom-region": { + "value": "eastus", + "secret": false + } + }, + "status": "waiting" + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_exports_create.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_exports_create.json new file mode 100644 index 000000000000..edf6508461ff --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_exports_create.json @@ -0,0 +1,50 @@ +{ + "title": "Create a data export", + "description": "Create a data export with Id.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "exportId": "export1", + "api-version": "1.1-preview", + "body": { + "displayName": "Test Export 1", + "enabled": false, + "source": "telemetry", + "filter": "SELECT * FROM devices WHERE $displayName != \"abc\" AND $id = \"a\"", + "enrichments": { + "abc": { + "path": "$templateDisplayName" + } + }, + "destinations": [ + { + "id": "fa5792a4-ead3-41dc-a972-fbeed33d46ae", + "transform": "{ ApplicationId: .applicationId, Component: .component, DeviceName: .device.name }" + } + ] + } + }, + "responses": { + "200": { + "body": { + "id": "export1", + "displayName": "Test Export 1", + "enabled": false, + "source": "telemetry", + "filter": "SELECT * FROM devices WHERE $displayName != \"abc\" AND $id = \"a\"", + "enrichments": { + "abc": { + "path": "$templateDisplayName" + } + }, + "destinations": [ + { + "id": "fa5792a4-ead3-41dc-a972-fbeed33d46ae", + "transform": "{ ApplicationId: .applicationId, Component: .component, DeviceName: .device.name }" + } + ], + "status": "notStarted" + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_exports_delete.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_exports_delete.json new file mode 100644 index 000000000000..be9dbbd5212a --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_exports_delete.json @@ -0,0 +1,13 @@ +{ + "title": "Delete a data export", + "description": "Delete a data export with Id.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "exportId": "export1", + "api-version": "1.1-preview" + }, + "responses": { + "204": {} + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_exports_destinations_list.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_exports_destinations_list.json new file mode 100644 index 000000000000..a50cc5059043 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_exports_destinations_list.json @@ -0,0 +1,26 @@ +{ + "title": "List destinations defined in data export", + "description": "Get a list of destinations in your data export.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "api-version": "1.1-preview", + "exportId": "export1" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "fa5792a4-ead3-41dc-a972-fbeed33d46ae", + "displayName": "Web Hook", + "type": "webhook@v1", + "url": "https://webhook.site/9bda8769-d540-4d92-946b-48c5a01e59bd", + "headerCustomizations": {}, + "status": "healthy" + } + ] + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_exports_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_exports_get.json new file mode 100644 index 000000000000..3b8facd0d5b2 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_exports_get.json @@ -0,0 +1,33 @@ +{ + "title": "Get a data export", + "description": "Get a data export with Id.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "exportId": "export1", + "api-version": "1.1-preview" + }, + "responses": { + "200": { + "body": { + "id": "export1", + "displayName": "Test Export 1", + "enabled": false, + "source": "telemetry", + "filter": "SELECT * FROM devices WHERE $displayName != \"abc\" AND $id = \"a\"", + "enrichments": { + "abc": { + "path": "$templateDisplayName" + } + }, + "destinations": [ + { + "id": "fa5792a4-ead3-41dc-a972-fbeed33d46ae", + "transform": "{ ApplicationId: .applicationId, Component: .component, DeviceName: .device.name }" + } + ], + "status": "notStarted" + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_exports_list.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_exports_list.json new file mode 100644 index 000000000000..29ab1f4097af --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_exports_list.json @@ -0,0 +1,67 @@ +{ + "title": "List data exports in your application", + "description": "Get a list of data exports in your application.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "api-version": "1.1-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "export1", + "displayName": "Test Export 1", + "enabled": false, + "source": "telemetry", + "filter": "SELECT * FROM devices WHERE $displayName != \"abc\" AND $id = \"a\"", + "enrichments": { + "abc": { + "path": "$templateDisplayName" + } + }, + "destinations": [ + { + "id": "fa5792a4-ead3-41dc-a972-fbeed33d46ae", + "transform": "{ ApplicationId: .applicationId, Component: .component, DeviceName: .device.name }" + } + ], + "status": "notStarted" + }, + { + "id": "export2", + "displayName": "Test Export 2", + "enabled": true, + "source": "telemetry", + "filter": "SELECT * FROM devices WHERE $id == \"a\"", + "enrichments": { + "abc": { + "path": "$deviceName" + } + }, + "destinations": [ + { + "id": "fa5792a4-ead3-41dc-a972-fbeed33d46ae" + } + ], + "status": "starting" + }, + { + "id": "d7686dda-43d5-4e22-af4e-9518b0ebed29", + "displayName": "Test Export 3", + "enabled": true, + "source": "properties", + "filter": "SELECT * FROM devices WHERE CONTAINS($displayName, \"a\")", + "destinations": [ + { + "id": "destination1" + } + ], + "status": "healthy" + } + ] + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_exports_update.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_exports_update.json new file mode 100644 index 000000000000..e5024fed0936 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/dataexports_exports_update.json @@ -0,0 +1,42 @@ +{ + "title": "Update a data export", + "description": "Update a data export with Id.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "exportId": "export1", + "api-version": "1.1-preview", + "body": { + "displayName": "Test Export Update", + "enabled": true, + "enrichments": { + "abc": { + "path": "$provisioned" + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "export1", + "displayName": "Test Export Update", + "enabled": true, + "source": "telemetry", + "filter": "SELECT * FROM devices WHERE $displayName != \"abc\" AND $id = \"a\"", + "enrichments": { + "abc": { + "path": "$provisioned" + } + }, + "destinations": [ + { + "id": "fa5792a4-ead3-41dc-a972-fbeed33d46ae", + "transform": "{ ApplicationId: .applicationId, Component: .component, DeviceName: .device.name }" + } + ], + "status": "starting" + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_relationships_create.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_relationships_create.json new file mode 100644 index 000000000000..edbbd3a1be67 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_relationships_create.json @@ -0,0 +1,26 @@ +{ + "title": "Create a relationship between device", + "description": "Create a relationship with an Id.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "deviceId": "device1", + "relationshipId": "relationship1", + "api-version": "1.1-preview", + "body": { + "name": "Relationship1", + "source": "device1", + "target": "device2" + } + }, + "responses": { + "200": { + "body": { + "id": "relationship1", + "name": "Relationship1", + "source": "device1", + "target": "device2" + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_relationships_delete.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_relationships_delete.json new file mode 100644 index 000000000000..3059c326ba7d --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_relationships_delete.json @@ -0,0 +1,14 @@ +{ + "title": "Delete device relationship", + "description": "Delete a device relationship by Id.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "deviceId": "device1", + "relationshipId": "relationship1", + "api-version": "1.1-preview" + }, + "responses": { + "204": {} + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_relationships_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_relationships_get.json new file mode 100644 index 000000000000..ddb237074a77 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_relationships_get.json @@ -0,0 +1,21 @@ +{ + "title": "Get a relationship between device", + "description": "Get a relationship with an Id.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "deviceId": "device1", + "relationshipId": "relationship1", + "api-version": "1.1-preview" + }, + "responses": { + "200": { + "body": { + "id": "relationship1", + "name": "Relationship1", + "source": "device1", + "target": "device2" + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_relationships_list.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_relationships_list.json new file mode 100644 index 000000000000..3d9df231bc22 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_relationships_list.json @@ -0,0 +1,36 @@ +{ + "title": "List device relationships", + "description": "List all relationships for your device.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "deviceId": "device1", + "api-version": "1.1-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "relationship1", + "name": "Relationship1", + "source": "device1", + "target": "device2" + }, + { + "id": "relationship2", + "name": "Relationship2", + "source": "device3", + "target": "device1" + }, + { + "id": "relationship3", + "name": "Relationship3", + "source": "device1", + "target": "device4" + } + ] + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_relationships_update.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_relationships_update.json new file mode 100644 index 000000000000..cf51f5f5a5f2 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_relationships_update.json @@ -0,0 +1,24 @@ +{ + "title": "Update a relationship between device", + "description": "Update a relationship with an Id.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "deviceId": "device1", + "relationshipId": "relationship1", + "api-version": "1.1-preview", + "body": { + "target": "device3" + } + }, + "responses": { + "200": { + "body": { + "id": "relationship1", + "name": "Relationship1", + "source": "device1", + "target": "device3" + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devicetemplates_create.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devicetemplates_create.json index 1b78f2bda9ed..796afe6e7a0d 100644 --- a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devicetemplates_create.json +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devicetemplates_create.json @@ -172,6 +172,97 @@ "schema": "dateTime" } ] + }, + "deploymentManifest": { + "modulesContent": { + "$edgeAgent": { + "properties.desired": { + "schemaVersion": "1.1", + "runtime": { + "type": "docker", + "settings": { + "minDockerVersion": "v1.25", + "loggingOptions": "", + "registryCredentials": { + "ContosoRegistry": { + "username": "myacr", + "password": "", + "address": "myacr.azurecr.io" + } + } + } + }, + "systemModules": { + "edgeAgent": { + "type": "docker", + "settings": { + "image": "mcr.microsoft.com/azureiotedge-agent:1.1", + "createOptions": "{}" + } + }, + "edgeHub": { + "type": "docker", + "status": "running", + "restartPolicy": "always", + "startupOrder": 0, + "settings": { + "image": "mcr.microsoft.com/azureiotedge-hub:1.1", + "createOptions": "{\"HostConfig\":{\"PortBindings\":{\"443/tcp\":[{\"HostPort\":\"443\"}],\"5671/tcp\":[{\"HostPort\":\"5671\"}],\"8883/tcp\":[{\"HostPort\":\"8883\"}]}}}" + } + } + }, + "modules": { + "SimulatedTemperatureSensor": { + "version": "1.0", + "type": "docker", + "status": "running", + "restartPolicy": "always", + "startupOrder": 2, + "settings": { + "image": "mcr.microsoft.com/azureiotedge-simulated-temperature-sensor:1.0", + "createOptions": "{}" + } + }, + "testModule": { + "version": "1.0", + "type": "docker", + "status": "running", + "restartPolicy": "always", + "startupOrder": 1, + "env": { + "tempLimit": { + "value": "100" + } + }, + "settings": { + "image": "myacr.azurecr.io/testModule:latest", + "createOptions": "{}" + } + } + } + } + }, + "$edgeHub": { + "properties.desired": { + "schemaVersion": "1.1", + "routes": { + "sensorToFilter": { + "route": "FROM /messages/modules/SimulatedTemperatureSensor/outputs/temperatureOutput INTO BrokeredEndpoint(\"/modules/testModule/inputs/input1\")", + "priority": 0, + "timeToLiveSecs": 1800 + }, + "filterToIoTHub": { + "route": "FROM /messages/modules/testModule/outputs/output1 INTO $upstream", + "priority": 1, + "timeToLiveSecs": 1800 + } + }, + "storeAndForwardConfiguration": { + "timeToLiveSecs": 100 + } + } + } + } } } }, @@ -345,6 +436,97 @@ "schema": "dateTime" } ] + }, + "deploymentManifest": { + "modulesContent": { + "$edgeAgent": { + "properties.desired": { + "schemaVersion": "1.1", + "runtime": { + "type": "docker", + "settings": { + "minDockerVersion": "v1.25", + "loggingOptions": "", + "registryCredentials": { + "ContosoRegistry": { + "username": "myacr", + "password": "", + "address": "myacr.azurecr.io" + } + } + } + }, + "systemModules": { + "edgeAgent": { + "type": "docker", + "settings": { + "image": "mcr.microsoft.com/azureiotedge-agent:1.1", + "createOptions": "{}" + } + }, + "edgeHub": { + "type": "docker", + "status": "running", + "restartPolicy": "always", + "startupOrder": 0, + "settings": { + "image": "mcr.microsoft.com/azureiotedge-hub:1.1", + "createOptions": "{\"HostConfig\":{\"PortBindings\":{\"443/tcp\":[{\"HostPort\":\"443\"}],\"5671/tcp\":[{\"HostPort\":\"5671\"}],\"8883/tcp\":[{\"HostPort\":\"8883\"}]}}}" + } + } + }, + "modules": { + "SimulatedTemperatureSensor": { + "version": "1.0", + "type": "docker", + "status": "running", + "restartPolicy": "always", + "startupOrder": 2, + "settings": { + "image": "mcr.microsoft.com/azureiotedge-simulated-temperature-sensor:1.0", + "createOptions": "{}" + } + }, + "testModule": { + "version": "1.0", + "type": "docker", + "status": "running", + "restartPolicy": "always", + "startupOrder": 1, + "env": { + "tempLimit": { + "value": "100" + } + }, + "settings": { + "image": "myacr.azurecr.io/testModule:latest", + "createOptions": "{}" + } + } + } + } + }, + "$edgeHub": { + "properties.desired": { + "schemaVersion": "1.1", + "routes": { + "sensorToFilter": { + "route": "FROM /messages/modules/SimulatedTemperatureSensor/outputs/temperatureOutput INTO BrokeredEndpoint(\"/modules/testModule/inputs/input1\")", + "priority": 0, + "timeToLiveSecs": 1800 + }, + "filterToIoTHub": { + "route": "FROM /messages/modules/testModule/outputs/output1 INTO $upstream", + "priority": 1, + "timeToLiveSecs": 1800 + } + }, + "storeAndForwardConfiguration": { + "timeToLiveSecs": 100 + } + } + } + } } } } diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devicetemplates_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devicetemplates_get.json index 0f9bba02f678..b560f6e2e73b 100644 --- a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devicetemplates_get.json +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devicetemplates_get.json @@ -177,6 +177,97 @@ "schema": "dateTime" } ] + }, + "deploymentManifest": { + "modulesContent": { + "$edgeAgent": { + "properties.desired": { + "schemaVersion": "1.1", + "runtime": { + "type": "docker", + "settings": { + "minDockerVersion": "v1.25", + "loggingOptions": "", + "registryCredentials": { + "ContosoRegistry": { + "username": "myacr", + "password": "", + "address": "myacr.azurecr.io" + } + } + } + }, + "systemModules": { + "edgeAgent": { + "type": "docker", + "settings": { + "image": "mcr.microsoft.com/azureiotedge-agent:1.1", + "createOptions": "{}" + } + }, + "edgeHub": { + "type": "docker", + "status": "running", + "restartPolicy": "always", + "startupOrder": 0, + "settings": { + "image": "mcr.microsoft.com/azureiotedge-hub:1.1", + "createOptions": "{\"HostConfig\":{\"PortBindings\":{\"443/tcp\":[{\"HostPort\":\"443\"}],\"5671/tcp\":[{\"HostPort\":\"5671\"}],\"8883/tcp\":[{\"HostPort\":\"8883\"}]}}}" + } + } + }, + "modules": { + "SimulatedTemperatureSensor": { + "version": "1.0", + "type": "docker", + "status": "running", + "restartPolicy": "always", + "startupOrder": 2, + "settings": { + "image": "mcr.microsoft.com/azureiotedge-simulated-temperature-sensor:1.0", + "createOptions": "{}" + } + }, + "testModule": { + "version": "1.0", + "type": "docker", + "status": "running", + "restartPolicy": "always", + "startupOrder": 1, + "env": { + "tempLimit": { + "value": "100" + } + }, + "settings": { + "image": "myacr.azurecr.io/testModule:latest", + "createOptions": "{}" + } + } + } + } + }, + "$edgeHub": { + "properties.desired": { + "schemaVersion": "1.1", + "routes": { + "sensorToFilter": { + "route": "FROM /messages/modules/SimulatedTemperatureSensor/outputs/temperatureOutput INTO BrokeredEndpoint(\"/modules/testModule/inputs/input1\")", + "priority": 0, + "timeToLiveSecs": 1800 + }, + "filterToIoTHub": { + "route": "FROM /messages/modules/testModule/outputs/output1 INTO $upstream", + "priority": 1, + "timeToLiveSecs": 1800 + } + }, + "storeAndForwardConfiguration": { + "timeToLiveSecs": 100 + } + } + } + } } } } diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devicetemplates_list.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devicetemplates_list.json index 869589d04a80..54111c702361 100644 --- a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devicetemplates_list.json +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devicetemplates_list.json @@ -178,6 +178,97 @@ "schema": "dateTime" } ] + }, + "deploymentManifest": { + "modulesContent": { + "$edgeAgent": { + "properties.desired": { + "schemaVersion": "1.1", + "runtime": { + "type": "docker", + "settings": { + "minDockerVersion": "v1.25", + "loggingOptions": "", + "registryCredentials": { + "ContosoRegistry": { + "username": "myacr", + "password": "", + "address": "myacr.azurecr.io" + } + } + } + }, + "systemModules": { + "edgeAgent": { + "type": "docker", + "settings": { + "image": "mcr.microsoft.com/azureiotedge-agent:1.1", + "createOptions": "{}" + } + }, + "edgeHub": { + "type": "docker", + "status": "running", + "restartPolicy": "always", + "startupOrder": 0, + "settings": { + "image": "mcr.microsoft.com/azureiotedge-hub:1.1", + "createOptions": "{\"HostConfig\":{\"PortBindings\":{\"443/tcp\":[{\"HostPort\":\"443\"}],\"5671/tcp\":[{\"HostPort\":\"5671\"}],\"8883/tcp\":[{\"HostPort\":\"8883\"}]}}}" + } + } + }, + "modules": { + "SimulatedTemperatureSensor": { + "version": "1.0", + "type": "docker", + "status": "running", + "restartPolicy": "always", + "startupOrder": 2, + "settings": { + "image": "mcr.microsoft.com/azureiotedge-simulated-temperature-sensor:1.0", + "createOptions": "{}" + } + }, + "testModule": { + "version": "1.0", + "type": "docker", + "status": "running", + "restartPolicy": "always", + "startupOrder": 1, + "env": { + "tempLimit": { + "value": "100" + } + }, + "settings": { + "image": "myacr.azurecr.io/testModule:latest", + "createOptions": "{}" + } + } + } + } + }, + "$edgeHub": { + "properties.desired": { + "schemaVersion": "1.1", + "routes": { + "sensorToFilter": { + "route": "FROM /messages/modules/SimulatedTemperatureSensor/outputs/temperatureOutput INTO BrokeredEndpoint(\"/modules/testModule/inputs/input1\")", + "priority": 0, + "timeToLiveSecs": 1800 + }, + "filterToIoTHub": { + "route": "FROM /messages/modules/testModule/outputs/output1 INTO $upstream", + "priority": 1, + "timeToLiveSecs": 1800 + } + }, + "storeAndForwardConfiguration": { + "timeToLiveSecs": 100 + } + } + } + } } } ] diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devicetemplates_update.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devicetemplates_update.json new file mode 100644 index 000000000000..1f63237c04eb --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devicetemplates_update.json @@ -0,0 +1,352 @@ +{ + "title": "Update a device template", + "description": "Updates and publishes a device template.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "deviceTemplateId": "dtmi:contoso:testDeviceTemplate;1", + "api-version": "1.1-preview", + "body": { + "@type": [ + "ModelDefinition", + "DeviceModel", + "EdgeModel" + ], + "displayName": "Test Definition", + "capabilityModel": { + "@id": "dtmi:contoso:testCapabilityModel;1", + "@type": "Interface", + "displayName": "Test Capability Model", + "extends": [ + { + "@id": "dtmi:contoso:testInterface;1", + "@type": "Interface", + "displayName": "Test Interface", + "contents": [ + { + "@type": "Telemetry", + "displayName": "Test Telemetry", + "name": "testTelemetry", + "schema": "double" + }, + { + "@type": [ + "Telemetry", + "Event", + "EventValue" + ], + "displayName": "Test Event", + "name": "testEvent", + "schema": "integer", + "severity": "warning" + }, + { + "@type": [ + "Property", + "Initialized" + ], + "displayName": "Test Property", + "name": "testProperty", + "schema": "string", + "writable": true, + "initialValue": "initialValue1" + }, + { + "@type": "Property", + "displayName": "Test Read-Only Property", + "name": "testReadOnly", + "schema": "string" + }, + { + "@type": "Property", + "displayName": "Test Complex Property", + "name": "testComplex", + "schema": { + "@id": "dtmi:contoso:testComplex;1", + "@type": "Object", + "displayName": "Object", + "fields": [ + { + "displayName": "First", + "name": "first", + "schema": "string" + }, + { + "displayName": "Second", + "name": "second", + "schema": "string" + } + ] + }, + "writable": true + }, + { + "@type": "Command", + "commandType": "synchronous", + "displayName": "Test Command", + "name": "testCommand", + "request": { + "displayName": "Test Request", + "name": "testRequest", + "schema": "double" + }, + "response": { + "displayName": "Test Response", + "name": "testResponse", + "schema": "geopoint" + } + }, + { + "@type": "Property", + "displayName": "Test Enum", + "name": "testEnum", + "schema": { + "@id": "dtmi:contoso:testEnum;1", + "@type": "Enum", + "displayName": "Enum", + "enumValues": [ + { + "displayName": "First", + "enumValue": 1, + "name": "first" + }, + { + "displayName": "Second", + "enumValue": 2, + "name": "second" + } + ], + "valueSchema": "integer" + }, + "writable": true + } + ] + } + ], + "contents": [ + { + "@type": [ + "Relationship", + "EdgeModule" + ], + "displayName": "Test Module", + "maxMultiplicity": 1, + "name": "testModule", + "target": [ + { + "@id": "dtmi:contoso:testModuleCapabilityModel;1", + "@type": "Interface", + "displayName": "Test Module Capability Model", + "extends": [ + { + "@id": "dtmi:contoso:testModuleInterface;1", + "@type": "Interface", + "contents": [ + { + "@type": "Telemetry", + "displayName": "Test Module Telemetry", + "name": "testModuleTelemetry", + "schema": "double" + }, + { + "@type": "Property", + "displayName": "Test Module Property", + "name": "testModuleProperty", + "schema": "string", + "writable": true + } + ], + "displayName": "Test Module Interface" + } + ] + } + ] + }, + { + "@type": [ + "Cloud", + "Property" + ], + "displayName": "Test Cloud Property", + "name": "testCloudProperty", + "schema": "dateTime" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "@id": "dtmi:contoso:testDeviceTemplate;1", + "@type": [ + "ModelDefinition", + "DeviceModel", + "EdgeModel" + ], + "displayName": "Test Definition", + "etag": "\"~jbzfGhYctc9wtzNZXVmVua5JjTHO/FfjMUJvk9hqkRY=\"", + "capabilityModel": { + "@id": "dtmi:contoso:testCapabilityModel;1", + "@type": "Interface", + "displayName": "Test Capability Model", + "extends": [ + { + "@id": "dtmi:contoso:testInterface;1", + "@type": "Interface", + "displayName": "Test Interface", + "contents": [ + { + "@type": "Telemetry", + "displayName": "Test Telemetry", + "name": "testTelemetry", + "schema": "double" + }, + { + "@type": [ + "Telemetry", + "Event", + "EventValue" + ], + "displayName": "Test Event", + "name": "testEvent", + "schema": "integer", + "severity": "warning" + }, + { + "@type": [ + "Property", + "Initialized" + ], + "displayName": "Test Property", + "name": "testProperty", + "schema": "string", + "writable": true, + "initialValue": "initialValue1" + }, + { + "@type": "Property", + "displayName": "Test Read-Only Property", + "name": "testReadOnly", + "schema": "string" + }, + { + "@type": "Property", + "displayName": "Test Complex Property", + "name": "testComplex", + "schema": { + "@id": "dtmi:contoso:testComplex;1", + "@type": "Object", + "displayName": "Object", + "fields": [ + { + "displayName": "First", + "name": "first", + "schema": "string" + }, + { + "displayName": "Second", + "name": "second", + "schema": "string" + } + ] + }, + "writable": true + }, + { + "@type": "Command", + "commandType": "synchronous", + "displayName": "Test Command", + "name": "testCommand", + "request": { + "displayName": "Test Request", + "name": "testRequest", + "schema": "double" + }, + "response": { + "displayName": "Test Response", + "name": "testResponse", + "schema": "geopoint" + } + }, + { + "@type": "Property", + "displayName": "Test Enum", + "name": "testEnum", + "schema": { + "@id": "dtmi:contoso:testEnum;1", + "@type": "Enum", + "displayName": "Enum", + "enumValues": [ + { + "displayName": "First", + "enumValue": 1, + "name": "first" + }, + { + "displayName": "Second", + "enumValue": 2, + "name": "second" + } + ], + "valueSchema": "integer" + }, + "writable": true + } + ] + } + ], + "contents": [ + { + "@type": [ + "Relationship", + "EdgeModule" + ], + "displayName": "Test Module", + "maxMultiplicity": 1, + "name": "testModule", + "target": [ + { + "@id": "dtmi:contoso:testModuleCapabilityModel;1", + "@type": "Interface", + "displayName": "Test Module Capability Model", + "extends": [ + { + "@id": "dtmi:contoso:testModuleInterface;1", + "@type": "Interface", + "contents": [ + { + "@type": "Telemetry", + "displayName": "Test Module Telemetry", + "name": "testModuleTelemetry", + "schema": "double" + }, + { + "@type": "Property", + "displayName": "Test Module Property", + "name": "testModuleProperty", + "schema": "string", + "writable": true + } + ], + "displayName": "Test Module Interface" + } + ] + } + ] + }, + { + "@type": [ + "Cloud", + "Property" + ], + "displayName": "Test Cloud Property", + "name": "testCloudProperty", + "schema": "dateTime" + } + ] + } + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/fileUpload_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/fileUpload_get.json index 8c92cf9cead7..f8b252909c54 100644 --- a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/fileUpload_get.json +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/fileUpload_get.json @@ -12,7 +12,6 @@ "account": "contoso-account", "connectionString": "DefaultEndpointsProtocol=https;AccountName=MyAccountName;AccountKey=*****;EndpointSuffix=core.windows.net", "container": "container", - "sasTtl": "PT2H", "state": "succeeded" } } diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/query_run.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/query_run.json new file mode 100644 index 000000000000..f8dbf4c8310d --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/query_run.json @@ -0,0 +1,65 @@ +{ + "title": "Query telemetry", + "description": "Telemetry Query with Aggregation", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "api-version": "1.1-preview", + "body": { + "query": "SELECT AVG(RootTelemetry), MAX(RootTelemetry) FROM dtmi:modelDefinition:y5zk2yqblv:en9xfxjif WHERE WITHIN_WINDOW(P1D) AND RootTelemetry > 0 GROUP BY WINDOW(PT3H) ORDER BY $ts ASC" + } + }, + "responses": { + "200": { + "body": { + "results": [ + { + "$ts": "2021-07-13T15:00:00Z", + "avg_RootTelemetry": 50.694243369718016, + "max_RootTelemetry": 94.84065276149875 + }, + { + "$ts": "2021-07-13T18:00:00Z", + "avg_RootTelemetry": 50.18217245036151, + "max_RootTelemetry": 94.06959391609293 + }, + { + "$ts": "2021-07-13T21:00:00Z", + "avg_RootTelemetry": 49.146167597153536, + "max_RootTelemetry": 92.23986369686345 + }, + { + "$ts": "2021-07-14T00:00:00Z", + "avg_RootTelemetry": 50.175258720781486, + "max_RootTelemetry": 93.635346493204 + }, + { + "$ts": "2021-07-14T03:00:00Z", + "avg_RootTelemetry": 49.89615329936023, + "max_RootTelemetry": 97.06116727704713 + }, + { + "$ts": "2021-07-14T06:00:00Z", + "avg_RootTelemetry": 50.45104017085097, + "max_RootTelemetry": 97.62388863622462 + }, + { + "$ts": "2021-07-14T09:00:00Z", + "avg_RootTelemetry": 50.256835113864774, + "max_RootTelemetry": 97.920784666869 + }, + { + "$ts": "2021-07-14T12:00:00Z", + "avg_RootTelemetry": 49.68389289395193, + "max_RootTelemetry": 97.33361905646282 + }, + { + "$ts": "2021-07-14T15:00:00Z", + "avg_RootTelemetry": 50.27084162154068, + "max_RootTelemetry": 94.65114410748755 + } + ] + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/iotcentral.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/iotcentral.json index 9c40c8f5961f..549de12aba5d 100644 --- a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/iotcentral.json +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/iotcentral.json @@ -107,6 +107,82 @@ ], "discriminator": "type" }, + "BlobStorageV1Destination": { + "x-ms-discriminator-value": "blobstorage@v1", + "allOf": [ + { + "$ref": "#/definitions/Destination" + } + ], + "type": "object", + "properties": { + "authorization": { + "$ref": "#/definitions/BlobStorageV1DestinationAuth" + } + }, + "required": [ + "authorization" + ] + }, + "BlobStorageV1DestinationAuth": { + "type": "object", + "properties": { + "type": { + "description": "The kind of authentication to use.", + "type": "string" + } + }, + "required": [ + "type" + ], + "discriminator": "type" + }, + "BlobStorageV1DestinationConnectionStringAuth": { + "x-ms-discriminator-value": "connectionString", + "allOf": [ + { + "$ref": "#/definitions/BlobStorageV1DestinationAuth" + } + ], + "type": "object", + "properties": { + "connectionString": { + "description": "The connection string for accessing the blob storage account.", + "type": "string" + }, + "containerName": { + "description": "Name of the container where data should be written in the storage account.", + "type": "string" + } + }, + "required": [ + "connectionString", + "containerName" + ] + }, + "BlobStorageV1DestinationSystemAssignedManagedIdentityAuth": { + "x-ms-discriminator-value": "systemAssignedManagedIdentity", + "allOf": [ + { + "$ref": "#/definitions/BlobStorageV1DestinationAuth" + } + ], + "type": "object", + "properties": { + "endpointUri": { + "description": "The storage account's blob service endpoint URL.", + "type": "string" + }, + "containerName": { + "description": "Name of the container where data should be written in the storage account.", + "type": "string" + } + }, + "required": [ + "endpointUri", + "containerName" + ] + }, "CloudPropertyJobData": { "x-ms-discriminator-value": "cloudProperty", "allOf": [ @@ -142,6 +218,181 @@ } ] }, + "DataExplorerV1Destination": { + "x-ms-discriminator-value": "dataexplorer@v1", + "allOf": [ + { + "$ref": "#/definitions/Destination" + } + ], + "type": "object", + "properties": { + "clusterUrl": { + "description": "The resource URI of the Data Explorer instance.", + "type": "string" + }, + "database": { + "description": "Name Data Explorer database where data should be written.", + "type": "string" + }, + "table": { + "description": "The table within the Data Explorer database that will receive the data.", + "type": "string" + }, + "authorization": { + "$ref": "#/definitions/DataExplorerV1DestinationAuth" + } + }, + "required": [ + "clusterUrl", + "database", + "table", + "authorization" + ] + }, + "DataExplorerV1DestinationAuth": { + "type": "object", + "properties": { + "type": { + "description": "The kind of authentication to use.", + "type": "string" + } + }, + "required": [ + "type" + ], + "discriminator": "type" + }, + "DataExplorerV1DestinationServicePrincipalAuth": { + "x-ms-discriminator-value": "servicePrincipal", + "allOf": [ + { + "$ref": "#/definitions/DataExplorerV1DestinationAuth" + } + ], + "type": "object", + "properties": { + "clientId": { + "description": "Service Principal client ID.", + "type": "string" + }, + "tenantId": { + "description": "Service Principal tenant ID.", + "type": "string" + }, + "clientSecret": { + "description": "Service Principal client secret.", + "type": "string" + } + }, + "required": [ + "clientId", + "tenantId", + "clientSecret" + ] + }, + "DataExportError": { + "type": "object", + "properties": { + "code": { + "description": "The code for the error that occurred.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "The description of the error that occurred.", + "type": "string", + "readOnly": true + } + } + }, + "DataExportStatus": { + "type": "object", + "properties": { + "status": { + "description": "Indication of the current health and operation of the export or destination.", + "type": "string", + "readOnly": true + }, + "errors": { + "description": "Errors encountered by the export or destination.", + "type": "array", + "items": { + "$ref": "#/definitions/DataExportError" + }, + "readOnly": true + }, + "lastExportTime": { + "description": "The timestamp of the last message that was sent to the export or destination.", + "type": "string", + "format": "date-time", + "readOnly": true + } + } + }, + "Destination": { + "allOf": [ + { + "$ref": "#/definitions/DataExportStatus" + } + ], + "type": "object", + "properties": { + "id": { + "description": "Unique ID of the destination.", + "type": "string", + "readOnly": true + }, + "displayName": { + "description": "Display name of the destination.", + "type": "string" + }, + "type": { + "description": "The type of destination configuration.", + "type": "string" + } + }, + "required": [ + "displayName", + "type" + ], + "discriminator": "type" + }, + "DestinationCollection": { + "type": "object", + "properties": { + "value": { + "description": "The collection of destinations.", + "type": "array", + "items": { + "$ref": "#/definitions/Destination" + } + }, + "nextLink": { + "description": "URL to get the next page of destinations.", + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "DestinationReference": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the destination where data should be sent." + }, + "transform": { + "type": "string", + "description": "Query for transforming the message structure to a particular output." + } + }, + "required": [ + "id" + ] + }, "Device": { "type": "object", "properties": { @@ -327,6 +578,48 @@ "type": "object", "additionalProperties": true }, + "DeviceRelationship": { + "type": "object", + "description": "An object representing the relationship between an upstream and a downstream device.", + "properties": { + "id": { + "description": "The unique identifier of this relationship.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "The name which describes this relationship between given devices from source device template.", + "type": "string" + }, + "source": { + "description": "The device ID of the source (parent) device.", + "type": "string" + }, + "target": { + "description": "The device ID of the target (child) device.", + "type": "string" + } + } + }, + "DeviceRelationshipCollection": { + "type": "object", + "properties": { + "value": { + "description": "The collection of device relationships.", + "type": "array", + "items": { + "$ref": "#/definitions/DeviceRelationship" + } + }, + "nextLink": { + "description": "URL to get the next page of device relationships.", + "type": "string" + } + }, + "required": [ + "value" + ] + }, "DeviceTelemetry": { "type": "object", "properties": { @@ -370,6 +663,10 @@ "capabilityModel": { "description": "The capability model utilized by this device template.", "type": "object" + }, + "deploymentManifest": { + "description": "Deployment manifest associated to this device template.", + "type": "object" } }, "required": [ @@ -415,32 +712,227 @@ "email" ] }, - "FileUpload": { + "Enrichment": { "type": "object", "properties": { - "account": { - "description": "The storage account name where to upload the file to", + "target": { + "description": "The device template or interface which defines the target capability for the enrichment.", "type": "string" }, - "connectionString": { - "description": "The connection string used to configure the storage account", + "path": { + "description": "The path to the target capability within the device template or the system property to use.", "type": "string" }, - "container": { - "description": "The name of the container inside the storage account", + "value": { + "description": "The raw value used for the enrichment." + } + } + }, + "EventHubsV1Destination": { + "x-ms-discriminator-value": "eventhubs@v1", + "allOf": [ + { + "$ref": "#/definitions/Destination" + } + ], + "type": "object", + "properties": { + "authorization": { + "$ref": "#/definitions/EventHubsV1DestinationAuth" + } + }, + "required": [ + "authorization" + ] + }, + "EventHubsV1DestinationAuth": { + "type": "object", + "properties": { + "type": { + "description": "The kind of authentication to use.", "type": "string" - }, - "sasTtl": { - "description": "ISO 8601 duration standard, The amount of time the device’s request to upload a file is valid before it expires.​", + } + }, + "required": [ + "type" + ], + "discriminator": "type" + }, + "EventHubsV1DestinationConnectionStringAuth": { + "x-ms-discriminator-value": "connectionString", + "allOf": [ + { + "$ref": "#/definitions/EventHubsV1DestinationAuth" + } + ], + "type": "object", + "properties": { + "connectionString": { + "description": "The connection string for accessing the Event Hubs namespace, including the `EntityPath` of the event hub.", "type": "string" - }, - "state": { - "description": "The state of the file upload configuration", - "type": "string", - "readOnly": true, - "enum": [ - "pending", - "updating", + } + }, + "required": [ + "connectionString" + ] + }, + "EventHubsV1DestinationSystemAssignedManagedIdentityAuth": { + "x-ms-discriminator-value": "systemAssignedManagedIdentity", + "allOf": [ + { + "$ref": "#/definitions/EventHubsV1DestinationAuth" + } + ], + "type": "object", + "properties": { + "hostName": { + "description": "The host name of the Event Hubs namespace.", + "type": "string" + }, + "eventHubName": { + "description": "The Event Hubs instance name.", + "type": "string" + } + }, + "required": [ + "hostName", + "eventHubName" + ] + }, + "Export": { + "allOf": [ + { + "$ref": "#/definitions/DataExportStatus" + } + ], + "type": "object", + "properties": { + "id": { + "description": "Unique ID of the export.", + "type": "string", + "readOnly": true + }, + "displayName": { + "description": "Display name of the export.", + "type": "string" + }, + "enabled": { + "description": "Toggle to start/stop an export from sending data.", + "type": "boolean" + }, + "source": { + "description": "The type of data to export.", + "type": "string", + "enum": [ + "telemetry", + "properties", + "deviceLifecycle", + "deviceTemplateLifecycle", + "deviceConnectivity" + ], + "x-ms-enum": { + "name": "DestinationSource", + "modelAsString": false, + "values": [ + { + "value": "telemetry", + "name": "Telemetry", + "description": "Destination source from device telemetry" + }, + { + "value": "properties", + "name": "Properties", + "description": "Destination source from device properties" + }, + { + "value": "deviceLifecycle", + "name": "DeviceLifecycle", + "description": "Destination source from device lifecycle" + }, + { + "value": "deviceTemplateLifecycle", + "name": "DeviceTemplateLifecycle", + "description": "Destination source from device template lifecycle" + }, + { + "value": "deviceConnectivity", + "name": "DeviceConnectivity", + "description": "Destination source from device connectivity" + } + ] + } + }, + "filter": { + "description": "Query defining which events from the source should be exported.", + "type": "string" + }, + "enrichments": { + "description": "Additional pieces of information to include with each sent message. Data is represented as a set of key/value pairs, where the key is the name of the enrichment that will appear in the output message and the value identifies the data to send.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Enrichment" + } + }, + "destinations": { + "description": "The list of destinations to which the export should send data.", + "type": "array", + "items": { + "$ref": "#/definitions/DestinationReference" + } + } + }, + "required": [ + "displayName", + "enabled", + "source", + "destinations" + ] + }, + "ExportCollection": { + "type": "object", + "properties": { + "value": { + "description": "The collection of exports.", + "type": "array", + "items": { + "$ref": "#/definitions/Export" + } + }, + "nextLink": { + "description": "URL to get the next page of exports.", + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "FileUpload": { + "type": "object", + "properties": { + "account": { + "description": "The storage account name where to upload the file to", + "type": "string" + }, + "connectionString": { + "description": "The connection string used to configure the storage account", + "type": "string" + }, + "container": { + "description": "The name of the container inside the storage account", + "type": "string" + }, + "sasTtl": { + "description": "ISO 8601 duration standard, The amount of time the device’s request to upload a file is valid before it expires.", + "type": "string" + }, + "state": { + "description": "The state of the file upload configuration", + "type": "string", + "readOnly": true, + "enum": [ + "pending", + "updating", "deleting", "succeeded", "failed" @@ -522,6 +1014,15 @@ "description": "Indicates whether the job is starting, running, etc.", "type": "string", "readOnly": true + }, + "organizations": { + "description": "List of organizations of the job.", + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "maxItems": 1 } }, "required": [ @@ -746,6 +1247,32 @@ } ] }, + "QueryRequest": { + "type": "object", + "properties": { + "query": { + "description": "Query to be executed.", + "type": "string" + } + }, + "required": [ + "query" + ] + }, + "QueryResponse": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "type": "object" + } + } + }, + "required": [ + "results" + ] + }, "Role": { "type": "object", "properties": { @@ -795,6 +1322,148 @@ "value" ] }, + "ServiceBusQueueV1Destination": { + "x-ms-discriminator-value": "servicebusqueue@v1", + "allOf": [ + { + "$ref": "#/definitions/Destination" + } + ], + "type": "object", + "properties": { + "authorization": { + "$ref": "#/definitions/ServiceBusQueueV1DestinationAuth" + } + }, + "required": [ + "authorization" + ] + }, + "ServiceBusQueueV1DestinationAuth": { + "type": "object", + "properties": { + "type": { + "description": "The kind of authentication to use.", + "type": "string" + } + }, + "required": [ + "type" + ], + "discriminator": "type" + }, + "ServiceBusQueueV1DestinationConnectionStringAuth": { + "x-ms-discriminator-value": "connectionString", + "allOf": [ + { + "$ref": "#/definitions/ServiceBusQueueV1DestinationAuth" + } + ], + "type": "object", + "properties": { + "connectionString": { + "description": "The connection string for accessing the Service Bus namespace, including the `EntityPath` of the queue.", + "type": "string" + } + }, + "required": [ + "connectionString" + ] + }, + "ServiceBusQueueV1DestinationSystemAssignedManagedIdentityAuth": { + "x-ms-discriminator-value": "systemAssignedManagedIdentity", + "allOf": [ + { + "$ref": "#/definitions/ServiceBusQueueV1DestinationAuth" + } + ], + "type": "object", + "properties": { + "hostName": { + "description": "The host name of the Service Bus namespace.", + "type": "string" + }, + "queueName": { + "description": "The Service Bus queue name.", + "type": "string" + } + }, + "required": [ + "hostName", + "queueName" + ] + }, + "ServiceBusTopicV1Destination": { + "x-ms-discriminator-value": "servicebustopic@v1", + "allOf": [ + { + "$ref": "#/definitions/Destination" + } + ], + "type": "object", + "properties": { + "authorization": { + "$ref": "#/definitions/ServiceBusTopicV1DestinationAuth" + } + }, + "required": [ + "authorization" + ] + }, + "ServiceBusTopicV1DestinationAuth": { + "type": "object", + "properties": { + "type": { + "description": "The kind of authentication to use.", + "type": "string" + } + }, + "required": [ + "type" + ], + "discriminator": "type" + }, + "ServiceBusTopicV1DestinationConnectionStringAuth": { + "x-ms-discriminator-value": "connectionString", + "allOf": [ + { + "$ref": "#/definitions/ServiceBusTopicV1DestinationAuth" + } + ], + "type": "object", + "properties": { + "connectionString": { + "description": "The connection string for accessing the Service Bus namespace, including the `EntityPath` of the topic.", + "type": "string" + } + }, + "required": [ + "connectionString" + ] + }, + "ServiceBusTopicV1DestinationSystemAssignedManagedIdentityAuth": { + "x-ms-discriminator-value": "systemAssignedManagedIdentity", + "allOf": [ + { + "$ref": "#/definitions/ServiceBusTopicV1DestinationAuth" + } + ], + "type": "object", + "properties": { + "hostName": { + "description": "The host name of the Service Bus namespace.", + "type": "string" + }, + "topicName": { + "description": "The Service Bus topic name.", + "type": "string" + } + }, + "required": [ + "hostName", + "topicName" + ] + }, "ServicePrincipalUser": { "x-ms-discriminator-value": "servicePrincipal", "allOf": [ @@ -925,38 +1594,186 @@ "value" ] }, - "X509": { - "type": "object", - "properties": { - "clientCertificates": { - "description": "The X.509 client certificates for this credential.", - "$ref": "#/definitions/X509Certificates" - } - } - }, - "X509Attestation": { - "x-ms-discriminator-value": "x509", + "WebhookV1Destination": { + "x-ms-discriminator-value": "webhook@v1", "allOf": [ { - "$ref": "#/definitions/Attestation" + "$ref": "#/definitions/Destination" } ], "type": "object", "properties": { - "x509": { - "description": "The X.509 credentials for this attestation.", - "$ref": "#/definitions/X509" + "url": { + "description": "The URL to invoke when exporting data.", + "type": "string" + }, + "queryCustomizations": { + "description": "Additional query parameters that should be added to each request.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/WebhookV1DestinationCustomization" + } + }, + "headerCustomizations": { + "description": "Additional headers that should be added to each request.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/WebhookV1DestinationCustomization" + } + }, + "authorization": { + "$ref": "#/definitions/WebhookV1DestinationAuth" } }, "required": [ - "x509" + "url" ] }, - "X509Certificate": { + "WebhookV1DestinationAuth": { "type": "object", "properties": { - "certificate": { - "description": "The string representation of this certificate.", + "type": { + "description": "The kind of authentication to use.", + "type": "string" + } + }, + "required": [ + "type" + ], + "discriminator": "type" + }, + "WebhookV1DestinationCustomization": { + "type": "object", + "properties": { + "value": { + "description": "The value to use for this webhook customization.", + "type": "string" + }, + "secret": { + "description": "Whether to consider the value to be a secret and hide it when retrieving the destination configuration.", + "type": "boolean" + } + }, + "required": [ + "value" + ] + }, + "WebhookV1DestinationHeaderAuth": { + "x-ms-discriminator-value": "header", + "allOf": [ + { + "$ref": "#/definitions/WebhookV1DestinationAuth" + } + ], + "type": "object", + "properties": { + "value": { + "description": "Value to use for the Authorization header when making requests.", + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "WebhookV1DestinationOAuthAuth": { + "x-ms-discriminator-value": "oauth", + "allOf": [ + { + "$ref": "#/definitions/WebhookV1DestinationAuth" + } + ], + "type": "object", + "properties": { + "tokenUrl": { + "description": "URL where an access token can be retrieved.", + "type": "string" + }, + "clientId": { + "description": "OAuth2 client ID used when retrieving the token.", + "type": "string" + }, + "clientSecret": { + "description": "OAuth2 client secret used to retrieve the token.", + "type": "string" + }, + "audience": { + "description": "OAuth2 audience.", + "type": "string" + }, + "scope": { + "description": "OAuth2 scope.", + "type": "string" + }, + "requestType": { + "description": "Content-Type for the token request.", + "type": "string", + "enum": [ + "auto", + "json", + "urlencoded" + ], + "x-ms-enum": { + "name": "OAuthRequestType", + "modelAsString": false, + "values": [ + { + "value": "auto", + "name": "Auto", + "description": "Use automatic Content-Type for token request" + }, + { + "value": "json", + "name": "Json", + "description": "Content-Type as JSON for token request" + }, + { + "value": "urlencoded", + "name": "UrlEncoded", + "description": "Content-Type as UrlEncoded for token request" + } + ] + } + } + }, + "required": [ + "tokenUrl", + "clientId", + "clientSecret" + ] + }, + "X509": { + "type": "object", + "properties": { + "clientCertificates": { + "description": "The X.509 client certificates for this credential.", + "$ref": "#/definitions/X509Certificates" + } + } + }, + "X509Attestation": { + "x-ms-discriminator-value": "x509", + "allOf": [ + { + "$ref": "#/definitions/Attestation" + } + ], + "type": "object", + "properties": { + "x509": { + "description": "The X.509 credentials for this attestation.", + "$ref": "#/definitions/X509" + } + }, + "required": [ + "x509" + ] + }, + "X509Certificate": { + "type": "object", + "properties": { + "certificate": { + "description": "The string representation of this certificate.", "type": "string" }, "info": { @@ -1028,8 +1845,351 @@ "operationId": "ApiTokens_Get", "summary": "Get an API token by ID.", "x-ms-examples": { - "Get API token by ID": { - "$ref": "./examples/apitoken_get.json" + "Get API token by ID": { + "$ref": "./examples/apitoken_get.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "in": "path", + "name": "tokenId", + "description": "Unique ID for the API token.", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ApiToken" + } + } + } + }, + "put": { + "operationId": "ApiTokens_Create", + "summary": "Create a new API token in the application to use in the IoT Central public API. The token value will be returned in the response, and won't be returned again in subsequent requests.", + "x-ms-examples": { + "Create API token": { + "$ref": "./examples/apitoken_create.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "in": "path", + "name": "tokenId", + "description": "Unique ID for the API token.", + "type": "string", + "required": true + }, + { + "in": "body", + "name": "body", + "description": "API token body.", + "schema": { + "$ref": "#/definitions/ApiToken" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ApiToken" + } + } + } + }, + "delete": { + "operationId": "ApiTokens_Remove", + "summary": "Delete an API token.", + "x-ms-examples": { + "Delete API token": { + "$ref": "./examples/apitoken_delete.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "in": "path", + "name": "tokenId", + "description": "Unique ID for the API token.", + "type": "string", + "required": true + } + ], + "responses": { + "204": { + "description": "Success" + } + } + } + }, + "/dataExport/destinations": { + "get": { + "operationId": "Destinations_List", + "summary": "Get the list of destinations in an application.", + "x-ms-examples": { + "List data export destinations": { + "$ref": "./examples/dataexports_destinations_list.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + } + ], + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DestinationCollection" + } + } + } + } + }, + "/dataExport/destinations/{destinationId}": { + "get": { + "operationId": "Destinations_Get", + "summary": "Get a destination by ID.", + "x-ms-examples": { + "Get a data export destination": { + "$ref": "./examples/dataexports_destinations_get.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DestinationId" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Destination" + } + } + } + }, + "put": { + "operationId": "Destinations_Create", + "summary": "Create or update a destination", + "description": "Create or update a definition for where to send data.", + "x-ms-examples": { + "Create a webhook destination": { + "$ref": "./examples/dataexports_destinations_create_webhook.json" + }, + "Create an azure blob storage destination": { + "$ref": "./examples/dataexports_destinations_create_blob.json" + }, + "Create an azure data explorer destination": { + "$ref": "./examples/dataexports_destinations_create_adx.json" + }, + "Create an azure event hub destination": { + "$ref": "./examples/dataexports_destinations_create_eventhub.json" + }, + "Create an azure service bus queue destination": { + "$ref": "./examples/dataexports_destinations_create_queue.json" + }, + "Create an azure service bus topic destination": { + "$ref": "./examples/dataexports_destinations_create_topic.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DestinationId" + }, + { + "in": "body", + "name": "body", + "description": "Destination body.", + "schema": { + "$ref": "#/definitions/Destination" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Destination" + } + } + } + }, + "patch": { + "operationId": "Destinations_Update", + "summary": "Patch a destination.", + "description": "Perform an incremental update to a destination.", + "x-ms-examples": { + "Update an webhook destination": { + "$ref": "./examples/dataexports_destinations_update_webhook.json" + } + }, + "consumes": [ + "application/json", + "application/json-patch+json" + ], + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DestinationId" + }, + { + "in": "body", + "name": "body", + "description": "Destination patch body.", + "schema": { + "type": "object" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Destination" + } + } + } + }, + "delete": { + "operationId": "Destinations_Remove", + "summary": "Delete a destination.", + "x-ms-examples": { + "Delete data export destination": { + "$ref": "./examples/dataexports_destinations_delete.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DestinationId" + } + ], + "responses": { + "204": { + "description": "Success" + } + } + } + }, + "/dataExport/destinations/{destinationId}/exports": { + "get": { + "operationId": "Destinations_ListExports", + "summary": "List all exports connected to the given destination.", + "x-ms-examples": { + "List all exports connected to the given destination": { + "$ref": "./examples/dataexports_destinations_exports_list.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DestinationId" + } + ], + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ExportCollection" + } + } + } + } + }, + "/dataExport/exports": { + "get": { + "operationId": "Exports_List", + "summary": "Get the list of exports in an application.", + "x-ms-examples": { + "List data exports": { + "$ref": "./examples/dataexports_exports_list.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + } + ], + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ExportCollection" + } + } + } + } + }, + "/dataExport/exports/{exportId}": { + "get": { + "operationId": "Exports_Get", + "summary": "Get an export by ID.", + "x-ms-examples": { + "Get data export by ID": { + "$ref": "./examples/dataexports_exports_get.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/ExportId" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Export" + } + } + } + }, + "put": { + "operationId": "Exports_Create", + "summary": "Create or update an export", + "description": "Create or update a definition for exporting data. Also used to connect or disconnect an export from destinations.", + "x-ms-examples": { + "Create data export with ID": { + "$ref": "./examples/dataexports_exports_create.json" } }, "parameters": [ @@ -1037,10 +2197,15 @@ "$ref": "#/parameters/Version" }, { - "in": "path", - "name": "tokenId", - "description": "Unique ID for the API token.", - "type": "string", + "$ref": "#/parameters/ExportId" + }, + { + "in": "body", + "name": "body", + "description": "Export body.", + "schema": { + "$ref": "#/definitions/Export" + }, "required": true } ], @@ -1048,36 +2213,37 @@ "200": { "description": "Success", "schema": { - "$ref": "#/definitions/ApiToken" + "$ref": "#/definitions/Export" } } } }, - "put": { - "operationId": "ApiTokens_Create", - "summary": "Create a new API token in the application to use in the IoT Central public API. The token value will be returned in the response, and won't be returned again in subsequent requests.", + "patch": { + "operationId": "Exports_Update", + "summary": "Patch an export.", + "description": "Perform an incremental update to an export.", "x-ms-examples": { - "Create API token": { - "$ref": "./examples/apitoken_create.json" + "Update a data export": { + "$ref": "./examples/dataexports_exports_update.json" } }, + "consumes": [ + "application/json", + "application/json-patch+json" + ], "parameters": [ { "$ref": "#/parameters/Version" }, { - "in": "path", - "name": "tokenId", - "description": "Unique ID for the API token.", - "type": "string", - "required": true + "$ref": "#/parameters/ExportId" }, { "in": "body", "name": "body", - "description": "API token body.", + "description": "Export patch body.", "schema": { - "$ref": "#/definitions/ApiToken" + "type": "object" }, "required": true } @@ -1086,17 +2252,17 @@ "200": { "description": "Success", "schema": { - "$ref": "#/definitions/ApiToken" + "$ref": "#/definitions/Export" } } } }, "delete": { - "operationId": "ApiTokens_Remove", - "summary": "Delete an API token.", + "operationId": "Exports_Remove", + "summary": "Delete an export.", "x-ms-examples": { - "Delete API token": { - "$ref": "./examples/apitoken_delete.json" + "Delete a data export with ID": { + "$ref": "./examples/dataexports_exports_delete.json" } }, "parameters": [ @@ -1104,11 +2270,7 @@ "$ref": "#/parameters/Version" }, { - "in": "path", - "name": "tokenId", - "description": "Unique ID for the API token.", - "type": "string", - "required": true + "$ref": "#/parameters/ExportId" } ], "responses": { @@ -1118,6 +2280,36 @@ } } }, + "/dataExport/exports/{exportId}/destinations": { + "get": { + "operationId": "Exports_ListDestinations", + "summary": "List all destinations connected to the given export.", + "x-ms-examples": { + "List all destinations in given export": { + "$ref": "./examples/dataexports_exports_destinations_list.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/ExportId" + } + ], + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DestinationCollection" + } + } + } + } + }, "/deviceGroups": { "get": { "operationId": "DeviceGroups_List", @@ -1148,7 +2340,7 @@ "/deviceTemplates": { "get": { "operationId": "DeviceTemplates_List", - "summary": "Get the list of device templates in an application", + "summary": "Get the list of device templates in an application with basic ODATA support ($top, $filter, $orderby), [more details](https://aka.ms/iotcentralodatasupport).", "x-ms-examples": { "List device templates": { "$ref": "./examples/devicetemplates_list.json" @@ -1157,6 +2349,15 @@ "parameters": [ { "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/filter" + }, + { + "$ref": "#/parameters/top" + }, + { + "$ref": "#/parameters/orderBy" } ], "x-ms-pageable": { @@ -1177,7 +2378,7 @@ "operationId": "DeviceTemplates_Get", "summary": "Get a device template by ID", "x-ms-examples": { - "Get a device template by Id": { + "Get a device template by ID": { "$ref": "./examples/devicetemplates_get.json" } }, @@ -1237,7 +2438,7 @@ "summary": "Update the cloud properties and overrides of an existing device template via patch.", "x-ms-examples": { "Update a device template": { - "$ref": "./examples/devicetemplates_create.json" + "$ref": "./examples/devicetemplates_update.json" } }, "parameters": [ @@ -1271,7 +2472,7 @@ "summary": "Delete a device template", "description": "Delete an existing device template by device ID.", "x-ms-examples": { - "Delete a device template by Id": { + "Delete a device template by ID": { "$ref": "./examples/devicetemplates_delete.json" } }, @@ -1293,7 +2494,7 @@ "/devices": { "get": { "operationId": "Devices_List", - "summary": "Get the list of devices in an application", + "summary": "Get the list of devices in an application with basic ODATA support ($top, $filter, $orderby), [more details](https://aka.ms/iotcentralodatasupport).", "x-ms-examples": { "List devices": { "$ref": "./examples/devices_list.json" @@ -1302,6 +2503,15 @@ "parameters": [ { "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/filter" + }, + { + "$ref": "#/parameters/top" + }, + { + "$ref": "#/parameters/orderBy" } ], "x-ms-pageable": { @@ -1323,7 +2533,7 @@ "summary": "Get a device by ID", "description": "Get details about an existing device by device ID.", "x-ms-examples": { - "Get device by Id": { + "Get device by ID": { "$ref": "./examples/devices_get.json" } }, @@ -2537,6 +3747,171 @@ } } }, + "/devices/{deviceId}/relationships/": { + "get": { + "operationId": "Devices_ListRelationships", + "summary": "Given the ID for an upstream device, will return the upstream and the downstream relationships associated with that gateway. These downstream relationships are only those associated with the direct downstream level (they don’t work recursively).", + "description": "List all relationships based on device ID", + "x-ms-examples": { + "List device relationships": { + "$ref": "./examples/devices_relationships_list.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceRelationshipCollection" + } + } + } + } + }, + "/devices/{deviceId}/relationships/{relationshipId}": { + "get": { + "operationId": "Devices_GetRelationship", + "summary": "Given the ID for a device and a relationship ID associated with this device, get the details of the relationship.", + "description": "Get device relationship by ID", + "x-ms-examples": { + "Get device relationship by ID": { + "$ref": "./examples/devices_relationships_get.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/RelationshipId" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceRelationship" + } + } + } + }, + "put": { + "operationId": "Devices_CreateRelationship", + "summary": "Given the ID for a device and a relationship ID associated with this device, create a new relationship for between the given device and a second device specified in the body.", + "description": "Create a device relationship", + "x-ms-examples": { + "Create a new device relationship": { + "$ref": "./examples/devices_relationships_create.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/RelationshipId" + }, + { + "in": "body", + "name": "body", + "description": "Device relationship body.", + "schema": { + "$ref": "#/definitions/DeviceRelationship" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceRelationship" + } + } + } + }, + "patch": { + "operationId": "Devices_UpdateRelationship", + "summary": "Patch a given relationship given the relationship ID and a given device ID.", + "description": "Update device relationship", + "x-ms-examples": { + "Update a device relationship": { + "$ref": "./examples/devices_relationships_update.json" + } + }, + "consumes": [ + "application/json", + "application/json-patch+json" + ], + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/RelationshipId" + }, + { + "in": "body", + "name": "body", + "description": "Device relationship patch body.", + "schema": { + "type": "object" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceRelationship" + } + } + } + }, + "delete": { + "operationId": "Devices_RemoveRelationship", + "summary": "Given the ID for a device and an associated relationship ID, delete the relationship. The given device ID can be that of the upstream or downstream device.", + "description": "Delete a device relationship", + "x-ms-examples": { + "Delete a device relationship": { + "$ref": "./examples/devices_relationships_delete.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/RelationshipId" + } + ], + "responses": { + "204": { + "description": "Success" + } + } + } + }, "/devices/{deviceId}/telemetry/{telemetryName}": { "get": { "operationId": "Devices_GetTelemetryValue", @@ -2694,7 +4069,7 @@ "summary": "Get a job by ID", "description": "Get details about a running or completed job by job ID.", "x-ms-examples": { - "Get a job by Id": { + "Get a job by ID": { "$ref": "./examples/jobs_get.json" } }, @@ -2868,7 +4243,7 @@ "/organizations": { "get": { "operationId": "Organizations_List", - "summary": "Get the list of organizations the user has access to in an application.", + "summary": "Get the list of organizations the user has access to in an application", "x-ms-examples": { "List organizations": { "$ref": "./examples/organizations_list.json" @@ -3029,6 +4404,39 @@ } } }, + "/query": { + "post": { + "operationId": "Query_Run", + "summary": "Run a query and obtain the result", + "x-ms-examples": { + "List devices": { + "$ref": "./examples/query_run.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "in": "body", + "name": "body", + "description": "query, more details in [IoT central query language](https://aka.ms/iotcql)", + "schema": { + "$ref": "#/definitions/QueryRequest" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/QueryResponse" + } + } + } + } + }, "/roles": { "get": { "operationId": "Roles_List", @@ -3061,7 +4469,7 @@ "operationId": "Roles_Get", "summary": "Get a role by ID.", "x-ms-examples": { - "Get role by Id": { + "Get role by ID": { "$ref": "./examples/roles_get.json" } }, @@ -3281,6 +4689,14 @@ "type": "string", "required": true }, + "DestinationId": { + "in": "path", + "name": "destinationId", + "description": "Unique ID for the destination.", + "x-ms-parameter-location": "method", + "type": "string", + "required": true + }, "DeviceId": { "in": "path", "name": "deviceId", @@ -3297,6 +4713,14 @@ "type": "string", "required": true }, + "ExportId": { + "in": "path", + "name": "exportId", + "description": "Unique ID for the export.", + "x-ms-parameter-location": "method", + "type": "string", + "required": true + }, "JobId": { "in": "path", "name": "jobId", @@ -3313,6 +4737,14 @@ "type": "string", "required": true }, + "RelationshipId": { + "in": "path", + "name": "relationshipId", + "description": "Unique ID of a relationship between devices.", + "x-ms-parameter-location": "method", + "type": "string", + "required": true + }, "Subdomain": { "in": "path", "name": "subdomain", @@ -3339,6 +4771,30 @@ "1.1-preview" ], "required": true + }, + "filter": { + "in": "query", + "name": "$filter", + "description": "Filter string for results.", + "x-ms-parameter-location": "method", + "type": "string", + "required": false + }, + "orderBy": { + "in": "query", + "name": "$orderby", + "description": "The order by string for results.", + "x-ms-parameter-location": "method", + "type": "string", + "required": false + }, + "top": { + "in": "query", + "name": "$top", + "description": "Page size of returned results.", + "x-ms-parameter-location": "method", + "type": "integer", + "required": false } }, "securityDefinitions": { From f883152995e9348668af2b48af2385c2ef73d871 Mon Sep 17 00:00:00 2001 From: Shuo LI Date: Wed, 1 Dec 2021 09:34:13 -0800 Subject: [PATCH 2/4] Adding Discovery Recovery enum type --- .../stable/2021-11-01/sqlManagedInstances.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-11-01/sqlManagedInstances.json b/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-11-01/sqlManagedInstances.json index 620704b2c298..0e087e30f4b6 100644 --- a/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-11-01/sqlManagedInstances.json +++ b/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-11-01/sqlManagedInstances.json @@ -120,7 +120,8 @@ "type": "string", "enum": [ "BasePrice", - "LicenseIncluded" + "LicenseIncluded", + "DisasterRecovery" ], "x-ms-enum": { "name": "arcSqlManagedInstanceLicenseType", From 9a4e4c2d4a9ee11ccdf18a112cf24018e1eca73a Mon Sep 17 00:00:00 2001 From: Shuo LI Date: Thu, 16 Dec 2021 14:05:31 -0800 Subject: [PATCH 3/4] Try to model as string --- .../stable/2021-11-01/sqlManagedInstances.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-11-01/sqlManagedInstances.json b/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-11-01/sqlManagedInstances.json index 0e087e30f4b6..0436e0d3c492 100644 --- a/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-11-01/sqlManagedInstances.json +++ b/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/stable/2021-11-01/sqlManagedInstances.json @@ -125,7 +125,7 @@ ], "x-ms-enum": { "name": "arcSqlManagedInstanceLicenseType", - "modelAsString": false + "modelAsString": true }, "default": "BasePrice", "description": "The license type to apply for this managed instance." From 143f821ae0f07cb12a5f12ffea7931b9d5e81c50 Mon Sep 17 00:00:00 2001 From: Shuo LI Date: Thu, 16 Dec 2021 16:05:06 -0800 Subject: [PATCH 4/4] bump python version --- specification/azurearcdata/resource-manager/readme.python.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/azurearcdata/resource-manager/readme.python.md b/specification/azurearcdata/resource-manager/readme.python.md index 1195d6965697..2362cf4f5a0f 100644 --- a/specification/azurearcdata/resource-manager/readme.python.md +++ b/specification/azurearcdata/resource-manager/readme.python.md @@ -8,7 +8,7 @@ azure-arm: true license-header: MICROSOFT_MIT_NO_VERSION package-name: azure-mgmt-azurearcdata no-namespace-folders: true -package-version: 1.1.0b1 +package-version: 1.1.1b1 clear-output-folder: true ```