azure_mgmt_resources 0.18.0 → 0.18.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2016-02-01/generated/azure_mgmt_resources/resource_management_client.rb +1 -1
  3. data/lib/2016-06-01/generated/azure_mgmt_resources/subscription_client.rb +1 -1
  4. data/lib/2016-07-01/generated/azure_mgmt_resources/resource_management_client.rb +1 -1
  5. data/lib/2016-09-01/generated/azure_mgmt_resources/resource_management_client.rb +1 -1
  6. data/lib/2017-05-10/generated/azure_mgmt_resources/resource_management_client.rb +1 -1
  7. data/lib/2018-02-01/generated/azure_mgmt_resources/resource_management_client.rb +1 -1
  8. data/lib/2018-05-01/generated/azure_mgmt_resources/resource_management_client.rb +1 -1
  9. data/lib/2018-06-01/generated/azure_mgmt_resources/application_client.rb +1 -1
  10. data/lib/2019-03-01/generated/azure_mgmt_resources/resource_management_client.rb +1 -1
  11. data/lib/2019-05-01/generated/azure_mgmt_resources/resource_management_client.rb +1 -1
  12. data/lib/2019-05-10/generated/azure_mgmt_resources/resource_management_client.rb +1 -1
  13. data/lib/2019-07-01/generated/azure_mgmt_resources/resource_management_client.rb +1 -1
  14. data/lib/2019-10-01/generated/azure_mgmt_resources.rb +111 -0
  15. data/lib/2019-10-01/generated/azure_mgmt_resources/deployment_operations.rb +1590 -0
  16. data/lib/2019-10-01/generated/azure_mgmt_resources/deployments.rb +6276 -0
  17. data/lib/2019-10-01/generated/azure_mgmt_resources/models/alias_model.rb +102 -0
  18. data/lib/2019-10-01/generated/azure_mgmt_resources/models/alias_path.rb +77 -0
  19. data/lib/2019-10-01/generated/azure_mgmt_resources/models/alias_pattern.rb +70 -0
  20. data/lib/2019-10-01/generated/azure_mgmt_resources/models/alias_pattern_type.rb +16 -0
  21. data/lib/2019-10-01/generated/azure_mgmt_resources/models/alias_type.rb +17 -0
  22. data/lib/2019-10-01/generated/azure_mgmt_resources/models/basic_dependency.rb +68 -0
  23. data/lib/2019-10-01/generated/azure_mgmt_resources/models/change_type.rb +20 -0
  24. data/lib/2019-10-01/generated/azure_mgmt_resources/models/debug_setting.rb +53 -0
  25. data/lib/2019-10-01/generated/azure_mgmt_resources/models/dependency.rb +88 -0
  26. data/lib/2019-10-01/generated/azure_mgmt_resources/models/deployment.rb +77 -0
  27. data/lib/2019-10-01/generated/azure_mgmt_resources/models/deployment_export_result.rb +46 -0
  28. data/lib/2019-10-01/generated/azure_mgmt_resources/models/deployment_extended.rb +113 -0
  29. data/lib/2019-10-01/generated/azure_mgmt_resources/models/deployment_extended_filter.rb +46 -0
  30. data/lib/2019-10-01/generated/azure_mgmt_resources/models/deployment_list_result.rb +99 -0
  31. data/lib/2019-10-01/generated/azure_mgmt_resources/models/deployment_mode.rb +16 -0
  32. data/lib/2019-10-01/generated/azure_mgmt_resources/models/deployment_operation.rb +71 -0
  33. data/lib/2019-10-01/generated/azure_mgmt_resources/models/deployment_operation_properties.rb +162 -0
  34. data/lib/2019-10-01/generated/azure_mgmt_resources/models/deployment_operations_list_result.rb +99 -0
  35. data/lib/2019-10-01/generated/azure_mgmt_resources/models/deployment_properties.rb +136 -0
  36. data/lib/2019-10-01/generated/azure_mgmt_resources/models/deployment_properties_extended.rb +284 -0
  37. data/lib/2019-10-01/generated/azure_mgmt_resources/models/deployment_validate_result.rb +61 -0
  38. data/lib/2019-10-01/generated/azure_mgmt_resources/models/deployment_what_if.rb +58 -0
  39. data/lib/2019-10-01/generated/azure_mgmt_resources/models/deployment_what_if_properties.rb +108 -0
  40. data/lib/2019-10-01/generated/azure_mgmt_resources/models/deployment_what_if_settings.rb +48 -0
  41. data/lib/2019-10-01/generated/azure_mgmt_resources/models/error_additional_info.rb +59 -0
  42. data/lib/2019-10-01/generated/azure_mgmt_resources/models/error_response.rb +117 -0
  43. data/lib/2019-10-01/generated/azure_mgmt_resources/models/export_template_request.rb +69 -0
  44. data/lib/2019-10-01/generated/azure_mgmt_resources/models/generic_resource.rb +158 -0
  45. data/lib/2019-10-01/generated/azure_mgmt_resources/models/generic_resource_expanded.rb +179 -0
  46. data/lib/2019-10-01/generated/azure_mgmt_resources/models/generic_resource_filter.rb +68 -0
  47. data/lib/2019-10-01/generated/azure_mgmt_resources/models/http_message.rb +46 -0
  48. data/lib/2019-10-01/generated/azure_mgmt_resources/models/identity.rb +96 -0
  49. data/lib/2019-10-01/generated/azure_mgmt_resources/models/identity_user_assigned_identities_value.rb +60 -0
  50. data/lib/2019-10-01/generated/azure_mgmt_resources/models/on_error_deployment.rb +60 -0
  51. data/lib/2019-10-01/generated/azure_mgmt_resources/models/on_error_deployment_extended.rb +73 -0
  52. data/lib/2019-10-01/generated/azure_mgmt_resources/models/on_error_deployment_type.rb +16 -0
  53. data/lib/2019-10-01/generated/azure_mgmt_resources/models/operation.rb +58 -0
  54. data/lib/2019-10-01/generated/azure_mgmt_resources/models/operation_display.rb +80 -0
  55. data/lib/2019-10-01/generated/azure_mgmt_resources/models/operation_list_result.rb +100 -0
  56. data/lib/2019-10-01/generated/azure_mgmt_resources/models/parameters_link.rb +58 -0
  57. data/lib/2019-10-01/generated/azure_mgmt_resources/models/plan.rb +90 -0
  58. data/lib/2019-10-01/generated/azure_mgmt_resources/models/property_change_type.rb +18 -0
  59. data/lib/2019-10-01/generated/azure_mgmt_resources/models/provider.rb +104 -0
  60. data/lib/2019-10-01/generated/azure_mgmt_resources/models/provider_list_result.rb +99 -0
  61. data/lib/2019-10-01/generated/azure_mgmt_resources/models/provider_resource_type.rb +137 -0
  62. data/lib/2019-10-01/generated/azure_mgmt_resources/models/provisioning_operation.rb +24 -0
  63. data/lib/2019-10-01/generated/azure_mgmt_resources/models/resource.rb +110 -0
  64. data/lib/2019-10-01/generated/azure_mgmt_resources/models/resource_group.rb +128 -0
  65. data/lib/2019-10-01/generated/azure_mgmt_resources/models/resource_group_export_result.rb +58 -0
  66. data/lib/2019-10-01/generated/azure_mgmt_resources/models/resource_group_filter.rb +57 -0
  67. data/lib/2019-10-01/generated/azure_mgmt_resources/models/resource_group_list_result.rb +99 -0
  68. data/lib/2019-10-01/generated/azure_mgmt_resources/models/resource_group_patchable.rb +90 -0
  69. data/lib/2019-10-01/generated/azure_mgmt_resources/models/resource_group_properties.rb +47 -0
  70. data/lib/2019-10-01/generated/azure_mgmt_resources/models/resource_identity_type.rb +18 -0
  71. data/lib/2019-10-01/generated/azure_mgmt_resources/models/resource_list_result.rb +99 -0
  72. data/lib/2019-10-01/generated/azure_mgmt_resources/models/resource_provider_operation_display_properties.rb +91 -0
  73. data/lib/2019-10-01/generated/azure_mgmt_resources/models/resource_reference.rb +47 -0
  74. data/lib/2019-10-01/generated/azure_mgmt_resources/models/resources_move_info.rb +65 -0
  75. data/lib/2019-10-01/generated/azure_mgmt_resources/models/scoped_deployment.rb +77 -0
  76. data/lib/2019-10-01/generated/azure_mgmt_resources/models/scoped_deployment_what_if.rb +58 -0
  77. data/lib/2019-10-01/generated/azure_mgmt_resources/models/sku.rb +101 -0
  78. data/lib/2019-10-01/generated/azure_mgmt_resources/models/sub_resource.rb +46 -0
  79. data/lib/2019-10-01/generated/azure_mgmt_resources/models/tag_count.rb +57 -0
  80. data/lib/2019-10-01/generated/azure_mgmt_resources/models/tag_details.rb +92 -0
  81. data/lib/2019-10-01/generated/azure_mgmt_resources/models/tag_value.rb +70 -0
  82. data/lib/2019-10-01/generated/azure_mgmt_resources/models/tags.rb +54 -0
  83. data/lib/2019-10-01/generated/azure_mgmt_resources/models/tags_list_result.rb +99 -0
  84. data/lib/2019-10-01/generated/azure_mgmt_resources/models/tags_patch_operation.rb +17 -0
  85. data/lib/2019-10-01/generated/azure_mgmt_resources/models/tags_patch_resource.rb +59 -0
  86. data/lib/2019-10-01/generated/azure_mgmt_resources/models/tags_resource.rb +83 -0
  87. data/lib/2019-10-01/generated/azure_mgmt_resources/models/target_resource.rb +68 -0
  88. data/lib/2019-10-01/generated/azure_mgmt_resources/models/template_hash_result.rb +58 -0
  89. data/lib/2019-10-01/generated/azure_mgmt_resources/models/template_link.rb +58 -0
  90. data/lib/2019-10-01/generated/azure_mgmt_resources/models/what_if_change.rb +105 -0
  91. data/lib/2019-10-01/generated/azure_mgmt_resources/models/what_if_operation_result.rb +80 -0
  92. data/lib/2019-10-01/generated/azure_mgmt_resources/models/what_if_property_change.rb +101 -0
  93. data/lib/2019-10-01/generated/azure_mgmt_resources/models/what_if_result_format.rb +16 -0
  94. data/lib/2019-10-01/generated/azure_mgmt_resources/module_definition.rb +9 -0
  95. data/lib/2019-10-01/generated/azure_mgmt_resources/operations.rb +219 -0
  96. data/lib/2019-10-01/generated/azure_mgmt_resources/providers.rb +846 -0
  97. data/lib/2019-10-01/generated/azure_mgmt_resources/resource_groups.rb +964 -0
  98. data/lib/2019-10-01/generated/azure_mgmt_resources/resource_management_client.rb +155 -0
  99. data/lib/2019-10-01/generated/azure_mgmt_resources/resources.rb +2354 -0
  100. data/lib/2019-10-01/generated/azure_mgmt_resources/tags_operations.rb +1078 -0
  101. data/lib/2020-06-01/generated/azure_mgmt_resources/resource_management_client.rb +1 -1
  102. data/lib/azure_mgmt_resources.rb +10 -9
  103. data/lib/version.rb +1 -1
  104. metadata +90 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b501d85d3180727fde6bc14defd3fb6d37ff93a0e382b4b4aea71f46d3b692c0
