Skip to content

Commit

Permalink
[Hub Generated] Review request for Microsoft.Insights to add version …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
tokaplan authored Oct 22, 2021
1 parent 32652d3 commit 8179a9e
Show file tree
Hide file tree
Showing 4 changed files with 258 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"parameters": {
"resourceUri": "subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/FabrikamFiberApp/providers/microsoft.insights/components/CustomAvailabilityTest/providers/microsoft.insights/generatelivetoken",
"api-version": "2021-10-14"
},
"responses": {
"200": {
"body": {
"liveToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"parameters": {
"api-version": "2021-10-14"
},
"responses": {
"200": {
"body": {
"value": [
{
"name": "microsoft.insights/generatelivetoken",
"display": {
"provider": "Microsoft Container Instance",
"resource": "generatelivetoken",
"operation": "Gets an access token for live metrics stream data",
"description": "Gets an access token for live metrics stream data"
},
"origin": "User"
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
{
"swagger": "2.0",
"info": {
"title": "ApplicationInsightsManagementClient",
"x-ms-code-generation-settings": {
"name": "ApplicationInsightsManagementClient"
},
"version": "2021-10-14"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow.",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"paths": {
"/providers/Microsoft.Insights/operations": {
"get": {
"tags": [
"Operations"
],
"summary": "List available operations.",
"description": "List the available operations supported by the resource provider.",
"operationId": "Operations_List",
"consumes": [],
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/OperationsListResult"
}
},
"default": {
"description": "*** Error Responses: ***\n\n * 400 Bad Request.\n\n * 500 Internal Server Error."
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"Operations_List": {
"$ref": "./examples/Operations_List.json"
}
}
}
},
"/{resourceUri}/providers/Microsoft.Insights/generatelivetoken": {
"post": {
"tags": [
"LiveToken"
],
"operationId": "LiveToken_Get",
"description": "**Gets an access token for live metrics stream data.**",
"parameters": [
{
"$ref": "#/parameters/ResourceUriParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../preview/2020-03-01-preview/componentLinkedStorageAccounts_API.json#/definitions/ErrorResponseLinkedStorage"
}
},
"200": {
"description": "Successful response containing the live metrics stream token.",
"schema": {
"$ref": "#/definitions/LiveTokenResponse"
},
"examples": {
"application/json": {
"liveToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}
}
}
},
"x-ms-examples": {
"Get live token for resource": {
"$ref": "./examples/LiveTokenGet.json"
}
}
}
}
},
"definitions": {
"LiveTokenResponse": {
"type": "object",
"properties": {
"liveToken": {
"type": "string",
"description": "JWT token for accessing live metrics stream data.",
"readOnly": true
}
},
"description": "The response to a live token query."
},
"OperationsListResult": {
"description": "Result of the List Operations operation",
"type": "object",
"properties": {
"value": {
"description": "A collection of operations",
"type": "array",
"items": {
"$ref": "#/definitions/OperationLive"
}
},
"nextLink": {
"type": "string",
"description": "URL to get the next set of operation list results if there are any."
}
}
},
"OperationLive": {
"description": "Represents an operation returned by the GetOperations request",
"type": "object",
"properties": {
"name": {
"description": "Name of the operation",
"type": "string"
},
"isDataAction": {
"description": "Indicates whether the operation is a data action",
"type": "boolean"
},
"display": {
"$ref": "#/definitions/OperationInfo",
"description": "Display name of the operation"
},
"origin": {
"description": "Origin of the operation",
"type": "string"
},
"properties": {
"description": "Properties of the operation",
"type": "object",
"x-ms-client-flatten": true
}
}
},
"OperationInfo": {
"description": "Information about an operation",
"type": "object",
"properties": {
"provider": {
"description": "Name of the provider",
"type": "string"
},
"resource": {
"description": "Name of the resource type",
"type": "string"
},
"operation": {
"description": "Name of the operation",
"type": "string"
},
"description": {
"description": "Description of the operation",
"type": "string"
}
}
}
},
"parameters": {
"ResourceUriParameter": {
"name": "resourceUri",
"in": "path",
"required": true,
"type": "string",
"description": "The identifier of the resource.",
"x-ms-parameter-location": "method",
"x-ms-skip-url-encoding": true
}
}
}
19 changes: 13 additions & 6 deletions specification/applicationinsights/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ These are the global settings for the ApplicationInsights API.
title: ApplicationInsightsManagementClient
description: Composite Swagger for Application Insights Management Client
openapi-type: arm
tag: package-2020-11-only
tag: package-2021-10
```
### Suppression
Expand Down Expand Up @@ -222,6 +222,15 @@ directive:

```
### Tag: package-2021-10
These settings apply only when `--tag=package-2021-10` is specified on the command line.

```yaml $(tag) == 'package-2021-10'
input-file:
- Microsoft.Insights/stable/2021-10-14/livetoken_API.json
```
### Tag: package-2021-03-only

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

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

```yaml $(tag) == 'package-preview-2021-03-only'
``` yaml $(tag) == 'package-preview-2021-03-only'
input-file:
- Microsoft.Insights/preview/2021-03-03-preview/diagnosticServicesToken_API.json
```
Expand All @@ -255,7 +264,7 @@ input-file:

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

```yaml $(tag) == 'package-2020-10-only'
``` yaml $(tag) == 'package-2020-10-only'
input-file:
- Microsoft.Insights/stable/2020-10-20/workbookOperations_API.json
- Microsoft.Insights/stable/2020-10-20/myworkbooks_API.json
Expand All @@ -266,7 +275,7 @@ input-file:

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

```yaml $(tag) == 'package-preview-2020-10-only'
``` yaml $(tag) == 'package-preview-2020-10-only'
input-file:
- Microsoft.Insights/preview/2020-10-05-preview/webTests_API.json
```
Expand Down Expand Up @@ -522,5 +531,3 @@ These settings apply only when `--tag=schema-2018-06-17-preview` is specified on
input-file:
- Microsoft.Insights/preview/2018-06-17-preview/workbooks_API.json
```


0 comments on commit 8179a9e

Please sign in to comment.