-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Application Insights: CRUD for a new Instance #757
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
Closed
Closed
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
583d6dd
First-stab at the Application Insights Create/Update/Get/Delete schema
tombuildsstuff bd5b65f
Added msising values for some fields
tombuildsstuff c5af5ab
JSON only / PUT for Create&Update
tombuildsstuff 4ede5a5
Updating the linting
tombuildsstuff 421093f
Renaming the match the Composite spec
tombuildsstuff 6dca3f5
Fixing the build, probably ¯\_(ツ)_/¯
tombuildsstuff f98c4ac
Renaming the responses so as not to clash
tombuildsstuff 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
343 changes: 343 additions & 0 deletions
343
arm-insights/2014-04-01/swagger/insightsManagementClient_Components.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,343 @@ | ||
| { | ||
| "swagger": "2.0", | ||
| "info": { | ||
| "title": "InsightsClient", | ||
| "description": "Azure Application Insights client", | ||
| "version": "2014-04-01" | ||
| }, | ||
| "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": { | ||
| "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{name}": { | ||
| "delete": { | ||
| "description": "Deletes an Application Insights instance", | ||
| "operationId": "Insights_Delete", | ||
| "parameters": [ | ||
| { | ||
| "$ref": "#/parameters/ResourceGroupNameParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/ApiVersionParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/SubscriptionIdParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/NameParameter" | ||
| } | ||
| ], | ||
| "responses": { | ||
| "200": { | ||
| "description": "Successful request when deleting an Application Insights instance" | ||
| }, | ||
| "404": { | ||
| "description": "Unsuccessful request when the specified Application Insights instance doesn't exist" | ||
| } | ||
| } | ||
| }, | ||
| "get": { | ||
| "description": "Returns an Application Insights instance", | ||
| "operationId": "Insights_Get", | ||
| "parameters": [ | ||
| { | ||
| "$ref": "#/parameters/ResourceGroupNameParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/ApiVersionParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/SubscriptionIdParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/NameParameter" | ||
| } | ||
| ], | ||
| "responses": { | ||
| "200": { | ||
| "description": "Successful request when retrieving an Application Insights instance", | ||
| "schema": { | ||
| "$ref": "#/definitions/ApplicationInsightsResource" | ||
| }, | ||
| "examples": { | ||
| "application/json": { | ||
| "value": [ | ||
| { | ||
| "id": "/subscriptions/d386467e-33de-44ff-b324-641549c30383/resourceGroups/sots-rg/providers/microsoft.insights/components/tha-demo2", | ||
| "name": "tha-demo2", | ||
| "type": "Microsoft.Insights/components", | ||
| "location": "West Europe", | ||
| "tags": {}, | ||
| "kind": "web", | ||
| "properties": { | ||
| "Ver": "v2", | ||
| "ApplicationId": "tharvey-demo2", | ||
| "AppId": "00000000-0000-0000-0000-000000000000", | ||
| "Application_Type": "web", | ||
| "Flow_Type": null, | ||
| "Request_Source": null, | ||
| "InstrumentationKey": "00000000-0000-0000-0000-000000000000", | ||
| "Name": "tha-demo2", | ||
| "CreationDate": "2016-11-22T20:42:42.299Z", | ||
| "PackageId": null, | ||
| "TenantId": "00000000-0000-0000-0000-000000000000", | ||
| "HockeyAppId": null, | ||
| "HockeyAppToken": null, | ||
| "provisioningState": "Succeeded" | ||
| } | ||
| } | ||
| ], | ||
| "nextLink": "https://management.azure.com/########-####-####-####-############$skiptoken=######" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "x-ms-pageable": { | ||
| "nextLinkName": "nextLink" | ||
| }, | ||
| "x-ms-odata": "#/definitions/ApplicationInsightsResource" | ||
| }, | ||
| "put": { | ||
| "description": "Creates or Updates an Application Insights instance", | ||
| "operationId": "Insights_CreateOrUpdate", | ||
| "parameters": [ | ||
| { | ||
| "$ref": "#/parameters/ResourceGroupNameParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/ApiVersionParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/SubscriptionIdParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/NameParameter" | ||
| } | ||
| ], | ||
| "responses": { | ||
| "200": { | ||
| "description": "Successful request when Creating or Updating an Application Insights instance", | ||
| "schema": { | ||
| "$ref": "#/definitions/ApplicationInsightsResource" | ||
| }, | ||
| "examples": { | ||
| "application/json": { | ||
| "value": [ | ||
| { | ||
| "id": "/subscriptions/d386467e-33de-44ff-b324-641549c30383/resourceGroups/sots-rg/providers/microsoft.insights/components/tha-demo2", | ||
| "name": "tha-demo2", | ||
| "type": "Microsoft.Insights/components", | ||
| "location": "West Europe", | ||
| "tags": {}, | ||
| "kind": "web", | ||
| "properties": { | ||
| "Ver": "v2", | ||
| "ApplicationId": "tharvey-demo2", | ||
| "AppId": "00000000-0000-0000-0000-000000000000", | ||
| "Application_Type": "web", | ||
| "Flow_Type": null, | ||
| "Request_Source": null, | ||
| "InstrumentationKey": "00000000-0000-0000-0000-000000000000", | ||
| "Name": "tha-demo2", | ||
| "CreationDate": "2016-11-22T20:42:42.299Z", | ||
| "PackageId": null, | ||
| "TenantId": "00000000-0000-0000-0000-000000000000", | ||
| "HockeyAppId": null, | ||
| "HockeyAppToken": null, | ||
| "provisioningState": "Succeeded" | ||
| } | ||
| } | ||
| ], | ||
| "nextLink": "https://management.azure.com/########-####-####-####-############$skiptoken=######" | ||
| } | ||
| } | ||
| }, | ||
| "404": { | ||
| "description": "Failed request when the specified Application Insights instance couldn't be found" | ||
| } | ||
| }, | ||
| "x-ms-pageable": { | ||
| "nextLinkName": "nextLink" | ||
| }, | ||
| "x-ms-odata": "#/definitions/ApplicationInsightsResource" | ||
| } | ||
| } | ||
| }, | ||
| "definitions": { | ||
| "ApplicationInsightsResource": { | ||
| "properties": { | ||
| "id": { | ||
| "type": "string", | ||
| "readOnly": true, | ||
| "description": "Azure resource Id" | ||
| }, | ||
| "name": { | ||
| "type": "string", | ||
| "description": "Azure resource name" | ||
| }, | ||
| "type": { | ||
| "type": "string", | ||
| "readOnly": true, | ||
| "description": "Azure resource type" | ||
| }, | ||
| "location": { | ||
| "type": "string", | ||
| "description": "Resource location" | ||
| }, | ||
| "kind": { | ||
| "type": "string", | ||
| "description": "Application Insights Kind" | ||
| }, | ||
| "properties": { | ||
| "$ref": "#/definitions/ApplicationInsightsProperties", | ||
| "description": "the parameters for the scaling action." | ||
| }, | ||
| "tags": { | ||
| "additionalProperties": { | ||
| "type": "string" | ||
| }, | ||
| "description": "Resource tags" | ||
| } | ||
| }, | ||
| "required": [ | ||
| "location", | ||
| "kind" | ||
| ], | ||
| "x-ms-azure-resource": true, | ||
| "description": "An azure resource object" | ||
| }, | ||
| "ApplicationInsightsProperties": { | ||
| "properties": { | ||
| "ver": { | ||
| "type": "string", | ||
| "readOnly": true, | ||
| "description": "Application Insights Version" | ||
| }, | ||
| "applicationId": { | ||
| "type": "string", | ||
| "description": "An internal reference for your application" | ||
| }, | ||
| "appId": { | ||
| "type": "string", | ||
| "readOnly": true, | ||
| "description": "Application Insights Unique ID for your Application" | ||
| }, | ||
| "application_Type": { | ||
| "type": "string", | ||
| "description": "Application Type", | ||
| "enum": [ | ||
| "Web", | ||
| "Other" | ||
| ], | ||
| "x-ms-enum": { | ||
| "name": "ApplicationType", | ||
| "modelAsString": false | ||
| } | ||
| }, | ||
| "flow_Type": { | ||
| "type": "string", | ||
| "description": "Flow Type" | ||
| }, | ||
| "request_Source": { | ||
| "type": "string", | ||
| "description": "Request Source" | ||
| }, | ||
| "instrumentationKey": { | ||
| "type": "string", | ||
| "readOnly": true, | ||
| "description": "Application Insights Instrumentation Key" | ||
| }, | ||
| "name": { | ||
| "type": "string", | ||
| "description": "Name of the Application Insights instance" | ||
| }, | ||
| "creationDate": { | ||
| "type": "string", | ||
| "readOnly": true, | ||
| "description": "Creation Date for the Resource", | ||
| "format": "date-time" | ||
| }, | ||
| "packageId": { | ||
| "type": "string", | ||
| "readOnly": true, | ||
| "description": "HockeyApp Package ID?" | ||
| }, | ||
| "tenantId": { | ||
| "type": "string", | ||
| "readOnly": true, | ||
| "description": "Azure Tenant ID" | ||
| }, | ||
| "hockeyAppId": { | ||
| "type": "string", | ||
| "description": "HockeyApp Application ID" | ||
| }, | ||
| "hockeyAppToken": { | ||
| "type": "string", | ||
| "description": "HockeyApp Token" | ||
| } | ||
| }, | ||
| "required": [ | ||
| "applicationId", | ||
| "application_Type" | ||
| ], | ||
| "x-ms-azure-resource": true, | ||
| "description": "An azure resource object" | ||
| } | ||
| }, | ||
| "parameters": { | ||
| "SubscriptionIdParameter": { | ||
| "name": "subscriptionId", | ||
| "in": "path", | ||
| "required": true, | ||
| "type": "string", | ||
| "description": "The Azure subscription Id." | ||
| }, | ||
| "ApiVersionParameter": { | ||
| "name": "api-version", | ||
| "in": "query", | ||
| "required": true, | ||
| "type": "string", | ||
| "description": "Client Api Version." | ||
| }, | ||
| "ResourceGroupNameParameter": { | ||
| "name": "resourceGroupName", | ||
| "in": "path", | ||
| "required": true, | ||
| "type": "string", | ||
| "description": "The name of the resource group.", | ||
| "x-ms-parameter-location": "method" | ||
| }, | ||
| "NameParameter": { | ||
| "name": "name", | ||
| "in": "path", | ||
| "required": true, | ||
| "type": "string", | ||
| "description": "The name of the Application Insights instance" | ||
| } | ||
| } | ||
| } | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is surprising to me that the request does not have a body parameter. If you were to update some properties of the ApplicationInsights instance then what would you update and how would you update?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps I'm mis-understanding / you've posted this comment in the wrong place in the file - but why would the DELETE HTTP Call need a body to update?
With regards for Updating Redis instances - we're doing this via the CreateOrUpdate method - see here for the implementation within Terraform - this is hooked up and working (generated from before it was turned into a composite swagger)