azure_mgmt_web 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (240) hide show
  1. checksums.yaml +13 -5
  2. data/azure_mgmt_web.gemspec +2 -2
  3. data/lib/azure_mgmt_web.rb +27 -4
  4. data/lib/azure_mgmt_web/certificate_orders.rb +1596 -0
  5. data/lib/azure_mgmt_web/certificates.rb +383 -55
  6. data/lib/azure_mgmt_web/classic_mobile_services.rb +107 -16
  7. data/lib/azure_mgmt_web/domains.rb +227 -33
  8. data/lib/azure_mgmt_web/global.rb +446 -78
  9. data/lib/azure_mgmt_web/global_certificate_order.rb +206 -0
  10. data/lib/azure_mgmt_web/global_domain_registration.rb +174 -29
  11. data/lib/azure_mgmt_web/global_resource_groups.rb +33 -7
  12. data/lib/azure_mgmt_web/hosting_environments.rb +1500 -213
  13. data/lib/azure_mgmt_web/managed_hosting_environments.rb +346 -55
  14. data/lib/azure_mgmt_web/models/access_control_entry_action.rb +1 -1
  15. data/lib/azure_mgmt_web/models/address.rb +1 -1
  16. data/lib/azure_mgmt_web/models/address_response.rb +1 -1
  17. data/lib/azure_mgmt_web/models/api_definition_info.rb +1 -1
  18. data/lib/azure_mgmt_web/models/application_logs_config.rb +1 -1
  19. data/lib/azure_mgmt_web/models/arm_plan.rb +1 -1
  20. data/lib/azure_mgmt_web/models/auto_heal_action_type.rb +1 -1
  21. data/lib/azure_mgmt_web/models/auto_heal_actions.rb +1 -1
  22. data/lib/azure_mgmt_web/models/auto_heal_custom_action.rb +1 -1
  23. data/lib/azure_mgmt_web/models/auto_heal_rules.rb +1 -1
  24. data/lib/azure_mgmt_web/models/auto_heal_triggers.rb +1 -1
  25. data/lib/azure_mgmt_web/models/azure_blob_storage_application_logs_config.rb +1 -1
  26. data/lib/azure_mgmt_web/models/azure_blob_storage_http_logs_config.rb +1 -1
  27. data/lib/azure_mgmt_web/models/azure_resource_type.rb +1 -1
  28. data/lib/azure_mgmt_web/models/azure_table_storage_application_logs_config.rb +1 -1
  29. data/lib/azure_mgmt_web/models/backup_item.rb +7 -1
  30. data/lib/azure_mgmt_web/models/backup_item_collection.rb +1 -1
  31. data/lib/azure_mgmt_web/models/backup_item_properties.rb +1 -1
  32. data/lib/azure_mgmt_web/models/backup_item_status.rb +1 -1
  33. data/lib/azure_mgmt_web/models/backup_request.rb +7 -1
  34. data/lib/azure_mgmt_web/models/backup_request_properties.rb +1 -1
  35. data/lib/azure_mgmt_web/models/backup_restore_operation_type.rb +1 -1
  36. data/lib/azure_mgmt_web/models/backup_schedule.rb +1 -1
  37. data/lib/azure_mgmt_web/models/built_in_authentication_provider.rb +1 -1
  38. data/lib/azure_mgmt_web/models/certificate.rb +7 -1
  39. data/lib/azure_mgmt_web/models/certificate_collection.rb +1 -1
  40. data/lib/azure_mgmt_web/models/certificate_details.rb +98 -0
  41. data/lib/azure_mgmt_web/models/certificate_details_properties.rb +133 -0
  42. data/lib/azure_mgmt_web/models/certificate_email.rb +98 -0
  43. data/lib/azure_mgmt_web/models/certificate_email_properties.rb +67 -0
  44. data/lib/azure_mgmt_web/models/certificate_order.rb +98 -0
  45. data/lib/azure_mgmt_web/models/certificate_order_action.rb +98 -0
  46. data/lib/azure_mgmt_web/models/certificate_order_action_properties.rb +74 -0
  47. data/lib/azure_mgmt_web/models/certificate_order_action_type.rb +23 -0
  48. data/lib/azure_mgmt_web/models/certificate_order_certificate.rb +99 -0
  49. data/lib/azure_mgmt_web/models/certificate_order_certificate_collection.rb +85 -0
  50. data/lib/azure_mgmt_web/models/certificate_order_certificate_properties.rb +82 -0
  51. data/lib/azure_mgmt_web/models/certificate_order_collection.rb +85 -0
  52. data/lib/azure_mgmt_web/models/certificate_order_properties.rb +254 -0
  53. data/lib/azure_mgmt_web/models/certificate_order_status.rb +24 -0
  54. data/lib/azure_mgmt_web/models/certificate_product_type.rb +16 -0
  55. data/lib/azure_mgmt_web/models/certificate_properties.rb +1 -1
  56. data/lib/azure_mgmt_web/models/channels.rb +1 -1
  57. data/lib/azure_mgmt_web/models/classic_mobile_service.rb +7 -1
  58. data/lib/azure_mgmt_web/models/classic_mobile_service_collection.rb +1 -1
  59. data/lib/azure_mgmt_web/models/classic_mobile_service_properties.rb +1 -1
  60. data/lib/azure_mgmt_web/models/clone_ability_result.rb +1 -1
  61. data/lib/azure_mgmt_web/models/cloning_info.rb +1 -1
  62. data/lib/azure_mgmt_web/models/compute_mode_options.rb +2 -1
  63. data/lib/azure_mgmt_web/models/conn_string_info.rb +1 -1
  64. data/lib/azure_mgmt_web/models/conn_string_value_type_pair.rb +1 -1
  65. data/lib/azure_mgmt_web/models/connection_string_dictionary.rb +7 -1
  66. data/lib/azure_mgmt_web/models/contact.rb +1 -1
  67. data/lib/azure_mgmt_web/models/cors_settings.rb +1 -1
  68. data/lib/azure_mgmt_web/models/csm_move_resource_envelope.rb +1 -1
  69. data/lib/azure_mgmt_web/models/csm_publishing_profile_options.rb +1 -1
  70. data/lib/azure_mgmt_web/models/csm_site_recovery_entity.rb +11 -1
  71. data/lib/azure_mgmt_web/models/csm_slot_entity.rb +1 -1
  72. data/lib/azure_mgmt_web/models/csm_usage_quota.rb +1 -1
  73. data/lib/azure_mgmt_web/models/csm_usage_quota_collection.rb +1 -1
  74. data/lib/azure_mgmt_web/models/csr.rb +7 -1
  75. data/lib/azure_mgmt_web/models/csr_properties.rb +1 -1
  76. data/lib/azure_mgmt_web/models/custom_host_name_dns_record_type.rb +1 -1
  77. data/lib/azure_mgmt_web/models/database_backup_setting.rb +1 -1
  78. data/lib/azure_mgmt_web/models/database_server_type.rb +1 -1
  79. data/lib/azure_mgmt_web/models/deleted_site.rb +7 -1
  80. data/lib/azure_mgmt_web/models/deleted_site_collection.rb +1 -1
  81. data/lib/azure_mgmt_web/models/deleted_site_properties.rb +40 -1
  82. data/lib/azure_mgmt_web/models/deployment.rb +7 -1
  83. data/lib/azure_mgmt_web/models/deployment_collection.rb +1 -1
  84. data/lib/azure_mgmt_web/models/deployment_properties.rb +1 -1
  85. data/lib/azure_mgmt_web/models/domain.rb +7 -1
  86. data/lib/azure_mgmt_web/models/domain_availablility_check_result.rb +1 -1
  87. data/lib/azure_mgmt_web/models/domain_collection.rb +1 -1
  88. data/lib/azure_mgmt_web/models/domain_control_center_sso_request.rb +1 -1
  89. data/lib/azure_mgmt_web/models/domain_properties.rb +15 -5
  90. data/lib/azure_mgmt_web/models/domain_purchase_consent.rb +1 -1
  91. data/lib/azure_mgmt_web/models/domain_recommendation_search_parameters.rb +1 -1
  92. data/lib/azure_mgmt_web/models/domain_registration_input.rb +7 -1
  93. data/lib/azure_mgmt_web/models/domain_registration_input_properties.rb +15 -5
  94. data/lib/azure_mgmt_web/models/domain_status.rb +1 -1
  95. data/lib/azure_mgmt_web/models/domain_type.rb +1 -1
  96. data/lib/azure_mgmt_web/models/enabled_config.rb +1 -1
  97. data/lib/azure_mgmt_web/models/experiments.rb +1 -1
  98. data/lib/azure_mgmt_web/models/file_system_application_logs_config.rb +1 -1
  99. data/lib/azure_mgmt_web/models/file_system_http_logs_config.rb +1 -1
  100. data/lib/azure_mgmt_web/models/frequency_unit.rb +1 -1
  101. data/lib/azure_mgmt_web/models/geo_region.rb +7 -1
  102. data/lib/azure_mgmt_web/models/geo_region_collection.rb +1 -1
  103. data/lib/azure_mgmt_web/models/geo_region_properties.rb +1 -1
  104. data/lib/azure_mgmt_web/models/handler_mapping.rb +1 -1
  105. data/lib/azure_mgmt_web/models/host_name.rb +1 -1
  106. data/lib/azure_mgmt_web/models/host_name_binding.rb +7 -1
  107. data/lib/azure_mgmt_web/models/host_name_binding_collection.rb +1 -1
  108. data/lib/azure_mgmt_web/models/host_name_binding_properties.rb +1 -1
  109. data/lib/azure_mgmt_web/models/host_name_ssl_state.rb +1 -1
  110. data/lib/azure_mgmt_web/models/host_name_type.rb +1 -1
  111. data/lib/azure_mgmt_web/models/hosting_environment.rb +7 -1
  112. data/lib/azure_mgmt_web/models/hosting_environment_collection.rb +1 -1
  113. data/lib/azure_mgmt_web/models/hosting_environment_diagnostics.rb +1 -1
  114. data/lib/azure_mgmt_web/models/hosting_environment_profile.rb +1 -1
  115. data/lib/azure_mgmt_web/models/hosting_environment_properties.rb +63 -17
  116. data/lib/azure_mgmt_web/models/hosting_environment_status.rb +1 -1
  117. data/lib/azure_mgmt_web/models/http_logs_config.rb +1 -1
  118. data/lib/azure_mgmt_web/models/internal_load_balancing_mode.rb +1 -1
  119. data/lib/azure_mgmt_web/models/ip_security_restriction.rb +66 -0
  120. data/lib/azure_mgmt_web/models/key_value_pair_string_string.rb +1 -1
  121. data/lib/azure_mgmt_web/models/key_vault_secret_status.rb +24 -0
  122. data/lib/azure_mgmt_web/models/localizable_string.rb +1 -1
  123. data/lib/azure_mgmt_web/models/log_level.rb +1 -1
  124. data/lib/azure_mgmt_web/models/managed_hosting_environment.rb +7 -1
  125. data/lib/azure_mgmt_web/models/managed_hosting_environment_collection.rb +1 -1
  126. data/lib/azure_mgmt_web/models/managed_hosting_environment_properties.rb +1 -1
  127. data/lib/azure_mgmt_web/models/managed_hosting_environment_status.rb +1 -1
  128. data/lib/azure_mgmt_web/models/managed_pipeline_mode.rb +1 -1
  129. data/lib/azure_mgmt_web/models/metric_availabilily.rb +1 -1
  130. data/lib/azure_mgmt_web/models/metric_definition.rb +7 -1
  131. data/lib/azure_mgmt_web/models/metric_definition_collection.rb +1 -1
  132. data/lib/azure_mgmt_web/models/metric_definition_properties.rb +1 -1
  133. data/lib/azure_mgmt_web/models/name_identifier.rb +1 -1
  134. data/lib/azure_mgmt_web/models/name_identifier_collection.rb +1 -1
  135. data/lib/azure_mgmt_web/models/name_value_pair.rb +1 -1
  136. data/lib/azure_mgmt_web/models/network_access_control_entry.rb +1 -1
  137. data/lib/azure_mgmt_web/models/network_features.rb +7 -1
  138. data/lib/azure_mgmt_web/models/network_features_properties.rb +1 -1
  139. data/lib/azure_mgmt_web/models/notification_level.rb +1 -1
  140. data/lib/azure_mgmt_web/models/premier_add_on_request.rb +1 -1
  141. data/lib/azure_mgmt_web/models/provisioning_state.rb +1 -1
  142. data/lib/azure_mgmt_web/models/ramp_up_rule.rb +1 -1
  143. data/lib/azure_mgmt_web/models/recommendation.rb +36 -1
  144. data/lib/azure_mgmt_web/models/recommendation_rule.rb +12 -1
  145. data/lib/azure_mgmt_web/models/reissue_certificate_order_request.rb +98 -0
  146. data/lib/azure_mgmt_web/models/reissue_certificate_order_request_properties.rb +68 -0
  147. data/lib/azure_mgmt_web/models/relay_service_connection_entity.rb +7 -1
  148. data/lib/azure_mgmt_web/models/relay_service_connection_entity_properties.rb +1 -1
  149. data/lib/azure_mgmt_web/models/renew_certificate_order_request.rb +98 -0
  150. data/lib/azure_mgmt_web/models/renew_certificate_order_request_properties.rb +57 -0
  151. data/lib/azure_mgmt_web/models/requests_based_trigger.rb +1 -1
  152. data/lib/azure_mgmt_web/models/resource_metric.rb +1 -1
  153. data/lib/azure_mgmt_web/models/resource_metric_collection.rb +1 -1
  154. data/lib/azure_mgmt_web/models/resource_metric_name.rb +1 -1
  155. data/lib/azure_mgmt_web/models/resource_metric_value.rb +1 -1
  156. data/lib/azure_mgmt_web/models/resource_name_availability.rb +1 -1
  157. data/lib/azure_mgmt_web/models/resource_name_availability_request.rb +1 -1
  158. data/lib/azure_mgmt_web/models/restore_request.rb +7 -1
  159. data/lib/azure_mgmt_web/models/restore_request_properties.rb +1 -1
  160. data/lib/azure_mgmt_web/models/restore_response.rb +7 -1
  161. data/lib/azure_mgmt_web/models/restore_response_properties.rb +1 -1
  162. data/lib/azure_mgmt_web/models/routing_rule.rb +1 -1
  163. data/lib/azure_mgmt_web/models/server_farm_collection.rb +1 -1
  164. data/lib/azure_mgmt_web/models/server_farm_with_rich_sku.rb +7 -1
  165. data/lib/azure_mgmt_web/models/server_farm_with_rich_sku_properties.rb +1 -1
  166. data/lib/azure_mgmt_web/models/site.rb +7 -1
  167. data/lib/azure_mgmt_web/models/site_auth_settings.rb +13 -1
  168. data/lib/azure_mgmt_web/models/site_availability_state.rb +1 -1
  169. data/lib/azure_mgmt_web/models/site_cloneability.rb +1 -1
  170. data/lib/azure_mgmt_web/models/site_cloneability_criterion.rb +1 -1
  171. data/lib/azure_mgmt_web/models/site_collection.rb +1 -1
  172. data/lib/azure_mgmt_web/models/site_config.rb +7 -1
  173. data/lib/azure_mgmt_web/models/site_config_properties.rb +51 -21
  174. data/lib/azure_mgmt_web/models/site_instance.rb +7 -1
  175. data/lib/azure_mgmt_web/models/site_instance_collection.rb +1 -1
  176. data/lib/azure_mgmt_web/models/site_instance_properties.rb +1 -1
  177. data/lib/azure_mgmt_web/models/site_limits.rb +1 -1
  178. data/lib/azure_mgmt_web/models/site_load_balancing.rb +1 -1
  179. data/lib/azure_mgmt_web/models/site_logs_config.rb +7 -1
  180. data/lib/azure_mgmt_web/models/site_logs_config_properties.rb +1 -1
  181. data/lib/azure_mgmt_web/models/site_properties.rb +40 -1
  182. data/lib/azure_mgmt_web/models/site_source_control.rb +7 -1
  183. data/lib/azure_mgmt_web/models/site_source_control_properties.rb +1 -1
  184. data/lib/azure_mgmt_web/models/sku_capacity.rb +1 -1
  185. data/lib/azure_mgmt_web/models/sku_description.rb +1 -1
  186. data/lib/azure_mgmt_web/models/sku_info.rb +1 -1
  187. data/lib/azure_mgmt_web/models/sku_info_collection.rb +1 -1
  188. data/lib/azure_mgmt_web/models/slot_config_names.rb +1 -1
  189. data/lib/azure_mgmt_web/models/slot_config_names_resource.rb +7 -1
  190. data/lib/azure_mgmt_web/models/slot_config_names_resource_properties.rb +1 -1
  191. data/lib/azure_mgmt_web/models/slot_difference.rb +7 -1
  192. data/lib/azure_mgmt_web/models/slot_difference_collection.rb +1 -1
  193. data/lib/azure_mgmt_web/models/slot_difference_properties.rb +1 -1
  194. data/lib/azure_mgmt_web/models/slow_requests_based_trigger.rb +1 -1
  195. data/lib/azure_mgmt_web/models/source_control.rb +7 -1
  196. data/lib/azure_mgmt_web/models/source_control_collection.rb +1 -1
  197. data/lib/azure_mgmt_web/models/source_control_properties.rb +1 -1
  198. data/lib/azure_mgmt_web/models/ssl_state.rb +1 -1
  199. data/lib/azure_mgmt_web/models/stamp_capacity.rb +2 -2
  200. data/lib/azure_mgmt_web/models/stamp_capacity_collection.rb +1 -1
  201. data/lib/azure_mgmt_web/models/status_codes_based_trigger.rb +1 -1
  202. data/lib/azure_mgmt_web/models/status_options.rb +1 -1
  203. data/lib/azure_mgmt_web/models/string_dictionary.rb +7 -1
  204. data/lib/azure_mgmt_web/models/tld_legal_agreement.rb +1 -1
  205. data/lib/azure_mgmt_web/models/tld_legal_agreement_collection.rb +1 -1
  206. data/lib/azure_mgmt_web/models/top_level_domain.rb +7 -1
  207. data/lib/azure_mgmt_web/models/top_level_domain_agreement_option.rb +1 -1
  208. data/lib/azure_mgmt_web/models/top_level_domain_collection.rb +1 -1
  209. data/lib/azure_mgmt_web/models/top_level_domain_properties.rb +1 -1
  210. data/lib/azure_mgmt_web/models/unauthenticated_client_action.rb +1 -1
  211. data/lib/azure_mgmt_web/models/usage.rb +7 -1
  212. data/lib/azure_mgmt_web/models/usage_collection.rb +1 -1
  213. data/lib/azure_mgmt_web/models/usage_properties.rb +2 -2
  214. data/lib/azure_mgmt_web/models/usage_state.rb +1 -1
  215. data/lib/azure_mgmt_web/models/user.rb +7 -1
  216. data/lib/azure_mgmt_web/models/user_properties.rb +11 -1
  217. data/lib/azure_mgmt_web/models/virtual_application.rb +1 -1
  218. data/lib/azure_mgmt_web/models/virtual_directory.rb +1 -1
  219. data/lib/azure_mgmt_web/models/virtual_ipmapping.rb +1 -1
  220. data/lib/azure_mgmt_web/models/virtual_network_profile.rb +1 -1
  221. data/lib/azure_mgmt_web/models/vnet_gateway.rb +7 -1
  222. data/lib/azure_mgmt_web/models/vnet_gateway_properties.rb +1 -1
  223. data/lib/azure_mgmt_web/models/vnet_info.rb +7 -1
  224. data/lib/azure_mgmt_web/models/vnet_info_properties.rb +20 -1
  225. data/lib/azure_mgmt_web/models/vnet_route.rb +7 -1
  226. data/lib/azure_mgmt_web/models/vnet_route_properties.rb +1 -1
  227. data/lib/azure_mgmt_web/models/worker_pool.rb +7 -1
  228. data/lib/azure_mgmt_web/models/worker_pool_collection.rb +1 -1
  229. data/lib/azure_mgmt_web/models/worker_pool_properties.rb +2 -2
  230. data/lib/azure_mgmt_web/models/worker_size_options.rb +1 -1
  231. data/lib/azure_mgmt_web/module_definition.rb +1 -1
  232. data/lib/azure_mgmt_web/provider.rb +171 -28
  233. data/lib/azure_mgmt_web/recommendations.rb +183 -23
  234. data/lib/azure_mgmt_web/server_farms.rb +817 -109
  235. data/lib/azure_mgmt_web/sites.rb +7132 -1264
  236. data/lib/azure_mgmt_web/top_level_domains.rb +106 -17
  237. data/lib/azure_mgmt_web/usage_operations.rb +41 -6
  238. data/lib/azure_mgmt_web/version.rb +2 -2
  239. data/lib/azure_mgmt_web/web_site_management_client.rb +9 -1
  240. metadata +54 -24
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 93c7927ce594ea71d7a526d653e268bbea0757ff
4
- data.tar.gz: 5fadd9a084c0bd11bac2b6da94c68d184b2c2326
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ NzZlYThmYjVkNGQ3YTJiMzY2YzZlYmM0YzdlMDExZDQxZDI2OGQzOA==
5
+ data.tar.gz: !binary |-
6
+ YjNhOTAzNzAwYzM5NjRhMmE0NTBkZTQ1MjFjMzI3OTkzZGJmN2ZlZg==
5
7
  SHA512:
