Skip to content

Commit f8402e5

Browse files
authored
Merge pull request #224739 from baanders/1-23-retire-api
ADT: Preview API migration
2 parents e9734df + 2317b6e commit f8402e5

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed

articles/digital-twins/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,8 @@
261261
href: https://pypi.org/project/azure-digitaltwins-core/
262262
- name: Python SDK - Source code
263263
href: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/digitaltwins/azure-digitaltwins-core
264+
- name: Migrate from preview control plane APIs
265+
href: resources-migrate-from-preview-apis.md
264266
- name: Digital Twins CLI package
265267
href: https://github.com/Azure/azure-iot-cli-extension/releases
266268
- name: Terraform modules
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
title: Migrate from preview control plane APIs
3+
titleSuffix: Azure Digital Twins
4+
description: Migrate from preview API versions of the control plane to the stable GA version
5+
author: baanders
6+
ms.author: baanders
7+
ms.date: 01/26/2023
8+
ms.topic: conceptual
9+
ms.service: digital-twins
10+
services: digital-twins
11+
---
12+
13+
# Migrate from Azure Digital Twins preview control plane APIs to the stable GA version
14+
15+
As of May 2, 2023, the following Azure Digital Twins preview control plane APIs will be retired:
16+
* [2020-03-01-preview](https://github.com/Azure/azure-rest-api-specs/tree/main/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/preview/2020-03-01-preview)
17+
* [2021-06-30-preview](https://github.com/Azure/azure-rest-api-specs/tree/main/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/preview/2021-06-30-preview)
18+
19+
This article explains how to migrate from these versions to the latest stable GA version of the APIs, [2022-10-31](https://github.com/Azure/azure-rest-api-specs/tree/main/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2022-10-31). The GA version provides more capabilities, including time-series database connections and managed identity.
20+
21+
## Migrate from 2020-03-01-preview control plane API
22+
23+
This section contains a list of changes to be aware of when you're preparing to migrate from the [2020-03-01-preview](https://github.com/Azure/azure-rest-api-specs/tree/main/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/preview/2020-03-01-preview) API version to the [2022-10-31](https://github.com/Azure/azure-rest-api-specs/tree/main/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2022-10-31) (GA) API version. The changes include altered item names or naming requirements, endpoint requirements, and changes to the instance and API responses.
24+
25+
The changes from the 2020-03-01-preview API version to the 2022-10-31 (GA) API version are as follows:
26+
* For Event Hubs endpoints, the values *connectionString-PrimaryKey* and *connectionString-SecondaryKey* have changed to *connectionStringPrimaryKey* and *connectionStringSecondaryKey*, respectively (the dashes are removed).
27+
* The Patch API response has changed from synchronous to asynchronous.
28+
* Because patch updates now complete asynchronously, the Patch API of Azure Digital Twins resources now returns [202 Accepted](https://github.com/Azure/azure-rest-api-specs/blob/main/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2022-10-31/examples/DigitalTwinsPatch_example.json) instead of [200 OK](https://github.com/Azure/azure-rest-api-specs/blob/main/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/preview/2020-03-01-preview/examples/DigitalTwinsPatch_example.json)). Users can track the status of the update with a PUT request.
29+
* Endpoint names must be at least two characters long (previously one character in the preview API), and can have a max length of 49 characters (previously 64)
30+
* Digital twins resource names must be at least three characters long (previously one), and can have a maximum length of 63 characters (previously 64)
31+
* For Service Bus, Event Hubs, and Event Grid endpoints, secondary secrets (like connection strings and access keys) are no longer required. Now they're optional.
32+
* Azure Digital Twins instances no longer return `SKU` as a property in the JSON body response.
33+
* In the 2020-03-01-preview API, `DigitalTwinsResource` has a [SKU property](https://github.com/Azure/azure-rest-api-specs/blob/main/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/preview/2020-03-01-preview/digitaltwins.json#L723) that is no longer in the 2020-10-31 (GA) API version. Therefore, any reference to `SKU` of an Azure Digital Twins instance should be removed.
34+
35+
If you're using an associated SDK of the 2020-03-01-preview API, it's recommended to update to the latest version of the management SDK. Use the following links to know what additional changes are required to migrate to the new management SDK.
36+
* .NET: Migrate from the [Microsoft.Azure.Management.DigitalTwins 1.0.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.Management.DigitalTwins/1.0.0-preview.1) package to the [Azure.ResourceManager.DigitalTwins 1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.DigitalTwins/1.1.0) package, by following the [.NET SDK migration guidance](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/resourcemanager/Azure.ResourceManager/docs/MigrationGuide.md).
37+
* Java: Migrate from the [azure-mgmt-digitaltwins:1.0.0-beta](https://search.maven.org/artifact/com.microsoft.azure.digitaltwins.v2020_03_01_preview/azure-mgmt-digitaltwins/1.0.0-beta/jar) package to the [azure-resourcemanager-digitaltwins:1.1.0](https://search.maven.org/artifact/com.azure.resourcemanager/azure-resourcemanager-digitaltwins/1.1.0/jar) package, by following the [Java SDK migration guidance](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/eventhubs/azure-messaging-eventhubs/migration-guide.md).
38+
* Go: Migrate from the [digitaltwins 2020-03-01-preview](https://pkg.go.dev/github.com/Azure/[email protected]+incompatible/services/preview/digitaltwins/mgmt/2020-03-01-preview/digitaltwins) package to the [armsdigitaltwins v1.0.0](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins) package, by following the [Go SDK migration guidance](https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/MIGRATION_GUIDE.md).
39+
40+
41+
## Migrate from 2021-10-31-preview control plane API
42+
43+
The target replacement API version ([2022-10-31 (GA) API version](https://github.com/Azure/azure-rest-api-specs/tree/main/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2022-10-31)) is backwards-compatible with the [2021-06-30-preview API version](https://github.com/Azure/azure-rest-api-specs/tree/main/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/preview/2021-06-30-preview). In addition to the 2021-06-30-preview API version's capabilities, the 2022-10-31 (GA) API version additionally introduces user-assigned managed identities.
44+
45+
There are no breaking changes for migrating to the target replacement API version ([2022-10-31 (GA) API version](https://github.com/Azure/azure-rest-api-specs/tree/main/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2022-10-31)). There's one minor change: Endpoints and TSDB connections now have an explicit *Updating* state defined in the API contract.
46+
47+
If you're using an associated SDK of the 2021-10-31-preview API, it's recommended to update to the latest version of the management SDK. Use the following links to know what additional changes are required to migrate to the new management SDK.
48+
* .NET: Migrate from the [Microsoft.Azure.Management.DigitalTwins 1.2.0-beta.1](https://www.nuget.org/packages/Microsoft.Azure.Management.DigitalTwins/1.2.0-beta.1) package to the [Azure.ResourceManager.DigitalTwins 1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.DigitalTwins/1.1.0) package, by following the [.NET SDK migration guidance](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/resourcemanager/Azure.ResourceManager/docs/MigrationGuide.md).
49+
* Java: Migrate from the [azure-resourcemanager-digitaltwins:1.0.0-beta.2](https://search.maven.org/artifact/com.azure.resourcemanager/azure-resourcemanager-digitaltwins/1.0.0-beta.2/jar) package to the [Azure.ResourceManager.DigitalTwins 1.1.0](https://search.maven.org/artifact/com.azure.resourcemanager/azure-resourcemanager-digitaltwins/1.1.0/jar) package, or set the service version in the SDK client to call the 2022-10-31 (GA) API.
50+
51+
## Next steps
52+
53+
View the latest stable GA API, [2022-10-31](https://github.com/Azure/azure-rest-api-specs/tree/main/specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2022-10-31), in GitHub.

0 commit comments

Comments
 (0)