generate azure_mgmt_monitor:v0.19.0
This commit is contained in:
Родитель
3a92feafb7
Коммит
ec615abeb8
|
@ -1531,123 +1531,124 @@
|
|||
}
|
||||
},
|
||||
"azure_mgmt_monitor": {
|
||||
"azure_mgmt_monitor_2020_10_01": {
|
||||
"markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/9cee82c90c9c188dda3cf33a9816bdcdb395f00a/specification/applicationinsights/resource-manager/readme.md",
|
||||
"namespace": "Azure::Monitor::Mgmt::V2020_10_01",
|
||||
"tag": "package-2020-10"
|
||||
},
|
||||
"azure_mgmt_monitor_2015_05_01": {
|
||||
"markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/9cee82c90c9c188dda3cf33a9816bdcdb395f00a/specification/applicationinsights/resource-manager/readme.md",
|
||||
"markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/cd4354e21b0dd77cf3800823065a7cfa4de2da95/specification/applicationinsights/resource-manager/readme.md",
|
||||
"namespace": "Azure::Monitor::Mgmt::V2015_05_01",
|
||||
"tag": "package-2015-05"
|
||||
},
|
||||
"azure_mgmt_monitor_2017_10_01_preview": {
|
||||
"markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/9cee82c90c9c188dda3cf33a9816bdcdb395f00a/specification/applicationinsights/resource-manager/readme.md",
|
||||
"markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/cd4354e21b0dd77cf3800823065a7cfa4de2da95/specification/applicationinsights/resource-manager/readme.md",
|
||||
"namespace": "Azure::Monitor::Mgmt::V2017_10_01_preview",
|
||||
"tag": "package-2017-10"
|
||||
},
|
||||
"azure_mgmt_monitor_2018_06_17_preview": {
|
||||
"markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/9cee82c90c9c188dda3cf33a9816bdcdb395f00a/specification/applicationinsights/resource-manager/readme.md",
|
||||
"markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/cd4354e21b0dd77cf3800823065a7cfa4de2da95/specification/applicationinsights/resource-manager/readme.md",
|
||||
"namespace": "Azure::Monitor::Mgmt::V2018_06_17_preview",
|
||||
"tag": "package-2018-06-17-preview"
|
||||
},
|
||||
"azure_mgmt_monitor_2019_10_17_preview": {
|
||||
"azure_mgmt_monitor_2020_10_01": {
|
||||
"markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/9cee82c90c9c188dda3cf33a9816bdcdb395f00a/specification/monitor/resource-manager/readme.md",
|
||||
"namespace": "Azure::Monitor::Mgmt::V2020_10_01",
|
||||
"title": "MonitorClient",
|
||||
"tag": "package-2020-10"
|
||||
},
|
||||
"azure_mgmt_monitor_2019_10_17_preview": {
|
||||
"markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/da3b82807225e51e7432bb642e9cd79281851dec/specification/monitor/resource-manager/readme.md",
|
||||
"namespace": "Azure::Monitor::Mgmt::V2019_10_17_preview",
|
||||
"title": "MonitorClient",
|
||||
"tag": "package-2019-10-17-preview-only"
|
||||
},
|
||||
"azure_mgmt_monitor_2019_06_01": {
|
||||
"markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/9cee82c90c9c188dda3cf33a9816bdcdb395f00a/specification/monitor/resource-manager/readme.md",
|
||||
"markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/da3b82807225e51e7432bb642e9cd79281851dec/specification/monitor/resource-manager/readme.md",
|
||||
"namespace": "Azure::Monitor::Mgmt::V2019_06_01",
|
||||
"title": "MonitorClient",
|
||||
"tag": "package-2019-06-01-only"
|
||||
},
|
||||
"azure_mgmt_monitor_2019_03_01": {
|
||||
"markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/9cee82c90c9c188dda3cf33a9816bdcdb395f00a/specification/monitor/resource-manager/readme.md",
|
||||
"markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/da3b82807225e51e7432bb642e9cd79281851dec/specification/monitor/resource-manager/readme.md",
|
||||
"namespace": "Azure::Monitor::Mgmt::V2019_03_01",
|
||||
"title": "MonitorClient",
|
||||
"tag": "package-2019-03-01-only"
|
||||
},
|
||||
"azure_mgmt_monitor_2018_09_01": {
|
||||
"input-file": [
|
||||
"https://raw.githubusercontent.com/Azure/azure-rest-api-specs/9cee82c90c9c188dda3cf33a9816bdcdb395f00a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/actionGroups_API.json",
|
||||
"https://raw.githubusercontent.com/Azure/azure-rest-api-specs/9cee82c90c9c188dda3cf33a9816bdcdb395f00a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/baseline_API.json",
|
||||
"https://raw.githubusercontent.com/Azure/azure-rest-api-specs/9cee82c90c9c188dda3cf33a9816bdcdb395f00a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/calculateBaseline_API.json"
|
||||
"https://raw.githubusercontent.com/Azure/azure-rest-api-specs/5a3fb7cc7cb3adb16f9da603e91c1c55048129d1/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/actionGroups_API.json",
|
||||
"https://raw.githubusercontent.com/Azure/azure-rest-api-specs/5a3fb7cc7cb3adb16f9da603e91c1c55048129d1/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/baseline_API.json",
|
||||
"https://raw.githubusercontent.com/Azure/azure-rest-api-specs/5a3fb7cc7cb3adb16f9da603e91c1c55048129d1/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/calculateBaseline_API.json"
|
||||
],
|
||||
"namespace": "Azure::Monitor::Mgmt::V2018_09_01",
|
||||
"title": "MonitorClient"
|
||||
},
|
||||
"azure_mgmt_monitor_2018_11_27_preview": {
|
||||
"markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/9cee82c90c9c188dda3cf33a9816bdcdb395f00a/specification/monitor/resource-manager/readme.md",
|
||||
"markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/da3b82807225e51e7432bb642e9cd79281851dec/specification/monitor/resource-manager/readme.md",
|
||||
"namespace": "Azure::Monitor::Mgmt::V2018_11_27_preview",
|
||||
"title": "MonitorClient",
|
||||
"tag": "package-2018-11-27-preview-only"
|
||||
},
|
||||
"azure_mgmt_monitor_2018_06_01_preview": {
|
||||
"input-file": [
|
||||
"https://raw.githubusercontent.com/Azure/azure-rest-api-specs/9cee82c90c9c188dda3cf33a9816bdcdb395f00a/specification/monitor/resource-manager/Microsoft.Insights/preview/2018-06-01-preview/guestDiagnosticSettingsAssociation_API.json",
|
||||
"https://raw.githubusercontent.com/Azure/azure-rest-api-specs/9cee82c90c9c188dda3cf33a9816bdcdb395f00a/specification/monitor/resource-manager/Microsoft.Insights/preview/2018-06-01-preview/guestDiagnosticSettings_API.json"
|
||||
"https://raw.githubusercontent.com/Azure/azure-rest-api-specs/5a3fb7cc7cb3adb16f9da603e91c1c55048129d1/specification/monitor/resource-manager/Microsoft.Insights/preview/2018-06-01-preview/guestDiagnosticSettingsAssociation_API.json",
|
||||
"https://raw.githubusercontent.com/Azure/azure-rest-api-specs/5a3fb7cc7cb3adb16f9da603e91c1c55048129d1/specification/monitor/resource-manager/Microsoft.Insights/preview/2018-06-01-preview/guestDiagnosticSettings_API.json"
|
||||
],
|
||||
"namespace": "Azure::Monitor::Mgmt::V2018_06_01_preview",
|
||||
"title": "MonitorClient"
|
||||
},
|
||||
"azure_mgmt_monitor_2018_04_16": {
|
||||
"markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/9cee82c90c9c188dda3cf33a9816bdcdb395f00a/specification/monitor/resource-manager/readme.md",
|
||||
"markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/da3b82807225e51e7432bb642e9cd79281851dec/specification/monitor/resource-manager/readme.md",
|
||||
"namespace": "Azure::Monitor::Mgmt::V2018_04_16",
|
||||
"title": "MonitorClient",
|
||||
"tag": "package-2018-04-16-only"
|
||||
},
|
||||
"azure_mgmt_monitor_2018_03_01": {
|
||||
"markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/9cee82c90c9c188dda3cf33a9816bdcdb395f00a/specification/monitor/resource-manager/readme.md",
|
||||
"markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/da3b82807225e51e7432bb642e9cd79281851dec/specification/monitor/resource-manager/readme.md",
|
||||
"namespace": "Azure::Monitor::Mgmt::V2018_03_01",
|
||||
"title": "MonitorClient",
|
||||
"tag": "package-2018-03-01-only"
|
||||
},
|
||||
"azure_mgmt_monitor_2018_01_01": {
|
||||
"markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/9cee82c90c9c188dda3cf33a9816bdcdb395f00a/specification/monitor/resource-manager/readme.md",
|
||||
"markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/da3b82807225e51e7432bb642e9cd79281851dec/specification/monitor/resource-manager/readme.md",
|
||||
"namespace": "Azure::Monitor::Mgmt::V2018_01_01",
|
||||
"title": "MonitorClient",
|
||||
"tag": "package-2018-01-01-only"
|
||||
},
|
||||
"azure_mgmt_monitor_2017_12_01_preview": {
|
||||
"markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/9cee82c90c9c188dda3cf33a9816bdcdb395f00a/specification/monitor/resource-manager/readme.md",
|
||||
"markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/da3b82807225e51e7432bb642e9cd79281851dec/specification/monitor/resource-manager/readme.md",
|
||||
"namespace": "Azure::Monitor::Mgmt::V2017_12_01_preview",
|
||||
"title": "MonitorClient",
|
||||
"tag": "package-2017-12-01-preview-only"
|
||||
},
|
||||
"azure_mgmt_monitor_2017_11_01_preview": {
|
||||
"markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/9cee82c90c9c188dda3cf33a9816bdcdb395f00a/specification/monitor/resource-manager/readme.md",
|
||||
"markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/da3b82807225e51e7432bb642e9cd79281851dec/specification/monitor/resource-manager/readme.md",
|
||||
"namespace": "Azure::Monitor::Mgmt::V2017_11_01_preview",
|
||||
"title": "MonitorClient",
|
||||
"tag": "package-2017-11-01-preview-only"
|
||||
},
|
||||
"azure_mgmt_monitor_2017_05_01_preview": {
|
||||
"markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/9cee82c90c9c188dda3cf33a9816bdcdb395f00a/specification/monitor/resource-manager/readme.md",
|
||||
"markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/da3b82807225e51e7432bb642e9cd79281851dec/specification/monitor/resource-manager/readme.md",
|
||||
"namespace": "Azure::Monitor::Mgmt::V2017_05_01_preview",
|
||||
"title": "MonitorClient",
|
||||
"tag": "package-2017-05-01-preview-only"
|
||||
},
|
||||
"azure_mgmt_monitor_2017_04_01": {
|
||||
"markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/9cee82c90c9c188dda3cf33a9816bdcdb395f00a/specification/monitor/resource-manager/readme.md",
|
||||
"markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/da3b82807225e51e7432bb642e9cd79281851dec/specification/monitor/resource-manager/readme.md",
|
||||
"namespace": "Azure::Monitor::Mgmt::V2017_04_01",
|
||||
"title": "MonitorClient",
|
||||
"tag": "package-2017-04-01-only"
|
||||
},
|
||||
"azure_mgmt_monitor_2016_09_01": {
|
||||
"markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/9cee82c90c9c188dda3cf33a9816bdcdb395f00a/specification/monitor/resource-manager/readme.md",
|
||||
"markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/0840eaa81abaf0a42c88d8e2705dff1c89c4f149/specification/monitor/resource-manager/readme.md",
|
||||
"namespace": "Azure::Monitor::Mgmt::V2016_09_01",
|
||||
"title": "MonitorClient",
|
||||
"tag": "package-2016-09-01-only"
|
||||
},
|
||||
"azure_mgmt_monitor_2016_03_01": {
|
||||
"markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/9cee82c90c9c188dda3cf33a9816bdcdb395f00a/specification/monitor/resource-manager/readme.md",
|
||||
"markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/da3b82807225e51e7432bb642e9cd79281851dec/specification/monitor/resource-manager/readme.md",
|
||||
"namespace": "Azure::Monitor::Mgmt::V2016_03_01",
|
||||
"title": "MonitorClient",
|
||||
"tag": "package-2016-03-01-only"
|
||||
},
|
||||
"azure_mgmt_monitor_2015_04_01": {
|
||||
"markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/9cee82c90c9c188dda3cf33a9816bdcdb395f00a/specification/monitor/resource-manager/readme.md",
|
||||
"markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/da3b82807225e51e7432bb642e9cd79281851dec/specification/monitor/resource-manager/readme.md",
|
||||
"namespace": "Azure::Monitor::Mgmt::V2015_04_01",
|
||||
"title": "MonitorClient",
|
||||
"tag": "package-2015-04-01-only"
|
||||
|
|
|
@ -140,7 +140,7 @@ module Azure::Monitor::Mgmt::V2015_04_01
|
|||
#
|
||||
def add_telemetry
|
||||
sdk_information = 'azure_mgmt_monitor'
|
||||
sdk_information = "#{sdk_information}/0.18.0"
|
||||
sdk_information = "#{sdk_information}/0.19.0"
|
||||
add_user_agent_information(sdk_information)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -186,7 +186,7 @@ module Azure::Monitor::Mgmt::V2015_05_01
|
|||
#
|
||||
def add_telemetry
|
||||
sdk_information = 'azure_mgmt_monitor'
|
||||
sdk_information = "#{sdk_information}/0.18.0"
|
||||
sdk_information = "#{sdk_information}/0.19.0"
|
||||
add_user_agent_information(sdk_information)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -136,7 +136,7 @@ module Azure::Monitor::Mgmt::V2016_03_01
|
|||
#
|
||||
def add_telemetry
|
||||
sdk_information = 'azure_mgmt_monitor'
|
||||
sdk_information = "#{sdk_information}/0.18.0"
|
||||
sdk_information = "#{sdk_information}/0.19.0"
|
||||
add_user_agent_information(sdk_information)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -126,7 +126,7 @@ module Azure::Monitor::Mgmt::V2016_09_01
|
|||
#
|
||||
def add_telemetry
|
||||
sdk_information = 'azure_mgmt_monitor'
|
||||
sdk_information = "#{sdk_information}/0.18.0"
|
||||
sdk_information = "#{sdk_information}/0.19.0"
|
||||
add_user_agent_information(sdk_information)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -128,7 +128,7 @@ module Azure::Monitor::Mgmt::V2017_04_01
|
|||
#
|
||||
def add_telemetry
|
||||
sdk_information = 'azure_mgmt_monitor'
|
||||
sdk_information = "#{sdk_information}/0.18.0"
|
||||
sdk_information = "#{sdk_information}/0.19.0"
|
||||
add_user_agent_information(sdk_information)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -139,7 +139,7 @@ module Azure::Monitor::Mgmt::V2017_05_01_preview
|
|||
#
|
||||
def add_telemetry
|
||||
sdk_information = 'azure_mgmt_monitor'
|
||||
sdk_information = "#{sdk_information}/0.18.0"
|
||||
sdk_information = "#{sdk_information}/0.19.0"
|
||||
add_user_agent_information(sdk_information)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -139,7 +139,7 @@ module Azure::Monitor::Mgmt::V2017_10_01_preview
|
|||
#
|
||||
def add_telemetry
|
||||
sdk_information = 'azure_mgmt_monitor'
|
||||
sdk_information = "#{sdk_information}/0.18.0"
|
||||
sdk_information = "#{sdk_information}/0.19.0"
|
||||
add_user_agent_information(sdk_information)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -121,7 +121,7 @@ module Azure::Monitor::Mgmt::V2017_11_01_preview
|
|||
#
|
||||
def add_telemetry
|
||||
sdk_information = 'azure_mgmt_monitor'
|
||||
sdk_information = "#{sdk_information}/0.18.0"
|
||||
sdk_information = "#{sdk_information}/0.19.0"
|
||||
add_user_agent_information(sdk_information)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -121,7 +121,7 @@ module Azure::Monitor::Mgmt::V2017_12_01_preview
|
|||
#
|
||||
def add_telemetry
|
||||
sdk_information = 'azure_mgmt_monitor'
|
||||
sdk_information = "#{sdk_information}/0.18.0"
|
||||
sdk_information = "#{sdk_information}/0.19.0"
|
||||
add_user_agent_information(sdk_information)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -125,7 +125,7 @@ module Azure::Monitor::Mgmt::V2018_01_01
|
|||
#
|
||||
def add_telemetry
|
||||
sdk_information = 'azure_mgmt_monitor'
|
||||
sdk_information = "#{sdk_information}/0.18.0"
|
||||
sdk_information = "#{sdk_information}/0.19.0"
|
||||
add_user_agent_information(sdk_information)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -132,7 +132,7 @@ module Azure::Monitor::Mgmt::V2018_03_01
|
|||
#
|
||||
def add_telemetry
|
||||
sdk_information = 'azure_mgmt_monitor'
|
||||
sdk_information = "#{sdk_information}/0.18.0"
|
||||
sdk_information = "#{sdk_information}/0.19.0"
|
||||
add_user_agent_information(sdk_information)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -124,7 +124,7 @@ module Azure::Monitor::Mgmt::V2018_04_16
|
|||
#
|
||||
def add_telemetry
|
||||
sdk_information = 'azure_mgmt_monitor'
|
||||
sdk_information = "#{sdk_information}/0.18.0"
|
||||
sdk_information = "#{sdk_information}/0.19.0"
|
||||
add_user_agent_information(sdk_information)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -129,7 +129,7 @@ module Azure::Monitor::Mgmt::V2018_06_01_preview
|
|||
#
|
||||
def add_telemetry
|
||||
sdk_information = 'azure_mgmt_monitor'
|
||||
sdk_information = "#{sdk_information}/0.18.0"
|
||||
sdk_information = "#{sdk_information}/0.19.0"
|
||||
add_user_agent_information(sdk_information)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -124,7 +124,7 @@ module Azure::Monitor::Mgmt::V2018_06_17_preview
|
|||
#
|
||||
def add_telemetry
|
||||
sdk_information = 'azure_mgmt_monitor'
|
||||
sdk_information = "#{sdk_information}/0.18.0"
|
||||
sdk_information = "#{sdk_information}/0.19.0"
|
||||
add_user_agent_information(sdk_information)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -128,7 +128,7 @@ module Azure::Monitor::Mgmt::V2018_09_01
|
|||
#
|
||||
def add_telemetry
|
||||
sdk_information = 'azure_mgmt_monitor'
|
||||
sdk_information = "#{sdk_information}/0.18.0"
|
||||
sdk_information = "#{sdk_information}/0.19.0"
|
||||
add_user_agent_information(sdk_information)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -121,7 +121,7 @@ module Azure::Monitor::Mgmt::V2018_11_27_preview
|
|||
#
|
||||
def add_telemetry
|
||||
sdk_information = 'azure_mgmt_monitor'
|
||||
sdk_information = "#{sdk_information}/0.18.0"
|
||||
sdk_information = "#{sdk_information}/0.19.0"
|
||||
add_user_agent_information(sdk_information)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -128,7 +128,7 @@ module Azure::Monitor::Mgmt::V2019_03_01
|
|||
#
|
||||
def add_telemetry
|
||||
sdk_information = 'azure_mgmt_monitor'
|
||||
sdk_information = "#{sdk_information}/0.18.0"
|
||||
sdk_information = "#{sdk_information}/0.19.0"
|
||||
add_user_agent_information(sdk_information)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -124,7 +124,7 @@ module Azure::Monitor::Mgmt::V2019_06_01
|
|||
#
|
||||
def add_telemetry
|
||||
sdk_information = 'azure_mgmt_monitor'
|
||||
sdk_information = "#{sdk_information}/0.18.0"
|
||||
sdk_information = "#{sdk_information}/0.19.0"
|
||||
add_user_agent_information(sdk_information)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -141,7 +141,7 @@ module Azure::Monitor::Mgmt::V2019_10_17_preview
|
|||
#
|
||||
def add_telemetry
|
||||
sdk_information = 'azure_mgmt_monitor'
|
||||
sdk_information = "#{sdk_information}/0.18.0"
|
||||
sdk_information = "#{sdk_information}/0.19.0"
|
||||
add_user_agent_information(sdk_information)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
require 'uri'
|
||||
require 'cgi'
|
||||
require 'date'
|
||||
require 'json'
|
||||
require 'base64'
|
||||
require 'erb'
|
||||
require 'securerandom'
|
||||
require 'time'
|
||||
require 'timeliness'
|
||||
require 'faraday'
|
||||
require 'faraday-cookie_jar'
|
||||
require 'concurrent'
|
||||
require 'ms_rest'
|
||||
require '2020-10-01/generated/azure_mgmt_monitor/module_definition'
|
||||
require 'ms_rest_azure'
|
||||
|
||||
module Azure::Monitor::Mgmt::V2020_10_01
|
||||
autoload :ActivityLogAlerts, '2020-10-01/generated/azure_mgmt_monitor/activity_log_alerts.rb'
|
||||
autoload :MonitorManagementClient, '2020-10-01/generated/azure_mgmt_monitor/monitor_management_client.rb'
|
||||
|
||||
module Models
|
||||
autoload :ActionList, '2020-10-01/generated/azure_mgmt_monitor/models/action_list.rb'
|
||||
autoload :AzureResource, '2020-10-01/generated/azure_mgmt_monitor/models/azure_resource.rb'
|
||||
autoload :AlertRuleLeafCondition, '2020-10-01/generated/azure_mgmt_monitor/models/alert_rule_leaf_condition.rb'
|
||||
autoload :AlertRuleAllOfCondition, '2020-10-01/generated/azure_mgmt_monitor/models/alert_rule_all_of_condition.rb'
|
||||
autoload :AlertRuleList, '2020-10-01/generated/azure_mgmt_monitor/models/alert_rule_list.rb'
|
||||
autoload :ErrorResponse, '2020-10-01/generated/azure_mgmt_monitor/models/error_response.rb'
|
||||
autoload :ActionGroup, '2020-10-01/generated/azure_mgmt_monitor/models/action_group.rb'
|
||||
autoload :AlertRulePatchObject, '2020-10-01/generated/azure_mgmt_monitor/models/alert_rule_patch_object.rb'
|
||||
autoload :AlertRuleAnyOfOrLeafCondition, '2020-10-01/generated/azure_mgmt_monitor/models/alert_rule_any_of_or_leaf_condition.rb'
|
||||
autoload :ActivityLogAlertResource, '2020-10-01/generated/azure_mgmt_monitor/models/activity_log_alert_resource.rb'
|
||||
end
|
||||
end
|
|
@ -0,0 +1,884 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::Monitor::Mgmt::V2020_10_01
|
||||
#
|
||||
# Monitor Management Client
|
||||
#
|
||||
class ActivityLogAlerts
|
||||
include MsRestAzure
|
||||
|
||||
#
|
||||
# Creates and initializes a new instance of the ActivityLogAlerts class.
|
||||
# @param client service class for accessing basic functionality.
|
||||
#
|
||||
def initialize(client)
|
||||
@client = client
|
||||
end
|
||||
|
||||
# @return [MonitorManagementClient] reference to the MonitorManagementClient
|
||||
attr_reader :client
|
||||
|
||||
#
|
||||
# Create a new Activity Log Alert rule or update an existing one.
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group. The name
|
||||
# is case insensitive.
|
||||
# @param activity_log_alert_name [String] The name of the Activity Log Alert
|
||||
# rule.
|
||||
# @param activity_log_alert_rule [ActivityLogAlertResource] The Activity Log
|
||||
# Alert rule to create or use for the update.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [ActivityLogAlertResource] operation results.
|
||||
#
|
||||
def create_or_update(resource_group_name, activity_log_alert_name, activity_log_alert_rule, custom_headers:nil)
|
||||
response = create_or_update_async(resource_group_name, activity_log_alert_name, activity_log_alert_rule, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Create a new Activity Log Alert rule or update an existing one.
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group. The name
|
||||
# is case insensitive.
|
||||
# @param activity_log_alert_name [String] The name of the Activity Log Alert
|
||||
# rule.
|
||||
# @param activity_log_alert_rule [ActivityLogAlertResource] The Activity Log
|
||||
# Alert rule to create or use for the update.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def create_or_update_with_http_info(resource_group_name, activity_log_alert_name, activity_log_alert_rule, custom_headers:nil)
|
||||
create_or_update_async(resource_group_name, activity_log_alert_name, activity_log_alert_rule, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Create a new Activity Log Alert rule or update an existing one.
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group. The name
|
||||
# is case insensitive.
|
||||
# @param activity_log_alert_name [String] The name of the Activity Log Alert
|
||||
# rule.
|
||||
# @param activity_log_alert_rule [ActivityLogAlertResource] The Activity Log
|
||||
# Alert rule to create or use for the update.
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def create_or_update_async(resource_group_name, activity_log_alert_name, activity_log_alert_rule, custom_headers:nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
||||
fail ArgumentError, 'activity_log_alert_name is nil' if activity_log_alert_name.nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
||||
fail ArgumentError, 'activity_log_alert_rule is nil' if activity_log_alert_rule.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
|
||||
# Serialize Request
|
||||
request_mapper = Azure::Monitor::Mgmt::V2020_10_01::Models::ActivityLogAlertResource.mapper()
|
||||
request_content = @client.serialize(request_mapper, activity_log_alert_rule)
|
||||
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
||||
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/activityLogAlerts/{activityLogAlertName}'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'activityLogAlertName' => activity_log_alert_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
body: request_content,
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:put, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200 || status_code == 201
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
# Deserialize Response
|
||||
if status_code == 200
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::Monitor::Mgmt::V2020_10_01::Models::ActivityLogAlertResource.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
# Deserialize Response
|
||||
if status_code == 201
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::Monitor::Mgmt::V2020_10_01::Models::ActivityLogAlertResource.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
#
|
||||
# Get an Activity Log Alert rule.
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group. The name
|
||||
# is case insensitive.
|
||||
# @param activity_log_alert_name [String] The name of the Activity Log Alert
|
||||
# rule.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [ActivityLogAlertResource] operation results.
|
||||
#
|
||||
def get(resource_group_name, activity_log_alert_name, custom_headers:nil)
|
||||
response = get_async(resource_group_name, activity_log_alert_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Get an Activity Log Alert rule.
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group. The name
|
||||
# is case insensitive.
|
||||
# @param activity_log_alert_name [String] The name of the Activity Log Alert
|
||||
# rule.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def get_with_http_info(resource_group_name, activity_log_alert_name, custom_headers:nil)
|
||||
get_async(resource_group_name, activity_log_alert_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Get an Activity Log Alert rule.
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group. The name
|
||||
# is case insensitive.
|
||||
# @param activity_log_alert_name [String] The name of the Activity Log Alert
|
||||
# rule.
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def get_async(resource_group_name, activity_log_alert_name, custom_headers:nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
||||
fail ArgumentError, 'activity_log_alert_name is nil' if activity_log_alert_name.nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/activityLogAlerts/{activityLogAlertName}'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'activityLogAlertName' => activity_log_alert_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:get, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
# Deserialize Response
|
||||
if status_code == 200
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::Monitor::Mgmt::V2020_10_01::Models::ActivityLogAlertResource.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
#
|
||||
# Delete an Activity Log Alert rule.
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group. The name
|
||||
# is case insensitive.
|
||||
# @param activity_log_alert_name [String] The name of the Activity Log Alert
|
||||
# rule.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
#
|
||||
def delete(resource_group_name, activity_log_alert_name, custom_headers:nil)
|
||||
response = delete_async(resource_group_name, activity_log_alert_name, custom_headers:custom_headers).value!
|
||||
nil
|
||||
end
|
||||
|
||||
#
|
||||
# Delete an Activity Log Alert rule.
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group. The name
|
||||
# is case insensitive.
|
||||
# @param activity_log_alert_name [String] The name of the Activity Log Alert
|
||||
# rule.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def delete_with_http_info(resource_group_name, activity_log_alert_name, custom_headers:nil)
|
||||
delete_async(resource_group_name, activity_log_alert_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Delete an Activity Log Alert rule.
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group. The name
|
||||
# is case insensitive.
|
||||
# @param activity_log_alert_name [String] The name of the Activity Log Alert
|
||||
# rule.
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def delete_async(resource_group_name, activity_log_alert_name, custom_headers:nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
||||
fail ArgumentError, 'activity_log_alert_name is nil' if activity_log_alert_name.nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/activityLogAlerts/{activityLogAlertName}'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'activityLogAlertName' => activity_log_alert_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:delete, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200 || status_code == 204
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group. The name
|
||||
# is case insensitive.
|
||||
# @param activity_log_alert_name [String] The name of the Activity Log Alert
|
||||
# rule.
|
||||
# @param activity_log_alert_rule_patch [AlertRulePatchObject] Parameters
|
||||
# supplied to the operation.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [ActivityLogAlertResource] operation results.
|
||||
#
|
||||
def update(resource_group_name, activity_log_alert_name, activity_log_alert_rule_patch, custom_headers:nil)
|
||||
response = update_async(resource_group_name, activity_log_alert_name, activity_log_alert_rule_patch, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group. The name
|
||||
# is case insensitive.
|
||||
# @param activity_log_alert_name [String] The name of the Activity Log Alert
|
||||
# rule.
|
||||
# @param activity_log_alert_rule_patch [AlertRulePatchObject] Parameters
|
||||
# supplied to the operation.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def update_with_http_info(resource_group_name, activity_log_alert_name, activity_log_alert_rule_patch, custom_headers:nil)
|
||||
update_async(resource_group_name, activity_log_alert_name, activity_log_alert_rule_patch, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group. The name
|
||||
# is case insensitive.
|
||||
# @param activity_log_alert_name [String] The name of the Activity Log Alert
|
||||
# rule.
|
||||
# @param activity_log_alert_rule_patch [AlertRulePatchObject] Parameters
|
||||
# supplied to the operation.
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def update_async(resource_group_name, activity_log_alert_name, activity_log_alert_rule_patch, custom_headers:nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
||||
fail ArgumentError, 'activity_log_alert_name is nil' if activity_log_alert_name.nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
||||
fail ArgumentError, 'activity_log_alert_rule_patch is nil' if activity_log_alert_rule_patch.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
|
||||
# Serialize Request
|
||||
request_mapper = Azure::Monitor::Mgmt::V2020_10_01::Models::AlertRulePatchObject.mapper()
|
||||
request_content = @client.serialize(request_mapper, activity_log_alert_rule_patch)
|
||||
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
||||
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/activityLogAlerts/{activityLogAlertName}'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'activityLogAlertName' => activity_log_alert_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
body: request_content,
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:patch, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
# Deserialize Response
|
||||
if status_code == 200
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::Monitor::Mgmt::V2020_10_01::Models::ActivityLogAlertResource.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
#
|
||||
# Get a list of all Activity Log Alert rules in a subscription.
|
||||
#
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [Array<ActivityLogAlertResource>] operation results.
|
||||
#
|
||||
def list_by_subscription_id(custom_headers:nil)
|
||||
first_page = list_by_subscription_id_as_lazy(custom_headers:custom_headers)
|
||||
first_page.get_all_items
|
||||
end
|
||||
|
||||
#
|
||||
# Get a list of all Activity Log Alert rules in a subscription.
|
||||
#
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def list_by_subscription_id_with_http_info(custom_headers:nil)
|
||||
list_by_subscription_id_async(custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Get a list of all Activity Log Alert rules in a subscription.
|
||||
#
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def list_by_subscription_id_async(custom_headers:nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Insights/activityLogAlerts'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:get, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
# Deserialize Response
|
||||
if status_code == 200
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::Monitor::Mgmt::V2020_10_01::Models::AlertRuleList.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
#
|
||||
# Get a list of all Activity Log Alert rules in a resource group.
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group. The name
|
||||
# is case insensitive.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [Array<ActivityLogAlertResource>] operation results.
|
||||
#
|
||||
def list_by_resource_group(resource_group_name, custom_headers:nil)
|
||||
first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers:custom_headers)
|
||||
first_page.get_all_items
|
||||
end
|
||||
|
||||
#
|
||||
# Get a list of all Activity Log Alert rules in a resource group.
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group. The name
|
||||
# is case insensitive.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
|
||||
list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Get a list of all Activity Log Alert rules in a resource group.
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group. The name
|
||||
# is case insensitive.
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def list_by_resource_group_async(resource_group_name, custom_headers:nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/activityLogAlerts'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:get, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
# Deserialize Response
|
||||
if status_code == 200
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::Monitor::Mgmt::V2020_10_01::Models::AlertRuleList.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
#
|
||||
# Get a list of all Activity Log Alert rules in a subscription.
|
||||
#
|
||||
# @param next_page_link [String] The NextLink from the previous successful call
|
||||
# to List operation.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [AlertRuleList] operation results.
|
||||
#
|
||||
def list_by_subscription_id_next(next_page_link, custom_headers:nil)
|
||||
response = list_by_subscription_id_next_async(next_page_link, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Get a list of all Activity Log Alert rules in a subscription.
|
||||
#
|
||||
# @param next_page_link [String] The NextLink from the previous successful call
|
||||
# to List operation.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def list_by_subscription_id_next_with_http_info(next_page_link, custom_headers:nil)
|
||||
list_by_subscription_id_next_async(next_page_link, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Get a list of all Activity Log Alert rules in a subscription.
|
||||
#
|
||||
# @param next_page_link [String] The NextLink from the previous successful call
|
||||
# to List operation.
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def list_by_subscription_id_next_async(next_page_link, custom_headers:nil)
|
||||
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
path_template = '{nextLink}'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
skip_encoding_path_params: {'nextLink' => next_page_link},
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:get, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
# Deserialize Response
|
||||
if status_code == 200
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::Monitor::Mgmt::V2020_10_01::Models::AlertRuleList.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
#
|
||||
# Get a list of all Activity Log Alert rules in a resource group.
|
||||
#
|
||||
# @param next_page_link [String] The NextLink from the previous successful call
|
||||
# to List operation.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [AlertRuleList] operation results.
|
||||
#
|
||||
def list_by_resource_group_next(next_page_link, custom_headers:nil)
|
||||
response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Get a list of all Activity Log Alert rules in a resource group.
|
||||
#
|
||||
# @param next_page_link [String] The NextLink from the previous successful call
|
||||
# to List operation.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
|
||||
list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Get a list of all Activity Log Alert rules in a resource group.
|
||||
#
|
||||
# @param next_page_link [String] The NextLink from the previous successful call
|
||||
# to List operation.
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
|
||||
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
path_template = '{nextLink}'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
skip_encoding_path_params: {'nextLink' => next_page_link},
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:get, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
# Deserialize Response
|
||||
if status_code == 200
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::Monitor::Mgmt::V2020_10_01::Models::AlertRuleList.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
#
|
||||
# Get a list of all Activity Log Alert rules in a subscription.
|
||||
#
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [AlertRuleList] which provide lazy access to pages of the response.
|
||||
#
|
||||
def list_by_subscription_id_as_lazy(custom_headers:nil)
|
||||
response = list_by_subscription_id_async(custom_headers:custom_headers).value!
|
||||
unless response.nil?
|
||||
page = response.body
|
||||
page.next_method = Proc.new do |next_page_link|
|
||||
list_by_subscription_id_next_async(next_page_link, custom_headers:custom_headers)
|
||||
end
|
||||
page
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
# Get a list of all Activity Log Alert rules in a resource group.
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group. The name
|
||||
# is case insensitive.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [AlertRuleList] which provide lazy access to pages of the response.
|
||||
#
|
||||
def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil)
|
||||
response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
|
||||
unless response.nil?
|
||||
page = response.body
|
||||
page.next_method = Proc.new do |next_page_link|
|
||||
list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
|
||||
end
|
||||
page
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
|
@ -0,0 +1,68 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::Monitor::Mgmt::V2020_10_01
|
||||
module Models
|
||||
#
|
||||
# A pointer to an Azure Action Group.
|
||||
#
|
||||
class ActionGroup
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] The resource ID of the Action Group. This cannot be
|
||||
# null or empty.
|
||||
attr_accessor :action_group_id
|
||||
|
||||
# @return [Hash{String => String}] the dictionary of custom properties to
|
||||
# include with the post operation. These data are appended to the webhook
|
||||
# payload.
|
||||
attr_accessor :webhook_properties
|
||||
|
||||
|
||||
#
|
||||
# Mapper for ActionGroup class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'ActionGroup',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'ActionGroup',
|
||||
model_properties: {
|
||||
action_group_id: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'actionGroupId',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
webhook_properties: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'webhookProperties',
|
||||
type: {
|
||||
name: 'Dictionary',
|
||||
value: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,55 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::Monitor::Mgmt::V2020_10_01
|
||||
module Models
|
||||
#
|
||||
# A list of Activity Log Alert rule actions.
|
||||
#
|
||||
class ActionList
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [Array<ActionGroup>] The list of the Action Groups.
|
||||
attr_accessor :action_groups
|
||||
|
||||
|
||||
#
|
||||
# Mapper for ActionList class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'ActionList',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'ActionList',
|
||||
model_properties: {
|
||||
action_groups: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'actionGroups',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'ActionGroupElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'ActionGroup'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,160 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::Monitor::Mgmt::V2020_10_01
|
||||
module Models
|
||||
#
|
||||
# An Activity Log Alert rule resource.
|
||||
#
|
||||
class ActivityLogAlertResource < AzureResource
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [Array<String>] 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.
|
||||
attr_accessor :scopes
|
||||
|
||||
# @return [AlertRuleAllOfCondition] The condition that will cause this
|
||||
# alert to activate.
|
||||
attr_accessor :condition
|
||||
|
||||
# @return [ActionList] The actions that will activate when the condition
|
||||
# is met.
|
||||
attr_accessor :actions
|
||||
|
||||
# @return [Boolean] 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. Default value: true .
|
||||
attr_accessor :enabled
|
||||
|
||||
# @return [String] A description of this Activity Log Alert rule.
|
||||
attr_accessor :description
|
||||
|
||||
|
||||
#
|
||||
# Mapper for ActivityLogAlertResource class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'ActivityLogAlertResource',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'ActivityLogAlertResource',
|
||||
model_properties: {
|
||||
id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
location: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'location',
|
||||
default_value: 'global',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
tags: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'tags',
|
||||
type: {
|
||||
name: 'Dictionary',
|
||||
value: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
scopes: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'properties.scopes',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
condition: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'properties.condition',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'AlertRuleAllOfCondition'
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'properties.actions',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'ActionList'
|
||||
}
|
||||
},
|
||||
enabled: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.enabled',
|
||||
default_value: true,
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
},
|
||||
description: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.description',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,57 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::Monitor::Mgmt::V2020_10_01
|
||||
module Models
|
||||
#
|
||||
# An Activity Log Alert rule condition that is met when all its member
|
||||
# conditions are met.
|
||||
#
|
||||
class AlertRuleAllOfCondition
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [Array<AlertRuleAnyOfOrLeafCondition>] The list of Activity Log
|
||||
# Alert rule conditions.
|
||||
attr_accessor :all_of
|
||||
|
||||
|
||||
#
|
||||
# Mapper for AlertRuleAllOfCondition class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'AlertRuleAllOfCondition',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'AlertRuleAllOfCondition',
|
||||
model_properties: {
|
||||
all_of: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'allOf',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'AlertRuleAnyOfOrLeafConditionElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'AlertRuleAnyOfOrLeafCondition'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,101 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::Monitor::Mgmt::V2020_10_01
|
||||
module Models
|
||||
#
|
||||
# An Activity Log Alert rule condition that is met when all its member
|
||||
# conditions are met.
|
||||
# Each condition can be of one of the following types:
|
||||
# __Important__: Each type has its unique subset of properties. Properties
|
||||
# from different types CANNOT exist in one condition.
|
||||
# * __Leaf Condition -__ must contain 'field' and either 'equals' or
|
||||
# 'containsAny'.
|
||||
# _Please note, 'anyOf' should __not__ be set in a Leaf Condition._
|
||||
# * __AnyOf Condition -__ must contain __only__ 'anyOf' (which is an array
|
||||
# of Leaf Conditions).
|
||||
# _Please note, 'field', 'equals' and 'containsAny' should __not__ be set
|
||||
# in an AnyOf Condition._
|
||||
#
|
||||
#
|
||||
class AlertRuleAnyOfOrLeafCondition < AlertRuleLeafCondition
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [Array<AlertRuleLeafCondition>] An Activity Log Alert rule
|
||||
# 'anyOf' condition. An Activity Log Alert rule condition that is met
|
||||
# when at least one of its member leaf conditions are met.
|
||||
attr_accessor :any_of
|
||||
|
||||
|
||||
#
|
||||
# Mapper for AlertRuleAnyOfOrLeafCondition class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'AlertRuleAnyOfOrLeafCondition',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'AlertRuleAnyOfOrLeafCondition',
|
||||
model_properties: {
|
||||
field: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'field',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
equals: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'equals',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
contains_any: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'containsAny',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
any_of: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'anyOf',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'AlertRuleLeafConditionElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'AlertRuleLeafCondition'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,86 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::Monitor::Mgmt::V2020_10_01
|
||||
module Models
|
||||
#
|
||||
# An Activity Log Alert rule condition that is met by comparing the field
|
||||
# and value of an Activity Log event.
|
||||
# This condition must contain 'field' and either 'equals' or 'containsAny'.
|
||||
#
|
||||
class AlertRuleLeafCondition
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] The name of the Activity Log event's field that this
|
||||
# condition will examine.
|
||||
# The possible values for this field are (case-insensitive):
|
||||
# 'resourceId', 'category', 'caller', 'level', 'operationName',
|
||||
# 'resourceGroup', 'resourceProvider', 'status', 'subStatus',
|
||||
# 'resourceType', or anything beginning with 'properties'.
|
||||
attr_accessor :field
|
||||
|
||||
# @return [String] The value of the event's field will be compared to
|
||||
# this value (case-insensitive) to determine if the condition is met.
|
||||
attr_accessor :equals
|
||||
|
||||
# @return [Array<String>] 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.
|
||||
attr_accessor :contains_any
|
||||
|
||||
|
||||
#
|
||||
# Mapper for AlertRuleLeafCondition class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'AlertRuleLeafCondition',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'AlertRuleLeafCondition',
|
||||
model_properties: {
|
||||
field: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'field',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
equals: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'equals',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
contains_any: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'containsAny',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,100 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::Monitor::Mgmt::V2020_10_01
|
||||
module Models
|
||||
#
|
||||
# A list of Activity Log Alert rules.
|
||||
#
|
||||
class AlertRuleList
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
include MsRest::JSONable
|
||||
# @return [Array<ActivityLogAlertResource>] The list of Activity Log
|
||||
# Alert rules.
|
||||
attr_accessor :value
|
||||
|
||||
# @return [String] Provides the link to retrieve the next set of
|
||||
# elements.
|
||||
attr_accessor :next_link
|
||||
|
||||
# return [Proc] with next page method call.
|
||||
attr_accessor :next_method
|
||||
|
||||
#
|
||||
# Gets the rest of the items for the request, enabling auto-pagination.
|
||||
#
|
||||
# @return [Array<ActivityLogAlertResource>] operation results.
|
||||
#
|
||||
def get_all_items
|
||||
items = @value
|
||||
page = self
|
||||
while page.next_link != nil && !page.next_link.strip.empty? do
|
||||
page = page.get_next_page
|
||||
items.concat(page.value)
|
||||
end
|
||||
items
|
||||
end
|
||||
|
||||
#
|
||||
# Gets the next page of results.
|
||||
#
|
||||
# @return [AlertRuleList] with next page content.
|
||||
#
|
||||
def get_next_page
|
||||
response = @next_method.call(@next_link).value! unless @next_method.nil?
|
||||
unless response.nil?
|
||||
@next_link = response.body.next_link
|
||||
@value = response.body.value
|
||||
self
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
# Mapper for AlertRuleList class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'AlertRuleList',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'AlertRuleList',
|
||||
model_properties: {
|
||||
value: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'value',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'ActivityLogAlertResourceElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'ActivityLogAlertResource'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
next_link: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'nextLink',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,68 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::Monitor::Mgmt::V2020_10_01
|
||||
module Models
|
||||
#
|
||||
# An Activity Log Alert rule object for the body of patch operations.
|
||||
#
|
||||
class AlertRulePatchObject
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [Hash{String => String}] The resource tags
|
||||
attr_accessor :tags
|
||||
|
||||
# @return [Boolean] 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. Default value: true .
|
||||
attr_accessor :enabled
|
||||
|
||||
|
||||
#
|
||||
# Mapper for AlertRulePatchObject class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'AlertRulePatchObject',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'AlertRulePatchObject',
|
||||
model_properties: {
|
||||
tags: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'tags',
|
||||
type: {
|
||||
name: 'Dictionary',
|
||||
value: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
enabled: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.enabled',
|
||||
default_value: true,
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,104 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::Monitor::Mgmt::V2020_10_01
|
||||
module Models
|
||||
#
|
||||
# An Azure resource object.
|
||||
#
|
||||
class AzureResource
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] The resource Id.
|
||||
attr_accessor :id
|
||||
|
||||
# @return [String] The name of the resource.
|
||||
attr_accessor :name
|
||||
|
||||
# @return [String] The type of the resource.
|
||||
attr_accessor :type
|
||||
|
||||
# @return [String] The location of the resource. Since Azure Activity Log
|
||||
# Alerts is a global service, the location of the rules should always be
|
||||
# 'global'. Default value: 'global' .
|
||||
attr_accessor :location
|
||||
|
||||
# @return [Hash{String => String}] The tags of the resource.
|
||||
attr_accessor :tags
|
||||
|
||||
|
||||
#
|
||||
# Mapper for AzureResource class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'AzureResource',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'AzureResource',
|
||||
model_properties: {
|
||||
id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
location: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'location',
|
||||
default_value: 'global',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
tags: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'tags',
|
||||
type: {
|
||||
name: 'Dictionary',
|
||||
value: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,59 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::Monitor::Mgmt::V2020_10_01
|
||||
module Models
|
||||
#
|
||||
# The error response.
|
||||
#
|
||||
class ErrorResponse
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] The error code.
|
||||
attr_accessor :code
|
||||
|
||||
# @return [String] The error message indicating why the operation failed.
|
||||
attr_accessor :message
|
||||
|
||||
|
||||
#
|
||||
# Mapper for ErrorResponse class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'ErrorResponse',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'ErrorResponse',
|
||||
model_properties: {
|
||||
code: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'code',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
message: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'message',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,9 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure end
|
||||
module Azure::Monitor end
|
||||
module Azure::Monitor::Mgmt end
|
||||
module Azure::Monitor::Mgmt::V2020_10_01 end
|
|
@ -0,0 +1,131 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::Monitor::Mgmt::V2020_10_01
|
||||
#
|
||||
# A service client - single point of access to the REST API.
|
||||
#
|
||||
class MonitorManagementClient < MsRestAzure::AzureServiceClient
|
||||
include MsRestAzure
|
||||
include MsRestAzure::Serialization
|
||||
|
||||
# @return [String] the base URI of the service.
|
||||
attr_accessor :base_url
|
||||
|
||||
# @return Credentials needed for the client to connect to Azure.
|
||||
attr_reader :credentials
|
||||
|
||||
# @return [String] The API version to use for this operation.
|
||||
attr_reader :api_version
|
||||
|
||||
# @return [String] The ID of the target subscription.
|
||||
attr_accessor :subscription_id
|
||||
|
||||
# @return [String] The preferred language for the response.
|
||||
attr_accessor :accept_language
|
||||
|
||||
# @return [Integer] The retry timeout in seconds for Long Running
|
||||
# Operations. Default value is 30.
|
||||
attr_accessor :long_running_operation_retry_timeout
|
||||
|
||||
# @return [Boolean] Whether a unique x-ms-client-request-id should be
|
||||
# generated. When set to true a unique x-ms-client-request-id value is
|
||||
# generated and included in each request. Default is true.
|
||||
attr_accessor :generate_client_request_id
|
||||
|
||||
# @return [ActivityLogAlerts] activity_log_alerts
|
||||
attr_reader :activity_log_alerts
|
||||
|
||||
#
|
||||
# Creates initializes a new instance of the MonitorManagementClient class.
|
||||
# @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
|
||||
# @param base_url [String] the base URI of the service.
|
||||
# @param options [Array] filters to be applied to the HTTP requests.
|
||||
#
|
||||
def initialize(credentials = nil, base_url = nil, options = nil)
|
||||
super(credentials, options)
|
||||
@base_url = base_url || 'https://management.azure.com'
|
||||
|
||||
fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
|
||||
@credentials = credentials
|
||||
|
||||
@activity_log_alerts = ActivityLogAlerts.new(self)
|
||||
@api_version = '2020-10-01'
|
||||
@accept_language = 'en-US'
|
||||
@long_running_operation_retry_timeout = 30
|
||||
@generate_client_request_id = true
|
||||
add_telemetry
|
||||
end
|
||||
|
||||
#
|
||||
# Makes a request and returns the body of the response.
|
||||
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
||||
# @param path [String] the path, relative to {base_url}.
|
||||
# @param options [Hash{String=>String}] specifying any request options like :body.
|
||||
# @return [Hash{String=>String}] containing the body of the response.
|
||||
# Example:
|
||||
#
|
||||
# request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
|
||||
# path = "/path"
|
||||
# options = {
|
||||
# body: request_content,
|
||||
# query_params: {'api-version' => '2016-02-01'}
|
||||
# }
|
||||
# result = @client.make_request(:put, path, options)
|
||||
#
|
||||
def make_request(method, path, options = {})
|
||||
result = make_request_with_http_info(method, path, options)
|
||||
result.body unless result.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Makes a request and returns the operation response.
|
||||
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
||||
# @param path [String] the path, relative to {base_url}.
|
||||
# @param options [Hash{String=>String}] specifying any request options like :body.
|
||||
# @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
|
||||
#
|
||||
def make_request_with_http_info(method, path, options = {})
|
||||
result = make_request_async(method, path, options).value!
|
||||
result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
|
||||
result
|
||||
end
|
||||
|
||||
#
|
||||
# Makes a request asynchronously.
|
||||
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
||||
# @param path [String] the path, relative to {base_url}.
|
||||
# @param options [Hash{String=>String}] specifying any request options like :body.
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def make_request_async(method, path, options = {})
|
||||
fail ArgumentError, 'method is nil' if method.nil?
|
||||
fail ArgumentError, 'path is nil' if path.nil?
|
||||
|
||||
request_url = options[:base_url] || @base_url
|
||||
if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
|
||||
@request_headers['Content-Type'] = options[:headers]['Content-Type']
|
||||
end
|
||||
|
||||
request_headers = @request_headers
|
||||
request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
|
||||
options.merge!({headers: request_headers.merge(options[:headers] || {})})
|
||||
options.merge!({credentials: @credentials}) unless @credentials.nil?
|
||||
|
||||
super(request_url, method, path, options)
|
||||
end
|
||||
|
||||
|
||||
private
|
||||
#
|
||||
# Adds telemetry information.
|
||||
#
|
||||
def add_telemetry
|
||||
sdk_information = 'azure_mgmt_monitor'
|
||||
sdk_information = "#{sdk_information}/0.19.0"
|
||||
add_user_agent_information(sdk_information)
|
||||
end
|
||||
end
|
||||
end
|
|
@ -5,6 +5,7 @@
|
|||
require '2018-06-17-preview/generated/azure_mgmt_monitor'
|
||||
require '2015-05-01/generated/azure_mgmt_monitor'
|
||||
require '2015-04-01/generated/azure_mgmt_monitor'
|
||||
require '2020-10-01/generated/azure_mgmt_monitor'
|
||||
require '2019-06-01/generated/azure_mgmt_monitor'
|
||||
require '2017-12-01-preview/generated/azure_mgmt_monitor'
|
||||
require '2018-04-16/generated/azure_mgmt_monitor'
|
||||
|
|
|
@ -14,7 +14,6 @@ module Azure::Monitor::Profiles::Latest
|
|||
AlertRuleIncidents = Azure::Monitor::Mgmt::V2016_03_01::AlertRuleIncidents
|
||||
AlertRules = Azure::Monitor::Mgmt::V2016_03_01::AlertRules
|
||||
LogProfiles = Azure::Monitor::Mgmt::V2016_03_01::LogProfiles
|
||||
ActivityLogAlerts = Azure::Monitor::Mgmt::V2017_04_01::ActivityLogAlerts
|
||||
DiagnosticSettingsCategoryOperations = Azure::Monitor::Mgmt::V2017_05_01_preview::DiagnosticSettingsCategoryOperations
|
||||
DiagnosticSettingsOperations = Azure::Monitor::Mgmt::V2017_05_01_preview::DiagnosticSettingsOperations
|
||||
SubscriptionDiagnosticSettingsOperations = Azure::Monitor::Mgmt::V2017_05_01_preview::SubscriptionDiagnosticSettingsOperations
|
||||
|
@ -33,6 +32,7 @@ module Azure::Monitor::Profiles::Latest
|
|||
PrivateLinkResources = Azure::Monitor::Mgmt::V2019_10_17_preview::PrivateLinkResources
|
||||
PrivateEndpointConnections = Azure::Monitor::Mgmt::V2019_10_17_preview::PrivateEndpointConnections
|
||||
PrivateLinkScopedResources = Azure::Monitor::Mgmt::V2019_10_17_preview::PrivateLinkScopedResources
|
||||
ActivityLogAlerts = Azure::Monitor::Mgmt::V2020_10_01::ActivityLogAlerts
|
||||
|
||||
module Models
|
||||
RecurrentSchedule = Azure::Monitor::Mgmt::V2015_04_01::Models::RecurrentSchedule
|
||||
|
@ -88,13 +88,6 @@ module Azure::Monitor::Profiles::Latest
|
|||
LogProfileResource = Azure::Monitor::Mgmt::V2016_03_01::Models::LogProfileResource
|
||||
ConditionOperator = Azure::Monitor::Mgmt::V2016_03_01::Models::ConditionOperator
|
||||
TimeAggregationOperator = Azure::Monitor::Mgmt::V2016_03_01::Models::TimeAggregationOperator
|
||||
ActivityLogAlertLeafCondition = Azure::Monitor::Mgmt::V2017_04_01::Models::ActivityLogAlertLeafCondition
|
||||
ActivityLogAlertAllOfCondition = Azure::Monitor::Mgmt::V2017_04_01::Models::ActivityLogAlertAllOfCondition
|
||||
ActivityLogAlertActionGroup = Azure::Monitor::Mgmt::V2017_04_01::Models::ActivityLogAlertActionGroup
|
||||
ActivityLogAlertActionList = Azure::Monitor::Mgmt::V2017_04_01::Models::ActivityLogAlertActionList
|
||||
ActivityLogAlertPatchBody = Azure::Monitor::Mgmt::V2017_04_01::Models::ActivityLogAlertPatchBody
|
||||
ActivityLogAlertList = Azure::Monitor::Mgmt::V2017_04_01::Models::ActivityLogAlertList
|
||||
ActivityLogAlertResource = Azure::Monitor::Mgmt::V2017_04_01::Models::ActivityLogAlertResource
|
||||
ProxyOnlyResource = Azure::Monitor::Mgmt::V2017_05_01_preview::Models::ProxyOnlyResource
|
||||
DiagnosticSettingsCategoryResourceCollection = Azure::Monitor::Mgmt::V2017_05_01_preview::Models::DiagnosticSettingsCategoryResourceCollection
|
||||
RetentionPolicy = Azure::Monitor::Mgmt::V2017_05_01_preview::Models::RetentionPolicy
|
||||
|
@ -204,7 +197,6 @@ module Azure::Monitor::Profiles::Latest
|
|||
TagsResource = Azure::Monitor::Mgmt::V2019_10_17_preview::Models::TagsResource
|
||||
AzureMonitorPrivateLinkScopeListResult = Azure::Monitor::Mgmt::V2019_10_17_preview::Models::AzureMonitorPrivateLinkScopeListResult
|
||||
ErrorAdditionalInfo = Azure::Monitor::Mgmt::V2019_10_17_preview::Models::ErrorAdditionalInfo
|
||||
ErrorResponse = Azure::Monitor::Mgmt::V2019_10_17_preview::Models::ErrorResponse
|
||||
PrivateEndpointProperty = Azure::Monitor::Mgmt::V2019_10_17_preview::Models::PrivateEndpointProperty
|
||||
PrivateLinkResourceListResult = Azure::Monitor::Mgmt::V2019_10_17_preview::Models::PrivateLinkResourceListResult
|
||||
PrivateLinkScopesResource = Azure::Monitor::Mgmt::V2019_10_17_preview::Models::PrivateLinkScopesResource
|
||||
|
@ -214,13 +206,23 @@ module Azure::Monitor::Profiles::Latest
|
|||
AzureMonitorPrivateLinkScope = Azure::Monitor::Mgmt::V2019_10_17_preview::Models::AzureMonitorPrivateLinkScope
|
||||
PrivateLinkResource = Azure::Monitor::Mgmt::V2019_10_17_preview::Models::PrivateLinkResource
|
||||
ScopedResource = Azure::Monitor::Mgmt::V2019_10_17_preview::Models::ScopedResource
|
||||
ActionList = Azure::Monitor::Mgmt::V2020_10_01::Models::ActionList
|
||||
AzureResource = Azure::Monitor::Mgmt::V2020_10_01::Models::AzureResource
|
||||
AlertRuleLeafCondition = Azure::Monitor::Mgmt::V2020_10_01::Models::AlertRuleLeafCondition
|
||||
AlertRuleAllOfCondition = Azure::Monitor::Mgmt::V2020_10_01::Models::AlertRuleAllOfCondition
|
||||
AlertRuleList = Azure::Monitor::Mgmt::V2020_10_01::Models::AlertRuleList
|
||||
ErrorResponse = Azure::Monitor::Mgmt::V2020_10_01::Models::ErrorResponse
|
||||
ActionGroup = Azure::Monitor::Mgmt::V2020_10_01::Models::ActionGroup
|
||||
AlertRulePatchObject = Azure::Monitor::Mgmt::V2020_10_01::Models::AlertRulePatchObject
|
||||
AlertRuleAnyOfOrLeafCondition = Azure::Monitor::Mgmt::V2020_10_01::Models::AlertRuleAnyOfOrLeafCondition
|
||||
ActivityLogAlertResource = Azure::Monitor::Mgmt::V2020_10_01::Models::ActivityLogAlertResource
|
||||
end
|
||||
|
||||
#
|
||||
# MonitorManagementClass
|
||||
#
|
||||
class MonitorManagementClass
|
||||
attr_reader :activity_logs, :autoscale_settings, :event_categories, :operations, :tenant_activity_logs, :alert_rule_incidents, :alert_rules, :log_profiles, :activity_log_alerts, :diagnostic_settings_category_operations, :diagnostic_settings_operations, :subscription_diagnostic_settings_operations, :metric_baseline, :metric_namespaces, :metric_definitions, :metrics, :metric_alerts, :metric_alerts_status, :scheduled_query_rules, :vminsights, :baselines, :action_groups, :private_link_scopes, :private_link_scope_operation_status, :private_link_resources, :private_endpoint_connections, :private_link_scoped_resources, :configurable, :base_url, :options, :model_classes
|
||||
attr_reader :activity_logs, :autoscale_settings, :event_categories, :operations, :tenant_activity_logs, :alert_rule_incidents, :alert_rules, :log_profiles, :diagnostic_settings_category_operations, :diagnostic_settings_operations, :subscription_diagnostic_settings_operations, :metric_baseline, :metric_namespaces, :metric_definitions, :metrics, :metric_alerts, :metric_alerts_status, :scheduled_query_rules, :vminsights, :baselines, :action_groups, :private_link_scopes, :private_link_scope_operation_status, :private_link_resources, :private_endpoint_connections, :private_link_scoped_resources, :activity_log_alerts, :configurable, :base_url, :options, :model_classes
|
||||
|
||||
def initialize(options = {})
|
||||
if options.is_a?(Hash) && options.length == 0
|
||||
|
@ -255,90 +257,90 @@ module Azure::Monitor::Profiles::Latest
|
|||
@alert_rules = @client_1.alert_rules
|
||||
@log_profiles = @client_1.log_profiles
|
||||
|
||||
@client_2 = Azure::Monitor::Mgmt::V2017_04_01::MonitorManagementClient.new(configurable.credentials, base_url, options)
|
||||
@client_2 = Azure::Monitor::Mgmt::V2017_05_01_preview::MonitorManagementClient.new(configurable.credentials, base_url, options)
|
||||
if(@client_2.respond_to?(:subscription_id))
|
||||
@client_2.subscription_id = configurable.subscription_id
|
||||
end
|
||||
add_telemetry(@client_2)
|
||||
@activity_log_alerts = @client_2.activity_log_alerts
|
||||
@diagnostic_settings_category_operations = @client_2.diagnostic_settings_category_operations
|
||||
@diagnostic_settings_operations = @client_2.diagnostic_settings_operations
|
||||
@subscription_diagnostic_settings_operations = @client_2.subscription_diagnostic_settings_operations
|
||||
|
||||
@client_3 = Azure::Monitor::Mgmt::V2017_05_01_preview::MonitorManagementClient.new(configurable.credentials, base_url, options)
|
||||
@client_3 = Azure::Monitor::Mgmt::V2017_11_01_preview::MonitorManagementClient.new(configurable.credentials, base_url, options)
|
||||
if(@client_3.respond_to?(:subscription_id))
|
||||
@client_3.subscription_id = configurable.subscription_id
|
||||
end
|
||||
add_telemetry(@client_3)
|
||||
@diagnostic_settings_category_operations = @client_3.diagnostic_settings_category_operations
|
||||
@diagnostic_settings_operations = @client_3.diagnostic_settings_operations
|
||||
@subscription_diagnostic_settings_operations = @client_3.subscription_diagnostic_settings_operations
|
||||
@metric_baseline = @client_3.metric_baseline
|
||||
|
||||
@client_4 = Azure::Monitor::Mgmt::V2017_11_01_preview::MonitorManagementClient.new(configurable.credentials, base_url, options)
|
||||
@client_4 = Azure::Monitor::Mgmt::V2017_12_01_preview::MonitorManagementClient.new(configurable.credentials, base_url, options)
|
||||
if(@client_4.respond_to?(:subscription_id))
|
||||
@client_4.subscription_id = configurable.subscription_id
|
||||
end
|
||||
add_telemetry(@client_4)
|
||||
@metric_baseline = @client_4.metric_baseline
|
||||
@metric_namespaces = @client_4.metric_namespaces
|
||||
|
||||
@client_5 = Azure::Monitor::Mgmt::V2017_12_01_preview::MonitorManagementClient.new(configurable.credentials, base_url, options)
|
||||
@client_5 = Azure::Monitor::Mgmt::V2018_01_01::MonitorManagementClient.new(configurable.credentials, base_url, options)
|
||||
if(@client_5.respond_to?(:subscription_id))
|
||||
@client_5.subscription_id = configurable.subscription_id
|
||||
end
|
||||
add_telemetry(@client_5)
|
||||
@metric_namespaces = @client_5.metric_namespaces
|
||||
@metric_definitions = @client_5.metric_definitions
|
||||
@metrics = @client_5.metrics
|
||||
|
||||
@client_6 = Azure::Monitor::Mgmt::V2018_01_01::MonitorManagementClient.new(configurable.credentials, base_url, options)
|
||||
@client_6 = Azure::Monitor::Mgmt::V2018_03_01::MonitorManagementClient.new(configurable.credentials, base_url, options)
|
||||
if(@client_6.respond_to?(:subscription_id))
|
||||
@client_6.subscription_id = configurable.subscription_id
|
||||
end
|
||||
add_telemetry(@client_6)
|
||||
@metric_definitions = @client_6.metric_definitions
|
||||
@metrics = @client_6.metrics
|
||||
@metric_alerts = @client_6.metric_alerts
|
||||
@metric_alerts_status = @client_6.metric_alerts_status
|
||||
|
||||
@client_7 = Azure::Monitor::Mgmt::V2018_03_01::MonitorManagementClient.new(configurable.credentials, base_url, options)
|
||||
@client_7 = Azure::Monitor::Mgmt::V2018_04_16::MonitorClient.new(configurable.credentials, base_url, options)
|
||||
if(@client_7.respond_to?(:subscription_id))
|
||||
@client_7.subscription_id = configurable.subscription_id
|
||||
end
|
||||
add_telemetry(@client_7)
|
||||
@metric_alerts = @client_7.metric_alerts
|
||||
@metric_alerts_status = @client_7.metric_alerts_status
|
||||
@scheduled_query_rules = @client_7.scheduled_query_rules
|
||||
|
||||
@client_8 = Azure::Monitor::Mgmt::V2018_04_16::MonitorClient.new(configurable.credentials, base_url, options)
|
||||
@client_8 = Azure::Monitor::Mgmt::V2018_11_27_preview::MonitorManagementClient.new(configurable.credentials, base_url, options)
|
||||
if(@client_8.respond_to?(:subscription_id))
|
||||
@client_8.subscription_id = configurable.subscription_id
|
||||
end
|
||||
add_telemetry(@client_8)
|
||||
@scheduled_query_rules = @client_8.scheduled_query_rules
|
||||
@vminsights = @client_8.vminsights
|
||||
|
||||
@client_9 = Azure::Monitor::Mgmt::V2018_11_27_preview::MonitorManagementClient.new(configurable.credentials, base_url, options)
|
||||
@client_9 = Azure::Monitor::Mgmt::V2019_03_01::MonitorManagementClient.new(configurable.credentials, base_url, options)
|
||||
if(@client_9.respond_to?(:subscription_id))
|
||||
@client_9.subscription_id = configurable.subscription_id
|
||||
end
|
||||
add_telemetry(@client_9)
|
||||
@vminsights = @client_9.vminsights
|
||||
@baselines = @client_9.baselines
|
||||
|
||||
@client_10 = Azure::Monitor::Mgmt::V2019_03_01::MonitorManagementClient.new(configurable.credentials, base_url, options)
|
||||
@client_10 = Azure::Monitor::Mgmt::V2019_06_01::MonitorManagementClient.new(configurable.credentials, base_url, options)
|
||||
if(@client_10.respond_to?(:subscription_id))
|
||||
@client_10.subscription_id = configurable.subscription_id
|
||||
end
|
||||
add_telemetry(@client_10)
|
||||
@baselines = @client_10.baselines
|
||||
@action_groups = @client_10.action_groups
|
||||
|
||||
@client_11 = Azure::Monitor::Mgmt::V2019_06_01::MonitorManagementClient.new(configurable.credentials, base_url, options)
|
||||
@client_11 = Azure::Monitor::Mgmt::V2019_10_17_preview::MonitorManagementClient.new(configurable.credentials, base_url, options)
|
||||
if(@client_11.respond_to?(:subscription_id))
|
||||
@client_11.subscription_id = configurable.subscription_id
|
||||
end
|
||||
add_telemetry(@client_11)
|
||||
@action_groups = @client_11.action_groups
|
||||
@private_link_scopes = @client_11.private_link_scopes
|
||||
@private_link_scope_operation_status = @client_11.private_link_scope_operation_status
|
||||
@private_link_resources = @client_11.private_link_resources
|
||||
@private_endpoint_connections = @client_11.private_endpoint_connections
|
||||
@private_link_scoped_resources = @client_11.private_link_scoped_resources
|
||||
|
||||
@client_12 = Azure::Monitor::Mgmt::V2019_10_17_preview::MonitorManagementClient.new(configurable.credentials, base_url, options)
|
||||
@client_12 = Azure::Monitor::Mgmt::V2020_10_01::MonitorManagementClient.new(configurable.credentials, base_url, options)
|
||||
if(@client_12.respond_to?(:subscription_id))
|
||||
@client_12.subscription_id = configurable.subscription_id
|
||||
end
|
||||
add_telemetry(@client_12)
|
||||
@private_link_scopes = @client_12.private_link_scopes
|
||||
@private_link_scope_operation_status = @client_12.private_link_scope_operation_status
|
||||
@private_link_resources = @client_12.private_link_resources
|
||||
@private_endpoint_connections = @client_12.private_endpoint_connections
|
||||
@private_link_scoped_resources = @client_12.private_link_scoped_resources
|
||||
@activity_log_alerts = @client_12.activity_log_alerts
|
||||
|
||||
@model_classes = ModelClasses.new
|
||||
end
|
||||
|
@ -542,27 +544,6 @@ module Azure::Monitor::Profiles::Latest
|
|||
def time_aggregation_operator
|
||||
Azure::Monitor::Mgmt::V2016_03_01::Models::TimeAggregationOperator
|
||||
end
|
||||
def activity_log_alert_leaf_condition
|
||||
Azure::Monitor::Mgmt::V2017_04_01::Models::ActivityLogAlertLeafCondition
|
||||
end
|
||||
def activity_log_alert_all_of_condition
|
||||
Azure::Monitor::Mgmt::V2017_04_01::Models::ActivityLogAlertAllOfCondition
|
||||
end
|
||||
def activity_log_alert_action_group
|
||||
Azure::Monitor::Mgmt::V2017_04_01::Models::ActivityLogAlertActionGroup
|
||||
end
|
||||
def activity_log_alert_action_list
|
||||
Azure::Monitor::Mgmt::V2017_04_01::Models::ActivityLogAlertActionList
|
||||
end
|
||||
def activity_log_alert_patch_body
|
||||
Azure::Monitor::Mgmt::V2017_04_01::Models::ActivityLogAlertPatchBody
|
||||
end
|
||||
def activity_log_alert_list
|
||||
Azure::Monitor::Mgmt::V2017_04_01::Models::ActivityLogAlertList
|
||||
end
|
||||
def activity_log_alert_resource
|
||||
Azure::Monitor::Mgmt::V2017_04_01::Models::ActivityLogAlertResource
|
||||
end
|
||||
def proxy_only_resource
|
||||
Azure::Monitor::Mgmt::V2017_05_01_preview::Models::ProxyOnlyResource
|
||||
end
|
||||
|
@ -890,9 +871,6 @@ module Azure::Monitor::Profiles::Latest
|
|||
def error_additional_info
|
||||
Azure::Monitor::Mgmt::V2019_10_17_preview::Models::ErrorAdditionalInfo
|
||||
end
|
||||
def error_response
|
||||
Azure::Monitor::Mgmt::V2019_10_17_preview::Models::ErrorResponse
|
||||
end
|
||||
def private_endpoint_property
|
||||
Azure::Monitor::Mgmt::V2019_10_17_preview::Models::PrivateEndpointProperty
|
||||
end
|
||||
|
@ -920,6 +898,36 @@ module Azure::Monitor::Profiles::Latest
|
|||
def scoped_resource
|
||||
Azure::Monitor::Mgmt::V2019_10_17_preview::Models::ScopedResource
|
||||
end
|
||||
def action_list
|
||||
Azure::Monitor::Mgmt::V2020_10_01::Models::ActionList
|
||||
end
|
||||
def azure_resource
|
||||
Azure::Monitor::Mgmt::V2020_10_01::Models::AzureResource
|
||||
end
|
||||
def alert_rule_leaf_condition
|
||||
Azure::Monitor::Mgmt::V2020_10_01::Models::AlertRuleLeafCondition
|
||||
end
|
||||
def alert_rule_all_of_condition
|
||||
Azure::Monitor::Mgmt::V2020_10_01::Models::AlertRuleAllOfCondition
|
||||
end
|
||||
def alert_rule_list
|
||||
Azure::Monitor::Mgmt::V2020_10_01::Models::AlertRuleList
|
||||
end
|
||||
def error_response
|
||||
Azure::Monitor::Mgmt::V2020_10_01::Models::ErrorResponse
|
||||
end
|
||||
def action_group
|
||||
Azure::Monitor::Mgmt::V2020_10_01::Models::ActionGroup
|
||||
end
|
||||
def alert_rule_patch_object
|
||||
Azure::Monitor::Mgmt::V2020_10_01::Models::AlertRulePatchObject
|
||||
end
|
||||
def alert_rule_any_of_or_leaf_condition
|
||||
Azure::Monitor::Mgmt::V2020_10_01::Models::AlertRuleAnyOfOrLeafCondition
|
||||
end
|
||||
def activity_log_alert_resource
|
||||
Azure::Monitor::Mgmt::V2020_10_01::Models::ActivityLogAlertResource
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
|
||||
module Azure::Monitor::Mgmt
|
||||
VERSION = '0.18.0'
|
||||
VERSION = '0.19.0'
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче