{ "swagger": "2.0", "info": { "title": "MonitorManagementClient", "version": "2016-09-01", "description": "Monitor Management Client", "x-typespec-generated": [ { "emitter": "@azure-tools/typespec-autorest" } ] }, "schemes": [ "https" ], "host": "management.azure.com", "produces": [ "application/json" ], "consumes": [ "application/json" ], "security": [ { "azure_auth": [ "user_impersonation" ] } ], "securityDefinitions": { "azure_auth": { "type": "oauth2", "description": "Azure Active Directory OAuth2 Flow.", "flow": "implicit", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "scopes": { "user_impersonation": "impersonate your user account" } } }, "tags": [ { "name": "ServiceDiagnosticSettings" } ], "paths": { "/{resourceUri}/providers/microsoft.insights/diagnosticSettings/service": { "get": { "operationId": "ServiceDiagnosticSettings_Get", "tags": [ "ServiceDiagnosticSettings" ], "description": "Gets the active diagnostic settings for the specified resource. **WARNING**: This method will be deprecated in future releases.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "name": "resourceUri", "in": "path", "description": "The fully qualified Azure Resource manager identifier of the resource.", "required": true, "type": "string", "x-ms-skip-url-encoding": true } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/ServiceDiagnosticSettingsResource" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Microsoft.Common.ErrorResponse" } } }, "x-ms-examples": { "Get service diagnostic setting": { "$ref": "./examples/getServiceDiagnosticSetting.json" } } }, "put": { "operationId": "ServiceDiagnosticSettings_CreateOrUpdate", "tags": [ "ServiceDiagnosticSettings" ], "description": "Create or update new diagnostic settings for the specified resource. **WARNING**: This method will be deprecated in future releases.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "name": "resourceUri", "in": "path", "description": "The fully qualified Azure Resource manager identifier of the resource.", "required": true, "type": "string", "x-ms-skip-url-encoding": true }, { "name": "parameters", "in": "body", "description": "Parameters supplied to the operation.", "required": true, "schema": { "$ref": "#/definitions/ServiceDiagnosticSettingsResource" } } ], "responses": { "200": { "description": "Resource 'ServiceDiagnosticSettingsResource' update operation succeeded", "schema": { "$ref": "#/definitions/ServiceDiagnosticSettingsResource" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Microsoft.Common.ErrorResponse" } } }, "x-ms-examples": { "Create or update a service diagnostic setting": { "$ref": "./examples/createOrUpdateServiceDiagnosticSetting.json" } } }, "patch": { "operationId": "ServiceDiagnosticSettings_Update", "description": "Updates an existing ServiceDiagnosticSettingsResource. To update other fields use the CreateOrUpdate method. **WARNING**: This method will be deprecated in future releases.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "name": "resourceUri", "in": "path", "description": "The fully qualified Azure Resource manager identifier of the resource.", "required": true, "type": "string", "x-ms-skip-url-encoding": true }, { "name": "serviceDiagnosticSettingsResource", "in": "body", "description": "Parameters supplied to the operation.", "required": true, "schema": { "$ref": "#/definitions/ServiceDiagnosticSettingsResourcePatch" } } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/ServiceDiagnosticSettingsResource" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Microsoft.Common.ErrorResponse" } } }, "x-ms-examples": { "Update a service diagnostic setting": { "$ref": "./examples/updateServiceDiagnosticSetting.json" } } } } }, "definitions": { "LogSettings": { "type": "object", "description": "Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular log.", "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." }, "enabled": { "type": "boolean", "description": "a value indicating whether this log is enabled." }, "retentionPolicy": { "$ref": "#/definitions/Microsoft.Common.RetentionPolicy", "description": "the retention policy for this log." } }, "required": [ "enabled" ] }, "MetricSettings": { "type": "object", "description": "Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular metric.", "properties": { "timeGrain": { "type": "string", "format": "duration", "description": "the timegrain of the metric in ISO8601 format." }, "enabled": { "type": "boolean", "description": "a value indicating whether this timegrain is enabled." }, "retentionPolicy": { "$ref": "#/definitions/Microsoft.Common.RetentionPolicy", "description": "the retention policy for this timegrain." } }, "required": [ "timeGrain", "enabled" ] }, "Microsoft.Common.ErrorResponse": { "type": "object", "description": "Describes the format of Error response.", "properties": { "code": { "type": "string", "description": "Error code" }, "message": { "type": "string", "description": "Error message indicating why the operation failed." } } }, "Microsoft.Common.RetentionPolicy": { "type": "object", "description": "Specifies the retention policy for the log.", "properties": { "enabled": { "type": "boolean", "description": "a value indicating whether the retention policy is enabled." }, "days": { "type": "integer", "format": "int32", "description": "the number of days for the retention in days. A value of 0 will retain the events indefinitely.", "minimum": 0 } }, "required": [ "enabled", "days" ] }, "ServiceDiagnosticSettings": { "type": "object", "description": "The diagnostic settings for service.", "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 service bus namespace in which you would like to have Event Hubs created for streaming Diagnostic Logs. The rule ID is of the format: '{service bus resource ID}/authorizationrules/{key name}'." }, "eventHubAuthorizationRuleId": { "type": "string", "description": "The resource Id for the event hub namespace authorization rule." }, "metrics": { "type": "array", "description": "the list of metric settings.", "items": { "$ref": "#/definitions/MetricSettings" } }, "logs": { "type": "array", "description": "the list of logs settings.", "items": { "$ref": "#/definitions/LogSettings" } }, "workspaceId": { "type": "string", "description": "The workspace ID (resource ID of a Log Analytics workspace) for a 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" } } }, "ServiceDiagnosticSettingsResource": { "type": "object", "description": "Description of a service diagnostic setting", "properties": { "properties": { "$ref": "#/definitions/ServiceDiagnosticSettings", "description": "The service diagnostics settings of the resource.", "x-ms-client-flatten": true }, "location": { "type": "string", "description": "Resource location", "x-ms-mutability": [ "read", "create" ] }, "tags": { "type": "object", "description": "Resource tags", "additionalProperties": { "type": "string" } } }, "required": [ "location" ], "allOf": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" } ] }, "ServiceDiagnosticSettingsResourcePatch": { "type": "object", "description": "Service diagnostic setting resource for patch operations", "properties": { "tags": { "type": "object", "description": "Resource tags", "additionalProperties": { "type": "string" } }, "properties": { "$ref": "#/definitions/ServiceDiagnosticSettings", "description": "The service diagnostics settings for an update operation.", "x-ms-client-flatten": true } } } }, "parameters": {} }