4
- data.tar.gz: 0a444c23653285770e3ac0009c0f6b16808916b2408844372631d93620fee089
3
+ metadata.gz: af868279dd32587185634a2e5fa3aee89e0ac23e6642533de3f9c190247b46db
4
+ data.tar.gz: a400feac44156dcca7c40f6db09f1c3a5eae3133837d3d38cd120256292c8718
5
5
  SHA512:
6
- metadata.gz: a1bc0e374b925d0eb6e5a2d7a6d67757e79350e38701105283db5466116dd74db431dafa769011ef86549d83553ecb3f77553ddb642906f19758640c46b69cef
7
- data.tar.gz: abd08ab3aec26e00426c8e50a2f5f1e159bf6e2ff0ff2c440342077608f836451fe8a66b1693af42388239679001730623e235a5f81eacb92b03d26ada32bd8a
6
+ metadata.gz: 116049a1377e412188af51204d29d582aa4e40b65e682acf8f6995e1ad8fb15d427e9a77b241c7db99304d3cdb95ea309a12d9c6852660460cc44cccd8245478
7
+ data.tar.gz: c27debbf9b504a19612fefec954951221079903111c7be205b182c4a5059e13177cf6c5d7418b5b2aadd2176d3a4b1c27aee1871590b789d42ba9c4f59a894b4
@@ -144,7 +144,7 @@ module Azure::Resources::Mgmt::V2016_02_01
144
144
  #
145
145
  def add_telemetry
146
146
  sdk_information = 'azure_mgmt_resources'
147
- sdk_information = "#{sdk_information}/0.18.0"
147
+ sdk_information = "#{sdk_information}/0.18.1"
148
148
  add_user_agent_information(sdk_information)
149
149
  end
150
150
  end
@@ -129,7 +129,7 @@ module Azure::Resources::Mgmt::V2016_06_01
129
129
  #
130
130
  def add_telemetry
131
131
  sdk_information = 'azure_mgmt_resources'
132
- sdk_information = "#{sdk_information}/0.18.0"
132
+ sdk_information = "#{sdk_information}/0.18.1"
133
133
  add_user_agent_information(sdk_information)
134
134
  end
135
135
  end
@@ -146,7 +146,7 @@ module Azure::Resources::Mgmt::V2016_07_01
146
146
  #
147
147
  def add_telemetry
148
148
  sdk_information = 'azure_mgmt_resources'
149
- sdk_information = "#{sdk_information}/0.18.0"
149
+ sdk_information = "#{sdk_information}/0.18.1"
150
150
  add_user_agent_information(sdk_information)
151
151
  end
152
152
  end
@@ -144,7 +144,7 @@ module Azure::Resources::Mgmt::V2016_09_01
144
144
  #
145
145
  def add_telemetry
146
146
  sdk_information = 'azure_mgmt_resources'
147
- sdk_information = "#{sdk_information}/0.18.0"
147
+ sdk_information = "#{sdk_information}/0.18.1"
148
148
  add_user_agent_information(sdk_information)
149
149
  end
150
150
  end
@@ -144,7 +144,7 @@ module Azure::Resources::Mgmt::V2017_05_10
144
144
  #
145
145
  def add_telemetry
146
146
  sdk_information = 'azure_mgmt_resources'
147
- sdk_information = "#{sdk_information}/0.18.0"
147
+ sdk_information = "#{sdk_information}/0.18.1"
148
148
  add_user_agent_information(sdk_information)
149
149
  end
150
150
  end
@@ -144,7 +144,7 @@ module Azure::Resources::Mgmt::V2018_02_01
144
144
  #
145
145
  def add_telemetry
146
146
  sdk_information = 'azure_mgmt_resources'
147
- sdk_information = "#{sdk_information}/0.18.0"
147
+ sdk_information = "#{sdk_information}/0.18.1"
148
148
  add_user_agent_information(sdk_information)
149
149
  end
150
150
  end
@@ -148,7 +148,7 @@ module Azure::Resources::Mgmt::V2018_05_01
148
148
  #
149
149
  def add_telemetry
150
150
  sdk_information = 'azure_mgmt_resources'
151
- sdk_information = "#{sdk_information}/0.18.0"
151
+ sdk_information = "#{sdk_information}/0.18.1"
152
152
  add_user_agent_information(sdk_information)
153
153
  end
154
154
  end
@@ -128,7 +128,7 @@ module Azure::Resources::Mgmt::V2018_06_01
128
128
  #
129
129
  def add_telemetry
130
130
  sdk_information = 'azure_mgmt_resources'
131
- sdk_information = "#{sdk_information}/0.18.0"
131
+ sdk_information = "#{sdk_information}/0.18.1"
132
132
  add_user_agent_information(sdk_information)
133
133
  end
134
134
  end
@@ -148,7 +148,7 @@ module Azure::Resources::Mgmt::V2019_03_01
148
148
  #
149
149
  def add_telemetry
150
150
  sdk_information = 'azure_mgmt_resources'
151
- sdk_information = "#{sdk_information}/0.18.0"
151
+ sdk_information = "#{sdk_information}/0.18.1"
152
152
  add_user_agent_information(sdk_information)
153
153
  end
154
154
  end
@@ -148,7 +148,7 @@ module Azure::Resources::Mgmt::V2019_05_01
148
148
  #
149
149
  def add_telemetry
150
150
  sdk_information = 'azure_mgmt_resources'
151
- sdk_information = "#{sdk_information}/0.18.0"
151
+ sdk_information = "#{sdk_information}/0.18.1"
152
152
  add_user_agent_information(sdk_information)
153
153
  end
154
154
  end
@@ -148,7 +148,7 @@ module Azure::Resources::Mgmt::V2019_05_10
148
148
  #
149
149
  def add_telemetry
150
150
  sdk_information = 'azure_mgmt_resources'
151
- sdk_information = "#{sdk_information}/0.18.0"
151
+ sdk_information = "#{sdk_information}/0.18.1"
152
152
  add_user_agent_information(sdk_information)
153
153
  end
154
154
  end
@@ -148,7 +148,7 @@ module Azure::Resources::Mgmt::V2019_07_01
148
148
  #
149
149
  def add_telemetry
150
150
  sdk_information = 'azure_mgmt_resources'
151
- sdk_information = "#{sdk_information}/0.18.0"
151
+ sdk_information = "#{sdk_information}/0.18.1"
152
152
  add_user_agent_information(sdk_information)
153
153
  end
154
154
  end