6
- metadata.gz: e022e340ed59f4183fb6119434496ca5e995165cd3b4ee83cd0fad39e2f01f02f9ab3eedb536026e5c34431ca4fa0dc9a497e0b691d638c858e781a27c97ae92
7
- data.tar.gz: da98f3642f31040878cdd4b65b6ad606ca93a116eec61fb32b4550052ffa904174b7983ca3e21dd9ef49fce1b93ee946ce66b391871ef8e11ad7abe1ea06f2a4
8
+ metadata.gz: !binary |-
9
+ NjYzMDBiMzE0MDg0ZGZjNmRmZWMyMzNmZmE1MDU1YmUzZWFjYTIyZWIwNzcy
10
+ OWJjODU5NGJmMDE5NjQxNDQ5MzcwMzIwZGM5YzczMDBkYjhjYWM0MDcyNzlk
11
+ OTE5NmI3ZjM0Yjg2YWI3MGM1MDRkZGRhMzg5YzkyODc4YjE5ZWY=
12
+ data.tar.gz: !binary |-
13
+ ODBiYTlkMzJhYTU5M2Y5YTRjMmFhM2VmMTMxOTM4NTcxOGUyMmMzOWZjOGIy
14
+ NTI4YjQ5OTc2NzM2Yjg1NWQ1ZGM2MTM2MmU1ZTA1MTdiYTgzN2U1Y2VlZTlj
15
+ YWM1OWY4MGExMDZmMjk5ZTlkNzE0NGM1ZDRhYjc5NGIwZmZlN2U=
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
29
29
  spec.add_development_dependency 'rake', '~> 10'
