diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-10-14/examples/LiveTokenGet.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-10-14/examples/LiveTokenGet.json new file mode 100644 index 000000000000..757eac4dfcf0 --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-10-14/examples/LiveTokenGet.json @@ -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" + } + } + } +} diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-10-14/examples/Operations_List.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-10-14/examples/Operations_List.json new file mode 100644 index 000000000000..a88a7c1454a9 --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-10-14/examples/Operations_List.json @@ -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" + } + ] + } + } + } +} diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-10-14/livetoken_API.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-10-14/livetoken_API.json new file mode 100644 index 000000000000..6b267321a6d0 --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-10-14/livetoken_API.json @@ -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 + } + } +} diff --git a/specification/applicationinsights/resource-manager/readme.md b/specification/applicationinsights/resource-manager/readme.md index ed7bef93c90c..b6b2116ca14f 100644 --- a/specification/applicationinsights/resource-manager/readme.md +++ b/specification/applicationinsights/resource-manager/readme.md @@ -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 @@ -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. @@ -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 ``` @@ -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 @@ -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 ``` @@ -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 ``` - -