Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
}
Copy link
Contributor

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?

Copy link
Contributor Author

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)

],
"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"
}
}
}
3 changes: 2 additions & 1 deletion arm-insights/compositeInsightsManagementClient.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
"description": "Composite Swagger for Insights Management Client"
},
"documents": [
"./2014-04-01/swagger/insightsManagementClient_Components.json",
"./2015-04-01/swagger/insightsManagementClient_Autoscale.json",
"./2015-07-01/swagger/insightsManagementClient_DiagnosticsSettings.json",
"./2016-03-01/swagger/insightsManagementClient_AlertRules.json",
"./2016-03-01/swagger/insightsManagementClient_AlertRulesIncidents.json",
"./2016-03-01/swagger/insightsManagementClient_LogProfiles.json"
]
}
}