Skip to content

Commit

Permalink
Add version 2018-11-27-preview to Microsoft.Insights (#4987)
Browse files Browse the repository at this point in the history
* Adds base for updating Microsoft.Insights from version preview/2018-06-01-preview to version 2018-11-27-preview

* Updates readme

* Updates API version in new specs and examples

* Add initial swagger

Removed some of the autogenerated files and added the swagger file and
examples for the new api.

* Remove extra / from examples

* Fix swagger file

* Improve docs

* Update resource model

Made it the same as the rest of the specs

* Fix the resource data model: no location and tags

* Fix readme

* Generate the latest package

The latest package including support for the new API will be generated.
This required several changes:
- The defintion of Resource used by the other specs was incompatible.
This was because the other resources were tracked and the new ones is
proxy. Defined a new ProxyResource type.
- The ErrorResponse definition was incompatible with the rest of the
specs in the folder. This is actually a bug in the exesiting specs. They
do not respect the contract of  { "error": {"code": "", "message": ""}},
i.e., they lack the top-level error element. To work around this issue,
defined a new response type, ResponseWithError, which is compliant
with the latest ARM requirements.

* Update Python version
  • Loading branch information
aydany authored and sarangan12 committed Jan 14, 2019
1 parent 31a6f06 commit b980271
Show file tree
Hide file tree
Showing 8 changed files with 450 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parameters": {
"resourceUri": "subscriptions/3d51de47-8d1c-4d24-b42f-bcae075dfa87/resourceGroups/resource-group-with-vms",
"api-version": "2018-11-27-preview"
},
"responses": {
"200": {
"headers": {},
"body": {
"properties": {
"resourceId": "/subscriptions/3d51de47-8d1c-4d24-b42f-bcae075dfa87/resourceGroups/resource-group-with-vms",
"onboardingStatus": "onboarded",
"dataStatus": "present",
"data": [
{
"workspace": {
"id": "/subscriptions/3d51de47-8d1c-4d24-b42f-bcae075dfa87/resourcegroups/monitoring/providers/microsoft.operationalinsights/workspaces/vm-monitoring",
"location": "eastus",
"properties": {
"customerId": "c7f8f44d-d8ee-4b79-9d9a-4d8a1f2a112a"
}
}
}
]
},
"id": "/subscriptions/3d51de47-8d1c-4d24-b42f-bcae075dfa87/resourceGroups/resource-group-with-vms/providers/Microsoft.Insights/vmInsightsOnboardingStatuses/default",
"type": "Microsoft.Insights/vmInsightsOnboardingStatuses",
"name": "default"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parameters": {
"resourceUri": "subscriptions/3d51de47-8d1c-4d24-b42f-bcae075dfa87/resourceGroups/vm-resource-group/providers/Microsoft.Compute/virtualMachines/ubuntu-vm",
"api-version": "2018-11-27-preview"
},
"responses": {
"200": {
"headers": {},
"body": {
"properties": {
"resourceId": "/subscriptions/3d51de47-8d1c-4d24-b42f-bcae075dfa87/resourceGroups/vm-resource-group/providers/Microsoft.Compute/virtualMachines/ubuntu-vm",
"onboardingStatus": "onboarded",
"dataStatus": "present",
"data": [
{
"workspace": {
"id": "/subscriptions/3d51de47-8d1c-4d24-b42f-bcae075dfa87/resourcegroups/monitoring/providers/microsoft.operationalinsights/workspaces/vm-monitoring",
"location": "eastus",
"properties": {
"customerId": "c7f8f44d-d8ee-4b79-9d9a-4d8a1f2a112a"
}
}
}
]
},
"id": "/subscriptions/3d51de47-8d1c-4d24-b42f-bcae075dfa87/resourceGroups/vm-resource-group/providers/Microsoft.Compute/virtualMachines/ubuntu-vm/providers/Microsoft.Insights/vmInsightsOnboardingStatuses/default",
"type": "Microsoft.Insights/vmInsightsOnboardingStatuses",
"name": "default"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"parameters": {
"resourceUri": "subscriptions/3d51de47-8d1c-4d24-b42f-bcae075dfa87/resourceGroups/vm-resource-group/providers/Microsoft.Compute/virtualMachines/ubuntu-vm",
"api-version": "2018-11-27-preview"
},
"responses": {
"200": {
"headers": {},
"body": {
"properties": {
"resourceId": "/subscriptions/3d51de47-8d1c-4d24-b42f-bcae075dfa87/resourceGroups/vm-resource-group/providers/Microsoft.Compute/virtualMachines/ubuntu-vm",
"onboardingStatus": "unknown",
"dataStatus": "notPresent",
"data": []
},
"id": "/subscriptions/3d51de47-8d1c-4d24-b42f-bcae075dfa87/resourceGroups/vm-resource-group/providers/Microsoft.Compute/virtualMachines/ubuntu-vm/providers/Microsoft.Insights/vmInsightsOnboardingStatuses/default",
"type": "Microsoft.Insights/vmInsightsOnboardingStatuses",
"name": "default"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"parameters": {
"resourceUri": "subscriptions/3d51de47-8d1c-4d24-b42f-bcae075dfa87",
"api-version": "2018-11-27-preview"
},
"responses": {
"200": {
"properties": {
"resourceId": "/subscriptions/3d51de47-8d1c-4d24-b42f-bcae075dfa87",
"onboardingStatus": "onboarded",
"dataStatus": "present",
"data": [
{
"workspace": {
"id": "/subscriptions/3d51de47-8d1c-4d24-b42f-bcae075dfa87/resourcegroups/monitoring/providers/microsoft.operationalinsights/workspaces/vm-monitoring-secondary",
"location": "eastus",
"properties": {
"customerId": "f096d163-206e-4abf-9db3-2c62af003d68"
}
}
},
{
"workspace": {
"id": "/subscriptions/3d51de47-8d1c-4d24-b42f-bcae075dfa87/resourcegroups/monitoring/providers/microsoft.operationalinsights/workspaces/vm-monitoring",
"location": "eastus",
"properties": {
"customerId": "c7f8f44d-d8ee-4b79-9d9a-4d8a1f2a112a"
}
}
}
]
},
"id": "/subscriptions/3d51de47-8d1c-4d24-b42f-bcae075dfa87/providers/Microsoft.Insights/vmInsightsOnboardingStatuses/default",
"type": "Microsoft.Insights/vmInsightsOnboardingStatuses",
"name": "default"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parameters": {
"resourceUri": "subscriptions/3d51de47-8d1c-4d24-b42f-bcae075dfa87/resourceGroups/my-service-cluster/providers/Microsoft.Compute/virtualMachineScaleSets/scale-set-01",
"api-version": "2018-11-27-preview"
},
"responses": {
"200": {
"headers": {},
"body": {
"properties": {
"resourceId": "/subscriptions/3d51de47-8d1c-4d24-b42f-bcae075dfa87/resourceGroups/my-service-cluster/providers/Microsoft.Compute/virtualMachineScaleSets/scale-set-01",
"onboardingStatus": "onboarded",
"dataStatus": "present",
"data": [
{
"workspace": {
"id": "/subscriptions/3d51de47-8d1c-4d24-b42f-bcae075dfa87/resourcegroups/monitoring/providers/microsoft.operationalinsights/workspaces/vm-monitoring",
"location": "eastus",
"properties": {
"customerId": "c7f8f44d-d8ee-4b79-9d9a-4d8a1f2a112a"
}
}
}
]
},
"id": "/subscriptions/3d51de47-8d1c-4d24-b42f-bcae075dfa87/resourceGroups/my-service-cluster/providers/Microsoft.Compute/virtualMachineScaleSets/scale-set-01/providers/Microsoft.Insights/vmInsightsOnboardingStatuses/default",
"type": "Microsoft.Insights/vmInsightsOnboardingStatuses",
"name": "default"
}
}
}
}
Loading

0 comments on commit b980271

Please sign in to comment.