azure_mgmt_policy_insights 0.17.3 → 0.17.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/2017-08-09-preview/generated/azure_mgmt_policy_insights/operations.rb +2 -0
- data/lib/2017-08-09-preview/generated/azure_mgmt_policy_insights/policy_events.rb +8 -0
- data/lib/2017-08-09-preview/generated/azure_mgmt_policy_insights/policy_insights_client.rb +1 -1
- data/lib/2017-08-09-preview/generated/azure_mgmt_policy_insights/policy_states.rb +8 -0
- data/lib/2017-10-17-preview/generated/azure_mgmt_policy_insights/operations.rb +2 -0
- data/lib/2017-10-17-preview/generated/azure_mgmt_policy_insights/policy_events.rb +10 -0
- data/lib/2017-10-17-preview/generated/azure_mgmt_policy_insights/policy_insights_client.rb +1 -1
- data/lib/2017-10-17-preview/generated/azure_mgmt_policy_insights/policy_states.rb +10 -0
- data/lib/2017-12-12-preview/generated/azure_mgmt_policy_insights/operations.rb +2 -0
- data/lib/2017-12-12-preview/generated/azure_mgmt_policy_insights/policy_events.rb +18 -0
- data/lib/2017-12-12-preview/generated/azure_mgmt_policy_insights/policy_insights_client.rb +1 -1
- data/lib/2017-12-12-preview/generated/azure_mgmt_policy_insights/policy_states.rb +34 -0
- data/lib/2018-04-04/generated/azure_mgmt_policy_insights/operations.rb +2 -0
- data/lib/2018-04-04/generated/azure_mgmt_policy_insights/policy_events.rb +18 -0
- data/lib/2018-04-04/generated/azure_mgmt_policy_insights/policy_insights_client.rb +1 -1
- data/lib/2018-04-04/generated/azure_mgmt_policy_insights/policy_states.rb +34 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/models/expression_evaluation_details.rb +4 -4
- data/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/models/policy_states_query_results.rb +43 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/models/query_options.rb +11 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/operations.rb +2 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/policy_insights_client.rb +1 -1
- data/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/policy_states.rb +1032 -32
- data/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/policy_tracked_resources.rb +16 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_policy_insights/remediations.rb +64 -0
- data/lib/2019-07-01/generated/azure_mgmt_policy_insights.rb +39 -0
- data/lib/2019-07-01/generated/azure_mgmt_policy_insights/models/error_definition.rb +115 -0
- data/lib/2019-07-01/generated/azure_mgmt_policy_insights/models/error_response.rb +47 -0
- data/lib/2019-07-01/generated/azure_mgmt_policy_insights/models/query_options.rb +54 -0
- data/lib/2019-07-01/generated/azure_mgmt_policy_insights/models/remediation.rb +172 -0
- data/lib/2019-07-01/generated/azure_mgmt_policy_insights/models/remediation_deployment.rb +124 -0
- data/lib/2019-07-01/generated/azure_mgmt_policy_insights/models/remediation_deployment_summary.rb +75 -0
- data/lib/2019-07-01/generated/azure_mgmt_policy_insights/models/remediation_deployments_list_result.rb +101 -0
- data/lib/2019-07-01/generated/azure_mgmt_policy_insights/models/remediation_filters.rb +55 -0
- data/lib/2019-07-01/generated/azure_mgmt_policy_insights/models/remediation_list_result.rb +100 -0
- data/lib/2019-07-01/generated/azure_mgmt_policy_insights/models/resource_discovery_mode.rb +16 -0
- data/lib/2019-07-01/generated/azure_mgmt_policy_insights/models/typed_error_info.rb +59 -0
- data/lib/2019-07-01/generated/azure_mgmt_policy_insights/module_definition.rb +9 -0
- data/lib/2019-07-01/generated/azure_mgmt_policy_insights/policy_insights_client.rb +131 -0
- data/lib/2019-07-01/generated/azure_mgmt_policy_insights/remediations.rb +3294 -0
- data/lib/2019-10-01/generated/azure_mgmt_policy_insights.rb +60 -0
- data/lib/2019-10-01/generated/azure_mgmt_policy_insights/models/compliance_detail.rb +57 -0
- data/lib/2019-10-01/generated/azure_mgmt_policy_insights/models/component_event_details.rb +132 -0
- data/lib/2019-10-01/generated/azure_mgmt_policy_insights/models/component_state_details.rb +109 -0
- data/lib/2019-10-01/generated/azure_mgmt_policy_insights/models/error_definition.rb +115 -0
- data/lib/2019-10-01/generated/azure_mgmt_policy_insights/models/error_response.rb +47 -0
- data/lib/2019-10-01/generated/azure_mgmt_policy_insights/models/expression_evaluation_details.rb +115 -0
- data/lib/2019-10-01/generated/azure_mgmt_policy_insights/models/if_not_exists_evaluation_details.rb +59 -0
- data/lib/2019-10-01/generated/azure_mgmt_policy_insights/models/operation.rb +59 -0
- data/lib/2019-10-01/generated/azure_mgmt_policy_insights/models/operation_display.rb +79 -0
- data/lib/2019-10-01/generated/azure_mgmt_policy_insights/models/operations_list_results.rb +70 -0
- data/lib/2019-10-01/generated/azure_mgmt_policy_insights/models/policy_assignment_summary.rb +110 -0
- data/lib/2019-10-01/generated/azure_mgmt_policy_insights/models/policy_definition_summary.rb +99 -0
- data/lib/2019-10-01/generated/azure_mgmt_policy_insights/models/policy_evaluation_details.rb +69 -0
- data/lib/2019-10-01/generated/azure_mgmt_policy_insights/models/policy_event.rb +416 -0
- data/lib/2019-10-01/generated/azure_mgmt_policy_insights/models/policy_events_query_results.rb +125 -0
- data/lib/2019-10-01/generated/azure_mgmt_policy_insights/models/policy_group_summary.rb +59 -0
- data/lib/2019-10-01/generated/azure_mgmt_policy_insights/models/policy_metadata.rb +168 -0
- data/lib/2019-10-01/generated/azure_mgmt_policy_insights/models/policy_metadata_collection.rb +101 -0
- data/lib/2019-10-01/generated/azure_mgmt_policy_insights/models/policy_state.rb +461 -0
- data/lib/2019-10-01/generated/azure_mgmt_policy_insights/models/policy_states_query_results.rb +125 -0
- data/lib/2019-10-01/generated/azure_mgmt_policy_insights/models/policy_states_resource.rb +16 -0
- data/lib/2019-10-01/generated/azure_mgmt_policy_insights/models/query_failure.rb +47 -0
- data/lib/2019-10-01/generated/azure_mgmt_policy_insights/models/query_failure_error.rb +60 -0
- data/lib/2019-10-01/generated/azure_mgmt_policy_insights/models/query_options.rb +134 -0
- data/lib/2019-10-01/generated/azure_mgmt_policy_insights/models/slim_policy_metadata.rb +145 -0
- data/lib/2019-10-01/generated/azure_mgmt_policy_insights/models/summarize_results.rb +83 -0
- data/lib/2019-10-01/generated/azure_mgmt_policy_insights/models/summary.rb +91 -0
- data/lib/2019-10-01/generated/azure_mgmt_policy_insights/models/summary_results.rb +140 -0
- data/lib/2019-10-01/generated/azure_mgmt_policy_insights/models/typed_error_info.rb +59 -0
- data/lib/2019-10-01/generated/azure_mgmt_policy_insights/module_definition.rb +9 -0
- data/lib/2019-10-01/generated/azure_mgmt_policy_insights/operations.rb +109 -0
- data/lib/2019-10-01/generated/azure_mgmt_policy_insights/policy_events.rb +1961 -0
- data/lib/2019-10-01/generated/azure_mgmt_policy_insights/policy_insights_client.rb +140 -0
- data/lib/2019-10-01/generated/azure_mgmt_policy_insights/policy_metadata_operations.rb +316 -0
- data/lib/2019-10-01/generated/azure_mgmt_policy_insights/policy_states.rb +3233 -0
- data/lib/azure_mgmt_policy_insights.rb +4 -2
- data/lib/profiles/latest/modules/policyinsights_profile_module.rb +55 -13
- data/lib/version.rb +1 -1
- metadata +56 -5
@@ -86,6 +86,8 @@ module Azure::PolicyInsights::Mgmt::V2018_04_04
|
|
86
86
|
end
|
87
87
|
|
88
88
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
89
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
90
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
89
91
|
# Deserialize Response
|
90
92
|
if status_code == 200
|
91
93
|
begin
|
@@ -124,6 +124,8 @@ module Azure::PolicyInsights::Mgmt::V2018_04_04
|
|
124
124
|
end
|
125
125
|
|
126
126
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
127
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
128
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
127
129
|
# Deserialize Response
|
128
130
|
if status_code == 200
|
129
131
|
begin
|
@@ -243,6 +245,8 @@ module Azure::PolicyInsights::Mgmt::V2018_04_04
|
|
243
245
|
end
|
244
246
|
|
245
247
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
248
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
249
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
246
250
|
# Deserialize Response
|
247
251
|
if status_code == 200
|
248
252
|
begin
|
@@ -366,6 +370,8 @@ module Azure::PolicyInsights::Mgmt::V2018_04_04
|
|
366
370
|
end
|
367
371
|
|
368
372
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
373
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
374
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
369
375
|
# Deserialize Response
|
370
376
|
if status_code == 200
|
371
377
|
begin
|
@@ -486,6 +492,8 @@ module Azure::PolicyInsights::Mgmt::V2018_04_04
|
|
486
492
|
end
|
487
493
|
|
488
494
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
495
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
496
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
489
497
|
# Deserialize Response
|
490
498
|
if status_code == 200
|
491
499
|
begin
|
@@ -610,6 +618,8 @@ module Azure::PolicyInsights::Mgmt::V2018_04_04
|
|
610
618
|
end
|
611
619
|
|
612
620
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
621
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
622
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
613
623
|
# Deserialize Response
|
614
624
|
if status_code == 200
|
615
625
|
begin
|
@@ -734,6 +744,8 @@ module Azure::PolicyInsights::Mgmt::V2018_04_04
|
|
734
744
|
end
|
735
745
|
|
736
746
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
747
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
748
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
737
749
|
# Deserialize Response
|
738
750
|
if status_code == 200
|
739
751
|
begin
|
@@ -858,6 +870,8 @@ module Azure::PolicyInsights::Mgmt::V2018_04_04
|
|
858
870
|
end
|
859
871
|
|
860
872
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
873
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
874
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
861
875
|
# Deserialize Response
|
862
876
|
if status_code == 200
|
863
877
|
begin
|
@@ -986,6 +1000,8 @@ module Azure::PolicyInsights::Mgmt::V2018_04_04
|
|
986
1000
|
end
|
987
1001
|
|
988
1002
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1003
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1004
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
989
1005
|
# Deserialize Response
|
990
1006
|
if status_code == 200
|
991
1007
|
begin
|
@@ -1079,6 +1095,8 @@ module Azure::PolicyInsights::Mgmt::V2018_04_04
|
|
1079
1095
|
end
|
1080
1096
|
|
1081
1097
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1098
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1099
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1082
1100
|
# Deserialize Response
|
1083
1101
|
if status_code == 200
|
1084
1102
|
begin
|
@@ -129,7 +129,7 @@ module Azure::PolicyInsights::Mgmt::V2018_04_04
|
|
129
129
|
#
|
130
130
|
def add_telemetry
|
131
131
|
sdk_information = 'azure_mgmt_policy_insights'
|
132
|
-
sdk_information = "#{sdk_information}/0.17.
|
132
|
+
sdk_information = "#{sdk_information}/0.17.8"
|
133
133
|
add_user_agent_information(sdk_information)
|
134
134
|
end
|
135
135
|
end
|
@@ -136,6 +136,8 @@ module Azure::PolicyInsights::Mgmt::V2018_04_04
|
|
136
136
|
end
|
137
137
|
|
138
138
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
139
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
140
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
139
141
|
# Deserialize Response
|
140
142
|
if status_code == 200
|
141
143
|
begin
|
@@ -244,6 +246,8 @@ module Azure::PolicyInsights::Mgmt::V2018_04_04
|
|
244
246
|
end
|
245
247
|
|
246
248
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
249
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
250
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
247
251
|
# Deserialize Response
|
248
252
|
if status_code == 200
|
249
253
|
begin
|
@@ -375,6 +379,8 @@ module Azure::PolicyInsights::Mgmt::V2018_04_04
|
|
375
379
|
end
|
376
380
|
|
377
381
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
382
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
383
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
378
384
|
# Deserialize Response
|
379
385
|
if status_code == 200
|
380
386
|
begin
|
@@ -482,6 +488,8 @@ module Azure::PolicyInsights::Mgmt::V2018_04_04
|
|
482
488
|
end
|
483
489
|
|
484
490
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
491
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
492
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
485
493
|
# Deserialize Response
|
486
494
|
if status_code == 200
|
487
495
|
begin
|
@@ -617,6 +625,8 @@ module Azure::PolicyInsights::Mgmt::V2018_04_04
|
|
617
625
|
end
|
618
626
|
|
619
627
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
628
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
629
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
620
630
|
# Deserialize Response
|
621
631
|
if status_code == 200
|
622
632
|
begin
|
@@ -728,6 +738,8 @@ module Azure::PolicyInsights::Mgmt::V2018_04_04
|
|
728
738
|
end
|
729
739
|
|
730
740
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
741
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
742
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
731
743
|
# Deserialize Response
|
732
744
|
if status_code == 200
|
733
745
|
begin
|
@@ -860,6 +872,8 @@ module Azure::PolicyInsights::Mgmt::V2018_04_04
|
|
860
872
|
end
|
861
873
|
|
862
874
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
875
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
876
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
863
877
|
# Deserialize Response
|
864
878
|
if status_code == 200
|
865
879
|
begin
|
@@ -968,6 +982,8 @@ module Azure::PolicyInsights::Mgmt::V2018_04_04
|
|
968
982
|
end
|
969
983
|
|
970
984
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
985
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
986
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
971
987
|
# Deserialize Response
|
972
988
|
if status_code == 200
|
973
989
|
begin
|
@@ -1104,6 +1120,8 @@ module Azure::PolicyInsights::Mgmt::V2018_04_04
|
|
1104
1120
|
end
|
1105
1121
|
|
1106
1122
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1123
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1124
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1107
1125
|
# Deserialize Response
|
1108
1126
|
if status_code == 200
|
1109
1127
|
begin
|
@@ -1216,6 +1234,8 @@ module Azure::PolicyInsights::Mgmt::V2018_04_04
|
|
1216
1234
|
end
|
1217
1235
|
|
1218
1236
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1237
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1238
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1219
1239
|
# Deserialize Response
|
1220
1240
|
if status_code == 200
|
1221
1241
|
begin
|
@@ -1352,6 +1372,8 @@ module Azure::PolicyInsights::Mgmt::V2018_04_04
|
|
1352
1372
|
end
|
1353
1373
|
|
1354
1374
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1375
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1376
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1355
1377
|
# Deserialize Response
|
1356
1378
|
if status_code == 200
|
1357
1379
|
begin
|
@@ -1464,6 +1486,8 @@ module Azure::PolicyInsights::Mgmt::V2018_04_04
|
|
1464
1486
|
end
|
1465
1487
|
|
1466
1488
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1489
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1490
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1467
1491
|
# Deserialize Response
|
1468
1492
|
if status_code == 200
|
1469
1493
|
begin
|
@@ -1600,6 +1624,8 @@ module Azure::PolicyInsights::Mgmt::V2018_04_04
|
|
1600
1624
|
end
|
1601
1625
|
|
1602
1626
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1627
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1628
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1603
1629
|
# Deserialize Response
|
1604
1630
|
if status_code == 200
|
1605
1631
|
begin
|
@@ -1712,6 +1738,8 @@ module Azure::PolicyInsights::Mgmt::V2018_04_04
|
|
1712
1738
|
end
|
1713
1739
|
|
1714
1740
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1741
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1742
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1715
1743
|
# Deserialize Response
|
1716
1744
|
if status_code == 200
|
1717
1745
|
begin
|
@@ -1852,6 +1880,8 @@ module Azure::PolicyInsights::Mgmt::V2018_04_04
|
|
1852
1880
|
end
|
1853
1881
|
|
1854
1882
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1883
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1884
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1855
1885
|
# Deserialize Response
|
1856
1886
|
if status_code == 200
|
1857
1887
|
begin
|
@@ -1968,6 +1998,8 @@ module Azure::PolicyInsights::Mgmt::V2018_04_04
|
|
1968
1998
|
end
|
1969
1999
|
|
1970
2000
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
2001
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
2002
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1971
2003
|
# Deserialize Response
|
1972
2004
|
if status_code == 200
|
1973
2005
|
begin
|
@@ -2061,6 +2093,8 @@ module Azure::PolicyInsights::Mgmt::V2018_04_04
|
|
2061
2093
|
end
|
2062
2094
|
|
2063
2095
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
2096
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
2097
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
2064
2098
|
# Deserialize Response
|
2065
2099
|
if status_code == 200
|
2066
2100
|
begin
|
@@ -22,10 +22,10 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
22
22
|
# alias.
|
23
23
|
attr_accessor :path
|
24
24
|
|
25
|
-
# @return
|
25
|
+
# @return Value of the expression.
|
26
26
|
attr_accessor :expression_value
|
27
27
|
|
28
|
-
# @return
|
28
|
+
# @return Target value to be compared with the expression value.
|
29
29
|
attr_accessor :target_value
|
30
30
|
|
31
31
|
# @return [String] Operator to compare the expression value and the
|
@@ -75,7 +75,7 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
75
75
|
required: false,
|
76
76
|
serialized_name: 'expressionValue',
|
77
77
|
type: {
|
78
|
-
name: '
|
78
|
+
name: 'Object'
|
79
79
|
}
|
80
80
|
},
|
81
81
|
target_value: {
|
@@ -83,7 +83,7 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
83
83
|
required: false,
|
84
84
|
serialized_name: 'targetValue',
|
85
85
|
type: {
|
86
|
-
name: '
|
86
|
+
name: 'Object'
|
87
87
|
}
|
88
88
|
},
|
89
89
|
operator: {
|
@@ -12,6 +12,7 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
12
12
|
|
13
13
|
include MsRestAzure
|
14
14
|
|
15
|
+
include MsRest::JSONable
|
15
16
|
# @return [String] OData context string; used by OData clients to resolve
|
16
17
|
# type information based on metadata.
|
17
18
|
attr_accessor :odatacontext
|
@@ -20,9 +21,43 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
20
21
|
# state records returned.
|
21
22
|
attr_accessor :odatacount
|
22
23
|
|
24
|
+
# @return [String] Odata next link; URL to get the next set of results.
|
25
|
+
attr_accessor :odatanext_link
|
26
|
+
|
23
27
|
# @return [Array<PolicyState>] Query results.
|
24
28
|
attr_accessor :value
|
25
29
|
|
30
|
+
# return [Proc] with next page method call.
|
31
|
+
attr_accessor :next_method
|
32
|
+
|
33
|
+
#
|
34
|
+
# Gets the rest of the items for the request, enabling auto-pagination.
|
35
|
+
#
|
36
|
+
# @return [Array<PolicyState>] operation results.
|
37
|
+
#
|
38
|
+
def get_all_items
|
39
|
+
items = @value
|
40
|
+
page = self
|
41
|
+
while page.odatanext_link != nil && !page.odatanext_link.strip.empty? do
|
42
|
+
page = page.get_next_page
|
43
|
+
items.concat(page.value)
|
44
|
+
end
|
45
|
+
items
|
46
|
+
end
|
47
|
+
|
48
|
+
#
|
49
|
+
# Gets the next page of results.
|
50
|
+
#
|
51
|
+
# @return [PolicyStatesQueryResults] with next page content.
|
52
|
+
#
|
53
|
+
def get_next_page
|
54
|
+
response = @next_method.call(@odatanext_link).value! unless @next_method.nil?
|
55
|
+
unless response.nil?
|
56
|
+
@odatanext_link = response.body.odatanext_link
|
57
|
+
@value = response.body.value
|
58
|
+
self
|
59
|
+
end
|
60
|
+
end
|
26
61
|
|
27
62
|
#
|
28
63
|
# Mapper for PolicyStatesQueryResults class as Ruby Hash.
|
@@ -56,6 +91,14 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
56
91
|
name: 'Number'
|
57
92
|
}
|
58
93
|
},
|
94
|
+
odatanext_link: {
|
95
|
+
client_side_validation: true,
|
96
|
+
required: false,
|
97
|
+
serialized_name: '@odata\\.nextLink',
|
98
|
+
type: {
|
99
|
+
name: 'String'
|
100
|
+
}
|
101
|
+
},
|
59
102
|
value: {
|
60
103
|
client_side_validation: true,
|
61
104
|
required: false,
|
@@ -41,6 +41,10 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
41
41
|
# @return [String] OData apply expression for aggregations.
|
42
42
|
attr_accessor :apply
|
43
43
|
|
44
|
+
# @return [String] Skiptoken is only provided if a previous response
|
45
|
+
# returned a partial result as a part of nextLink element.
|
46
|
+
attr_accessor :skip_token
|
47
|
+
|
44
48
|
# @return [String] The $expand query parameter. For example, to expand
|
45
49
|
# policyEvaluationDetails, use $expand=policyEvaluationDetails
|
46
50
|
attr_accessor :expand
|
@@ -107,6 +111,13 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
107
111
|
name: 'String'
|
108
112
|
}
|
109
113
|
},
|
114
|
+
skip_token: {
|
115
|
+
client_side_validation: true,
|
116
|
+
required: false,
|
117
|
+
type: {
|
118
|
+
name: 'String'
|
119
|
+
}
|
120
|
+
},
|
110
121
|
expand: {
|
111
122
|
client_side_validation: true,
|
112
123
|
required: false,
|
@@ -86,6 +86,8 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
86
86
|
end
|
87
87
|
|
88
88
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
89
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
90
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
89
91
|
# Deserialize Response
|
90
92
|
if status_code == 200
|
91
93
|
begin
|
@@ -136,7 +136,7 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
136
136
|
#
|
137
137
|
def add_telemetry
|
138
138
|
sdk_information = 'azure_mgmt_policy_insights'
|
139
|
-
sdk_information = "#{sdk_information}/0.17.
|
139
|
+
sdk_information = "#{sdk_information}/0.17.8"
|
140
140
|
add_user_agent_information(sdk_information)
|
141
141
|
end
|
142
142
|
end
|
@@ -33,11 +33,11 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
33
33
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
34
34
|
# will be added to the HTTP request.
|
35
35
|
#
|
36
|
-
# @return [
|
36
|
+
# @return [Array<PolicyState>] operation results.
|
37
37
|
#
|
38
38
|
def list_query_results_for_management_group(policy_states_resource, management_group_name, query_options:nil, custom_headers:nil)
|
39
|
-
|
40
|
-
|
39
|
+
first_page = list_query_results_for_management_group_as_lazy(policy_states_resource, management_group_name, query_options:query_options, custom_headers:custom_headers)
|
40
|
+
first_page.get_all_items
|
41
41
|
end
|
42
42
|
|
43
43
|
#
|
@@ -85,6 +85,7 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
85
85
|
to = nil
|
86
86
|
filter = nil
|
87
87
|
apply = nil
|
88
|
+
skip_token = nil
|
88
89
|
unless query_options.nil?
|
89
90
|
top = query_options.Top
|
90
91
|
end
|
@@ -106,6 +107,9 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
106
107
|
unless query_options.nil?
|
107
108
|
apply = query_options.Apply
|
108
109
|
end
|
110
|
+
unless query_options.nil?
|
111
|
+
skip_token = query_options.SkipToken
|
112
|
+
end
|
109
113
|
|
110
114
|
request_headers = {}
|
111
115
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
@@ -120,7 +124,7 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
120
124
|
options = {
|
121
125
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
122
126
|
path_params: {'policyStatesResource' => policy_states_resource,'managementGroupsNamespace' => management_groups_namespace,'managementGroupName' => management_group_name},
|
123
|
-
query_params: {'api-version' => @client.api_version,'$top' => top,'$orderby' => order_by,'$select' => select,'$from' => from,'$to' => to,'$filter' => filter,'$apply' => apply},
|
127
|
+
query_params: {'api-version' => @client.api_version,'$top' => top,'$orderby' => order_by,'$select' => select,'$from' => from,'$to' => to,'$filter' => filter,'$apply' => apply,'$skiptoken' => skip_token},
|
124
128
|
headers: request_headers.merge(custom_headers || {}),
|
125
129
|
base_url: request_url
|
126
130
|
}
|
@@ -136,6 +140,8 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
136
140
|
end
|
137
141
|
|
138
142
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
143
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
144
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
139
145
|
# Deserialize Response
|
140
146
|
if status_code == 200
|
141
147
|
begin
|
@@ -244,6 +250,8 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
244
250
|
end
|
245
251
|
|
246
252
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
253
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
254
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
247
255
|
# Deserialize Response
|
248
256
|
if status_code == 200
|
249
257
|
begin
|
@@ -273,11 +281,11 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
273
281
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
274
282
|
# will be added to the HTTP request.
|
275
283
|
#
|
276
|
-
# @return [
|
284
|
+
# @return [Array<PolicyState>] operation results.
|
277
285
|
#
|
278
286
|
def list_query_results_for_subscription(policy_states_resource, subscription_id, query_options:nil, custom_headers:nil)
|
279
|
-
|
280
|
-
|
287
|
+
first_page = list_query_results_for_subscription_as_lazy(policy_states_resource, subscription_id, query_options:query_options, custom_headers:custom_headers)
|
288
|
+
first_page.get_all_items
|
281
289
|
end
|
282
290
|
|
283
291
|
#
|
@@ -324,6 +332,7 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
324
332
|
to = nil
|
325
333
|
filter = nil
|
326
334
|
apply = nil
|
335
|
+
skip_token = nil
|
327
336
|
unless query_options.nil?
|
328
337
|
top = query_options.Top
|
329
338
|
end
|
@@ -345,6 +354,9 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
345
354
|
unless query_options.nil?
|
346
355
|
apply = query_options.Apply
|
347
356
|
end
|
357
|
+
unless query_options.nil?
|
358
|
+
skip_token = query_options.SkipToken
|
359
|
+
end
|
348
360
|
|
349
361
|
request_headers = {}
|
350
362
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
@@ -359,7 +371,7 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
359
371
|
options = {
|
360
372
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
361
373
|
path_params: {'policyStatesResource' => policy_states_resource,'subscriptionId' => subscription_id},
|
362
|
-
query_params: {'api-version' => @client.api_version,'$top' => top,'$orderby' => order_by,'$select' => select,'$from' => from,'$to' => to,'$filter' => filter,'$apply' => apply},
|
374
|
+
query_params: {'api-version' => @client.api_version,'$top' => top,'$orderby' => order_by,'$select' => select,'$from' => from,'$to' => to,'$filter' => filter,'$apply' => apply,'$skiptoken' => skip_token},
|
363
375
|
headers: request_headers.merge(custom_headers || {}),
|
364
376
|
base_url: request_url
|
365
377
|
}
|
@@ -375,6 +387,8 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
375
387
|
end
|
376
388
|
|
377
389
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
390
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
391
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
378
392
|
# Deserialize Response
|
379
393
|
if status_code == 200
|
380
394
|
begin
|
@@ -482,6 +496,8 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
482
496
|
end
|
483
497
|
|
484
498
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
499
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
500
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
485
501
|
# Deserialize Response
|
486
502
|
if status_code == 200
|
487
503
|
begin
|
@@ -512,11 +528,11 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
512
528
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
513
529
|
# will be added to the HTTP request.
|
514
530
|
#
|
515
|
-
# @return [
|
531
|
+
# @return [Array<PolicyState>] operation results.
|
516
532
|
#
|
517
533
|
def list_query_results_for_resource_group(policy_states_resource, subscription_id, resource_group_name, query_options:nil, custom_headers:nil)
|
518
|
-
|
519
|
-
|
534
|
+
first_page = list_query_results_for_resource_group_as_lazy(policy_states_resource, subscription_id, resource_group_name, query_options:query_options, custom_headers:custom_headers)
|
535
|
+
first_page.get_all_items
|
520
536
|
end
|
521
537
|
|
522
538
|
#
|
@@ -566,6 +582,7 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
566
582
|
to = nil
|
567
583
|
filter = nil
|
568
584
|
apply = nil
|
585
|
+
skip_token = nil
|
569
586
|
unless query_options.nil?
|
570
587
|
top = query_options.Top
|
571
588
|
end
|
@@ -587,6 +604,9 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
587
604
|
unless query_options.nil?
|
588
605
|
apply = query_options.Apply
|
589
606
|
end
|
607
|
+
unless query_options.nil?
|
608
|
+
skip_token = query_options.SkipToken
|
609
|
+
end
|
590
610
|
|
591
611
|
request_headers = {}
|
592
612
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
@@ -601,7 +621,7 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
601
621
|
options = {
|
602
622
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
603
623
|
path_params: {'policyStatesResource' => policy_states_resource,'subscriptionId' => subscription_id,'resourceGroupName' => resource_group_name},
|
604
|
-
query_params: {'api-version' => @client.api_version,'$top' => top,'$orderby' => order_by,'$select' => select,'$from' => from,'$to' => to,'$filter' => filter,'$apply' => apply},
|
624
|
+
query_params: {'api-version' => @client.api_version,'$top' => top,'$orderby' => order_by,'$select' => select,'$from' => from,'$to' => to,'$filter' => filter,'$apply' => apply,'$skiptoken' => skip_token},
|
605
625
|
headers: request_headers.merge(custom_headers || {}),
|
606
626
|
base_url: request_url
|
607
627
|
}
|
@@ -617,6 +637,8 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
617
637
|
end
|
618
638
|
|
619
639
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
640
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
641
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
620
642
|
# Deserialize Response
|
621
643
|
if status_code == 200
|
622
644
|
begin
|
@@ -728,6 +750,8 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
728
750
|
end
|
729
751
|
|
730
752
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
753
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
754
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
731
755
|
# Deserialize Response
|
732
756
|
if status_code == 200
|
733
757
|
begin
|
@@ -757,11 +781,11 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
757
781
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
758
782
|
# will be added to the HTTP request.
|
759
783
|
#
|
760
|
-
# @return [
|
784
|
+
# @return [Array<PolicyState>] operation results.
|
761
785
|
#
|
762
786
|
def list_query_results_for_resource(policy_states_resource, resource_id, query_options:nil, custom_headers:nil)
|
763
|
-
|
764
|
-
|
787
|
+
first_page = list_query_results_for_resource_as_lazy(policy_states_resource, resource_id, query_options:query_options, custom_headers:custom_headers)
|
788
|
+
first_page.get_all_items
|
765
789
|
end
|
766
790
|
|
767
791
|
#
|
@@ -809,6 +833,7 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
809
833
|
filter = nil
|
810
834
|
apply = nil
|
811
835
|
expand = nil
|
836
|
+
skip_token = nil
|
812
837
|
unless query_options.nil?
|
813
838
|
top = query_options.Top
|
814
839
|
end
|
@@ -833,6 +858,9 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
833
858
|
unless query_options.nil?
|
834
859
|
expand = query_options.Expand
|
835
860
|
end
|
861
|
+
unless query_options.nil?
|
862
|
+
skip_token = query_options.SkipToken
|
863
|
+
end
|
836
864
|
|
837
865
|
request_headers = {}
|
838
866
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
@@ -848,7 +876,7 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
848
876
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
849
877
|
path_params: {'policyStatesResource' => policy_states_resource},
|
850
878
|
skip_encoding_path_params: {'resourceId' => resource_id},
|
851
|
-
query_params: {'api-version' => @client.api_version,'$top' => top,'$orderby' => order_by,'$select' => select,'$from' => from,'$to' => to,'$filter' => filter,'$apply' => apply,'$expand' => expand},
|
879
|
+
query_params: {'api-version' => @client.api_version,'$top' => top,'$orderby' => order_by,'$select' => select,'$from' => from,'$to' => to,'$filter' => filter,'$apply' => apply,'$expand' => expand,'$skiptoken' => skip_token},
|
852
880
|
headers: request_headers.merge(custom_headers || {}),
|
853
881
|
base_url: request_url
|
854
882
|
}
|
@@ -864,6 +892,8 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
864
892
|
end
|
865
893
|
|
866
894
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
895
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
896
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
867
897
|
# Deserialize Response
|
868
898
|
if status_code == 200
|
869
899
|
begin
|
@@ -972,6 +1002,8 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
972
1002
|
end
|
973
1003
|
|
974
1004
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1005
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1006
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
975
1007
|
# Deserialize Response
|
976
1008
|
if status_code == 200
|
977
1009
|
begin
|
@@ -1002,11 +1034,11 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
1002
1034
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1003
1035
|
# will be added to the HTTP request.
|
1004
1036
|
#
|
1005
|
-
# @return [
|
1037
|
+
# @return [Array<PolicyState>] operation results.
|
1006
1038
|
#
|
1007
1039
|
def list_query_results_for_policy_set_definition(policy_states_resource, subscription_id, policy_set_definition_name, query_options:nil, custom_headers:nil)
|
1008
|
-
|
1009
|
-
|
1040
|
+
first_page = list_query_results_for_policy_set_definition_as_lazy(policy_states_resource, subscription_id, policy_set_definition_name, query_options:query_options, custom_headers:custom_headers)
|
1041
|
+
first_page.get_all_items
|
1010
1042
|
end
|
1011
1043
|
|
1012
1044
|
#
|
@@ -1057,6 +1089,7 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
1057
1089
|
to = nil
|
1058
1090
|
filter = nil
|
1059
1091
|
apply = nil
|
1092
|
+
skip_token = nil
|
1060
1093
|
unless query_options.nil?
|
1061
1094
|
top = query_options.Top
|
1062
1095
|
end
|
@@ -1078,6 +1111,9 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
1078
1111
|
unless query_options.nil?
|
1079
1112
|
apply = query_options.Apply
|
1080
1113
|
end
|
1114
|
+
unless query_options.nil?
|
1115
|
+
skip_token = query_options.SkipToken
|
1116
|
+
end
|
1081
1117
|
|
1082
1118
|
request_headers = {}
|
1083
1119
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
@@ -1092,7 +1128,7 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
1092
1128
|
options = {
|
1093
1129
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1094
1130
|
path_params: {'policyStatesResource' => policy_states_resource,'subscriptionId' => subscription_id,'authorizationNamespace' => authorization_namespace,'policySetDefinitionName' => policy_set_definition_name},
|
1095
|
-
query_params: {'api-version' => @client.api_version,'$top' => top,'$orderby' => order_by,'$select' => select,'$from' => from,'$to' => to,'$filter' => filter,'$apply' => apply},
|
1131
|
+
query_params: {'api-version' => @client.api_version,'$top' => top,'$orderby' => order_by,'$select' => select,'$from' => from,'$to' => to,'$filter' => filter,'$apply' => apply,'$skiptoken' => skip_token},
|
1096
1132
|
headers: request_headers.merge(custom_headers || {}),
|
1097
1133
|
base_url: request_url
|
1098
1134
|
}
|
@@ -1108,6 +1144,8 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
1108
1144
|
end
|
1109
1145
|
|
1110
1146
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1147
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1148
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1111
1149
|
# Deserialize Response
|
1112
1150
|
if status_code == 200
|
1113
1151
|
begin
|
@@ -1220,6 +1258,8 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
1220
1258
|
end
|
1221
1259
|
|
1222
1260
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1261
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1262
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1223
1263
|
# Deserialize Response
|
1224
1264
|
if status_code == 200
|
1225
1265
|
begin
|
@@ -1250,11 +1290,11 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
1250
1290
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1251
1291
|
# will be added to the HTTP request.
|
1252
1292
|
#
|
1253
|
-
# @return [
|
1293
|
+
# @return [Array<PolicyState>] operation results.
|
1254
1294
|
#
|
1255
1295
|
def list_query_results_for_policy_definition(policy_states_resource, subscription_id, policy_definition_name, query_options:nil, custom_headers:nil)
|
1256
|
-
|
1257
|
-
|
1296
|
+
first_page = list_query_results_for_policy_definition_as_lazy(policy_states_resource, subscription_id, policy_definition_name, query_options:query_options, custom_headers:custom_headers)
|
1297
|
+
first_page.get_all_items
|
1258
1298
|
end
|
1259
1299
|
|
1260
1300
|
#
|
@@ -1305,6 +1345,7 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
1305
1345
|
to = nil
|
1306
1346
|
filter = nil
|
1307
1347
|
apply = nil
|
1348
|
+
skip_token = nil
|
1308
1349
|
unless query_options.nil?
|
1309
1350
|
top = query_options.Top
|
1310
1351
|
end
|
@@ -1326,6 +1367,9 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
1326
1367
|
unless query_options.nil?
|
1327
1368
|
apply = query_options.Apply
|
1328
1369
|
end
|
1370
|
+
unless query_options.nil?
|
1371
|
+
skip_token = query_options.SkipToken
|
1372
|
+
end
|
1329
1373
|
|
1330
1374
|
request_headers = {}
|
1331
1375
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
@@ -1340,7 +1384,7 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
1340
1384
|
options = {
|
1341
1385
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1342
1386
|
path_params: {'policyStatesResource' => policy_states_resource,'subscriptionId' => subscription_id,'authorizationNamespace' => authorization_namespace,'policyDefinitionName' => policy_definition_name},
|
1343
|
-
query_params: {'api-version' => @client.api_version,'$top' => top,'$orderby' => order_by,'$select' => select,'$from' => from,'$to' => to,'$filter' => filter,'$apply' => apply},
|
1387
|
+
query_params: {'api-version' => @client.api_version,'$top' => top,'$orderby' => order_by,'$select' => select,'$from' => from,'$to' => to,'$filter' => filter,'$apply' => apply,'$skiptoken' => skip_token},
|
1344
1388
|
headers: request_headers.merge(custom_headers || {}),
|
1345
1389
|
base_url: request_url
|
1346
1390
|
}
|
@@ -1356,6 +1400,8 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
1356
1400
|
end
|
1357
1401
|
|
1358
1402
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1403
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1404
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1359
1405
|
# Deserialize Response
|
1360
1406
|
if status_code == 200
|
1361
1407
|
begin
|
@@ -1468,6 +1514,8 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
1468
1514
|
end
|
1469
1515
|
|
1470
1516
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1517
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1518
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1471
1519
|
# Deserialize Response
|
1472
1520
|
if status_code == 200
|
1473
1521
|
begin
|
@@ -1498,11 +1546,11 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
1498
1546
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1499
1547
|
# will be added to the HTTP request.
|
1500
1548
|
#
|
1501
|
-
# @return [
|
1549
|
+
# @return [Array<PolicyState>] operation results.
|
1502
1550
|
#
|
1503
1551
|
def list_query_results_for_subscription_level_policy_assignment(policy_states_resource, subscription_id, policy_assignment_name, query_options:nil, custom_headers:nil)
|
1504
|
-
|
1505
|
-
|
1552
|
+
first_page = list_query_results_for_subscription_level_policy_assignment_as_lazy(policy_states_resource, subscription_id, policy_assignment_name, query_options:query_options, custom_headers:custom_headers)
|
1553
|
+
first_page.get_all_items
|
1506
1554
|
end
|
1507
1555
|
|
1508
1556
|
#
|
@@ -1553,6 +1601,7 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
1553
1601
|
to = nil
|
1554
1602
|
filter = nil
|
1555
1603
|
apply = nil
|
1604
|
+
skip_token = nil
|
1556
1605
|
unless query_options.nil?
|
1557
1606
|
top = query_options.Top
|
1558
1607
|
end
|
@@ -1574,6 +1623,9 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
1574
1623
|
unless query_options.nil?
|
1575
1624
|
apply = query_options.Apply
|
1576
1625
|
end
|
1626
|
+
unless query_options.nil?
|
1627
|
+
skip_token = query_options.SkipToken
|
1628
|
+
end
|
1577
1629
|
|
1578
1630
|
request_headers = {}
|
1579
1631
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
@@ -1588,7 +1640,7 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
1588
1640
|
options = {
|
1589
1641
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1590
1642
|
path_params: {'policyStatesResource' => policy_states_resource,'subscriptionId' => subscription_id,'authorizationNamespace' => authorization_namespace,'policyAssignmentName' => policy_assignment_name},
|
1591
|
-
query_params: {'api-version' => @client.api_version,'$top' => top,'$orderby' => order_by,'$select' => select,'$from' => from,'$to' => to,'$filter' => filter,'$apply' => apply},
|
1643
|
+
query_params: {'api-version' => @client.api_version,'$top' => top,'$orderby' => order_by,'$select' => select,'$from' => from,'$to' => to,'$filter' => filter,'$apply' => apply,'$skiptoken' => skip_token},
|
1592
1644
|
headers: request_headers.merge(custom_headers || {}),
|
1593
1645
|
base_url: request_url
|
1594
1646
|
}
|
@@ -1604,6 +1656,8 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
1604
1656
|
end
|
1605
1657
|
|
1606
1658
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1659
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1660
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1607
1661
|
# Deserialize Response
|
1608
1662
|
if status_code == 200
|
1609
1663
|
begin
|
@@ -1716,6 +1770,8 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
1716
1770
|
end
|
1717
1771
|
|
1718
1772
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1773
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1774
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1719
1775
|
# Deserialize Response
|
1720
1776
|
if status_code == 200
|
1721
1777
|
begin
|
@@ -1747,11 +1803,11 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
1747
1803
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1748
1804
|
# will be added to the HTTP request.
|
1749
1805
|
#
|
1750
|
-
# @return [
|
1806
|
+
# @return [Array<PolicyState>] operation results.
|
1751
1807
|
#
|
1752
1808
|
def list_query_results_for_resource_group_level_policy_assignment(policy_states_resource, subscription_id, resource_group_name, policy_assignment_name, query_options:nil, custom_headers:nil)
|
1753
|
-
|
1754
|
-
|
1809
|
+
first_page = list_query_results_for_resource_group_level_policy_assignment_as_lazy(policy_states_resource, subscription_id, resource_group_name, policy_assignment_name, query_options:query_options, custom_headers:custom_headers)
|
1810
|
+
first_page.get_all_items
|
1755
1811
|
end
|
1756
1812
|
|
1757
1813
|
#
|
@@ -1805,6 +1861,7 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
1805
1861
|
to = nil
|
1806
1862
|
filter = nil
|
1807
1863
|
apply = nil
|
1864
|
+
skip_token = nil
|
1808
1865
|
unless query_options.nil?
|
1809
1866
|
top = query_options.Top
|
1810
1867
|
end
|
@@ -1826,6 +1883,9 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
1826
1883
|
unless query_options.nil?
|
1827
1884
|
apply = query_options.Apply
|
1828
1885
|
end
|
1886
|
+
unless query_options.nil?
|
1887
|
+
skip_token = query_options.SkipToken
|
1888
|
+
end
|
1829
1889
|
|
1830
1890
|
request_headers = {}
|
1831
1891
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
@@ -1840,7 +1900,7 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
1840
1900
|
options = {
|
1841
1901
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1842
1902
|
path_params: {'policyStatesResource' => policy_states_resource,'subscriptionId' => subscription_id,'resourceGroupName' => resource_group_name,'authorizationNamespace' => authorization_namespace,'policyAssignmentName' => policy_assignment_name},
|
1843
|
-
query_params: {'api-version' => @client.api_version,'$top' => top,'$orderby' => order_by,'$select' => select,'$from' => from,'$to' => to,'$filter' => filter,'$apply' => apply},
|
1903
|
+
query_params: {'api-version' => @client.api_version,'$top' => top,'$orderby' => order_by,'$select' => select,'$from' => from,'$to' => to,'$filter' => filter,'$apply' => apply,'$skiptoken' => skip_token},
|
1844
1904
|
headers: request_headers.merge(custom_headers || {}),
|
1845
1905
|
base_url: request_url
|
1846
1906
|
}
|
@@ -1856,6 +1916,8 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
1856
1916
|
end
|
1857
1917
|
|
1858
1918
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1919
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1920
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1859
1921
|
# Deserialize Response
|
1860
1922
|
if status_code == 200
|
1861
1923
|
begin
|
@@ -1972,6 +2034,8 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
1972
2034
|
end
|
1973
2035
|
|
1974
2036
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
2037
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
2038
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1975
2039
|
# Deserialize Response
|
1976
2040
|
if status_code == 200
|
1977
2041
|
begin
|
@@ -2065,6 +2129,8 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
2065
2129
|
end
|
2066
2130
|
|
2067
2131
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
2132
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
2133
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
2068
2134
|
# Deserialize Response
|
2069
2135
|
if status_code == 200
|
2070
2136
|
begin
|
@@ -2089,5 +2155,939 @@ module Azure::PolicyInsights::Mgmt::V2018_07_01_preview
|
|
2089
2155
|
promise.execute
|
2090
2156
|
end
|
2091
2157
|
|
2158
|
+
#
|
2159
|
+
# Queries policy states for the resources under the management group.
|
2160
|
+
#
|
2161
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
2162
|
+
# to List operation.
|
2163
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
2164
|
+
# will be added to the HTTP request.
|
2165
|
+
#
|
2166
|
+
# @return [PolicyStatesQueryResults] operation results.
|
2167
|
+
#
|
2168
|
+
def list_query_results_for_management_group_next(next_page_link, custom_headers:nil)
|
2169
|
+
response = list_query_results_for_management_group_next_async(next_page_link, custom_headers:custom_headers).value!
|
2170
|
+
response.body unless response.nil?
|
2171
|
+
end
|
2172
|
+
|
2173
|
+
#
|
2174
|
+
# Queries policy states for the resources under the management group.
|
2175
|
+
#
|
2176
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
2177
|
+
# to List operation.
|
2178
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
2179
|
+
# will be added to the HTTP request.
|
2180
|
+
#
|
2181
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
2182
|
+
#
|
2183
|
+
def list_query_results_for_management_group_next_with_http_info(next_page_link, custom_headers:nil)
|
2184
|
+
list_query_results_for_management_group_next_async(next_page_link, custom_headers:custom_headers).value!
|
2185
|
+
end
|
2186
|
+
|
2187
|
+
#
|
2188
|
+
# Queries policy states for the resources under the management group.
|
2189
|
+
#
|
2190
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
2191
|
+
# to List operation.
|
2192
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
2193
|
+
# to the HTTP request.
|
2194
|
+
#
|
2195
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
2196
|
+
#
|
2197
|
+
def list_query_results_for_management_group_next_async(next_page_link, custom_headers:nil)
|
2198
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
2199
|
+
|
2200
|
+
|
2201
|
+
request_headers = {}
|
2202
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
2203
|
+
|
2204
|
+
# Set Headers
|
2205
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
2206
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
2207
|
+
path_template = '{nextLink}'
|
2208
|
+
|
2209
|
+
request_url = @base_url || @client.base_url
|
2210
|
+
|
2211
|
+
options = {
|
2212
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
2213
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
2214
|
+
headers: request_headers.merge(custom_headers || {}),
|
2215
|
+
base_url: request_url
|
2216
|
+
}
|
2217
|
+
promise = @client.make_request_async(:post, path_template, options)
|
2218
|
+
|
2219
|
+
promise = promise.then do |result|
|
2220
|
+
http_response = result.response
|
2221
|
+
status_code = http_response.status
|
2222
|
+
response_content = http_response.body
|
2223
|
+
unless status_code == 200
|
2224
|
+
error_model = JSON.load(response_content)
|
2225
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
2226
|
+
end
|
2227
|
+
|
2228
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
2229
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
2230
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
2231
|
+
# Deserialize Response
|
2232
|
+
if status_code == 200
|
2233
|
+
begin
|
2234
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
2235
|
+
result_mapper = Azure::PolicyInsights::Mgmt::V2018_07_01_preview::Models::PolicyStatesQueryResults.mapper()
|
2236
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
2237
|
+
rescue Exception => e
|
2238
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
2239
|
+
end
|
2240
|
+
end
|
2241
|
+
|
2242
|
+
result
|
2243
|
+
end
|
2244
|
+
|
2245
|
+
promise.execute
|
2246
|
+
end
|
2247
|
+
|
2248
|
+
#
|
2249
|
+
# Queries policy states for the resources under the subscription.
|
2250
|
+
#
|
2251
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
2252
|
+
# to List operation.
|
2253
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
2254
|
+
# will be added to the HTTP request.
|
2255
|
+
#
|
2256
|
+
# @return [PolicyStatesQueryResults] operation results.
|
2257
|
+
#
|
2258
|
+
def list_query_results_for_subscription_next(next_page_link, custom_headers:nil)
|
2259
|
+
response = list_query_results_for_subscription_next_async(next_page_link, custom_headers:custom_headers).value!
|
2260
|
+
response.body unless response.nil?
|
2261
|
+
end
|
2262
|
+
|
2263
|
+
#
|
2264
|
+
# Queries policy states for the resources under the subscription.
|
2265
|
+
#
|
2266
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
2267
|
+
# to List operation.
|
2268
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
2269
|
+
# will be added to the HTTP request.
|
2270
|
+
#
|
2271
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
2272
|
+
#
|
2273
|
+
def list_query_results_for_subscription_next_with_http_info(next_page_link, custom_headers:nil)
|
2274
|
+
list_query_results_for_subscription_next_async(next_page_link, custom_headers:custom_headers).value!
|
2275
|
+
end
|
2276
|
+
|
2277
|
+
#
|
2278
|
+
# Queries policy states for the resources under the subscription.
|
2279
|
+
#
|
2280
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
2281
|
+
# to List operation.
|
2282
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
2283
|
+
# to the HTTP request.
|
2284
|
+
#
|
2285
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
2286
|
+
#
|
2287
|
+
def list_query_results_for_subscription_next_async(next_page_link, custom_headers:nil)
|
2288
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
2289
|
+
|
2290
|
+
|
2291
|
+
request_headers = {}
|
2292
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
2293
|
+
|
2294
|
+
# Set Headers
|
2295
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
2296
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
2297
|
+
path_template = '{nextLink}'
|
2298
|
+
|
2299
|
+
request_url = @base_url || @client.base_url
|
2300
|
+
|
2301
|
+
options = {
|
2302
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
2303
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
2304
|
+
headers: request_headers.merge(custom_headers || {}),
|
2305
|
+
base_url: request_url
|
2306
|
+
}
|
2307
|
+
promise = @client.make_request_async(:post, path_template, options)
|
2308
|
+
|
2309
|
+
promise = promise.then do |result|
|
2310
|
+
http_response = result.response
|
2311
|
+
status_code = http_response.status
|
2312
|
+
response_content = http_response.body
|
2313
|
+
unless status_code == 200
|
2314
|
+
error_model = JSON.load(response_content)
|
2315
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
2316
|
+
end
|
2317
|
+
|
2318
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
2319
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
2320
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
2321
|
+
# Deserialize Response
|
2322
|
+
if status_code == 200
|
2323
|
+
begin
|
2324
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
2325
|
+
result_mapper = Azure::PolicyInsights::Mgmt::V2018_07_01_preview::Models::PolicyStatesQueryResults.mapper()
|
2326
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
2327
|
+
rescue Exception => e
|
2328
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
2329
|
+
end
|
2330
|
+
end
|
2331
|
+
|
2332
|
+
result
|
2333
|
+
end
|
2334
|
+
|
2335
|
+
promise.execute
|
2336
|
+
end
|
2337
|
+
|
2338
|
+
#
|
2339
|
+
# Queries policy states for the resources under the resource group.
|
2340
|
+
#
|
2341
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
2342
|
+
# to List operation.
|
2343
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
2344
|
+
# will be added to the HTTP request.
|
2345
|
+
#
|
2346
|
+
# @return [PolicyStatesQueryResults] operation results.
|
2347
|
+
#
|
2348
|
+
def list_query_results_for_resource_group_next(next_page_link, custom_headers:nil)
|
2349
|
+
response = list_query_results_for_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
|
2350
|
+
response.body unless response.nil?
|
2351
|
+
end
|
2352
|
+
|
2353
|
+
#
|
2354
|
+
# Queries policy states for the resources under the resource group.
|
2355
|
+
#
|
2356
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
2357
|
+
# to List operation.
|
2358
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
2359
|
+
# will be added to the HTTP request.
|
2360
|
+
#
|
2361
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
2362
|
+
#
|
2363
|
+
def list_query_results_for_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
|
2364
|
+
list_query_results_for_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
|
2365
|
+
end
|
2366
|
+
|
2367
|
+
#
|
2368
|
+
# Queries policy states for the resources under the resource group.
|
2369
|
+
#
|
2370
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
2371
|
+
# to List operation.
|
2372
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
2373
|
+
# to the HTTP request.
|
2374
|
+
#
|
2375
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
2376
|
+
#
|
2377
|
+
def list_query_results_for_resource_group_next_async(next_page_link, custom_headers:nil)
|
2378
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
2379
|
+
|
2380
|
+
|
2381
|
+
request_headers = {}
|
2382
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
2383
|
+
|
2384
|
+
# Set Headers
|
2385
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
2386
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
2387
|
+
path_template = '{nextLink}'
|
2388
|
+
|
2389
|
+
request_url = @base_url || @client.base_url
|
2390
|
+
|
2391
|
+
options = {
|
2392
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
2393
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
2394
|
+
headers: request_headers.merge(custom_headers || {}),
|
2395
|
+
base_url: request_url
|
2396
|
+
}
|
2397
|
+
promise = @client.make_request_async(:post, path_template, options)
|
2398
|
+
|
2399
|
+
promise = promise.then do |result|
|
2400
|
+
http_response = result.response
|
2401
|
+
status_code = http_response.status
|
2402
|
+
response_content = http_response.body
|
2403
|
+
unless status_code == 200
|
2404
|
+
error_model = JSON.load(response_content)
|
2405
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
2406
|
+
end
|
2407
|
+
|
2408
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
2409
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
2410
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
2411
|
+
# Deserialize Response
|
2412
|
+
if status_code == 200
|
2413
|
+
begin
|
2414
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
2415
|
+
result_mapper = Azure::PolicyInsights::Mgmt::V2018_07_01_preview::Models::PolicyStatesQueryResults.mapper()
|
2416
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
2417
|
+
rescue Exception => e
|
2418
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
2419
|
+
end
|
2420
|
+
end
|
2421
|
+
|
2422
|
+
result
|
2423
|
+
end
|
2424
|
+
|
2425
|
+
promise.execute
|
2426
|
+
end
|
2427
|
+
|
2428
|
+
#
|
2429
|
+
# Queries policy states for the resource.
|
2430
|
+
#
|
2431
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
2432
|
+
# to List operation.
|
2433
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
2434
|
+
# will be added to the HTTP request.
|
2435
|
+
#
|
2436
|
+
# @return [PolicyStatesQueryResults] operation results.
|
2437
|
+
#
|
2438
|
+
def list_query_results_for_resource_next(next_page_link, custom_headers:nil)
|
2439
|
+
response = list_query_results_for_resource_next_async(next_page_link, custom_headers:custom_headers).value!
|
2440
|
+
response.body unless response.nil?
|
2441
|
+
end
|
2442
|
+
|
2443
|
+
#
|
2444
|
+
# Queries policy states for the resource.
|
2445
|
+
#
|
2446
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
2447
|
+
# to List operation.
|
2448
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
2449
|
+
# will be added to the HTTP request.
|
2450
|
+
#
|
2451
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
2452
|
+
#
|
2453
|
+
def list_query_results_for_resource_next_with_http_info(next_page_link, custom_headers:nil)
|
2454
|
+
list_query_results_for_resource_next_async(next_page_link, custom_headers:custom_headers).value!
|
2455
|
+
end
|
2456
|
+
|
2457
|
+
#
|
2458
|
+
# Queries policy states for the resource.
|
2459
|
+
#
|
2460
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
2461
|
+
# to List operation.
|
2462
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
2463
|
+
# to the HTTP request.
|
2464
|
+
#
|
2465
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
2466
|
+
#
|
2467
|
+
def list_query_results_for_resource_next_async(next_page_link, custom_headers:nil)
|
2468
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
2469
|
+
|
2470
|
+
|
2471
|
+
request_headers = {}
|
2472
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
2473
|
+
|
2474
|
+
# Set Headers
|
2475
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
2476
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
2477
|
+
path_template = '{nextLink}'
|
2478
|
+
|
2479
|
+
request_url = @base_url || @client.base_url
|
2480
|
+
|
2481
|
+
options = {
|
2482
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
2483
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
2484
|
+
headers: request_headers.merge(custom_headers || {}),
|
2485
|
+
base_url: request_url
|
2486
|
+
}
|
2487
|
+
promise = @client.make_request_async(:post, path_template, options)
|
2488
|
+
|
2489
|
+
promise = promise.then do |result|
|
2490
|
+
http_response = result.response
|
2491
|
+
status_code = http_response.status
|
2492
|
+
response_content = http_response.body
|
2493
|
+
unless status_code == 200
|
2494
|
+
error_model = JSON.load(response_content)
|
2495
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
2496
|
+
end
|
2497
|
+
|
2498
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
2499
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
2500
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
2501
|
+
# Deserialize Response
|
2502
|
+
if status_code == 200
|
2503
|
+
begin
|
2504
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
2505
|
+
result_mapper = Azure::PolicyInsights::Mgmt::V2018_07_01_preview::Models::PolicyStatesQueryResults.mapper()
|
2506
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
2507
|
+
rescue Exception => e
|
2508
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
2509
|
+
end
|
2510
|
+
end
|
2511
|
+
|
2512
|
+
result
|
2513
|
+
end
|
2514
|
+
|
2515
|
+
promise.execute
|
2516
|
+
end
|
2517
|
+
|
2518
|
+
#
|
2519
|
+
# Queries policy states for the subscription level policy set definition.
|
2520
|
+
#
|
2521
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
2522
|
+
# to List operation.
|
2523
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
2524
|
+
# will be added to the HTTP request.
|
2525
|
+
#
|
2526
|
+
# @return [PolicyStatesQueryResults] operation results.
|
2527
|
+
#
|
2528
|
+
def list_query_results_for_policy_set_definition_next(next_page_link, custom_headers:nil)
|
2529
|
+
response = list_query_results_for_policy_set_definition_next_async(next_page_link, custom_headers:custom_headers).value!
|
2530
|
+
response.body unless response.nil?
|
2531
|
+
end
|
2532
|
+
|
2533
|
+
#
|
2534
|
+
# Queries policy states for the subscription level policy set definition.
|
2535
|
+
#
|
2536
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
2537
|
+
# to List operation.
|
2538
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
2539
|
+
# will be added to the HTTP request.
|
2540
|
+
#
|
2541
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
2542
|
+
#
|
2543
|
+
def list_query_results_for_policy_set_definition_next_with_http_info(next_page_link, custom_headers:nil)
|
2544
|
+
list_query_results_for_policy_set_definition_next_async(next_page_link, custom_headers:custom_headers).value!
|
2545
|
+
end
|
2546
|
+
|
2547
|
+
#
|
2548
|
+
# Queries policy states for the subscription level policy set definition.
|
2549
|
+
#
|
2550
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
2551
|
+
# to List operation.
|
2552
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
2553
|
+
# to the HTTP request.
|
2554
|
+
#
|
2555
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
2556
|
+
#
|
2557
|
+
def list_query_results_for_policy_set_definition_next_async(next_page_link, custom_headers:nil)
|
2558
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
2559
|
+
|
2560
|
+
|
2561
|
+
request_headers = {}
|
2562
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
2563
|
+
|
2564
|
+
# Set Headers
|
2565
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
2566
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
2567
|
+
path_template = '{nextLink}'
|
2568
|
+
|
2569
|
+
request_url = @base_url || @client.base_url
|
2570
|
+
|
2571
|
+
options = {
|
2572
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
2573
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
2574
|
+
headers: request_headers.merge(custom_headers || {}),
|
2575
|
+
base_url: request_url
|
2576
|
+
}
|
2577
|
+
promise = @client.make_request_async(:post, path_template, options)
|
2578
|
+
|
2579
|
+
promise = promise.then do |result|
|
2580
|
+
http_response = result.response
|
2581
|
+
status_code = http_response.status
|
2582
|
+
response_content = http_response.body
|
2583
|
+
unless status_code == 200
|
2584
|
+
error_model = JSON.load(response_content)
|
2585
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
2586
|
+
end
|
2587
|
+
|
2588
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
2589
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
2590
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
2591
|
+
# Deserialize Response
|
2592
|
+
if status_code == 200
|
2593
|
+
begin
|
2594
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
2595
|
+
result_mapper = Azure::PolicyInsights::Mgmt::V2018_07_01_preview::Models::PolicyStatesQueryResults.mapper()
|
2596
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
2597
|
+
rescue Exception => e
|
2598
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
2599
|
+
end
|
2600
|
+
end
|
2601
|
+
|
2602
|
+
result
|
2603
|
+
end
|
2604
|
+
|
2605
|
+
promise.execute
|
2606
|
+
end
|
2607
|
+
|
2608
|
+
#
|
2609
|
+
# Queries policy states for the subscription level policy definition.
|
2610
|
+
#
|
2611
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
2612
|
+
# to List operation.
|
2613
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
2614
|
+
# will be added to the HTTP request.
|
2615
|
+
#
|
2616
|
+
# @return [PolicyStatesQueryResults] operation results.
|
2617
|
+
#
|
2618
|
+
def list_query_results_for_policy_definition_next(next_page_link, custom_headers:nil)
|
2619
|
+
response = list_query_results_for_policy_definition_next_async(next_page_link, custom_headers:custom_headers).value!
|
2620
|
+
response.body unless response.nil?
|
2621
|
+
end
|
2622
|
+
|
2623
|
+
#
|
2624
|
+
# Queries policy states for the subscription level policy definition.
|
2625
|
+
#
|
2626
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
2627
|
+
# to List operation.
|
2628
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
2629
|
+
# will be added to the HTTP request.
|
2630
|
+
#
|
2631
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
2632
|
+
#
|
2633
|
+
def list_query_results_for_policy_definition_next_with_http_info(next_page_link, custom_headers:nil)
|
2634
|
+
list_query_results_for_policy_definition_next_async(next_page_link, custom_headers:custom_headers).value!
|
2635
|
+
end
|
2636
|
+
|
2637
|
+
#
|
2638
|
+
# Queries policy states for the subscription level policy definition.
|
2639
|
+
#
|
2640
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
2641
|
+
# to List operation.
|
2642
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
2643
|
+
# to the HTTP request.
|
2644
|
+
#
|
2645
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
2646
|
+
#
|
2647
|
+
def list_query_results_for_policy_definition_next_async(next_page_link, custom_headers:nil)
|
2648
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
2649
|
+
|
2650
|
+
|
2651
|
+
request_headers = {}
|
2652
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
2653
|
+
|
2654
|
+
# Set Headers
|
2655
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
2656
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
2657
|
+
path_template = '{nextLink}'
|
2658
|
+
|
2659
|
+
request_url = @base_url || @client.base_url
|
2660
|
+
|
2661
|
+
options = {
|
2662
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
2663
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
2664
|
+
headers: request_headers.merge(custom_headers || {}),
|
2665
|
+
base_url: request_url
|
2666
|
+
}
|
2667
|
+
promise = @client.make_request_async(:post, path_template, options)
|
2668
|
+
|
2669
|
+
promise = promise.then do |result|
|
2670
|
+
http_response = result.response
|
2671
|
+
status_code = http_response.status
|
2672
|
+
response_content = http_response.body
|
2673
|
+
unless status_code == 200
|
2674
|
+
error_model = JSON.load(response_content)
|
2675
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
2676
|
+
end
|
2677
|
+
|
2678
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
2679
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
2680
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
2681
|
+
# Deserialize Response
|
2682
|
+
if status_code == 200
|
2683
|
+
begin
|
2684
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
2685
|
+
result_mapper = Azure::PolicyInsights::Mgmt::V2018_07_01_preview::Models::PolicyStatesQueryResults.mapper()
|
2686
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
2687
|
+
rescue Exception => e
|
2688
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
2689
|
+
end
|
2690
|
+
end
|
2691
|
+
|
2692
|
+
result
|
2693
|
+
end
|
2694
|
+
|
2695
|
+
promise.execute
|
2696
|
+
end
|
2697
|
+
|
2698
|
+
#
|
2699
|
+
# Queries policy states for the subscription level policy assignment.
|
2700
|
+
#
|
2701
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
2702
|
+
# to List operation.
|
2703
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
2704
|
+
# will be added to the HTTP request.
|
2705
|
+
#
|
2706
|
+
# @return [PolicyStatesQueryResults] operation results.
|
2707
|
+
#
|
2708
|
+
def list_query_results_for_subscription_level_policy_assignment_next(next_page_link, custom_headers:nil)
|
2709
|
+
response = list_query_results_for_subscription_level_policy_assignment_next_async(next_page_link, custom_headers:custom_headers).value!
|
2710
|
+
response.body unless response.nil?
|
2711
|
+
end
|
2712
|
+
|
2713
|
+
#
|
2714
|
+
# Queries policy states for the subscription level policy assignment.
|
2715
|
+
#
|
2716
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
2717
|
+
# to List operation.
|
2718
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
2719
|
+
# will be added to the HTTP request.
|
2720
|
+
#
|
2721
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
2722
|
+
#
|
2723
|
+
def list_query_results_for_subscription_level_policy_assignment_next_with_http_info(next_page_link, custom_headers:nil)
|
2724
|
+
list_query_results_for_subscription_level_policy_assignment_next_async(next_page_link, custom_headers:custom_headers).value!
|
2725
|
+
end
|
2726
|
+
|
2727
|
+
#
|
2728
|
+
# Queries policy states for the subscription level policy assignment.
|
2729
|
+
#
|
2730
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
2731
|
+
# to List operation.
|
2732
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
2733
|
+
# to the HTTP request.
|
2734
|
+
#
|
2735
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
2736
|
+
#
|
2737
|
+
def list_query_results_for_subscription_level_policy_assignment_next_async(next_page_link, custom_headers:nil)
|
2738
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
2739
|
+
|
2740
|
+
|
2741
|
+
request_headers = {}
|
2742
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
2743
|
+
|
2744
|
+
# Set Headers
|
2745
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
2746
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
2747
|
+
path_template = '{nextLink}'
|
2748
|
+
|
2749
|
+
request_url = @base_url || @client.base_url
|
2750
|
+
|
2751
|
+
options = {
|
2752
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
2753
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
2754
|
+
headers: request_headers.merge(custom_headers || {}),
|
2755
|
+
base_url: request_url
|
2756
|
+
}
|
2757
|
+
promise = @client.make_request_async(:post, path_template, options)
|
2758
|
+
|
2759
|
+
promise = promise.then do |result|
|
2760
|
+
http_response = result.response
|
2761
|
+
status_code = http_response.status
|
2762
|
+
response_content = http_response.body
|
2763
|
+
unless status_code == 200
|
2764
|
+
error_model = JSON.load(response_content)
|
2765
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
2766
|
+
end
|
2767
|
+
|
2768
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
2769
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
2770
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
2771
|
+
# Deserialize Response
|
2772
|
+
if status_code == 200
|
2773
|
+
begin
|
2774
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
2775
|
+
result_mapper = Azure::PolicyInsights::Mgmt::V2018_07_01_preview::Models::PolicyStatesQueryResults.mapper()
|
2776
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
2777
|
+
rescue Exception => e
|
2778
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
2779
|
+
end
|
2780
|
+
end
|
2781
|
+
|
2782
|
+
result
|
2783
|
+
end
|
2784
|
+
|
2785
|
+
promise.execute
|
2786
|
+
end
|
2787
|
+
|
2788
|
+
#
|
2789
|
+
# Queries policy states for the resource group level policy assignment.
|
2790
|
+
#
|
2791
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
2792
|
+
# to List operation.
|
2793
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
2794
|
+
# will be added to the HTTP request.
|
2795
|
+
#
|
2796
|
+
# @return [PolicyStatesQueryResults] operation results.
|
2797
|
+
#
|
2798
|
+
def list_query_results_for_resource_group_level_policy_assignment_next(next_page_link, custom_headers:nil)
|
2799
|
+
response = list_query_results_for_resource_group_level_policy_assignment_next_async(next_page_link, custom_headers:custom_headers).value!
|
2800
|
+
response.body unless response.nil?
|
2801
|
+
end
|
2802
|
+
|
2803
|
+
#
|
2804
|
+
# Queries policy states for the resource group level policy assignment.
|
2805
|
+
#
|
2806
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
2807
|
+
# to List operation.
|
2808
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
2809
|
+
# will be added to the HTTP request.
|
2810
|
+
#
|
2811
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
2812
|
+
#
|
2813
|
+
def list_query_results_for_resource_group_level_policy_assignment_next_with_http_info(next_page_link, custom_headers:nil)
|
2814
|
+
list_query_results_for_resource_group_level_policy_assignment_next_async(next_page_link, custom_headers:custom_headers).value!
|
2815
|
+
end
|
2816
|
+
|
2817
|
+
#
|
2818
|
+
# Queries policy states for the resource group level policy assignment.
|
2819
|
+
#
|
2820
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
2821
|
+
# to List operation.
|
2822
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
2823
|
+
# to the HTTP request.
|
2824
|
+
#
|
2825
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
2826
|
+
#
|
2827
|
+
def list_query_results_for_resource_group_level_policy_assignment_next_async(next_page_link, custom_headers:nil)
|
2828
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
2829
|
+
|
2830
|
+
|
2831
|
+
request_headers = {}
|
2832
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
2833
|
+
|
2834
|
+
# Set Headers
|
2835
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
2836
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
2837
|
+
path_template = '{nextLink}'
|
2838
|
+
|
2839
|
+
request_url = @base_url || @client.base_url
|
2840
|
+
|
2841
|
+
options = {
|
2842
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
2843
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
2844
|
+
headers: request_headers.merge(custom_headers || {}),
|
2845
|
+
base_url: request_url
|
2846
|
+
}
|
2847
|
+
promise = @client.make_request_async(:post, path_template, options)
|
2848
|
+
|
2849
|
+
promise = promise.then do |result|
|
2850
|
+
http_response = result.response
|
2851
|
+
status_code = http_response.status
|
2852
|
+
response_content = http_response.body
|
2853
|
+
unless status_code == 200
|
2854
|
+
error_model = JSON.load(response_content)
|
2855
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
2856
|
+
end
|
2857
|
+
|
2858
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
2859
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
2860
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
2861
|
+
# Deserialize Response
|
2862
|
+
if status_code == 200
|
2863
|
+
begin
|
2864
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
2865
|
+
result_mapper = Azure::PolicyInsights::Mgmt::V2018_07_01_preview::Models::PolicyStatesQueryResults.mapper()
|
2866
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
2867
|
+
rescue Exception => e
|
2868
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
2869
|
+
end
|
2870
|
+
end
|
2871
|
+
|
2872
|
+
result
|
2873
|
+
end
|
2874
|
+
|
2875
|
+
promise.execute
|
2876
|
+
end
|
2877
|
+
|
2878
|
+
#
|
2879
|
+
# Queries policy states for the resources under the management group.
|
2880
|
+
#
|
2881
|
+
# @param policy_states_resource [PolicyStatesResource] The virtual resource
|
2882
|
+
# under PolicyStates resource type. In a given time range, 'latest' represents
|
2883
|
+
# the latest policy state(s), whereas 'default' represents all policy state(s).
|
2884
|
+
# Possible values include: 'default', 'latest'
|
2885
|
+
# @param management_group_name [String] Management group name.
|
2886
|
+
# @param query_options [QueryOptions] Additional parameters for the operation
|
2887
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
2888
|
+
# will be added to the HTTP request.
|
2889
|
+
#
|
2890
|
+
# @return [PolicyStatesQueryResults] which provide lazy access to pages of the
|
2891
|
+
# response.
|
2892
|
+
#
|
2893
|
+
def list_query_results_for_management_group_as_lazy(policy_states_resource, management_group_name, query_options:nil, custom_headers:nil)
|
2894
|
+
response = list_query_results_for_management_group_async(policy_states_resource, management_group_name, query_options:query_options, custom_headers:custom_headers).value!
|
2895
|
+
unless response.nil?
|
2896
|
+
page = response.body
|
2897
|
+
page.next_method = Proc.new do |next_page_link|
|
2898
|
+
list_query_results_for_management_group_next_async(next_page_link, custom_headers:custom_headers)
|
2899
|
+
end
|
2900
|
+
page
|
2901
|
+
end
|
2902
|
+
end
|
2903
|
+
|
2904
|
+
#
|
2905
|
+
# Queries policy states for the resources under the subscription.
|
2906
|
+
#
|
2907
|
+
# @param policy_states_resource [PolicyStatesResource] The virtual resource
|
2908
|
+
# under PolicyStates resource type. In a given time range, 'latest' represents
|
2909
|
+
# the latest policy state(s), whereas 'default' represents all policy state(s).
|
2910
|
+
# Possible values include: 'default', 'latest'
|
2911
|
+
# @param subscription_id [String] Microsoft Azure subscription ID.
|
2912
|
+
# @param query_options [QueryOptions] Additional parameters for the operation
|
2913
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
2914
|
+
# will be added to the HTTP request.
|
2915
|
+
#
|
2916
|
+
# @return [PolicyStatesQueryResults] which provide lazy access to pages of the
|
2917
|
+
# response.
|
2918
|
+
#
|
2919
|
+
def list_query_results_for_subscription_as_lazy(policy_states_resource, subscription_id, query_options:nil, custom_headers:nil)
|
2920
|
+
response = list_query_results_for_subscription_async(policy_states_resource, subscription_id, query_options:query_options, custom_headers:custom_headers).value!
|
2921
|
+
unless response.nil?
|
2922
|
+
page = response.body
|
2923
|
+
page.next_method = Proc.new do |next_page_link|
|
2924
|
+
list_query_results_for_subscription_next_async(next_page_link, custom_headers:custom_headers)
|
2925
|
+
end
|
2926
|
+
page
|
2927
|
+
end
|
2928
|
+
end
|
2929
|
+
|
2930
|
+
#
|
2931
|
+
# Queries policy states for the resources under the resource group.
|
2932
|
+
#
|
2933
|
+
# @param policy_states_resource [PolicyStatesResource] The virtual resource
|
2934
|
+
# under PolicyStates resource type. In a given time range, 'latest' represents
|
2935
|
+
# the latest policy state(s), whereas 'default' represents all policy state(s).
|
2936
|
+
# Possible values include: 'default', 'latest'
|
2937
|
+
# @param subscription_id [String] Microsoft Azure subscription ID.
|
2938
|
+
# @param resource_group_name [String] Resource group name.
|
2939
|
+
# @param query_options [QueryOptions] Additional parameters for the operation
|
2940
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
2941
|
+
# will be added to the HTTP request.
|
2942
|
+
#
|
2943
|
+
# @return [PolicyStatesQueryResults] which provide lazy access to pages of the
|
2944
|
+
# response.
|
2945
|
+
#
|
2946
|
+
def list_query_results_for_resource_group_as_lazy(policy_states_resource, subscription_id, resource_group_name, query_options:nil, custom_headers:nil)
|
2947
|
+
response = list_query_results_for_resource_group_async(policy_states_resource, subscription_id, resource_group_name, query_options:query_options, custom_headers:custom_headers).value!
|
2948
|
+
unless response.nil?
|
2949
|
+
page = response.body
|
2950
|
+
page.next_method = Proc.new do |next_page_link|
|
2951
|
+
list_query_results_for_resource_group_next_async(next_page_link, custom_headers:custom_headers)
|
2952
|
+
end
|
2953
|
+
page
|
2954
|
+
end
|
2955
|
+
end
|
2956
|
+
|
2957
|
+
#
|
2958
|
+
# Queries policy states for the resource.
|
2959
|
+
#
|
2960
|
+
# @param policy_states_resource [PolicyStatesResource] The virtual resource
|
2961
|
+
# under PolicyStates resource type. In a given time range, 'latest' represents
|
2962
|
+
# the latest policy state(s), whereas 'default' represents all policy state(s).
|
2963
|
+
# Possible values include: 'default', 'latest'
|
2964
|
+
# @param resource_id [String] Resource ID.
|
2965
|
+
# @param query_options [QueryOptions] Additional parameters for the operation
|
2966
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
2967
|
+
# will be added to the HTTP request.
|
2968
|
+
#
|
2969
|
+
# @return [PolicyStatesQueryResults] which provide lazy access to pages of the
|
2970
|
+
# response.
|
2971
|
+
#
|
2972
|
+
def list_query_results_for_resource_as_lazy(policy_states_resource, resource_id, query_options:nil, custom_headers:nil)
|
2973
|
+
response = list_query_results_for_resource_async(policy_states_resource, resource_id, query_options:query_options, custom_headers:custom_headers).value!
|
2974
|
+
unless response.nil?
|
2975
|
+
page = response.body
|
2976
|
+
page.next_method = Proc.new do |next_page_link|
|
2977
|
+
list_query_results_for_resource_next_async(next_page_link, custom_headers:custom_headers)
|
2978
|
+
end
|
2979
|
+
page
|
2980
|
+
end
|
2981
|
+
end
|
2982
|
+
|
2983
|
+
#
|
2984
|
+
# Queries policy states for the subscription level policy set definition.
|
2985
|
+
#
|
2986
|
+
# @param policy_states_resource [PolicyStatesResource] The virtual resource
|
2987
|
+
# under PolicyStates resource type. In a given time range, 'latest' represents
|
2988
|
+
# the latest policy state(s), whereas 'default' represents all policy state(s).
|
2989
|
+
# Possible values include: 'default', 'latest'
|
2990
|
+
# @param subscription_id [String] Microsoft Azure subscription ID.
|
2991
|
+
# @param policy_set_definition_name [String] Policy set definition name.
|
2992
|
+
# @param query_options [QueryOptions] Additional parameters for the operation
|
2993
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
2994
|
+
# will be added to the HTTP request.
|
2995
|
+
#
|
2996
|
+
# @return [PolicyStatesQueryResults] which provide lazy access to pages of the
|
2997
|
+
# response.
|
2998
|
+
#
|
2999
|
+
def list_query_results_for_policy_set_definition_as_lazy(policy_states_resource, subscription_id, policy_set_definition_name, query_options:nil, custom_headers:nil)
|
3000
|
+
response = list_query_results_for_policy_set_definition_async(policy_states_resource, subscription_id, policy_set_definition_name, query_options:query_options, custom_headers:custom_headers).value!
|
3001
|
+
unless response.nil?
|
3002
|
+
page = response.body
|
3003
|
+
page.next_method = Proc.new do |next_page_link|
|
3004
|
+
list_query_results_for_policy_set_definition_next_async(next_page_link, custom_headers:custom_headers)
|
3005
|
+
end
|
3006
|
+
page
|
3007
|
+
end
|
3008
|
+
end
|
3009
|
+
|
3010
|
+
#
|
3011
|
+
# Queries policy states for the subscription level policy definition.
|
3012
|
+
#
|
3013
|
+
# @param policy_states_resource [PolicyStatesResource] The virtual resource
|
3014
|
+
# under PolicyStates resource type. In a given time range, 'latest' represents
|
3015
|
+
# the latest policy state(s), whereas 'default' represents all policy state(s).
|
3016
|
+
# Possible values include: 'default', 'latest'
|
3017
|
+
# @param subscription_id [String] Microsoft Azure subscription ID.
|
3018
|
+
# @param policy_definition_name [String] Policy definition name.
|
3019
|
+
# @param query_options [QueryOptions] Additional parameters for the operation
|
3020
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
3021
|
+
# will be added to the HTTP request.
|
3022
|
+
#
|
3023
|
+
# @return [PolicyStatesQueryResults] which provide lazy access to pages of the
|
3024
|
+
# response.
|
3025
|
+
#
|
3026
|
+
def list_query_results_for_policy_definition_as_lazy(policy_states_resource, subscription_id, policy_definition_name, query_options:nil, custom_headers:nil)
|
3027
|
+
response = list_query_results_for_policy_definition_async(policy_states_resource, subscription_id, policy_definition_name, query_options:query_options, custom_headers:custom_headers).value!
|
3028
|
+
unless response.nil?
|
3029
|
+
page = response.body
|
3030
|
+
page.next_method = Proc.new do |next_page_link|
|
3031
|
+
list_query_results_for_policy_definition_next_async(next_page_link, custom_headers:custom_headers)
|
3032
|
+
end
|
3033
|
+
page
|
3034
|
+
end
|
3035
|
+
end
|
3036
|
+
|
3037
|
+
#
|
3038
|
+
# Queries policy states for the subscription level policy assignment.
|
3039
|
+
#
|
3040
|
+
# @param policy_states_resource [PolicyStatesResource] The virtual resource
|
3041
|
+
# under PolicyStates resource type. In a given time range, 'latest' represents
|
3042
|
+
# the latest policy state(s), whereas 'default' represents all policy state(s).
|
3043
|
+
# Possible values include: 'default', 'latest'
|
3044
|
+
# @param subscription_id [String] Microsoft Azure subscription ID.
|
3045
|
+
# @param policy_assignment_name [String] Policy assignment name.
|
3046
|
+
# @param query_options [QueryOptions] Additional parameters for the operation
|
3047
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
3048
|
+
# will be added to the HTTP request.
|
3049
|
+
#
|
3050
|
+
# @return [PolicyStatesQueryResults] which provide lazy access to pages of the
|
3051
|
+
# response.
|
3052
|
+
#
|
3053
|
+
def list_query_results_for_subscription_level_policy_assignment_as_lazy(policy_states_resource, subscription_id, policy_assignment_name, query_options:nil, custom_headers:nil)
|
3054
|
+
response = list_query_results_for_subscription_level_policy_assignment_async(policy_states_resource, subscription_id, policy_assignment_name, query_options:query_options, custom_headers:custom_headers).value!
|
3055
|
+
unless response.nil?
|
3056
|
+
page = response.body
|
3057
|
+
page.next_method = Proc.new do |next_page_link|
|
3058
|
+
list_query_results_for_subscription_level_policy_assignment_next_async(next_page_link, custom_headers:custom_headers)
|
3059
|
+
end
|
3060
|
+
page
|
3061
|
+
end
|
3062
|
+
end
|
3063
|
+
|
3064
|
+
#
|
3065
|
+
# Queries policy states for the resource group level policy assignment.
|
3066
|
+
#
|
3067
|
+
# @param policy_states_resource [PolicyStatesResource] The virtual resource
|
3068
|
+
# under PolicyStates resource type. In a given time range, 'latest' represents
|
3069
|
+
# the latest policy state(s), whereas 'default' represents all policy state(s).
|
3070
|
+
# Possible values include: 'default', 'latest'
|
3071
|
+
# @param subscription_id [String] Microsoft Azure subscription ID.
|
3072
|
+
# @param resource_group_name [String] Resource group name.
|
3073
|
+
# @param policy_assignment_name [String] Policy assignment name.
|
3074
|
+
# @param query_options [QueryOptions] Additional parameters for the operation
|
3075
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
3076
|
+
# will be added to the HTTP request.
|
3077
|
+
#
|
3078
|
+
# @return [PolicyStatesQueryResults] which provide lazy access to pages of the
|
3079
|
+
# response.
|
3080
|
+
#
|
3081
|
+
def list_query_results_for_resource_group_level_policy_assignment_as_lazy(policy_states_resource, subscription_id, resource_group_name, policy_assignment_name, query_options:nil, custom_headers:nil)
|
3082
|
+
response = list_query_results_for_resource_group_level_policy_assignment_async(policy_states_resource, subscription_id, resource_group_name, policy_assignment_name, query_options:query_options, custom_headers:custom_headers).value!
|
3083
|
+
unless response.nil?
|
3084
|
+
page = response.body
|
3085
|
+
page.next_method = Proc.new do |next_page_link|
|
3086
|
+
list_query_results_for_resource_group_level_policy_assignment_next_async(next_page_link, custom_headers:custom_headers)
|
3087
|
+
end
|
3088
|
+
page
|
3089
|
+
end
|
3090
|
+
end
|
3091
|
+
|
2092
3092
|
end
|
2093
3093
|
end
|