Class: Azure::Security::Mgmt::V2019_01_01::Alerts
- Inherits:
-
Object
- Object
- Azure::Security::Mgmt::V2019_01_01::Alerts
- Includes:
- MsRestAzure
- Defined in:
- lib/2019-01-01/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, auto_dismiss_rule_name: 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, auto_dismiss_rule_name: nil, custom_headers: nil) ⇒ AlertList
List all the alerts that are associated with the subscription.
-
#list_async(filter: nil, select: nil, expand: nil, auto_dismiss_rule_name: 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, auto_dismiss_rule_name: 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, auto_dismiss_rule_name: 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, auto_dismiss_rule_name: 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, auto_dismiss_rule_name: 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, auto_dismiss_rule_name: 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, auto_dismiss_rule_name: 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, auto_dismiss_rule_name: 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, auto_dismiss_rule_name: 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, auto_dismiss_rule_name: 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, auto_dismiss_rule_name: 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, auto_dismiss_rule_name: 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, auto_dismiss_rule_name: 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, auto_dismiss_rule_name: 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/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 17 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ SecurityCenter (readonly)
22 23 24 |
# File 'lib/2019-01-01/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.
576 577 578 579 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 576 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.
609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 609 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::V2019_01_01::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.
593 594 595 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 593 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.
481 482 483 484 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 481 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.
508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 508 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::V2019_01_01::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.
495 496 497 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 495 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, auto_dismiss_rule_name: nil, custom_headers: nil) ⇒ Array<Alert>
List all the alerts that are associated with the subscription
rule. Use it to simulate the rule on existing alerts and get the alerts that would have been dismissed if the rule was enabled when the alert was created will be added to the HTTP request.
38 39 40 41 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 38 def list(filter:nil, select:nil, expand:nil, auto_dismiss_rule_name:nil, custom_headers:nil) first_page = list_as_lazy(filter:filter, select:select, expand:, auto_dismiss_rule_name:auto_dismiss_rule_name, custom_headers:custom_headers) first_page.get_all_items end |
#list_as_lazy(filter: nil, select: nil, expand: nil, auto_dismiss_rule_name: nil, custom_headers: nil) ⇒ AlertList
List all the alerts that are associated with the subscription
rule. Use it to simulate the rule on existing alerts and get the alerts that would have been dismissed if the rule was enabled when the alert was created will be added to the HTTP request.
1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 1393 def list_as_lazy(filter:nil, select:nil, expand:nil, auto_dismiss_rule_name:nil, custom_headers:nil) response = list_async(filter:filter, select:select, expand:, auto_dismiss_rule_name:auto_dismiss_rule_name, 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, auto_dismiss_rule_name: nil, custom_headers: nil) ⇒ Concurrent::Promise
List all the alerts that are associated with the subscription
rule. Use it to simulate the rule on existing alerts and get the alerts that would have been dismissed if the rule was enabled when the alert was created to the HTTP request.
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 119 120 121 122 123 124 125 126 127 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 75 def list_async(filter:nil, select:nil, expand:nil, auto_dismiss_rule_name: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' => ,'autoDismissRuleName' => auto_dismiss_rule_name}, 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::V2019_01_01::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, auto_dismiss_rule_name: 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. rule. Use it to simulate the rule on existing alerts and get the alerts that would have been dismissed if the rule was enabled when the alert was created will be added to the HTTP request.
145 146 147 148 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 145 def list_by_resource_group(resource_group_name, filter:nil, select:nil, expand:nil, auto_dismiss_rule_name:nil, custom_headers:nil) first_page = list_by_resource_group_as_lazy(resource_group_name, filter:filter, select:select, expand:, auto_dismiss_rule_name:auto_dismiss_rule_name, 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, auto_dismiss_rule_name: nil, custom_headers: nil) ⇒ AlertList
List all the alerts that are associated with the resource group
user’s subscription. The name is case insensitive. rule. Use it to simulate the rule on existing alerts and get the alerts that would have been dismissed if the rule was enabled when the alert was created will be added to the HTTP request.
1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 1420 def list_by_resource_group_as_lazy(resource_group_name, filter:nil, select:nil, expand:nil, auto_dismiss_rule_name:nil, custom_headers:nil) response = list_by_resource_group_async(resource_group_name, filter:filter, select:select, expand:, auto_dismiss_rule_name:auto_dismiss_rule_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 |
#list_by_resource_group_async(resource_group_name, filter: nil, select: nil, expand: nil, auto_dismiss_rule_name: 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. rule. Use it to simulate the rule on existing alerts and get the alerts that would have been dismissed if the rule was enabled when the alert was created to the HTTP request.
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 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 186 def list_by_resource_group_async(resource_group_name, filter:nil, select:nil, expand:nil, auto_dismiss_rule_name: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' => ,'autoDismissRuleName' => auto_dismiss_rule_name}, 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::V2019_01_01::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.
1113 1114 1115 1116 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 1113 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.
1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 1142 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::V2019_01_01::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.
1128 1129 1130 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 1128 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, auto_dismiss_rule_name: 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. rule. Use it to simulate the rule on existing alerts and get the alerts that would have been dismissed if the rule was enabled when the alert was created will be added to the HTTP request.
166 167 168 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 166 def list_by_resource_group_with_http_info(resource_group_name, filter:nil, select:nil, expand:nil, auto_dismiss_rule_name:nil, custom_headers:nil) list_by_resource_group_async(resource_group_name, filter:filter, select:select, expand:, auto_dismiss_rule_name:auto_dismiss_rule_name, 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.
1023 1024 1025 1026 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 1023 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.
1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 1052 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::V2019_01_01::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.
1038 1039 1040 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 1038 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, auto_dismiss_rule_name: 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. rule. Use it to simulate the rule on existing alerts and get the alerts that would have been dismissed if the rule was enabled when the alert was created will be added to the HTTP request.
370 371 372 373 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 370 def list_resource_group_level_alerts_by_region(resource_group_name, filter:nil, select:nil, expand:nil, auto_dismiss_rule_name:nil, custom_headers:nil) first_page = list_resource_group_level_alerts_by_region_as_lazy(resource_group_name, filter:filter, select:select, expand:, auto_dismiss_rule_name:auto_dismiss_rule_name, 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, auto_dismiss_rule_name: 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. rule. Use it to simulate the rule on existing alerts and get the alerts that would have been dismissed if the rule was enabled when the alert was created will be added to the HTTP request.
1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 1474 def list_resource_group_level_alerts_by_region_as_lazy(resource_group_name, filter:nil, select:nil, expand:nil, auto_dismiss_rule_name:nil, custom_headers:nil) response = list_resource_group_level_alerts_by_region_async(resource_group_name, filter:filter, select:select, expand:, auto_dismiss_rule_name:auto_dismiss_rule_name, 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, auto_dismiss_rule_name: 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. rule. Use it to simulate the rule on existing alerts and get the alerts that would have been dismissed if the rule was enabled when the alert was created to the HTTP request.
413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 413 def list_resource_group_level_alerts_by_region_async(resource_group_name, filter:nil, select:nil, expand:nil, auto_dismiss_rule_name: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' => ,'autoDismissRuleName' => auto_dismiss_rule_name}, 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::V2019_01_01::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.
1297 1298 1299 1300 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 1297 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.
1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 1328 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::V2019_01_01::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.
1313 1314 1315 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 1313 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, auto_dismiss_rule_name: 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. rule. Use it to simulate the rule on existing alerts and get the alerts that would have been dismissed if the rule was enabled when the alert was created will be added to the HTTP request.
392 393 394 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 392 def list_resource_group_level_alerts_by_region_with_http_info(resource_group_name, filter:nil, select:nil, expand:nil, auto_dismiss_rule_name:nil, custom_headers:nil) list_resource_group_level_alerts_by_region_async(resource_group_name, filter:filter, select:select, expand:, auto_dismiss_rule_name:auto_dismiss_rule_name, custom_headers:custom_headers).value! end |
#list_subscription_level_alerts_by_region(filter: nil, select: nil, expand: nil, auto_dismiss_rule_name: nil, custom_headers: nil) ⇒ Array<Alert>
List all the alerts that are associated with the subscription that are stored in a specific location
rule. Use it to simulate the rule on existing alerts and get the alerts that would have been dismissed if the rule was enabled when the alert was created will be added to the HTTP request.
259 260 261 262 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 259 def list_subscription_level_alerts_by_region(filter:nil, select:nil, expand:nil, auto_dismiss_rule_name:nil, custom_headers:nil) first_page = list_subscription_level_alerts_by_region_as_lazy(filter:filter, select:select, expand:, auto_dismiss_rule_name:auto_dismiss_rule_name, custom_headers:custom_headers) first_page.get_all_items end |
#list_subscription_level_alerts_by_region_as_lazy(filter: nil, select: nil, expand: nil, auto_dismiss_rule_name: nil, custom_headers: nil) ⇒ AlertList
List all the alerts that are associated with the subscription that are stored in a specific location
rule. Use it to simulate the rule on existing alerts and get the alerts that would have been dismissed if the rule was enabled when the alert was created will be added to the HTTP request.
1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 1446 def list_subscription_level_alerts_by_region_as_lazy(filter:nil, select:nil, expand:nil, auto_dismiss_rule_name:nil, custom_headers:nil) response = list_subscription_level_alerts_by_region_async(filter:filter, select:select, expand:, auto_dismiss_rule_name:auto_dismiss_rule_name, 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, auto_dismiss_rule_name: nil, custom_headers: nil) ⇒ Concurrent::Promise
List all the alerts that are associated with the subscription that are stored in a specific location
rule. Use it to simulate the rule on existing alerts and get the alerts that would have been dismissed if the rule was enabled when the alert was created to the HTTP request.
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 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 298 def list_subscription_level_alerts_by_region_async(filter:nil, select:nil, expand:nil, auto_dismiss_rule_name: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' => ,'autoDismissRuleName' => auto_dismiss_rule_name}, 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::V2019_01_01::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.
1204 1205 1206 1207 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 1204 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.
1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 1235 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::V2019_01_01::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.
1220 1221 1222 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 1220 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, auto_dismiss_rule_name: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List all the alerts that are associated with the subscription that are stored in a specific location
rule. Use it to simulate the rule on existing alerts and get the alerts that would have been dismissed if the rule was enabled when the alert was created will be added to the HTTP request.
279 280 281 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 279 def list_subscription_level_alerts_by_region_with_http_info(filter:nil, select:nil, expand:nil, auto_dismiss_rule_name:nil, custom_headers:nil) list_subscription_level_alerts_by_region_async(filter:filter, select:select, expand:, auto_dismiss_rule_name:auto_dismiss_rule_name, custom_headers:custom_headers).value! end |
#list_with_http_info(filter: nil, select: nil, expand: nil, auto_dismiss_rule_name: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List all the alerts that are associated with the subscription
rule. Use it to simulate the rule on existing alerts and get the alerts that would have been dismissed if the rule was enabled when the alert was created will be added to the HTTP request.
57 58 59 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 57 def list_with_http_info(filter:nil, select:nil, expand:nil, auto_dismiss_rule_name:nil, custom_headers:nil) list_async(filter:filter, select:select, expand:, auto_dismiss_rule_name:auto_dismiss_rule_name, 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.
841 842 843 844 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 841 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.
872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 872 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.
857 858 859 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 857 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.
932 933 934 935 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 932 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.
963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 963 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.
948 949 950 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 948 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.
677 678 679 680 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 677 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.
704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 704 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.
691 692 693 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 691 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.
758 759 760 761 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 758 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.
785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 785 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.
772 773 774 |
# File 'lib/2019-01-01/generated/azure_mgmt_security/alerts.rb', line 772 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 |