Skip to content

Commit

Permalink
Update ARM Specs (#612)
Browse files Browse the repository at this point in the history
  • Loading branch information
lawrencegripper authored Dec 18, 2024
2 parents 8ed8d2f + f5657ee commit f5ebeef
Show file tree
Hide file tree
Showing 6 changed files with 112 additions and 192 deletions.
12 changes: 6 additions & 6 deletions internal/pkg/expanders/swagger-armspecs.generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ func (e *SwaggerAPISetARMResources) loadResourceTypes() []swagger.ResourceType {
},
{
Display: "actionRules",
Endpoint: endpoints.MustGetEndpointInfoFromURL("/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/actionRules", "2024-03-01-preview"),
Endpoint: endpoints.MustGetEndpointInfoFromURL("/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/actionRules", "2021-08-08-preview"),
},
{
Display: "alertRuleRecommendations",
Expand All @@ -431,14 +431,14 @@ func (e *SwaggerAPISetARMResources) loadResourceTypes() []swagger.ResourceType {
},
{
Display: "actionRules",
Endpoint: endpoints.MustGetEndpointInfoFromURL("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules", "2024-03-01-preview"),
Endpoint: endpoints.MustGetEndpointInfoFromURL("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules", "2021-08-08-preview"),
SubResources: []swagger.ResourceType{
{
Display: "{alertProcessingRuleName}",
Endpoint: endpoints.MustGetEndpointInfoFromURL("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{alertProcessingRuleName}", "2024-03-01-preview"),
DeleteEndpoint: endpoints.MustGetEndpointInfoFromURL("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{alertProcessingRuleName}", "2024-03-01-preview"),
PatchEndpoint: endpoints.MustGetEndpointInfoFromURL("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{alertProcessingRuleName}", "2024-03-01-preview"),
PutEndpoint: endpoints.MustGetEndpointInfoFromURL("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{alertProcessingRuleName}", "2024-03-01-preview"),
Endpoint: endpoints.MustGetEndpointInfoFromURL("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{alertProcessingRuleName}", "2021-08-08-preview"),
DeleteEndpoint: endpoints.MustGetEndpointInfoFromURL("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{alertProcessingRuleName}", "2021-08-08-preview"),
PatchEndpoint: endpoints.MustGetEndpointInfoFromURL("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{alertProcessingRuleName}", "2021-08-08-preview"),
PutEndpoint: endpoints.MustGetEndpointInfoFromURL("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{alertProcessingRuleName}", "2021-08-08-preview"),
}},
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"swagger": "2.0",
"info": {
"version": "2024-03-01-preview",
"version": "2021-08-08-preview",
"title": "Azure Alerts Management Service Resource Provider",
"description": "APIs for Azure alert processing rules CRUD operations."
},
Expand Down Expand Up @@ -36,7 +36,7 @@
"$ref": "#/parameters/subscriptionId"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
"$ref": "#/parameters/api-version"
}
],
"responses": {
Expand Down Expand Up @@ -81,7 +81,7 @@
"$ref": "#/parameters/resourceGroupName"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
"$ref": "#/parameters/api-version"
}
],
"responses": {
Expand Down Expand Up @@ -133,7 +133,7 @@
"type": "string"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
"$ref": "#/parameters/api-version"
}
],
"responses": {
Expand Down Expand Up @@ -189,7 +189,7 @@
}
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
"$ref": "#/parameters/api-version"
}
],
"responses": {
Expand Down Expand Up @@ -242,12 +242,6 @@
},
"Create or update a rule that removes all action groups from all alerts in a subscription coming from a specific alert rule": {
"$ref": "./examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_from_specific_alert_rule.json"
},
"Create or update a rule that adds alerts correlation": {
"$ref": "./examples/AlertProcessingRules_Create_or_update_add_correlation.json"
},
"Create or update a rule that adds alerts correlation with correlation updates": {
"$ref": "./examples/AlertProcessingRules_Create_or_update_add_correlation_with_correlation_updates.json"
}
}
},
Expand All @@ -269,7 +263,7 @@
"type": "string"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
"$ref": "#/parameters/api-version"
}
],
"responses": {
Expand Down Expand Up @@ -331,7 +325,7 @@
"description": "Parameters supplied to the operation."
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
"$ref": "#/parameters/api-version"
}
],
"responses": {
Expand Down Expand Up @@ -378,6 +372,20 @@
"in": "path",
"required": true,
"x-ms-parameter-location": "method"
},
"api-version": {
"name": "api-version",
"description": "Client API version.",
"type": "string",
"in": "query",
"required": true,
"enum": [
"2021-08-08-preview"
],
"x-ms-enum": {
"name": "api-version",
"modelAsString": true
}
}
},
"definitions": {
Expand Down Expand Up @@ -728,8 +736,7 @@
"description": "Action that should be applied.",
"enum": [
"AddActionGroups",
"RemoveAllActionGroups",
"CorrelateAlerts"
"RemoveAllActionGroups"
],
"x-ms-enum": {
"name": "actionType",
Expand Down Expand Up @@ -770,100 +777,6 @@
}
]
},
"CorrelateAlerts": {
"x-ms-discriminator-value": "CorrelateAlerts",
"type": "object",
"description": "Add logic for alerts correlation.",
"required": [
"correlateBy",
"correlationInterval",
"priority"
],
"allOf": [
{
"$ref": "#/definitions/Action"
}
],
"properties": {
"correlateBy": {
"type": "array",
"description": "The list of conditions for the alerts correlations.",
"items": {
"$ref": "#/definitions/CorrelateBy"
},
"x-ms-identifiers": []
},
"correlationInterval": {
"type": "string",
"description": "The required duration (in ISO8601 format) for the alerts correlation."
},
"priority": {
"type": "integer",
"format": "int32",
"description": "The priority of this correlation."
},
"notificationsForCorrelatedAlerts": {
"type": "string",
"default": "SuppressAlways",
"description": "Indicates how to handle child alerts notifications.",
"enum": [
"NotifyAlways",
"SuppressAlways"
],
"x-ms-enum": {
"name": "NotificationsForCorrelatedAlerts",
"modelAsString": true
}
},
"correlationUpdates": {
"$ref": "#/definitions/CorrelationUpdates"
}
}
},
"CorrelateBy": {
"type": "object",
"description": "The logic for the correlation.",
"properties": {
"field": {
"type": "string",
"description": "The JPath of the property that the alerts should be correlated by."
}
}
},
"CorrelationUpdates": {
"type": "object",
"description": "Defines the updates to be applied for correlation.",
"properties": {
"updateType": {
"type": "string",
"description": "The type of update that needs to be performed.",
"default": "timeBased",
"enum": [
"timeBased"
],
"x-ms-enum": {
"name": "UpdateType",
"modelAsString": true
}
},
"updateInterval": {
"type": "string",
"description": "The update interval for notification updates in ISO8601 format."
},
"actionGroups": {
"type": "array",
"description": "The action group ids.",
"items": {
"type": "string"
}
}
},
"required": [
"updateType",
"updateInterval",
"actionGroups"
]
},
"AlertProcessingRulesList": {
"type": "object",
"description": "List of alert processing rules.",
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"addition_input_file_paths": [], "input_files": ["Microsoft.AlertsManagement/stable/2023-03-01/PrometheusRuleGroups.json", "Microsoft.AlertsManagement/preview/2024-01-01-preview/AlertsManagement.json", "Microsoft.AlertsManagement/preview/2019-05-05-preview/SmartGroups.json", "Microsoft.AlertsManagement/preview/2023-08-01-preview/AlertRuleRecommendations.json", "Microsoft.AlertsManagement/preview/2024-03-01-preview/AlertProcessingRules.json"], "name": "package-2023-03"}
{"addition_input_file_paths": [], "input_files": ["Microsoft.AlertsManagement/stable/2023-03-01/PrometheusRuleGroups.json", "Microsoft.AlertsManagement/preview/2024-01-01-preview/AlertsManagement.json", "Microsoft.AlertsManagement/preview/2019-05-05-preview/SmartGroups.json", "Microsoft.AlertsManagement/preview/2023-08-01-preview/AlertRuleRecommendations.json", "Microsoft.AlertsManagement/preview/2021-08-08-preview/AlertProcessingRules.json"], "name": "package-2023-03"}
Loading

0 comments on commit f5ebeef

Please sign in to comment.