Skip to content

Commit 8179a9e

Browse files
authored
[Hub Generated] Review request for Microsoft.Insights to add version stable/2021-10-14 (#16417)
* Adds base for updating Microsoft.Insights from version preview/2020-06-02-preview to version 2021-10-14 * Updates readme * Updates API version in new specs and examples * Fixing a relative path * Pascal casing for the resource provider name * Attempt at fixing R4018
1 parent 32652d3 commit 8179a9e

File tree

4 files changed

+258
-6
lines changed

4 files changed

+258
-6
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"parameters": {
3+
"resourceUri": "subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/FabrikamFiberApp/providers/microsoft.insights/components/CustomAvailabilityTest/providers/microsoft.insights/generatelivetoken",
4+
"api-version": "2021-10-14"
5+
},
6+
"responses": {
7+
"200": {
8+
"body": {
9+
"liveToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
10+
}
11+
}
12+
}
13+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"parameters": {
3+
"api-version": "2021-10-14"
4+
},
5+
"responses": {
6+
"200": {
7+
"body": {
8+
"value": [
9+
{
10+
"name": "microsoft.insights/generatelivetoken",
11+
"display": {
12+
"provider": "Microsoft Container Instance",
13+
"resource": "generatelivetoken",
14+
"operation": "Gets an access token for live metrics stream data",
15+
"description": "Gets an access token for live metrics stream data"
16+
},
17+
"origin": "User"
18+
}
19+
]
20+
}
21+
}
22+
}
23+
}
Lines changed: 209 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"title": "ApplicationInsightsManagementClient",
5+
"x-ms-code-generation-settings": {
6+
"name": "ApplicationInsightsManagementClient"
7+
},
8+
"version": "2021-10-14"
9+
},
10+
"host": "management.azure.com",
11+
"schemes": [
12+
"https"
13+
],
14+
"consumes": [
15+
"application/json"
16+
],
17+
"produces": [
18+
"application/json"
19+
],
20+
"security": [
21+
{
22+
"azure_auth": [
23+
"user_impersonation"
24+
]
25+
}
26+
],
27+
"securityDefinitions": {
28+
"azure_auth": {
29+
"type": "oauth2",
30+
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
31+
"flow": "implicit",
32+
"description": "Azure Active Directory OAuth2 Flow.",
33+
"scopes": {
34+
"user_impersonation": "impersonate your user account"
35+
}
36+
}
37+
},
38+
"paths": {
39+
"/providers/Microsoft.Insights/operations": {
40+
"get": {
41+
"tags": [
42+
"Operations"
43+
],
44+
"summary": "List available operations.",
45+
"description": "List the available operations supported by the resource provider.",
46+
"operationId": "Operations_List",
47+
"consumes": [],
48+
"produces": [
49+
"application/json"
50+
],
51+
"parameters": [
52+
{
53+
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter"
54+
}
55+
],
56+
"responses": {
57+
"200": {
58+
"description": "OK",
59+
"schema": {
60+
"$ref": "#/definitions/OperationsListResult"
61+
}
62+
},
63+
"default": {
64+
"description": "*** Error Responses: ***\n\n * 400 Bad Request.\n\n * 500 Internal Server Error."
65+
}
66+
},
67+
"x-ms-pageable": {
68+
"nextLinkName": "nextLink"
69+
},
70+
"x-ms-examples": {
71+
"Operations_List": {
72+
"$ref": "./examples/Operations_List.json"
73+
}
74+
}
75+
}
76+
},
77+
"/{resourceUri}/providers/Microsoft.Insights/generatelivetoken": {
78+
"post": {
79+
"tags": [
80+
"LiveToken"
81+
],
82+
"operationId": "LiveToken_Get",
83+
"description": "**Gets an access token for live metrics stream data.**",
84+
"parameters": [
85+
{
86+
"$ref": "#/parameters/ResourceUriParameter"
87+
},
88+
{
89+
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter"
90+
}
91+
],
92+
"responses": {
93+
"default": {
94+
"description": "Error response describing why the operation failed.",
95+
"schema": {
96+
"$ref": "../../preview/2020-03-01-preview/componentLinkedStorageAccounts_API.json#/definitions/ErrorResponseLinkedStorage"
97+
}
98+
},
99+
"200": {
100+
"description": "Successful response containing the live metrics stream token.",
101+
"schema": {
102+
"$ref": "#/definitions/LiveTokenResponse"
103+
},
104+
"examples": {
105+
"application/json": {
106+
"liveToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
107+
}
108+
}
109+
}
110+
},
111+
"x-ms-examples": {
112+
"Get live token for resource": {
113+
"$ref": "./examples/LiveTokenGet.json"
114+
}
115+
}
116+
}
117+
}
118+
},
119+
"definitions": {
120+
"LiveTokenResponse": {
121+
"type": "object",
122+
"properties": {
123+
"liveToken": {
124+
"type": "string",
125+
"description": "JWT token for accessing live metrics stream data.",
126+
"readOnly": true
127+
}
128+
},
129+
"description": "The response to a live token query."
130+
},
131+
"OperationsListResult": {
132+
"description": "Result of the List Operations operation",
133+
"type": "object",
134+
"properties": {
135+
"value": {
136+
"description": "A collection of operations",
137+
"type": "array",
138+
"items": {
139+
"$ref": "#/definitions/OperationLive"
140+
}
141+
},
142+
"nextLink": {
143+
"type": "string",
144+
"description": "URL to get the next set of operation list results if there are any."
145+
}
146+
}
147+
},
148+
"OperationLive": {
149+
"description": "Represents an operation returned by the GetOperations request",
150+
"type": "object",
151+
"properties": {
152+
"name": {
153+
"description": "Name of the operation",
154+
"type": "string"
155+
},
156+
"isDataAction": {
157+
"description": "Indicates whether the operation is a data action",
158+
"type": "boolean"
159+
},
160+
"display": {
161+
"$ref": "#/definitions/OperationInfo",
162+
"description": "Display name of the operation"
163+
},
164+
"origin": {
165+
"description": "Origin of the operation",
166+
"type": "string"
167+
},
168+
"properties": {
169+
"description": "Properties of the operation",
170+
"type": "object",
171+
"x-ms-client-flatten": true
172+
}
173+
}
174+
},
175+
"OperationInfo": {
176+
"description": "Information about an operation",
177+
"type": "object",
178+
"properties": {
179+
"provider": {
180+
"description": "Name of the provider",
181+
"type": "string"
182+
},
183+
"resource": {
184+
"description": "Name of the resource type",
185+
"type": "string"
186+
},
187+
"operation": {
188+
"description": "Name of the operation",
189+
"type": "string"
190+
},
191+
"description": {
192+
"description": "Description of the operation",
193+
"type": "string"
194+
}
195+
}
196+
}
197+
},
198+
"parameters": {
199+
"ResourceUriParameter": {
200+
"name": "resourceUri",
201+
"in": "path",
202+
"required": true,
203+
"type": "string",
204+
"description": "The identifier of the resource.",
205+
"x-ms-parameter-location": "method",
206+
"x-ms-skip-url-encoding": true
207+
}
208+
}
209+
}

