Skip to content
Merged
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

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
{
"swagger": "2.0",
"info": {
"title": "MonitorManagementClient",
"version": "2015-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": {
"/providers/microsoft.insights/operations": {
"get": {
"tags": [
"Operations"
],
"description": "Lists all of the available operations from Microsoft.Insights provider.",
"operationId": "Operations_List",
"x-ms-examples": {
"Get a list of operations for a resource provider": {
"$ref": "./examples/OperationList.json"
}
},
"parameters": [{
"$ref": "#/parameters/ApiVersionParameter"
}],
"responses": {
"200": {
"description": "OK. The request has succeeded.",
"schema": {
"$ref": "#/definitions/OperationListResult"
}
}
}
}
}
},
"definitions": {
"OperationListResult": {
"description": "Result of the request to list Microsoft.Insights operations. It contains a list of operations and a URL link to get the next set of results.",
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/Operation"
},
"description": "List of operations supported by the Microsoft.Insights provider."
},
"nextLink": {
"type": "string",
"description": "URL to get the next set of operation list results if there are any."
}
}
},
"Operation": {
"description": "Microsoft Insights API operation definition.",
"type": "object",
"properties": {
"name": {
"description": "Operation name: {provider}/{resource}/{operation}",
"type": "string"
},
"display": {
"description": "Display metadata associated with the operation.",
"properties": {
"provider": {
"description": "Service provider: Microsoft.Insights",
"type": "string"
},
"resource": {
"description": "Resource on which the operation is performed: AlertRules, Autoscale, etc.",
"type": "string"
},
"operation": {
"description": "Operation type: Read, write, delete, etc.",
"type": "string"
}
}
}
}
}
},
"parameters": {
"ApiVersionParameter": {
"name": "api-version",
"in": "query",
"required": true,
"type": "string",
"description": "Client Api Version."
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,254 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Operations API should be implemented.

"swagger": "2.0",
"info": {
"title": "MonitorManagementClient",
"version": "2017-05-01-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/diagnosticSettingsCategories/{name}": {
"get": {
"tags": [
"DiagnosticSettingsCategories"
],
"operationId": "DiagnosticSettingsCategory_Get",
"description": "Gets the diagnostic settings category for the specified resource.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please indicate some of the typical values resourceUri could take to help customers understand this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is explicit in the example with a logic app.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it too difficult to add it to the description? SDK users rely on description, API docs rely on description.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any change in the description breaks the generation, so it requires more work that touches all our classes. I created a task on us to fix that.

"parameters": [
{
"$ref": "#/parameters/ResourceUriParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/NameParameter"
}
],
"responses": {
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"200": {
"description": "Successful request to get more information about diagnostic setting category",
"schema": {
"$ref": "#/definitions/DiagnosticSettingsCategoryResource"
},
"examples": {
"application/json":
{
"id":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/providers/microsoft.insights/diagnosticSettingsCategories/WorkflowRuntime",
"type":"microsoft.insights/diagnosticSettingsCategories",
"name":"WorkflowRuntime",
"location":"eastus",
"tags":null,
"properties": {
"categoryType":"Logs"
}
}
}
}
},
"x-ms-examples": {
"Gets the diagnostic setting": {
"$ref": "./examples/getDiagnosticSettingsCategory.json"
}
}
}
},
"/{resourceUri}/providers/microsoft.insights/diagnosticSettingsCategories": {
"get": {
"tags": [
"DiagnosticSettingsCategories"
],
"operationId": "DiagnosticSettingsCategory_List",
"description": "Lists the diagnostic settings categories for the specified resource.",
"parameters": [
{
"$ref": "#/parameters/ResourceUriParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"200": {
"description": "Successful request to get more information about diagnostic setting category",
"schema": {
"$ref": "#/definitions/DiagnosticSettingsCategoryResourceCollection"
},
"examples": {
"application/json": {
"value": [
{
"id":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/providers/microsoft.insights/diagnosticSettingsCategories/WorkflowRuntime",
"type":"microsoft.insights/diagnosticSettingsCategories",
"name":"WorkflowRuntime",
"location":"eastus",
"tags":null,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tag and location aren't allowed in #/definitions/DiagnosticSettingsCategoryResource.

"properties": {
"categoryType":"Logs"
}
},
{
"id":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/providers/microsoft.insights/diagnosticSettingsCategories/WorkflowMetric",
"type":"microsoft.insights/diagnosticSettingsCategories",
"name":"WorkflowMetric",
"location":"eastus",
"tags":null,
"properties": {
"categoryType":"Metrics"
}
}
]
}
}
}
},
"x-ms-examples": {
"Gets the diagnostic setting": {
"$ref": "./examples/listDiagnosticSettingsCategories.json"
}
}
}
}
},
"definitions": {
"ProxyOnlyResource": {
"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": "A proxy only azure resource object"
},
"DiagnosticSettingsCategory": {
"properties": {
"categoryType": {
"enum": ["Metrics", "Logs"],
"type": "string",
"x-ms-enum": {
"name": "categoryType"
},
"x-nullable": false,
"description": "The type of the diagnostic settings category."
}
},
"description": "The diagnostic settings Category."
},
"DiagnosticSettingsCategoryResource": {
"type": "object",
"allOf": [
{
"$ref": "#/definitions/ProxyOnlyResource"
}
],
"properties": {
"properties": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add description.

"x-ms-client-flatten": true,
"$ref": "#/definitions/DiagnosticSettingsCategory"
}
},
"description": "The diagnostic settings category resource."
},
"DiagnosticSettingsCategoryResourceCollection": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/DiagnosticSettingsCategoryResource"
},
"description": "The collection of diagnostic settings category resources."
}
},
"description": "Represents a collection of diagnostic setting category resources."
},
"ErrorResponse": {
"description": "Describes the format of Error response.",
"type": "object",
"properties": {
"code": {
"description": "Error code",
"type": "string"
},
"message": {
"description": "Error message indicating why the operation failed.",
"type": "string"
}
}
}
},
"parameters": {
"ApiVersionParameter": {
"name": "api-version",
"in": "query",
"required": true,
"type": "string",
"description": "Client Api Version."
},
"ResourceUriParameter": {
"name": "resourceUri",
"in": "path",
"required": true,
"type": "string",
"description": "The identifier of the resource.",
"x-ms-parameter-location": "method"
},
"NameParameter": {
"name": "name",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the diagnostic setting.",
"x-ms-parameter-location": "method"
}
}
}
Loading