Skip to content

Commit 04adf29

Browse files
authored
[Hub Generated] Review request for Microsoft.Support to add version preview/2021-06-01-preview (Azure#14586)
* Adds base for updating Microsoft.Support from version stable/2020-04-01 to version 2021-06-01-preview * Updates readme * Updates API version in new specs and examples * Add GetSupportTicketResourceId * Delete CheckNameAvailabilityForSupportTicketCommunication.json * Delete specification/support/resource-manager/Microsoft.Support/preview/2021-06-01-preview/examples directory * add example * list operations * Update LookUpSupportTicketResourceId.json * Update readme.md * Update support.json * Update support.json * Rename support.json to supportLookUpResourceId.json * Rename supportLookUpResourceId.json to supportTicketsResourceIdDetails.json * Update readme.md * Update ListOperations.json * Update LookUpSupportTicketResourceId.json * make swagger generic for resource id look up * Update LookUpSupportTicketResourceId.json * Update LookUpSupportTicketResourceId.json * Rename LookUpSupportTicketResourceId.json to LookUpResourceId.json * Update readme.md * Update LookUpResourceId.json * Update LookUpResourceId.json * Update supportResourceIdDetails.json * Update LookUpResourceId.json * Update supportResourceIdDetails.json * Update supportResourceIdDetails.json * Update LookUpResourceId.json * Update supportResourceIdDetails.json * Update LookUpResourceId.json * Update LookUpResourceId.json * Update supportResourceIdDetails.json * remove error code * Update supportResourceIdDetails.json * Update LookUpResourceId.json * Update supportResourceIdDetails.json
1 parent c32349e commit 04adf29

File tree

4 files changed

+326
-10
lines changed

4 files changed

+326
-10
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"parameters": {
3+
"api-version": "2021-06-01-preview"
4+
},
5+
"responses": {
6+
"200": {
7+
"body": {
8+
"value": [
9+
{
10+
"name": "Microsoft.Support/register/action",
11+
"display": {
12+
"description": "Registers Support Resource Provider",
13+
"operation": "Registers Support Resource Provider",
14+
"provider": "Registers Support Resource Provider",
15+
"resource": "Support Registration"
16+
}
17+
}
18+
]
19+
}
20+
}
21+
}
22+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"parameters": {
3+
"api-version": "2020-06-01-preview",
4+
"lookUpResourceIdRequest": {
5+
"type": "Microsoft.Support/supportTickets",
6+
"identifier": "1234668596"
7+
}
8+
},
9+
"responses": {
10+
"200": {
11+
"body": {
12+
"resourceId": "/subscriptions/subId/providers/Microsoft.Support/supportTickets/SupportTicketName"
13+
}
14+
}
15+
}
16+
}
Lines changed: 270 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,270 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"version": "2021-06-01-preview",
5+
"title": "Microsoft.Support",
6+
"description": "Microsoft Azure Support Resource Provider."
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+
"flow": "implicit",
28+
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
29+
"scopes": {
30+
"user_impersonation": "impersonate your user account"
31+
},
32+
"type": "oauth2",
33+
"description": "Azure Active Directory OAuth2 Flow."
34+
}
35+
},
36+
"paths": {
37+
"/providers/Microsoft.Support/operations": {
38+
"get": {
39+
"tags": [
40+
"Operations"
41+
],
42+
"description": "This lists all the available Microsoft Support REST API operations.",
43+
"operationId": "Operations_List",
44+
"parameters": [
45+
{
46+
"$ref": "#/parameters/ApiVersionParameter"
47+
}
48+
],
49+
"responses": {
50+
"200": {
51+
"description": "Successfully retrieved list of operations.",
52+
"schema": {
53+
"$ref": "#/definitions/OperationsListResult"
54+
}
55+
},
56+
"default": {
57+
"description": "Error response describing why the operation failed.",
58+
"schema": {
59+
"$ref": "#/definitions/ExceptionResponse"
60+
}
61+
}
62+
},
63+
"x-ms-pageable": {
64+
"nextLinkName": null
65+
},
66+
"x-ms-examples": {
67+
"Get all operations": {
68+
"$ref": "./examples/ListOperations.json"
69+
}
70+
}
71+
}
72+
},
73+
"/providers/Microsoft.Support/lookUpResourceId": {
74+
"post": {
75+
"tags": [
76+
"SupportTickets"
77+
],
78+
"summary": "This operation fetches ARM resource id of support resource type.",
79+
"operationId": "LookUpResourceId_Post",
80+
"parameters": [
81+
{
82+
"$ref": "#/parameters/ApiVersionParameter"
83+
},
84+
{
85+
"name": "lookUpResourceIdRequest",
86+
"in": "body",
87+
"description": "Look up resource id request body",
88+
"required": true,
89+
"schema": {
90+
"$ref": "#/definitions/LookUpResourceIdRequest"
91+
}
92+
}
93+
],
94+
"responses": {
95+
"200": {
96+
"description": "OK. Successfully obtained resource id of support resource type.",
97+
"schema": {
98+
"$ref": "#/definitions/LookUpResourceIdResponse"
99+
}
100+
},
101+
"default": {
102+
"description": "Error response describing why the operation failed.",
103+
"schema": {
104+
"$ref": "#/definitions/ExceptionResponse"
105+
}
106+
}
107+
},
108+
"deprecated": false,
109+
"x-ms-examples": {
110+
"Look up resource id of support resource type": {
111+
"$ref": "./examples/LookUpResourceId.json"
112+
}
113+
}
114+
}
115+
}
116+
},
117+
"definitions": {
118+
"OperationsListResult": {
119+
"description": "The list of operations supported by Microsoft Support resource provider.",
120+
"properties": {
121+
"value": {
122+
"description": "The list of operations supported by Microsoft Support resource provider.",
123+
"type": "array",
124+
"items": {
125+
"$ref": "#/definitions/Operation"
126+
}
127+
}
128+
}
129+
},
130+
"Operation": {
131+
"description": "The operation supported by Microsoft Support resource provider.",
132+
"type": "object",
133+
"properties": {
134+
"name": {
135+
"description": "Operation name: {provider}/{resource}/{operation}.",
136+
"type": "string",
137+
"readOnly": true
138+
},
139+
"display": {
140+
"description": "The object that describes the operation.",
141+
"properties": {
142+
"description": {
143+
"description": "The description of the operation.",
144+
"type": "string",
145+
"readOnly": true
146+
},
147+
"operation": {
148+
"description": "The action that users can perform, based on their permission level.",
149+
"type": "string",
150+
"readOnly": true
151+
},
152+
"provider": {
153+
"description": "Service provider: Microsoft Support.",
154+
"type": "string",
155+
"readOnly": true
156+
},
157+
"resource": {
158+
"description": "Resource on which the operation is performed.",
159+
"type": "string",
160+
"readOnly": true
161+
}
162+
}
163+
}
164+
}
165+
},
166+
"LookUpResourceIdRequest": {
167+
"description": "The look up resource Id request body",
168+
"type": "object",
169+
"properties": {
170+
"identifier": {
171+
"description": "The System generated Id that is unique. Use supportTicketId property for Microsoft.Support/supportTickets resource type.",
172+
"type": "string"
173+
},
174+
"type": {
175+
"type": "string",
176+
"enum": [
177+
"Microsoft.Support/supportTickets"
178+
],
179+
"x-ms-enum": {
180+
"name": "Type",
181+
"modelAsString": false
182+
},
183+
"description": "The type of resource."
184+
}
185+
}
186+
},
187+
"LookUpResourceIdResponse": {
188+
"description": "The look up resource id response",
189+
"type": "object",
190+
"properties": {
191+
"resourceId": {
192+
"description": "The resource Id of support resource type.",
193+
"type": "string"
194+
}
195+
}
196+
},
197+
"ExceptionResponse": {
198+
"type": "object",
199+
"properties": {
200+
"error": {
201+
"$ref": "#/definitions/ServiceError",
202+
"description": "The API error details."
203+
}
204+
},
205+
"description": "The API error."
206+
},
207+
"ServiceError": {
208+
"type": "object",
209+
"properties": {
210+
"code": {
211+
"type": "string",
212+
"description": "The error code."
213+
},
214+
"message": {
215+
"type": "string",
216+
"description": "The error message."
217+
},
218+
"target": {
219+
"type": "string",
220+
"description": "The target of the error."
221+
},
222+
"details": {
223+
"type": "array",
224+
"items": {
225+
"$ref": "#/definitions/ServiceErrorDetail"
226+
},
227+
"description": "The list of error details.",
228+
"readOnly": true
229+
}
230+
},
231+
"description": "The API error details."
232+
},
233+
"ServiceErrorDetail": {
234+
"type": "object",
235+
"properties": {
236+
"code": {
237+
"type": "string",
238+
"readOnly": true,
239+
"description": "The error code."
240+
},
241+
"message": {
242+
"type": "string",
243+
"readOnly": true,
244+
"description": "The error message."
245+
},
246+
"target": {
247+
"type": "string",
248+
"description": "The target of the error."
249+
}
250+
},
251+
"description": "The error details."
252+
}
253+
},
254+
"parameters": {
255+
"SubscriptionIdParameter": {
256+
"name": "subscriptionId",
257+
"in": "path",
258+
"required": true,
259+
"type": "string",
260+
"description": "Azure subscription Id."
261+
},
262+
"ApiVersionParameter": {
263+
"name": "api-version",
264+
"in": "query",
265+
"required": true,
266+
"type": "string",
267+
"description": "API version."
268+
}
269+
}
270+
}

specification/support/resource-manager/readme.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,48 @@
11
# Support
2-
2+
33
> see https://aka.ms/autorest
44
55
This is the AutoRest configuration file for Support.
66

7-
87
---
9-
## Getting Started
8+
9+
## Getting Started
10+
1011
To build the SDK for Support, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run:
1112

1213
> `autorest`
1314
1415
To see additional help and options, run:
1516

1617
> `autorest --help`
18+
1719
---
1820

1921
## Configuration
2022

23+
### Basic Information
2124

22-
### Basic Information
2325
These are the global settings for the Support API.
2426

2527
``` yaml
2628
openapi-type: arm
2729
tag: package-2020-04
2830
```
2931
32+
33+
### Tag: package-preview-2021-06
34+
35+
These settings apply only when `--tag=package-preview-2021-06` is specified on the command line.
36+
37+
```yaml $(tag) == 'package-preview-2021-06'
38+
input-file:
39+
- Microsoft.Support/preview/2021-06-01-preview/supportResourceIdDetails.json
40+
```
3041
### Tag: package-2020-04
3142

3243
These settings apply only when `--tag=package-2020-04` is specified on the command line.
3344

34-
```yaml $(tag) == 'package-2020-04'
45+
``` yaml $(tag) == 'package-2020-04'
3546
input-file:
3647
- Microsoft.Support/stable/2020-04-01/support.json
3748
```
@@ -46,8 +57,8 @@ input-file:
4657
```
4758

4859
---
49-
# Code Generation
5060

61+
# Code Generation
5162

5263
## Swagger to SDK
5364

@@ -68,7 +79,7 @@ swagger-to-sdk:
6879
- repo: azure-resource-manager-schemas
6980
```
7081

71-
## C#
82+
## C#
7283

7384
See configuration in [readme.csharp.md](./readme.csharp.md)
7485

@@ -91,6 +102,3 @@ See configuration in [readme.typescript.md](./readme.typescript.md)
91102
## Ruby
92103

93104
See configuration in [readme.ruby.md](./readme.ruby.md)
94-
95-
96-

0 commit comments

Comments
 (0)