diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/action_groups.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/action_groups.rb index 97be70a3ea..0e87092071 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/action_groups.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/action_groups.rb @@ -206,7 +206,7 @@ def get_async(resource_group_name, action_group_name, custom_headers = nil) http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 || status_code == 404 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -562,7 +562,7 @@ def enable_receiver_async(resource_group_name, action_group_name, enable_request http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 || status_code == 409 || status_code == 404 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/alert_rules.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/alert_rules.rb index c175559b08..6659169560 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/alert_rules.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/alert_rules.rb @@ -396,7 +396,7 @@ def update_async(resource_group_name, rule_name, alert_rules_resource, custom_he http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 200 || status_code == 201 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end @@ -412,6 +412,16 @@ def update_async(resource_group_name, rule_name, alert_rules_resource, custom_he 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::ARM::Monitor::Models::AlertRuleResource.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 diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/email_receiver.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/email_receiver.rb index 6abccbea6a..0825799f07 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/email_receiver.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/email_receiver.rb @@ -20,8 +20,8 @@ class EmailReceiver # @return [String] The email address of this receiver. attr_accessor :email_address - # @return [ReceiverStatus] Possible values include: 'NotSpecified', - # 'Enabled', 'Disabled' + # @return [ReceiverStatus] The receiver status of the e-mail. Possible + # values include: 'NotSpecified', 'Enabled', 'Disabled' attr_accessor :status diff --git a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/sms_receiver.rb b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/sms_receiver.rb index 879dcd5e2e..857df43b15 100644 --- a/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/sms_receiver.rb +++ b/management/azure_mgmt_monitor/lib/generated/azure_mgmt_monitor/models/sms_receiver.rb @@ -23,8 +23,8 @@ class SmsReceiver # @return [String] The phone number of the SMS receiver. attr_accessor :phone_number - # @return [ReceiverStatus] Possible values include: 'NotSpecified', - # 'Enabled', 'Disabled' + # @return [ReceiverStatus] The status of the receiver. Possible values + # include: 'NotSpecified', 'Enabled', 'Disabled' attr_accessor :status