diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2018-11-27-preview/examples/getOnboardingStatusResourceGroup.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2018-11-27-preview/examples/getOnboardingStatusResourceGroup.json new file mode 100644 index 000000000000..3500766bd62a --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2018-11-27-preview/examples/getOnboardingStatusResourceGroup.json @@ -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" + } + } + } +} \ No newline at end of file diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2018-11-27-preview/examples/getOnboardingStatusSingleVM.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2018-11-27-preview/examples/getOnboardingStatusSingleVM.json new file mode 100644 index 000000000000..8fb2b0190191 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2018-11-27-preview/examples/getOnboardingStatusSingleVM.json @@ -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" + } + } + } +} \ No newline at end of file diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2018-11-27-preview/examples/getOnboardingStatusSingleVMUnknown.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2018-11-27-preview/examples/getOnboardingStatusSingleVMUnknown.json new file mode 100644 index 000000000000..41d1f25fdf8d --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2018-11-27-preview/examples/getOnboardingStatusSingleVMUnknown.json @@ -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" + } + } + } +} \ No newline at end of file diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2018-11-27-preview/examples/getOnboardingStatusSubscription.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2018-11-27-preview/examples/getOnboardingStatusSubscription.json new file mode 100644 index 000000000000..57eb902d9b23 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2018-11-27-preview/examples/getOnboardingStatusSubscription.json @@ -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" + } + } +} \ No newline at end of file diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2018-11-27-preview/examples/getOnboardingStatusVMScaleSet.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2018-11-27-preview/examples/getOnboardingStatusVMScaleSet.json new file mode 100644 index 000000000000..be3a9a8d3a61 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2018-11-27-preview/examples/getOnboardingStatusVMScaleSet.json @@ -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" + } + } + } +} \ No newline at end of file diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2018-11-27-preview/vmInsightsOnboarding_API.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2018-11-27-preview/vmInsightsOnboarding_API.json new file mode 100644 index 000000000000..b6385a6437bd --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2018-11-27-preview/vmInsightsOnboarding_API.json @@ -0,0 +1,260 @@ +{ + "swagger": "2.0", + "info": { + "title": "VM Insights Onboarding API", + "description": "API to manage VM Insights Onboarding", + "x-ms-code-generation-settings": { + "name": "MonitorManagementClient" + }, + "version": "2018-11-27-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/vmInsightsOnboardingStatuses/default": { + "get": { + "tags": [ + "VM Insights Onboarding" + ], + "operationId": "VMInsights_GetOnboardingStatus", + "description": "Retrieves the VM Insights onboarding status for the specified resource or resource scope.", + "x-ms-examples": { + "Get status for a VM that has not yet reported data": { + "$ref": "./examples/getOnboardingStatusSingleVMUnknown.json" + }, + "Get status for a VM that is actively reporting data": { + "$ref": "./examples/getOnboardingStatusSingleVM.json" + }, + "Get status for a VM scale set that is actively reporting data": { + "$ref": "./examples/getOnboardingStatusVMScaleSet.json" + }, + "Get status for a resource group that has at least one VM that is actively reporting data": { + "$ref": "./examples/getOnboardingStatusResourceGroup.json" + }, + "Get status for a subscription that has at least one VM that is actively reporting data": { + "$ref": "./examples/getOnboardingStatusSubscription.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "resourceUri", + "in": "path", + "required": true, + "type": "string", + "description": "The fully qualified Azure Resource manager identifier of the resource, or scope, whose status to retrieve.", + "x-ms-skip-url-encoding": true + } + ], + "responses": { + "200": { + "description": "The operation completed successfully.", + "schema": { + "$ref": "#/definitions/VMInsightsOnboardingStatus" + } + }, + "default": { + "description": "An error occurred while processing the request. See the error.code parameter to identify the specific error.", + "schema": { + "$ref": "#/definitions/ResponseWithError" + } + } + } + } + } + }, + "definitions": { + "ProxyResource": { + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "Azure resource Id" + }, + "name": { + "type": "string", + "readOnly": true, + "description": "Azure resource name" + }, + "type": { + "type": "string", + "readOnly": true, + "description": "Azure resource type" + } + }, + "x-ms-azure-resource": true, + "description": "An azure resource object" + }, + "ResponseWithError": { + "type": "object", + "description": "An error response from the API.", + "properties": { + "error": { + "$ref": "#/definitions/Error", + "description": "Error information." + } + }, + "required": [ + "error" + ] + }, + "Error": { + "type": "object", + "description": "Error details.", + "properties": { + "code": { + "type": "string", + "description": "Error code identifying the specific error." + }, + "message": { + "type": "string", + "description": "Error message in the caller's locale." + } + }, + "required": [ + "code" + ] + }, + "WorkspaceInfo": { + "type": "object", + "description": "Information about a Log Analytics Workspace.", + "properties": { + "id": { + "type": "string", + "description": "Azure Resource Manager identifier of the Log Analytics Workspace." + }, + "location": { + "type": "string", + "description": "Location of the Log Analytics workspace." + }, + "properties": { + "x-ms-client-flatten": true, + "type": "object", + "description": "Resource properties.", + "properties": { + "customerId": { + "type": "string", + "description": "Log Analytics workspace identifier." + } + }, + "required": [ + "customerId" + ] + } + }, + "required": [ + "id", + "location", + "properties" + ] + }, + "DataContainer": { + "type": "object", + "description": "Information about a container with data for a given resource.", + "properties": { + "workspace": { + "$ref": "#/definitions/WorkspaceInfo", + "description": "Log Analytics workspace information." + } + }, + "required": [ + "workspace" + ] + }, + "VMInsightsOnboardingStatus": { + "description": "VM Insights onboarding status for a resource.", + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "type": "object", + "description": "Resource properties.", + "properties": { + "resourceId": { + "type": "string", + "description": "Azure Resource Manager identifier of the resource whose onboarding status is being represented." + }, + "onboardingStatus": { + "type": "string", + "enum": [ + "onboarded", + "notOnboarded", + "unknown" + ], + "x-ms-enum": { + "name": "OnboardingStatus", + "modelAsString": true + }, + "description": "The onboarding status for the resource. Note that, a higher level scope, e.g., resource group or subscription, is considered onboarded if at least one resource under it is onboarded." + }, + "dataStatus": { + "type": "string", + "enum": [ + "present", + "notPresent" + ], + "x-ms-enum": { + "name": "DataStatus", + "modelAsString": true + }, + "description": "The status of VM Insights data from the resource. When reported as `present` the data array will contain information about the data containers to which data for the specified resource is being routed." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/DataContainer" + }, + "description": "Containers that currently store VM Insights data for the specified resource." + } + }, + "required": [ + "resourceId", + "onboardingStatus", + "dataStatus" + ] + } + } + } + }, + "parameters": { + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "API version." + } + } + } \ No newline at end of file diff --git a/specification/monitor/resource-manager/readme.md b/specification/monitor/resource-manager/readme.md index 99c43d876c8e..6fe368f32359 100644 --- a/specification/monitor/resource-manager/readme.md +++ b/specification/monitor/resource-manager/readme.md @@ -4,10 +4,10 @@ This is the AutoRest configuration file for MonitorClient. - - --- + ## Getting Started + To build the SDK for MonitorClient, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run: > `autorest` @@ -15,23 +15,50 @@ To build the SDK for MonitorClient, simply [Install AutoRest](https://aka.ms/aut To see additional help and options, run: > `autorest --help` + --- ## Configuration - - ### Basic Information + These are the global settings for the MonitorClient API. ``` yaml title: MonitorClient description: Monitor Management Client openapi-type: arm +tag: package-2018-11-preview +``` -tag: package-2018-09 +### Tag: package-2018-11-preview +These settings apply only when `--tag=package-2018-11-preview` is specified on the command line. + +```yaml $(tag) == 'package-2018-11-preview' +input-file: +- Microsoft.Insights/stable/2015-04-01/autoscale_API.json +- Microsoft.Insights/stable/2015-04-01/operations_API.json +- Microsoft.Insights/stable/2016-03-01/alertRulesIncidents_API.json +- Microsoft.Insights/stable/2016-03-01/alertRules_API.json +- Microsoft.Insights/stable/2016-03-01/logProfiles_API.json +- Microsoft.Insights/preview/2017-05-01-preview/diagnosticsSettings_API.json +- Microsoft.Insights/preview/2017-05-01-preview/diagnosticsSettingsCategories_API.json +- Microsoft.Insights/stable/2018-09-01/actionGroups_API.json +- Microsoft.Insights/stable/2017-04-01/activityLogAlerts_API.json +- Microsoft.Insights/stable/2015-04-01/activityLogs_API.json +- Microsoft.Insights/stable/2015-04-01/eventCategories_API.json +- Microsoft.Insights/stable/2015-04-01/tenantActivityLogs_API.json +- Microsoft.Insights/stable/2018-01-01/metricDefinitions_API.json +- Microsoft.Insights/stable/2018-01-01/metrics_API.json +- Microsoft.Insights/preview/2017-11-01-preview/baseline_API.json +- Microsoft.Insights/preview/2017-11-01-preview/calculateBaseline_API.json +- Microsoft.Insights/stable/2018-03-01/metricAlert_API.json +- Microsoft.Insights/stable/2018-04-16/scheduledQueryRule_API.json +- Microsoft.Insights/preview/2017-12-01-preview/metricNamespaces_API.json +- Microsoft.Insights/preview/2018-11-27-preview/vmInsightsOnboarding_API.json ``` + ### Tag: package-2018-09 These settings apply only when `--tag=package-2018-09` is specified on the command line. @@ -85,7 +112,6 @@ input-file: - Microsoft.Insights/stable/2018-04-16/scheduledQueryRule_API.json ``` - ### Tag: package-2018-02-preview These settings apply only when `--tag=package-2018-02-preview` is specified on the command line. @@ -110,7 +136,6 @@ input-file: - Microsoft.Insights/preview/2017-11-01-preview/calculateBaseline_API.json ``` - ### Tag: package-2017-12 These settings apply only when `--tag=package-2017-12` is specified on the command line. @@ -273,8 +298,8 @@ input-file: ``` --- -# Code Generation +# Code Generation ## Swagger to SDK @@ -293,7 +318,6 @@ swagger-to-sdk: - bundle install && rake arm:regen_all_profiles['azure_mgmt_monitor'] ``` - ## C# These settings apply only when `--csharp` is specified on the command line. diff --git a/specification/monitor/resource-manager/readme.python.md b/specification/monitor/resource-manager/readme.python.md index 04fa322fe2ce..f911c3f03204 100644 --- a/specification/monitor/resource-manager/readme.python.md +++ b/specification/monitor/resource-manager/readme.python.md @@ -12,7 +12,7 @@ python: payload-flattening-threshold: 2 namespace: azure.mgmt.monitor package-name: azure-mgmt-monitor - package-version: 0.5.0 + package-version: 0.6.0 clear-output-folder: true ``` ``` yaml $(python) && $(python-mode) == 'update'