Skip to content

Commit d937145

Browse files
Shwaszhenglaizhang
andauthored
Creating a new API version (#4492)
* Create Environment.json * Replicate existing code * Replicate existing api * Commin New ServiceCientIdentity APIs * Update to Async API * Update Async examples * Fix readme warning * Update DeleteDstsServiceClientIdentity.json * Update DeleteDstsServiceClientIdentity.json * Update required * fix prettier issue Co-authored-by: Zhenglai Zhang <[email protected]>
1 parent bed1d2d commit d937145

17 files changed

+1645
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,389 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"title": "Foundational ARM Client",
5+
"description": "DstsServiceAccount Provider",
6+
"version": "2021-08-10-privatepreview"
7+
},
8+
"host": "management.azure.com",
9+
"schemes": [
10+
"https"
11+
],
12+
"consumes": [
13+
"application/json"
14+
],
15+
"produces": [
16+
"application/json"
17+
],
18+
"security": [
19+
{
20+
"azure_auth": [
21+
"user_impersonation"
22+
]
23+
}
24+
],
25+
"securityDefinitions": {
26+
"azure_auth": {
27+
"type": "oauth2",
28+
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
29+
"flow": "implicit",
30+
"description": "Azure Active Directory OAuth2 Flow.",
31+
"scopes": {
32+
"user_impersonation": "impersonate your user account"
33+
}
34+
}
35+
},
36+
"paths": {
37+
"/subscriptions/{subscriptionId}/providers/Microsoft.AzureCIS/dstsServiceAccounts": {
38+
"get": {
39+
"description": "Lists all the DstsServiceAccounts in a subscription.",
40+
"x-ms-examples": {
41+
"Get DstsServiceAccounts in a subscription": {
42+
"$ref": "./examples/GetAllDstsServiceAccount.json"
43+
}
44+
},
45+
"operationId": "DstsServiceAccount_listSubscriptionLevel",
46+
"parameters": [
47+
{
48+
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
49+
},
50+
{
51+
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter"
52+
}
53+
],
54+
"responses": {
55+
"200": {
56+
"description": "List of DstsServiceAccounts.",
57+
"schema": {
58+
"$ref": "#/definitions/DstsServiceAccountModelArray"
59+
}
60+
},
61+
"default": {
62+
"description": "Error response describing the reason for operation failure.",
63+
"schema": {
64+
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
65+
}
66+
}
67+
},
68+
"x-ms-pageable": {
69+
"nextLinkName": "nextLink"
70+
}
71+
}
72+
},
73+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureCIS/dstsServiceAccounts": {
74+
"get": {
75+
"description": "Lists all the DstsServiceAccounts in a ResourceGroup.",
76+
"x-ms-examples": {
77+
"Get DstsServiceAccounts in a ResourceGroup": {
78+
"$ref": "./examples/GetDstsServiceAccountUnderResourceGroup.json"
79+
}
80+
},
81+
"operationId": "DstsServiceAccounts_listResourceGroupLevel",
82+
"parameters": [
83+
{
84+
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
85+
},
86+
{
87+
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter"
88+
},
89+
{
90+
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
91+
}
92+
],
93+
"responses": {
94+
"200": {
95+
"description": "List of DstsServiceAccounts.",
96+
"schema": {
97+
"$ref": "#/definitions/DstsServiceAccountModelArray"
98+
}
99+
},
100+
"default": {
101+
"description": "Error response describing the reason for operation failure.",
102+
"schema": {
103+
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
104+
}
105+
}
106+
},
107+
"x-ms-pageable": {
108+
"nextLinkName": "nextLink"
109+
}
110+
}
111+
},
112+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureCIS/dstsServiceAccounts/{resourceName}": {
113+
"put": {
114+
"description": "Create or update DstsServiceAccount.",
115+
"x-ms-examples": {
116+
"Create or update a DstsServiceAccount": {
117+
"$ref": "./examples/CreateDstsServiceAccount.json"
118+
}
119+
},
120+
"operationId": "DstsServiceAccount_CreateUpdate",
121+
"parameters": [
122+
{
123+
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
124+
},
125+
{
126+
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter"
127+
},
128+
{
129+
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
130+
},
131+
{
132+
"$ref": "#/parameters/ResourceNameParameter"
133+
},
134+
{
135+
"name": "DstsServiceAccount",
136+
"description": "DstsServiceAccount details.",
137+
"in": "body",
138+
"required": true,
139+
"schema": {
140+
"$ref": "#/definitions/DstsServiceAccountModel"
141+
}
142+
}
143+
],
144+
"responses": {
145+
"201": {
146+
"description": "DstsServiceAccount Resource created successfully.",
147+
"schema": {
148+
"$ref": "#/definitions/DstsServiceAccountModel"
149+
}
150+
},
151+
"200": {
152+
"description": "DstsServiceAccount Resource updated successfully.",
153+
"schema": {
154+
"$ref": "#/definitions/DstsServiceAccountModel"
155+
}
156+
},
157+
"default": {
158+
"description": "Error response describing the reason for operation failure.",
159+
"schema": {
160+
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
161+
}
162+
}
163+
}
164+
},
165+
"patch": {
166+
"description": "Patch DstsServiceAccount.",
167+
"x-ms-examples": {
168+
"Patch DstsServiceAccount": {
169+
"$ref": "./examples/PatchDstsServiceAccount.json"
170+
}
171+
},
172+
"operationId": "DstsServiceAccount_patch",
173+
"parameters": [
174+
{
175+
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
176+
},
177+
{
178+
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter"
179+
},
180+
{
181+
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
182+
},
183+
{
184+
"$ref": "#/parameters/ResourceNameParameter"
185+
},
186+
{
187+
"name": "DstsServiceAccount",
188+
"description": "DstsServiceAccount details.",
189+
"in": "body",
190+
"required": true,
191+
"schema": {
192+
"$ref": "#/definitions/DstsServiceAccountModel"
193+
}
194+
}
195+
],
196+
"responses": {
197+
"200": {
198+
"description": "Patch request has been accepted, DstsServiceAccount is already in the required state.",
199+
"schema": {
200+
"$ref": "#/definitions/DstsServiceAccountModel"
201+
}
202+
},
203+
"202": {
204+
"description": "Patch request has been accepted",
205+
"headers": {
206+
"Location": {
207+
"description": "URL to query for status of the operation.",
208+
"type": "string"
209+
}
210+
}
211+
},
212+
"default": {
213+
"description": "Error response describing the reason for operation failure.",
214+
"schema": {
215+
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
216+
}
217+
}
218+
}
219+
},
220+
"get": {
221+
"description": "Returns a DstsServiceAccount info",
222+
"x-ms-examples": {
223+
"Get DstsServiceAccount": {
224+
"$ref": "./examples/GetDstsServiceAccount.json"
225+
}
226+
},
227+
"operationId": "DstsServiceAccountInfo_Get",
228+
"parameters": [
229+
{
230+
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
231+
},
232+
{
233+
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter"
234+
},
235+
{
236+
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
237+
},
238+
{
239+
"$ref": "#/parameters/ResourceNameParameter"
240+
}
241+
],
242+
"responses": {
243+
"200": {
244+
"description": "DstsServiceAccount info.",
245+
"schema": {
246+
"$ref": "#/definitions/DstsServiceAccountModel"
247+
}
248+
},
249+
"default": {
250+
"description": "Error response describing the reason for operation failure.",
251+
"schema": {
252+
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
253+
}
254+
}
255+
}
256+
},
257+
"delete": {
258+
"description": "Delete DstsServiceAccount",
259+
"x-ms-examples": {
260+
"Delete a DstsServiceAccount": {
261+
"$ref": "./examples/DeleteDstsServiceAccount.json"
262+
}
263+
},
264+
"operationId": "DstsServiceAccount_Delete",
265+
"parameters": [
266+
{
267+
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
268+
},
269+
{
270+
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter"
271+
},
272+
{
273+
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
274+
},
275+
{
276+
"$ref": "#/parameters/ResourceNameParameter"
277+
}
278+
],
279+
"responses": {
280+
"200": {
281+
"description": "DstsServiceAccount was deleted successfully."
282+
},
283+
"202": {
284+
"description": "Delete DstsServiceAccount request has been accepted.",
285+
"headers": {
286+
"Location": {
287+
"description": "URL to query for status of the operation.",
288+
"type": "string"
289+
}
290+
}
291+
},
292+
"204": {
293+
"description": "DstsServiceAccount does not exist."
294+
},
295+
"default": {
296+
"description": "Error response describing the reason for operation failure.",
297+
"schema": {
298+
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
299+
}
300+
}
301+
}
302+
}
303+
}
304+
},
305+
"definitions": {
306+
"DstsServiceAccountResource": {
307+
"required": [
308+
"GroupName",
309+
"AccountName"
310+
],
311+
"type": "object",
312+
"description": "DstsServiceAccount properties",
313+
"properties": {
314+
"GroupName": {
315+
"type": "string",
316+
"description": "Name of the ServiceAccountGroup in Dscm to which the ServiceAccount belongs. Example: ProductionGroup"
317+
},
318+
"AccountName": {
319+
"type": "string",
320+
"description": "Name of the ServiceAccount, to be specified optionally if the ServiceAccountGroup does not specify a naming pattern for its member ServiceAccounts. Example: prod-useast.azcis.trafficmanager.net"
321+
},
322+
"DstsInstance": {
323+
"type": "string",
324+
"description": "Dsts instance on which the ServiceAccount should be created. If not specified, the ServiceAccount is created on the regional dsts instance corresponding to the resource location. Example: useast-dsts.dsts.core.windows.net"
325+
}
326+
}
327+
},
328+
"DstsServiceAccountModel": {
329+
"type": "object",
330+
"description": "DstsServiceAccount Response",
331+
"properties": {
332+
"provisioningState": {
333+
"$ref": "#/definitions/ProvisioningState",
334+
"description": "The provisioning State of the resource."
335+
},
336+
"properties": {
337+
"$ref": "#/definitions/DstsServiceAccountResource",
338+
"description": "DstsServiceAccountResource detail"
339+
}
340+
},
341+
"allOf": [
342+
{
343+
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/TrackedResource"
344+
}
345+
]
346+
},
347+
"ProvisioningState": {
348+
"description": "Provisioning status of the resource.",
349+
"readOnly": true,
350+
"enum": [
351+
"Failed",
352+
"Succeeded",
353+
"Canceled",
354+
"Accepted"
355+
],
356+
"type": "string",
357+
"x-ms-enum": {
358+
"name": "ProvisioningState",
359+
"modelAsString": true
360+
}
361+
},
362+
"DstsServiceAccountModelArray": {
363+
"properties": {
364+
"value": {
365+
"type": "array",
366+
"items": {
367+
"$ref": "#/definitions/DstsServiceAccountModel"
368+
},
369+
"description": "An array of Dsts ServiceAccount resources"
370+
},
371+
"nextLink": {
372+
"type": "string",
373+
"description": "The URL to use for getting the next set of results."
374+
}
375+
},
376+
"description": "List of DstsServiceAccount"
377+
}
378+
},
379+
"parameters": {
380+
"ResourceNameParameter": {
381+
"name": "resourceName",
382+
"in": "path",
383+
"required": true,
384+
"type": "string",
385+
"description": "The name of resource.",
386+
"x-ms-parameter-location": "method"
387+
}
388+
}
389+
}

0 commit comments

Comments
 (0)