diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2020-01-01-preview/examples/createOrUpdateManagementGroupDiagnosticSetting.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2020-01-01-preview/examples/createOrUpdateManagementGroupDiagnosticSetting.json new file mode 100644 index 000000000000..c765841de5f9 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2020-01-01-preview/examples/createOrUpdateManagementGroupDiagnosticSetting.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "managementGroupId": "testChildMG7", + "name": "setting1", + "api-version": "2020-01-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": [ + { + "category": "Administrative", + "enabled": true + }, + { + "category": "Policy", + "enabled": true + } + ] + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "providers/Microsoft.Management/managementGroups/testChildMG7/providers/microsoft.insights/diagnosticSettings/setting1", + "type": "Microsoft.Insights/diagnosticSettings", + "name": "setting1", + "location": "global", + "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": [ + { + "category": "Administrative", + "enabled": true + }, + { + "category": "Policy", + "enabled": true + } + ] + } + } + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2020-01-01-preview/examples/deleteManagementGroupDiagnosticSetting.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2020-01-01-preview/examples/deleteManagementGroupDiagnosticSetting.json new file mode 100644 index 000000000000..5c1d1c0d10a2 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2020-01-01-preview/examples/deleteManagementGroupDiagnosticSetting.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "managementGroupId": "testChildMG7", + "name": "setting1", + "api-version": "2020-01-01-preview" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2020-01-01-preview/examples/getManagementGroupDiagnosticSetting.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2020-01-01-preview/examples/getManagementGroupDiagnosticSetting.json new file mode 100644 index 000000000000..1268d7325b59 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2020-01-01-preview/examples/getManagementGroupDiagnosticSetting.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "managementGroupId": "testChildMG7", + "name": "setting1", + "api-version": "2020-01-01-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "providers/Microsoft.Management/managementGroups/testChildMG7/providers/microsoft.insights/diagnosticSettings/setting1", + "type": "Microsoft.Insights/diagnosticSettings", + "name": "setting1", + "location": "global", + "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": [ + { + "category": "Administrative", + "enabled": true + }, + { + "category": "Policy", + "enabled": true + } + ] + } + } + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2020-01-01-preview/examples/listManagementGroupDiagnosticSettings.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2020-01-01-preview/examples/listManagementGroupDiagnosticSettings.json new file mode 100644 index 000000000000..4da36a78f062 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2020-01-01-preview/examples/listManagementGroupDiagnosticSettings.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "managementGroupId": "testChildMG7", + "api-version": "2020-01-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": [ + { + "category": "Administrative", + "enabled": true + }, + { + "category": "Policy", + "enabled": true + } + ] + } + } + ] + } + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2020-01-01-preview/managementGroupDiagnosticSettings_API.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2020-01-01-preview/managementGroupDiagnosticSettings_API.json new file mode 100644 index 000000000000..c072d651d2f7 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2020-01-01-preview/managementGroupDiagnosticSettings_API.json @@ -0,0 +1,345 @@ +{ + "swagger": "2.0", + "info": { + "title": "MonitorManagementClient", + "x-ms-code-generation-settings": { + "name": "MonitorManagementClient" + }, + "version": "2020-01-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": "#/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": "#/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": "#/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": "#/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": { + "ManagementGroupProxyOnlyResource": { + "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" + }, + "location": { + "type": "string", + "description": "Location of the resource" + } + }, + "x-ms-azure-resource": true, + "description": "A proxy only azure resource object" + }, + "ManagementGroupLogSettings": { + "properties": { + "category": { + "type": "string", + "description": "Name of a Management Group Diagnostic Log category for a resource type this setting is applied to." + }, + "enabled": { + "type": "boolean", + "description": "a value indicating whether this log is enabled." + } + }, + "required": [ + "category", + "enabled" + ], + "description": "Part of Management Group diagnostic setting. Specifies the settings for a particular log." + }, + "ManagementGroupDiagnosticSettings": { + "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": "#/definitions/ManagementGroupProxyOnlyResource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ManagementGroupDiagnosticSettings", + "description": "Properties of a Management Group Diagnostic Settings Resource." + } + }, + "description": "The management group diagnostic setting resource." + }, + "ManagementGroupDiagnosticSettingsResourceCollection": { + "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": { + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Client Api Version." + }, + "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/readme.md b/specification/monitor/resource-manager/readme.md index aa10b3d13604..8f7c32bb18f6 100644 --- a/specification/monitor/resource-manager/readme.md +++ b/specification/monitor/resource-manager/readme.md @@ -31,6 +31,15 @@ openapi-type: arm tag: package-2019-06 ``` +### Tag: package-2020-01-01-preview-only + +These settings apply only when `--tag=package-2020-01-01-preview-only` is specified on the command line. + +```yaml $(tag) == 'package-2020-01-01-preview-only' +input-file: +- Microsoft.Insights/preview/2020-01-01-preview/managementGroupDiagnosticSettings_API.json +``` + ### Tag: package-2020-03 These settings apply only when `--tag=package-2020-03` is specified on the command line. @@ -625,6 +634,7 @@ input-file: - $(this-folder)/Microsoft.Insights/preview/2018-11-27-preview/vmInsightsOnboarding_API.json - $(this-folder)/Microsoft.Insights/preview/2019-10-17-preview/privateLinkScopes_API.json - $(this-folder)/Microsoft.Insights/preview/2017-05-01-preview/subscriptionDiagnosticsSettings_API.json + - $(this-folder)/Microsoft.Insights/preview/2020-01-01-preview/managementGroupDiagnosticSettings_API.json - $(this-folder)/Microsoft.Insights/stable/2019-03-01/actionGroups_API.json - $(this-folder)/Microsoft.Insights/stable/2018-09-01/actionGroups_API.json - $(this-folder)/Microsoft.Insights/stable/2018-03-01/actionGroups_API.json diff --git a/specification/monitor/resource-manager/readme.python.md b/specification/monitor/resource-manager/readme.python.md index 6d84860e3278..8d483156a925 100644 --- a/specification/monitor/resource-manager/readme.python.md +++ b/specification/monitor/resource-manager/readme.python.md @@ -30,6 +30,7 @@ Generate all API versions currently shipped for this package ```yaml $(multiapi) && !$(track2) batch: + - tag: package-2020-01-01-preview-only - tag: package-2019-10-17-preview-only - tag: package-2019-06-01-only - tag: package-2019-03-01-only @@ -53,6 +54,7 @@ batch: ```yaml $(multiapi) && $(track2) clear-output-folder: true batch: + - tag: package-2020-01-01-preview-only - tag: package-2019-10-17-preview-only - tag: package-2019-06-01-only - tag: package-2019-03-01-only @@ -80,6 +82,19 @@ clear-output-folder: false perform-load: false ``` +### Tag: package-2020-01-01-preview-only and python + +These settings apply only when `--tag=package-2020-01-01-preview-only --python` is specified on the command line. +Please also specify `--python-sdks-folder=`. + +``` yaml $(tag) == 'package-2020-01-01-preview-only' +namespace: $(python-base-namespace).v2020_01_01_preview +output-folder: $(python-sdks-folder)/$(python-base-folder)/v2020_01_01_preview +python: + namespace: $(python-base-namespace).v2020_01_01_preview + output-folder: $(python-sdks-folder)/$(python-base-folder)/v2020_01_01_preview +``` + ### Tag: package-2019-10-17-preview-only and python These settings apply only when `--tag=package-2019-10-17-preview-only --python` is specified on the command line.