azure_mgmt_security 0.17.2 → 0.18.0
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.rb +109 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/adaptive_application_controls.rb +313 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/adaptive_network_hardenings.rb +539 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb +1280 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/allowed_connections.rb +535 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/discovered_security_solutions.rb +532 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/external_security_solutions.rb +525 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/jit_network_access_policies.rb +1295 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/locations.rb +330 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/aad_connectivity_state.rb +17 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/aad_connectivity_state1.rb +48 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/aad_external_security_solution.rb +99 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/aad_solution_properties.rb +83 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/adaptive_network_hardening.rb +116 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/adaptive_network_hardening_enforce_request.rb +77 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/adaptive_network_hardenings_list.rb +99 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/alert.rb +375 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/alert_confidence_reason.rb +59 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/alert_entity.rb +66 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/alert_list.rb +99 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/allowed_connections_list.rb +100 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/allowed_connections_resource.rb +118 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/app_whitelisting_group.rb +191 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/app_whitelisting_groups.rb +56 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/app_whitelisting_issue_summary.rb +61 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/app_whitelisting_put_group_data.rb +86 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/asc_location.rb +73 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/asc_location_list.rb +100 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/ata_external_security_solution.rb +98 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/ata_solution_properties.rb +87 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/cef_external_security_solution.rb +98 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/cef_solution_properties.rb +109 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/connectable_resource.rb +91 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/connected_resource.rb +71 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/connected_workspace.rb +47 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/connection_type.rb +16 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/direction.rb +16 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/discovered_security_solution.rb +129 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/discovered_security_solution_list.rb +99 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/effective_network_security_groups.rb +66 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/external_security_solution.rb +98 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/external_security_solution_kind.rb +17 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/external_security_solution_kind1.rb +47 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/external_security_solution_list.rb +101 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/external_security_solution_properties.rb +88 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/jit_network_access_policies_list.rb +99 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/jit_network_access_policy.rb +149 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/jit_network_access_policy_initiate_port.rb +70 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/jit_network_access_policy_initiate_request.rb +57 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/jit_network_access_policy_initiate_virtual_machine.rb +70 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/jit_network_access_policy_virtual_machine.rb +81 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/jit_network_access_port_rule.rb +103 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/jit_network_access_request.rb +78 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/jit_network_access_request_port.rb +128 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/jit_network_access_request_virtual_machine.rb +69 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/kind.rb +46 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/location.rb +47 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/operation.rb +71 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/operation_display.rb +84 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/operation_list.rb +99 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/path_recommendation.rb +156 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/protocol.rb +17 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/publisher_info.rb +84 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/reported_severity.rb +18 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/resource.rb +80 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/rule.rb +111 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/security_family.rb +18 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/security_task.rb +123 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/security_task_list.rb +100 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/security_task_parameters.rb +67 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/status.rb +16 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/status_reason.rb +17 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/topology_list.rb +100 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/topology_resource.rb +118 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/topology_single_resource.rb +154 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/topology_single_resource_child.rb +49 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/topology_single_resource_parent.rb +49 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/transport_protocol.rb +16 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/user_recommendation.rb +58 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/vm_recommendation.rb +69 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/module_definition.rb +9 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/operations.rb +218 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/security_center.rb +175 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/tasks.rb +1055 -0
- data/lib/2015-06-01-preview/generated/azure_mgmt_security/topology.rb +530 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security.rb +72 -13
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/advanced_threat_protection.rb +222 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/auto_provisioning_settings.rb +12 -4
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/compliances.rb +9 -3
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/device_security_groups.rb +523 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/information_protection_policies.rb +447 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/io_tsecurity_solutions.rb +230 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/io_tsecurity_solutions_analytics.rb +227 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/io_tsecurity_solutions_analytics_aggregated_alert.rb +224 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/io_tsecurity_solutions_analytics_aggregated_alerts.rb +243 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/io_tsecurity_solutions_analytics_recommendation.rb +133 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/io_tsecurity_solutions_analytics_recommendations.rb +243 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/io_tsecurity_solutions_resource_group.rb +242 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/iot_security_solution.rb +459 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/advanced_threat_protection_setting.rb +74 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/allowlist_custom_alert_rule.rb +99 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/asc_location.rb +73 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/custom_alert_rule.rb +81 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/data_export_setting.rb +81 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/data_source.rb +15 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/denylist_custom_alert_rule.rb +99 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/device_security_group.rb +146 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/device_security_group_list.rb +100 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/export_data.rb +15 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/information_protection_keyword.rb +80 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/information_protection_policy.rb +116 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/information_protection_policy_list.rb +100 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/information_type.rb +114 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/io_tsecurity_aggregated_alert.rb +238 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/io_tsecurity_aggregated_alert_list.rb +100 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/io_tsecurity_aggregated_recommendation.rb +212 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/io_tsecurity_aggregated_recommendation_list.rb +101 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/io_tsecurity_alerted_device.rb +60 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/io_tsecurity_alerted_devices_list.rb +68 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/io_tsecurity_device_alert.rb +73 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/io_tsecurity_device_alerts_list.rb +67 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/io_tsecurity_device_recommendation.rb +73 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/io_tsecurity_device_recommendations_list.rb +68 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/io_tsecurity_solution_analytics_model.rb +149 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/io_tsecurity_solution_analytics_model_list.rb +68 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/io_tsecurity_solution_analytics_model_properties_devices_metrics_item.rb +61 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/io_tsecurity_solution_model.rb +248 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/io_tsecurity_solutions_list.rb +99 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/io_tseverity_metrics.rb +68 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/list_custom_alert_rule.rb +82 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/recommendation_config_status.rb +16 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/recommendation_configuration_properties.rb +79 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/recommendation_type.rb +30 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/reported_severity.rb +18 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/security_contact.rb +1 -1
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/security_solution_status.rb +16 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/sensitivity_label.rb +68 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/setting.rb +70 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/setting_kind.rb +16 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/setting_resource.rb +75 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/settings_list.rb +99 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/tags_resource.rb +55 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/threshold_custom_alert_rule.rb +92 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/time_window_custom_alert_rule.rb +115 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/update_iot_security_solution_data.rb +84 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/user_defined_resources_properties.rb +68 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/value_type.rb +16 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/pricings.rb +23 -7
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/security_center.rb +200 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/security_contacts.rb +18 -6
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/settings.rb +420 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_security/workspace_settings.rb +38 -16
- data/lib/2017-08-01/generated/azure_mgmt_security.rb +33 -0
- data/lib/2017-08-01/generated/azure_mgmt_security/compliance_results.rb +329 -0
- data/lib/2017-08-01/generated/azure_mgmt_security/models/asc_location.rb +73 -0
- data/lib/2017-08-01/generated/azure_mgmt_security/models/compliance_result.rb +76 -0
- data/lib/2017-08-01/generated/azure_mgmt_security/models/compliance_result_list.rb +99 -0
- data/lib/2017-08-01/generated/azure_mgmt_security/models/resource.rb +80 -0
- data/lib/2017-08-01/generated/azure_mgmt_security/models/resource_status.rb +18 -0
- data/lib/2017-08-01/generated/azure_mgmt_security/module_definition.rb +9 -0
- data/lib/2017-08-01/generated/azure_mgmt_security/security_center.rb +128 -0
- data/lib/2018-06-01/generated/azure_mgmt_security.rb +33 -0
- data/lib/2018-06-01/generated/azure_mgmt_security/models/asc_location.rb +73 -0
- data/lib/2018-06-01/generated/azure_mgmt_security/models/pricing.rb +90 -0
- data/lib/2018-06-01/generated/azure_mgmt_security/models/pricing_list.rb +55 -0
- data/lib/2018-06-01/generated/azure_mgmt_security/models/pricing_tier.rb +16 -0
- data/lib/2018-06-01/generated/azure_mgmt_security/models/resource.rb +80 -0
- data/lib/2018-06-01/generated/azure_mgmt_security/module_definition.rb +9 -0
- data/lib/2018-06-01/generated/azure_mgmt_security/pricings.rb +332 -0
- data/lib/{2017-08-01-preview/generated/azure_mgmt_security/security_management_client.rb → 2018-06-01/generated/azure_mgmt_security/security_center.rb} +5 -21
- data/lib/2019-01-01-preview/generated/azure_mgmt_security.rb +42 -0
- data/lib/2019-01-01-preview/generated/azure_mgmt_security/models/asc_location.rb +73 -0
- data/lib/2019-01-01-preview/generated/azure_mgmt_security/models/regulatory_compliance_assessment.rb +166 -0
- data/lib/2019-01-01-preview/generated/azure_mgmt_security/models/regulatory_compliance_assessment_list.rb +99 -0
- data/lib/2019-01-01-preview/generated/azure_mgmt_security/models/regulatory_compliance_control.rb +126 -0
- data/lib/2019-01-01-preview/generated/azure_mgmt_security/models/regulatory_compliance_control_list.rb +100 -0
- data/lib/2019-01-01-preview/generated/azure_mgmt_security/models/regulatory_compliance_standard.rb +127 -0
- data/lib/2019-01-01-preview/generated/azure_mgmt_security/models/regulatory_compliance_standard_list.rb +99 -0
- data/lib/2019-01-01-preview/generated/azure_mgmt_security/models/resource.rb +80 -0
- data/lib/2019-01-01-preview/generated/azure_mgmt_security/models/server_vulnerability_assessment.rb +76 -0
- data/lib/2019-01-01-preview/generated/azure_mgmt_security/models/server_vulnerability_assessments_list.rb +55 -0
- data/lib/2019-01-01-preview/generated/azure_mgmt_security/models/state.rb +18 -0
- data/lib/2019-01-01-preview/generated/azure_mgmt_security/module_definition.rb +9 -0
- data/lib/2019-01-01-preview/generated/azure_mgmt_security/regulatory_compliance_assessments.rb +359 -0
- data/lib/2019-01-01-preview/generated/azure_mgmt_security/regulatory_compliance_controls.rb +343 -0
- data/lib/2019-01-01-preview/generated/azure_mgmt_security/regulatory_compliance_standards.rb +320 -0
- data/lib/2019-01-01-preview/generated/azure_mgmt_security/security_center.rb +145 -0
- data/lib/2019-01-01-preview/generated/azure_mgmt_security/server_vulnerability_assessment_operations.rb +462 -0
- data/lib/2019-01-01/generated/azure_mgmt_security.rb +41 -0
- data/lib/2019-01-01/generated/azure_mgmt_security/alerts.rb +1280 -0
- data/lib/2019-01-01/generated/azure_mgmt_security/models/alert.rb +375 -0
- data/lib/2019-01-01/generated/azure_mgmt_security/models/alert_confidence_reason.rb +59 -0
- data/lib/2019-01-01/generated/azure_mgmt_security/models/alert_entity.rb +66 -0
- data/lib/2019-01-01/generated/azure_mgmt_security/models/alert_list.rb +99 -0
- data/lib/2019-01-01/generated/azure_mgmt_security/models/asc_location.rb +73 -0
- data/lib/2019-01-01/generated/azure_mgmt_security/models/data_export_setting.rb +81 -0
- data/lib/2019-01-01/generated/azure_mgmt_security/models/reported_severity.rb +18 -0
- data/lib/2019-01-01/generated/azure_mgmt_security/models/resource.rb +80 -0
- data/lib/2019-01-01/generated/azure_mgmt_security/models/setting.rb +70 -0
- data/lib/2019-01-01/generated/azure_mgmt_security/models/setting_kind.rb +16 -0
- data/lib/2019-01-01/generated/azure_mgmt_security/models/setting_resource.rb +75 -0
- data/lib/2019-01-01/generated/azure_mgmt_security/models/settings_list.rb +99 -0
- data/lib/2019-01-01/generated/azure_mgmt_security/module_definition.rb +9 -0
- data/lib/2019-01-01/generated/azure_mgmt_security/security_center.rb +139 -0
- data/lib/2019-01-01/generated/azure_mgmt_security/settings.rb +420 -0
- data/lib/2019-08-01/generated/azure_mgmt_security.rb +63 -0
- data/lib/2019-08-01/generated/azure_mgmt_security/io_tsecurity_solutions.rb +230 -0
- data/lib/2019-08-01/generated/azure_mgmt_security/io_tsecurity_solutions_analytics.rb +227 -0
- data/lib/2019-08-01/generated/azure_mgmt_security/io_tsecurity_solutions_analytics_aggregated_alert.rb +224 -0
- data/lib/2019-08-01/generated/azure_mgmt_security/io_tsecurity_solutions_analytics_aggregated_alerts.rb +243 -0
- data/lib/2019-08-01/generated/azure_mgmt_security/io_tsecurity_solutions_analytics_recommendation.rb +133 -0
- data/lib/2019-08-01/generated/azure_mgmt_security/io_tsecurity_solutions_analytics_recommendations.rb +243 -0
- data/lib/2019-08-01/generated/azure_mgmt_security/io_tsecurity_solutions_resource_group.rb +242 -0
- data/lib/2019-08-01/generated/azure_mgmt_security/iot_security_solution.rb +459 -0
- data/lib/2019-08-01/generated/azure_mgmt_security/models/asc_location.rb +73 -0
- data/lib/2019-08-01/generated/azure_mgmt_security/models/data_source.rb +15 -0
- data/lib/2019-08-01/generated/azure_mgmt_security/models/export_data.rb +15 -0
- data/lib/2019-08-01/generated/azure_mgmt_security/models/io_tsecurity_aggregated_alert.rb +238 -0
- data/lib/2019-08-01/generated/azure_mgmt_security/models/io_tsecurity_aggregated_alert_list.rb +100 -0
- data/lib/2019-08-01/generated/azure_mgmt_security/models/io_tsecurity_aggregated_recommendation.rb +212 -0
- data/lib/2019-08-01/generated/azure_mgmt_security/models/io_tsecurity_aggregated_recommendation_list.rb +101 -0
- data/lib/2019-08-01/generated/azure_mgmt_security/models/io_tsecurity_alerted_device.rb +60 -0
- data/lib/2019-08-01/generated/azure_mgmt_security/models/io_tsecurity_alerted_devices_list.rb +56 -0
- data/lib/2019-08-01/generated/azure_mgmt_security/models/io_tsecurity_device_alert.rb +73 -0
- data/lib/2019-08-01/generated/azure_mgmt_security/models/io_tsecurity_device_alerts_list.rb +67 -0
- data/lib/2019-08-01/generated/azure_mgmt_security/models/io_tsecurity_device_recommendation.rb +73 -0
- data/lib/2019-08-01/generated/azure_mgmt_security/models/io_tsecurity_device_recommendations_list.rb +56 -0
- data/lib/2019-08-01/generated/azure_mgmt_security/models/io_tsecurity_solution_analytics_model.rb +149 -0
- data/lib/2019-08-01/generated/azure_mgmt_security/models/io_tsecurity_solution_analytics_model_list.rb +68 -0
- data/lib/2019-08-01/generated/azure_mgmt_security/models/io_tsecurity_solution_analytics_model_properties_devices_metrics_item.rb +61 -0
- data/lib/2019-08-01/generated/azure_mgmt_security/models/io_tsecurity_solution_model.rb +248 -0
- data/lib/2019-08-01/generated/azure_mgmt_security/models/io_tsecurity_solutions_list.rb +99 -0
- data/lib/2019-08-01/generated/azure_mgmt_security/models/io_tseverity_metrics.rb +68 -0
- data/lib/2019-08-01/generated/azure_mgmt_security/models/recommendation_config_status.rb +16 -0
- data/lib/2019-08-01/generated/azure_mgmt_security/models/recommendation_configuration_properties.rb +79 -0
- data/lib/2019-08-01/generated/azure_mgmt_security/models/recommendation_type.rb +30 -0
- data/lib/2019-08-01/generated/azure_mgmt_security/models/reported_severity.rb +18 -0
- data/lib/2019-08-01/generated/azure_mgmt_security/models/resource.rb +80 -0
- data/lib/2019-08-01/generated/azure_mgmt_security/models/security_solution_status.rb +16 -0
- data/lib/2019-08-01/generated/azure_mgmt_security/models/tags_resource.rb +55 -0
- data/lib/2019-08-01/generated/azure_mgmt_security/models/update_iot_security_solution_data.rb +84 -0
- data/lib/2019-08-01/generated/azure_mgmt_security/models/user_defined_resources_properties.rb +68 -0
- data/lib/2019-08-01/generated/azure_mgmt_security/module_definition.rb +9 -0
- data/lib/2019-08-01/generated/azure_mgmt_security/security_center.rb +164 -0
- data/lib/azure_mgmt_security.rb +6 -0
- data/lib/profiles/latest/modules/security_profile_module.rb +652 -40
- data/lib/version.rb +1 -1
- metadata +242 -6
@@ -0,0 +1,1295 @@
|
|
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::V2015_06_01_preview
|
7
|
+
#
|
8
|
+
# API spec for Microsoft.Security (Azure Security Center) resource provider
|
9
|
+
#
|
10
|
+
class JitNetworkAccessPolicies
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the JitNetworkAccessPolicies 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
|
+
# Policies for protecting resources using Just-in-Time access control.
|
26
|
+
#
|
27
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
28
|
+
# will be added to the HTTP request.
|
29
|
+
#
|
30
|
+
# @return [Array<JitNetworkAccessPolicy>] operation results.
|
31
|
+
#
|
32
|
+
def list(custom_headers:nil)
|
33
|
+
first_page = list_as_lazy(custom_headers:custom_headers)
|
34
|
+
first_page.get_all_items
|
35
|
+
end
|
36
|
+
|
37
|
+
#
|
38
|
+
# Policies for protecting resources using Just-in-Time access control.
|
39
|
+
#
|
40
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
41
|
+
# will be added to the HTTP request.
|
42
|
+
#
|
43
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
44
|
+
#
|
45
|
+
def list_with_http_info(custom_headers:nil)
|
46
|
+
list_async(custom_headers:custom_headers).value!
|
47
|
+
end
|
48
|
+
|
49
|
+
#
|
50
|
+
# Policies for protecting resources using Just-in-Time access control.
|
51
|
+
#
|
52
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
53
|
+
# to the HTTP request.
|
54
|
+
#
|
55
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
56
|
+
#
|
57
|
+
def list_async(custom_headers:nil)
|
58
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
59
|
+
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?
|
60
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
61
|
+
|
62
|
+
|
63
|
+
request_headers = {}
|
64
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
65
|
+
|
66
|
+
# Set Headers
|
67
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
68
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
69
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Security/jitNetworkAccessPolicies'
|
70
|
+
|
71
|
+
request_url = @base_url || @client.base_url
|
72
|
+
|
73
|
+
options = {
|
74
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
75
|
+
path_params: {'subscriptionId' => @client.subscription_id},
|
76
|
+
query_params: {'api-version' => @client.api_version},
|
77
|
+
headers: request_headers.merge(custom_headers || {}),
|
78
|
+
base_url: request_url
|
79
|
+
}
|
80
|
+
promise = @client.make_request_async(:get, path_template, options)
|
81
|
+
|
82
|
+
promise = promise.then do |result|
|
83
|
+
http_response = result.response
|
84
|
+
status_code = http_response.status
|
85
|
+
response_content = http_response.body
|
86
|
+
unless status_code == 200
|
87
|
+
error_model = JSON.load(response_content)
|
88
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
89
|
+
end
|
90
|
+
|
91
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
92
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
93
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
94
|
+
# Deserialize Response
|
95
|
+
if status_code == 200
|
96
|
+
begin
|
97
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
98
|
+
result_mapper = Azure::Security::Mgmt::V2015_06_01_preview::Models::JitNetworkAccessPoliciesList.mapper()
|
99
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
100
|
+
rescue Exception => e
|
101
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
result
|
106
|
+
end
|
107
|
+
|
108
|
+
promise.execute
|
109
|
+
end
|
110
|
+
|
111
|
+
#
|
112
|
+
# Policies for protecting resources using Just-in-Time access control for the
|
113
|
+
# subscription, location
|
114
|
+
#
|
115
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
116
|
+
# will be added to the HTTP request.
|
117
|
+
#
|
118
|
+
# @return [Array<JitNetworkAccessPolicy>] operation results.
|
119
|
+
#
|
120
|
+
def list_by_region(custom_headers:nil)
|
121
|
+
first_page = list_by_region_as_lazy(custom_headers:custom_headers)
|
122
|
+
first_page.get_all_items
|
123
|
+
end
|
124
|
+
|
125
|
+
#
|
126
|
+
# Policies for protecting resources using Just-in-Time access control for the
|
127
|
+
# subscription, location
|
128
|
+
#
|
129
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
130
|
+
# will be added to the HTTP request.
|
131
|
+
#
|
132
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
133
|
+
#
|
134
|
+
def list_by_region_with_http_info(custom_headers:nil)
|
135
|
+
list_by_region_async(custom_headers:custom_headers).value!
|
136
|
+
end
|
137
|
+
|
138
|
+
#
|
139
|
+
# Policies for protecting resources using Just-in-Time access control for the
|
140
|
+
# subscription, location
|
141
|
+
#
|
142
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
143
|
+
# to the HTTP request.
|
144
|
+
#
|
145
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
146
|
+
#
|
147
|
+
def list_by_region_async(custom_headers:nil)
|
148
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
149
|
+
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?
|
150
|
+
fail ArgumentError, '@client.asc_location is nil' if @client.asc_location.nil?
|
151
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
152
|
+
|
153
|
+
|
154
|
+
request_headers = {}
|
155
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
156
|
+
|
157
|
+
# Set Headers
|
158
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
159
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
160
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies'
|
161
|
+
|
162
|
+
request_url = @base_url || @client.base_url
|
163
|
+
|
164
|
+
options = {
|
165
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
166
|
+
path_params: {'subscriptionId' => @client.subscription_id,'ascLocation' => @client.asc_location},
|
167
|
+
query_params: {'api-version' => @client.api_version},
|
168
|
+
headers: request_headers.merge(custom_headers || {}),
|
169
|
+
base_url: request_url
|
170
|
+
}
|
171
|
+
promise = @client.make_request_async(:get, path_template, options)
|
172
|
+
|
173
|
+
promise = promise.then do |result|
|
174
|
+
http_response = result.response
|
175
|
+
status_code = http_response.status
|
176
|
+
response_content = http_response.body
|
177
|
+
unless status_code == 200
|
178
|
+
error_model = JSON.load(response_content)
|
179
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
180
|
+
end
|
181
|
+
|
182
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
183
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
184
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
185
|
+
# Deserialize Response
|
186
|
+
if status_code == 200
|
187
|
+
begin
|
188
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
189
|
+
result_mapper = Azure::Security::Mgmt::V2015_06_01_preview::Models::JitNetworkAccessPoliciesList.mapper()
|
190
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
191
|
+
rescue Exception => e
|
192
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
193
|
+
end
|
194
|
+
end
|
195
|
+
|
196
|
+
result
|
197
|
+
end
|
198
|
+
|
199
|
+
promise.execute
|
200
|
+
end
|
201
|
+
|
202
|
+
#
|
203
|
+
# Policies for protecting resources using Just-in-Time access control for the
|
204
|
+
# subscription, location
|
205
|
+
#
|
206
|
+
# @param resource_group_name [String] The name of the resource group within the
|
207
|
+
# user's subscription. The name is case insensitive.
|
208
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
209
|
+
# will be added to the HTTP request.
|
210
|
+
#
|
211
|
+
# @return [Array<JitNetworkAccessPolicy>] operation results.
|
212
|
+
#
|
213
|
+
def list_by_resource_group(resource_group_name, custom_headers:nil)
|
214
|
+
first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers:custom_headers)
|
215
|
+
first_page.get_all_items
|
216
|
+
end
|
217
|
+
|
218
|
+
#
|
219
|
+
# Policies for protecting resources using Just-in-Time access control for the
|
220
|
+
# subscription, location
|
221
|
+
#
|
222
|
+
# @param resource_group_name [String] The name of the resource group within the
|
223
|
+
# user's subscription. The name is case insensitive.
|
224
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
225
|
+
# will be added to the HTTP request.
|
226
|
+
#
|
227
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
228
|
+
#
|
229
|
+
def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
|
230
|
+
list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
|
231
|
+
end
|
232
|
+
|
233
|
+
#
|
234
|
+
# Policies for protecting resources using Just-in-Time access control for the
|
235
|
+
# subscription, location
|
236
|
+
#
|
237
|
+
# @param resource_group_name [String] The name of the resource group within the
|
238
|
+
# user's subscription. The name is case insensitive.
|
239
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
240
|
+
# to the HTTP request.
|
241
|
+
#
|
242
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
243
|
+
#
|
244
|
+
def list_by_resource_group_async(resource_group_name, custom_headers:nil)
|
245
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
246
|
+
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?
|
247
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
248
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
249
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
250
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
251
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
252
|
+
|
253
|
+
|
254
|
+
request_headers = {}
|
255
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
256
|
+
|
257
|
+
# Set Headers
|
258
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
259
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
260
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/jitNetworkAccessPolicies'
|
261
|
+
|
262
|
+
request_url = @base_url || @client.base_url
|
263
|
+
|
264
|
+
options = {
|
265
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
266
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
|
267
|
+
query_params: {'api-version' => @client.api_version},
|
268
|
+
headers: request_headers.merge(custom_headers || {}),
|
269
|
+
base_url: request_url
|
270
|
+
}
|
271
|
+
promise = @client.make_request_async(:get, path_template, options)
|
272
|
+
|
273
|
+
promise = promise.then do |result|
|
274
|
+
http_response = result.response
|
275
|
+
status_code = http_response.status
|
276
|
+
response_content = http_response.body
|
277
|
+
unless status_code == 200
|
278
|
+
error_model = JSON.load(response_content)
|
279
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
280
|
+
end
|
281
|
+
|
282
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
283
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
284
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
285
|
+
# Deserialize Response
|
286
|
+
if status_code == 200
|
287
|
+
begin
|
288
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
289
|
+
result_mapper = Azure::Security::Mgmt::V2015_06_01_preview::Models::JitNetworkAccessPoliciesList.mapper()
|
290
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
291
|
+
rescue Exception => e
|
292
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
293
|
+
end
|
294
|
+
end
|
295
|
+
|
296
|
+
result
|
297
|
+
end
|
298
|
+
|
299
|
+
promise.execute
|
300
|
+
end
|
301
|
+
|
302
|
+
#
|
303
|
+
# Policies for protecting resources using Just-in-Time access control for the
|
304
|
+
# subscription, location
|
305
|
+
#
|
306
|
+
# @param resource_group_name [String] The name of the resource group within the
|
307
|
+
# user's subscription. The name is case insensitive.
|
308
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
309
|
+
# will be added to the HTTP request.
|
310
|
+
#
|
311
|
+
# @return [Array<JitNetworkAccessPolicy>] operation results.
|
312
|
+
#
|
313
|
+
def list_by_resource_group_and_region(resource_group_name, custom_headers:nil)
|
314
|
+
first_page = list_by_resource_group_and_region_as_lazy(resource_group_name, custom_headers:custom_headers)
|
315
|
+
first_page.get_all_items
|
316
|
+
end
|
317
|
+
|
318
|
+
#
|
319
|
+
# Policies for protecting resources using Just-in-Time access control for the
|
320
|
+
# subscription, location
|
321
|
+
#
|
322
|
+
# @param resource_group_name [String] The name of the resource group within the
|
323
|
+
# user's subscription. The name is case insensitive.
|
324
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
325
|
+
# will be added to the HTTP request.
|
326
|
+
#
|
327
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
328
|
+
#
|
329
|
+
def list_by_resource_group_and_region_with_http_info(resource_group_name, custom_headers:nil)
|
330
|
+
list_by_resource_group_and_region_async(resource_group_name, custom_headers:custom_headers).value!
|
331
|
+
end
|
332
|
+
|
333
|
+
#
|
334
|
+
# Policies for protecting resources using Just-in-Time access control for the
|
335
|
+
# subscription, location
|
336
|
+
#
|
337
|
+
# @param resource_group_name [String] The name of the resource group within the
|
338
|
+
# user's subscription. The name is case insensitive.
|
339
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
340
|
+
# to the HTTP request.
|
341
|
+
#
|
342
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
343
|
+
#
|
344
|
+
def list_by_resource_group_and_region_async(resource_group_name, custom_headers:nil)
|
345
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
346
|
+
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?
|
347
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
348
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
349
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
350
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
351
|
+
fail ArgumentError, '@client.asc_location is nil' if @client.asc_location.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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies'
|
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,'resourceGroupName' => resource_group_name,'ascLocation' => @client.asc_location},
|
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(:get, 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
|
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
|
+
# Deserialize Response
|
387
|
+
if status_code == 200
|
388
|
+
begin
|
389
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
390
|
+
result_mapper = Azure::Security::Mgmt::V2015_06_01_preview::Models::JitNetworkAccessPoliciesList.mapper()
|
391
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
392
|
+
rescue Exception => e
|
393
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
394
|
+
end
|
395
|
+
end
|
396
|
+
|
397
|
+
result
|
398
|
+
end
|
399
|
+
|
400
|
+
promise.execute
|
401
|
+
end
|
402
|
+
|
403
|
+
#
|
404
|
+
# Policies for protecting resources using Just-in-Time access control for the
|
405
|
+
# subscription, location
|
406
|
+
#
|
407
|
+
# @param resource_group_name [String] The name of the resource group within the
|
408
|
+
# user's subscription. The name is case insensitive.
|
409
|
+
# @param jit_network_access_policy_name [String] Name of a Just-in-Time access
|
410
|
+
# configuration policy.
|
411
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
412
|
+
# will be added to the HTTP request.
|
413
|
+
#
|
414
|
+
# @return [JitNetworkAccessPolicy] operation results.
|
415
|
+
#
|
416
|
+
def get(resource_group_name, jit_network_access_policy_name, custom_headers:nil)
|
417
|
+
response = get_async(resource_group_name, jit_network_access_policy_name, custom_headers:custom_headers).value!
|
418
|
+
response.body unless response.nil?
|
419
|
+
end
|
420
|
+
|
421
|
+
#
|
422
|
+
# Policies for protecting resources using Just-in-Time access control for the
|
423
|
+
# subscription, location
|
424
|
+
#
|
425
|
+
# @param resource_group_name [String] The name of the resource group within the
|
426
|
+
# user's subscription. The name is case insensitive.
|
427
|
+
# @param jit_network_access_policy_name [String] Name of a Just-in-Time access
|
428
|
+
# configuration policy.
|
429
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
430
|
+
# will be added to the HTTP request.
|
431
|
+
#
|
432
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
433
|
+
#
|
434
|
+
def get_with_http_info(resource_group_name, jit_network_access_policy_name, custom_headers:nil)
|
435
|
+
get_async(resource_group_name, jit_network_access_policy_name, custom_headers:custom_headers).value!
|
436
|
+
end
|
437
|
+
|
438
|
+
#
|
439
|
+
# Policies for protecting resources using Just-in-Time access control for the
|
440
|
+
# subscription, location
|
441
|
+
#
|
442
|
+
# @param resource_group_name [String] The name of the resource group within the
|
443
|
+
# user's subscription. The name is case insensitive.
|
444
|
+
# @param jit_network_access_policy_name [String] Name of a Just-in-Time access
|
445
|
+
# configuration policy.
|
446
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
447
|
+
# to the HTTP request.
|
448
|
+
#
|
449
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
450
|
+
#
|
451
|
+
def get_async(resource_group_name, jit_network_access_policy_name, custom_headers:nil)
|
452
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
453
|
+
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?
|
454
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
455
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
456
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
457
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
458
|
+
fail ArgumentError, '@client.asc_location is nil' if @client.asc_location.nil?
|
459
|
+
fail ArgumentError, 'jit_network_access_policy_name is nil' if jit_network_access_policy_name.nil?
|
460
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
461
|
+
|
462
|
+
|
463
|
+
request_headers = {}
|
464
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
465
|
+
|
466
|
+
# Set Headers
|
467
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
468
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
469
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies/{jitNetworkAccessPolicyName}'
|
470
|
+
|
471
|
+
request_url = @base_url || @client.base_url
|
472
|
+
|
473
|
+
options = {
|
474
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
475
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'ascLocation' => @client.asc_location,'jitNetworkAccessPolicyName' => jit_network_access_policy_name},
|
476
|
+
query_params: {'api-version' => @client.api_version},
|
477
|
+
headers: request_headers.merge(custom_headers || {}),
|
478
|
+
base_url: request_url
|
479
|
+
}
|
480
|
+
promise = @client.make_request_async(:get, path_template, options)
|
481
|
+
|
482
|
+
promise = promise.then do |result|
|
483
|
+
http_response = result.response
|
484
|
+
status_code = http_response.status
|
485
|
+
response_content = http_response.body
|
486
|
+
unless status_code == 200
|
487
|
+
error_model = JSON.load(response_content)
|
488
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
489
|
+
end
|
490
|
+
|
491
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
492
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
493
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
494
|
+
# Deserialize Response
|
495
|
+
if status_code == 200
|
496
|
+
begin
|
497
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
498
|
+
result_mapper = Azure::Security::Mgmt::V2015_06_01_preview::Models::JitNetworkAccessPolicy.mapper()
|
499
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
500
|
+
rescue Exception => e
|
501
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
502
|
+
end
|
503
|
+
end
|
504
|
+
|
505
|
+
result
|
506
|
+
end
|
507
|
+
|
508
|
+
promise.execute
|
509
|
+
end
|
510
|
+
|
511
|
+
#
|
512
|
+
# Create a policy for protecting resources using Just-in-Time access control
|
513
|
+
#
|
514
|
+
# @param resource_group_name [String] The name of the resource group within the
|
515
|
+
# user's subscription. The name is case insensitive.
|
516
|
+
# @param jit_network_access_policy_name [String] Name of a Just-in-Time access
|
517
|
+
# configuration policy.
|
518
|
+
# @param body [JitNetworkAccessPolicy]
|
519
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
520
|
+
# will be added to the HTTP request.
|
521
|
+
#
|
522
|
+
# @return [JitNetworkAccessPolicy] operation results.
|
523
|
+
#
|
524
|
+
def create_or_update(resource_group_name, jit_network_access_policy_name, body, custom_headers:nil)
|
525
|
+
response = create_or_update_async(resource_group_name, jit_network_access_policy_name, body, custom_headers:custom_headers).value!
|
526
|
+
response.body unless response.nil?
|
527
|
+
end
|
528
|
+
|
529
|
+
#
|
530
|
+
# Create a policy for protecting resources using Just-in-Time access control
|
531
|
+
#
|
532
|
+
# @param resource_group_name [String] The name of the resource group within the
|
533
|
+
# user's subscription. The name is case insensitive.
|
534
|
+
# @param jit_network_access_policy_name [String] Name of a Just-in-Time access
|
535
|
+
# configuration policy.
|
536
|
+
# @param body [JitNetworkAccessPolicy]
|
537
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
538
|
+
# will be added to the HTTP request.
|
539
|
+
#
|
540
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
541
|
+
#
|
542
|
+
def create_or_update_with_http_info(resource_group_name, jit_network_access_policy_name, body, custom_headers:nil)
|
543
|
+
create_or_update_async(resource_group_name, jit_network_access_policy_name, body, custom_headers:custom_headers).value!
|
544
|
+
end
|
545
|
+
|
546
|
+
#
|
547
|
+
# Create a policy for protecting resources using Just-in-Time access control
|
548
|
+
#
|
549
|
+
# @param resource_group_name [String] The name of the resource group within the
|
550
|
+
# user's subscription. The name is case insensitive.
|
551
|
+
# @param jit_network_access_policy_name [String] Name of a Just-in-Time access
|
552
|
+
# configuration policy.
|
553
|
+
# @param body [JitNetworkAccessPolicy]
|
554
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
555
|
+
# to the HTTP request.
|
556
|
+
#
|
557
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
558
|
+
#
|
559
|
+
def create_or_update_async(resource_group_name, jit_network_access_policy_name, body, custom_headers:nil)
|
560
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
561
|
+
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?
|
562
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
563
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
564
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
565
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
566
|
+
fail ArgumentError, '@client.asc_location is nil' if @client.asc_location.nil?
|
567
|
+
fail ArgumentError, 'jit_network_access_policy_name is nil' if jit_network_access_policy_name.nil?
|
568
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
569
|
+
fail ArgumentError, 'body is nil' if body.nil?
|
570
|
+
|
571
|
+
|
572
|
+
request_headers = {}
|
573
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
574
|
+
|
575
|
+
# Set Headers
|
576
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
577
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
578
|
+
|
579
|
+
# Serialize Request
|
580
|
+
request_mapper = Azure::Security::Mgmt::V2015_06_01_preview::Models::JitNetworkAccessPolicy.mapper()
|
581
|
+
request_content = @client.serialize(request_mapper, body)
|
582
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
583
|
+
|
584
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies/{jitNetworkAccessPolicyName}'
|
585
|
+
|
586
|
+
request_url = @base_url || @client.base_url
|
587
|
+
|
588
|
+
options = {
|
589
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
590
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'ascLocation' => @client.asc_location,'jitNetworkAccessPolicyName' => jit_network_access_policy_name},
|
591
|
+
query_params: {'api-version' => @client.api_version},
|
592
|
+
body: request_content,
|
593
|
+
headers: request_headers.merge(custom_headers || {}),
|
594
|
+
base_url: request_url
|
595
|
+
}
|
596
|
+
promise = @client.make_request_async(:put, path_template, options)
|
597
|
+
|
598
|
+
promise = promise.then do |result|
|
599
|
+
http_response = result.response
|
600
|
+
status_code = http_response.status
|
601
|
+
response_content = http_response.body
|
602
|
+
unless status_code == 200
|
603
|
+
error_model = JSON.load(response_content)
|
604
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
605
|
+
end
|
606
|
+
|
607
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
608
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
609
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
610
|
+
# Deserialize Response
|
611
|
+
if status_code == 200
|
612
|
+
begin
|
613
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
614
|
+
result_mapper = Azure::Security::Mgmt::V2015_06_01_preview::Models::JitNetworkAccessPolicy.mapper()
|
615
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
616
|
+
rescue Exception => e
|
617
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
618
|
+
end
|
619
|
+
end
|
620
|
+
|
621
|
+
result
|
622
|
+
end
|
623
|
+
|
624
|
+
promise.execute
|
625
|
+
end
|
626
|
+
|
627
|
+
#
|
628
|
+
# Delete a Just-in-Time access control policy.
|
629
|
+
#
|
630
|
+
# @param resource_group_name [String] The name of the resource group within the
|
631
|
+
# user's subscription. The name is case insensitive.
|
632
|
+
# @param jit_network_access_policy_name [String] Name of a Just-in-Time access
|
633
|
+
# configuration policy.
|
634
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
635
|
+
# will be added to the HTTP request.
|
636
|
+
#
|
637
|
+
#
|
638
|
+
def delete(resource_group_name, jit_network_access_policy_name, custom_headers:nil)
|
639
|
+
response = delete_async(resource_group_name, jit_network_access_policy_name, custom_headers:custom_headers).value!
|
640
|
+
nil
|
641
|
+
end
|
642
|
+
|
643
|
+
#
|
644
|
+
# Delete a Just-in-Time access control policy.
|
645
|
+
#
|
646
|
+
# @param resource_group_name [String] The name of the resource group within the
|
647
|
+
# user's subscription. The name is case insensitive.
|
648
|
+
# @param jit_network_access_policy_name [String] Name of a Just-in-Time access
|
649
|
+
# configuration policy.
|
650
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
651
|
+
# will be added to the HTTP request.
|
652
|
+
#
|
653
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
654
|
+
#
|
655
|
+
def delete_with_http_info(resource_group_name, jit_network_access_policy_name, custom_headers:nil)
|
656
|
+
delete_async(resource_group_name, jit_network_access_policy_name, custom_headers:custom_headers).value!
|
657
|
+
end
|
658
|
+
|
659
|
+
#
|
660
|
+
# Delete a Just-in-Time access control policy.
|
661
|
+
#
|
662
|
+
# @param resource_group_name [String] The name of the resource group within the
|
663
|
+
# user's subscription. The name is case insensitive.
|
664
|
+
# @param jit_network_access_policy_name [String] Name of a Just-in-Time access
|
665
|
+
# configuration policy.
|
666
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
667
|
+
# to the HTTP request.
|
668
|
+
#
|
669
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
670
|
+
#
|
671
|
+
def delete_async(resource_group_name, jit_network_access_policy_name, custom_headers:nil)
|
672
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
673
|
+
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?
|
674
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
675
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
676
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
677
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
678
|
+
fail ArgumentError, '@client.asc_location is nil' if @client.asc_location.nil?
|
679
|
+
fail ArgumentError, 'jit_network_access_policy_name is nil' if jit_network_access_policy_name.nil?
|
680
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
681
|
+
|
682
|
+
|
683
|
+
request_headers = {}
|
684
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
685
|
+
|
686
|
+
# Set Headers
|
687
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
688
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
689
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies/{jitNetworkAccessPolicyName}'
|
690
|
+
|
691
|
+
request_url = @base_url || @client.base_url
|
692
|
+
|
693
|
+
options = {
|
694
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
695
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'ascLocation' => @client.asc_location,'jitNetworkAccessPolicyName' => jit_network_access_policy_name},
|
696
|
+
query_params: {'api-version' => @client.api_version},
|
697
|
+
headers: request_headers.merge(custom_headers || {}),
|
698
|
+
base_url: request_url
|
699
|
+
}
|
700
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
701
|
+
|
702
|
+
promise = promise.then do |result|
|
703
|
+
http_response = result.response
|
704
|
+
status_code = http_response.status
|
705
|
+
response_content = http_response.body
|
706
|
+
unless status_code == 200 || status_code == 204
|
707
|
+
error_model = JSON.load(response_content)
|
708
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
709
|
+
end
|
710
|
+
|
711
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
712
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
713
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
714
|
+
|
715
|
+
result
|
716
|
+
end
|
717
|
+
|
718
|
+
promise.execute
|
719
|
+
end
|
720
|
+
|
721
|
+
#
|
722
|
+
# Initiate a JIT access from a specific Just-in-Time policy configuration.
|
723
|
+
#
|
724
|
+
# @param resource_group_name [String] The name of the resource group within the
|
725
|
+
# user's subscription. The name is case insensitive.
|
726
|
+
# @param jit_network_access_policy_name [String] Name of a Just-in-Time access
|
727
|
+
# configuration policy.
|
728
|
+
# @param body [JitNetworkAccessPolicyInitiateRequest]
|
729
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
730
|
+
# will be added to the HTTP request.
|
731
|
+
#
|
732
|
+
# @return [JitNetworkAccessRequest] operation results.
|
733
|
+
#
|
734
|
+
def initiate(resource_group_name, jit_network_access_policy_name, body, custom_headers:nil)
|
735
|
+
response = initiate_async(resource_group_name, jit_network_access_policy_name, body, custom_headers:custom_headers).value!
|
736
|
+
response.body unless response.nil?
|
737
|
+
end
|
738
|
+
|
739
|
+
#
|
740
|
+
# Initiate a JIT access from a specific Just-in-Time policy configuration.
|
741
|
+
#
|
742
|
+
# @param resource_group_name [String] The name of the resource group within the
|
743
|
+
# user's subscription. The name is case insensitive.
|
744
|
+
# @param jit_network_access_policy_name [String] Name of a Just-in-Time access
|
745
|
+
# configuration policy.
|
746
|
+
# @param body [JitNetworkAccessPolicyInitiateRequest]
|
747
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
748
|
+
# will be added to the HTTP request.
|
749
|
+
#
|
750
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
751
|
+
#
|
752
|
+
def initiate_with_http_info(resource_group_name, jit_network_access_policy_name, body, custom_headers:nil)
|
753
|
+
initiate_async(resource_group_name, jit_network_access_policy_name, body, custom_headers:custom_headers).value!
|
754
|
+
end
|
755
|
+
|
756
|
+
#
|
757
|
+
# Initiate a JIT access from a specific Just-in-Time policy configuration.
|
758
|
+
#
|
759
|
+
# @param resource_group_name [String] The name of the resource group within the
|
760
|
+
# user's subscription. The name is case insensitive.
|
761
|
+
# @param jit_network_access_policy_name [String] Name of a Just-in-Time access
|
762
|
+
# configuration policy.
|
763
|
+
# @param body [JitNetworkAccessPolicyInitiateRequest]
|
764
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
765
|
+
# to the HTTP request.
|
766
|
+
#
|
767
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
768
|
+
#
|
769
|
+
def initiate_async(resource_group_name, jit_network_access_policy_name, body, custom_headers:nil)
|
770
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
771
|
+
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?
|
772
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
773
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
774
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
775
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
776
|
+
fail ArgumentError, '@client.asc_location is nil' if @client.asc_location.nil?
|
777
|
+
fail ArgumentError, 'jit_network_access_policy_name is nil' if jit_network_access_policy_name.nil?
|
778
|
+
jit_network_access_policy_initiate_type = 'initiate'
|
779
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
780
|
+
fail ArgumentError, 'body is nil' if body.nil?
|
781
|
+
|
782
|
+
|
783
|
+
request_headers = {}
|
784
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
785
|
+
|
786
|
+
# Set Headers
|
787
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
788
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
789
|
+
|
790
|
+
# Serialize Request
|
791
|
+
request_mapper = Azure::Security::Mgmt::V2015_06_01_preview::Models::JitNetworkAccessPolicyInitiateRequest.mapper()
|
792
|
+
request_content = @client.serialize(request_mapper, body)
|
793
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
794
|
+
|
795
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies/{jitNetworkAccessPolicyName}/{jitNetworkAccessPolicyInitiateType}'
|
796
|
+
|
797
|
+
request_url = @base_url || @client.base_url
|
798
|
+
|
799
|
+
options = {
|
800
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
801
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'ascLocation' => @client.asc_location,'jitNetworkAccessPolicyName' => jit_network_access_policy_name,'jitNetworkAccessPolicyInitiateType' => jit_network_access_policy_initiate_type},
|
802
|
+
query_params: {'api-version' => @client.api_version},
|
803
|
+
body: request_content,
|
804
|
+
headers: request_headers.merge(custom_headers || {}),
|
805
|
+
base_url: request_url
|
806
|
+
}
|
807
|
+
promise = @client.make_request_async(:post, path_template, options)
|
808
|
+
|
809
|
+
promise = promise.then do |result|
|
810
|
+
http_response = result.response
|
811
|
+
status_code = http_response.status
|
812
|
+
response_content = http_response.body
|
813
|
+
unless status_code == 202
|
814
|
+
error_model = JSON.load(response_content)
|
815
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
816
|
+
end
|
817
|
+
|
818
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
819
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
820
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
821
|
+
# Deserialize Response
|
822
|
+
if status_code == 202
|
823
|
+
begin
|
824
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
825
|
+
result_mapper = Azure::Security::Mgmt::V2015_06_01_preview::Models::JitNetworkAccessRequest.mapper()
|
826
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
827
|
+
rescue Exception => e
|
828
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
829
|
+
end
|
830
|
+
end
|
831
|
+
|
832
|
+
result
|
833
|
+
end
|
834
|
+
|
835
|
+
promise.execute
|
836
|
+
end
|
837
|
+
|
838
|
+
#
|
839
|
+
# Policies for protecting resources using Just-in-Time access control.
|
840
|
+
#
|
841
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
842
|
+
# to List operation.
|
843
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
844
|
+
# will be added to the HTTP request.
|
845
|
+
#
|
846
|
+
# @return [JitNetworkAccessPoliciesList] operation results.
|
847
|
+
#
|
848
|
+
def list_next(next_page_link, custom_headers:nil)
|
849
|
+
response = list_next_async(next_page_link, custom_headers:custom_headers).value!
|
850
|
+
response.body unless response.nil?
|
851
|
+
end
|
852
|
+
|
853
|
+
#
|
854
|
+
# Policies for protecting resources using Just-in-Time access control.
|
855
|
+
#
|
856
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
857
|
+
# to List operation.
|
858
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
859
|
+
# will be added to the HTTP request.
|
860
|
+
#
|
861
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
862
|
+
#
|
863
|
+
def list_next_with_http_info(next_page_link, custom_headers:nil)
|
864
|
+
list_next_async(next_page_link, custom_headers:custom_headers).value!
|
865
|
+
end
|
866
|
+
|
867
|
+
#
|
868
|
+
# Policies for protecting resources using Just-in-Time access control.
|
869
|
+
#
|
870
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
871
|
+
# to List operation.
|
872
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
873
|
+
# to the HTTP request.
|
874
|
+
#
|
875
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
876
|
+
#
|
877
|
+
def list_next_async(next_page_link, custom_headers:nil)
|
878
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
879
|
+
|
880
|
+
|
881
|
+
request_headers = {}
|
882
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
883
|
+
|
884
|
+
# Set Headers
|
885
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
886
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
887
|
+
path_template = '{nextLink}'
|
888
|
+
|
889
|
+
request_url = @base_url || @client.base_url
|
890
|
+
|
891
|
+
options = {
|
892
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
893
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
894
|
+
headers: request_headers.merge(custom_headers || {}),
|
895
|
+
base_url: request_url
|
896
|
+
}
|
897
|
+
promise = @client.make_request_async(:get, path_template, options)
|
898
|
+
|
899
|
+
promise = promise.then do |result|
|
900
|
+
http_response = result.response
|
901
|
+
status_code = http_response.status
|
902
|
+
response_content = http_response.body
|
903
|
+
unless status_code == 200
|
904
|
+
error_model = JSON.load(response_content)
|
905
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
906
|
+
end
|
907
|
+
|
908
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
909
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
910
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
911
|
+
# Deserialize Response
|
912
|
+
if status_code == 200
|
913
|
+
begin
|
914
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
915
|
+
result_mapper = Azure::Security::Mgmt::V2015_06_01_preview::Models::JitNetworkAccessPoliciesList.mapper()
|
916
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
917
|
+
rescue Exception => e
|
918
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
919
|
+
end
|
920
|
+
end
|
921
|
+
|
922
|
+
result
|
923
|
+
end
|
924
|
+
|
925
|
+
promise.execute
|
926
|
+
end
|
927
|
+
|
928
|
+
#
|
929
|
+
# Policies for protecting resources using Just-in-Time access control for the
|
930
|
+
# subscription, location
|
931
|
+
#
|
932
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
933
|
+
# to List operation.
|
934
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
935
|
+
# will be added to the HTTP request.
|
936
|
+
#
|
937
|
+
# @return [JitNetworkAccessPoliciesList] operation results.
|
938
|
+
#
|
939
|
+
def list_by_region_next(next_page_link, custom_headers:nil)
|
940
|
+
response = list_by_region_next_async(next_page_link, custom_headers:custom_headers).value!
|
941
|
+
response.body unless response.nil?
|
942
|
+
end
|
943
|
+
|
944
|
+
#
|
945
|
+
# Policies for protecting resources using Just-in-Time access control for the
|
946
|
+
# subscription, location
|
947
|
+
#
|
948
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
949
|
+
# to List operation.
|
950
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
951
|
+
# will be added to the HTTP request.
|
952
|
+
#
|
953
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
954
|
+
#
|
955
|
+
def list_by_region_next_with_http_info(next_page_link, custom_headers:nil)
|
956
|
+
list_by_region_next_async(next_page_link, custom_headers:custom_headers).value!
|
957
|
+
end
|
958
|
+
|
959
|
+
#
|
960
|
+
# Policies for protecting resources using Just-in-Time access control for the
|
961
|
+
# subscription, location
|
962
|
+
#
|
963
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
964
|
+
# to List operation.
|
965
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
966
|
+
# to the HTTP request.
|
967
|
+
#
|
968
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
969
|
+
#
|
970
|
+
def list_by_region_next_async(next_page_link, custom_headers:nil)
|
971
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
972
|
+
|
973
|
+
|
974
|
+
request_headers = {}
|
975
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
976
|
+
|
977
|
+
# Set Headers
|
978
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
979
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
980
|
+
path_template = '{nextLink}'
|
981
|
+
|
982
|
+
request_url = @base_url || @client.base_url
|
983
|
+
|
984
|
+
options = {
|
985
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
986
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
987
|
+
headers: request_headers.merge(custom_headers || {}),
|
988
|
+
base_url: request_url
|
989
|
+
}
|
990
|
+
promise = @client.make_request_async(:get, path_template, options)
|
991
|
+
|
992
|
+
promise = promise.then do |result|
|
993
|
+
http_response = result.response
|
994
|
+
status_code = http_response.status
|
995
|
+
response_content = http_response.body
|
996
|
+
unless status_code == 200
|
997
|
+
error_model = JSON.load(response_content)
|
998
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
999
|
+
end
|
1000
|
+
|
1001
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1002
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1003
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1004
|
+
# Deserialize Response
|
1005
|
+
if status_code == 200
|
1006
|
+
begin
|
1007
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1008
|
+
result_mapper = Azure::Security::Mgmt::V2015_06_01_preview::Models::JitNetworkAccessPoliciesList.mapper()
|
1009
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1010
|
+
rescue Exception => e
|
1011
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1012
|
+
end
|
1013
|
+
end
|
1014
|
+
|
1015
|
+
result
|
1016
|
+
end
|
1017
|
+
|
1018
|
+
promise.execute
|
1019
|
+
end
|
1020
|
+
|
1021
|
+
#
|
1022
|
+
# Policies for protecting resources using Just-in-Time access control for the
|
1023
|
+
# subscription, location
|
1024
|
+
#
|
1025
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1026
|
+
# to List operation.
|
1027
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1028
|
+
# will be added to the HTTP request.
|
1029
|
+
#
|
1030
|
+
# @return [JitNetworkAccessPoliciesList] operation results.
|
1031
|
+
#
|
1032
|
+
def list_by_resource_group_next(next_page_link, custom_headers:nil)
|
1033
|
+
response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
|
1034
|
+
response.body unless response.nil?
|
1035
|
+
end
|
1036
|
+
|
1037
|
+
#
|
1038
|
+
# Policies for protecting resources using Just-in-Time access control for the
|
1039
|
+
# subscription, location
|
1040
|
+
#
|
1041
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1042
|
+
# to List operation.
|
1043
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1044
|
+
# will be added to the HTTP request.
|
1045
|
+
#
|
1046
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1047
|
+
#
|
1048
|
+
def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
|
1049
|
+
list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
|
1050
|
+
end
|
1051
|
+
|
1052
|
+
#
|
1053
|
+
# Policies for protecting resources using Just-in-Time access control for the
|
1054
|
+
# subscription, location
|
1055
|
+
#
|
1056
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1057
|
+
# to List operation.
|
1058
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1059
|
+
# to the HTTP request.
|
1060
|
+
#
|
1061
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1062
|
+
#
|
1063
|
+
def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
|
1064
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
1065
|
+
|
1066
|
+
|
1067
|
+
request_headers = {}
|
1068
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1069
|
+
|
1070
|
+
# Set Headers
|
1071
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1072
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1073
|
+
path_template = '{nextLink}'
|
1074
|
+
|
1075
|
+
request_url = @base_url || @client.base_url
|
1076
|
+
|
1077
|
+
options = {
|
1078
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1079
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
1080
|
+
headers: request_headers.merge(custom_headers || {}),
|
1081
|
+
base_url: request_url
|
1082
|
+
}
|
1083
|
+
promise = @client.make_request_async(:get, path_template, options)
|
1084
|
+
|
1085
|
+
promise = promise.then do |result|
|
1086
|
+
http_response = result.response
|
1087
|
+
status_code = http_response.status
|
1088
|
+
response_content = http_response.body
|
1089
|
+
unless status_code == 200
|
1090
|
+
error_model = JSON.load(response_content)
|
1091
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1092
|
+
end
|
1093
|
+
|
1094
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1095
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1096
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1097
|
+
# Deserialize Response
|
1098
|
+
if status_code == 200
|
1099
|
+
begin
|
1100
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1101
|
+
result_mapper = Azure::Security::Mgmt::V2015_06_01_preview::Models::JitNetworkAccessPoliciesList.mapper()
|
1102
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1103
|
+
rescue Exception => e
|
1104
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1105
|
+
end
|
1106
|
+
end
|
1107
|
+
|
1108
|
+
result
|
1109
|
+
end
|
1110
|
+
|
1111
|
+
promise.execute
|
1112
|
+
end
|
1113
|
+
|
1114
|
+
#
|
1115
|
+
# Policies for protecting resources using Just-in-Time access control for the
|
1116
|
+
# subscription, location
|
1117
|
+
#
|
1118
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1119
|
+
# to List operation.
|
1120
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1121
|
+
# will be added to the HTTP request.
|
1122
|
+
#
|
1123
|
+
# @return [JitNetworkAccessPoliciesList] operation results.
|
1124
|
+
#
|
1125
|
+
def list_by_resource_group_and_region_next(next_page_link, custom_headers:nil)
|
1126
|
+
response = list_by_resource_group_and_region_next_async(next_page_link, custom_headers:custom_headers).value!
|
1127
|
+
response.body unless response.nil?
|
1128
|
+
end
|
1129
|
+
|
1130
|
+
#
|
1131
|
+
# Policies for protecting resources using Just-in-Time access control for the
|
1132
|
+
# subscription, location
|
1133
|
+
#
|
1134
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1135
|
+
# to List operation.
|
1136
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1137
|
+
# will be added to the HTTP request.
|
1138
|
+
#
|
1139
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1140
|
+
#
|
1141
|
+
def list_by_resource_group_and_region_next_with_http_info(next_page_link, custom_headers:nil)
|
1142
|
+
list_by_resource_group_and_region_next_async(next_page_link, custom_headers:custom_headers).value!
|
1143
|
+
end
|
1144
|
+
|
1145
|
+
#
|
1146
|
+
# Policies for protecting resources using Just-in-Time access control for the
|
1147
|
+
# subscription, location
|
1148
|
+
#
|
1149
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1150
|
+
# to List operation.
|
1151
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1152
|
+
# to the HTTP request.
|
1153
|
+
#
|
1154
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1155
|
+
#
|
1156
|
+
def list_by_resource_group_and_region_next_async(next_page_link, custom_headers:nil)
|
1157
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
1158
|
+
|
1159
|
+
|
1160
|
+
request_headers = {}
|
1161
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1162
|
+
|
1163
|
+
# Set Headers
|
1164
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1165
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1166
|
+
path_template = '{nextLink}'
|
1167
|
+
|
1168
|
+
request_url = @base_url || @client.base_url
|
1169
|
+
|
1170
|
+
options = {
|
1171
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1172
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
1173
|
+
headers: request_headers.merge(custom_headers || {}),
|
1174
|
+
base_url: request_url
|
1175
|
+
}
|
1176
|
+
promise = @client.make_request_async(:get, path_template, options)
|
1177
|
+
|
1178
|
+
promise = promise.then do |result|
|
1179
|
+
http_response = result.response
|
1180
|
+
status_code = http_response.status
|
1181
|
+
response_content = http_response.body
|
1182
|
+
unless status_code == 200
|
1183
|
+
error_model = JSON.load(response_content)
|
1184
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1185
|
+
end
|
1186
|
+
|
1187
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1188
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1189
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1190
|
+
# Deserialize Response
|
1191
|
+
if status_code == 200
|
1192
|
+
begin
|
1193
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1194
|
+
result_mapper = Azure::Security::Mgmt::V2015_06_01_preview::Models::JitNetworkAccessPoliciesList.mapper()
|
1195
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1196
|
+
rescue Exception => e
|
1197
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1198
|
+
end
|
1199
|
+
end
|
1200
|
+
|
1201
|
+
result
|
1202
|
+
end
|
1203
|
+
|
1204
|
+
promise.execute
|
1205
|
+
end
|
1206
|
+
|
1207
|
+
#
|
1208
|
+
# Policies for protecting resources using Just-in-Time access control.
|
1209
|
+
#
|
1210
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1211
|
+
# will be added to the HTTP request.
|
1212
|
+
#
|
1213
|
+
# @return [JitNetworkAccessPoliciesList] which provide lazy access to pages of
|
1214
|
+
# the response.
|
1215
|
+
#
|
1216
|
+
def list_as_lazy(custom_headers:nil)
|
1217
|
+
response = list_async(custom_headers:custom_headers).value!
|
1218
|
+
unless response.nil?
|
1219
|
+
page = response.body
|
1220
|
+
page.next_method = Proc.new do |next_page_link|
|
1221
|
+
list_next_async(next_page_link, custom_headers:custom_headers)
|
1222
|
+
end
|
1223
|
+
page
|
1224
|
+
end
|
1225
|
+
end
|
1226
|
+
|
1227
|
+
#
|
1228
|
+
# Policies for protecting resources using Just-in-Time access control for the
|
1229
|
+
# subscription, location
|
1230
|
+
#
|
1231
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1232
|
+
# will be added to the HTTP request.
|
1233
|
+
#
|
1234
|
+
# @return [JitNetworkAccessPoliciesList] which provide lazy access to pages of
|
1235
|
+
# the response.
|
1236
|
+
#
|
1237
|
+
def list_by_region_as_lazy(custom_headers:nil)
|
1238
|
+
response = list_by_region_async(custom_headers:custom_headers).value!
|
1239
|
+
unless response.nil?
|
1240
|
+
page = response.body
|
1241
|
+
page.next_method = Proc.new do |next_page_link|
|
1242
|
+
list_by_region_next_async(next_page_link, custom_headers:custom_headers)
|
1243
|
+
end
|
1244
|
+
page
|
1245
|
+
end
|
1246
|
+
end
|
1247
|
+
|
1248
|
+
#
|
1249
|
+
# Policies for protecting resources using Just-in-Time access control for the
|
1250
|
+
# subscription, location
|
1251
|
+
#
|
1252
|
+
# @param resource_group_name [String] The name of the resource group within the
|
1253
|
+
# user's subscription. The name is case insensitive.
|
1254
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1255
|
+
# will be added to the HTTP request.
|
1256
|
+
#
|
1257
|
+
# @return [JitNetworkAccessPoliciesList] which provide lazy access to pages of
|
1258
|
+
# the response.
|
1259
|
+
#
|
1260
|
+
def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil)
|
1261
|
+
response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
|
1262
|
+
unless response.nil?
|
1263
|
+
page = response.body
|
1264
|
+
page.next_method = Proc.new do |next_page_link|
|
1265
|
+
list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
|
1266
|
+
end
|
1267
|
+
page
|
1268
|
+
end
|
1269
|
+
end
|
1270
|
+
|
1271
|
+
#
|
1272
|
+
# Policies for protecting resources using Just-in-Time access control for the
|
1273
|
+
# subscription, location
|
1274
|
+
#
|
1275
|
+
# @param resource_group_name [String] The name of the resource group within the
|
1276
|
+
# user's subscription. The name is case insensitive.
|
1277
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1278
|
+
# will be added to the HTTP request.
|
1279
|
+
#
|
1280
|
+
# @return [JitNetworkAccessPoliciesList] which provide lazy access to pages of
|
1281
|
+
# the response.
|
1282
|
+
#
|
1283
|
+
def list_by_resource_group_and_region_as_lazy(resource_group_name, custom_headers:nil)
|
1284
|
+
response = list_by_resource_group_and_region_async(resource_group_name, custom_headers:custom_headers).value!
|
1285
|
+
unless response.nil?
|
1286
|
+
page = response.body
|
1287
|
+
page.next_method = Proc.new do |next_page_link|
|
1288
|
+
list_by_resource_group_and_region_next_async(next_page_link, custom_headers:custom_headers)
|
1289
|
+
end
|
1290
|
+
page
|
1291
|
+
end
|
1292
|
+
end
|
1293
|
+
|
1294
|
+
end
|
1295
|
+
end
|