openapi-directory
Version:
Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS
1 lines • 20.7 kB
JSON
{"openapi":"3.0.0","info":{"description":"APIs for Azure Smart Detector Alert Rules CRUD operations.","title":"Azure Alerts Management Service Resource Provider","version":"2019-06-01","x-apisguru-categories":["cloud"],"x-logo":{"url":"https://assets.onestore.ms/cdnfiles/onestorerolling-1606-01000/shell/v3/images/logo/microsoft.png"},"x-origin":[{"format":"swagger","url":"https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2019-06-01/SmartDetectorAlertRulesApi.json","version":"2.0"}],"x-preferred":true,"x-providerName":"azure.com","x-serviceName":"alertsmanagement-SmartDetectorAlertRulesApi","x-tags":["Azure","Microsoft"]},"security":[{"azure_auth":["user_impersonation"]}],"paths":{"/subscriptions/{subscriptionId}/providers/microsoft.alertsManagement/smartDetectorAlertRules":{"get":{"description":"List all the existing Smart Detector alert rules within the subscription.","operationId":"SmartDetectorAlertRules_List","parameters":[{"$ref":"#/components/parameters/SubscriptionIdParameter"},{"$ref":"#/components/parameters/ApiVersionParameter"},{"$ref":"#/components/parameters/ExpandDetectorParameter"}],"responses":{"200":{"description":"Successful request to list Smart Detector alert rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRulesList"},"examples":{"List Smart Detector alert rules":{"$ref":"#/components/examples/List_Smart_Detector_alert_rules"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["SmartDetectorAlertRules"],"x-ms-pageable":{"nextLinkName":"nextLink"}}},"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.alertsManagement/smartDetectorAlertRules":{"get":{"description":"List all the existing Smart Detector alert rules within the subscription and resource group.","operationId":"SmartDetectorAlertRules_ListByResourceGroup","parameters":[{"$ref":"#/components/parameters/SubscriptionIdParameter"},{"$ref":"#/components/parameters/ResourceGroupNameParameter"},{"$ref":"#/components/parameters/ApiVersionParameter"},{"$ref":"#/components/parameters/ExpandDetectorParameter"}],"responses":{"200":{"description":"Successful request to list Smart Detector alert rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRulesList"},"examples":{"List alert rules":{"$ref":"#/components/examples/List_alert_rules"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["SmartDetectorAlertRules"],"x-ms-pageable":{"nextLinkName":"nextLink"}}},"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.alertsManagement/smartDetectorAlertRules/{alertRuleName}":{"delete":{"description":"Delete an existing Smart Detector alert rule.","operationId":"SmartDetectorAlertRules_Delete","parameters":[{"$ref":"#/components/parameters/SubscriptionIdParameter"},{"$ref":"#/components/parameters/ResourceGroupNameParameter"},{"$ref":"#/components/parameters/AlertRuleNameParameter"},{"$ref":"#/components/parameters/ApiVersionParameter"}],"responses":{"200":{"description":"Successful request to delete a Smart Detector alert rule."},"204":{"description":"The Smart Detector alert rule does not exist. It may have already been deleted."},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["SmartDetectorAlertRules"]},"get":{"description":"Get a specific Smart Detector alert rule.","operationId":"SmartDetectorAlertRules_Get","parameters":[{"$ref":"#/components/parameters/SubscriptionIdParameter"},{"$ref":"#/components/parameters/ResourceGroupNameParameter"},{"$ref":"#/components/parameters/AlertRuleNameParameter"},{"$ref":"#/components/parameters/ApiVersionParameter"},{"$ref":"#/components/parameters/ExpandDetectorParameter"}],"responses":{"200":{"description":"Successful request to get Smart Detector alert rule.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRule"},"examples":{"Get a Smart Detector alert rule":{"$ref":"#/components/examples/Get_a_Smart_Detector_alert_rule"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["SmartDetectorAlertRules"]},"patch":{"description":"Patch a specific Smart Detector alert rule.","operationId":"SmartDetectorAlertRules_Patch","parameters":[{"$ref":"#/components/parameters/SubscriptionIdParameter"},{"$ref":"#/components/parameters/ResourceGroupNameParameter"},{"$ref":"#/components/parameters/AlertRuleNameParameter"},{"$ref":"#/components/parameters/ApiVersionParameter"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRulePatchObject"}}},"description":"Parameters supplied to the operation.","required":true},"responses":{"200":{"description":"Successful request to patch Smart Detector alert rule.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRule"},"examples":{"Patch alert rules":{"$ref":"#/components/examples/Patch_alert_rules"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["SmartDetectorAlertRules"]},"put":{"description":"Create or update a Smart Detector alert rule.","operationId":"SmartDetectorAlertRules_CreateOrUpdate","parameters":[{"$ref":"#/components/parameters/SubscriptionIdParameter"},{"$ref":"#/components/parameters/ResourceGroupNameParameter"},{"$ref":"#/components/parameters/AlertRuleNameParameter"},{"$ref":"#/components/parameters/ApiVersionParameter"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRule"}}},"description":"Parameters supplied to the operation.","required":true},"responses":{"200":{"description":"Successful request to update a Smart Detector alert rule.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRule"},"examples":{"Create or update a Smart Detector alert rule":{"$ref":"#/components/examples/Create_or_update_a_Smart_Detector_alert_rule"}}}}},"201":{"description":"Successful request to create a Smart Detector alert rule.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRule"},"examples":{"Create or update a Smart Detector alert rule":{"$ref":"#/components/examples/Create_or_update_a_Smart_Detector_alert_rule"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["SmartDetectorAlertRules"]}}},"servers":[{"url":"https://management.azure.com"}],"components":{"examples":{"List_Smart_Detector_alert_rules":{"value":{"value":[{"id":"/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/MyAlertRules/providers/microsoft.alertsManagement/smartDetectorAlertRules/MyAlertRule","location":"global","name":"MyAlertRule","properties":{"actionGroups":[{"actionGroupId":"/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourcegroups/MyActionGroups/providers/microsoft.insights/actionGroups/MyActionGroup"}],"description":"Sample smart detector alert rule description","detector":{"id":"VMMemoryLeak"},"frequency":"PT5M","scope":["/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1"],"severity":"Sev3","state":"Enabled","throttling":{"duration":"PT20M"}},"tags":"","type":"Microsoft.AlertsManagement/smartDetectorAlertRules"},{"id":"/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/MyAlertRules/providers/microsoft.alertsManagement/smartDetectorAlertRules/MySecondAlertRule","location":"global","name":"MySecondAlertRule","properties":{"actionGroups":[{"actionGroupId":"/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourcegroups/MyActionGroups/providers/microsoft.insights/actionGroups/MyActionGroup"}],"description":"Sample smart detector alert rule description","detector":{"id":"VMMemoryLeak"},"frequency":"PT15M","scope":["/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm2"],"severity":"Sev2","state":"Disabled"},"tags":"","type":"Microsoft.AlertsManagement/smartDetectorAlertRules"}]}},"List_alert_rules":{"value":{"value":[{"id":"/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/MyAlertRules/providers/microsoft.alertsManagement/smartDetectorAlertRules/MyAlertRule","location":"global","name":"MyAlertRule","properties":{"actionGroups":[{"actionGroupId":"/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourcegroups/MyActionGroups/providers/microsoft.insights/actionGroups/MyActionGroup"}],"description":"Sample smart detector alert rule description","detector":{"id":"VMMemoryLeak"},"frequency":"PT5M","scope":["/subscriptions/b324c52b-4073-4807-93af-e07d289c093e/resourceGroups/test/providers/Microsoft.Storage/storageAccounts/larryshoebox/blobServices/default"],"severity":"Sev3","state":"Enabled","throttling":{"duration":"PT20M"}},"tags":"","type":"Microsoft.AlertsManagement/smartDetectorAlertRules"},{"id":"/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/MyAlertRules/providers/microsoft.alertsManagement/smartDetectorAlertRules/MySecondAlertRule","location":"global","name":"MySecondAlertRule","properties":{"actionGroups":[{"actionGroupId":"/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourcegroups/MyActionGroups/providers/microsoft.insights/actionGroups/MyActionGroup"}],"description":"Sample smart detector alert rule description","detector":{"id":"VMMemoryLeak"},"frequency":"PT15M","scope":["/subscriptions/b324c52b-4073-4807-93af-e07d289c093e/resourceGroups/test/providers/Microsoft.Storage/storageAccounts/larryshoebox/blobServices/default"],"severity":"Sev2","state":"Disabled"},"tags":"","type":"Microsoft.AlertsManagement/smartDetectorAlertRules"}]}},"Get_a_Smart_Detector_alert_rule":{"value":{"id":"/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/MyAlertRules/providers/microsoft.alertsManagement/smartDetectorAlertRules/MyAlertRule","location":"global","name":"MyAlertRule","properties":{"actionGroups":[{"actionGroupId":"/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourcegroups/MyActionGroups/providers/microsoft.insights/actionGroups/MyActionGroup"}],"description":"Sample smart detector alert rule description","detector":{"id":"VMMemoryLeak"},"frequency":"PT5M","scope":["/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/MyVms/providers/Microsoft.Compute/virtualMachines/vm1"],"severity":"Sev3","state":"Enabled","throttling":{"duration":"PT20M"}},"tags":"","type":"Microsoft.AlertsManagement/smartDetectorAlertRules"}},"Patch_alert_rules":{"value":{"id":"/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/MyAlertRules/providers/microsoft.alertsManagement/smartDetectorAlertRules/MyAlertRule","location":"global","name":"MyAlertRule","properties":{"actionGroups":[{"actionGroupId":"/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourcegroups/actionGroups/providers/microsoft.insights/actiongroups/MyActionGroup"}],"description":"New description for patching","detector":{"id":"VMMemoryLeak"},"frequency":"PT1M","scope":["/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/MyVms/providers/Microsoft.Compute/virtualMachines/vm1"],"severity":"Sev3","state":"Enabled","throttling":{"duration":"PT20M"}},"tags":{"newKey":"newVal"},"type":"Microsoft.AlertsManagement/smartDetectorAlertRules"}},"Create_or_update_a_Smart_Detector_alert_rule":{"value":{"id":"/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/MyAlertRules/providers/microsoft.alertsManagement/smartDetectorAlertRules/MyAlertRule","location":"global","name":"MyAlertRule","properties":{"actionGroups":[{"actionGroupId":"/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourcegroups/actionGroups/providers/microsoft.insights/actiongroups/MyActionGroup"}],"description":"Sample smart detector alert rule description","detector":{"id":"VMMemoryLeak"},"frequency":"PT5M","scope":["/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/MyVms/providers/Microsoft.Compute/virtualMachines/vm1"],"severity":"Sev3","state":"Enabled","throttling":{"duration":"PT20M"}},"tags":"","type":"Microsoft.AlertsManagement/smartDetectorAlertRules"}}},"parameters":{"AlertRuleNameParameter":{"description":"The name of the alert rule.","in":"path","name":"alertRuleName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"},"examples":{"Delete a Smart Detector alert rule":{"value":"MyAlertRule"},"Get a Smart Detector alert rule":{"value":"MyAlertRule"},"Patch alert rules":{"value":"MyAlertRule"},"Create or update a Smart Detector alert rule":{"value":"MyAlertRule"}}},"ApiVersionParameter":{"description":"Client Api Version.","in":"query","name":"api-version","required":true,"schema":{"type":"string"},"examples":{"List Smart Detector alert rules":{"value":"2019-06-01"},"List alert rules":{"value":"2019-06-01"},"Delete a Smart Detector alert rule":{"value":"2019-06-01"},"Get a Smart Detector alert rule":{"value":"2019-06-01"},"Patch alert rules":{"value":"2019-06-01"},"Create or update a Smart Detector alert rule":{"value":"2019-06-01"}}},"ExpandDetectorParameter":{"description":"Indicates if Smart Detector should be expanded.","in":"query","name":"expandDetector","x-ms-parameter-location":"method","schema":{"type":"boolean"}},"ResourceGroupNameParameter":{"description":"The name of the resource group.","in":"path","name":"resourceGroupName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"},"examples":{"List alert rules":{"value":"MyAlertRules"},"Delete a Smart Detector alert rule":{"value":"MyAlertRules"},"Get a Smart Detector alert rule":{"value":"MyAlertRules"},"Patch alert rules":{"value":"MyAlertRules"},"Create or update a Smart Detector alert rule":{"value":"MyAlertRules"}}},"SubscriptionIdParameter":{"description":"The ID of the target subscription.","in":"path","name":"subscriptionId","required":true,"schema":{"type":"string","minLength":1},"examples":{"List Smart Detector alert rules":{"value":"b368ca2f-e298-46b7-b0ab-012281956afa"},"List alert rules":{"value":"b368ca2f-e298-46b7-b0ab-012281956afa"},"Delete a Smart Detector alert rule":{"value":"b368ca2f-e298-46b7-b0ab-012281956afa"},"Get a Smart Detector alert rule":{"value":"b368ca2f-e298-46b7-b0ab-012281956afa"},"Patch alert rules":{"value":"b368ca2f-e298-46b7-b0ab-012281956afa"},"Create or update a Smart Detector alert rule":{"value":"b368ca2f-e298-46b7-b0ab-012281956afa"}}}},"securitySchemes":{"azure_auth":{"description":"Azure Active Directory OAuth2 Flow","type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://login.microsoftonline.com/common/oauth2/authorize","scopes":{"user_impersonation":"impersonate your user account"}}}}},"schemas":{"ActionGroupsInformation":{"description":"The Action Groups information, used by the alert rule.","properties":{"customEmailSubject":{"description":"An optional custom email subject to use in email notifications.","type":"string"},"customWebhookPayload":{"description":"An optional custom web-hook payload to use in web-hook notifications.","type":"string"},"groupIds":{"description":"The Action Group resource IDs.","items":{"type":"string"},"type":"array"}},"required":["groupIds"]},"AlertRule":{"allOf":[{"$ref":"#/components/schemas/AzureResource"}],"description":"The alert rule information","properties":{"properties":{"$ref":"#/components/schemas/AlertRuleProperties"}}},"AlertRulePatchObject":{"description":"The alert rule patch information","properties":{"id":{"description":"The resource ID.","readOnly":true,"type":"string"},"name":{"description":"The resource name.","readOnly":true,"type":"string"},"properties":{"$ref":"#/components/schemas/AlertRulePatchProperties"},"tags":{"description":"The resource tags.","type":"object"},"type":{"description":"The resource type.","readOnly":true,"type":"string"}}},"AlertRulePatchProperties":{"description":"The alert rule properties.","properties":{"actionGroups":{"$ref":"#/components/schemas/ActionGroupsInformation"},"description":{"description":"The alert rule description.","type":"string"},"frequency":{"description":"The alert rule frequency in ISO8601 format. The time granularity must be in minutes and minimum value is 5 minutes.","format":"duration","type":"string"},"severity":{"description":"The alert rule severity.","enum":["Sev0","Sev1","Sev2","Sev3","Sev4"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"Severity"}},"state":{"description":"The alert rule state.","enum":["Enabled","Disabled"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"AlertRuleState"}},"throttling":{"$ref":"#/components/schemas/ThrottlingInformation"}}},"AlertRuleProperties":{"description":"The alert rule properties.","properties":{"actionGroups":{"$ref":"#/components/schemas/ActionGroupsInformation"},"description":{"description":"The alert rule description.","type":"string"},"detector":{"$ref":"#/components/schemas/Detector"},"frequency":{"description":"The alert rule frequency in ISO8601 format. The time granularity must be in minutes and minimum value is 5 minutes.","format":"duration","type":"string"},"scope":{"description":"The alert rule resources scope.","items":{"type":"string"},"type":"array"},"severity":{"description":"The alert rule severity.","enum":["Sev0","Sev1","Sev2","Sev3","Sev4"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"Severity"}},"state":{"description":"The alert rule state.","enum":["Enabled","Disabled"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"AlertRuleState"}},"throttling":{"$ref":"#/components/schemas/ThrottlingInformation"}},"required":["state","severity","frequency","detector","scope","actionGroups"]},"AlertRulesList":{"description":"List of Smart Detector alert rules.","properties":{"nextLink":{"description":"The URL to get the next set of results.","type":"string"},"value":{"description":"List of Smart Detector alert rules.","items":{"$ref":"#/components/schemas/AlertRule"},"type":"array"}}},"AzureResource":{"description":"An Azure resource object","properties":{"id":{"description":"The resource ID.","readOnly":true,"type":"string"},"location":{"default":"global","description":"The resource location.","type":"string"},"name":{"description":"The resource name.","readOnly":true,"type":"string"},"tags":{"description":"The resource tags.","type":"object"},"type":{"description":"The resource type.","readOnly":true,"type":"string"}},"type":"object","x-ms-azure-resource":true},"Detector":{"description":"The detector information. By default this is not populated, unless it's specified in expandDetector","properties":{"description":{"description":"The Smart Detector description. By default this is not populated, unless it's specified in expandDetector","type":"string"},"id":{"description":"The detector id.","type":"string"},"imagePaths":{"description":"The Smart Detector image path. By default this is not populated, unless it's specified in expandDetector","items":{"type":"string"},"type":"array"},"name":{"description":"The Smart Detector name. By default this is not populated, unless it's specified in expandDetector","type":"string"},"parameters":{"additionalProperties":{"type":"object"},"description":"The detector's parameters.'","type":"object"},"supportedResourceTypes":{"description":"The Smart Detector supported resource types. By default this is not populated, unless it's specified in expandDetector","items":{"type":"string"},"type":"array"}},"required":["id"]},"ErrorResponse":{"description":"Describe the format of an Error response.","properties":{"code":{"description":"Error code","type":"string"},"message":{"description":"Error message indicating why the operation failed.","type":"string"}},"type":"object"},"ThrottlingInformation":{"description":"Optional throttling information for the alert rule.","properties":{"duration":{"description":"The required duration (in ISO8601 format) to wait before notifying on the alert rule again. The time granularity must be in minutes and minimum value is 0 minutes","format":"duration","type":"string"}}}}}}