azure_mgmt_security 0.18.1 → 0.18.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/security_center.rb +1 -1
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/security_center.rb +1 -1
- data/lib/2017-08-01/generated/azure_mgmt_security/security_center.rb +1 -1
- data/lib/2018-06-01/generated/azure_mgmt_security/security_center.rb +1 -1
- data/lib/2019-01-01-preview/generated/azure_mgmt_security/security_center.rb +1 -1
- data/lib/2019-01-01/generated/azure_mgmt_security/security_center.rb +1 -1
- data/lib/2019-08-01/generated/azure_mgmt_security/security_center.rb +1 -1
- data/lib/2020-01-01-preview/generated/azure_mgmt_security.rb +48 -0
- data/lib/2020-01-01-preview/generated/azure_mgmt_security/models/asc_location.rb +73 -0
- data/lib/2020-01-01-preview/generated/azure_mgmt_security/models/azure_resource_link.rb +47 -0
- data/lib/2020-01-01-preview/generated/azure_mgmt_security/models/control_type.rb +16 -0
- data/lib/2020-01-01-preview/generated/azure_mgmt_security/models/etag.rb +48 -0
- data/lib/2020-01-01-preview/generated/azure_mgmt_security/models/expand_controls_enum.rb +15 -0
- data/lib/2020-01-01-preview/generated/azure_mgmt_security/models/kind.rb +46 -0
- data/lib/2020-01-01-preview/generated/azure_mgmt_security/models/location.rb +47 -0
- data/lib/2020-01-01-preview/generated/azure_mgmt_security/models/resource.rb +80 -0
- data/lib/2020-01-01-preview/generated/azure_mgmt_security/models/secure_score_control_definition_item.rb +141 -0
- data/lib/2020-01-01-preview/generated/azure_mgmt_security/models/secure_score_control_definition_list.rb +101 -0
- data/lib/2020-01-01-preview/generated/azure_mgmt_security/models/secure_score_control_definition_source.rb +47 -0
- data/lib/2020-01-01-preview/generated/azure_mgmt_security/models/secure_score_control_details.rb +153 -0
- data/lib/2020-01-01-preview/generated/azure_mgmt_security/models/secure_score_control_list.rb +101 -0
- data/lib/2020-01-01-preview/generated/azure_mgmt_security/models/secure_score_control_score.rb +69 -0
- data/lib/2020-01-01-preview/generated/azure_mgmt_security/models/secure_score_item.rb +104 -0
- data/lib/2020-01-01-preview/generated/azure_mgmt_security/models/secure_scores_list.rb +101 -0
- data/lib/2020-01-01-preview/generated/azure_mgmt_security/models/tags.rb +55 -0
- data/lib/2020-01-01-preview/generated/azure_mgmt_security/models/tracked_resource.rb +126 -0
- data/lib/2020-01-01-preview/generated/azure_mgmt_security/module_definition.rb +9 -0
- data/lib/2020-01-01-preview/generated/azure_mgmt_security/secure_score_control_definitions.rb +423 -0
- data/lib/2020-01-01-preview/generated/azure_mgmt_security/secure_score_controls.rb +444 -0
- data/lib/2020-01-01-preview/generated/azure_mgmt_security/secure_scores.rb +326 -0
- data/lib/2020-01-01-preview/generated/azure_mgmt_security/security_center.rb +139 -0
- data/lib/2020-01-01/generated/azure_mgmt_security.rb +121 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/adaptive_application_controls.rb +394 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/adaptive_network_hardenings.rb +539 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/allowed_connections.rb +535 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/assessments.rb +555 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/assessments_metadata.rb +799 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/discovered_security_solutions.rb +532 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/external_security_solutions.rb +525 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/jit_network_access_policies.rb +1295 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/aad_connectivity_state.rb +17 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/aad_connectivity_state1.rb +48 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/aad_external_security_solution.rb +99 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/aad_solution_properties.rb +83 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/adaptive_network_hardening.rb +116 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/adaptive_network_hardening_enforce_request.rb +77 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/adaptive_network_hardenings_list.rb +99 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/allowed_connections_list.rb +100 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/allowed_connections_resource.rb +118 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/app_whitelisting_group.rb +207 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/app_whitelisting_groups.rb +56 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/app_whitelisting_issue_summary.rb +61 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/asc_location.rb +73 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/assessment_links.rb +47 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/assessment_status.rb +71 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/assessment_status_code.rb +17 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/assessment_type.rb +18 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/ata_external_security_solution.rb +98 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/ata_solution_properties.rb +87 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/azure_resource_details.rb +62 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/category.rb +19 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/cef_external_security_solution.rb +98 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/cef_solution_properties.rb +109 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/connectable_resource.rb +91 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/connected_resource.rb +71 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/connected_workspace.rb +47 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/connection_type.rb +16 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/direction.rb +16 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/discovered_security_solution.rb +129 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/discovered_security_solution_list.rb +99 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/effective_network_security_groups.rb +66 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/etag.rb +48 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/expand_enum.rb +16 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/external_security_solution.rb +98 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/external_security_solution_kind.rb +17 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/external_security_solution_kind1.rb +47 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/external_security_solution_list.rb +101 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/external_security_solution_properties.rb +88 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/implementation_effort.rb +17 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/jit_network_access_policies_list.rb +99 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/jit_network_access_policy.rb +149 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/jit_network_access_policy_initiate_port.rb +70 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/jit_network_access_policy_initiate_request.rb +68 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/jit_network_access_policy_initiate_virtual_machine.rb +70 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/jit_network_access_policy_virtual_machine.rb +81 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/jit_network_access_port_rule.rb +103 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/jit_network_access_request.rb +89 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/jit_network_access_request_port.rb +128 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/jit_network_access_request_virtual_machine.rb +69 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/kind.rb +46 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/location.rb +47 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/on_premise_resource_details.rb +95 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/path_recommendation.rb +156 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/protection_mode.rb +80 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/protocol.rb +17 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/publisher_info.rb +84 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/resource.rb +80 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/resource_details.rb +47 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/rule.rb +111 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/security_assessment.rb +156 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/security_assessment_list.rb +101 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/security_assessment_metadata.rb +221 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/security_assessment_metadata_list.rb +100 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/security_assessment_metadata_partner_data.rb +70 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/security_assessment_metadata_properties.rb +194 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/security_assessment_partner_data.rb +57 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/security_family.rb +18 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/server_vulnerability_assessment.rb +76 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/server_vulnerability_assessments_list.rb +55 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/severity.rb +17 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/status.rb +16 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/status_reason.rb +17 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/tags.rb +55 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/threats.rb +22 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/topology_list.rb +100 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/topology_resource.rb +118 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/topology_single_resource.rb +154 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/topology_single_resource_child.rb +49 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/topology_single_resource_parent.rb +49 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/tracked_resource.rb +126 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/transport_protocol.rb +16 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/user_impact.rb +17 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/user_recommendation.rb +58 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/models/vm_recommendation.rb +81 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/module_definition.rb +9 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/security_center.rb +172 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/server_vulnerability_assessment_operations.rb +462 -0
- data/lib/2020-01-01/generated/azure_mgmt_security/topology.rb +530 -0
- data/lib/azure_mgmt_security.rb +2 -0
- data/lib/profiles/latest/modules/security_profile_module.rb +366 -258
- data/lib/version.rb +1 -1
- metadata +123 -2
@@ -0,0 +1,121 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
require 'uri'
|
7
|
+
require 'cgi'
|
8
|
+
require 'date'
|
9
|
+
require 'json'
|
10
|
+
require 'base64'
|
11
|
+
require 'erb'
|
12
|
+
require 'securerandom'
|
13
|
+
require 'time'
|
14
|
+
require 'timeliness'
|
15
|
+
require 'faraday'
|
16
|
+
require 'faraday-cookie_jar'
|
17
|
+
require 'concurrent'
|
18
|
+
require 'ms_rest'
|
19
|
+
require '2020-01-01/generated/azure_mgmt_security/module_definition'
|
20
|
+
require 'ms_rest_azure'
|
21
|
+
|
22
|
+
module Azure::Security::Mgmt::V2020_01_01
|
23
|
+
autoload :AdaptiveNetworkHardenings, '2020-01-01/generated/azure_mgmt_security/adaptive_network_hardenings.rb'
|
24
|
+
autoload :AllowedConnections, '2020-01-01/generated/azure_mgmt_security/allowed_connections.rb'
|
25
|
+
autoload :AdaptiveApplicationControls, '2020-01-01/generated/azure_mgmt_security/adaptive_application_controls.rb'
|
26
|
+
autoload :AssessmentsMetadata, '2020-01-01/generated/azure_mgmt_security/assessments_metadata.rb'
|
27
|
+
autoload :Assessments, '2020-01-01/generated/azure_mgmt_security/assessments.rb'
|
28
|
+
autoload :DiscoveredSecuritySolutions, '2020-01-01/generated/azure_mgmt_security/discovered_security_solutions.rb'
|
29
|
+
autoload :ExternalSecuritySolutions, '2020-01-01/generated/azure_mgmt_security/external_security_solutions.rb'
|
30
|
+
autoload :JitNetworkAccessPolicies, '2020-01-01/generated/azure_mgmt_security/jit_network_access_policies.rb'
|
31
|
+
autoload :ServerVulnerabilityAssessmentOperations, '2020-01-01/generated/azure_mgmt_security/server_vulnerability_assessment_operations.rb'
|
32
|
+
autoload :Topology, '2020-01-01/generated/azure_mgmt_security/topology.rb'
|
33
|
+
autoload :SecurityCenter, '2020-01-01/generated/azure_mgmt_security/security_center.rb'
|
34
|
+
|
35
|
+
module Models
|
36
|
+
autoload :ResourceDetails, '2020-01-01/generated/azure_mgmt_security/models/resource_details.rb'
|
37
|
+
autoload :Rule, '2020-01-01/generated/azure_mgmt_security/models/rule.rb'
|
38
|
+
autoload :AssessmentStatus, '2020-01-01/generated/azure_mgmt_security/models/assessment_status.rb'
|
39
|
+
autoload :EffectiveNetworkSecurityGroups, '2020-01-01/generated/azure_mgmt_security/models/effective_network_security_groups.rb'
|
40
|
+
autoload :AdaptiveNetworkHardeningsList, '2020-01-01/generated/azure_mgmt_security/models/adaptive_network_hardenings_list.rb'
|
41
|
+
autoload :JitNetworkAccessPolicy, '2020-01-01/generated/azure_mgmt_security/models/jit_network_access_policy.rb'
|
42
|
+
autoload :JitNetworkAccessPolicyInitiatePort, '2020-01-01/generated/azure_mgmt_security/models/jit_network_access_policy_initiate_port.rb'
|
43
|
+
autoload :AssessmentLinks, '2020-01-01/generated/azure_mgmt_security/models/assessment_links.rb'
|
44
|
+
autoload :Location, '2020-01-01/generated/azure_mgmt_security/models/location.rb'
|
45
|
+
autoload :SecurityAssessmentPartnerData, '2020-01-01/generated/azure_mgmt_security/models/security_assessment_partner_data.rb'
|
46
|
+
autoload :ETag, '2020-01-01/generated/azure_mgmt_security/models/etag.rb'
|
47
|
+
autoload :TopologyList, '2020-01-01/generated/azure_mgmt_security/models/topology_list.rb'
|
48
|
+
autoload :Resource, '2020-01-01/generated/azure_mgmt_security/models/resource.rb'
|
49
|
+
autoload :SecurityAssessmentList, '2020-01-01/generated/azure_mgmt_security/models/security_assessment_list.rb'
|
50
|
+
autoload :ConnectedResource, '2020-01-01/generated/azure_mgmt_security/models/connected_resource.rb'
|
51
|
+
autoload :TopologyResource, '2020-01-01/generated/azure_mgmt_security/models/topology_resource.rb'
|
52
|
+
autoload :AllowedConnectionsResource, '2020-01-01/generated/azure_mgmt_security/models/allowed_connections_resource.rb'
|
53
|
+
autoload :TopologySingleResource, '2020-01-01/generated/azure_mgmt_security/models/topology_single_resource.rb'
|
54
|
+
autoload :ProtectionMode, '2020-01-01/generated/azure_mgmt_security/models/protection_mode.rb'
|
55
|
+
autoload :DiscoveredSecuritySolution, '2020-01-01/generated/azure_mgmt_security/models/discovered_security_solution.rb'
|
56
|
+
autoload :VmRecommendation, '2020-01-01/generated/azure_mgmt_security/models/vm_recommendation.rb'
|
57
|
+
autoload :DiscoveredSecuritySolutionList, '2020-01-01/generated/azure_mgmt_security/models/discovered_security_solution_list.rb'
|
58
|
+
autoload :UserRecommendation, '2020-01-01/generated/azure_mgmt_security/models/user_recommendation.rb'
|
59
|
+
autoload :ExternalSecuritySolution, '2020-01-01/generated/azure_mgmt_security/models/external_security_solution.rb'
|
60
|
+
autoload :AppWhitelistingGroup, '2020-01-01/generated/azure_mgmt_security/models/app_whitelisting_group.rb'
|
61
|
+
autoload :ExternalSecuritySolutionList, '2020-01-01/generated/azure_mgmt_security/models/external_security_solution_list.rb'
|
62
|
+
autoload :SecurityAssessmentMetadataPartnerData, '2020-01-01/generated/azure_mgmt_security/models/security_assessment_metadata_partner_data.rb'
|
63
|
+
autoload :TopologySingleResourceChild, '2020-01-01/generated/azure_mgmt_security/models/topology_single_resource_child.rb'
|
64
|
+
autoload :JitNetworkAccessPoliciesList, '2020-01-01/generated/azure_mgmt_security/models/jit_network_access_policies_list.rb'
|
65
|
+
autoload :TopologySingleResourceParent, '2020-01-01/generated/azure_mgmt_security/models/topology_single_resource_parent.rb'
|
66
|
+
autoload :AdaptiveNetworkHardeningEnforceRequest, '2020-01-01/generated/azure_mgmt_security/models/adaptive_network_hardening_enforce_request.rb'
|
67
|
+
autoload :ServerVulnerabilityAssessmentsList, '2020-01-01/generated/azure_mgmt_security/models/server_vulnerability_assessments_list.rb'
|
68
|
+
autoload :Kind, '2020-01-01/generated/azure_mgmt_security/models/kind.rb'
|
69
|
+
autoload :JitNetworkAccessPolicyInitiateRequest, '2020-01-01/generated/azure_mgmt_security/models/jit_network_access_policy_initiate_request.rb'
|
70
|
+
autoload :ConnectedWorkspace, '2020-01-01/generated/azure_mgmt_security/models/connected_workspace.rb'
|
71
|
+
autoload :AllowedConnectionsList, '2020-01-01/generated/azure_mgmt_security/models/allowed_connections_list.rb'
|
72
|
+
autoload :AadSolutionProperties, '2020-01-01/generated/azure_mgmt_security/models/aad_solution_properties.rb'
|
73
|
+
autoload :PublisherInfo, '2020-01-01/generated/azure_mgmt_security/models/publisher_info.rb'
|
74
|
+
autoload :JitNetworkAccessPolicyInitiateVirtualMachine, '2020-01-01/generated/azure_mgmt_security/models/jit_network_access_policy_initiate_virtual_machine.rb'
|
75
|
+
autoload :AppWhitelistingGroups, '2020-01-01/generated/azure_mgmt_security/models/app_whitelisting_groups.rb'
|
76
|
+
autoload :ExternalSecuritySolutionKind1, '2020-01-01/generated/azure_mgmt_security/models/external_security_solution_kind1.rb'
|
77
|
+
autoload :SecurityAssessmentMetadataList, '2020-01-01/generated/azure_mgmt_security/models/security_assessment_metadata_list.rb'
|
78
|
+
autoload :ExternalSecuritySolutionProperties, '2020-01-01/generated/azure_mgmt_security/models/external_security_solution_properties.rb'
|
79
|
+
autoload :Tags, '2020-01-01/generated/azure_mgmt_security/models/tags.rb'
|
80
|
+
autoload :AadConnectivityState1, '2020-01-01/generated/azure_mgmt_security/models/aad_connectivity_state1.rb'
|
81
|
+
autoload :AppWhitelistingIssueSummary, '2020-01-01/generated/azure_mgmt_security/models/app_whitelisting_issue_summary.rb'
|
82
|
+
autoload :JitNetworkAccessPortRule, '2020-01-01/generated/azure_mgmt_security/models/jit_network_access_port_rule.rb'
|
83
|
+
autoload :SecurityAssessmentMetadataProperties, '2020-01-01/generated/azure_mgmt_security/models/security_assessment_metadata_properties.rb'
|
84
|
+
autoload :JitNetworkAccessPolicyVirtualMachine, '2020-01-01/generated/azure_mgmt_security/models/jit_network_access_policy_virtual_machine.rb'
|
85
|
+
autoload :ConnectableResource, '2020-01-01/generated/azure_mgmt_security/models/connectable_resource.rb'
|
86
|
+
autoload :JitNetworkAccessRequestPort, '2020-01-01/generated/azure_mgmt_security/models/jit_network_access_request_port.rb'
|
87
|
+
autoload :TrackedResource, '2020-01-01/generated/azure_mgmt_security/models/tracked_resource.rb'
|
88
|
+
autoload :JitNetworkAccessRequestVirtualMachine, '2020-01-01/generated/azure_mgmt_security/models/jit_network_access_request_virtual_machine.rb'
|
89
|
+
autoload :PathRecommendation, '2020-01-01/generated/azure_mgmt_security/models/path_recommendation.rb'
|
90
|
+
autoload :JitNetworkAccessRequest, '2020-01-01/generated/azure_mgmt_security/models/jit_network_access_request.rb'
|
91
|
+
autoload :AdaptiveNetworkHardening, '2020-01-01/generated/azure_mgmt_security/models/adaptive_network_hardening.rb'
|
92
|
+
autoload :AscLocation, '2020-01-01/generated/azure_mgmt_security/models/asc_location.rb'
|
93
|
+
autoload :SecurityAssessmentMetadata, '2020-01-01/generated/azure_mgmt_security/models/security_assessment_metadata.rb'
|
94
|
+
autoload :SecurityAssessment, '2020-01-01/generated/azure_mgmt_security/models/security_assessment.rb'
|
95
|
+
autoload :OnPremiseResourceDetails, '2020-01-01/generated/azure_mgmt_security/models/on_premise_resource_details.rb'
|
96
|
+
autoload :AzureResourceDetails, '2020-01-01/generated/azure_mgmt_security/models/azure_resource_details.rb'
|
97
|
+
autoload :CefSolutionProperties, '2020-01-01/generated/azure_mgmt_security/models/cef_solution_properties.rb'
|
98
|
+
autoload :CefExternalSecuritySolution, '2020-01-01/generated/azure_mgmt_security/models/cef_external_security_solution.rb'
|
99
|
+
autoload :AtaSolutionProperties, '2020-01-01/generated/azure_mgmt_security/models/ata_solution_properties.rb'
|
100
|
+
autoload :AtaExternalSecuritySolution, '2020-01-01/generated/azure_mgmt_security/models/ata_external_security_solution.rb'
|
101
|
+
autoload :AadExternalSecuritySolution, '2020-01-01/generated/azure_mgmt_security/models/aad_external_security_solution.rb'
|
102
|
+
autoload :ServerVulnerabilityAssessment, '2020-01-01/generated/azure_mgmt_security/models/server_vulnerability_assessment.rb'
|
103
|
+
autoload :Direction, '2020-01-01/generated/azure_mgmt_security/models/direction.rb'
|
104
|
+
autoload :TransportProtocol, '2020-01-01/generated/azure_mgmt_security/models/transport_protocol.rb'
|
105
|
+
autoload :Category, '2020-01-01/generated/azure_mgmt_security/models/category.rb'
|
106
|
+
autoload :Severity, '2020-01-01/generated/azure_mgmt_security/models/severity.rb'
|
107
|
+
autoload :UserImpact, '2020-01-01/generated/azure_mgmt_security/models/user_impact.rb'
|
108
|
+
autoload :ImplementationEffort, '2020-01-01/generated/azure_mgmt_security/models/implementation_effort.rb'
|
109
|
+
autoload :Threats, '2020-01-01/generated/azure_mgmt_security/models/threats.rb'
|
110
|
+
autoload :AssessmentType, '2020-01-01/generated/azure_mgmt_security/models/assessment_type.rb'
|
111
|
+
autoload :AssessmentStatusCode, '2020-01-01/generated/azure_mgmt_security/models/assessment_status_code.rb'
|
112
|
+
autoload :SecurityFamily, '2020-01-01/generated/azure_mgmt_security/models/security_family.rb'
|
113
|
+
autoload :AadConnectivityState, '2020-01-01/generated/azure_mgmt_security/models/aad_connectivity_state.rb'
|
114
|
+
autoload :ExternalSecuritySolutionKind, '2020-01-01/generated/azure_mgmt_security/models/external_security_solution_kind.rb'
|
115
|
+
autoload :Protocol, '2020-01-01/generated/azure_mgmt_security/models/protocol.rb'
|
116
|
+
autoload :Status, '2020-01-01/generated/azure_mgmt_security/models/status.rb'
|
117
|
+
autoload :StatusReason, '2020-01-01/generated/azure_mgmt_security/models/status_reason.rb'
|
118
|
+
autoload :ConnectionType, '2020-01-01/generated/azure_mgmt_security/models/connection_type.rb'
|
119
|
+
autoload :ExpandEnum, '2020-01-01/generated/azure_mgmt_security/models/expand_enum.rb'
|
120
|
+
end
|
121
|
+
end
|
@@ -0,0 +1,394 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::Security::Mgmt::V2020_01_01
|
7
|
+
#
|
8
|
+
# API spec for Microsoft.Security (Azure Security Center) resource provider
|
9
|
+
#
|
10
|
+
class AdaptiveApplicationControls
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the AdaptiveApplicationControls class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [SecurityCenter] reference to the SecurityCenter
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Gets a list of application control VM/server groups for the subscription.
|
26
|
+
#
|
27
|
+
# @param include_path_recommendations [Boolean] Include the policy rules
|
28
|
+
# @param summary [Boolean] Return output in a summarized form
|
29
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
30
|
+
# will be added to the HTTP request.
|
31
|
+
#
|
32
|
+
# @return [AppWhitelistingGroups] operation results.
|
33
|
+
#
|
34
|
+
def list(include_path_recommendations:nil, summary:nil, custom_headers:nil)
|
35
|
+
response = list_async(include_path_recommendations:include_path_recommendations, summary:summary, custom_headers:custom_headers).value!
|
36
|
+
response.body unless response.nil?
|
37
|
+
end
|
38
|
+
|
39
|
+
#
|
40
|
+
# Gets a list of application control VM/server groups for the subscription.
|
41
|
+
#
|
42
|
+
# @param include_path_recommendations [Boolean] Include the policy rules
|
43
|
+
# @param summary [Boolean] Return output in a summarized form
|
44
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
45
|
+
# will be added to the HTTP request.
|
46
|
+
#
|
47
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
48
|
+
#
|
49
|
+
def list_with_http_info(include_path_recommendations:nil, summary:nil, custom_headers:nil)
|
50
|
+
list_async(include_path_recommendations:include_path_recommendations, summary:summary, custom_headers:custom_headers).value!
|
51
|
+
end
|
52
|
+
|
53
|
+
#
|
54
|
+
# Gets a list of application control VM/server groups for the subscription.
|
55
|
+
#
|
56
|
+
# @param include_path_recommendations [Boolean] Include the policy rules
|
57
|
+
# @param summary [Boolean] Return output in a summarized form
|
58
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
59
|
+
# to the HTTP request.
|
60
|
+
#
|
61
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
62
|
+
#
|
63
|
+
def list_async(include_path_recommendations:nil, summary:nil, custom_headers:nil)
|
64
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
65
|
+
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?
|
66
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
67
|
+
|
68
|
+
|
69
|
+
request_headers = {}
|
70
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
71
|
+
|
72
|
+
# Set Headers
|
73
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
74
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
75
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Security/applicationWhitelistings'
|
76
|
+
|
77
|
+
request_url = @base_url || @client.base_url
|
78
|
+
|
79
|
+
options = {
|
80
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
81
|
+
path_params: {'subscriptionId' => @client.subscription_id},
|
82
|
+
query_params: {'api-version' => @client.api_version,'includePathRecommendations' => include_path_recommendations,'summary' => summary},
|
83
|
+
headers: request_headers.merge(custom_headers || {}),
|
84
|
+
base_url: request_url
|
85
|
+
}
|
86
|
+
promise = @client.make_request_async(:get, path_template, options)
|
87
|
+
|
88
|
+
promise = promise.then do |result|
|
89
|
+
http_response = result.response
|
90
|
+
status_code = http_response.status
|
91
|
+
response_content = http_response.body
|
92
|
+
unless status_code == 200
|
93
|
+
error_model = JSON.load(response_content)
|
94
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
95
|
+
end
|
96
|
+
|
97
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
98
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
99
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
100
|
+
# Deserialize Response
|
101
|
+
if status_code == 200
|
102
|
+
begin
|
103
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
104
|
+
result_mapper = Azure::Security::Mgmt::V2020_01_01::Models::AppWhitelistingGroups.mapper()
|
105
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
106
|
+
rescue Exception => e
|
107
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
result
|
112
|
+
end
|
113
|
+
|
114
|
+
promise.execute
|
115
|
+
end
|
116
|
+
|
117
|
+
#
|
118
|
+
# Gets an application control VM/server group.
|
119
|
+
#
|
120
|
+
# @param group_name [String] Name of an application control VM/server group
|
121
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
122
|
+
# will be added to the HTTP request.
|
123
|
+
#
|
124
|
+
# @return [AppWhitelistingGroup] operation results.
|
125
|
+
#
|
126
|
+
def get(group_name, custom_headers:nil)
|
127
|
+
response = get_async(group_name, custom_headers:custom_headers).value!
|
128
|
+
response.body unless response.nil?
|
129
|
+
end
|
130
|
+
|
131
|
+
#
|
132
|
+
# Gets an application control VM/server group.
|
133
|
+
#
|
134
|
+
# @param group_name [String] Name of an application control VM/server group
|
135
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
136
|
+
# will be added to the HTTP request.
|
137
|
+
#
|
138
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
139
|
+
#
|
140
|
+
def get_with_http_info(group_name, custom_headers:nil)
|
141
|
+
get_async(group_name, custom_headers:custom_headers).value!
|
142
|
+
end
|
143
|
+
|
144
|
+
#
|
145
|
+
# Gets an application control VM/server group.
|
146
|
+
#
|
147
|
+
# @param group_name [String] Name of an application control VM/server group
|
148
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
149
|
+
# to the HTTP request.
|
150
|
+
#
|
151
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
152
|
+
#
|
153
|
+
def get_async(group_name, custom_headers:nil)
|
154
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
155
|
+
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?
|
156
|
+
fail ArgumentError, '@client.asc_location is nil' if @client.asc_location.nil?
|
157
|
+
fail ArgumentError, 'group_name is nil' if group_name.nil?
|
158
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
159
|
+
|
160
|
+
|
161
|
+
request_headers = {}
|
162
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
163
|
+
|
164
|
+
# Set Headers
|
165
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
166
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
167
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName}'
|
168
|
+
|
169
|
+
request_url = @base_url || @client.base_url
|
170
|
+
|
171
|
+
options = {
|
172
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
173
|
+
path_params: {'subscriptionId' => @client.subscription_id,'ascLocation' => @client.asc_location,'groupName' => group_name},
|
174
|
+
query_params: {'api-version' => @client.api_version},
|
175
|
+
headers: request_headers.merge(custom_headers || {}),
|
176
|
+
base_url: request_url
|
177
|
+
}
|
178
|
+
promise = @client.make_request_async(:get, path_template, options)
|
179
|
+
|
180
|
+
promise = promise.then do |result|
|
181
|
+
http_response = result.response
|
182
|
+
status_code = http_response.status
|
183
|
+
response_content = http_response.body
|
184
|
+
unless status_code == 200
|
185
|
+
error_model = JSON.load(response_content)
|
186
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
187
|
+
end
|
188
|
+
|
189
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
190
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
191
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
192
|
+
# Deserialize Response
|
193
|
+
if status_code == 200
|
194
|
+
begin
|
195
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
196
|
+
result_mapper = Azure::Security::Mgmt::V2020_01_01::Models::AppWhitelistingGroup.mapper()
|
197
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
198
|
+
rescue Exception => e
|
199
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
200
|
+
end
|
201
|
+
end
|
202
|
+
|
203
|
+
result
|
204
|
+
end
|
205
|
+
|
206
|
+
promise.execute
|
207
|
+
end
|
208
|
+
|
209
|
+
#
|
210
|
+
# Update an application control VM/server group
|
211
|
+
#
|
212
|
+
# @param group_name [String] Name of an application control VM/server group
|
213
|
+
# @param body [AppWhitelistingGroup]
|
214
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
215
|
+
# will be added to the HTTP request.
|
216
|
+
#
|
217
|
+
# @return [AppWhitelistingGroup] operation results.
|
218
|
+
#
|
219
|
+
def put(group_name, body, custom_headers:nil)
|
220
|
+
response = put_async(group_name, body, custom_headers:custom_headers).value!
|
221
|
+
response.body unless response.nil?
|
222
|
+
end
|
223
|
+
|
224
|
+
#
|
225
|
+
# Update an application control VM/server group
|
226
|
+
#
|
227
|
+
# @param group_name [String] Name of an application control VM/server group
|
228
|
+
# @param body [AppWhitelistingGroup]
|
229
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
230
|
+
# will be added to the HTTP request.
|
231
|
+
#
|
232
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
233
|
+
#
|
234
|
+
def put_with_http_info(group_name, body, custom_headers:nil)
|
235
|
+
put_async(group_name, body, custom_headers:custom_headers).value!
|
236
|
+
end
|
237
|
+
|
238
|
+
#
|
239
|
+
# Update an application control VM/server group
|
240
|
+
#
|
241
|
+
# @param group_name [String] Name of an application control VM/server group
|
242
|
+
# @param body [AppWhitelistingGroup]
|
243
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
244
|
+
# to the HTTP request.
|
245
|
+
#
|
246
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
247
|
+
#
|
248
|
+
def put_async(group_name, body, custom_headers:nil)
|
249
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
250
|
+
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?
|
251
|
+
fail ArgumentError, '@client.asc_location is nil' if @client.asc_location.nil?
|
252
|
+
fail ArgumentError, 'group_name is nil' if group_name.nil?
|
253
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
254
|
+
fail ArgumentError, 'body is nil' if body.nil?
|
255
|
+
|
256
|
+
|
257
|
+
request_headers = {}
|
258
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
259
|
+
|
260
|
+
# Set Headers
|
261
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
262
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
263
|
+
|
264
|
+
# Serialize Request
|
265
|
+
request_mapper = Azure::Security::Mgmt::V2020_01_01::Models::AppWhitelistingGroup.mapper()
|
266
|
+
request_content = @client.serialize(request_mapper, body)
|
267
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
268
|
+
|
269
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName}'
|
270
|
+
|
271
|
+
request_url = @base_url || @client.base_url
|
272
|
+
|
273
|
+
options = {
|
274
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
275
|
+
path_params: {'subscriptionId' => @client.subscription_id,'ascLocation' => @client.asc_location,'groupName' => group_name},
|
276
|
+
query_params: {'api-version' => @client.api_version},
|
277
|
+
body: request_content,
|
278
|
+
headers: request_headers.merge(custom_headers || {}),
|
279
|
+
base_url: request_url
|
280
|
+
}
|
281
|
+
promise = @client.make_request_async(:put, path_template, options)
|
282
|
+
|
283
|
+
promise = promise.then do |result|
|
284
|
+
http_response = result.response
|
285
|
+
status_code = http_response.status
|
286
|
+
response_content = http_response.body
|
287
|
+
unless status_code == 200
|
288
|
+
error_model = JSON.load(response_content)
|
289
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
290
|
+
end
|
291
|
+
|
292
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
293
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
294
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
295
|
+
# Deserialize Response
|
296
|
+
if status_code == 200
|
297
|
+
begin
|
298
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
299
|
+
result_mapper = Azure::Security::Mgmt::V2020_01_01::Models::AppWhitelistingGroup.mapper()
|
300
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
301
|
+
rescue Exception => e
|
302
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
303
|
+
end
|
304
|
+
end
|
305
|
+
|
306
|
+
result
|
307
|
+
end
|
308
|
+
|
309
|
+
promise.execute
|
310
|
+
end
|
311
|
+
|
312
|
+
#
|
313
|
+
# Delete an application control VM/server group
|
314
|
+
#
|
315
|
+
# @param group_name [String] Name of an application control VM/server group
|
316
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
317
|
+
# will be added to the HTTP request.
|
318
|
+
#
|
319
|
+
#
|
320
|
+
def delete(group_name, custom_headers:nil)
|
321
|
+
response = delete_async(group_name, custom_headers:custom_headers).value!
|
322
|
+
nil
|
323
|
+
end
|
324
|
+
|
325
|
+
#
|
326
|
+
# Delete an application control VM/server group
|
327
|
+
#
|
328
|
+
# @param group_name [String] Name of an application control VM/server group
|
329
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
330
|
+
# will be added to the HTTP request.
|
331
|
+
#
|
332
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
333
|
+
#
|
334
|
+
def delete_with_http_info(group_name, custom_headers:nil)
|
335
|
+
delete_async(group_name, custom_headers:custom_headers).value!
|
336
|
+
end
|
337
|
+
|
338
|
+
#
|
339
|
+
# Delete an application control VM/server group
|
340
|
+
#
|
341
|
+
# @param group_name [String] Name of an application control VM/server group
|
342
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
343
|
+
# to the HTTP request.
|
344
|
+
#
|
345
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
346
|
+
#
|
347
|
+
def delete_async(group_name, custom_headers:nil)
|
348
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
349
|
+
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?
|
350
|
+
fail ArgumentError, '@client.asc_location is nil' if @client.asc_location.nil?
|
351
|
+
fail ArgumentError, 'group_name is nil' if group_name.nil?
|
352
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
353
|
+
|
354
|
+
|
355
|
+
request_headers = {}
|
356
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
357
|
+
|
358
|
+
# Set Headers
|
359
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
360
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
361
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName}'
|
362
|
+
|
363
|
+
request_url = @base_url || @client.base_url
|
364
|
+
|
365
|
+
options = {
|
366
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
367
|
+
path_params: {'subscriptionId' => @client.subscription_id,'ascLocation' => @client.asc_location,'groupName' => group_name},
|
368
|
+
query_params: {'api-version' => @client.api_version},
|
369
|
+
headers: request_headers.merge(custom_headers || {}),
|
370
|
+
base_url: request_url
|
371
|
+
}
|
372
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
373
|
+
|
374
|
+
promise = promise.then do |result|
|
375
|
+
http_response = result.response
|
376
|
+
status_code = http_response.status
|
377
|
+
response_content = http_response.body
|
378
|
+
unless status_code == 200 || status_code == 202 || status_code == 204
|
379
|
+
error_model = JSON.load(response_content)
|
380
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
381
|
+
end
|
382
|
+
|
383
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
384
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
385
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
386
|
+
|
387
|
+
result
|
388
|
+
end
|
389
|
+
|
390
|
+
promise.execute
|
391
|
+
end
|
392
|
+
|
393
|
+
end
|
394
|
+
end
|