Skip to content

Commit f8c9cde

Browse files
krivi37Stefan Krivokapic
andauthored
Add ManagedInstanceDTCs APIs (#18770)
* Added swagger, examples and changed the readme.md file * Fixed spelling errors and examples * Added a patch request option and renamed the file to lowercase * Update readme.md * Renamed examples for put and patch update * Extracted resource properties for patch request * Added new examples and changed existing ones * Added provisioning state to put request * Updated put examples * Changed provisioning status in the update examples * Updated provisioning state enum * Removed 202 code from PUT provisioning state response and updated examples accordingly * Removed patch operation and associated examples, also renamed put examples * Changed descriptions of some models * Renamed an example description Co-authored-by: Stefan Krivokapic <[email protected]>
1 parent 94198ce commit f8c9cde

File tree

7 files changed

+489
-1
lines changed

7 files changed

+489
-1
lines changed

custom-words.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2525,4 +2525,5 @@ Dataworld
25252525
Asana
25262526
AppFigures
25272527
Twilio
2528-
getazresiliencystatus
2528+
getazresiliencystatus
2529+
DTCs
Lines changed: 315 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,315 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"version": "2022-02-01-preview",
5+
"title": "SqlManagementClient",
6+
"description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities."
7+
},
8+
"host": "management.azure.com",
9+
"schemes": [
10+
"https"
11+
],
12+
"consumes": [
13+
"application/json"
14+
],
15+
"produces": [
16+
"application/json"
17+
],
18+
"paths": {
19+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/dtc": {
20+
"get": {
21+
"tags": [
22+
"ManagedInstanceDtcs"
23+
],
24+
"description": "Gets a list of managed instance DTC settings.",
25+
"operationId": "ManagedInstanceDtcs_ListByManagedInstance",
26+
"parameters": [
27+
{
28+
"$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter"
29+
},
30+
{
31+
"$ref": "#/parameters/ManagedInstanceNameParameter"
32+
},
33+
{
34+
"$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter"
35+
},
36+
{
37+
"$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter"
38+
}
39+
],
40+
"responses": {
41+
"200": {
42+
"description": "Successfully retrieved the specified managed instance DTC settings.",
43+
"schema": {
44+
"$ref": "#/definitions/ManagedInstanceDtcListResult"
45+
}
46+
},
47+
"default": {
48+
"description": "*** Error Responses: ***\n\n * 400 InvalidDtcVirtualClusterVersion - Virtual cluster version of the Azure SQL Managed Instance \"{0}\" is not supported.\n\n * 400 ManagementServiceManagedInstanceDtcFeatureDisabled - User tried to interact with Azure SQL Managed Instance DTC settings but DTC feature is currently not supported.\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 ResourceNotFound - The requested resource was not found."
49+
}
50+
},
51+
"x-ms-pageable": {
52+
"nextLinkName": "nextLink"
53+
},
54+
"x-ms-examples": {
55+
"Gets a list of managed instance DTC settings.": {
56+
"$ref": "./examples/ManagedInstanceDtcList.json"
57+
}
58+
}
59+
}
60+
},
61+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/dtc/{dtcName}": {
62+
"get": {
63+
"tags": [
64+
"ManagedInstanceDtcs"
65+
],
66+
"description": "Gets managed instance DTC settings.",
67+
"operationId": "ManagedInstanceDtcs_Get",
68+
"parameters": [
69+
{
70+
"$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter"
71+
},
72+
{
73+
"$ref": "#/parameters/ManagedInstanceNameParameter"
74+
},
75+
{
76+
"name": "dtcName",
77+
"in": "path",
78+
"description": "The name of the managed instance DTC.",
79+
"required": true,
80+
"type": "string",
81+
"enum": [
82+
"current"
83+
],
84+
"x-ms-enum": {
85+
"name": "DtcName",
86+
"modelAsString": true
87+
}
88+
},
89+
{
90+
"$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter"
91+
},
92+
{
93+
"$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter"
94+
}
95+
],
96+
"responses": {
97+
"200": {
98+
"description": "Successfully retrieved the specified managed instance DTC settings.",
99+
"schema": {
100+
"$ref": "#/definitions/ManagedInstanceDtc"
101+
}
102+
},
103+
"default": {
104+
"description": "*** Error Responses: ***\n\n * 400 InvalidDtcName - User tried to interact with Azure SQL Managed Instance DTC settings with a DTC name different from 'current'.\n\n * 400 InvalidUpdateDtcOperationParameters - The provided set of parameters in the body of the request is either empty or invalid.\n\n * 400 InvalidDtcAuthenticationMethod - DTC authentication method \"{0}\" is not supported.\n\n * 400 InvalidDtcVirtualClusterVersion - Virtual cluster version of the Azure SQL Managed Instance \"{0}\" is not supported.\n\n * 400 ManagementServiceManagedInstanceDtcFeatureDisabled - User tried to interact with Azure SQL Managed Instance DTC settings but DTC feature is currently not supported.\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 ResourceNotFound - The requested resource was not found."
105+
}
106+
},
107+
"x-ms-examples": {
108+
"Gets managed instance DTC settings.": {
109+
"$ref": "./examples/ManagedInstanceDtcGet.json"
110+
}
111+
}
112+
},
113+
"put": {
114+
"tags": [
115+
"ManagedInstanceDtcs"
116+
],
117+
"description": "Updates managed instance DTC settings.",
118+
"operationId": "ManagedInstanceDtcs_CreateOrUpdate",
119+
"parameters": [
120+
{
121+
"$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter"
122+
},
123+
{
124+
"$ref": "#/parameters/ManagedInstanceNameParameter"
125+
},
126+
{
127+
"name": "dtcName",
128+
"in": "path",
129+
"description": "The name of the managed instance DTC.",
130+
"required": true,
131+
"type": "string",
132+
"enum": [
133+
"current"
134+
],
135+
"x-ms-enum": {
136+
"name": "DtcName",
137+
"modelAsString": true
138+
}
139+
},
140+
{
141+
"name": "parameters",
142+
"in": "body",
143+
"description": "Managed instance DTC settings.",
144+
"required": true,
145+
"schema": {
146+
"$ref": "#/definitions/ManagedInstanceDtc"
147+
}
148+
},
149+
{
150+
"$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter"
151+
},
152+
{
153+
"$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter"
154+
}
155+
],
156+
"responses": {
157+
"200": {
158+
"description": "Applying DTC settings is in progress",
159+
"schema": {
160+
"$ref": "#/definitions/ManagedInstanceDtc"
161+
}
162+
},
163+
"default": {
164+
"description": "*** Error Responses: ***\n\n * 400 InvalidDtcName - User tried to interact with Azure SQL Managed Instance DTC settings with a DTC name different from 'current'.\n\n * 400 InvalidUpdateDtcOperationParameters - The provided set of parameters in the body of the request is either empty or invalid.\n\n * 400 InvalidDtcAuthenticationMethod - DTC authentication method \"{0}\" is not supported.\n\n * 400 InvalidDtcVirtualClusterVersion - Virtual cluster version of the Azure SQL Managed Instance \"{0}\" is not supported.\n\n * 400 ManagementServiceManagedInstanceDtcFeatureDisabled - User tried to interact with Azure SQL Managed Instance DTC settings but DTC feature is currently not supported.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation."
165+
}
166+
},
167+
"x-ms-long-running-operation": true,
168+
"x-ms-examples": {
169+
"Updates managed instance DTC settings with all optional parameters specified.": {
170+
"$ref": "./examples/ManagedInstanceDtcUpdateMax.json"
171+
},
172+
"Updates managed instance DTC settings by enabling DTC.": {
173+
"$ref": "./examples/ManagedInstanceDtcUpdateEnableDtc.json"
174+
}
175+
}
176+
}
177+
}
178+
},
179+
"definitions": {
180+
"ManagedInstanceDtc": {
181+
"description": "SQL Managed Instance DTC",
182+
"type": "object",
183+
"allOf": [
184+
{
185+
"$ref": "../../../common/v1/types.json#/definitions/ProxyResource"
186+
}
187+
],
188+
"properties": {
189+
"properties": {
190+
"$ref": "#/definitions/ManagedInstanceDtcProperties",
191+
"description": "Resource properties.",
192+
"x-ms-client-flatten": true
193+
}
194+
}
195+
},
196+
"ManagedInstanceDtcListResult": {
197+
"description": "A list of managed instance's DTCs.",
198+
"type": "object",
199+
"properties": {
200+
"value": {
201+
"description": "Array of results.",
202+
"type": "array",
203+
"items": {
204+
"$ref": "#/definitions/ManagedInstanceDtc"
205+
},
206+
"readOnly": true
207+
},
208+
"nextLink": {
209+
"description": "Link to retrieve next page of results.",
210+
"type": "string",
211+
"readOnly": true
212+
}
213+
}
214+
},
215+
"ManagedInstanceDtcProperties": {
216+
"description": "The properties of managed instance DTC.",
217+
"type": "object",
218+
"properties": {
219+
"dtcEnabled": {
220+
"description": "Active status of managed instance DTC.",
221+
"type": "boolean"
222+
},
223+
"securitySettings": {
224+
"$ref": "#/definitions/ManagedInstanceDtcSecuritySettings",
225+
"description": "Security settings of managed instance DTC."
226+
},
227+
"externalDnsSuffixSearchList": {
228+
"description": "External dns suffix search list of managed instance DTC.",
229+
"type": "array",
230+
"items": {
231+
"type": "string"
232+
}
233+
},
234+
"dtcHostNameDnsSuffix": {
235+
"description": "Host name dns suffix of managed instance DTC.",
236+
"type": "string",
237+
"readOnly": true
238+
},
239+
"provisioningState": {
240+
"description": "Provisioning state of managed instance DTC.",
241+
"enum": [
242+
"Created",
243+
"InProgress",
244+
"Succeeded",
245+
"Failed",
246+
"Canceled"
247+
],
248+
"type": "string",
249+
"readOnly": true,
250+
"x-ms-enum": {
251+
"name": "ProvisioningState",
252+
"modelAsString": true
253+
}
254+
}
255+
}
256+
},
257+
"ManagedInstanceDtcSecuritySettings": {
258+
"description": "The Security Settings of managed instance DTC.",
259+
"type": "object",
260+
"properties": {
261+
"transactionManagerCommunicationSettings": {
262+
"$ref": "#/definitions/ManagedInstanceDtcTransactionManagerCommunicationSettings",
263+
"description": "Transaction Manager communication settings of managed instance DTC."
264+
},
265+
"xaTransactionsEnabled": {
266+
"description": "Allow XA Transactions to managed instance DTC.",
267+
"type": "boolean"
268+
},
269+
"snaLu6point2TransactionsEnabled": {
270+
"description": "Allow SNA LU 6.2 to managed instance DTC.",
271+
"type": "boolean"
272+
}
273+
}
274+
},
275+
"ManagedInstanceDtcTransactionManagerCommunicationSettings": {
276+
"description": "The Transaction Manager Communication Settings of managed instance DTC.",
277+
"type": "object",
278+
"properties": {
279+
"allowInboundEnabled": {
280+
"description": "Allow Inbound traffic to managed instance DTC.",
281+
"type": "boolean"
282+
},
283+
"allowOutboundEnabled": {
284+
"description": "Allow Outbound traffic of managed instance DTC.",
285+
"type": "boolean"
286+
},
287+
"authentication": {
288+
"description": "Authentication type of managed instance DTC.",
289+
"type": "string"
290+
}
291+
}
292+
}
293+
},
294+
"parameters": {
295+
"ManagedInstanceNameParameter": {
296+
"name": "managedInstanceName",
297+
"in": "path",
298+
"description": "The name of the managed instance.",
299+
"required": true,
300+
"type": "string",
301+
"x-ms-parameter-location": "method"
302+
}
303+
},
304+
"securityDefinitions": {
305+
"azure_auth": {
306+
"type": "oauth2",
307+
"description": "Azure Active Directory OAuth2 Flow",
308+
"flow": "implicit",
309+
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
310+
"scopes": {
311+
"user_impersonation": "impersonate your user account"
312+
}
313+
}
314+
}
315+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "00000000-1111-2222-3333-444444444444",
4+
"resourceGroupName": "testrg",
5+
"managedInstanceName": "testinstance",
6+
"dtcName": "current",
7+
"api-version": "2022-02-01-preview"
8+
},
9+
"responses": {
10+
"200": {
11+
"body": {
12+
"properties": {
13+
"dtcEnabled": true,
14+
"securitySettings": {
15+
"transactionManagerCommunicationSettings": {
16+
"allowInboundEnabled": false,
17+
"allowOutboundEnabled": true,
18+
"authentication": "NoAuth"
19+
},
20+
"xaTransactionsEnabled": false,
21+
"snaLu6point2TransactionsEnabled": false
22+
},
23+
"externalDnsSuffixSearchList": [
24+
"dns.example1.com",
25+
"dns.example2.com"
26+
],
27+
"dtcHostNameDnsSuffix": "dtcHostNameSuffixExample.com",
28+
"provisioningState": "Succeeded"
29+
},
30+
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance/dtc/current",
31+
"name": "current",
32+
"type": "Microsoft.Sql/managedInstances/dtc"
33+
}
34+
}
35+
}
36+
}

0 commit comments

Comments
 (0)