30
30
  spec.add_development_dependency 'rspec', '~> 3'
31
31
  spec.add_development_dependency 'dotenv', '~> 2'
32
- spec.add_development_dependency 'azure_mgmt_resources', '~> 0.2'
32
+ spec.add_development_dependency 'azure_mgmt_resources', '~> 0.3'
33
33
 
34
- spec.add_runtime_dependency 'ms_rest_azure', '~> 0.2.0'
34
+ spec.add_runtime_dependency 'ms_rest_azure', '~> 0.2.3'
35
35
  end
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -20,10 +20,12 @@ require 'azure_mgmt_web/module_definition'
20
20
  require 'ms_rest_azure'
21
21
 
22
22
  module Azure::ARM::Web
23
+ autoload :CertificateOrders, 'azure_mgmt_web/certificate_orders.rb'
23
24
  autoload :Certificates, 'azure_mgmt_web/certificates.rb'
24
25
  autoload :ClassicMobileServices, 'azure_mgmt_web/classic_mobile_services.rb'
25
26
  autoload :Domains, 'azure_mgmt_web/domains.rb'
26
27
  autoload :Global, 'azure_mgmt_web/global.rb'
28
+ autoload :GlobalCertificateOrder, 'azure_mgmt_web/global_certificate_order.rb'
27
29
  autoload :GlobalDomainRegistration, 'azure_mgmt_web/global_domain_registration.rb'
28
30
  autoload :GlobalResourceGroups, 'azure_mgmt_web/global_resource_groups.rb'
29
31
  autoload :HostingEnvironments, 'azure_mgmt_web/hosting_environments.rb'
@@ -37,11 +39,20 @@ module Azure::ARM::Web
37
39
  autoload :WebSiteManagementClient, 'azure_mgmt_web/web_site_management_client.rb'
38
40
 
39
41
  module Models
42
+ autoload :ArmPlan, 'azure_mgmt_web/models/arm_plan.rb'
43
+ autoload :CertificateOrderCertificateProperties, 'azure_mgmt_web/models/certificate_order_certificate_properties.rb'
44
+ autoload :SkuDescription, 'azure_mgmt_web/models/sku_description.rb'
45
+ autoload :CertificateOrderProperties, 'azure_mgmt_web/models/certificate_order_properties.rb'
46
+ autoload :CertificateDetailsProperties, 'azure_mgmt_web/models/certificate_details_properties.rb'
47
+ autoload :CertificateOrderCollection, 'azure_mgmt_web/models/certificate_order_collection.rb'
48
+ autoload :CertificateOrderCertificateCollection, 'azure_mgmt_web/models/certificate_order_certificate_collection.rb'
49
+ autoload :ReissueCertificateOrderRequestProperties, 'azure_mgmt_web/models/reissue_certificate_order_request_properties.rb'
50
+ autoload :RenewCertificateOrderRequestProperties, 'azure_mgmt_web/models/renew_certificate_order_request_properties.rb'
51
+ autoload :CertificateOrderActionProperties, 'azure_mgmt_web/models/certificate_order_action_properties.rb'
52
+ autoload :CertificateEmailProperties, 'azure_mgmt_web/models/certificate_email_properties.rb'
40
53
  autoload :CertificateCollection, 'azure_mgmt_web/models/certificate_collection.rb'
41
54
  autoload :CertificateProperties, 'azure_mgmt_web/models/certificate_properties.rb'
42
55
  autoload :HostingEnvironmentProfile, 'azure_mgmt_web/models/hosting_environment_profile.rb'
43
- autoload :ArmPlan, 'azure_mgmt_web/models/arm_plan.rb'
44
- autoload :SkuDescription, 'azure_mgmt_web/models/sku_description.rb'
45
56
  autoload :CsrProperties, 'azure_mgmt_web/models/csr_properties.rb'
46
57
  autoload :ClassicMobileServiceCollection, 'azure_mgmt_web/models/classic_mobile_service_collection.rb'
47
58
  autoload :ClassicMobileServiceProperties, 'azure_mgmt_web/models/classic_mobile_service_properties.rb'
@@ -77,6 +88,7 @@ module Azure::ARM::Web
77
88
  autoload :AutoHealCustomAction, 'azure_mgmt_web/models/auto_heal_custom_action.rb'
78
89
  autoload :CorsSettings, 'azure_mgmt_web/models/cors_settings.rb'
79
90
  autoload :ApiDefinitionInfo, 'azure_mgmt_web/models/api_definition_info.rb'
91
+ autoload :IpSecurityRestriction, 'azure_mgmt_web/models/ip_security_restriction.rb'
80
92
  autoload :CloningInfo, 'azure_mgmt_web/models/cloning_info.rb'
81
93
  autoload :RoutingRule, 'azure_mgmt_web/models/routing_rule.rb'
82
94
  autoload :SiteAuthSettings, 'azure_mgmt_web/models/site_auth_settings.rb'
@@ -168,6 +180,13 @@ module Azure::ARM::Web
168
180
  autoload :TopLevelDomainAgreementOption, 'azure_mgmt_web/models/top_level_domain_agreement_option.rb'
169
181
  autoload :TldLegalAgreementCollection, 'azure_mgmt_web/models/tld_legal_agreement_collection.rb'
170
182
  autoload :TldLegalAgreement, 'azure_mgmt_web/models/tld_legal_agreement.rb'
183
+ autoload :CertificateOrderCertificate, 'azure_mgmt_web/models/certificate_order_certificate.rb'
184
+ autoload :CertificateOrder, 'azure_mgmt_web/models/certificate_order.rb'
185
+ autoload :CertificateDetails, 'azure_mgmt_web/models/certificate_details.rb'
186
+ autoload :ReissueCertificateOrderRequest, 'azure_mgmt_web/models/reissue_certificate_order_request.rb'
187
+ autoload :RenewCertificateOrderRequest, 'azure_mgmt_web/models/renew_certificate_order_request.rb'
188
+ autoload :CertificateOrderAction, 'azure_mgmt_web/models/certificate_order_action.rb'
189
+ autoload :CertificateEmail, 'azure_mgmt_web/models/certificate_email.rb'
171
190
  autoload :Certificate, 'azure_mgmt_web/models/certificate.rb'
172
191
  autoload :Csr, 'azure_mgmt_web/models/csr.rb'
173
192
  autoload :ClassicMobileService, 'azure_mgmt_web/models/classic_mobile_service.rb'
@@ -204,8 +223,12 @@ module Azure::ARM::Web
204
223
  autoload :RestoreRequest, 'azure_mgmt_web/models/restore_request.rb'
205
224
  autoload :RestoreResponse, 'azure_mgmt_web/models/restore_response.rb'
206
225
  autoload :TopLevelDomain, 'azure_mgmt_web/models/top_level_domain.rb'
207
- autoload :DomainStatus, 'azure_mgmt_web/models/domain_status.rb'
226
+ autoload :KeyVaultSecretStatus, 'azure_mgmt_web/models/key_vault_secret_status.rb'
227
+ autoload :CertificateProductType, 'azure_mgmt_web/models/certificate_product_type.rb'
208
228
  autoload :ProvisioningState, 'azure_mgmt_web/models/provisioning_state.rb'
229
+ autoload :CertificateOrderStatus, 'azure_mgmt_web/models/certificate_order_status.rb'
230
+ autoload :CertificateOrderActionType, 'azure_mgmt_web/models/certificate_order_action_type.rb'
231
+ autoload :DomainStatus, 'azure_mgmt_web/models/domain_status.rb'
209
232
  autoload :AzureResourceType, 'azure_mgmt_web/models/azure_resource_type.rb'
