From c151bc10cfbcad4de1d701440660c69c231996f3 Mon Sep 17 00:00:00 2001 From: LarryZhang19 <35974877+LarryZhang19@users.noreply.github.com> Date: Wed, 16 Jun 2021 18:01:06 -0700 Subject: [PATCH] adding new api version 2021-05-01-preview (#14485) * adding new api version 2021-05-01-preview * Addng missing bracket * Fix formatting * Formatting * Fix fields * Fix merge conflicts and systemData * Fix prettier * Fix systemData * Fix pr comments from ARM team. * Fix tab * Address ARM PR comment round 2 * Fix systemData and revert 2017-05-01-preview mistake * Fix location in samples * fix prettier * Fix type lint errors * Type fix * One last missing object type * Revert ErrorResponse change as it's breaking change Co-authored-by: Phoenix He --- .../diagnosticsSettingsCategories_API.json | 214 ++++++++++ .../diagnosticsSettings_API.json | 385 ++++++++++++++++++ .../createOrUpdateDiagnosticSetting.json | 73 ++++ ...pdateManagementGroupDiagnosticSetting.json | 42 ++ ...OrUpdateSubscriptionDiagnosticSetting.json | 42 ++ .../examples/deleteDiagnosticSetting.json | 11 + ...eleteManagementGroupDiagnosticSetting.json | 11 + .../deleteSubscriptionDiagnosticSetting.json | 11 + .../examples/getDiagnosticSetting.json | 42 ++ .../getDiagnosticSettingsCategory.json | 23 ++ .../getManagementGroupDiagnosticSetting.json | 28 ++ .../getSubscriptionDiagnosticSetting.json | 28 ++ .../examples/listDiagnosticSettings.json | 45 ++ .../listDiagnosticSettingsCategories.json | 34 ++ ...listManagementGroupDiagnosticSettings.json | 31 ++ .../listSubscriptionDiagnosticSettings.json | 31 ++ ...managementGroupDiagnosticSettings_API.json | 324 +++++++++++++++ .../subscriptionDiagnosticsSettings_API.json | 315 ++++++++++++++ .../monitor/resource-manager/readme.md | 12 +- .../monitor/resource-manager/readme.python.md | 10 + 20 files changed, 1711 insertions(+), 1 deletion(-) create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/diagnosticsSettingsCategories_API.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/diagnosticsSettings_API.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/createOrUpdateDiagnosticSetting.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/createOrUpdateManagementGroupDiagnosticSetting.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/createOrUpdateSubscriptionDiagnosticSetting.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/deleteDiagnosticSetting.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/deleteManagementGroupDiagnosticSetting.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/deleteSubscriptionDiagnosticSetting.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/getDiagnosticSetting.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/getDiagnosticSettingsCategory.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/getManagementGroupDiagnosticSetting.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/getSubscriptionDiagnosticSetting.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/listDiagnosticSettings.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/listDiagnosticSettingsCategories.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/listManagementGroupDiagnosticSettings.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/listSubscriptionDiagnosticSettings.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/managementGroupDiagnosticSettings_API.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/subscriptionDiagnosticsSettings_API.json diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/diagnosticsSettingsCategories_API.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/diagnosticsSettingsCategories_API.json new file mode 100644 index 000000000000..fc6a5a6514ae --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/diagnosticsSettingsCategories_API.json @@ -0,0 +1,214 @@ +{ + "swagger": "2.0", + "info": { + "title": "MonitorManagementClient", + "x-ms-code-generation-settings": { + "name": "MonitorManagementClient" + }, + "version": "2021-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.", + "parameters": [ + { + "$ref": "#/parameters/ResourceUriParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/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" + } + } + }, + "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": "../../../../../common-types/resource-management/v2/types.json#/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" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + }, + "x-ms-examples": { + "Gets the diagnostic setting": { + "$ref": "./examples/listDiagnosticSettingsCategories.json" + } + } + } + } + }, + "definitions": { + "DiagnosticSettingsCategory": { + "type": "object", + "readOnly": true, + "properties": { + "categoryType": { + "enum": [ + "Metrics", + "Logs" + ], + "type": "string", + "x-ms-enum": { + "name": "categoryType", + "modelAsString": true + }, + "x-nullable": false, + "description": "The type of the diagnostic settings category." + }, + "categoryGroups": { + "type": "array", + "items": { + "type": "string" + }, + "description": "the collection of what category groups are supported." + } + }, + "description": "The diagnostic settings Category." + }, + "DiagnosticSettingsCategoryResource": { + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/DiagnosticSettingsCategory", + "description": "The properties of a Diagnostic Settings Category." + }, + "systemData": { + "readOnly": true, + "description": "The system metadata related to this resource.", + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" + } + }, + "description": "The diagnostic settings category resource." + }, + "DiagnosticSettingsCategoryResourceCollection": { + "type": "object", + "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": { + "ResourceUriParameter": { + "name": "resourceUri", + "in": "path", + "required": true, + "type": "string", + "description": "The identifier of the resource.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, + "NameParameter": { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the diagnostic setting.", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/diagnosticsSettings_API.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/diagnosticsSettings_API.json new file mode 100644 index 000000000000..822adfa7fb76 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/diagnosticsSettings_API.json @@ -0,0 +1,385 @@ +{ + "swagger": "2.0", + "info": { + "title": "MonitorManagementClient", + "x-ms-code-generation-settings": { + "name": "MonitorManagementClient" + }, + "version": "2021-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/diagnosticSettings/{name}": { + "get": { + "tags": [ + "DiagnosticSettings" + ], + "operationId": "DiagnosticSettings_Get", + "description": "Gets the active diagnostic settings for the specified resource.", + "parameters": [ + { + "$ref": "#/parameters/ResourceUriParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/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", + "schema": { + "$ref": "#/definitions/DiagnosticSettingsResource" + } + } + }, + "x-ms-examples": { + "Gets the diagnostic setting": { + "$ref": "./examples/getDiagnosticSetting.json" + } + } + }, + "put": { + "tags": [ + "DiagnosticSettings" + ], + "operationId": "DiagnosticSettings_CreateOrUpdate", + "description": "Creates or updates diagnostic settings for the specified resource.", + "parameters": [ + { + "$ref": "#/parameters/ResourceUriParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/DiagnosticSettingsResource" + }, + "description": "Parameters supplied to the operation." + }, + { + "$ref": "#/parameters/NameParameter" + } + ], + "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "200": { + "description": "Successful request to create a diagnostic setting", + "schema": { + "$ref": "#/definitions/DiagnosticSettingsResource" + } + } + }, + "x-ms-examples": { + "Creates or Updates the diagnostic setting": { + "$ref": "./examples/createOrUpdateDiagnosticSetting.json" + } + } + }, + "delete": { + "tags": [ + "DiagnosticSettings" + ], + "operationId": "DiagnosticSettings_Delete", + "description": "Deletes existing diagnostic settings for the specified resource.", + "parameters": [ + { + "$ref": "#/parameters/ResourceUriParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/NameParameter" + } + ], + "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "200": { + "description": "Successful request to remove a diagnostic setting" + }, + "204": { + "description": "Successful request to remove a diagnostic setting" + } + }, + "x-ms-examples": { + "Deletes the diagnostic setting": { + "$ref": "./examples/deleteDiagnosticSetting.json" + } + } + } + }, + "/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings": { + "get": { + "tags": [ + "DiagnosticSettings" + ], + "operationId": "DiagnosticSettings_List", + "description": "Gets the active diagnostic settings list for the specified resource.", + "parameters": [ + { + "$ref": "#/parameters/ResourceUriParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/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", + "schema": { + "$ref": "#/definitions/DiagnosticSettingsResourceCollection" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + }, + "x-ms-examples": { + "Gets the diagnostic setting": { + "$ref": "./examples/listDiagnosticSettings.json" + } + } + } + } + }, + "definitions": { + "RetentionPolicy": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "a value indicating whether the retention policy is enabled." + }, + "days": { + "type": "integer", + "format": "int32", + "minimum": 0, + "description": "the number of days for the retention in days. A value of 0 will retain the events indefinitely." + } + }, + "required": [ + "enabled", + "days" + ], + "description": "Specifies the retention policy for the log." + }, + "MetricSettings": { + "type": "object", + "properties": { + "timeGrain": { + "type": "string", + "format": "duration", + "description": "the timegrain of the metric in ISO8601 format." + }, + "category": { + "type": "string", + "description": "Name of a Diagnostic Metric category for a resource type this setting is applied to. To obtain the list of Diagnostic metric categories for a resource, first perform a GET diagnostic settings operation." + }, + "enabled": { + "type": "boolean", + "description": "a value indicating whether this category is enabled." + }, + "retentionPolicy": { + "$ref": "#/definitions/RetentionPolicy", + "description": "the retention policy for this category." + } + }, + "required": [ + "enabled" + ], + "description": "Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular metric." + }, + "LogSettings": { + "type": "object", + "properties": { + "category": { + "type": "string", + "description": "Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation." + }, + "categoryGroup": { + "type": "string", + "description": "Name of a Diagnostic Log category group for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation." + }, + "enabled": { + "type": "boolean", + "description": "a value indicating whether this log is enabled." + }, + "retentionPolicy": { + "$ref": "#/definitions/RetentionPolicy", + "description": "the retention policy for this log." + } + }, + "required": [ + "enabled" + ], + "description": "Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular log." + }, + "DiagnosticSettings": { + "type": "object", + "properties": { + "storageAccountId": { + "type": "string", + "description": "The resource ID of the storage account to which you would like to send Diagnostic Logs." + }, + "serviceBusRuleId": { + "type": "string", + "description": "The service bus rule Id of the diagnostic setting. This is here to maintain backwards compatibility." + }, + "eventHubAuthorizationRuleId": { + "type": "string", + "description": "The resource Id for the event hub authorization rule." + }, + "eventHubName": { + "type": "string", + "description": "The name of the event hub. If none is specified, the default event hub will be selected." + }, + "metrics": { + "type": "array", + "items": { + "$ref": "#/definitions/MetricSettings" + }, + "description": "The list of metric settings." + }, + "logs": { + "type": "array", + "items": { + "$ref": "#/definitions/LogSettings" + }, + "description": "The list of logs settings." + }, + "workspaceId": { + "type": "string", + "description": "The full ARM resource ID of the Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2" + }, + "logAnalyticsDestinationType": { + "type": "string", + "description": "A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type constructed as follows: _. Possible values are: Dedicated and null (null is default.)" + } + }, + "description": "The diagnostic settings." + }, + "DiagnosticSettingsResource": { + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/DiagnosticSettings", + "description": "Properties of a Diagnostic Settings Resource." + }, + "systemData": { + "readOnly": true, + "description": "The system metadata related to this resource.", + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" + } + }, + "description": "The diagnostic setting resource." + }, + "DiagnosticSettingsResourceCollection": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/DiagnosticSettingsResource" + }, + "description": "The collection of diagnostic settings resources;." + } + }, + "description": "Represents a collection of alert rule 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": { + "ResourceUriParameter": { + "name": "resourceUri", + "in": "path", + "required": true, + "type": "string", + "description": "The identifier of the resource.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, + "NameParameter": { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the diagnostic setting.", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/createOrUpdateDiagnosticSetting.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/createOrUpdateDiagnosticSetting.json new file mode 100644 index 000000000000..7259c54f1267 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/createOrUpdateDiagnosticSetting.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "resourceUri": "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6", + "name": "mysetting", + "api-version": "2021-05-01-preview", + "parameters": { + "properties": { + "storageAccountId": "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1", + "workspaceId": "", + "eventHubAuthorizationRuleId": "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule", + "eventHubName": "myeventhub", + "metrics": [ + { + "category": "WorkflowMetrics", + "enabled": true, + "retentionPolicy": { + "enabled": false, + "days": 0 + } + } + ], + "logs": [ + { + "categoryGroup": "allLogs", + "enabled": true, + "retentionPolicy": { + "enabled": false, + "days": 0 + } + } + ], + "logAnalyticsDestinationType": "Dedicated" + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/providers/microsoft.insights/diagnosticSettings/mysetting", + "type": "Microsoft.Insights/diagnosticSettings", + "name": "mysetting", + "properties": { + "storageAccountId": "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1", + "workspaceId": "", + "eventHubAuthorizationRuleId": "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule", + "eventHubName": "myeventhub", + "metrics": [ + { + "category": "WorkflowMetrics", + "enabled": true, + "retentionPolicy": { + "enabled": false, + "days": 0 + } + } + ], + "logs": [ + { + "categoryGroup": "allLogs", + "enabled": true, + "retentionPolicy": { + "enabled": false, + "days": 0 + } + } + ], + "logAnalyticsDestinationType": "Dedicated" + } + } + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/createOrUpdateManagementGroupDiagnosticSetting.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/createOrUpdateManagementGroupDiagnosticSetting.json new file mode 100644 index 000000000000..752076380c4e --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/createOrUpdateManagementGroupDiagnosticSetting.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "managementGroupId": "testChildMG7", + "name": "setting1", + "api-version": "2021-05-01-preview", + "parameters": { + "properties": { + "storageAccountId": "/subscriptions/bfaef57f-297e-4210-bfe5-27c18cc671f7/resourceGroups/FuncAppRunners/providers/Microsoft.Storage/storageAccounts/testpersonalb6a5", + "workspaceId": "/subscriptions/9cf7cc0a-0ba1-4624-bc82-97e1ee25dc45/resourceGroups/mgTest/providers/Microsoft.OperationalInsights/workspaces/mgTestWorkspace", + "eventHubAuthorizationRuleId": "/subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule", + "eventHubName": "myeventhub", + "logs": [ + { + "categoryGroup": "allLogs", + "enabled": true + } + ] + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "providers/Microsoft.Management/managementGroups/testChildMG7/providers/microsoft.insights/diagnosticSettings/setting1", + "type": "Microsoft.Insights/diagnosticSettings", + "name": "setting1", + "properties": { + "storageAccountId": "/subscriptions/bfaef57f-297e-4210-bfe5-27c18cc671f7/resourceGroups/FuncAppRunners/providers/Microsoft.Storage/storageAccounts/testpersonalb6a5", + "workspaceId": "/subscriptions/9cf7cc0a-0ba1-4624-bc82-97e1ee25dc45/resourceGroups/mgTest/providers/Microsoft.OperationalInsights/workspaces/mgTestWorkspace", + "eventHubAuthorizationRuleId": "/subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule", + "logs": [ + { + "categoryGroup": "allLogs", + "enabled": true + } + ] + } + } + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/createOrUpdateSubscriptionDiagnosticSetting.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/createOrUpdateSubscriptionDiagnosticSetting.json new file mode 100644 index 000000000000..d629b073eec0 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/createOrUpdateSubscriptionDiagnosticSetting.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "subscriptionId": "fb9f25f9-5785-4510-a38f-a62f188eb9f8", + "name": "ds4", + "api-version": "2021-05-01-preview", + "parameters": { + "properties": { + "storageAccountId": "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1", + "workspaceId": "", + "eventHubAuthorizationRuleId": "/subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule", + "eventHubName": "myeventhub", + "logs": [ + { + "categoryGroup": "allLogs", + "enabled": true + } + ] + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/providers/AzureResourceManager/diagnosticSettings/ds4", + "type": null, + "name": "ds4", + "properties": { + "storageAccountId": "/subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1", + "workspaceId": "/subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/resourceGroups/apptest/providers/Microsoft.OperationalInsights/workspaces/test1", + "eventHubAuthorizationRuleId": "/subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/resourceGroups/apptest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule", + "logs": [ + { + "categoryGroup": "allLogs", + "enabled": true + } + ] + } + } + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/deleteDiagnosticSetting.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/deleteDiagnosticSetting.json new file mode 100644 index 000000000000..f77441e780c5 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/deleteDiagnosticSetting.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "resourceUri": "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6", + "name": "mysetting", + "api-version": "2021-05-01-preview" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/deleteManagementGroupDiagnosticSetting.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/deleteManagementGroupDiagnosticSetting.json new file mode 100644 index 000000000000..79a132233a49 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/deleteManagementGroupDiagnosticSetting.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "managementGroupId": "testChildMG7", + "name": "setting1", + "api-version": "2021-05-01-preview" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/deleteSubscriptionDiagnosticSetting.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/deleteSubscriptionDiagnosticSetting.json new file mode 100644 index 000000000000..2c4f55cd0698 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/deleteSubscriptionDiagnosticSetting.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "subscriptionId": "1a66ce04-b633-4a0b-b2bc-a912ec8986a6", + "name": "ds4", + "api-version": "2021-05-01-preview" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/getDiagnosticSetting.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/getDiagnosticSetting.json new file mode 100644 index 000000000000..8178a3b8aea4 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/getDiagnosticSetting.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "resourceUri": "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6", + "name": "mysetting", + "api-version": "2021-05-01-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/providers/microsoft.insights/diagnosticSettings/mysetting", + "type": "Microsoft.Insights/diagnosticSettings", + "name": "mysetting", + "properties": { + "storageAccountId": "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1", + "workspaceId": "", + "eventHubAuthorizationRuleId": "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule", + "metrics": [ + { + "category": "WorkflowMetrics", + "enabled": true, + "retentionPolicy": { + "enabled": false, + "days": 0 + } + } + ], + "logs": [ + { + "categoryGroup": "allLogs", + "enabled": true, + "retentionPolicy": { + "enabled": false, + "days": 0 + } + } + ] + } + } + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/getDiagnosticSettingsCategory.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/getDiagnosticSettingsCategory.json new file mode 100644 index 000000000000..5541e880348d --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/getDiagnosticSettingsCategory.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "resourceUri": "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6", + "name": "WorkflowRuntime", + "api-version": "2021-05-01-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "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", + "properties": { + "categoryType": "Logs", + "categoryGroups": [ + "allLogs" + ] + } + } + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/getManagementGroupDiagnosticSetting.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/getManagementGroupDiagnosticSetting.json new file mode 100644 index 000000000000..7ef8c7ba66ea --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/getManagementGroupDiagnosticSetting.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "managementGroupId": "testChildMG7", + "name": "setting1", + "api-version": "2021-05-01-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "providers/Microsoft.Management/managementGroups/testChildMG7/providers/Microsoft.Insights/diagnosticSettings/setting1", + "type": "Microsoft.Insights/diagnosticSettings", + "name": "setting1", + "properties": { + "storageAccountId": "/subscriptions/bfaef57f-297e-4210-bfe5-27c18cc671f7/resourceGroups/FuncAppRunners/providers/Microsoft.Storage/storageAccounts/testpersonalb6a5", + "workspaceId": "/subscriptions/9cf7cc0a-0ba1-4624-bc82-97e1ee25dc45/resourceGroups/mgTest/providers/Microsoft.OperationalInsights/workspaces/mgTestWorkspace", + "eventHubAuthorizationRuleId": "/subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule", + "logs": [ + { + "categoryGroup": "allLogs", + "enabled": true + } + ] + } + } + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/getSubscriptionDiagnosticSetting.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/getSubscriptionDiagnosticSetting.json new file mode 100644 index 000000000000..4c206d585d0b --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/getSubscriptionDiagnosticSetting.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "fb9f25f9-5785-4510-a38f-a62f188eb9f8", + "name": "mysetting", + "api-version": "2021-05-01-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/providers/AzureResourceManager/diagnosticSettings/ds4", + "type": null, + "name": "ds4", + "properties": { + "storageAccountId": "/subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1", + "workspaceId": "/subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/resourceGroups/apptest/providers/Microsoft.OperationalInsights/workspaces/test1", + "eventHubAuthorizationRuleId": "/subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/resourceGroups/apptest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule", + "logs": [ + { + "categoryGroup": "allLogs", + "enabled": true + } + ] + } + } + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/listDiagnosticSettings.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/listDiagnosticSettings.json new file mode 100644 index 000000000000..2e3889fabe01 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/listDiagnosticSettings.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "resourceUri": "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6", + "api-version": "2021-05-01-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "id": "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/providers/microsoft.insights/diagnosticSettings/mysetting", + "type": "Microsoft.Insights/diagnosticSettings", + "name": "mysetting", + "properties": { + "storageAccountId": "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1", + "eventHubAuthorizationRuleId": "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/andy1101/providers/Microsoft.EventHub/namespaces/andy1101/authorizationrules/RootManageSharedAccessKey", + "workspaceId": "", + "metrics": [ + { + "category": "WorkflowMetrics", + "enabled": true, + "retentionPolicy": { + "enabled": false, + "days": 0 + } + } + ], + "logs": [ + { + "categoryGroup": "allLogs", + "enabled": true, + "retentionPolicy": { + "enabled": false, + "days": 0 + } + } + ] + } + } + ] + } + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/listDiagnosticSettingsCategories.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/listDiagnosticSettingsCategories.json new file mode 100644 index 000000000000..b80de077bab2 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/listDiagnosticSettingsCategories.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "resourceUri": "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6", + "api-version": "2021-05-01-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "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", + "properties": { + "categoryType": "Logs", + "categoryGroups": [ + "allLogs" + ] + } + }, + { + "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", + "properties": { + "categoryType": "Metrics" + } + } + ] + } + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/listManagementGroupDiagnosticSettings.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/listManagementGroupDiagnosticSettings.json new file mode 100644 index 000000000000..2634c3f71104 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/listManagementGroupDiagnosticSettings.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "managementGroupId": "testChildMG7", + "api-version": "2021-05-01-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "id": "providers/Microsoft.Management/managementGroups/testChildMG7/providers/microsoft.insights/diagnosticSettings/setting1", + "type": "Microsoft.Insights/diagnosticSettings", + "name": "setting1", + "properties": { + "storageAccountId": "/subscriptions/bfaef57f-297e-4210-bfe5-27c18cc671f7/resourceGroups/FuncAppRunners/providers/Microsoft.Storage/storageAccounts/testpersonalb6a5", + "workspaceId": "/subscriptions/9cf7cc0a-0ba1-4624-bc82-97e1ee25dc45/resourceGroups/mgTest/providers/Microsoft.OperationalInsights/workspaces/mgTestWorkspace", + "eventHubAuthorizationRuleId": "/subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule", + "logs": [ + { + "categoryGroup": "allLogs", + "enabled": true + } + ] + } + } + ] + } + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/listSubscriptionDiagnosticSettings.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/listSubscriptionDiagnosticSettings.json new file mode 100644 index 000000000000..c5fe82116cf9 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/listSubscriptionDiagnosticSettings.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "subscriptionId": "fb9f25f9-5785-4510-a38f-a62f188eb9f8", + "api-version": "2021-05-01-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "id": "subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/providers/AzureResourceManager/diagnosticSettings/ds4", + "type": null, + "name": "ds4", + "properties": { + "storageAccountId": "/subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1", + "workspaceId": "/subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/resourceGroups/apptest/providers/Microsoft.OperationalInsights/workspaces/test1", + "eventHubAuthorizationRuleId": "/subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/resourceGroups/apptest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule", + "logs": [ + { + "categoryGroup": "allLogs", + "enabled": true + } + ] + } + } + ] + } + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/managementGroupDiagnosticSettings_API.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/managementGroupDiagnosticSettings_API.json new file mode 100644 index 000000000000..9b80bdfbcf1d --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/managementGroupDiagnosticSettings_API.json @@ -0,0 +1,324 @@ +{ + "swagger": "2.0", + "info": { + "title": "MonitorManagementClient", + "x-ms-code-generation-settings": { + "name": "MonitorManagementClient" + }, + "version": "2021-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": { + "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Insights/diagnosticSettings/{name}": { + "get": { + "tags": [ + "ManagementGroupDiagnosticSettings" + ], + "operationId": "ManagementGroupDiagnosticSettings_Get", + "description": "Gets the active management group diagnostic settings for the specified resource.", + "parameters": [ + { + "$ref": "#/parameters/ManagementGroupIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/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.", + "schema": { + "$ref": "#/definitions/ManagementGroupDiagnosticSettingsResource" + } + } + }, + "x-ms-examples": { + "Gets the management group diagnostic setting": { + "$ref": "./examples/getManagementGroupDiagnosticSetting.json" + } + } + }, + "put": { + "tags": [ + "ManagementGroupDiagnosticSettings" + ], + "operationId": "ManagementGroupDiagnosticSettings_CreateOrUpdate", + "description": "Creates or updates management group diagnostic settings for the specified resource.", + "parameters": [ + { + "$ref": "#/parameters/ManagementGroupIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ManagementGroupDiagnosticSettingsResource" + }, + "description": "Parameters supplied to the operation." + }, + { + "$ref": "#/parameters/NameParameter" + } + ], + "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "200": { + "description": "Successful request to create a management group diagnostic setting", + "schema": { + "$ref": "#/definitions/ManagementGroupDiagnosticSettingsResource" + } + } + }, + "x-ms-examples": { + "Creates or Updates the management group diagnostic setting": { + "$ref": "./examples/createOrUpdateManagementGroupDiagnosticSetting.json" + } + } + }, + "delete": { + "tags": [ + "ManagementGroupDiagnosticSettings" + ], + "operationId": "ManagementGroupDiagnosticSettings_Delete", + "description": "Deletes existing management group diagnostic settings for the specified resource.", + "parameters": [ + { + "$ref": "#/parameters/ManagementGroupIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/NameParameter" + } + ], + "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "200": { + "description": "Successful request to remove a management group diagnostic setting" + }, + "204": { + "description": "Successful request to remove a management group diagnostic setting" + } + }, + "x-ms-examples": { + "Deletes the management group diagnostic setting": { + "$ref": "./examples/deleteManagementGroupDiagnosticSetting.json" + } + } + } + }, + "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Insights/diagnosticSettings": { + "get": { + "tags": [ + "ManagementGroupDiagnosticSettings" + ], + "operationId": "ManagementGroupDiagnosticSettings_List", + "description": "Gets the active management group diagnostic settings list for the specified management group.", + "parameters": [ + { + "$ref": "#/parameters/ManagementGroupIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/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 management group diagnostic setting", + "schema": { + "$ref": "#/definitions/ManagementGroupDiagnosticSettingsResourceCollection" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + }, + "x-ms-examples": { + "Gets the management group diagnostic setting": { + "$ref": "./examples/listManagementGroupDiagnosticSettings.json" + } + } + } + } + }, + "definitions": { + "ManagementGroupLogSettings": { + "type": "object", + "properties": { + "category": { + "type": "string", + "description": "Name of a Management Group Diagnostic Log category for a resource type this setting is applied to." + }, + "categoryGroup": { + "type": "string", + "description": "Name of a Management Group Diagnostic Log category group for a resource type this setting is applied to." + }, + "enabled": { + "type": "boolean", + "description": "a value indicating whether this log is enabled." + } + }, + "required": [ + "enabled" + ], + "description": "Part of Management Group diagnostic setting. Specifies the settings for a particular log." + }, + "ManagementGroupDiagnosticSettings": { + "type": "object", + "properties": { + "storageAccountId": { + "type": "string", + "description": "The resource ID of the storage account to which you would like to send Diagnostic Logs." + }, + "serviceBusRuleId": { + "type": "string", + "description": "The service bus rule Id of the diagnostic setting. This is here to maintain backwards compatibility." + }, + "eventHubAuthorizationRuleId": { + "type": "string", + "description": "The resource Id for the event hub authorization rule." + }, + "eventHubName": { + "type": "string", + "description": "The name of the event hub. If none is specified, the default event hub will be selected." + }, + "logs": { + "type": "array", + "items": { + "$ref": "#/definitions/ManagementGroupLogSettings" + }, + "description": "The list of logs settings." + }, + "workspaceId": { + "type": "string", + "description": "The full ARM resource ID of the Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2" + } + }, + "description": "The management group diagnostic settings." + }, + "ManagementGroupDiagnosticSettingsResource": { + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ManagementGroupDiagnosticSettings", + "description": "Properties of a Management Group Diagnostic Settings Resource." + }, + "systemData": { + "readOnly": true, + "description": "The system metadata related to this resource.", + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" + } + }, + "description": "The management group diagnostic setting resource." + }, + "ManagementGroupDiagnosticSettingsResourceCollection": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/ManagementGroupDiagnosticSettingsResource" + }, + "description": "The collection of management group diagnostic settings resources." + } + }, + "description": "Represents a collection of management group diagnostic settings 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": { + "ManagementGroupIdParameter": { + "name": "managementGroupId", + "in": "path", + "required": true, + "type": "string", + "description": "The management group id.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, + "NameParameter": { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the diagnostic setting.", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/subscriptionDiagnosticsSettings_API.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/subscriptionDiagnosticsSettings_API.json new file mode 100644 index 000000000000..25ec019e392b --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/subscriptionDiagnosticsSettings_API.json @@ -0,0 +1,315 @@ +{ + "swagger": "2.0", + "info": { + "title": "MonitorManagementClient", + "x-ms-code-generation-settings": { + "name": "MonitorManagementClient" + }, + "version": "2021-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": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/diagnosticSettings/{name}": { + "get": { + "tags": [ + "SubscriptionDiagnosticSettings" + ], + "operationId": "SubscriptionDiagnosticSettings_Get", + "description": "Gets the active subscription diagnostic settings for the specified resource.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/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.", + "schema": { + "$ref": "#/definitions/SubscriptionDiagnosticSettingsResource" + } + } + }, + "x-ms-examples": { + "Gets the subscription diagnostic setting": { + "$ref": "./examples/getSubscriptionDiagnosticSetting.json" + } + } + }, + "put": { + "tags": [ + "SubscriptionDiagnosticSettings" + ], + "operationId": "SubscriptionDiagnosticSettings_CreateOrUpdate", + "description": "Creates or updates subscription diagnostic settings for the specified resource.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/SubscriptionDiagnosticSettingsResource" + }, + "description": "Parameters supplied to the operation." + }, + { + "$ref": "#/parameters/NameParameter" + } + ], + "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "200": { + "description": "Successful request to create a subscription diagnostic setting", + "schema": { + "$ref": "#/definitions/SubscriptionDiagnosticSettingsResource" + } + } + }, + "x-ms-examples": { + "Creates or Updates the subscription diagnostic setting": { + "$ref": "./examples/createOrUpdateSubscriptionDiagnosticSetting.json" + } + } + }, + "delete": { + "tags": [ + "SubscriptionDiagnosticSettings" + ], + "operationId": "SubscriptionDiagnosticSettings_Delete", + "description": "Deletes existing subscription diagnostic settings for the specified resource.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/NameParameter" + } + ], + "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "200": { + "description": "Successful request to remove a subscription diagnostic setting" + }, + "204": { + "description": "Successful request to remove a subscription diagnostic setting" + } + }, + "x-ms-examples": { + "Deletes the subscription diagnostic setting": { + "$ref": "./examples/deleteSubscriptionDiagnosticSetting.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/diagnosticSettings": { + "get": { + "tags": [ + "SubscriptionDiagnosticSettings" + ], + "operationId": "SubscriptionDiagnosticSettings_List", + "description": "Gets the active subscription diagnostic settings list for the specified subscriptionId.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/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 subscription diagnostic setting", + "schema": { + "$ref": "#/definitions/SubscriptionDiagnosticSettingsResourceCollection" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + }, + "x-ms-examples": { + "Gets the subscription diagnostic setting": { + "$ref": "./examples/listSubscriptionDiagnosticSettings.json" + } + } + } + } + }, + "definitions": { + "SubscriptionLogSettings": { + "type": "object", + "properties": { + "category": { + "type": "string", + "description": "Name of a Subscription Diagnostic Log category for a resource type this setting is applied to." + }, + "categoryGroup": { + "type": "string", + "description": "Name of a Subscription Diagnostic Log category group for a resource type this setting is applied to." + }, + "enabled": { + "type": "boolean", + "description": "a value indicating whether this log is enabled." + } + }, + "required": [ + "enabled" + ], + "description": "Part of Subscription diagnostic setting. Specifies the settings for a particular log." + }, + "SubscriptionDiagnosticSettings": { + "type": "object", + "properties": { + "storageAccountId": { + "type": "string", + "description": "The resource ID of the storage account to which you would like to send Diagnostic Logs." + }, + "serviceBusRuleId": { + "type": "string", + "description": "The service bus rule Id of the diagnostic setting. This is here to maintain backwards compatibility." + }, + "eventHubAuthorizationRuleId": { + "type": "string", + "description": "The resource Id for the event hub authorization rule." + }, + "eventHubName": { + "type": "string", + "description": "The name of the event hub. If none is specified, the default event hub will be selected." + }, + "logs": { + "type": "array", + "items": { + "$ref": "#/definitions/SubscriptionLogSettings" + }, + "description": "The list of logs settings." + }, + "workspaceId": { + "type": "string", + "description": "The full ARM resource ID of the Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2" + } + }, + "description": "The subscription diagnostic settings." + }, + "SubscriptionDiagnosticSettingsResource": { + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/SubscriptionDiagnosticSettings", + "description": "Properties of a Subscription Diagnostic Settings Resource." + }, + "systemData": { + "readOnly": true, + "description": "The system metadata related to this resource.", + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" + } + }, + "description": "The subscription diagnostic setting resource." + }, + "SubscriptionDiagnosticSettingsResourceCollection": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/SubscriptionDiagnosticSettingsResource" + }, + "description": "The collection of subscription diagnostic settings resources." + } + }, + "description": "Represents a collection of subscription diagnostic settings 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": { + "NameParameter": { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the diagnostic setting.", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/monitor/resource-manager/readme.md b/specification/monitor/resource-manager/readme.md index 9a5fe8bb80d2..556f4e3fa94c 100644 --- a/specification/monitor/resource-manager/readme.md +++ b/specification/monitor/resource-manager/readme.md @@ -42,7 +42,17 @@ description: Monitor Management Client openapi-type: arm tag: package-2020-03 ``` +### Tag: package-2021-05-01-preview-only +These settings apply only when `--tag=package-2021-05-01-preview-only` is specified on the command line. + +``` yaml $(tag) == 'package-2021-05-01-preview-only' +input-file: +- Microsoft.Insights/preview/2021-05-01-preview/diagnosticsSettings_API.json +- Microsoft.Insights/preview/2021-05-01-preview/diagnosticsSettingsCategories_API.json +- Microsoft.Insights/preview/2021-05-01-preview/managementGroupDiagnosticSettings_API.json +- Microsoft.Insights/preview/2021-05-01-preview/subscriptionDiagnosticsSettings_API.json +``` ### Tag: package-2021-04-only ``` yaml $(tag) == 'package-2021-04-only' @@ -67,7 +77,7 @@ These settings apply only when `--tag=package-2020-10-only` is specified on the ``` yaml $(tag) == 'package-2020-10-only' input-file: - - Microsoft.Insights/stable/2020-10-01/activityLogAlerts_API.json +- Microsoft.Insights/stable/2020-10-01/activityLogAlerts_API.json ``` ### Tag: package-2020-05-preview-only diff --git a/specification/monitor/resource-manager/readme.python.md b/specification/monitor/resource-manager/readme.python.md index 39f8e259c4f8..be79843a67d2 100644 --- a/specification/monitor/resource-manager/readme.python.md +++ b/specification/monitor/resource-manager/readme.python.md @@ -29,6 +29,7 @@ Generate all API versions currently shipped for this package ```yaml $(multiapi) && $(track2) clear-output-folder: true batch: + - tag: package-2021-05-01-preview-only - tag: package-2020-10-only - tag: package-2020-05-preview-only - tag: package-2020-01-01-preview-only @@ -59,6 +60,15 @@ output-folder: $(python-sdks-folder)/monitor/azure-mgmt-monitor/azure/mgmt/monit clear-output-folder: false perform-load: false ``` +### Tag: package-2021-05-01-preview-only and python + +These settings apply only when `--tag=package-2021-05-01-preview-only --python` is specified on the command line. +Please also specify `--python-sdks-folder=`. + +``` yaml $(tag) == 'package-2021-05-01-preview-only' +namespace: $(python-base-namespace).v2021_05_01_preview +output-folder: $(python-sdks-folder)/$(python-base-folder)/v2021_05_01_preview +``` ### Tag: package-2020-10-only and python