@@ -0,0 +1,111 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ require 'uri'
7
+ require 'cgi'
8
+ require 'date'
9
+ require 'json'
10
+ require 'base64'
11
+ require 'erb'
12
+ require 'securerandom'
13
+ require 'time'
14
+ require 'timeliness'
15
+ require 'faraday'
16
+ require 'faraday-cookie_jar'
17
+ require 'concurrent'
18
+ require 'ms_rest'
19
+ require '2019-10-01/generated/azure_mgmt_resources/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::Resources::Mgmt::V2019_10_01
23
+ autoload :Operations, '2019-10-01/generated/azure_mgmt_resources/operations.rb'
24
+ autoload :Deployments, '2019-10-01/generated/azure_mgmt_resources/deployments.rb'
25
+ autoload :Providers, '2019-10-01/generated/azure_mgmt_resources/providers.rb'
26
+ autoload :Resources, '2019-10-01/generated/azure_mgmt_resources/resources.rb'
27
+ autoload :ResourceGroups, '2019-10-01/generated/azure_mgmt_resources/resource_groups.rb'
28
+ autoload :TagsOperations, '2019-10-01/generated/azure_mgmt_resources/tags_operations.rb'
29
+ autoload :DeploymentOperations, '2019-10-01/generated/azure_mgmt_resources/deployment_operations.rb'
30
+ autoload :ResourceManagementClient, '2019-10-01/generated/azure_mgmt_resources/resource_management_client.rb'
31
+
32
+ module Models
33
+ autoload :Sku, '2019-10-01/generated/azure_mgmt_resources/models/sku.rb'
34
+ autoload :IdentityUserAssignedIdentitiesValue, '2019-10-01/generated/azure_mgmt_resources/models/identity_user_assigned_identities_value.rb'
35
+ autoload :GenericResourceFilter, '2019-10-01/generated/azure_mgmt_resources/models/generic_resource_filter.rb'
36
+ autoload :Identity, '2019-10-01/generated/azure_mgmt_resources/models/identity.rb'
37
+ autoload :TemplateLink, '2019-10-01/generated/azure_mgmt_resources/models/template_link.rb'
38
+ autoload :ParametersLink, '2019-10-01/generated/azure_mgmt_resources/models/parameters_link.rb'
39
+ autoload :DebugSetting, '2019-10-01/generated/azure_mgmt_resources/models/debug_setting.rb'
40
+ autoload :TagsResource, '2019-10-01/generated/azure_mgmt_resources/models/tags_resource.rb'
41
+ autoload :DeploymentProperties, '2019-10-01/generated/azure_mgmt_resources/models/deployment_properties.rb'
42
+ autoload :TagsPatchResource, '2019-10-01/generated/azure_mgmt_resources/models/tags_patch_resource.rb'
43
+ autoload :ScopedDeployment, '2019-10-01/generated/azure_mgmt_resources/models/scoped_deployment.rb'
44
+ autoload :ResourceListResult, '2019-10-01/generated/azure_mgmt_resources/models/resource_list_result.rb'
45
+ autoload :DeploymentWhatIfSettings, '2019-10-01/generated/azure_mgmt_resources/models/deployment_what_if_settings.rb'
46
+ autoload :ResourceGroupProperties, '2019-10-01/generated/azure_mgmt_resources/models/resource_group_properties.rb'
47
+ autoload :DeploymentWhatIf, '2019-10-01/generated/azure_mgmt_resources/models/deployment_what_if.rb'
48
+ autoload :ResourceGroup, '2019-10-01/generated/azure_mgmt_resources/models/resource_group.rb'
49
+ autoload :ErrorAdditionalInfo, '2019-10-01/generated/azure_mgmt_resources/models/error_additional_info.rb'
50
+ autoload :ResourceGroupPatchable, '2019-10-01/generated/azure_mgmt_resources/models/resource_group_patchable.rb'
51
+ autoload :ResourceGroupListResult, '2019-10-01/generated/azure_mgmt_resources/models/resource_group_list_result.rb'
52
+ autoload :AliasPath, '2019-10-01/generated/azure_mgmt_resources/models/alias_path.rb'
53
+ autoload :ResourcesMoveInfo, '2019-10-01/generated/azure_mgmt_resources/models/resources_move_info.rb'
54
+ autoload :ProviderResourceType, '2019-10-01/generated/azure_mgmt_resources/models/provider_resource_type.rb'
55
+ autoload :ExportTemplateRequest, '2019-10-01/generated/azure_mgmt_resources/models/export_template_request.rb'
56
+ autoload :BasicDependency, '2019-10-01/generated/azure_mgmt_resources/models/basic_dependency.rb'
57
+ autoload :TagCount, '2019-10-01/generated/azure_mgmt_resources/models/tag_count.rb'
58
+ autoload :OnErrorDeploymentExtended, '2019-10-01/generated/azure_mgmt_resources/models/on_error_deployment_extended.rb'
59
+ autoload :TagValue, '2019-10-01/generated/azure_mgmt_resources/models/tag_value.rb'
60
+ autoload :DeploymentPropertiesExtended, '2019-10-01/generated/azure_mgmt_resources/models/deployment_properties_extended.rb'
61
+ autoload :TagDetails, '2019-10-01/generated/azure_mgmt_resources/models/tag_details.rb'
62
+ autoload :DeploymentExtended, '2019-10-01/generated/azure_mgmt_resources/models/deployment_extended.rb'
63
+ autoload :TagsListResult, '2019-10-01/generated/azure_mgmt_resources/models/tags_list_result.rb'
64
+ autoload :ProviderListResult, '2019-10-01/generated/azure_mgmt_resources/models/provider_list_result.rb'
65
+ autoload :TargetResource, '2019-10-01/generated/azure_mgmt_resources/models/target_resource.rb'
66
+ autoload :DeploymentExtendedFilter, '2019-10-01/generated/azure_mgmt_resources/models/deployment_extended_filter.rb'
67
+ autoload :HttpMessage, '2019-10-01/generated/azure_mgmt_resources/models/http_message.rb'
68
+ autoload :OnErrorDeployment, '2019-10-01/generated/azure_mgmt_resources/models/on_error_deployment.rb'
69
+ autoload :DeploymentOperationProperties, '2019-10-01/generated/azure_mgmt_resources/models/deployment_operation_properties.rb'
70
+ autoload :DeploymentExportResult, '2019-10-01/generated/azure_mgmt_resources/models/deployment_export_result.rb'
71
+ autoload :DeploymentOperation, '2019-10-01/generated/azure_mgmt_resources/models/deployment_operation.rb'
72
+ autoload :ScopedDeploymentWhatIf, '2019-10-01/generated/azure_mgmt_resources/models/scoped_deployment_what_if.rb'
73
+ autoload :DeploymentOperationsListResult, '2019-10-01/generated/azure_mgmt_resources/models/deployment_operations_list_result.rb'
74
+ autoload :AliasPattern, '2019-10-01/generated/azure_mgmt_resources/models/alias_pattern.rb'
75
+ autoload :ResourceProviderOperationDisplayProperties, '2019-10-01/generated/azure_mgmt_resources/models/resource_provider_operation_display_properties.rb'
76
+ autoload :Provider, '2019-10-01/generated/azure_mgmt_resources/models/provider.rb'
77
+ autoload :Resource, '2019-10-01/generated/azure_mgmt_resources/models/resource.rb'
78
+ autoload :ResourceReference, '2019-10-01/generated/azure_mgmt_resources/models/resource_reference.rb'
79
+ autoload :SubResource, '2019-10-01/generated/azure_mgmt_resources/models/sub_resource.rb'
80
+ autoload :DeploymentListResult, '2019-10-01/generated/azure_mgmt_resources/models/deployment_list_result.rb'
81
+ autoload :ResourceGroupExportResult, '2019-10-01/generated/azure_mgmt_resources/models/resource_group_export_result.rb'
82
+ autoload :ResourceGroupFilter, '2019-10-01/generated/azure_mgmt_resources/models/resource_group_filter.rb'
83
+ autoload :OperationDisplay, '2019-10-01/generated/azure_mgmt_resources/models/operation_display.rb'
84
+ autoload :Tags, '2019-10-01/generated/azure_mgmt_resources/models/tags.rb'
85
+ autoload :ErrorResponse, '2019-10-01/generated/azure_mgmt_resources/models/error_response.rb'
86
+ autoload :Operation, '2019-10-01/generated/azure_mgmt_resources/models/operation.rb'
87
+ autoload :Dependency, '2019-10-01/generated/azure_mgmt_resources/models/dependency.rb'
88
+ autoload :OperationListResult, '2019-10-01/generated/azure_mgmt_resources/models/operation_list_result.rb'
89
+ autoload :Plan, '2019-10-01/generated/azure_mgmt_resources/models/plan.rb'
90
+ autoload :TemplateHashResult, '2019-10-01/generated/azure_mgmt_resources/models/template_hash_result.rb'
91
+ autoload :AliasModel, '2019-10-01/generated/azure_mgmt_resources/models/alias_model.rb'
92
+ autoload :WhatIfPropertyChange, '2019-10-01/generated/azure_mgmt_resources/models/what_if_property_change.rb'
93
+ autoload :Deployment, '2019-10-01/generated/azure_mgmt_resources/models/deployment.rb'
94
+ autoload :WhatIfChange, '2019-10-01/generated/azure_mgmt_resources/models/what_if_change.rb'
95
+ autoload :DeploymentValidateResult, '2019-10-01/generated/azure_mgmt_resources/models/deployment_validate_result.rb'
96
+ autoload :WhatIfOperationResult, '2019-10-01/generated/azure_mgmt_resources/models/what_if_operation_result.rb'
97
+ autoload :DeploymentWhatIfProperties, '2019-10-01/generated/azure_mgmt_resources/models/deployment_what_if_properties.rb'
98
+ autoload :GenericResource, '2019-10-01/generated/azure_mgmt_resources/models/generic_resource.rb'
99
+ autoload :GenericResourceExpanded, '2019-10-01/generated/azure_mgmt_resources/models/generic_resource_expanded.rb'
100
+ autoload :DeploymentMode, '2019-10-01/generated/azure_mgmt_resources/models/deployment_mode.rb'
101
+ autoload :OnErrorDeploymentType, '2019-10-01/generated/azure_mgmt_resources/models/on_error_deployment_type.rb'
102
+ autoload :WhatIfResultFormat, '2019-10-01/generated/azure_mgmt_resources/models/what_if_result_format.rb'
103
+ autoload :AliasPatternType, '2019-10-01/generated/azure_mgmt_resources/models/alias_pattern_type.rb'
104
+ autoload :AliasType, '2019-10-01/generated/azure_mgmt_resources/models/alias_type.rb'
105
+ autoload :ResourceIdentityType, '2019-10-01/generated/azure_mgmt_resources/models/resource_identity_type.rb'
106
+ autoload :ProvisioningOperation, '2019-10-01/generated/azure_mgmt_resources/models/provisioning_operation.rb'
107
+ autoload :PropertyChangeType, '2019-10-01/generated/azure_mgmt_resources/models/property_change_type.rb'
108
+ autoload :ChangeType, '2019-10-01/generated/azure_mgmt_resources/models/change_type.rb'
109
+ autoload :TagsPatchOperation, '2019-10-01/generated/azure_mgmt_resources/models/tags_patch_operation.rb'
110
+ end
111
+ end
@@ -0,0 +1,1590 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::Resources::Mgmt::V2019_10_01
7
+ #
8
+ # Provides operations for working with resources and resource groups.
9
+ #
10
+ class DeploymentOperations
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the DeploymentOperations class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [ResourceManagementClient] reference to the ResourceManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Gets a deployments operation.
26
+ #
27
+ # @param scope [String] The resource scope.
28
+ # @param deployment_name [String] The name of the deployment.
29
+ # @param operation_id [String] The ID of the operation to get.
30
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
31
+ # will be added to the HTTP request.
32
+ #
33
+ # @return [DeploymentOperation] operation results.
34
+ #
35
+ def get_at_scope(scope, deployment_name, operation_id, custom_headers:nil)
36
+ response = get_at_scope_async(scope, deployment_name, operation_id, custom_headers:custom_headers).value!
37
+ response.body unless response.nil?
38
+ end
39
+
40
+ #
41
+ # Gets a deployments operation.
42
+ #
43
+ # @param scope [String] The resource scope.
44
+ # @param deployment_name [String] The name of the deployment.
45
+ # @param operation_id [String] The ID of the operation to get.
46
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
47
+ # will be added to the HTTP request.
48
+ #
49
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
50
+ #
51
+ def get_at_scope_with_http_info(scope, deployment_name, operation_id, custom_headers:nil)
52
+ get_at_scope_async(scope, deployment_name, operation_id, custom_headers:custom_headers).value!
53
+ end
54
+
55
+ #
56
+ # Gets a deployments operation.
57
+ #
58
+ # @param scope [String] The resource scope.
59
+ # @param deployment_name [String] The name of the deployment.
60
+ # @param operation_id [String] The ID of the operation to get.
61
+ # @param [Hash{String => String}] A hash of custom headers that will be added
62
+ # to the HTTP request.
63
+ #
64
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
65
+ #
66
+ def get_at_scope_async(scope, deployment_name, operation_id, custom_headers:nil)
67
+ fail ArgumentError, 'scope is nil' if scope.nil?
68
+ fail ArgumentError, 'deployment_name is nil' if deployment_name.nil?
69
+ fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64
70
+ fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1
71
+ fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
72
+ fail ArgumentError, 'operation_id is nil' if operation_id.nil?
73
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
74
+
75
+
76
+ request_headers = {}
77
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
78
+
79
+ # Set Headers
80
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
81
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
82
+ path_template = '{scope}/providers/Microsoft.Resources/deployments/{deploymentName}/operations/{operationId}'
83
+
84
+ request_url = @base_url || @client.base_url
85
+
86
+ options = {
87
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
88
+ path_params: {'deploymentName' => deployment_name,'operationId' => operation_id},
89
+ skip_encoding_path_params: {'scope' => scope},
90
+ query_params: {'api-version' => @client.api_version},
91
+ headers: request_headers.merge(custom_headers || {}),
92
+ base_url: request_url
93
+ }
94
+ promise = @client.make_request_async(:get, path_template, options)
95
+
96
+ promise = promise.then do |result|
97
+ http_response = result.response
98
+ status_code = http_response.status
99
+ response_content = http_response.body
100
+ unless status_code == 200
101
+ error_model = JSON.load(response_content)
102
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
103
+ end
104
+
105
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
106
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
107
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
108
+ # Deserialize Response
109
+ if status_code == 200
110
+ begin
111
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
112
+ result_mapper = Azure::Resources::Mgmt::V2019_10_01::Models::DeploymentOperation.mapper()
113
+ result.body = @client.deserialize(result_mapper, parsed_response)
114
+ rescue Exception => e
115
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
116
+ end
117
+ end
118
+
119
+ result
120
+ end
121
+
122
+ promise.execute
123
+ end
124
+
125
+ #
126
+ # Gets all deployments operations for a deployment.
127
+ #
128
+ # @param scope [String] The resource scope.
129
+ # @param deployment_name [String] The name of the deployment.
130
+ # @param top [Integer] The number of results to return.
131
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
132
+ # will be added to the HTTP request.
133
+ #
134
+ # @return [Array<DeploymentOperation>] operation results.
135
+ #
136
+ def list_at_scope(scope, deployment_name, top:nil, custom_headers:nil)
137
+ first_page = list_at_scope_as_lazy(scope, deployment_name, top:top, custom_headers:custom_headers)
138
+ first_page.get_all_items
139
+ end
140
+
141
+ #
142
+ # Gets all deployments operations for a deployment.
143
+ #
144
+ # @param scope [String] The resource scope.
145
+ # @param deployment_name [String] The name of the deployment.
146
+ # @param top [Integer] The number of results to return.
147
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
148
+ # will be added to the HTTP request.
149
+ #
150
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
151
+ #
152
+ def list_at_scope_with_http_info(scope, deployment_name, top:nil, custom_headers:nil)
153
+ list_at_scope_async(scope, deployment_name, top:top, custom_headers:custom_headers).value!
154
+ end
155
+
156
+ #
157
+ # Gets all deployments operations for a deployment.
158
+ #
159
+ # @param scope [String] The resource scope.
160
+ # @param deployment_name [String] The name of the deployment.
161
+ # @param top [Integer] The number of results to return.
162
+ # @param [Hash{String => String}] A hash of custom headers that will be added
163
+ # to the HTTP request.
164
+ #
165
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
166
+ #
167
+ def list_at_scope_async(scope, deployment_name, top:nil, custom_headers:nil)
168
+ fail ArgumentError, 'scope is nil' if scope.nil?
169
+ fail ArgumentError, 'deployment_name is nil' if deployment_name.nil?
170
+ fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64
171
+ fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1
172
+ fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
173
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
174
+
175
+
176
+ request_headers = {}
177
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
178
+
179
+ # Set Headers
180
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
181
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
182
+ path_template = '{scope}/providers/Microsoft.Resources/deployments/{deploymentName}/operations'
183
+
184
+ request_url = @base_url || @client.base_url
185
+
186
+ options = {
187
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
188
+ path_params: {'deploymentName' => deployment_name},
189
+ skip_encoding_path_params: {'scope' => scope},
190
+ query_params: {'$top' => top,'api-version' => @client.api_version},
191
+ headers: request_headers.merge(custom_headers || {}),
192
+ base_url: request_url
193
+ }
194
+ promise = @client.make_request_async(:get, path_template, options)
195
+
196
+ promise = promise.then do |result|
197
+ http_response = result.response
198
+ status_code = http_response.status
199
+ response_content = http_response.body
200
+ unless status_code == 200
201
+ error_model = JSON.load(response_content)
202
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
203
+ end
204
+
205
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
206
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
207
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
208
+ # Deserialize Response
209
+ if status_code == 200
210
+ begin
211
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
212
+ result_mapper = Azure::Resources::Mgmt::V2019_10_01::Models::DeploymentOperationsListResult.mapper()
213
+ result.body = @client.deserialize(result_mapper, parsed_response)
214
+ rescue Exception => e
215
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
216
+ end
217
+ end
218
+
219
+ result
220
+ end
221
+
222
+ promise.execute
223
+ end
224
+
225
+ #
226
+ # Gets a deployments operation.
227
+ #
228
+ # @param deployment_name [String] The name of the deployment.
229
+ # @param operation_id [String] The ID of the operation to get.
230
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
231
+ # will be added to the HTTP request.
232
+ #
233
+ # @return [DeploymentOperation] operation results.
234
+ #
235
+ def get_at_tenant_scope(deployment_name, operation_id, custom_headers:nil)
236
+ response = get_at_tenant_scope_async(deployment_name, operation_id, custom_headers:custom_headers).value!
237
+ response.body unless response.nil?
238
+ end
239
+
240
+ #
241
+ # Gets a deployments operation.
242
+ #
243
+ # @param deployment_name [String] The name of the deployment.
244
+ # @param operation_id [String] The ID of the operation to get.
245
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
246
+ # will be added to the HTTP request.
247
+ #
248
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
249
+ #
250
+ def get_at_tenant_scope_with_http_info(deployment_name, operation_id, custom_headers:nil)
251
+ get_at_tenant_scope_async(deployment_name, operation_id, custom_headers:custom_headers).value!
252
+ end
253
+
254
+ #
255
+ # Gets a deployments operation.
256
+ #
257
+ # @param deployment_name [String] The name of the deployment.
258
+ # @param operation_id [String] The ID of the operation to get.
259
+ # @param [Hash{String => String}] A hash of custom headers that will be added
260
+ # to the HTTP request.
261
+ #
262
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
263
+ #
264
+ def get_at_tenant_scope_async(deployment_name, operation_id, custom_headers:nil)
265
+ fail ArgumentError, 'deployment_name is nil' if deployment_name.nil?
266
+ fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64
267
+ fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1
268
+ fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
269
+ fail ArgumentError, 'operation_id is nil' if operation_id.nil?
270
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
271
+
272
+
273
+ request_headers = {}
274
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
275
+
276
+ # Set Headers
277
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
278
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
279
+ path_template = 'providers/Microsoft.Resources/deployments/{deploymentName}/operations/{operationId}'
280
+
281
+ request_url = @base_url || @client.base_url
282
+
283
+ options = {
284
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
285
+ path_params: {'deploymentName' => deployment_name,'operationId' => operation_id},
286
+ query_params: {'api-version' => @client.api_version},
287
+ headers: request_headers.merge(custom_headers || {}),
288
+ base_url: request_url
289
+ }
290
+ promise = @client.make_request_async(:get, path_template, options)
291
+
292
+ promise = promise.then do |result|
293
+ http_response = result.response
294
+ status_code = http_response.status
295
+ response_content = http_response.body
296
+ unless status_code == 200
297
+ error_model = JSON.load(response_content)
298
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
299
+ end
300
+
301
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
302
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
303
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
304
+ # Deserialize Response
305
+ if status_code == 200
306
+ begin
307
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
308
+ result_mapper = Azure::Resources::Mgmt::V2019_10_01::Models::DeploymentOperation.mapper()
309
+ result.body = @client.deserialize(result_mapper, parsed_response)
310
+ rescue Exception => e
311
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
312
+ end
313
+ end
314
+
315
+ result
316
+ end
317
+
318
+ promise.execute
319
+ end
320
+
321
+ #
322
+ # Gets all deployments operations for a deployment.
323
+ #
324
+ # @param deployment_name [String] The name of the deployment.
325
+ # @param top [Integer] The number of results to return.
326
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
327
+ # will be added to the HTTP request.
328
+ #
329
+ # @return [Array<DeploymentOperation>] operation results.
330
+ #
331
+ def list_at_tenant_scope(deployment_name, top:nil, custom_headers:nil)
332
+ first_page = list_at_tenant_scope_as_lazy(deployment_name, top:top, custom_headers:custom_headers)
333
+ first_page.get_all_items
334
+ end
335
+
336
+ #
337
+ # Gets all deployments operations for a deployment.
338
+ #
339
+ # @param deployment_name [String] The name of the deployment.
340
+ # @param top [Integer] The number of results to return.
341
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
342
+ # will be added to the HTTP request.
343
+ #
344
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
345
+ #
346
+ def list_at_tenant_scope_with_http_info(deployment_name, top:nil, custom_headers:nil)
347
+ list_at_tenant_scope_async(deployment_name, top:top, custom_headers:custom_headers).value!
348
+ end
349
+
350
+ #
351
+ # Gets all deployments operations for a deployment.
352
+ #
353
+ # @param deployment_name [String] The name of the deployment.
354
+ # @param top [Integer] The number of results to return.
355
+ # @param [Hash{String => String}] A hash of custom headers that will be added
356
+ # to the HTTP request.
357
+ #
358
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
359
+ #
360
+ def list_at_tenant_scope_async(deployment_name, top:nil, custom_headers:nil)
361
+ fail ArgumentError, 'deployment_name is nil' if deployment_name.nil?
362
+ fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64
363
+ fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1
364
+ fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
365
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
366
+
367
+
368
+ request_headers = {}
369
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
370
+
371
+ # Set Headers
372
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
373
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
374
+ path_template = 'providers/Microsoft.Resources/deployments/{deploymentName}/operations'
375
+
376
+ request_url = @base_url || @client.base_url
377
+
378
+ options = {
379
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
380
+ path_params: {'deploymentName' => deployment_name},
381
+ query_params: {'$top' => top,'api-version' => @client.api_version},
382
+ headers: request_headers.merge(custom_headers || {}),
383
+ base_url: request_url
384
+ }
385
+ promise = @client.make_request_async(:get, path_template, options)
386
+
387
+ promise = promise.then do |result|
388
+ http_response = result.response
389
+ status_code = http_response.status
390
+ response_content = http_response.body
391
+ unless status_code == 200
392
+ error_model = JSON.load(response_content)
393
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
394
+ end
395
+
396
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
397
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
398
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
399
+ # Deserialize Response
400
+ if status_code == 200
401
+ begin
402
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
403
+ result_mapper = Azure::Resources::Mgmt::V2019_10_01::Models::DeploymentOperationsListResult.mapper()
404
+ result.body = @client.deserialize(result_mapper, parsed_response)
405
+ rescue Exception => e
406
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
407
+ end
408
+ end
409
+
410
+ result
411
+ end
412
+
413
+ promise.execute
414
+ end
415
+
416
+ #
417
+ # Gets a deployments operation.
418
+ #
419
+ # @param group_id [String] The management group ID.
420
+ # @param deployment_name [String] The name of the deployment.
421
+ # @param operation_id [String] The ID of the operation to get.
422
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
423
+ # will be added to the HTTP request.
424
+ #
425
+ # @return [DeploymentOperation] operation results.
426
+ #
427
+ def get_at_management_group_scope(group_id, deployment_name, operation_id, custom_headers:nil)
428
+ response = get_at_management_group_scope_async(group_id, deployment_name, operation_id, custom_headers:custom_headers).value!
429
+ response.body unless response.nil?
430
+ end
431
+
432
+ #
433
+ # Gets a deployments operation.
434
+ #
435
+ # @param group_id [String] The management group ID.
436
+ # @param deployment_name [String] The name of the deployment.
437
+ # @param operation_id [String] The ID of the operation to get.
438
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
439
+ # will be added to the HTTP request.
440
+ #
441
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
442
+ #
443
+ def get_at_management_group_scope_with_http_info(group_id, deployment_name, operation_id, custom_headers:nil)
444
+ get_at_management_group_scope_async(group_id, deployment_name, operation_id, custom_headers:custom_headers).value!
445
+ end
446
+
447
+ #
448
+ # Gets a deployments operation.
449
+ #
450
+ # @param group_id [String] The management group ID.
451
+ # @param deployment_name [String] The name of the deployment.
452
+ # @param operation_id [String] The ID of the operation to get.
453
+ # @param [Hash{String => String}] A hash of custom headers that will be added
454
+ # to the HTTP request.
455
+ #
456
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
457
+ #
458
+ def get_at_management_group_scope_async(group_id, deployment_name, operation_id, custom_headers:nil)
459
+ fail ArgumentError, 'group_id is nil' if group_id.nil?
460
+ fail ArgumentError, "'group_id' should satisfy the constraint - 'MaxLength': '90'" if !group_id.nil? && group_id.length > 90
461
+ fail ArgumentError, "'group_id' should satisfy the constraint - 'MinLength': '1'" if !group_id.nil? && group_id.length < 1
462
+ fail ArgumentError, 'deployment_name is nil' if deployment_name.nil?
463
+ fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64
464
+ fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1
465
+ fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
466
+ fail ArgumentError, 'operation_id is nil' if operation_id.nil?
467
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
468
+
469
+
470
+ request_headers = {}
471
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
472
+
473
+ # Set Headers
474
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
475
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
476
+ path_template = 'providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/operations/{operationId}'
477
+
478
+ request_url = @base_url || @client.base_url
479
+
480
+ options = {
481
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
482
+ path_params: {'groupId' => group_id,'deploymentName' => deployment_name,'operationId' => operation_id},
483
+ query_params: {'api-version' => @client.api_version},
484
+ headers: request_headers.merge(custom_headers || {}),
485
+ base_url: request_url
486
+ }
487
+ promise = @client.make_request_async(:get, path_template, options)
488
+
489
+ promise = promise.then do |result|
490
+ http_response = result.response
491
+ status_code = http_response.status
492
+ response_content = http_response.body
493
+ unless status_code == 200
494
+ error_model = JSON.load(response_content)
495
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
496
+ end
497
+
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?
501
+ # Deserialize Response
502
+ if status_code == 200
503
+ begin
504
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
505
+ result_mapper = Azure::Resources::Mgmt::V2019_10_01::Models::DeploymentOperation.mapper()
506
+ result.body = @client.deserialize(result_mapper, parsed_response)
507
+ rescue Exception => e
508
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
509
+ end
510
+ end
511
+
512
+ result
513
+ end
514
+
515
+ promise.execute
516
+ end
517
+
518
+ #
519
+ # Gets all deployments operations for a deployment.
520
+ #
521
+ # @param group_id [String] The management group ID.
522
+ # @param deployment_name [String] The name of the deployment.
523
+ # @param top [Integer] The number of results to return.
524
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
525
+ # will be added to the HTTP request.
526
+ #
527
+ # @return [Array<DeploymentOperation>] operation results.
528
+ #
529
+ def list_at_management_group_scope(group_id, deployment_name, top:nil, custom_headers:nil)
530
+ first_page = list_at_management_group_scope_as_lazy(group_id, deployment_name, top:top, custom_headers:custom_headers)
531
+ first_page.get_all_items
532
+ end
533
+
534
+ #
535
+ # Gets all deployments operations for a deployment.
536
+ #
537
+ # @param group_id [String] The management group ID.
538
+ # @param deployment_name [String] The name of the deployment.
539
+ # @param top [Integer] The number of results to return.
540
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
541
+ # will be added to the HTTP request.
542
+ #
543
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
544
+ #
545
+ def list_at_management_group_scope_with_http_info(group_id, deployment_name, top:nil, custom_headers:nil)
546
+ list_at_management_group_scope_async(group_id, deployment_name, top:top, custom_headers:custom_headers).value!
547
+ end
548
+
549
+ #
550
+ # Gets all deployments operations for a deployment.
551
+ #
552
+ # @param group_id [String] The management group ID.
553
+ # @param deployment_name [String] The name of the deployment.
554
+ # @param top [Integer] The number of results to return.
555
+ # @param [Hash{String => String}] A hash of custom headers that will be added
556
+ # to the HTTP request.
557
+ #
558
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
559
+ #
560
+ def list_at_management_group_scope_async(group_id, deployment_name, top:nil, custom_headers:nil)
561
+ fail ArgumentError, 'group_id is nil' if group_id.nil?
562
+ fail ArgumentError, "'group_id' should satisfy the constraint - 'MaxLength': '90'" if !group_id.nil? && group_id.length > 90
563
+ fail ArgumentError, "'group_id' should satisfy the constraint - 'MinLength': '1'" if !group_id.nil? && group_id.length < 1
564
+ fail ArgumentError, 'deployment_name is nil' if deployment_name.nil?
565
+ fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64
566
+ fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1
567
+ fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
568
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
569
+
570
+
571
+ request_headers = {}
572
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
573
+
574
+ # Set Headers
575
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
576
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
577
+ path_template = 'providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/operations'
578
+
579
+ request_url = @base_url || @client.base_url
580
+
581
+ options = {
582
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
583
+ path_params: {'groupId' => group_id,'deploymentName' => deployment_name},
584
+ query_params: {'$top' => top,'api-version' => @client.api_version},
585
+ headers: request_headers.merge(custom_headers || {}),
586
+ base_url: request_url
587
+ }
588
+ promise = @client.make_request_async(:get, path_template, options)
589
+
590
+ promise = promise.then do |result|
591
+ http_response = result.response
592
+ status_code = http_response.status
593
+ response_content = http_response.body
594
+ unless status_code == 200
595
+ error_model = JSON.load(response_content)
596
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
597
+ end
598
+
599
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
600
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
601
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
602
+ # Deserialize Response
603
+ if status_code == 200
604
+ begin
605
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
606
+ result_mapper = Azure::Resources::Mgmt::V2019_10_01::Models::DeploymentOperationsListResult.mapper()
607
+ result.body = @client.deserialize(result_mapper, parsed_response)
608
+ rescue Exception => e
609
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
610
+ end
611
+ end
612
+
613
+ result
614
+ end
615
+
616
+ promise.execute
617
+ end
618
+
619
+ #
620
+ # Gets a deployments operation.
621
+ #
622
+ # @param deployment_name [String] The name of the deployment.
623
+ # @param operation_id [String] The ID of the operation to get.
624
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
625
+ # will be added to the HTTP request.
626
+ #
627
+ # @return [DeploymentOperation] operation results.
628
+ #
629
+ def get_at_subscription_scope(deployment_name, operation_id, custom_headers:nil)
630
+ response = get_at_subscription_scope_async(deployment_name, operation_id, custom_headers:custom_headers).value!
631
+ response.body unless response.nil?
632
+ end
633
+
634
+ #
635
+ # Gets a deployments operation.
636
+ #
637
+ # @param deployment_name [String] The name of the deployment.
638
+ # @param operation_id [String] The ID of the operation to get.
639
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
640
+ # will be added to the HTTP request.
641
+ #
642
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
643
+ #
644
+ def get_at_subscription_scope_with_http_info(deployment_name, operation_id, custom_headers:nil)
645
+ get_at_subscription_scope_async(deployment_name, operation_id, custom_headers:custom_headers).value!
646
+ end
647
+
648
+ #
649
+ # Gets a deployments operation.
650
+ #
651
+ # @param deployment_name [String] The name of the deployment.
652
+ # @param operation_id [String] The ID of the operation to get.
653
+ # @param [Hash{String => String}] A hash of custom headers that will be added
654
+ # to the HTTP request.
655
+ #
656
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
657
+ #
658
+ def get_at_subscription_scope_async(deployment_name, operation_id, custom_headers:nil)
659
+ fail ArgumentError, 'deployment_name is nil' if deployment_name.nil?
660
+ fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64
661
+ fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1
662
+ fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
663
+ fail ArgumentError, 'operation_id is nil' if operation_id.nil?
664
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
665
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
666
+
667
+
668
+ request_headers = {}
669
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
670
+
671
+ # Set Headers
672
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
673
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
674
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}/operations/{operationId}'
675
+
676
+ request_url = @base_url || @client.base_url
677
+
678
+ options = {
679
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
680
+ path_params: {'deploymentName' => deployment_name,'operationId' => operation_id,'subscriptionId' => @client.subscription_id},
681
+ query_params: {'api-version' => @client.api_version},
682
+ headers: request_headers.merge(custom_headers || {}),
683
+ base_url: request_url
684
+ }
685
+ promise = @client.make_request_async(:get, path_template, options)
686
+
687
+ promise = promise.then do |result|
688
+ http_response = result.response
689
+ status_code = http_response.status
690
+ response_content = http_response.body
691
+ unless status_code == 200
692
+ error_model = JSON.load(response_content)
693
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
694
+ end
695
+
696
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
697
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
698
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
699
+ # Deserialize Response
700
+ if status_code == 200
701
+ begin
702
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
703
+ result_mapper = Azure::Resources::Mgmt::V2019_10_01::Models::DeploymentOperation.mapper()
704
+ result.body = @client.deserialize(result_mapper, parsed_response)
705
+ rescue Exception => e
706
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
707
+ end
708
+ end
709
+
710
+ result
711
+ end
712
+
713
+ promise.execute
714
+ end
715
+
716
+ #
717
+ # Gets all deployments operations for a deployment.
718
+ #
719
+ # @param deployment_name [String] The name of the deployment.
720
+ # @param top [Integer] The number of results to return.
721
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
722
+ # will be added to the HTTP request.
723
+ #
724
+ # @return [Array<DeploymentOperation>] operation results.
725
+ #
726
+ def list_at_subscription_scope(deployment_name, top:nil, custom_headers:nil)
727
+ first_page = list_at_subscription_scope_as_lazy(deployment_name, top:top, custom_headers:custom_headers)
728
+ first_page.get_all_items
729
+ end
730
+
731
+ #
732
+ # Gets all deployments operations for a deployment.
733
+ #
734
+ # @param deployment_name [String] The name of the deployment.
735
+ # @param top [Integer] The number of results to return.
736
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
737
+ # will be added to the HTTP request.
738
+ #
739
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
740
+ #
741
+ def list_at_subscription_scope_with_http_info(deployment_name, top:nil, custom_headers:nil)
742
+ list_at_subscription_scope_async(deployment_name, top:top, custom_headers:custom_headers).value!
743
+ end
744
+
745
+ #
746
+ # Gets all deployments operations for a deployment.
747
+ #
748
+ # @param deployment_name [String] The name of the deployment.
749
+ # @param top [Integer] The number of results to return.
750
+ # @param [Hash{String => String}] A hash of custom headers that will be added
751
+ # to the HTTP request.
752
+ #
753
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
754
+ #
755
+ def list_at_subscription_scope_async(deployment_name, top:nil, custom_headers:nil)
756
+ fail ArgumentError, 'deployment_name is nil' if deployment_name.nil?
757
+ fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64
758
+ fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1
759
+ fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
760
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
761
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
762
+
763
+
764
+ request_headers = {}
765
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
766
+
767
+ # Set Headers
768
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
769
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
770
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}/operations'
771
+
772
+ request_url = @base_url || @client.base_url
773
+
774
+ options = {
775
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
776
+ path_params: {'deploymentName' => deployment_name,'subscriptionId' => @client.subscription_id},
777
+ query_params: {'$top' => top,'api-version' => @client.api_version},
778
+ headers: request_headers.merge(custom_headers || {}),
779
+ base_url: request_url
780
+ }
781
+ promise = @client.make_request_async(:get, path_template, options)
782
+
783
+ promise = promise.then do |result|
784
+ http_response = result.response
785
+ status_code = http_response.status
786
+ response_content = http_response.body
787
+ unless status_code == 200
788
+ error_model = JSON.load(response_content)
789
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
790
+ end
791
+
792
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
793
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
794
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
795
+ # Deserialize Response
796
+ if status_code == 200
797
+ begin
798
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
799
+ result_mapper = Azure::Resources::Mgmt::V2019_10_01::Models::DeploymentOperationsListResult.mapper()
800
+ result.body = @client.deserialize(result_mapper, parsed_response)
801
+ rescue Exception => e
802
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
803
+ end
804
+ end
805
+
806
+ result
807
+ end
808
+
809
+ promise.execute
810
+ end
811
+
812
+ #
813
+ # Gets a deployments operation.
814
+ #
815
+ # @param resource_group_name [String] The name of the resource group. The name
816
+ # is case insensitive.
817
+ # @param deployment_name [String] The name of the deployment.
818
+ # @param operation_id [String] The ID of the operation to get.
819
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
820
+ # will be added to the HTTP request.
821
+ #
822
+ # @return [DeploymentOperation] operation results.
823
+ #
824
+ def get(resource_group_name, deployment_name, operation_id, custom_headers:nil)
825
+ response = get_async(resource_group_name, deployment_name, operation_id, custom_headers:custom_headers).value!
826
+ response.body unless response.nil?
827
+ end
828
+
829
+ #
830
+ # Gets a deployments operation.
831
+ #
832
+ # @param resource_group_name [String] The name of the resource group. The name
833
+ # is case insensitive.
834
+ # @param deployment_name [String] The name of the deployment.
835
+ # @param operation_id [String] The ID of the operation to get.
836
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
837
+ # will be added to the HTTP request.
838
+ #
839
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
840
+ #
841
+ def get_with_http_info(resource_group_name, deployment_name, operation_id, custom_headers:nil)
842
+ get_async(resource_group_name, deployment_name, operation_id, custom_headers:custom_headers).value!
843
+ end
844
+
845
+ #
846
+ # Gets a deployments operation.
847
+ #
848
+ # @param resource_group_name [String] The name of the resource group. The name
849
+ # is case insensitive.
850
+ # @param deployment_name [String] The name of the deployment.
851
+ # @param operation_id [String] The ID of the operation to get.
852
+ # @param [Hash{String => String}] A hash of custom headers that will be added
853
+ # to the HTTP request.
854
+ #
855
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
856
+ #
857
+ def get_async(resource_group_name, deployment_name, operation_id, custom_headers:nil)
858
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
859
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
860
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
861
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
862
+ fail ArgumentError, 'deployment_name is nil' if deployment_name.nil?
863
+ fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64
864
+ fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1
865
+ fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
866
+ fail ArgumentError, 'operation_id is nil' if operation_id.nil?
867
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
868
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
869
+
870
+
871
+ request_headers = {}
872
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
873
+
874
+ # Set Headers
875
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
876
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
877
+ path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/deployments/{deploymentName}/operations/{operationId}'
878
+
879
+ request_url = @base_url || @client.base_url
880
+
881
+ options = {
882
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
883
+ path_params: {'resourceGroupName' => resource_group_name,'deploymentName' => deployment_name,'operationId' => operation_id,'subscriptionId' => @client.subscription_id},
884
+ query_params: {'api-version' => @client.api_version},
885
+ headers: request_headers.merge(custom_headers || {}),
886
+ base_url: request_url
887
+ }
888
+ promise = @client.make_request_async(:get, path_template, options)
889
+
890
+ promise = promise.then do |result|
891
+ http_response = result.response
892
+ status_code = http_response.status
893
+ response_content = http_response.body
894
+ unless status_code == 200
895
+ error_model = JSON.load(response_content)
896
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
897
+ end
898
+
899
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
900
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
901
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
902
+ # Deserialize Response
903
+ if status_code == 200
904
+ begin
905
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
906
+ result_mapper = Azure::Resources::Mgmt::V2019_10_01::Models::DeploymentOperation.mapper()
907
+ result.body = @client.deserialize(result_mapper, parsed_response)
908
+ rescue Exception => e
909
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
910
+ end
911
+ end
912
+
913
+ result
914
+ end
915
+
916
+ promise.execute
917
+ end
918
+
919
+ #
920
+ # Gets all deployments operations for a deployment.
921
+ #
922
+ # @param resource_group_name [String] The name of the resource group. The name
923
+ # is case insensitive.
924
+ # @param deployment_name [String] The name of the deployment.
925
+ # @param top [Integer] The number of results to return.
926
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
927
+ # will be added to the HTTP request.
928
+ #
929
+ # @return [Array<DeploymentOperation>] operation results.
930
+ #
931
+ def list(resource_group_name, deployment_name, top:nil, custom_headers:nil)
932
+ first_page = list_as_lazy(resource_group_name, deployment_name, top:top, custom_headers:custom_headers)
933
+ first_page.get_all_items
934
+ end
935
+
936
+ #
937
+ # Gets all deployments operations for a deployment.
938
+ #
939
+ # @param resource_group_name [String] The name of the resource group. The name
940
+ # is case insensitive.
941
+ # @param deployment_name [String] The name of the deployment.
942
+ # @param top [Integer] The number of results to return.
943
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
944
+ # will be added to the HTTP request.
945
+ #
946
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
947
+ #
948
+ def list_with_http_info(resource_group_name, deployment_name, top:nil, custom_headers:nil)
949
+ list_async(resource_group_name, deployment_name, top:top, custom_headers:custom_headers).value!
950
+ end
951
+
952
+ #
953
+ # Gets all deployments operations for a deployment.
954
+ #
955
+ # @param resource_group_name [String] The name of the resource group. The name
956
+ # is case insensitive.
957
+ # @param deployment_name [String] The name of the deployment.
958
+ # @param top [Integer] The number of results to return.
959
+ # @param [Hash{String => String}] A hash of custom headers that will be added
960
+ # to the HTTP request.
961
+ #
962
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
963
+ #
964
+ def list_async(resource_group_name, deployment_name, top:nil, custom_headers:nil)
965
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
966
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
967
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
968
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
969
+ fail ArgumentError, 'deployment_name is nil' if deployment_name.nil?
970
+ fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MaxLength': '64'" if !deployment_name.nil? && deployment_name.length > 64
971
+ fail ArgumentError, "'deployment_name' should satisfy the constraint - 'MinLength': '1'" if !deployment_name.nil? && deployment_name.length < 1
972
+ fail ArgumentError, "'deployment_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !deployment_name.nil? && deployment_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
973
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
974
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
975
+
976
+
977
+ request_headers = {}
978
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
979
+
980
+ # Set Headers
981
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
982
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
983
+ path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/deployments/{deploymentName}/operations'
984
+
985
+ request_url = @base_url || @client.base_url
986
+
987
+ options = {
988
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
989
+ path_params: {'resourceGroupName' => resource_group_name,'deploymentName' => deployment_name,'subscriptionId' => @client.subscription_id},
990
+ query_params: {'$top' => top,'api-version' => @client.api_version},
991
+ headers: request_headers.merge(custom_headers || {}),
992
+ base_url: request_url
993
+ }
994
+ promise = @client.make_request_async(:get, path_template, options)
995
+
996
+ promise = promise.then do |result|
997
+ http_response = result.response
998
+ status_code = http_response.status
999
+ response_content = http_response.body
1000
+ unless status_code == 200
1001
+ error_model = JSON.load(response_content)
1002
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1003
+ end
1004
+
1005
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1006
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1007
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1008
+ # Deserialize Response
1009
+ if status_code == 200
1010
+ begin
1011
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1012
+ result_mapper = Azure::Resources::Mgmt::V2019_10_01::Models::DeploymentOperationsListResult.mapper()
1013
+ result.body = @client.deserialize(result_mapper, parsed_response)
1014
+ rescue Exception => e
1015
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1016
+ end
1017
+ end
1018
+
1019
+ result
1020
+ end
1021
+
1022
+ promise.execute
1023
+ end
1024
+
1025
+ #
1026
+ # Gets all deployments operations for a deployment.
1027
+ #
1028
+ # @param next_page_link [String] The NextLink from the previous successful call
1029
+ # to List operation.
1030
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1031
+ # will be added to the HTTP request.
1032
+ #
1033
+ # @return [DeploymentOperationsListResult] operation results.
1034
+ #
1035
+ def list_at_scope_next(next_page_link, custom_headers:nil)
1036
+ response = list_at_scope_next_async(next_page_link, custom_headers:custom_headers).value!
1037
+ response.body unless response.nil?
1038
+ end
1039
+
1040
+ #
1041
+ # Gets all deployments operations for a deployment.
1042
+ #
1043
+ # @param next_page_link [String] The NextLink from the previous successful call
1044
+ # to List operation.
1045
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1046
+ # will be added to the HTTP request.
1047
+ #
1048
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1049
+ #
1050
+ def list_at_scope_next_with_http_info(next_page_link, custom_headers:nil)
1051
+ list_at_scope_next_async(next_page_link, custom_headers:custom_headers).value!
1052
+ end
1053
+
1054
+ #
1055
+ # Gets all deployments operations for a deployment.
1056
+ #
1057
+ # @param next_page_link [String] The NextLink from the previous successful call
1058
+ # to List operation.
1059
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1060
+ # to the HTTP request.
1061
+ #
1062
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1063
+ #
1064
+ def list_at_scope_next_async(next_page_link, custom_headers:nil)
1065
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1066
+
1067
+
1068
+ request_headers = {}
1069
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1070
+
1071
+ # Set Headers
1072
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1073
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1074
+ path_template = '{nextLink}'
1075
+
1076
+ request_url = @base_url || @client.base_url
1077
+
1078
+ options = {
1079
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1080
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1081
+ headers: request_headers.merge(custom_headers || {}),
1082
+ base_url: request_url
1083
+ }
1084
+ promise = @client.make_request_async(:get, path_template, options)
1085
+
1086
+ promise = promise.then do |result|
1087
+ http_response = result.response
1088
+ status_code = http_response.status
1089
+ response_content = http_response.body
1090
+ unless status_code == 200
1091
+ error_model = JSON.load(response_content)
1092
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1093
+ end
1094
+
1095
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1096
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1097
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1098
+ # Deserialize Response
1099
+ if status_code == 200
1100
+ begin
1101
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1102
+ result_mapper = Azure::Resources::Mgmt::V2019_10_01::Models::DeploymentOperationsListResult.mapper()
1103
+ result.body = @client.deserialize(result_mapper, parsed_response)
1104
+ rescue Exception => e
1105
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1106
+ end
1107
+ end
1108
+
1109
+ result
1110
+ end
1111
+
1112
+ promise.execute
1113
+ end
1114
+
1115
+ #
1116
+ # Gets all deployments operations for a deployment.
1117
+ #
1118
+ # @param next_page_link [String] The NextLink from the previous successful call
1119
+ # to List operation.
1120
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1121
+ # will be added to the HTTP request.
1122
+ #
1123
+ # @return [DeploymentOperationsListResult] operation results.
1124
+ #
1125
+ def list_at_tenant_scope_next(next_page_link, custom_headers:nil)
1126
+ response = list_at_tenant_scope_next_async(next_page_link, custom_headers:custom_headers).value!
1127
+ response.body unless response.nil?
1128
+ end
1129
+
1130
+ #
1131
+ # Gets all deployments operations for a deployment.
1132
+ #
1133
+ # @param next_page_link [String] The NextLink from the previous successful call
1134
+ # to List operation.
1135
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1136
+ # will be added to the HTTP request.
1137
+ #
1138
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1139
+ #
1140
+ def list_at_tenant_scope_next_with_http_info(next_page_link, custom_headers:nil)
1141
+ list_at_tenant_scope_next_async(next_page_link, custom_headers:custom_headers).value!
1142
+ end
1143
+
1144
+ #
1145
+ # Gets all deployments operations for a deployment.
1146
+ #
1147
+ # @param next_page_link [String] The NextLink from the previous successful call
1148
+ # to List operation.
1149
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1150
+ # to the HTTP request.
1151
+ #
1152
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1153
+ #
1154
+ def list_at_tenant_scope_next_async(next_page_link, custom_headers:nil)
1155
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1156
+
1157
+
1158
+ request_headers = {}
1159
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1160
+
1161
+ # Set Headers
1162
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1163
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1164
+ path_template = '{nextLink}'
1165
+
1166
+ request_url = @base_url || @client.base_url
1167
+
1168
+ options = {
1169
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1170
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1171
+ headers: request_headers.merge(custom_headers || {}),
1172
+ base_url: request_url
1173
+ }
1174
+ promise = @client.make_request_async(:get, path_template, options)
1175
+
1176
+ promise = promise.then do |result|
1177
+ http_response = result.response
1178
+ status_code = http_response.status
1179
+ response_content = http_response.body
1180
+ unless status_code == 200
1181
+ error_model = JSON.load(response_content)
1182
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1183
+ end
1184
+
1185
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1186
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1187
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1188
+ # Deserialize Response
1189
+ if status_code == 200
1190
+ begin
1191
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1192
+ result_mapper = Azure::Resources::Mgmt::V2019_10_01::Models::DeploymentOperationsListResult.mapper()
1193
+ result.body = @client.deserialize(result_mapper, parsed_response)
1194
+ rescue Exception => e
1195
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1196
+ end
1197
+ end
1198
+
1199
+ result
1200
+ end
1201
+
1202
+ promise.execute
1203
+ end
1204
+
1205
+ #
1206
+ # Gets all deployments operations for a deployment.
1207
+ #
1208
+ # @param next_page_link [String] The NextLink from the previous successful call
1209
+ # to List operation.
1210
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1211
+ # will be added to the HTTP request.
1212
+ #
1213
+ # @return [DeploymentOperationsListResult] operation results.
1214
+ #
1215
+ def list_at_management_group_scope_next(next_page_link, custom_headers:nil)
1216
+ response = list_at_management_group_scope_next_async(next_page_link, custom_headers:custom_headers).value!
1217
+ response.body unless response.nil?
1218
+ end
1219
+
1220
+ #
1221
+ # Gets all deployments operations for a deployment.
1222
+ #
1223
+ # @param next_page_link [String] The NextLink from the previous successful call
1224
+ # to List operation.
1225
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1226
+ # will be added to the HTTP request.
1227
+ #
1228
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1229
+ #
1230
+ def list_at_management_group_scope_next_with_http_info(next_page_link, custom_headers:nil)
1231
+ list_at_management_group_scope_next_async(next_page_link, custom_headers:custom_headers).value!
1232
+ end
1233
+
1234
+ #
1235
+ # Gets all deployments operations for a deployment.
1236
+ #
1237
+ # @param next_page_link [String] The NextLink from the previous successful call
1238
+ # to List operation.
1239
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1240
+ # to the HTTP request.
1241
+ #
1242
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1243
+ #
1244
+ def list_at_management_group_scope_next_async(next_page_link, custom_headers:nil)
1245
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1246
+
1247
+
1248
+ request_headers = {}
1249
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1250
+
1251
+ # Set Headers
1252
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1253
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1254
+ path_template = '{nextLink}'
1255
+
1256
+ request_url = @base_url || @client.base_url
1257
+
1258
+ options = {
1259
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1260
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1261
+ headers: request_headers.merge(custom_headers || {}),
1262
+ base_url: request_url
1263
+ }
1264
+ promise = @client.make_request_async(:get, path_template, options)
1265
+
1266
+ promise = promise.then do |result|
1267
+ http_response = result.response
1268
+ status_code = http_response.status
1269
+ response_content = http_response.body
1270
+ unless status_code == 200
1271
+ error_model = JSON.load(response_content)
1272
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1273
+ end
1274
+
1275
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1276
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1277
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1278
+ # Deserialize Response
1279
+ if status_code == 200
1280
+ begin
1281
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1282
+ result_mapper = Azure::Resources::Mgmt::V2019_10_01::Models::DeploymentOperationsListResult.mapper()
1283
+ result.body = @client.deserialize(result_mapper, parsed_response)
1284
+ rescue Exception => e
1285
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1286
+ end
1287
+ end
1288
+
1289
+ result
1290
+ end
1291
+
1292
+ promise.execute
1293
+ end
1294
+
1295
+ #
1296
+ # Gets all deployments operations for a deployment.
1297
+ #
1298
+ # @param next_page_link [String] The NextLink from the previous successful call
1299
+ # to List operation.
1300
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1301
+ # will be added to the HTTP request.
1302
+ #
1303
+ # @return [DeploymentOperationsListResult] operation results.
1304
+ #
1305
+ def list_at_subscription_scope_next(next_page_link, custom_headers:nil)
1306
+ response = list_at_subscription_scope_next_async(next_page_link, custom_headers:custom_headers).value!
1307
+ response.body unless response.nil?
1308
+ end
1309
+
1310
+ #
1311
+ # Gets all deployments operations for a deployment.
1312
+ #
1313
+ # @param next_page_link [String] The NextLink from the previous successful call
1314
+ # to List operation.
1315
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1316
+ # will be added to the HTTP request.
1317
+ #
1318
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1319
+ #
1320
+ def list_at_subscription_scope_next_with_http_info(next_page_link, custom_headers:nil)
1321
+ list_at_subscription_scope_next_async(next_page_link, custom_headers:custom_headers).value!
1322
+ end
1323
+
1324
+ #
1325
+ # Gets all deployments operations for a deployment.
1326
+ #
1327
+ # @param next_page_link [String] The NextLink from the previous successful call
1328
+ # to List operation.
1329
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1330
+ # to the HTTP request.
1331
+ #
1332
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1333
+ #
1334
+ def list_at_subscription_scope_next_async(next_page_link, custom_headers:nil)
1335
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1336
+
1337
+
1338
+ request_headers = {}
1339
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1340
+
1341
+ # Set Headers
1342
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1343
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1344
+ path_template = '{nextLink}'
1345
+
1346
+ request_url = @base_url || @client.base_url
1347
+
1348
+ options = {
1349
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1350
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1351
+ headers: request_headers.merge(custom_headers || {}),
1352
+ base_url: request_url
1353
+ }
1354
+ promise = @client.make_request_async(:get, path_template, options)
1355
+
1356
+ promise = promise.then do |result|
1357
+ http_response = result.response
1358
+ status_code = http_response.status
1359
+ response_content = http_response.body
1360
+ unless status_code == 200
1361
+ error_model = JSON.load(response_content)
1362
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1363
+ end
1364
+
1365
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1366
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1367
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1368
+ # Deserialize Response
1369
+ if status_code == 200
1370
+ begin
1371
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1372
+ result_mapper = Azure::Resources::Mgmt::V2019_10_01::Models::DeploymentOperationsListResult.mapper()
1373
+ result.body = @client.deserialize(result_mapper, parsed_response)
1374
+ rescue Exception => e
1375
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1376
+ end
1377
+ end
1378
+
1379
+ result
1380
+ end
1381
+
1382
+ promise.execute
1383
+ end
1384
+
1385
+ #
1386
+ # Gets all deployments operations for a deployment.
1387
+ #
1388
+ # @param next_page_link [String] The NextLink from the previous successful call
1389
+ # to List operation.
1390
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1391
+ # will be added to the HTTP request.
1392
+ #
1393
+ # @return [DeploymentOperationsListResult] operation results.
1394
+ #
1395
+ def list_next(next_page_link, custom_headers:nil)
1396
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
1397
+ response.body unless response.nil?
1398
+ end
1399
+
1400
+ #
1401
+ # Gets all deployments operations for a deployment.
1402
+ #
1403
+ # @param next_page_link [String] The NextLink from the previous successful call
1404
+ # to List operation.
1405
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1406
+ # will be added to the HTTP request.
1407
+ #
1408
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1409
+ #
1410
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
1411
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
1412
+ end
1413
+
1414
+ #
1415
+ # Gets all deployments operations for a deployment.
1416
+ #
1417
+ # @param next_page_link [String] The NextLink from the previous successful call
1418
+ # to List operation.
1419
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1420
+ # to the HTTP request.
1421
+ #
1422
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1423
+ #
1424
+ def list_next_async(next_page_link, custom_headers:nil)
1425
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1426
+
1427
+
1428
+ request_headers = {}
1429
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1430
+
1431
+ # Set Headers
1432
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1433
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1434
+ path_template = '{nextLink}'
1435
+
1436
+ request_url = @base_url || @client.base_url
1437
+
1438
+ options = {
1439
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1440
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1441
+ headers: request_headers.merge(custom_headers || {}),
1442
+ base_url: request_url
1443
+ }
1444
+ promise = @client.make_request_async(:get, path_template, options)
1445
+
1446
+ promise = promise.then do |result|
1447
+ http_response = result.response
1448
+ status_code = http_response.status
1449
+ response_content = http_response.body
1450
+ unless status_code == 200
1451
+ error_model = JSON.load(response_content)
1452
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1453
+ end
1454
+
1455
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1456
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1457
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1458
+ # Deserialize Response
1459
+ if status_code == 200
1460
+ begin
1461
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1462
+ result_mapper = Azure::Resources::Mgmt::V2019_10_01::Models::DeploymentOperationsListResult.mapper()
1463
+ result.body = @client.deserialize(result_mapper, parsed_response)
1464
+ rescue Exception => e
1465
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1466
+ end
1467
+ end
1468
+
1469
+ result
1470
+ end
1471
+
1472
+ promise.execute
1473
+ end
1474
+
1475
+ #
1476
+ # Gets all deployments operations for a deployment.
1477
+ #
1478
+ # @param scope [String] The resource scope.
1479
+ # @param deployment_name [String] The name of the deployment.
1480
+ # @param top [Integer] The number of results to return.
1481
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1482
+ # will be added to the HTTP request.
1483
+ #
1484
+ # @return [DeploymentOperationsListResult] which provide lazy access to pages
1485
+ # of the response.
1486
+ #
1487
+ def list_at_scope_as_lazy(scope, deployment_name, top:nil, custom_headers:nil)
1488
+ response = list_at_scope_async(scope, deployment_name, top:top, custom_headers:custom_headers).value!
1489
+ unless response.nil?
1490
+ page = response.body
1491
+ page.next_method = Proc.new do |next_page_link|
1492
+ list_at_scope_next_async(next_page_link, custom_headers:custom_headers)
1493
+ end
1494
+ page
1495
+ end
1496
+ end
1497
+
1498
+ #
1499
+ # Gets all deployments operations for a deployment.
1500
+ #
1501
+ # @param deployment_name [String] The name of the deployment.
1502
+ # @param top [Integer] The number of results to return.
1503
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1504
+ # will be added to the HTTP request.
1505
+ #
1506
+ # @return [DeploymentOperationsListResult] which provide lazy access to pages
1507
+ # of the response.
1508
+ #
1509
+ def list_at_tenant_scope_as_lazy(deployment_name, top:nil, custom_headers:nil)
1510
+ response = list_at_tenant_scope_async(deployment_name, top:top, custom_headers:custom_headers).value!
1511
+ unless response.nil?
1512
+ page = response.body
1513
+ page.next_method = Proc.new do |next_page_link|
1514
+ list_at_tenant_scope_next_async(next_page_link, custom_headers:custom_headers)
1515
+ end
1516
+ page
1517
+ end
1518
+ end
1519
+
1520
+ #
1521
+ # Gets all deployments operations for a deployment.
1522
+ #
1523
+ # @param group_id [String] The management group ID.
1524
+ # @param deployment_name [String] The name of the deployment.
1525
+ # @param top [Integer] The number of results to return.
1526
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1527
+ # will be added to the HTTP request.
1528
+ #
1529
+ # @return [DeploymentOperationsListResult] which provide lazy access to pages
1530
+ # of the response.
1531
+ #
1532
+ def list_at_management_group_scope_as_lazy(group_id, deployment_name, top:nil, custom_headers:nil)
1533
+ response = list_at_management_group_scope_async(group_id, deployment_name, top:top, custom_headers:custom_headers).value!
1534
+ unless response.nil?
1535
+ page = response.body
1536
+ page.next_method = Proc.new do |next_page_link|
1537
+ list_at_management_group_scope_next_async(next_page_link, custom_headers:custom_headers)
1538
+ end
1539
+ page
1540
+ end
1541
+ end
1542
+
1543
+ #
1544
+ # Gets all deployments operations for a deployment.
1545
+ #
1546
+ # @param deployment_name [String] The name of the deployment.
1547
+ # @param top [Integer] The number of results to return.
1548
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1549
+ # will be added to the HTTP request.
1550
+ #
1551
+ # @return [DeploymentOperationsListResult] which provide lazy access to pages
1552
+ # of the response.
1553
+ #
1554
+ def list_at_subscription_scope_as_lazy(deployment_name, top:nil, custom_headers:nil)
1555
+ response = list_at_subscription_scope_async(deployment_name, top:top, custom_headers:custom_headers).value!
1556
+ unless response.nil?
1557
+ page = response.body
1558
+ page.next_method = Proc.new do |next_page_link|
1559
+ list_at_subscription_scope_next_async(next_page_link, custom_headers:custom_headers)
1560
+ end
1561
+ page
1562
+ end
1563
+ end
1564
+
1565
+ #
1566
+ # Gets all deployments operations for a deployment.
1567
+ #
1568
+ # @param resource_group_name [String] The name of the resource group. The name
1569
+ # is case insensitive.
1570
+ # @param deployment_name [String] The name of the deployment.
1571
+ # @param top [Integer] The number of results to return.
1572
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1573
+ # will be added to the HTTP request.
1574
+ #
1575
+ # @return [DeploymentOperationsListResult] which provide lazy access to pages
1576
+ # of the response.
1577
+ #
1578
+ def list_as_lazy(resource_group_name, deployment_name, top:nil, custom_headers:nil)
1579
+ response = list_async(resource_group_name, deployment_name, top:top, custom_headers:custom_headers).value!
1580
+ unless response.nil?
1581
+ page = response.body
1582
+ page.next_method = Proc.new do |next_page_link|
1583
+ list_next_async(next_page_link, custom_headers:custom_headers)
1584
+ end
1585
+ page
1586
+ end
1587
+ end
1588
+
1589
+ end
1590
+ end