-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding API to support generating access token for ApplicationInsights…
… Profiler (#11393) * Adds base for updating Microsoft.Insights from version preview/2020-10-05-preview to version 2020-10-26-preview * Updates readme * Updates API version in new specs and examples * Update readme to pointing to profilerToken_API.json * Update operations list * Add profiler token getter * Wire up the defintions * Fix error: additonal property of liveToken * Append post action * Update api-version for example * Fix some small issues * Update readme for the resolving autorest check issue * From profilertoken to profilerToken * Ran prettier * Appending back missing readme for 2020-10 tag * Fix some mistakes * Use common error response * Tag secret with x-ms-secret * Remove list operations * Clean up packages * Making 2 post operations for token * Remove unused operations_list.json example * Align with official master * Resolve conflicts * Add x-ms-secret for the token * Update error response schema ref * Update operation ids * Remove unused error response
- Loading branch information
1 parent
5328f64
commit 80db0e5
Showing
4 changed files
with
183 additions
and
1 deletion.
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 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": { | ||
"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 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 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 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