azure_mgmt_resources 0.17.6 → 0.17.7

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