diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/activityLogAlerts_API.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/activityLogAlerts_API.json new file mode 100644 index 000000000000..80019dd90eb0 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/activityLogAlerts_API.json @@ -0,0 +1,540 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure Activity Log Alerts API", + "description": "API for Azure Activity Log Alert rules CRUD operations.", + "version": "2020-10-01", + "x-ms-code-generation-settings": { + "name": "MonitorManagementClient" + } + }, + "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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/activityLogAlerts/{activityLogAlertName}": { + "put": { + "description": "Create a new Activity Log Alert rule or update an existing one.", + "operationId": "ActivityLogAlerts_CreateOrUpdate", + "x-ms-examples": { + "Create or update an Activity Log Alert rule": { + "$ref": "./examples/ActivityLogAlertRule_CreateOrUpdate.json" + }, + "Create or update an Activity Log Alert rule with 'anyOf' condition": { + "$ref": "./examples/ActivityLogAlertRule_CreateOrUpdateRuleWithAnyOfCondition.json" + }, + "Create or update an Activity Log Alert rule with 'containsAny'": { + "$ref": "./examples/ActivityLogAlertRule_CreateOrUpdateRuleWithContainsAny.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ActivityLogAlertNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "activityLogAlertRule", + "description": "The Activity Log Alert rule to create or use for the update.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ActivityLogAlertResource" + } + } + ], + "responses": { + "200": { + "description": "An existing Activity Log Alert rule was successfully updated.", + "schema": { + "$ref": "#/definitions/ActivityLogAlertResource" + } + }, + "201": { + "description": "A new Activity Log Alert rule was successfully created.", + "schema": { + "$ref": "#/definitions/ActivityLogAlertResource" + } + }, + "default": { + "description": "An error occurred and the Activity Log Alert rule could not be created or updated.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "get": { + "description": "Get an Activity Log Alert rule.", + "operationId": "ActivityLogAlerts_Get", + "x-ms-examples": { + "Get an Activity Log Alert rule": { + "$ref": "./examples/ActivityLogAlertRule_Get.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ActivityLogAlertNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request succeeded.", + "schema": { + "$ref": "#/definitions/ActivityLogAlertResource" + } + }, + "default": { + "description": "An error occurred and the Activity Log Alert rule could not be retrieved.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "description": "Delete an Activity Log Alert rule.", + "operationId": "ActivityLogAlerts_Delete", + "x-ms-examples": { + "Delete an Activity Log Alert rule": { + "$ref": "./examples/ActivityLogAlertRule_Delete.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ActivityLogAlertNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The Activity Log Alert rule was successfully deleted." + }, + "204": { + "description": "The Activity Log Alert rule does not exist. It may have already been deleted." + }, + "default": { + "description": "An error occurred and the Activity Log Alert rule could not be deleted.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "patch": { + "description": "Updates 'tags' and 'enabled' fields in an existing Alert rule. This method is used to update the Alert rule tags, and to enable or disable the Alert rule. To update other fields use CreateOrUpdate operation.", + "operationId": "ActivityLogAlerts_Update", + "x-ms-examples": { + "Patch an Activity Log Alert rule": { + "$ref": "./examples/ActivityLogAlertRule_Update.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ActivityLogAlertNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "activityLogAlertRulePatch", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/AlertRulePatchObject" + }, + "description": "Parameters supplied to the operation." + } + ], + "responses": { + "200": { + "description": "An existing Activity Log Alert rule was successfully updated.", + "schema": { + "$ref": "#/definitions/ActivityLogAlertResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/activityLogAlerts": { + "get": { + "description": "Get a list of all Activity Log Alert rules in a subscription.", + "operationId": "ActivityLogAlerts_ListBySubscriptionId", + "x-ms-examples": { + "Get list of all Activity Log Alert rules under a subscription": { + "$ref": "./examples/ActivityLogAlertRule_ListBySubscriptionId.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request succeeded.", + "schema": { + "$ref": "#/definitions/AlertRuleList" + } + }, + "default": { + "description": "An error occurred and the list of Activity Log Alert rules could not be retrieved.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/activityLogAlerts": { + "get": { + "description": "Get a list of all Activity Log Alert rules in a resource group.", + "operationId": "ActivityLogAlerts_ListByResourceGroup", + "x-ms-examples": { + "List activity log alerts": { + "$ref": "./examples/ActivityLogAlertRule_ListByResourceGroupName.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request succeeded.", + "schema": { + "$ref": "#/definitions/AlertRuleList" + } + }, + "default": { + "description": "An error occurred and the list of Activity Log Alert rules could not be retrieved.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "AzureResource": { + "description": "An Azure resource object.", + "x-ms-azure-resource": true, + "type": "object", + "properties": { + "id": { + "description": "The resource Id.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "The name of the resource.", + "type": "string", + "readOnly": true + }, + "type": { + "description": "The type of the resource.", + "type": "string", + "readOnly": true + }, + "location": { + "description": "The location of the resource. Since Azure Activity Log Alerts is a global service, the location of the rules should always be 'global'.", + "type": "string", + "default": "global", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "tags": { + "description": "The tags of the resource.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "ActivityLogAlertResource": { + "description": "An Activity Log Alert rule resource.", + "allOf": [ + { + "$ref": "#/definitions/AzureResource" + } + ], + "properties": { + "properties": { + "description": "The Activity Log Alert rule properties of the resource.", + "x-ms-client-flatten": true, + "$ref": "#/definitions/AlertRuleProperties" + } + } + }, + "AlertRuleList": { + "description": "A list of Activity Log Alert rules.", + "properties": { + "value": { + "description": "The list of Activity Log Alert rules.", + "type": "array", + "items": { + "$ref": "#/definitions/ActivityLogAlertResource" + } + }, + "nextLink": { + "description": "Provides the link to retrieve the next set of elements.", + "type": "string" + } + } + }, + "AlertRuleProperties": { + "description": "An Azure Activity Log Alert rule.", + "type": "object", + "properties": { + "scopes": { + "description": "A list of resource IDs that will be used as prefixes. The alert will only apply to Activity Log events with resource IDs that fall under one of these prefixes. This list must include at least one item.", + "type": "array", + "items": { + "type": "string" + } + }, + "condition": { + "description": "The condition that will cause this alert to activate.", + "$ref": "#/definitions/AlertRuleAllOfCondition" + }, + "actions": { + "description": "The actions that will activate when the condition is met.", + "$ref": "#/definitions/ActionList" + }, + "enabled": { + "description": "Indicates whether this Activity Log Alert rule is enabled. If an Activity Log Alert rule is not enabled, then none of its actions will be activated.", + "type": "boolean", + "default": true + }, + "description": { + "description": "A description of this Activity Log Alert rule.", + "type": "string" + } + }, + "required": [ + "scopes", + "condition", + "actions" + ] + }, + "AlertRuleAllOfCondition": { + "description": "An Activity Log Alert rule condition that is met when all its member conditions are met.", + "type": "object", + "properties": { + "allOf": { + "description": "The list of Activity Log Alert rule conditions.", + "type": "array", + "items": { + "$ref": "#/definitions/AlertRuleAnyOfOrLeafCondition" + } + } + }, + "required": [ + "allOf" + ] + }, + "AlertRuleAnyOfOrLeafCondition": { + "description": "An Activity Log Alert rule condition that is met when all its member conditions are met.\nEach condition can be of one of the following types:\n__Important__: Each type has its unique subset of properties. Properties from different types CANNOT exist in one condition.\n * __Leaf Condition -__ must contain 'field' and either 'equals' or 'containsAny'.\n _Please note, 'anyOf' should __not__ be set in a Leaf Condition._\n * __AnyOf Condition -__ must contain __only__ 'anyOf' (which is an array of Leaf Conditions).\n _Please note, 'field', 'equals' and 'containsAny' should __not__ be set in an AnyOf Condition._\n", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/AlertRuleLeafCondition" + } + ], + "properties": { + "anyOf": { + "title": "An Activity Log Alert rule 'anyOf' condition.", + "description": "An Activity Log Alert rule condition that is met when at least one of its member leaf conditions are met.", + "type": "array", + "items": { + "$ref": "#/definitions/AlertRuleLeafCondition" + } + } + } + }, + "AlertRuleLeafCondition": { + "description": "An Activity Log Alert rule condition that is met by comparing the field and value of an Activity Log event.\nThis condition must contain 'field' and either 'equals' or 'containsAny'.", + "type": "object", + "properties": { + "field": { + "description": "The name of the Activity Log event's field that this condition will examine.\nThe possible values for this field are (case-insensitive): 'resourceId', 'category', 'caller', 'level', 'operationName', 'resourceGroup', 'resourceProvider', 'status', 'subStatus', 'resourceType', or anything beginning with 'properties'.", + "type": "string" + }, + "equals": { + "description": "The value of the event's field will be compared to this value (case-insensitive) to determine if the condition is met.", + "type": "string" + }, + "containsAny": { + "description": "The value of the event's field will be compared to the values in this array (case-insensitive) to determine if the condition is met.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "ActionList": { + "description": "A list of Activity Log Alert rule actions.", + "properties": { + "actionGroups": { + "description": "The list of the Action Groups.", + "type": "array", + "items": { + "$ref": "#/definitions/ActionGroup" + } + } + } + }, + "ActionGroup": { + "description": "A pointer to an Azure Action Group.", + "properties": { + "actionGroupId": { + "description": "The resource ID of the Action Group. This cannot be null or empty.", + "type": "string" + }, + "webhookProperties": { + "description": "the dictionary of custom properties to include with the post operation. These data are appended to the webhook payload.", + "additionalProperties": { + "type": "string" + } + } + }, + "required": [ + "actionGroupId" + ] + }, + "AlertRulePatchObject": { + "description": "An Activity Log Alert rule object for the body of patch operations.", + "properties": { + "tags": { + "description": "The resource tags", + "additionalProperties": { + "type": "string" + } + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/AlertRulePatchProperties", + "description": "The activity log alert settings for an update operation." + } + } + }, + "AlertRulePatchProperties": { + "description": "An Activity Log Alert rule properties for patch operations.", + "properties": { + "enabled": { + "description": "Indicates whether this Activity Log Alert rule is enabled. If an Activity Log Alert rule is not enabled, then none of its actions will be activated.", + "type": "boolean", + "default": true + } + } + }, + "ErrorResponse": { + "description": "The error response.", + "type": "object", + "properties": { + "code": { + "description": "The error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "The error message indicating why the operation failed.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ActivityLogAlertNameParameter": { + "name": "activityLogAlertName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Activity Log Alert rule.", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_CreateOrUpdate.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_CreateOrUpdate.json new file mode 100644 index 000000000000..b05de8c28612 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_CreateOrUpdate.json @@ -0,0 +1,121 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "resourceGroupName": "MyResourceGroup", + "activityLogAlertName": "SampleActivityLogAlertRule", + "api-version": "2020-10-01", + "activityLogAlertRule": { + "location": "Global", + "tags": {}, + "properties": { + "scopes": [ + "/subscriptions/187f412d-1758-44d9-b052-169e2564721d" + ], + "condition": { + "allOf": [ + { + "field": "category", + "equals": "Administrative" + }, + { + "field": "level", + "equals": "Error" + } + ] + }, + "actions": { + "actionGroups": [ + { + "actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/Microsoft.Insights/actionGroups/SampleActionGroup", + "webhookProperties": { + "sampleWebhookProperty": "SamplePropertyValue" + } + } + ] + }, + "enabled": true, + "description": "Description of sample Activity Log Alert rule." + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/microsoft.insights/activityLogAlerts/SampleActivityLogAlertRule", + "type": "Microsoft.Insights/ActivityLogAlerts", + "name": "SampleActivityLogAlertRule", + "location": "Global", + "tags": {}, + "properties": { + "scopes": [ + "subscriptions/187f412d-1758-44d9-b052-169e2564721d" + ], + "condition": { + "allOf": [ + { + "field": "Category", + "equals": "Administrative" + }, + { + "field": "Level", + "equals": "Error" + } + ] + }, + "actions": { + "actionGroups": [ + { + "actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/microsoft.insights/actionGroups/SampleActionGroup", + "webhookProperties": { + "sampleWebhookProperty": "SamplePropertyValue" + } + } + ] + }, + "enabled": true, + "description": "Description of sample Activity Log Alert rule." + } + } + }, + "201": { + "headers": {}, + "body": { + "id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/microsoft.insights/activityLogAlerts/SampleActivityLogAlertRule", + "type": "Microsoft.Insights/ActivityLogAlerts", + "name": "SampleActivityLogAlertRule", + "location": "Global", + "tags": {}, + "properties": { + "scopes": [ + "subscriptions/187f412d-1758-44d9-b052-169e2564721d" + ], + "condition": { + "allOf": [ + { + "field": "Category", + "equals": "Administrative" + }, + { + "field": "Level", + "equals": "Error" + } + ] + }, + "actions": { + "actionGroups": [ + { + "actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/microsoft.insights/actionGroups/SampleActionGroup", + "webhookProperties": { + "sampleWebhookProperty": "SamplePropertyValue" + } + } + ] + }, + "enabled": true, + "description": "Description of sample Activity Log Alert rule." + } + } + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_CreateOrUpdateRuleWithAnyOfCondition.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_CreateOrUpdateRuleWithAnyOfCondition.json new file mode 100644 index 000000000000..a1351e50c9e9 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_CreateOrUpdateRuleWithAnyOfCondition.json @@ -0,0 +1,145 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "resourceGroupName": "MyResourceGroup", + "activityLogAlertName": "SampleActivityLogAlertRuleWithAnyOfCondition", + "api-version": "2020-10-01", + "activityLogAlertRule": { + "location": "Global", + "tags": {}, + "properties": { + "scopes": [ + "subscriptions/187f412d-1758-44d9-b052-169e2564721d" + ], + "condition": { + "allOf": [ + { + "field": "category", + "equals": "ServiceHealth" + }, + { + "anyOf": [ + { + "field": "properties.incidentType", + "equals": "Incident" + }, + { + "field": "properties.incidentType", + "equals": "Maintenance" + } + ] + } + ] + }, + "actions": { + "actionGroups": [ + { + "actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/Microsoft.Insights/actionGroups/SampleActionGroup", + "webhookProperties": { + "sampleWebhookProperty": "SamplePropertyValue" + } + } + ] + }, + "enabled": true, + "description": "Description of sample Activity Log Alert rule with 'anyOf' condition." + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/microsoft.insights/activityLogAlerts/SampleActivityLogAlertRuleWithAnyOfCondition", + "type": "Microsoft.Insights/ActivityLogAlerts", + "name": "SampleActivityLogAlertRuleWithAnyOfCondition", + "location": "Global", + "tags": {}, + "properties": { + "scopes": [ + "subscriptions/187f412d-1758-44d9-b052-169e2564721d" + ], + "condition": { + "allOf": [ + { + "field": "category", + "equals": "ServiceHealth" + }, + { + "anyOf": [ + { + "field": "properties.incidentType", + "equals": "Incident" + }, + { + "field": "properties.incidentType", + "equals": "Maintenance" + } + ] + } + ] + }, + "actions": { + "actionGroups": [ + { + "actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/Microsoft.Insights/actionGroups/SampleActionGroup", + "webhookProperties": { + "sampleWebhookProperty": "SamplePropertyValue" + } + } + ] + }, + "enabled": true, + "description": "Description of sample Activity Log Alert rule with 'anyOf' condition." + } + } + }, + "201": { + "headers": {}, + "body": { + "id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/microsoft.insights/activityLogAlerts/SampleActivityLogAlertRuleWithAnyOfCondition", + "type": "Microsoft.Insights/ActivityLogAlerts", + "name": "SampleActivityLogAlertRuleWithAnyOfCondition", + "location": "Global", + "tags": {}, + "properties": { + "scopes": [ + "subscriptions/187f412d-1758-44d9-b052-169e2564721d" + ], + "condition": { + "allOf": [ + { + "field": "category", + "equals": "ServiceHealth" + }, + { + "anyOf": [ + { + "field": "properties.incidentType", + "equals": "Incident" + }, + { + "field": "properties.incidentType", + "equals": "Maintenance" + } + ] + } + ] + }, + "actions": { + "actionGroups": [ + { + "actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/Microsoft.Insights/actionGroups/SampleActionGroup", + "webhookProperties": { + "sampleWebhookProperty": "SamplePropertyValue" + } + } + ] + }, + "enabled": true, + "description": "Description of sample Activity Log Alert rule with 'anyOf' condition." + } + } + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_CreateOrUpdateRuleWithContainsAny.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_CreateOrUpdateRuleWithContainsAny.json new file mode 100644 index 000000000000..d856ff18fc9a --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_CreateOrUpdateRuleWithContainsAny.json @@ -0,0 +1,130 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "resourceGroupName": "MyResourceGroup", + "activityLogAlertName": "SampleActivityLogAlertRuleWithContainsAny", + "api-version": "2020-10-01", + "activityLogAlertRule": { + "location": "Global", + "tags": {}, + "properties": { + "scopes": [ + "subscriptions/187f412d-1758-44d9-b052-169e2564721d" + ], + "condition": { + "allOf": [ + { + "field": "category", + "equals": "ServiceHealth" + }, + { + "field": "properties.impactedServices[*].ImpactedRegions[*].RegionName", + "containsAny": [ + "North Europe", + "West Europe" + ] + } + ] + }, + "actions": { + "actionGroups": [ + { + "actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/Microsoft.Insights/actionGroups/SampleActionGroup", + "webhookProperties": { + "sampleWebhookProperty": "SamplePropertyValue" + } + } + ] + }, + "enabled": true, + "description": "Description of sample Activity Log Alert rule with 'containsAny'." + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/microsoft.insights/activityLogAlerts/SampleActivityLogAlertRuleWithContainsAny", + "type": "Microsoft.Insights/ActivityLogAlerts", + "name": "SampleActivityLogAlertRuleWithContainsAny", + "location": "Global", + "tags": {}, + "properties": { + "scopes": [ + "subscriptions/187f412d-1758-44d9-b052-169e2564721d" + ], + "condition": { + "allOf": [ + { + "field": "category", + "equals": "ServiceHealth" + }, + { + "field": "properties.impactedServices[*].ImpactedRegions[*].RegionName", + "containsAny": [ + "North Europe", + "West Europe" + ] + } + ] + }, + "actions": { + "actionGroups": [ + { + "actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/Microsoft.Insights/actionGroups/SampleActionGroup", + "webhookProperties": { + "sampleWebhookProperty": "SamplePropertyValue" + } + } + ] + }, + "enabled": true, + "description": "Description of sample Activity Log Alert rule with 'containsAny'." + } + } + }, + "201": { + "headers": {}, + "body": { + "id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/microsoft.insights/activityLogAlerts/SampleActivityLogAlertRuleWithContainsAny", + "type": "Microsoft.Insights/ActivityLogAlerts", + "name": "SampleActivityLogAlertRuleWithContainsAny", + "location": "Global", + "tags": {}, + "properties": { + "scopes": [ + "subscriptions/187f412d-1758-44d9-b052-169e2564721d" + ], + "condition": { + "allOf": [ + { + "field": "category", + "equals": "ServiceHealth" + }, + { + "field": "properties.impactedServices[*].ImpactedRegions[*].RegionName", + "containsAny": [ + "North Europe", + "West Europe" + ] + } + ] + }, + "actions": { + "actionGroups": [ + { + "actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/Microsoft.Insights/actionGroups/SampleActionGroup", + "webhookProperties": { + "sampleWebhookProperty": "SamplePropertyValue" + } + } + ] + }, + "enabled": true, + "description": "Description of sample Activity Log Alert rule with 'containsAny'." + } + } + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_Delete.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_Delete.json new file mode 100644 index 000000000000..09fe826c4c06 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_Delete.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "resourceGroupName": "MyResourceGroup", + "activityLogAlertName": "SampleActivityLogAlertRule", + "api-version": "2020-10-01" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_Get.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_Get.json new file mode 100644 index 000000000000..1f9aa114fb61 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_Get.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "resourceGroupName": "MyResourceGroup", + "activityLogAlertName": "SampleActivityLogAlertRule", + "api-version": "2020-10-01" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/microsoft.insights/activityLogAlerts/SampleActivityLogAlertRule", + "type": "Microsoft.Insights/ActivityLogAlerts", + "name": "SampleActivityLogAlertRule", + "location": "Global", + "tags": {}, + "properties": { + "scopes": [ + "subscriptions/187f412d-1758-44d9-b052-169e2564721d" + ], + "condition": { + "allOf": [ + { + "field": "category", + "equals": "Administrative" + }, + { + "field": "level", + "equals": "Error" + } + ] + }, + "actions": { + "actionGroups": [ + { + "actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/microsoft.insights/actionGroups/SampleActionGroup", + "webhookProperties": { + "sampleWebhookProperty": "SamplePropertyValue" + } + } + ] + }, + "enabled": true, + "description": "Description of sample Activity Log Alert rule." + } + } + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_ListByResourceGroupName.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_ListByResourceGroupName.json new file mode 100644 index 000000000000..2ac7b7c21839 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_ListByResourceGroupName.json @@ -0,0 +1,86 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "resourceGroupName": "MyResourceGroup", + "api-version": "2020-10-01" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/microsoft.insights/activityLogAlerts/SampleActivityLogAlertRule1", + "type": "Microsoft.Insights/ActivityLogAlerts", + "name": "SampleActivityLogAlertRule1", + "location": "Global", + "tags": {}, + "properties": { + "scopes": [ + "subscriptions/187f412d-1758-44d9-b052-169e2564721d" + ], + "condition": { + "allOf": [ + { + "field": "category", + "equals": "Administrative" + }, + { + "field": "level", + "equals": "Error" + } + ] + }, + "actions": { + "actionGroups": [ + { + "actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/microsoft.insights/actionGroups/SampleActionGroup", + "webhookProperties": { + "sampleWebhookProperty": "SamplePropertyValue" + } + } + ] + }, + "enabled": true, + "description": "Description of sample Activity Log Alert rule." + } + }, + { + "id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/microsoft.insights/activityLogAlerts/SampleActivityLogAlertRule2", + "type": "Microsoft.Insights/ActivityLogAlerts", + "name": "SampleActivityLogAlertRule2", + "location": "Global", + "tags": {}, + "properties": { + "scopes": [ + "subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup" + ], + "condition": { + "allOf": [ + { + "field": "category", + "equals": "Administrative" + }, + { + "field": "status", + "equals": "Succeeded" + } + ] + }, + "actions": { + "actionGroups": [ + { + "actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/microsoft.insights/actionGroups/SampleActionGroup", + "webhookProperties": {} + } + ] + }, + "enabled": true, + "description": "Description of sample Activity Log Alert rule." + } + } + ] + } + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_ListBySubscriptionId.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_ListBySubscriptionId.json new file mode 100644 index 000000000000..980da46edb29 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_ListBySubscriptionId.json @@ -0,0 +1,85 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "api-version": "2020-10-01" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup1/providers/microsoft.insights/activityLogAlerts/SampleActivityLogAlertRule1", + "type": "Microsoft.Insights/ActivityLogAlerts", + "name": "SampleActivityLogAlertRule1", + "location": "Global", + "tags": {}, + "properties": { + "scopes": [ + "subscriptions/187f412d-1758-44d9-b052-169e2564721d" + ], + "condition": { + "allOf": [ + { + "field": "category", + "equals": "Administrative" + }, + { + "field": "level", + "equals": "Error" + } + ] + }, + "actions": { + "actionGroups": [ + { + "actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup1/providers/microsoft.insights/actionGroups/SampleActionGroup", + "webhookProperties": { + "sampleWebhookProperty": "SamplePropertyValue" + } + } + ] + }, + "enabled": true, + "description": "Description of sample Activity Log Alert rule." + } + }, + { + "id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup2/providers/microsoft.insights/activityLogAlerts/SampleActivityLogAlertRule2", + "type": "Microsoft.Insights/ActivityLogAlerts", + "name": "SampleActivityLogAlertRule2", + "location": "Global", + "tags": {}, + "properties": { + "scopes": [ + "subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup2" + ], + "condition": { + "allOf": [ + { + "field": "category", + "equals": "Administrative" + }, + { + "field": "status", + "equals": "Succeeded" + } + ] + }, + "actions": { + "actionGroups": [ + { + "actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup2/providers/microsoft.insights/actionGroups/SampleActionGroup", + "webhookProperties": {} + } + ] + }, + "enabled": true, + "description": "Description of sample Activity Log Alert rule." + } + } + ] + } + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_Update.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_Update.json new file mode 100644 index 000000000000..180df83963b6 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_Update.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "resourceGroupName": "MyResourceGroup", + "activityLogAlertName": "SampleActivityLogAlertRule", + "api-version": "2020-10-01", + "activityLogAlertRulePatch": { + "tags": { + "key1": "value1", + "key2": "value2" + }, + "properties": { + "enabled": false + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/microsoft.insights/activityLogAlerts/SampleActivityLogAlertRule", + "type": "Microsoft.Insights/ActivityLogAlerts", + "name": "SampleActivityLogAlertRule", + "location": "Global", + "tags": { + "key1": "value1", + "key2": "value2" + }, + "properties": { + "scopes": [ + "/subscriptions/187f412d-1758-44d9-b052-169e2564721d" + ], + "condition": { + "allOf": [ + { + "field": "category", + "equals": "Administrative" + }, + { + "field": "level", + "equals": "Error" + } + ] + }, + "actions": { + "actionGroups": [ + { + "actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/microsoft.insights/actionGroups/SampleActionGroup", + "webhookProperties": { + "sampleWebhookProperty": "SamplePropertyValue" + } + } + ] + }, + "enabled": false, + "description": "Description of sample Activity Log Alert rule." + } + } + } + } +} diff --git a/specification/monitor/resource-manager/readme.az.md b/specification/monitor/resource-manager/readme.az.md index c7734d5fa721..dd6423900a44 100644 --- a/specification/monitor/resource-manager/readme.az.md +++ b/specification/monitor/resource-manager/readme.az.md @@ -52,7 +52,7 @@ directive: cli: cli-directive: -# -------- data-collection rule -------- +# -------- data-collection rule --------- - where: group: DataCollectionRules param: dataCollectionRuleName diff --git a/specification/monitor/resource-manager/readme.azureresourceschema.md b/specification/monitor/resource-manager/readme.azureresourceschema.md index 834fb5cbf8bf..bb8ec8b61f83 100644 --- a/specification/monitor/resource-manager/readme.azureresourceschema.md +++ b/specification/monitor/resource-manager/readme.azureresourceschema.md @@ -6,6 +6,7 @@ These settings apply only when `--azureresourceschema` is specified on the comma ``` yaml $(azureresourceschema) && $(multiapi) batch: + - tag: schema-insights-2020-10-01 - tag: schema-insights-2020-05-01-preview - tag: schema-insights-2020-01-01-preview - tag: schema-insights-2019-11-01-preview @@ -88,7 +89,16 @@ input-file: - Microsoft.Insights/stable/2019-06-01/actionGroups_API.json ``` +### Tag: schema-insights-2020-10-01 and azureresourceschema +``` yaml $(tag) == 'schema-insights-2020-10-01' && $(azureresourceschema) +output-folder: $(azureresourceschema-folder)/schemas + +# all the input files in this apiVersion +input-file: + - Microsoft.Insights/stable/2020-10-01/activityLogAlerts_API.json + +``` ### Tag: schema-insights-2019-03-01 and azureresourceschema ``` yaml $(tag) == 'schema-insights-2019-03-01' && $(azureresourceschema) diff --git a/specification/monitor/resource-manager/readme.md b/specification/monitor/resource-manager/readme.md index 50b247de6b6f..56584bc94ec5 100644 --- a/specification/monitor/resource-manager/readme.md +++ b/specification/monitor/resource-manager/readme.md @@ -22,25 +22,29 @@ To see additional help and options, run: ### Basic Information -There are the global settings for the Azure Monitor Control Service (AMCS) extension. -``` yaml $(AMCS) -tag: package-2019-11-01-preview-only -``` - These are the global settings for the MonitorClient API. ``` yaml title: MonitorClient description: Monitor Management Client openapi-type: arm -tag: package-2019-06 +tag: package-2020-10 +``` + +### Tag: package-2020-10 + +These settings apply only when `--tag=package-2020-10` is specified on the command line. + +``` yaml $(tag) == 'package-2020-10' +input-file: + - Microsoft.Insights/stable/2020-10-01/activityLogAlerts_API.json ``` ### Tag: package-2020-05-preview These settings apply only when `--tag=package-2020-05-preview` is specified on the command line. -```yaml $(tag) == 'package-2020-05-preview' +``` yaml $(tag) == 'package-2020-05-preview' input-file: - Microsoft.Insights/preview/2020-05-01-preview/scheduledQueryRule_API.json ``` @@ -49,16 +53,46 @@ input-file: 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' +``` 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. + +``` yaml $(tag) == 'package-2020-03' +input-file: +- Microsoft.Insights/stable/2015-04-01/autoscale_API.json +- Microsoft.Insights/stable/2015-04-01/operations_API.json +- Microsoft.Insights/stable/2016-03-01/alertRulesIncidents_API.json +- Microsoft.Insights/stable/2016-03-01/alertRules_API.json +- Microsoft.Insights/stable/2016-03-01/logProfiles_API.json +- Microsoft.Insights/preview/2017-05-01-preview/diagnosticsSettings_API.json +- Microsoft.Insights/preview/2017-05-01-preview/diagnosticsSettingsCategories_API.json +- Microsoft.Insights/stable/2019-06-01/actionGroups_API.json +- Microsoft.Insights/stable/2017-04-01/activityLogAlerts_API.json +- Microsoft.Insights/stable/2015-04-01/activityLogs_API.json +- Microsoft.Insights/stable/2015-04-01/eventCategories_API.json +- Microsoft.Insights/stable/2015-04-01/tenantActivityLogs_API.json +- Microsoft.Insights/stable/2018-01-01/metricDefinitions_API.json +- Microsoft.Insights/stable/2018-01-01/metrics_API.json +- Microsoft.Insights/preview/2017-11-01-preview/baseline_API.json +- Microsoft.Insights/preview/2017-11-01-preview/calculateBaseline_API.json +- Microsoft.Insights/stable/2019-03-01/metricBaselines_API.json +- Microsoft.Insights/stable/2018-03-01/metricAlert_API.json +- Microsoft.Insights/stable/2018-04-16/scheduledQueryRule_API.json +- Microsoft.Insights/preview/2017-12-01-preview/metricNamespaces_API.json +- Microsoft.Insights/preview/2018-11-27-preview/vmInsightsOnboarding_API.json +- Microsoft.Insights/preview/2019-10-17-preview/privateLinkScopes_API.json +``` + ### Tag: package-2019-11 These settings apply only when `--tag=package-2019-11` is specified on the command line. -```yaml $(tag) == 'package-2019-11' +``` yaml $(tag) == 'package-2019-11' input-file: - Microsoft.Insights/stable/2015-04-01/autoscale_API.json - Microsoft.Insights/stable/2015-04-01/operations_API.json @@ -89,7 +123,7 @@ input-file: These settings apply only when `--tag=package-2019-10-17-preview-only` is specified on the command line. -```yaml $(tag) == 'package-2019-10-17-preview-only' +``` yaml $(tag) == 'package-2019-10-17-preview-only' input-file: - Microsoft.Insights/preview/2019-10-17-preview/privateLinkScopes_API.json ``` @@ -98,7 +132,7 @@ input-file: These settings apply only when `--tag=package-2019-06` is specified on the command line. -```yaml $(tag) == 'package-2019-06' +``` yaml $(tag) == 'package-2019-06' input-file: - Microsoft.Insights/stable/2015-04-01/autoscale_API.json - Microsoft.Insights/stable/2015-04-01/operations_API.json @@ -127,7 +161,7 @@ input-file: These settings apply only when `--tag=package-2019-03` is specified on the command line. -```yaml $(tag) == 'package-2019-03' +``` yaml $(tag) == 'package-2019-03' input-file: - Microsoft.Insights/stable/2015-04-01/autoscale_API.json - Microsoft.Insights/stable/2015-04-01/operations_API.json @@ -156,7 +190,7 @@ input-file: These settings apply only when `--tag=package-2018-11-preview` is specified on the command line. -```yaml $(tag) == 'package-2018-11-preview' +``` yaml $(tag) == 'package-2018-11-preview' input-file: - Microsoft.Insights/stable/2015-04-01/autoscale_API.json - Microsoft.Insights/stable/2015-04-01/operations_API.json @@ -204,7 +238,6 @@ input-file: - Microsoft.Insights/preview/2017-11-01-preview/calculateBaseline_API.json - Microsoft.Insights/stable/2018-03-01/metricAlert_API.json - Microsoft.Insights/stable/2018-04-16/scheduledQueryRule_API.json -- Microsoft.Insights/preview/2017-12-01-preview/metricNamespaces_API.json - Microsoft.Insights/stable/2018-09-01/metricBaselines_API.json ``` @@ -337,115 +370,104 @@ input-file: These settings apply only when `--tag=package-2019-06-01-only` is specified on the command line. -```yaml $(tag) == 'package-2019-06-01-only' +``` yaml $(tag) == 'package-2019-06-01-only' input-file: - Microsoft.Insights/stable/2019-06-01/actionGroups_API.json ``` - ### Tag: package-2019-03-01-only These settings apply only when `--tag=package-2019-03-01-only` is specified on the command line. -```yaml $(tag) == 'package-2019-03-01-only' +``` yaml $(tag) == 'package-2019-03-01-only' input-file: - Microsoft.Insights/stable/2019-03-01/actionGroups_API.json - Microsoft.Insights/stable/2019-03-01/metricBaselines_API.json ``` - ### Tag: package-2018-11-27-preview-only These settings apply only when `--tag=package-2018-11-27-preview-only` is specified on the command line. -```yaml $(tag) == 'package-2018-11-27-preview-only' +``` yaml $(tag) == 'package-2018-11-27-preview-only' input-file: - Microsoft.Insights/preview/2018-11-27-preview/vmInsightsOnboarding_API.json ``` - ### Tag: package-2018-09-01-only These settings apply only when `--tag=package-2018-09-01-only` is specified on the command line. -```yaml $(tag) == 'package-2018-09-01-only' +``` yaml $(tag) == 'package-2018-09-01-only' input-file: - Microsoft.Insights/stable/2018-09-01/actionGroups_API.json - Microsoft.Insights/stable/2018-09-01/baseline_API.json - Microsoft.Insights/stable/2018-09-01/calculateBaseline_API.json -- Microsoft.Insights/stable/2018-09-01/metricBaselines_API.json ``` - ### Tag: package-2018-06-01-preview-only These settings apply only when `--tag=package-2018-06-01-preview-only` is specified on the command line. -```yaml $(tag) == 'package-2018-06-01-preview-only' +``` yaml $(tag) == 'package-2018-06-01-preview-only' input-file: - Microsoft.Insights/preview/2018-06-01-preview/guestDiagnosticSettingsAssociation_API.json - Microsoft.Insights/preview/2018-06-01-preview/guestDiagnosticSettings_API.json ``` - ### Tag: package-2018-04-16-only These settings apply only when `--tag=package-2018-04-16-only` is specified on the command line. -```yaml $(tag) == 'package-2018-04-16-only' +``` yaml $(tag) == 'package-2018-04-16-only' input-file: - Microsoft.Insights/stable/2018-04-16/scheduledQueryRule_API.json ``` - ### Tag: package-2018-03-01-only These settings apply only when `--tag=package-2018-03-01-only` is specified on the command line. -```yaml $(tag) == 'package-2018-03-01-only' +``` yaml $(tag) == 'package-2018-03-01-only' input-file: - Microsoft.Insights/stable/2018-03-01/actionGroups_API.json - Microsoft.Insights/stable/2018-03-01/metricAlert_API.json ``` - ### Tag: package-2018-01-01-only These settings apply only when `--tag=package-2018-01-01-only` is specified on the command line. -```yaml $(tag) == 'package-2018-01-01-only' +``` yaml $(tag) == 'package-2018-01-01-only' input-file: - Microsoft.Insights/stable/2018-01-01/metricDefinitions_API.json - Microsoft.Insights/stable/2018-01-01/metrics_API.json ``` - ### Tag: package-2017-12-01-preview-only These settings apply only when `--tag=package-2017-12-01-preview-only` is specified on the command line. -```yaml $(tag) == 'package-2017-12-01-preview-only' +``` yaml $(tag) == 'package-2017-12-01-preview-only' input-file: - Microsoft.Insights/preview/2017-12-01-preview/metricNamespaces_API.json ``` - ### Tag: package-2017-11-01-preview-only These settings apply only when `--tag=package-2017-11-01-preview-only` is specified on the command line. -```yaml $(tag) == 'package-2017-11-01-preview-only' +``` yaml $(tag) == 'package-2017-11-01-preview-only' input-file: - Microsoft.Insights/preview/2017-11-01-preview/baseline_API.json - Microsoft.Insights/preview/2017-11-01-preview/calculateBaseline_API.json ``` - ### Tag: package-2017-05-01-preview-only These settings apply only when `--tag=package-2017-05-01-preview-only` is specified on the command line. -```yaml $(tag) == 'package-2017-05-01-preview-only' +``` yaml $(tag) == 'package-2017-05-01-preview-only' input-file: - Microsoft.Insights/preview/2017-05-01-preview/diagnosticsSettingsCategories_API.json - Microsoft.Insights/preview/2017-05-01-preview/diagnosticsSettings_API.json @@ -454,44 +476,40 @@ input-file: - Microsoft.Insights/preview/2017-05-01-preview/subscriptionDiagnosticsSettings_API.json ``` - ### Tag: package-2017-04-01-only These settings apply only when `--tag=package-2017-04-01-only` is specified on the command line. -```yaml $(tag) == 'package-2017-04-01-only' +``` yaml $(tag) == 'package-2017-04-01-only' input-file: - Microsoft.Insights/stable/2017-04-01/actionGroups_API.json - Microsoft.Insights/stable/2017-04-01/activityLogAlerts_API.json ``` - ### Tag: package-2017-03-01-preview-only These settings apply only when `--tag=package-2017-03-01-preview-only` is specified on the command line. -```yaml $(tag) == 'package-2017-03-01-preview-only' +``` yaml $(tag) == 'package-2017-03-01-preview-only' input-file: - Microsoft.Insights/preview/2017-03-01-preview/activityLogAlerts_API.json ``` - ### Tag: package-2016-09-01-only These settings apply only when `--tag=package-2016-09-01-only` is specified on the command line. -```yaml $(tag) == 'package-2016-09-01-only' +``` yaml $(tag) == 'package-2016-09-01-only' input-file: - Microsoft.Insights/stable/2016-09-01/metrics_API.json - Microsoft.Insights/stable/2016-09-01/serviceDiagnosticsSettings_API.json ``` - ### Tag: package-2016-03-01-only These settings apply only when `--tag=package-2016-03-01-only` is specified on the command line. -```yaml $(tag) == 'package-2016-03-01-only' +``` yaml $(tag) == 'package-2016-03-01-only' input-file: - Microsoft.Insights/stable/2016-03-01/alertRulesIncidents_API.json - Microsoft.Insights/stable/2016-03-01/alertRules_API.json @@ -499,23 +517,21 @@ input-file: - Microsoft.Insights/stable/2016-03-01/metricDefinitions_API.json ``` - ### Tag: package-2015-07-01-only These settings apply only when `--tag=package-2015-07-01-only` is specified on the command line. -```yaml $(tag) == 'package-2015-07-01-only' +``` yaml $(tag) == 'package-2015-07-01-only' input-file: - Microsoft.Insights/stable/2015-07-01/serviceDiagnosticsSettings_API.json - Microsoft.Insights/stable/2014-04-01/alertRules_API.json ``` - ### Tag: package-2015-04-01-only These settings apply only when `--tag=package-2015-04-01-only` is specified on the command line. -```yaml $(tag) == 'package-2015-04-01-only' +``` yaml $(tag) == 'package-2015-04-01-only' input-file: - Microsoft.Insights/stable/2015-04-01/activityLogs_API.json - Microsoft.Insights/stable/2015-04-01/autoscale_API.json @@ -537,6 +553,9 @@ This is not used by Autorest itself. ``` yaml $(swagger-to-sdk) swagger-to-sdk: - repo: azure-sdk-for-net + - repo: azure-sdk-for-python + after_scripts: + - python ./scripts/multiapi_init_gen.py azure-mgmt-monitor - repo: azure-sdk-for-python-track2 - repo: azure-sdk-for-java - repo: azure-sdk-for-go @@ -578,7 +597,7 @@ output-folder: $(azure-libraries-for-java-folder)/azure-mgmt-monitor ``` yaml directive: - - suppress: R3016 # DefinitionsPropertiesNamesCamelCase (to suppress the error due to odata.type) + - suppress: R3016 reason: The feature (polymorphic types) is in the process of deprecation and fixing this will require changes in the backend. - suppress: OperationsAPIImplementation from: dataCollectionRules_API.json @@ -588,33 +607,21 @@ directive: from: dataCollectionRuleAssociations_API.json where: $.paths reason: 'Operations API is defined in a separate swagger spec for Microsoft.Insights namespace (https://github.com/Azure/azure-rest-api-specs/blob/master/specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/operations_API.json)' - - suppress: R4007 - from: metricAlert_API.json - reason: 'Updating the error response to the new format would be a breaking change.' - - suppress: R4007 - from: calculateBaseline_API.json - reason: 'Updating the error response to the new format would be a breaking change.' - - suppress: R4007 - from: baseline_API.json - reason: 'Updating the error response to the new format would be a breaking change.' - - suppress: R4007 - from: metricBaselines_API.json - reason: 'Updating the error response to the new format would be a breaking change.' - - suppress: R4007 - from: alertRules_API.json + - suppress: OperationsAPIImplementation + where: $.paths + from: activityLogAlerts_API.json + reason: 'Operations API is defined in a separate swagger spec for Microsoft.Insights namespace (https://github.com/Azure/azure-rest-api-specs/blob/master/specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/operations_API.json)' + - suppress: EnumInsteadOfBoolean + where: $.definitions.AlertRuleProperties.properties.enabled + from: activityLogAlerts_API.json + reason: 'This property indicates whether the alert rule is enabled or not - it has only ''''true'''' or ''''false'''' options, so it fits boolean type.' + - suppress: EnumInsteadOfBoolean + where: $.definitions.AlertRulePatchProperties.properties.enabled + from: activityLogAlerts_API.json + reason: 'This property indicates whether the alert rule is enabled or not - it has only ''''true'''' or ''''false'''' options, so it fits boolean type.' + - suppress: DefaultErrorResponseSchema + from: activityLogAlerts_API.json reason: 'Updating the error response to the new format would be a breaking change.' - - suppress: OBJECT_ADDITIONAL_PROPERTIES - from: alertRules_API.json - where: $.definitions.AlertRuleResource - reason: 'Action is expected to receive a subclass of Resource' - - suppress: OBJECT_ADDITIONAL_PROPERTIES - from: metricAlert_API.json - where: $.definitions.MetricAlertResource - reason: 'Action is expected to receive a subclass of Resource' - - from : scheduledQueryRule_API.json - suppress: - - OBJECT_ADDITIONAL_PROPERTIES - reason: "false alarm" ``` ### Tag: profile-hybrid-2019-03-01 @@ -650,4 +657,3 @@ input-file: ## AzureResourceSchema See configuration in [readme.azureresourceschema.md](./readme.azureresourceschema.md) - diff --git a/specification/monitor/resource-manager/readme.python.md b/specification/monitor/resource-manager/readme.python.md index 54323f8f4134..6f0add2e1dea 100644 --- a/specification/monitor/resource-manager/readme.python.md +++ b/specification/monitor/resource-manager/readme.python.md @@ -108,7 +108,6 @@ Please also specify `--python-sdks-folder=