specification/applicationinsights/resource-manager/readme.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ These are the global settings for the ApplicationInsights API.
2828
title: ApplicationInsightsManagementClient
2929
description: Composite Swagger for Application Insights Management Client
3030
openapi-type: arm
31-
tag: package-2020-11-only
31+
tag: package-2021-10
3232
```
3333
3434
### Suppression
@@ -222,6 +222,15 @@ directive:
222222

223223
```
224224
225+
226+
### Tag: package-2021-10
227+
228+
These settings apply only when `--tag=package-2021-10` is specified on the command line.
229+
230+
```yaml $(tag) == 'package-2021-10'
231+
input-file:
232+
- Microsoft.Insights/stable/2021-10-14/livetoken_API.json
233+
```
225234
### Tag: package-2021-03-only
226235

227236
These settings apply only when `--tag=package-2021-03-only` is specified on the command line.
@@ -237,7 +246,7 @@ input-file:
237246

238247
These settings apply only when `--tag=package-preview-2021-03-only` is specified on the command line.
239248

240-
```yaml $(tag) == 'package-preview-2021-03-only'
249+
``` yaml $(tag) == 'package-preview-2021-03-only'
241250
input-file:
242251
- Microsoft.Insights/preview/2021-03-03-preview/diagnosticServicesToken_API.json
243252
```
@@ -255,7 +264,7 @@ input-file:
255264

256265
These settings apply only when `--tag=package-2020-10-only` is specified on the command line.
257266

258-
```yaml $(tag) == 'package-2020-10-only'
267+
``` yaml $(tag) == 'package-2020-10-only'
259268
input-file:
260269
- Microsoft.Insights/stable/2020-10-20/workbookOperations_API.json
261270
- Microsoft.Insights/stable/2020-10-20/myworkbooks_API.json
@@ -266,7 +275,7 @@ input-file:
266275

267276
These settings apply only when `--tag=package-preview-2020-10-only` is specified on the command line.
268277

269-
```yaml $(tag) == 'package-preview-2020-10-only'
278+
``` yaml $(tag) == 'package-preview-2020-10-only'
270279
input-file:
271280
- Microsoft.Insights/preview/2020-10-05-preview/webTests_API.json
272281
```
@@ -522,5 +531,3 @@ These settings apply only when `--tag=schema-2018-06-17-preview` is specified on
522531
input-file:
523532
- Microsoft.Insights/preview/2018-06-17-preview/workbooks_API.json
524533
```
525-
526-

0 commit comments

Comments
 (0)