Class: Azure::Security::Mgmt::V2015_06_01_preview::Alerts
- Inherits:
-
Object
- Object
- Azure::Security::Mgmt::V2015_06_01_preview::Alerts
- Includes:
- MsRestAzure
- Defined in:
- lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb
Overview
API spec for Microsoft.Security (Azure Security Center) resource provider
Instance Attribute Summary collapse
-
#client ⇒ SecurityCenter
readonly
Reference to the SecurityCenter.
Instance Method Summary collapse
-
#get_resource_group_level_alerts(alert_name, resource_group_name, custom_headers: nil) ⇒ Alert
Get an alert that is associated a resource group or a resource in a resource group.
-
#get_resource_group_level_alerts_async(alert_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Get an alert that is associated a resource group or a resource in a resource group.
-
#get_resource_group_level_alerts_with_http_info(alert_name, resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get an alert that is associated a resource group or a resource in a resource group.
-
#get_subscription_level_alert(alert_name, custom_headers: nil) ⇒ Alert
Get an alert that is associated with a subscription.
-
#get_subscription_level_alert_async(alert_name, custom_headers: nil) ⇒ Concurrent::Promise
Get an alert that is associated with a subscription.
-
#get_subscription_level_alert_with_http_info(alert_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get an alert that is associated with a subscription.
-
#initialize(client) ⇒ Alerts
constructor
Creates and initializes a new instance of the Alerts class.
-
#list(filter: nil, select: nil, expand: nil, custom_headers: nil) ⇒ Array<Alert>
List all the alerts that are associated with the subscription.
-
#list_as_lazy(filter: nil, select: nil, expand: nil, custom_headers: nil) ⇒ AlertList
List all the alerts that are associated with the subscription.
-
#list_async(filter: nil, select: nil, expand: nil, custom_headers: nil) ⇒ Concurrent::Promise
List all the alerts that are associated with the subscription.
-
#list_by_resource_group(resource_group_name, filter: nil, select: nil, expand: nil, custom_headers: nil) ⇒ Array<Alert>
List all the alerts that are associated with the resource group.
-
#list_by_resource_group_as_lazy(resource_group_name, filter: nil, select: nil, expand: nil, custom_headers: nil) ⇒ AlertList
List all the alerts that are associated with the resource group.
-
#list_by_resource_group_async(resource_group_name, filter: nil, select: nil, expand: nil, custom_headers: nil) ⇒ Concurrent::Promise
List all the alerts that are associated with the resource group.
-
#list_by_resource_group_next(next_page_link, custom_headers: nil) ⇒ AlertList
List all the alerts that are associated with the resource group.
-
#list_by_resource_group_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
List all the alerts that are associated with the resource group.
-
#list_by_resource_group_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List all the alerts that are associated with the resource group.
-
#list_by_resource_group_with_http_info(resource_group_name, filter: nil, select: nil, expand: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List all the alerts that are associated with the resource group.
-
#list_next(next_page_link, custom_headers: nil) ⇒ AlertList
List all the alerts that are associated with the subscription.
-
#list_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
List all the alerts that are associated with the subscription.
-
#list_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List all the alerts that are associated with the subscription.
-
#list_resource_group_level_alerts_by_region(resource_group_name, filter: nil, select: nil, expand: nil, custom_headers: nil) ⇒ Array<Alert>
List all the alerts that are associated with the resource group that are stored in a specific location.
-
#list_resource_group_level_alerts_by_region_as_lazy(resource_group_name, filter: nil, select: nil, expand: nil, custom_headers: nil) ⇒ AlertList
List all the alerts that are associated with the resource group that are stored in a specific location.
-
#list_resource_group_level_alerts_by_region_async(resource_group_name, filter: nil, select: nil, expand: nil, custom_headers: nil) ⇒ Concurrent::Promise
List all the alerts that are associated with the resource group that are stored in a specific location.
-
#list_resource_group_level_alerts_by_region_next(next_page_link, custom_headers: nil) ⇒ AlertList
List all the alerts that are associated with the resource group that are stored in a specific location.
-
#list_resource_group_level_alerts_by_region_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
List all the alerts that are associated with the resource group that are stored in a specific location.
-
#list_resource_group_level_alerts_by_region_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List all the alerts that are associated with the resource group that are stored in a specific location.
-
#list_resource_group_level_alerts_by_region_with_http_info(resource_group_name, filter: nil, select: nil, expand: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List all the alerts that are associated with the resource group that are stored in a specific location.
-
#list_subscription_level_alerts_by_region(filter: nil, select: nil, expand: nil, custom_headers: nil) ⇒ Array<Alert>
List all the alerts that are associated with the subscription that are stored in a specific location.
-
#list_subscription_level_alerts_by_region_as_lazy(filter: nil, select: nil, expand: nil, custom_headers: nil) ⇒ AlertList
List all the alerts that are associated with the subscription that are stored in a specific location.
-
#list_subscription_level_alerts_by_region_async(filter: nil, select: nil, expand: nil, custom_headers: nil) ⇒ Concurrent::Promise
List all the alerts that are associated with the subscription that are stored in a specific location.
-
#list_subscription_level_alerts_by_region_next(next_page_link, custom_headers: nil) ⇒ AlertList
List all the alerts that are associated with the subscription that are stored in a specific location.
-
#list_subscription_level_alerts_by_region_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
List all the alerts that are associated with the subscription that are stored in a specific location.
-
#list_subscription_level_alerts_by_region_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List all the alerts that are associated with the subscription that are stored in a specific location.
-
#list_subscription_level_alerts_by_region_with_http_info(filter: nil, select: nil, expand: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List all the alerts that are associated with the subscription that are stored in a specific location.
-
#list_with_http_info(filter: nil, select: nil, expand: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List all the alerts that are associated with the subscription.
-
#update_resource_group_level_alert_state_to_dismiss(alert_name, resource_group_name, custom_headers: nil) ⇒ Object
Update the alert’s state.
-
#update_resource_group_level_alert_state_to_dismiss_async(alert_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Update the alert’s state.
-
#update_resource_group_level_alert_state_to_dismiss_with_http_info(alert_name, resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Update the alert’s state.
-
#update_resource_group_level_alert_state_to_reactivate(alert_name, resource_group_name, custom_headers: nil) ⇒ Object
Update the alert’s state.
-
#update_resource_group_level_alert_state_to_reactivate_async(alert_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Update the alert’s state.
-
#update_resource_group_level_alert_state_to_reactivate_with_http_info(alert_name, resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Update the alert’s state.
-
#update_subscription_level_alert_state_to_dismiss(alert_name, custom_headers: nil) ⇒ Object
Update the alert’s state.
-
#update_subscription_level_alert_state_to_dismiss_async(alert_name, custom_headers: nil) ⇒ Concurrent::Promise
Update the alert’s state.
-
#update_subscription_level_alert_state_to_dismiss_with_http_info(alert_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Update the alert’s state.
-
#update_subscription_level_alert_state_to_reactivate(alert_name, custom_headers: nil) ⇒ Object
Update the alert’s state.
-
#update_subscription_level_alert_state_to_reactivate_async(alert_name, custom_headers: nil) ⇒ Concurrent::Promise
Update the alert’s state.
-
#update_subscription_level_alert_state_to_reactivate_with_http_info(alert_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Update the alert’s state.
Constructor Details
#initialize(client) ⇒ Alerts
Creates and initializes a new instance of the Alerts class.
17 18 19 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 17 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ SecurityCenter (readonly)
Returns reference to the SecurityCenter.
22 23 24 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 22 def client @client end |
Instance Method Details
#get_resource_group_level_alerts(alert_name, resource_group_name, custom_headers: nil) ⇒ Alert
Get an alert that is associated a resource group or a resource in a resource group
user’s subscription. The name is case insensitive. will be added to the HTTP request.
540 541 542 543 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 540 def get_resource_group_level_alerts(alert_name, resource_group_name, custom_headers:nil) response = get_resource_group_level_alerts_async(alert_name, resource_group_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_resource_group_level_alerts_async(alert_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Get an alert that is associated a resource group or a resource in a resource group
user’s subscription. The name is case insensitive. to the HTTP request.
573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 573 def get_resource_group_level_alerts_async(alert_name, resource_group_name, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'Pattern': '^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'" if !@client.subscription_id.nil? && @client.subscription_id.match(Regexp.new('^^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$$')).nil? fail ArgumentError, '@client.asc_location is nil' if @client.asc_location.nil? fail ArgumentError, 'alert_name is nil' if alert_name.nil? 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? 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.Security/locations/{ascLocation}/alerts/{alertName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'ascLocation' => @client.asc_location,'alertName' => alert_name,'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, ) 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 MsRestAzure::AzureOperationError.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::Security::Mgmt::V2015_06_01_preview::Models::Alert.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_resource_group_level_alerts_with_http_info(alert_name, resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get an alert that is associated a resource group or a resource in a resource group
user’s subscription. The name is case insensitive. will be added to the HTTP request.
557 558 559 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 557 def get_resource_group_level_alerts_with_http_info(alert_name, resource_group_name, custom_headers:nil) get_resource_group_level_alerts_async(alert_name, resource_group_name, custom_headers:custom_headers).value! end |
#get_subscription_level_alert(alert_name, custom_headers: nil) ⇒ Alert
Get an alert that is associated with a subscription
will be added to the HTTP request.
445 446 447 448 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 445 def get_subscription_level_alert(alert_name, custom_headers:nil) response = get_subscription_level_alert_async(alert_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_subscription_level_alert_async(alert_name, custom_headers: nil) ⇒ Concurrent::Promise
Get an alert that is associated with a subscription
to the HTTP request.
472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 472 def get_subscription_level_alert_async(alert_name, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'Pattern': '^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'" if !@client.subscription_id.nil? && @client.subscription_id.match(Regexp.new('^^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$$')).nil? fail ArgumentError, '@client.asc_location is nil' if @client.asc_location.nil? fail ArgumentError, 'alert_name is nil' if alert_name.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 = 'subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'ascLocation' => @client.asc_location,'alertName' => 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, ) 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 MsRestAzure::AzureOperationError.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::Security::Mgmt::V2015_06_01_preview::Models::Alert.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_subscription_level_alert_with_http_info(alert_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get an alert that is associated with a subscription
will be added to the HTTP request.
459 460 461 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 459 def get_subscription_level_alert_with_http_info(alert_name, custom_headers:nil) get_subscription_level_alert_async(alert_name, custom_headers:custom_headers).value! end |
#list(filter: nil, select: nil, expand: nil, custom_headers: nil) ⇒ Array<Alert>
List all the alerts that are associated with the subscription
will be added to the HTTP request.
35 36 37 38 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 35 def list(filter:nil, select:nil, expand:nil, custom_headers:nil) first_page = list_as_lazy(filter:filter, select:select, expand:, custom_headers:custom_headers) first_page.get_all_items end |
#list_as_lazy(filter: nil, select: nil, expand: nil, custom_headers: nil) ⇒ AlertList
List all the alerts that are associated with the subscription
will be added to the HTTP request.
1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 1354 def list_as_lazy(filter:nil, select:nil, expand:nil, custom_headers:nil) response = list_async(filter:filter, select:select, expand:, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_async(filter: nil, select: nil, expand: nil, custom_headers: nil) ⇒ Concurrent::Promise
List all the alerts that are associated with the subscription
to the HTTP request.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 66 def list_async(filter:nil, select:nil, expand:nil, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'Pattern': '^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'" if !@client.subscription_id.nil? && @client.subscription_id.match(Regexp.new('^^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$$')).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 = 'subscriptions/{subscriptionId}/providers/Microsoft.Security/alerts' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version,'$filter' => filter,'$select' => select,'$expand' => }, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) 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 MsRestAzure::AzureOperationError.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::Security::Mgmt::V2015_06_01_preview::Models::AlertList.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_by_resource_group(resource_group_name, filter: nil, select: nil, expand: nil, custom_headers: nil) ⇒ Array<Alert>
List all the alerts that are associated with the resource group
user’s subscription. The name is case insensitive. will be added to the HTTP request.
133 134 135 136 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 133 def list_by_resource_group(resource_group_name, filter:nil, select:nil, expand:nil, custom_headers:nil) first_page = list_by_resource_group_as_lazy(resource_group_name, filter:filter, select:select, expand:, custom_headers:custom_headers) first_page.get_all_items end |
#list_by_resource_group_as_lazy(resource_group_name, filter: nil, select: nil, expand: nil, custom_headers: nil) ⇒ AlertList
List all the alerts that are associated with the resource group
user’s subscription. The name is case insensitive. will be added to the HTTP request.
1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 1378 def list_by_resource_group_as_lazy(resource_group_name, filter:nil, select:nil, expand:nil, custom_headers:nil) response = list_by_resource_group_async(resource_group_name, filter:filter, select:select, expand:, 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 |
#list_by_resource_group_async(resource_group_name, filter: nil, select: nil, expand: nil, custom_headers: nil) ⇒ Concurrent::Promise
List all the alerts that are associated with the resource group
user’s subscription. The name is case insensitive. to the HTTP request.
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 168 def list_by_resource_group_async(resource_group_name, filter:nil, select:nil, expand:nil, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'Pattern': '^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'" if !@client.subscription_id.nil? && @client.subscription_id.match(Regexp.new('^^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$$')).nil? 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? 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.Security/alerts' request_url = @base_url || @client.base_url = { 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,'$filter' => filter,'$select' => select,'$expand' => }, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) 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 MsRestAzure::AzureOperationError.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::Security::Mgmt::V2015_06_01_preview::Models::AlertList.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_by_resource_group_next(next_page_link, custom_headers: nil) ⇒ AlertList
List all the alerts that are associated with the resource group
to List operation. will be added to the HTTP request.
1077 1078 1079 1080 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 1077 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 |
#list_by_resource_group_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
List all the alerts that are associated with the resource group
to List operation. to the HTTP request.
1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 1106 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 = { 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, ) 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 MsRestAzure::AzureOperationError.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::Security::Mgmt::V2015_06_01_preview::Models::AlertList.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_by_resource_group_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List all the alerts that are associated with the resource group
to List operation. will be added to the HTTP request.
1092 1093 1094 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 1092 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 |
#list_by_resource_group_with_http_info(resource_group_name, filter: nil, select: nil, expand: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List all the alerts that are associated with the resource group
user’s subscription. The name is case insensitive. will be added to the HTTP request.
151 152 153 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 151 def list_by_resource_group_with_http_info(resource_group_name, filter:nil, select:nil, expand:nil, custom_headers:nil) list_by_resource_group_async(resource_group_name, filter:filter, select:select, expand:, custom_headers:custom_headers).value! end |
#list_next(next_page_link, custom_headers: nil) ⇒ AlertList
List all the alerts that are associated with the subscription
to List operation. will be added to the HTTP request.
987 988 989 990 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 987 def list_next(next_page_link, custom_headers:nil) response = list_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
List all the alerts that are associated with the subscription
to List operation. to the HTTP request.
1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 1016 def list_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 = { 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, ) 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 MsRestAzure::AzureOperationError.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::Security::Mgmt::V2015_06_01_preview::Models::AlertList.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List all the alerts that are associated with the subscription
to List operation. will be added to the HTTP request.
1002 1003 1004 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 1002 def list_next_with_http_info(next_page_link, custom_headers:nil) list_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_resource_group_level_alerts_by_region(resource_group_name, filter: nil, select: nil, expand: nil, custom_headers: nil) ⇒ Array<Alert>
List all the alerts that are associated with the resource group that are stored in a specific location
user’s subscription. The name is case insensitive. will be added to the HTTP request.
340 341 342 343 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 340 def list_resource_group_level_alerts_by_region(resource_group_name, filter:nil, select:nil, expand:nil, custom_headers:nil) first_page = list_resource_group_level_alerts_by_region_as_lazy(resource_group_name, filter:filter, select:select, expand:, custom_headers:custom_headers) first_page.get_all_items end |
#list_resource_group_level_alerts_by_region_as_lazy(resource_group_name, filter: nil, select: nil, expand: nil, custom_headers: nil) ⇒ AlertList
List all the alerts that are associated with the resource group that are stored in a specific location
user’s subscription. The name is case insensitive. will be added to the HTTP request.
1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 1426 def list_resource_group_level_alerts_by_region_as_lazy(resource_group_name, filter:nil, select:nil, expand:nil, custom_headers:nil) response = list_resource_group_level_alerts_by_region_async(resource_group_name, filter:filter, select:select, expand:, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_resource_group_level_alerts_by_region_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_resource_group_level_alerts_by_region_async(resource_group_name, filter: nil, select: nil, expand: nil, custom_headers: nil) ⇒ Concurrent::Promise
List all the alerts that are associated with the resource group that are stored in a specific location
user’s subscription. The name is case insensitive. to the HTTP request.
377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 377 def list_resource_group_level_alerts_by_region_async(resource_group_name, filter:nil, select:nil, expand:nil, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'Pattern': '^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'" if !@client.subscription_id.nil? && @client.subscription_id.match(Regexp.new('^^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$$')).nil? fail ArgumentError, '@client.asc_location is nil' if @client.asc_location.nil? 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? 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.Security/locations/{ascLocation}/alerts' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'ascLocation' => @client.asc_location,'resourceGroupName' => resource_group_name}, query_params: {'api-version' => @client.api_version,'$filter' => filter,'$select' => select,'$expand' => }, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) 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 MsRestAzure::AzureOperationError.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::Security::Mgmt::V2015_06_01_preview::Models::AlertList.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_resource_group_level_alerts_by_region_next(next_page_link, custom_headers: nil) ⇒ AlertList
List all the alerts that are associated with the resource group that are stored in a specific location
to List operation. will be added to the HTTP request.
1261 1262 1263 1264 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 1261 def list_resource_group_level_alerts_by_region_next(next_page_link, custom_headers:nil) response = list_resource_group_level_alerts_by_region_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_resource_group_level_alerts_by_region_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
List all the alerts that are associated with the resource group that are stored in a specific location
to List operation. to the HTTP request.
1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 1292 def list_resource_group_level_alerts_by_region_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 = { 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, ) 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 MsRestAzure::AzureOperationError.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::Security::Mgmt::V2015_06_01_preview::Models::AlertList.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_resource_group_level_alerts_by_region_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List all the alerts that are associated with the resource group that are stored in a specific location
to List operation. will be added to the HTTP request.
1277 1278 1279 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 1277 def list_resource_group_level_alerts_by_region_next_with_http_info(next_page_link, custom_headers:nil) list_resource_group_level_alerts_by_region_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_resource_group_level_alerts_by_region_with_http_info(resource_group_name, filter: nil, select: nil, expand: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List all the alerts that are associated with the resource group that are stored in a specific location
user’s subscription. The name is case insensitive. will be added to the HTTP request.
359 360 361 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 359 def list_resource_group_level_alerts_by_region_with_http_info(resource_group_name, filter:nil, select:nil, expand:nil, custom_headers:nil) list_resource_group_level_alerts_by_region_async(resource_group_name, filter:filter, select:select, expand:, custom_headers:custom_headers).value! end |
#list_subscription_level_alerts_by_region(filter: nil, select: nil, expand: nil, custom_headers: nil) ⇒ Array<Alert>
List all the alerts that are associated with the subscription that are stored in a specific location
will be added to the HTTP request.
238 239 240 241 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 238 def list_subscription_level_alerts_by_region(filter:nil, select:nil, expand:nil, custom_headers:nil) first_page = list_subscription_level_alerts_by_region_as_lazy(filter:filter, select:select, expand:, custom_headers:custom_headers) first_page.get_all_items end |
#list_subscription_level_alerts_by_region_as_lazy(filter: nil, select: nil, expand: nil, custom_headers: nil) ⇒ AlertList
List all the alerts that are associated with the subscription that are stored in a specific location
will be added to the HTTP request.
1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 1401 def list_subscription_level_alerts_by_region_as_lazy(filter:nil, select:nil, expand:nil, custom_headers:nil) response = list_subscription_level_alerts_by_region_async(filter:filter, select:select, expand:, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_subscription_level_alerts_by_region_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_subscription_level_alerts_by_region_async(filter: nil, select: nil, expand: nil, custom_headers: nil) ⇒ Concurrent::Promise
List all the alerts that are associated with the subscription that are stored in a specific location
to the HTTP request.
271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 271 def list_subscription_level_alerts_by_region_async(filter:nil, select:nil, expand:nil, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'Pattern': '^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'" if !@client.subscription_id.nil? && @client.subscription_id.match(Regexp.new('^^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$$')).nil? fail ArgumentError, '@client.asc_location is nil' if @client.asc_location.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 = 'subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'ascLocation' => @client.asc_location}, query_params: {'api-version' => @client.api_version,'$filter' => filter,'$select' => select,'$expand' => }, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) 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 MsRestAzure::AzureOperationError.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::Security::Mgmt::V2015_06_01_preview::Models::AlertList.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_subscription_level_alerts_by_region_next(next_page_link, custom_headers: nil) ⇒ AlertList
List all the alerts that are associated with the subscription that are stored in a specific location
to List operation. will be added to the HTTP request.
1168 1169 1170 1171 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 1168 def list_subscription_level_alerts_by_region_next(next_page_link, custom_headers:nil) response = list_subscription_level_alerts_by_region_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_subscription_level_alerts_by_region_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
List all the alerts that are associated with the subscription that are stored in a specific location
to List operation. to the HTTP request.
1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 1199 def list_subscription_level_alerts_by_region_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 = { 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, ) 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 MsRestAzure::AzureOperationError.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::Security::Mgmt::V2015_06_01_preview::Models::AlertList.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_subscription_level_alerts_by_region_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List all the alerts that are associated with the subscription that are stored in a specific location
to List operation. will be added to the HTTP request.
1184 1185 1186 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 1184 def list_subscription_level_alerts_by_region_next_with_http_info(next_page_link, custom_headers:nil) list_subscription_level_alerts_by_region_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_subscription_level_alerts_by_region_with_http_info(filter: nil, select: nil, expand: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List all the alerts that are associated with the subscription that are stored in a specific location
will be added to the HTTP request.
255 256 257 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 255 def list_subscription_level_alerts_by_region_with_http_info(filter:nil, select:nil, expand:nil, custom_headers:nil) list_subscription_level_alerts_by_region_async(filter:filter, select:select, expand:, custom_headers:custom_headers).value! end |
#list_with_http_info(filter: nil, select: nil, expand: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List all the alerts that are associated with the subscription
will be added to the HTTP request.
51 52 53 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 51 def list_with_http_info(filter:nil, select:nil, expand:nil, custom_headers:nil) list_async(filter:filter, select:select, expand:, custom_headers:custom_headers).value! end |
#update_resource_group_level_alert_state_to_dismiss(alert_name, resource_group_name, custom_headers: nil) ⇒ Object
Update the alert’s state
user’s subscription. The name is case insensitive. will be added to the HTTP request.
805 806 807 808 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 805 def update_resource_group_level_alert_state_to_dismiss(alert_name, resource_group_name, custom_headers:nil) response = update_resource_group_level_alert_state_to_dismiss_async(alert_name, resource_group_name, custom_headers:custom_headers).value! nil end |
#update_resource_group_level_alert_state_to_dismiss_async(alert_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Update the alert’s state
user’s subscription. The name is case insensitive. to the HTTP request.
836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 836 def update_resource_group_level_alert_state_to_dismiss_async(alert_name, resource_group_name, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'Pattern': '^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'" if !@client.subscription_id.nil? && @client.subscription_id.match(Regexp.new('^^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$$')).nil? fail ArgumentError, '@client.asc_location is nil' if @client.asc_location.nil? fail ArgumentError, 'alert_name is nil' if alert_name.nil? 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? 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.Security/locations/{ascLocation}/alerts/{alertName}/dismiss' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'ascLocation' => @client.asc_location,'alertName' => alert_name,'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(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.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 |
#update_resource_group_level_alert_state_to_dismiss_with_http_info(alert_name, resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Update the alert’s state
user’s subscription. The name is case insensitive. will be added to the HTTP request.
821 822 823 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 821 def update_resource_group_level_alert_state_to_dismiss_with_http_info(alert_name, resource_group_name, custom_headers:nil) update_resource_group_level_alert_state_to_dismiss_async(alert_name, resource_group_name, custom_headers:custom_headers).value! end |
#update_resource_group_level_alert_state_to_reactivate(alert_name, resource_group_name, custom_headers: nil) ⇒ Object
Update the alert’s state
user’s subscription. The name is case insensitive. will be added to the HTTP request.
896 897 898 899 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 896 def update_resource_group_level_alert_state_to_reactivate(alert_name, resource_group_name, custom_headers:nil) response = update_resource_group_level_alert_state_to_reactivate_async(alert_name, resource_group_name, custom_headers:custom_headers).value! nil end |
#update_resource_group_level_alert_state_to_reactivate_async(alert_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Update the alert’s state
user’s subscription. The name is case insensitive. to the HTTP request.
927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 927 def update_resource_group_level_alert_state_to_reactivate_async(alert_name, resource_group_name, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'Pattern': '^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'" if !@client.subscription_id.nil? && @client.subscription_id.match(Regexp.new('^^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$$')).nil? fail ArgumentError, '@client.asc_location is nil' if @client.asc_location.nil? fail ArgumentError, 'alert_name is nil' if alert_name.nil? 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? 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.Security/locations/{ascLocation}/alerts/{alertName}/reactivate' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'ascLocation' => @client.asc_location,'alertName' => alert_name,'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(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.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 |
#update_resource_group_level_alert_state_to_reactivate_with_http_info(alert_name, resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Update the alert’s state
user’s subscription. The name is case insensitive. will be added to the HTTP request.
912 913 914 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 912 def update_resource_group_level_alert_state_to_reactivate_with_http_info(alert_name, resource_group_name, custom_headers:nil) update_resource_group_level_alert_state_to_reactivate_async(alert_name, resource_group_name, custom_headers:custom_headers).value! end |
#update_subscription_level_alert_state_to_dismiss(alert_name, custom_headers: nil) ⇒ Object
Update the alert’s state
will be added to the HTTP request.
641 642 643 644 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 641 def update_subscription_level_alert_state_to_dismiss(alert_name, custom_headers:nil) response = update_subscription_level_alert_state_to_dismiss_async(alert_name, custom_headers:custom_headers).value! nil end |
#update_subscription_level_alert_state_to_dismiss_async(alert_name, custom_headers: nil) ⇒ Concurrent::Promise
Update the alert’s state
to the HTTP request.
668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 668 def update_subscription_level_alert_state_to_dismiss_async(alert_name, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'Pattern': '^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'" if !@client.subscription_id.nil? && @client.subscription_id.match(Regexp.new('^^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$$')).nil? fail ArgumentError, '@client.asc_location is nil' if @client.asc_location.nil? fail ArgumentError, 'alert_name is nil' if alert_name.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 = 'subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/dismiss' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'ascLocation' => @client.asc_location,'alertName' => alert_name}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.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 |
#update_subscription_level_alert_state_to_dismiss_with_http_info(alert_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Update the alert’s state
will be added to the HTTP request.
655 656 657 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 655 def update_subscription_level_alert_state_to_dismiss_with_http_info(alert_name, custom_headers:nil) update_subscription_level_alert_state_to_dismiss_async(alert_name, custom_headers:custom_headers).value! end |
#update_subscription_level_alert_state_to_reactivate(alert_name, custom_headers: nil) ⇒ Object
Update the alert’s state
will be added to the HTTP request.
722 723 724 725 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 722 def update_subscription_level_alert_state_to_reactivate(alert_name, custom_headers:nil) response = update_subscription_level_alert_state_to_reactivate_async(alert_name, custom_headers:custom_headers).value! nil end |
#update_subscription_level_alert_state_to_reactivate_async(alert_name, custom_headers: nil) ⇒ Concurrent::Promise
Update the alert’s state
to the HTTP request.
749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 749 def update_subscription_level_alert_state_to_reactivate_async(alert_name, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'Pattern': '^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'" if !@client.subscription_id.nil? && @client.subscription_id.match(Regexp.new('^^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$$')).nil? fail ArgumentError, '@client.asc_location is nil' if @client.asc_location.nil? fail ArgumentError, 'alert_name is nil' if alert_name.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 = 'subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/reactivate' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'ascLocation' => @client.asc_location,'alertName' => alert_name}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.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 |
#update_subscription_level_alert_state_to_reactivate_with_http_info(alert_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Update the alert’s state
will be added to the HTTP request.
736 737 738 |
# File 'lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb', line 736 def update_subscription_level_alert_state_to_reactivate_with_http_info(alert_name, custom_headers:nil) update_subscription_level_alert_state_to_reactivate_async(alert_name, custom_headers:custom_headers).value! end |