210
233
  autoload :CustomHostNameDnsRecordType, 'azure_mgmt_web/models/custom_host_name_dns_record_type.rb'
211
234
  autoload :HostNameType, 'azure_mgmt_web/models/host_name_type.rb'
@@ -0,0 +1,1596 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Web
7
+ #
8
+ # Use these APIs to manage Azure Websites resources through the Azure
9
+ # Resource Manager. All task operations conform to the HTTP/1.1 protocol
10
+ # specification and each operation returns an x-ms-request-id header that
11
+ # can be used to obtain information about the request. You must make sure
12
+ # that requests made to these resources are secure. For more information,
13
+ # see <a
14
+ # href="https://msdn.microsoft.com/en-us/library/azure/dn790557.aspx">Authenticating
15
+ # Azure Resource Manager requests.</a>
16
+ #
17
+ class CertificateOrders
18
+ include Azure::ARM::Web::Models
19
+ include MsRestAzure
20
+
21
+ #
22
+ # Creates and initializes a new instance of the CertificateOrders class.
23
+ # @param client service class for accessing basic functionality.
24
+ #
25
+ def initialize(client)
26
+ @client = client
27
+ end
28
+
29
+ # @return reference to the WebSiteManagementClient
30
+ attr_reader :client
31
+
32
+ #
33
+ # Get certificate associated with the certificate order
34
+ #
35
+ # @param resource_group_name [String] Azure resource group name
36
+ # @param certificate_order_name [String] Certificate name
37
+ # @param name [String] Certificate name
38
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
39
+ # will be added to the HTTP request.
40
+ #
41
+ # @return [CertificateOrderCertificate] operation results.
42
+ #
43
+ def get_certificate(resource_group_name, certificate_order_name, name, custom_headers = nil)
44
+ response = get_certificate_async(resource_group_name, certificate_order_name, name, custom_headers).value!
45
+ response.body unless response.nil?
46
+ end
47
+
48
+ #
49
+ # Get certificate associated with the certificate order
50
+ #
51
+ # @param resource_group_name [String] Azure resource group name
52
+ # @param certificate_order_name [String] Certificate name
53
+ # @param name [String] Certificate name
54
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
55
+ # will be added to the HTTP request.
56
+ #
57
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
58
+ #
59
+ def get_certificate_with_http_info(resource_group_name, certificate_order_name, name, custom_headers = nil)
60
+ get_certificate_async(resource_group_name, certificate_order_name, name, custom_headers).value!
61
+ end
62
+
63
+ #
64
+ # Get certificate associated with the certificate order
65
+ #
66
+ # @param resource_group_name [String] Azure resource group name
67
+ # @param certificate_order_name [String] Certificate name
68
+ # @param name [String] Certificate name
69
+ # @param [Hash{String => String}] A hash of custom headers that will be added
70
+ # to the HTTP request.
71
+ #
72
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
73
+ #
74
+ def get_certificate_async(resource_group_name, certificate_order_name, name, custom_headers = nil)
75
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
76
+ fail ArgumentError, 'certificate_order_name is nil' if certificate_order_name.nil?
77
+ fail ArgumentError, 'name is nil' if name.nil?
78
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
79
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
80
+ request_headers = {}
81
+
82
+ # Set Headers
83
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
84
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
85
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'
86
+ options = {
87
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
88
+ path_params: {'resourceGroupName' => resource_group_name,'certificateOrderName' => certificate_order_name,'name' => name,'subscriptionId' => @client.subscription_id},
89
+ query_params: {'api-version' => @client.api_version},
90
+ headers: request_headers.merge(custom_headers || {})
91
+ }
92
+
93
+ request_url = @base_url || @client.base_url
94
+
95
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
96
+ promise = request.run_promise do |req|
97
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
98
+ end
99
+
100
+ promise = promise.then do |http_response|
101
+ status_code = http_response.status
102
+ response_content = http_response.body
103
+ unless status_code == 200
104
+ error_model = JSON.load(response_content)
105
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
106
+ end
107
+
108
+ # Create Result
109
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
110
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
111
+ # Deserialize Response
112
+ if status_code == 200
113
+ begin
114
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
115
+ unless parsed_response.nil?
116
+ parsed_response = CertificateOrderCertificate.deserialize_object(parsed_response)
117
+ end
118
+ result.body = parsed_response
119
+ rescue Exception => e
120
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
121
+ end
122
+ end
123
+
124
+ result
125
+ end
126
+
127
+ promise.execute
128
+ end
129
+
130
+ #
131
+ # Associates a Key Vault secret to a certificate store that will be used for
132
+ # storing the certificate once it's ready
133
+ #
134
+ # @param resource_group_name [String] Azure resource group name
135
+ # @param certificate_order_name [String] Certificate name
136
+ # @param name [String] Certificate name
137
+ # @param key_vault_certificate [CertificateOrderCertificate] Key Vault secret
138
+ # csm Id
139
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
140
+ # will be added to the HTTP request.
141
+ #
142
+ # @return [CertificateOrderCertificate] operation results.
143
+ #
144
+ def create_or_update_certificate(resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers = nil)
145
+ response = create_or_update_certificate_async(resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers).value!
146
+ response.body unless response.nil?
147
+ end
148
+
149
+ #
150
+ # Associates a Key Vault secret to a certificate store that will be used for
151
+ # storing the certificate once it's ready
152
+ #
153
+ # @param resource_group_name [String] Azure resource group name
154
+ # @param certificate_order_name [String] Certificate name
155
+ # @param name [String] Certificate name
156
+ # @param key_vault_certificate [CertificateOrderCertificate] Key Vault secret
157
+ # csm Id
158
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
159
+ # will be added to the HTTP request.
160
+ #
161
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
162
+ #
163
+ def create_or_update_certificate_with_http_info(resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers = nil)
164
+ create_or_update_certificate_async(resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers).value!
165
+ end
166
+
167
+ #
168
+ # Associates a Key Vault secret to a certificate store that will be used for
169
+ # storing the certificate once it's ready
170
+ #
171
+ # @param resource_group_name [String] Azure resource group name
172
+ # @param certificate_order_name [String] Certificate name
173
+ # @param name [String] Certificate name
174
+ # @param key_vault_certificate [CertificateOrderCertificate] Key Vault secret
175
+ # csm Id
176
+ # @param [Hash{String => String}] A hash of custom headers that will be added
177
+ # to the HTTP request.
178
+ #
179
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
180
+ #
181
+ def create_or_update_certificate_async(resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers = nil)
182
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
183
+ fail ArgumentError, 'certificate_order_name is nil' if certificate_order_name.nil?
184
+ fail ArgumentError, 'name is nil' if name.nil?
185
+ fail ArgumentError, 'key_vault_certificate is nil' if key_vault_certificate.nil?
186
+ key_vault_certificate.validate unless key_vault_certificate.nil?
187
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
188
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
189
+ request_headers = {}
190
+
191
+ # Set Headers
192
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
193
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
194
+
195
+ # Serialize Request
196
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
197
+ unless key_vault_certificate.nil?
198
+ key_vault_certificate = CertificateOrderCertificate.serialize_object(key_vault_certificate)
199
+ end
200
+ request_content = key_vault_certificate != nil ? JSON.generate(key_vault_certificate, quirks_mode: true) : nil
201
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'
202
+ options = {
203
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
204
+ path_params: {'resourceGroupName' => resource_group_name,'certificateOrderName' => certificate_order_name,'name' => name,'subscriptionId' => @client.subscription_id},
205
+ query_params: {'api-version' => @client.api_version},
206
+ body: request_content,
207
+ headers: request_headers.merge(custom_headers || {})
208
+ }
209
+
210
+ request_url = @base_url || @client.base_url
211
+
212
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
213
+ promise = request.run_promise do |req|
214
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
215
+ end
216
+
217
+ promise = promise.then do |http_response|
218
+ status_code = http_response.status
219
+ response_content = http_response.body
220
+ unless status_code == 200
221
+ error_model = JSON.load(response_content)
222
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
223
+ end
224
+
225
+ # Create Result
226
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
227
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
228
+ # Deserialize Response
229
+ if status_code == 200
230
+ begin
231
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
232
+ unless parsed_response.nil?
233
+ parsed_response = CertificateOrderCertificate.deserialize_object(parsed_response)
234
+ end
235
+ result.body = parsed_response
236
+ rescue Exception => e
237
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
238
+ end
239
+ end
240
+
241
+ result
242
+ end
243
+
244
+ promise.execute
245
+ end
246
+
247
+ #
248
+ # Deletes the certificate associated with the certificate order
249
+ #
250
+ # @param resource_group_name [String] Azure resource group name
251
+ # @param certificate_order_name [String] Certificate name
252
+ # @param name [String] Certificate name
253
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
254
+ # will be added to the HTTP request.
255
+ #
256
+ # @return [Object] operation results.
257
+ #
258
+ def delete_certificate(resource_group_name, certificate_order_name, name, custom_headers = nil)
259
+ response = delete_certificate_async(resource_group_name, certificate_order_name, name, custom_headers).value!
260
+ response.body unless response.nil?
261
+ end
262
+
263
+ #
264
+ # Deletes the certificate associated with the certificate order
265
+ #
266
+ # @param resource_group_name [String] Azure resource group name
267
+ # @param certificate_order_name [String] Certificate name
268
+ # @param name [String] Certificate name
269
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
270
+ # will be added to the HTTP request.
271
+ #
272
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
273
+ #
274
+ def delete_certificate_with_http_info(resource_group_name, certificate_order_name, name, custom_headers = nil)
275
+ delete_certificate_async(resource_group_name, certificate_order_name, name, custom_headers).value!
276
+ end
277
+
278
+ #
279
+ # Deletes the certificate associated with the certificate order
280
+ #
281
+ # @param resource_group_name [String] Azure resource group name
282
+ # @param certificate_order_name [String] Certificate name
283
+ # @param name [String] Certificate name
284
+ # @param [Hash{String => String}] A hash of custom headers that will be added
285
+ # to the HTTP request.
286
+ #
287
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
288
+ #
289
+ def delete_certificate_async(resource_group_name, certificate_order_name, name, custom_headers = nil)
290
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
291
+ fail ArgumentError, 'certificate_order_name is nil' if certificate_order_name.nil?
292
+ fail ArgumentError, 'name is nil' if name.nil?
293
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
294
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
295
+ request_headers = {}
296
+
297
+ # Set Headers
298
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
299
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
300
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'
301
+ options = {
302
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
303
+ path_params: {'resourceGroupName' => resource_group_name,'certificateOrderName' => certificate_order_name,'name' => name,'subscriptionId' => @client.subscription_id},
304
+ query_params: {'api-version' => @client.api_version},
305
+ headers: request_headers.merge(custom_headers || {})
306
+ }
307
+
308
+ request_url = @base_url || @client.base_url
309
+
310
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
311
+ promise = request.run_promise do |req|
312
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
313
+ end
314
+
315
+ promise = promise.then do |http_response|
316
+ status_code = http_response.status
317
+ response_content = http_response.body
318
+ unless status_code == 200
319
+ error_model = JSON.load(response_content)
320
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
321
+ end
322
+
323
+ # Create Result
324
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
325
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
326
+
327
+ result
328
+ end
329
+
330
+ promise.execute
331
+ end
332
+
333
+ #
334
+ # Associates a Key Vault secret to a certificate store that will be used for
335
+ # storing the certificate once it's ready
336
+ #
337
+ # @param resource_group_name [String] Azure resource group name
338
+ # @param certificate_order_name [String] Certificate name
339
+ # @param name [String] Certificate name
340
+ # @param key_vault_certificate [CertificateOrderCertificate] Key Vault secret
341
+ # csm Id
342
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
343
+ # will be added to the HTTP request.
344
+ #
345
+ # @return [CertificateOrderCertificate] operation results.
346
+ #
347
+ def update_certificate(resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers = nil)
348
+ response = update_certificate_async(resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers).value!
349
+ response.body unless response.nil?
350
+ end
351
+
352
+ #
353
+ # Associates a Key Vault secret to a certificate store that will be used for
354
+ # storing the certificate once it's ready
355
+ #
356
+ # @param resource_group_name [String] Azure resource group name
357
+ # @param certificate_order_name [String] Certificate name
358
+ # @param name [String] Certificate name
359
+ # @param key_vault_certificate [CertificateOrderCertificate] Key Vault secret
360
+ # csm Id
361
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
362
+ # will be added to the HTTP request.
363
+ #
364
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
365
+ #
366
+ def update_certificate_with_http_info(resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers = nil)
367
+ update_certificate_async(resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers).value!
368
+ end
369
+
370
+ #
371
+ # Associates a Key Vault secret to a certificate store that will be used for
372
+ # storing the certificate once it's ready
373
+ #
374
+ # @param resource_group_name [String] Azure resource group name
375
+ # @param certificate_order_name [String] Certificate name
376
+ # @param name [String] Certificate name
377
+ # @param key_vault_certificate [CertificateOrderCertificate] Key Vault secret
378
+ # csm Id
379
+ # @param [Hash{String => String}] A hash of custom headers that will be added
380
+ # to the HTTP request.
381
+ #
382
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
383
+ #
384
+ def update_certificate_async(resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers = nil)
385
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
386
+ fail ArgumentError, 'certificate_order_name is nil' if certificate_order_name.nil?
387
+ fail ArgumentError, 'name is nil' if name.nil?
388
+ fail ArgumentError, 'key_vault_certificate is nil' if key_vault_certificate.nil?
389
+ key_vault_certificate.validate unless key_vault_certificate.nil?
390
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
391
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
392
+ request_headers = {}
393
+
394
+ # Set Headers
395
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
396
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
397
+
398
+ # Serialize Request
399
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
400
+ unless key_vault_certificate.nil?
401
+ key_vault_certificate = CertificateOrderCertificate.serialize_object(key_vault_certificate)
402
+ end
403
+ request_content = key_vault_certificate != nil ? JSON.generate(key_vault_certificate, quirks_mode: true) : nil
404
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'
405
+ options = {
406
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
407
+ path_params: {'resourceGroupName' => resource_group_name,'certificateOrderName' => certificate_order_name,'name' => name,'subscriptionId' => @client.subscription_id},
408
+ query_params: {'api-version' => @client.api_version},
409
+ body: request_content,
410
+ headers: request_headers.merge(custom_headers || {})
411
+ }
412
+
413
+ request_url = @base_url || @client.base_url
414
+
415
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :patch, options)
416
+ promise = request.run_promise do |req|
417
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
418
+ end
419
+
420
+ promise = promise.then do |http_response|
421
+ status_code = http_response.status
422
+ response_content = http_response.body
423
+ unless status_code == 200
424
+ error_model = JSON.load(response_content)
425
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
426
+ end
427
+
428
+ # Create Result
429
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
430
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
431
+ # Deserialize Response
432
+ if status_code == 200
433
+ begin
434
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
435
+ unless parsed_response.nil?
436
+ parsed_response = CertificateOrderCertificate.deserialize_object(parsed_response)
437
+ end
438
+ result.body = parsed_response
439
+ rescue Exception => e
440
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
441
+ end
442
+ end
443
+
444
+ result
445
+ end
446
+
447
+ promise.execute
448
+ end
449
+
450
+ #
451
+ # Get a certificate order
452
+ #
453
+ # @param resource_group_name [String] Azure resource group name
454
+ # @param name [String] Certificate name
455
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
456
+ # will be added to the HTTP request.
457
+ #
458
+ # @return [CertificateOrder] operation results.
459
+ #
460
+ def get_certificate_order(resource_group_name, name, custom_headers = nil)
461
+ response = get_certificate_order_async(resource_group_name, name, custom_headers).value!
462
+ response.body unless response.nil?
463
+ end
464
+
465
+ #
466
+ # Get a certificate order
467
+ #
468
+ # @param resource_group_name [String] Azure resource group name
469
+ # @param name [String] Certificate name
470
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
471
+ # will be added to the HTTP request.
472
+ #
473
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
474
+ #
475
+ def get_certificate_order_with_http_info(resource_group_name, name, custom_headers = nil)
476
+ get_certificate_order_async(resource_group_name, name, custom_headers).value!
477
+ end
478
+
479
+ #
480
+ # Get a certificate order
481
+ #
482
+ # @param resource_group_name [String] Azure resource group name
483
+ # @param name [String] Certificate name
484
+ # @param [Hash{String => String}] A hash of custom headers that will be added
485
+ # to the HTTP request.
486
+ #
487
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
488
+ #
489
+ def get_certificate_order_async(resource_group_name, name, custom_headers = nil)
490
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
491
+ fail ArgumentError, 'name is nil' if name.nil?
492
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
493
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
494
+ request_headers = {}
495
+
496
+ # Set Headers
497
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
498
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
499
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}'
500
+ options = {
501
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
502
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
503
+ query_params: {'api-version' => @client.api_version},
504
+ headers: request_headers.merge(custom_headers || {})
505
+ }
506
+
507
+ request_url = @base_url || @client.base_url
508
+
509
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
510
+ promise = request.run_promise do |req|
511
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
512
+ end
513
+
514
+ promise = promise.then do |http_response|
515
+ status_code = http_response.status
516
+ response_content = http_response.body
517
+ unless status_code == 200
518
+ error_model = JSON.load(response_content)
519
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
520
+ end
521
+
522
+ # Create Result
523
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
524
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
525
+ # Deserialize Response
526
+ if status_code == 200
527
+ begin
528
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
529
+ unless parsed_response.nil?
530
+ parsed_response = CertificateOrder.deserialize_object(parsed_response)
531
+ end
532
+ result.body = parsed_response
533
+ rescue Exception => e
534
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
535
+ end
536
+ end
537
+
538
+ result
539
+ end
540
+
541
+ promise.execute
542
+ end
543
+
544
+ #
545
+ # Create or update a certificate purchase order
546
+ #
547
+ # @param resource_group_name [String] Azure resource group name
548
+ # @param name [String] Certificate name
549
+ # @param certificate_distinguished_name [CertificateOrder] Distinguished name
550
+ # to be used for purchasing certificate
551
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
552
+ # will be added to the HTTP request.
553
+ #
554
+ # @return [CertificateOrder] operation results.
555
+ #
556
+ def create_or_update_certificate_order(resource_group_name, name, certificate_distinguished_name, custom_headers = nil)
557
+ response = create_or_update_certificate_order_async(resource_group_name, name, certificate_distinguished_name, custom_headers).value!
558
+ response.body unless response.nil?
559
+ end
560
+
561
+ #
562
+ # Create or update a certificate purchase order
563
+ #
564
+ # @param resource_group_name [String] Azure resource group name
565
+ # @param name [String] Certificate name
566
+ # @param certificate_distinguished_name [CertificateOrder] Distinguished name
567
+ # to be used for purchasing certificate
568
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
569
+ # will be added to the HTTP request.
570
+ #
571
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
572
+ #
573
+ def create_or_update_certificate_order_with_http_info(resource_group_name, name, certificate_distinguished_name, custom_headers = nil)
574
+ create_or_update_certificate_order_async(resource_group_name, name, certificate_distinguished_name, custom_headers).value!
575
+ end
576
+
577
+ #
578
+ # Create or update a certificate purchase order
579
+ #
580
+ # @param resource_group_name [String] Azure resource group name
581
+ # @param name [String] Certificate name
582
+ # @param certificate_distinguished_name [CertificateOrder] Distinguished name
583
+ # to be used for purchasing certificate
584
+ # @param [Hash{String => String}] A hash of custom headers that will be added
585
+ # to the HTTP request.
586
+ #
587
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
588
+ #
589
+ def create_or_update_certificate_order_async(resource_group_name, name, certificate_distinguished_name, custom_headers = nil)
590
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
591
+ fail ArgumentError, 'name is nil' if name.nil?
592
+ fail ArgumentError, 'certificate_distinguished_name is nil' if certificate_distinguished_name.nil?
593
+ certificate_distinguished_name.validate unless certificate_distinguished_name.nil?
594
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
595
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
596
+ request_headers = {}
597
+
598
+ # Set Headers
599
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
600
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
601
+
602
+ # Serialize Request
603
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
604
+ unless certificate_distinguished_name.nil?
605
+ certificate_distinguished_name = CertificateOrder.serialize_object(certificate_distinguished_name)
606
+ end
607
+ request_content = certificate_distinguished_name != nil ? JSON.generate(certificate_distinguished_name, quirks_mode: true) : nil
608
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}'
609
+ options = {
610
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
611
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
612
+ query_params: {'api-version' => @client.api_version},
613
+ body: request_content,
614
+ headers: request_headers.merge(custom_headers || {})
615
+ }
616
+
617
+ request_url = @base_url || @client.base_url
618
+
619
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
620
+ promise = request.run_promise do |req|
621
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
622
+ end
623
+
624
+ promise = promise.then do |http_response|
625
+ status_code = http_response.status
626
+ response_content = http_response.body
627
+ unless status_code == 200
628
+ error_model = JSON.load(response_content)
629
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
630
+ end
631
+
632
+ # Create Result
633
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
634
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
635
+ # Deserialize Response
636
+ if status_code == 200
637
+ begin
638
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
639
+ unless parsed_response.nil?
640
+ parsed_response = CertificateOrder.deserialize_object(parsed_response)
641
+ end
642
+ result.body = parsed_response
643
+ rescue Exception => e
644
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
645
+ end
646
+ end
647
+
648
+ result
649
+ end
650
+
651
+ promise.execute
652
+ end
653
+
654
+ #
655
+ # Delete an existing certificate order
656
+ #
657
+ # @param resource_group_name [String] Azure resource group name
658
+ # @param name [String] Certificate name
659
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
660
+ # will be added to the HTTP request.
661
+ #
662
+ # @return [Object] operation results.
663
+ #
664
+ def delete_certificate_order(resource_group_name, name, custom_headers = nil)
665
+ response = delete_certificate_order_async(resource_group_name, name, custom_headers).value!
666
+ response.body unless response.nil?
667
+ end
668
+
669
+ #
670
+ # Delete an existing certificate order
671
+ #
672
+ # @param resource_group_name [String] Azure resource group name
673
+ # @param name [String] Certificate name
674
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
675
+ # will be added to the HTTP request.
676
+ #
677
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
678
+ #
679
+ def delete_certificate_order_with_http_info(resource_group_name, name, custom_headers = nil)
680
+ delete_certificate_order_async(resource_group_name, name, custom_headers).value!
681
+ end
682
+
683
+ #
684
+ # Delete an existing certificate order
685
+ #
686
+ # @param resource_group_name [String] Azure resource group name
687
+ # @param name [String] Certificate name
688
+ # @param [Hash{String => String}] A hash of custom headers that will be added
689
+ # to the HTTP request.
690
+ #
691
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
692
+ #
693
+ def delete_certificate_order_async(resource_group_name, name, custom_headers = nil)
694
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
695
+ fail ArgumentError, 'name is nil' if name.nil?
696
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
697
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
698
+ request_headers = {}
699
+
700
+ # Set Headers
701
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
702
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
703
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}'
704
+ options = {
705
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
706
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
707
+ query_params: {'api-version' => @client.api_version},
708
+ headers: request_headers.merge(custom_headers || {})
709
+ }
710
+
711
+ request_url = @base_url || @client.base_url
712
+
713
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
714
+ promise = request.run_promise do |req|
715
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
716
+ end
717
+
718
+ promise = promise.then do |http_response|
719
+ status_code = http_response.status
720
+ response_content = http_response.body
721
+ unless status_code == 200
722
+ error_model = JSON.load(response_content)
723
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
724
+ end
725
+
726
+ # Create Result
727
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
728
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
729
+
730
+ result
731
+ end
732
+
733
+ promise.execute
734
+ end
735
+
736
+ #
737
+ # Create or update a certificate purchase order
738
+ #
739
+ # @param resource_group_name [String] Azure resource group name
740
+ # @param name [String] Certificate name
741
+ # @param certificate_distinguished_name [CertificateOrder] Distinguished name
742
+ # to be used for purchasing certificate
743
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
744
+ # will be added to the HTTP request.
745
+ #
746
+ # @return [CertificateOrder] operation results.
747
+ #
748
+ def update_certificate_order(resource_group_name, name, certificate_distinguished_name, custom_headers = nil)
749
+ response = update_certificate_order_async(resource_group_name, name, certificate_distinguished_name, custom_headers).value!
750
+ response.body unless response.nil?
751
+ end
752
+
753
+ #
754
+ # Create or update a certificate purchase order
755
+ #
756
+ # @param resource_group_name [String] Azure resource group name
757
+ # @param name [String] Certificate name
758
+ # @param certificate_distinguished_name [CertificateOrder] Distinguished name
759
+ # to be used for purchasing certificate
760
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
761
+ # will be added to the HTTP request.
762
+ #
763
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
764
+ #
765
+ def update_certificate_order_with_http_info(resource_group_name, name, certificate_distinguished_name, custom_headers = nil)
766
+ update_certificate_order_async(resource_group_name, name, certificate_distinguished_name, custom_headers).value!
767
+ end
768
+
769
+ #
770
+ # Create or update a certificate purchase order
771
+ #
772
+ # @param resource_group_name [String] Azure resource group name
773
+ # @param name [String] Certificate name
774
+ # @param certificate_distinguished_name [CertificateOrder] Distinguished name
775
+ # to be used for purchasing certificate
776
+ # @param [Hash{String => String}] A hash of custom headers that will be added
777
+ # to the HTTP request.
778
+ #
779
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
780
+ #
781
+ def update_certificate_order_async(resource_group_name, name, certificate_distinguished_name, custom_headers = nil)
782
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
783
+ fail ArgumentError, 'name is nil' if name.nil?
784
+ fail ArgumentError, 'certificate_distinguished_name is nil' if certificate_distinguished_name.nil?
785
+ certificate_distinguished_name.validate unless certificate_distinguished_name.nil?
786
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
787
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
788
+ request_headers = {}
789
+
790
+ # Set Headers
791
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
792
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
793
+
794
+ # Serialize Request
795
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
796
+ unless certificate_distinguished_name.nil?
797
+ certificate_distinguished_name = CertificateOrder.serialize_object(certificate_distinguished_name)
798
+ end
799
+ request_content = certificate_distinguished_name != nil ? JSON.generate(certificate_distinguished_name, quirks_mode: true) : nil
800
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}'
801
+ options = {
802
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
803
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
804
+ query_params: {'api-version' => @client.api_version},
805
+ body: request_content,
806
+ headers: request_headers.merge(custom_headers || {})
807
+ }
808
+
809
+ request_url = @base_url || @client.base_url
810
+
811
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :patch, options)
812
+ promise = request.run_promise do |req|
813
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
814
+ end
815
+
816
+ promise = promise.then do |http_response|
817
+ status_code = http_response.status
818
+ response_content = http_response.body
819
+ unless status_code == 200
820
+ error_model = JSON.load(response_content)
821
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
822
+ end
823
+
824
+ # Create Result
825
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
826
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
827
+ # Deserialize Response
828
+ if status_code == 200
829
+ begin
830
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
831
+ unless parsed_response.nil?
832
+ parsed_response = CertificateOrder.deserialize_object(parsed_response)
833
+ end
834
+ result.body = parsed_response
835
+ rescue Exception => e
836
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
837
+ end
838
+ end
839
+
840
+ result
841
+ end
842
+
843
+ promise.execute
844
+ end
845
+
846
+ #
847
+ # Get certificate orders in a resource group
848
+ #
849
+ # @param resource_group_name [String] Azure resource group name
850
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
851
+ # will be added to the HTTP request.
852
+ #
853
+ # @return [CertificateOrderCollection] operation results.
854
+ #
855
+ def get_certificate_orders(resource_group_name, custom_headers = nil)
856
+ response = get_certificate_orders_async(resource_group_name, custom_headers).value!
857
+ response.body unless response.nil?
858
+ end
859
+
860
+ #
861
+ # Get certificate orders in a resource group
862
+ #
863
+ # @param resource_group_name [String] Azure resource group name
864
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
865
+ # will be added to the HTTP request.
866
+ #
867
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
868
+ #
869
+ def get_certificate_orders_with_http_info(resource_group_name, custom_headers = nil)
870
+ get_certificate_orders_async(resource_group_name, custom_headers).value!
871
+ end
872
+
873
+ #
874
+ # Get certificate orders in a resource group
875
+ #
876
+ # @param resource_group_name [String] Azure resource group name
877
+ # @param [Hash{String => String}] A hash of custom headers that will be added
878
+ # to the HTTP request.
879
+ #
880
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
881
+ #
882
+ def get_certificate_orders_async(resource_group_name, custom_headers = nil)
883
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
884
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
885
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
886
+ request_headers = {}
887
+
888
+ # Set Headers
889
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
890
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
891
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders'
892
+ options = {
893
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
894
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
895
+ query_params: {'api-version' => @client.api_version},
896
+ headers: request_headers.merge(custom_headers || {})
897
+ }
898
+
899
+ request_url = @base_url || @client.base_url
900
+
901
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
902
+ promise = request.run_promise do |req|
903
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
904
+ end
905
+
906
+ promise = promise.then do |http_response|
907
+ status_code = http_response.status
908
+ response_content = http_response.body
909
+ unless status_code == 200
910
+ error_model = JSON.load(response_content)
911
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
912
+ end
913
+
914
+ # Create Result
915
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
916
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
917
+ # Deserialize Response
918
+ if status_code == 200
919
+ begin
920
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
921
+ unless parsed_response.nil?
922
+ parsed_response = CertificateOrderCollection.deserialize_object(parsed_response)
923
+ end
924
+ result.body = parsed_response
925
+ rescue Exception => e
926
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
927
+ end
928
+ end
929
+
930
+ result
931
+ end
932
+
933
+ promise.execute
934
+ end
935
+
936
+ #
937
+ # List all certificates associated with a certificate order (only one
938
+ # certificate can be associated with an order at a time)
939
+ #
940
+ # @param resource_group_name [String] Azure resource group name
941
+ # @param certificate_order_name [String] Certificate name
942
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
943
+ # will be added to the HTTP request.
944
+ #
945
+ # @return [CertificateOrderCertificateCollection] operation results.
946
+ #
947
+ def get_certificates(resource_group_name, certificate_order_name, custom_headers = nil)
948
+ response = get_certificates_async(resource_group_name, certificate_order_name, custom_headers).value!
949
+ response.body unless response.nil?
950
+ end
951
+
952
+ #
953
+ # List all certificates associated with a certificate order (only one
954
+ # certificate can be associated with an order at a time)
955
+ #
956
+ # @param resource_group_name [String] Azure resource group name
957
+ # @param certificate_order_name [String] Certificate name
958
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
959
+ # will be added to the HTTP request.
960
+ #
961
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
962
+ #
963
+ def get_certificates_with_http_info(resource_group_name, certificate_order_name, custom_headers = nil)
964
+ get_certificates_async(resource_group_name, certificate_order_name, custom_headers).value!
965
+ end
966
+
967
+ #
968
+ # List all certificates associated with a certificate order (only one
969
+ # certificate can be associated with an order at a time)
970
+ #
971
+ # @param resource_group_name [String] Azure resource group name
972
+ # @param certificate_order_name [String] Certificate name
973
+ # @param [Hash{String => String}] A hash of custom headers that will be added
974
+ # to the HTTP request.
975
+ #
976
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
977
+ #
978
+ def get_certificates_async(resource_group_name, certificate_order_name, custom_headers = nil)
979
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
980
+ fail ArgumentError, 'certificate_order_name is nil' if certificate_order_name.nil?
981
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
982
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
983
+ request_headers = {}
984
+
985
+ # Set Headers
986
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
987
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
988
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates'
989
+ options = {
990
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
991
+ path_params: {'resourceGroupName' => resource_group_name,'certificateOrderName' => certificate_order_name,'subscriptionId' => @client.subscription_id},
992
+ query_params: {'api-version' => @client.api_version},
993
+ headers: request_headers.merge(custom_headers || {})
994
+ }
995
+
996
+ request_url = @base_url || @client.base_url
997
+
998
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
999
+ promise = request.run_promise do |req|
1000
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
1001
+ end
1002
+
1003
+ promise = promise.then do |http_response|
1004
+ status_code = http_response.status
1005
+ response_content = http_response.body
1006
+ unless status_code == 200
1007
+ error_model = JSON.load(response_content)
1008
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1009
+ end
1010
+
1011
+ # Create Result
1012
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1013
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1014
+ # Deserialize Response
1015
+ if status_code == 200
1016
+ begin
1017
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1018
+ unless parsed_response.nil?
1019
+ parsed_response = CertificateOrderCertificateCollection.deserialize_object(parsed_response)
1020
+ end
1021
+ result.body = parsed_response
1022
+ rescue Exception => e
1023
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1024
+ end
1025
+ end
1026
+
1027
+ result
1028
+ end
1029
+
1030
+ promise.execute
1031
+ end
1032
+
1033
+ #
1034
+ # Reissue an existing certificate order
1035
+ #
1036
+ # @param resource_group_name [String] Azure resource group name
1037
+ # @param name [String] Certificate name
1038
+ # @param reissue_certificate_order_request [ReissueCertificateOrderRequest]
1039
+ # Reissue parameters
1040
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1041
+ # will be added to the HTTP request.
1042
+ #
1043
+ # @return [Object] operation results.
1044
+ #
1045
+ def reissue_certificate_order(resource_group_name, name, reissue_certificate_order_request, custom_headers = nil)
1046
+ response = reissue_certificate_order_async(resource_group_name, name, reissue_certificate_order_request, custom_headers).value!
1047
+ response.body unless response.nil?
1048
+ end
1049
+
1050
+ #
1051
+ # Reissue an existing certificate order
1052
+ #
1053
+ # @param resource_group_name [String] Azure resource group name
1054
+ # @param name [String] Certificate name
1055
+ # @param reissue_certificate_order_request [ReissueCertificateOrderRequest]
1056
+ # Reissue parameters
1057
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1058
+ # will be added to the HTTP request.
1059
+ #
1060
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1061
+ #
1062
+ def reissue_certificate_order_with_http_info(resource_group_name, name, reissue_certificate_order_request, custom_headers = nil)
1063
+ reissue_certificate_order_async(resource_group_name, name, reissue_certificate_order_request, custom_headers).value!
1064
+ end
1065
+
1066
+ #
1067
+ # Reissue an existing certificate order
1068
+ #
1069
+ # @param resource_group_name [String] Azure resource group name
1070
+ # @param name [String] Certificate name
1071
+ # @param reissue_certificate_order_request [ReissueCertificateOrderRequest]
1072
+ # Reissue parameters
1073
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1074
+ # to the HTTP request.
1075
+ #
1076
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1077
+ #
1078
+ def reissue_certificate_order_async(resource_group_name, name, reissue_certificate_order_request, custom_headers = nil)
1079
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1080
+ fail ArgumentError, 'name is nil' if name.nil?
1081
+ fail ArgumentError, 'reissue_certificate_order_request is nil' if reissue_certificate_order_request.nil?
1082
+ reissue_certificate_order_request.validate unless reissue_certificate_order_request.nil?
1083
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1084
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1085
+ request_headers = {}
1086
+
1087
+ # Set Headers
1088
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1089
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1090
+
1091
+ # Serialize Request
1092
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1093
+ unless reissue_certificate_order_request.nil?
1094
+ reissue_certificate_order_request = ReissueCertificateOrderRequest.serialize_object(reissue_certificate_order_request)
1095
+ end
1096
+ request_content = reissue_certificate_order_request != nil ? JSON.generate(reissue_certificate_order_request, quirks_mode: true) : nil
1097
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/reissue'
1098
+ options = {
1099
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1100
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
1101
+ query_params: {'api-version' => @client.api_version},
1102
+ body: request_content,
1103
+ headers: request_headers.merge(custom_headers || {})
1104
+ }
1105
+
1106
+ request_url = @base_url || @client.base_url
1107
+
1108
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
1109
+ promise = request.run_promise do |req|
1110
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
1111
+ end
1112
+
1113
+ promise = promise.then do |http_response|
1114
+ status_code = http_response.status
1115
+ response_content = http_response.body
1116
+ unless status_code == 200
1117
+ error_model = JSON.load(response_content)
1118
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1119
+ end
1120
+
1121
+ # Create Result
1122
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1123
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1124
+
1125
+ result
1126
+ end
1127
+
1128
+ promise.execute
1129
+ end
1130
+
1131
+ #
1132
+ # Renew an existing certificate order
1133
+ #
1134
+ # @param resource_group_name [String] Azure resource group name
1135
+ # @param name [String] Certificate name
1136
+ # @param renew_certificate_order_request [RenewCertificateOrderRequest] Renew
1137
+ # parameters
1138
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1139
+ # will be added to the HTTP request.
1140
+ #
1141
+ # @return [Object] operation results.
1142
+ #
1143
+ def renew_certificate_order(resource_group_name, name, renew_certificate_order_request, custom_headers = nil)
1144
+ response = renew_certificate_order_async(resource_group_name, name, renew_certificate_order_request, custom_headers).value!
1145
+ response.body unless response.nil?
1146
+ end
1147
+
1148
+ #
1149
+ # Renew an existing certificate order
1150
+ #
1151
+ # @param resource_group_name [String] Azure resource group name
1152
+ # @param name [String] Certificate name
1153
+ # @param renew_certificate_order_request [RenewCertificateOrderRequest] Renew
1154
+ # parameters
1155
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1156
+ # will be added to the HTTP request.
1157
+ #
1158
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1159
+ #
1160
+ def renew_certificate_order_with_http_info(resource_group_name, name, renew_certificate_order_request, custom_headers = nil)
1161
+ renew_certificate_order_async(resource_group_name, name, renew_certificate_order_request, custom_headers).value!
1162
+ end
1163
+
1164
+ #
1165
+ # Renew an existing certificate order
1166
+ #
1167
+ # @param resource_group_name [String] Azure resource group name
1168
+ # @param name [String] Certificate name
1169
+ # @param renew_certificate_order_request [RenewCertificateOrderRequest] Renew
1170
+ # parameters
1171
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1172
+ # to the HTTP request.
1173
+ #
1174
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1175
+ #
1176
+ def renew_certificate_order_async(resource_group_name, name, renew_certificate_order_request, custom_headers = nil)
1177
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1178
+ fail ArgumentError, 'name is nil' if name.nil?
1179
+ fail ArgumentError, 'renew_certificate_order_request is nil' if renew_certificate_order_request.nil?
1180
+ renew_certificate_order_request.validate unless renew_certificate_order_request.nil?
1181
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1182
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1183
+ request_headers = {}
1184
+
1185
+ # Set Headers
1186
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1187
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1188
+
1189
+ # Serialize Request
1190
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1191
+ unless renew_certificate_order_request.nil?
1192
+ renew_certificate_order_request = RenewCertificateOrderRequest.serialize_object(renew_certificate_order_request)
1193
+ end
1194
+ request_content = renew_certificate_order_request != nil ? JSON.generate(renew_certificate_order_request, quirks_mode: true) : nil
1195
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/renew'
1196
+ options = {
1197
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1198
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
1199
+ query_params: {'api-version' => @client.api_version},
1200
+ body: request_content,
1201
+ headers: request_headers.merge(custom_headers || {})
1202
+ }
1203
+
1204
+ request_url = @base_url || @client.base_url
1205
+
1206
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
1207
+ promise = request.run_promise do |req|
1208
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
1209
+ end
1210
+
1211
+ promise = promise.then do |http_response|
1212
+ status_code = http_response.status
1213
+ response_content = http_response.body
1214
+ unless status_code == 200
1215
+ error_model = JSON.load(response_content)
1216
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1217
+ end
1218
+
1219
+ # Create Result
1220
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1221
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1222
+
1223
+ result
1224
+ end
1225
+
1226
+ promise.execute
1227
+ end
1228
+
1229
+ #
1230
+ # Retrieve the list of certificate actions
1231
+ #
1232
+ # @param resource_group_name [String] Azure resource group name
1233
+ # @param name [String] Certificate order name
1234
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1235
+ # will be added to the HTTP request.
1236
+ #
1237
+ # @return [Array] operation results.
1238
+ #
1239
+ def retrieve_certificate_actions(resource_group_name, name, custom_headers = nil)
1240
+ response = retrieve_certificate_actions_async(resource_group_name, name, custom_headers).value!
1241
+ response.body unless response.nil?
1242
+ end
1243
+
1244
+ #
1245
+ # Retrieve the list of certificate actions
1246
+ #
1247
+ # @param resource_group_name [String] Azure resource group name
1248
+ # @param name [String] Certificate order name
1249
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1250
+ # will be added to the HTTP request.
1251
+ #
1252
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1253
+ #
1254
+ def retrieve_certificate_actions_with_http_info(resource_group_name, name, custom_headers = nil)
1255
+ retrieve_certificate_actions_async(resource_group_name, name, custom_headers).value!
1256
+ end
1257
+
1258
+ #
1259
+ # Retrieve the list of certificate actions
1260
+ #
1261
+ # @param resource_group_name [String] Azure resource group name
1262
+ # @param name [String] Certificate order name
1263
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1264
+ # to the HTTP request.
1265
+ #
1266
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1267
+ #
1268
+ def retrieve_certificate_actions_async(resource_group_name, name, custom_headers = nil)
1269
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1270
+ fail ArgumentError, 'name is nil' if name.nil?
1271
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1272
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1273
+ request_headers = {}
1274
+
1275
+ # Set Headers
1276
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1277
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1278
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions'
1279
+ options = {
1280
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1281
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
1282
+ query_params: {'api-version' => @client.api_version},
1283
+ headers: request_headers.merge(custom_headers || {})
1284
+ }
1285
+
1286
+ request_url = @base_url || @client.base_url
1287
+
1288
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
1289
+ promise = request.run_promise do |req|
1290
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
1291
+ end
1292
+
1293
+ promise = promise.then do |http_response|
1294
+ status_code = http_response.status
1295
+ response_content = http_response.body
1296
+ unless status_code == 200
1297
+ error_model = JSON.load(response_content)
1298
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1299
+ end
1300
+
1301
+ # Create Result
1302
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1303
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1304
+ # Deserialize Response
1305
+ if status_code == 200
1306
+ begin
1307
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1308
+ unless parsed_response.nil?
1309
+ deserialized_array = []
1310
+ parsed_response.each do |element|
1311
+ unless element.nil?
1312
+ element = CertificateOrderAction.deserialize_object(element)
1313
+ end
1314
+ deserialized_array.push(element)
1315
+ end
1316
+ parsed_response = deserialized_array
1317
+ end
1318
+ result.body = parsed_response
1319
+ rescue Exception => e
1320
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1321
+ end
1322
+ end
1323
+
1324
+ result
1325
+ end
1326
+
1327
+ promise.execute
1328
+ end
1329
+
1330
+ #
1331
+ # Retrive email history
1332
+ #
1333
+ # @param resource_group_name [String] Azure resource group name
1334
+ # @param name [String] Certificate order name
1335
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1336
+ # will be added to the HTTP request.
1337
+ #
1338
+ # @return [Array] operation results.
1339
+ #
1340
+ def retrieve_certificate_email_history(resource_group_name, name, custom_headers = nil)
1341
+ response = retrieve_certificate_email_history_async(resource_group_name, name, custom_headers).value!
1342
+ response.body unless response.nil?
1343
+ end
1344
+
1345
+ #
1346
+ # Retrive email history
1347
+ #
1348
+ # @param resource_group_name [String] Azure resource group name
1349
+ # @param name [String] Certificate order name
1350
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1351
+ # will be added to the HTTP request.
1352
+ #
1353
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1354
+ #
1355
+ def retrieve_certificate_email_history_with_http_info(resource_group_name, name, custom_headers = nil)
1356
+ retrieve_certificate_email_history_async(resource_group_name, name, custom_headers).value!
1357
+ end
1358
+
1359
+ #
1360
+ # Retrive email history
1361
+ #
1362
+ # @param resource_group_name [String] Azure resource group name
1363
+ # @param name [String] Certificate order name
1364
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1365
+ # to the HTTP request.
1366
+ #
1367
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1368
+ #
1369
+ def retrieve_certificate_email_history_async(resource_group_name, name, custom_headers = nil)
1370
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1371
+ fail ArgumentError, 'name is nil' if name.nil?
1372
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1373
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1374
+ request_headers = {}
1375
+
1376
+ # Set Headers
1377
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1378
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1379
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory'
1380
+ options = {
1381
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1382
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
1383
+ query_params: {'api-version' => @client.api_version},
1384
+ headers: request_headers.merge(custom_headers || {})
1385
+ }
1386
+
1387
+ request_url = @base_url || @client.base_url
1388
+
1389
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
1390
+ promise = request.run_promise do |req|
1391
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
1392
+ end
1393
+
1394
+ promise = promise.then do |http_response|
1395
+ status_code = http_response.status
1396
+ response_content = http_response.body
1397
+ unless status_code == 200
1398
+ error_model = JSON.load(response_content)
1399
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1400
+ end
1401
+
1402
+ # Create Result
1403
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1404
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1405
+ # Deserialize Response
1406
+ if status_code == 200
1407
+ begin
1408
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1409
+ unless parsed_response.nil?
1410
+ deserialized_array = []
1411
+ parsed_response.each do |element|
1412
+ unless element.nil?
1413
+ element = CertificateEmail.deserialize_object(element)
1414
+ end
1415
+ deserialized_array.push(element)
1416
+ end
1417
+ parsed_response = deserialized_array
1418
+ end
1419
+ result.body = parsed_response
1420
+ rescue Exception => e
1421
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1422
+ end
1423
+ end
1424
+
1425
+ result
1426
+ end
1427
+
1428
+ promise.execute
1429
+ end
1430
+
1431
+ #
1432
+ # Resend certificate email
1433
+ #
1434
+ # @param resource_group_name [String] Azure resource group name
1435
+ # @param name [String] Certificate order name
1436
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1437
+ # will be added to the HTTP request.
1438
+ #
1439
+ # @return [Object] operation results.
1440
+ #
1441
+ def resend_certificate_email(resource_group_name, name, custom_headers = nil)
1442
+ response = resend_certificate_email_async(resource_group_name, name, custom_headers).value!
1443
+ response.body unless response.nil?
1444
+ end
1445
+
1446
+ #
1447
+ # Resend certificate email
1448
+ #
1449
+ # @param resource_group_name [String] Azure resource group name
1450
+ # @param name [String] Certificate order name
1451
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1452
+ # will be added to the HTTP request.
1453
+ #
1454
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1455
+ #
1456
+ def resend_certificate_email_with_http_info(resource_group_name, name, custom_headers = nil)
1457
+ resend_certificate_email_async(resource_group_name, name, custom_headers).value!
1458
+ end
1459
+
1460
+ #
1461
+ # Resend certificate email
1462
+ #
1463
+ # @param resource_group_name [String] Azure resource group name
1464
+ # @param name [String] Certificate order name
1465
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1466
+ # to the HTTP request.
1467
+ #
1468
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1469
+ #
1470
+ def resend_certificate_email_async(resource_group_name, name, custom_headers = nil)
1471
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1472
+ fail ArgumentError, 'name is nil' if name.nil?
1473
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1474
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1475
+ request_headers = {}
1476
+
1477
+ # Set Headers
1478
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1479
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1480
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/resendEmail'
1481
+ options = {
1482
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1483
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
1484
+ query_params: {'api-version' => @client.api_version},
1485
+ headers: request_headers.merge(custom_headers || {})
1486
+ }
1487
+
1488
+ request_url = @base_url || @client.base_url
1489
+
1490
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
1491
+ promise = request.run_promise do |req|
1492
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
1493
+ end
1494
+
1495
+ promise = promise.then do |http_response|
1496
+ status_code = http_response.status
1497
+ response_content = http_response.body
1498
+ unless status_code == 200
1499
+ error_model = JSON.load(response_content)
1500
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1501
+ end
1502
+
1503
+ # Create Result
1504
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1505
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1506
+
1507
+ result
1508
+ end
1509
+
1510
+ promise.execute
1511
+ end
1512
+
1513
+ #
1514
+ # Verify domain ownership for this certificate order
1515
+ #
1516
+ # @param resource_group_name [String] Azure resource group name
1517
+ # @param name [String] Certificate order name
1518
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1519
+ # will be added to the HTTP request.
1520
+ #
1521
+ # @return [Object] operation results.
1522
+ #
1523
+ def verify_domain_ownership(resource_group_name, name, custom_headers = nil)
1524
+ response = verify_domain_ownership_async(resource_group_name, name, custom_headers).value!
1525
+ response.body unless response.nil?
1526
+ end
1527
+
1528
+ #
1529
+ # Verify domain ownership for this certificate order
1530
+ #
1531
+ # @param resource_group_name [String] Azure resource group name
1532
+ # @param name [String] Certificate order name
1533
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1534
+ # will be added to the HTTP request.
1535
+ #
1536
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1537
+ #
1538
+ def verify_domain_ownership_with_http_info(resource_group_name, name, custom_headers = nil)
1539
+ verify_domain_ownership_async(resource_group_name, name, custom_headers).value!
1540
+ end
1541
+
1542
+ #
1543
+ # Verify domain ownership for this certificate order
1544
+ #
1545
+ # @param resource_group_name [String] Azure resource group name
1546
+ # @param name [String] Certificate order name
1547
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1548
+ # to the HTTP request.
1549
+ #
1550
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1551
+ #
1552
+ def verify_domain_ownership_async(resource_group_name, name, custom_headers = nil)
1553
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1554
+ fail ArgumentError, 'name is nil' if name.nil?
1555
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1556
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1557
+ request_headers = {}
1558
+
1559
+ # Set Headers
1560
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1561
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1562
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/verifyDomainOwnership'
1563
+ options = {
1564
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1565
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
1566
+ query_params: {'api-version' => @client.api_version},
1567
+ headers: request_headers.merge(custom_headers || {})
1568
+ }
1569
+
1570
+ request_url = @base_url || @client.base_url
1571
+
1572
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
1573
+ promise = request.run_promise do |req|
1574
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
1575
+ end
1576
+
1577
+ promise = promise.then do |http_response|
1578
+ status_code = http_response.status
1579
+ response_content = http_response.body
1580
+ unless status_code == 200
1581
+ error_model = JSON.load(response_content)
1582
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
1583
+ end
1584
+
1585
+ # Create Result
1586
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
1587
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1588
+
1589
+ result
1590
+ end
1591
+
1592
+ promise.execute
1593
+ end
1594
+
1595
+ end
1596
+ end