-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Adding API to support generating access token for ApplicationInsights Profiler #11393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
kairu-ms
merged 28 commits into
Azure:master
from
xiaomi7732:dev-applicationinsights-Microsoft.Insights-2020-10-26-preview
Nov 12, 2020
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
1ef788f
Adds base for updating Microsoft.Insights from version preview/2020-1…
xiaomi7732 59a72dc
Updates readme
xiaomi7732 a87f41b
Updates API version in new specs and examples
xiaomi7732 a2e265d
Update readme to pointing to profilerToken_API.json
xiaomi7732 46ff319
Update operations list
xiaomi7732 9728c35
Add profiler token getter
xiaomi7732 80581bb
Wire up the defintions
xiaomi7732 36333f7
Fix error: additonal property of liveToken
xiaomi7732 2b71dca
Append post action
xiaomi7732 7d52827
Update api-version for example
xiaomi7732 e54255e
Fix some small issues
xiaomi7732 2b26c84
Update readme for the resolving autorest check issue
xiaomi7732 37c1aeb
From profilertoken to profilerToken
xiaomi7732 78aa0c5
Ran prettier
xiaomi7732 0497a60
Appending back missing readme for 2020-10 tag
xiaomi7732 025ac73
Fix some mistakes
xiaomi7732 fc1cf17
Use common error response
xiaomi7732 f33bbfe
Tag secret with x-ms-secret
xiaomi7732 2c5d0e7
Remove list operations
xiaomi7732 490b8b8
Clean up packages
xiaomi7732 41024e9
Making 2 post operations for token
xiaomi7732 55daced
Remove unused operations_list.json example
xiaomi7732 a69e830
Align with official master
xiaomi7732 89c9927
Resolve conflicts
xiaomi7732 4ae6576
Add x-ms-secret for the token
xiaomi7732 f1169d5
Update error response schema ref
xiaomi7732 26ea7f5
Update operation ids
xiaomi7732 614c135
Remove unused error response
xiaomi7732 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
144 changes: 144 additions & 0 deletions
144
...ce-manager/Microsoft.Insights/preview/2020-10-26-preview/diagnosticServicesToken_API.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,144 @@ | ||
| { | ||
| "swagger": "2.0", | ||
| "info": { | ||
| "title": "ApplicationInsightsManagementClient", | ||
| "description": "Azure Application Insights client for application insights diagnostic services token.", | ||
| "version": "2020-10-26-preview" | ||
| }, | ||
| "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": { | ||
| "/{resourceUri}/providers/Microsoft.Insights/generateDiagnosticServiceReadOnlyToken": { | ||
| "post": { | ||
| "tags": [ | ||
| "generateDiagnosticServiceReadOnlyToken" | ||
| ], | ||
| "operationId": "GenerateDiagnosticServiceReadOnlyToken", | ||
| "description": "**Gets an read-only access token for application insights diagnostic service 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": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" | ||
| } | ||
| }, | ||
| "200": { | ||
| "description": "Successful response containing the application insights diagnostic services token.", | ||
| "schema": { | ||
| "$ref": "#/definitions/DiagnosticServicesTokenResponse" | ||
| }, | ||
| "examples": { | ||
| "application/json": { | ||
| "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "x-ms-examples": { | ||
| "Get diagnostic services token for resource": { | ||
| "$ref": "./examples/DiagnosticServicesTokenPost.json" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "/{resourceUri}/providers/Microsoft.Insights/generateDiagnosticServiceReadWriteToken": { | ||
| "post": { | ||
| "tags": [ | ||
| "generateDiagnosticServiceReadWriteToken" | ||
| ], | ||
| "operationId": "GenerateDiagnosticServiceReadWriteToken", | ||
| "description": "**Gets an read-write access token for application insights diagnostic service 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": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" | ||
| } | ||
| }, | ||
| "200": { | ||
| "description": "Successful response containing the application insights diagnostic services token.", | ||
| "schema": { | ||
| "$ref": "#/definitions/DiagnosticServicesTokenResponse" | ||
| }, | ||
| "examples": { | ||
| "application/json": { | ||
| "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "x-ms-examples": { | ||
| "Get diagnostic services token for resource": { | ||
| "$ref": "./examples/DiagnosticServicesTokenPost.json" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "definitions": { | ||
| "DiagnosticServicesTokenResponse": { | ||
| "type": "object", | ||
| "properties": { | ||
| "token": { | ||
xiaomi7732 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "x-ms-secret": true, | ||
| "type": "string", | ||
| "description": "JWT token for accessing application insights diagnostic service data." | ||
| } | ||
| }, | ||
| "description": "The response to a diagnostic services token query." | ||
| } | ||
| }, | ||
| "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 | ||
| } | ||
| } | ||
| } | ||
13 changes: 13 additions & 0 deletions
13
...r/Microsoft.Insights/preview/2020-10-26-preview/examples/DiagnosticServicesTokenPost.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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/diagnosticServicesToken", | ||
| "api-version": "2020-10-26-preview" | ||
| }, | ||
| "responses": { | ||
| "200": { | ||
| "body": { | ||
| "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" | ||
| } | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.