azure_mgmt_web 0.16.0 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (418) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2015-04-01/generated/azure_mgmt_web.rb +41 -39
  3. data/lib/2015-04-01/generated/azure_mgmt_web/domain_registration_provider.rb +1 -1
  4. data/lib/2015-04-01/generated/azure_mgmt_web/domains.rb +1 -1
  5. data/lib/2015-04-01/generated/azure_mgmt_web/models/managed_service_identity.rb +3 -2
  6. data/lib/2015-04-01/generated/azure_mgmt_web/models/managed_service_identity_type.rb +15 -0
  7. data/lib/2015-04-01/generated/azure_mgmt_web/models/site_config.rb +26 -0
  8. data/lib/2015-04-01/generated/azure_mgmt_web/models/supported_tls_versions.rb +17 -0
  9. data/lib/2015-04-01/generated/azure_mgmt_web/top_level_domains.rb +1 -1
  10. data/lib/2015-04-01/generated/azure_mgmt_web/web_site_management_client.rb +11 -10
  11. data/lib/2015-08-01/generated/azure_mgmt_web.rb +2 -0
  12. data/lib/2015-08-01/generated/azure_mgmt_web/app_service_certificate_orders.rb +1 -1
  13. data/lib/2015-08-01/generated/azure_mgmt_web/certificate_registration_provider.rb +1 -1
  14. data/lib/2015-08-01/generated/azure_mgmt_web/models/managed_service_identity.rb +3 -2
  15. data/lib/2015-08-01/generated/azure_mgmt_web/models/managed_service_identity_type.rb +15 -0
  16. data/lib/2015-08-01/generated/azure_mgmt_web/models/site_config.rb +26 -0
  17. data/lib/2015-08-01/generated/azure_mgmt_web/models/supported_tls_versions.rb +17 -0
  18. data/lib/2015-08-01/generated/azure_mgmt_web/web_site_management_client.rb +7 -6
  19. data/lib/2016-03-01/generated/azure_mgmt_web.rb +76 -52
  20. data/lib/2016-03-01/generated/azure_mgmt_web/billing_meters.rb +235 -0
  21. data/lib/2016-03-01/generated/azure_mgmt_web/certificates.rb +1 -1
  22. data/lib/2016-03-01/generated/azure_mgmt_web/deleted_web_apps.rb +1 -1
  23. data/lib/2016-03-01/generated/azure_mgmt_web/diagnostics.rb +1143 -111
  24. data/lib/2016-03-01/generated/azure_mgmt_web/models/application_stack.rb +109 -0
  25. data/lib/2016-03-01/generated/azure_mgmt_web/models/application_stack_collection.rb +99 -0
  26. data/lib/2016-03-01/generated/azure_mgmt_web/models/billing_meter.rb +126 -0
  27. data/lib/2016-03-01/generated/azure_mgmt_web/models/billing_meter_collection.rb +99 -0
  28. data/lib/2016-03-01/generated/azure_mgmt_web/models/data_table_response_column.rb +68 -0
  29. data/lib/2016-03-01/generated/azure_mgmt_web/models/data_table_response_object.rb +94 -0
  30. data/lib/2016-03-01/generated/azure_mgmt_web/models/default_error_response.rb +48 -0
  31. data/lib/2016-03-01/generated/azure_mgmt_web/models/default_error_response_error.rb +104 -0
  32. data/lib/2016-03-01/generated/azure_mgmt_web/models/default_error_response_error_details_item.rb +72 -0
  33. data/lib/2016-03-01/generated/azure_mgmt_web/models/detector_info.rb +83 -0
  34. data/lib/2016-03-01/generated/azure_mgmt_web/models/detector_response.rb +102 -0
  35. data/lib/2016-03-01/generated/azure_mgmt_web/models/detector_response_collection.rb +99 -0
  36. data/lib/2016-03-01/generated/azure_mgmt_web/models/diagnostic_data.rb +60 -0
  37. data/lib/2016-03-01/generated/azure_mgmt_web/models/managed_service_identity.rb +3 -2
  38. data/lib/2016-03-01/generated/azure_mgmt_web/models/managed_service_identity_type.rb +15 -0
  39. data/lib/2016-03-01/generated/azure_mgmt_web/models/recommendation.rb +57 -22
  40. data/lib/2016-03-01/generated/azure_mgmt_web/models/recommendation_collection.rb +99 -0
  41. data/lib/2016-03-01/generated/azure_mgmt_web/models/recommendation_rule.rb +49 -14
  42. data/lib/2016-03-01/generated/azure_mgmt_web/models/rendering.rb +71 -0
  43. data/lib/2016-03-01/generated/azure_mgmt_web/models/rendering_type.rb +18 -0
  44. data/lib/2016-03-01/generated/azure_mgmt_web/models/resource_health_metadata.rb +93 -0
  45. data/lib/2016-03-01/generated/azure_mgmt_web/models/resource_health_metadata_collection.rb +99 -0
  46. data/lib/2016-03-01/generated/azure_mgmt_web/models/site_config.rb +26 -0
  47. data/lib/2016-03-01/generated/azure_mgmt_web/models/stack_major_version.rb +90 -0
  48. data/lib/2016-03-01/generated/azure_mgmt_web/models/stack_minor_version.rb +69 -0
  49. data/lib/2016-03-01/generated/azure_mgmt_web/models/supported_tls_versions.rb +17 -0
  50. data/lib/2016-03-01/generated/azure_mgmt_web/provider.rb +277 -17
  51. data/lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb +582 -67
  52. data/lib/2016-03-01/generated/azure_mgmt_web/resource_health_metadata_operations.rb +1161 -0
  53. data/lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb +16 -6
  54. data/lib/2016-08-01/generated/azure_mgmt_web.rb +2 -0
  55. data/lib/2016-08-01/generated/azure_mgmt_web/models/managed_service_identity.rb +3 -2
  56. data/lib/2016-08-01/generated/azure_mgmt_web/models/managed_service_identity_type.rb +15 -0
  57. data/lib/2016-08-01/generated/azure_mgmt_web/models/site_config.rb +26 -0
  58. data/lib/2016-08-01/generated/azure_mgmt_web/models/site_config_resource.rb +26 -0
  59. data/lib/2016-08-01/generated/azure_mgmt_web/models/supported_tls_versions.rb +17 -0
  60. data/lib/2016-08-01/generated/azure_mgmt_web/web_apps.rb +87 -102
  61. data/lib/2016-08-01/generated/azure_mgmt_web/web_site_management_client.rb +7 -6
  62. data/lib/2016-09-01/generated/azure_mgmt_web.rb +2 -0
  63. data/lib/2016-09-01/generated/azure_mgmt_web/app_service_environments.rb +3 -3
  64. data/lib/2016-09-01/generated/azure_mgmt_web/app_service_plans.rb +1 -1
  65. data/lib/2016-09-01/generated/azure_mgmt_web/models/managed_service_identity.rb +3 -2
  66. data/lib/2016-09-01/generated/azure_mgmt_web/models/managed_service_identity_type.rb +15 -0
  67. data/lib/2016-09-01/generated/azure_mgmt_web/models/site_config.rb +26 -0
  68. data/lib/2016-09-01/generated/azure_mgmt_web/models/supported_tls_versions.rb +17 -0
  69. data/lib/2016-09-01/generated/azure_mgmt_web/web_site_management_client.rb +7 -6
  70. data/lib/2018-02-01/generated/azure_mgmt_web.rb +369 -0
  71. data/lib/2018-02-01/generated/azure_mgmt_web/app_service_certificate_orders.rb +2651 -0
  72. data/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb +8089 -0
  73. data/lib/2018-02-01/generated/azure_mgmt_web/app_service_plans.rb +4314 -0
  74. data/lib/2018-02-01/generated/azure_mgmt_web/certificate_registration_provider.rb +243 -0
  75. data/lib/2018-02-01/generated/azure_mgmt_web/certificates.rb +882 -0
  76. data/lib/2018-02-01/generated/azure_mgmt_web/deleted_web_apps.rb +231 -0
  77. data/lib/2018-02-01/generated/azure_mgmt_web/diagnostics.rb +3845 -0
  78. data/lib/2018-02-01/generated/azure_mgmt_web/domain_registration_provider.rb +243 -0
  79. data/lib/2018-02-01/generated/azure_mgmt_web/domains.rb +2145 -0
  80. data/lib/2018-02-01/generated/azure_mgmt_web/models/abnormal_time_period.rb +98 -0
  81. data/lib/2018-02-01/generated/azure_mgmt_web/models/access_control_entry_action.rb +16 -0
  82. data/lib/2018-02-01/generated/azure_mgmt_web/models/address.rb +101 -0
  83. data/lib/2018-02-01/generated/azure_mgmt_web/models/address_response.rb +97 -0
  84. data/lib/2018-02-01/generated/azure_mgmt_web/models/analysis_data.rb +118 -0
  85. data/lib/2018-02-01/generated/azure_mgmt_web/models/analysis_definition.rb +82 -0
  86. data/lib/2018-02-01/generated/azure_mgmt_web/models/api_definition_info.rb +46 -0
  87. data/lib/2018-02-01/generated/azure_mgmt_web/models/app_service_certificate.rb +76 -0
  88. data/lib/2018-02-01/generated/azure_mgmt_web/models/app_service_certificate_collection.rb +99 -0
  89. data/lib/2018-02-01/generated/azure_mgmt_web/models/app_service_certificate_order.rb +359 -0
  90. data/lib/2018-02-01/generated/azure_mgmt_web/models/app_service_certificate_order_collection.rb +99 -0
  91. data/lib/2018-02-01/generated/azure_mgmt_web/models/app_service_certificate_order_patch_resource.rb +335 -0
  92. data/lib/2018-02-01/generated/azure_mgmt_web/models/app_service_certificate_patch_resource.rb +112 -0
  93. data/lib/2018-02-01/generated/azure_mgmt_web/models/app_service_certificate_resource.rb +136 -0
  94. data/lib/2018-02-01/generated/azure_mgmt_web/models/app_service_environment.rb +570 -0
  95. data/lib/2018-02-01/generated/azure_mgmt_web/models/app_service_environment_collection.rb +99 -0
  96. data/lib/2018-02-01/generated/azure_mgmt_web/models/app_service_environment_patch_resource.rb +605 -0
  97. data/lib/2018-02-01/generated/azure_mgmt_web/models/app_service_environment_resource.rb +629 -0
  98. data/lib/2018-02-01/generated/azure_mgmt_web/models/app_service_plan.rb +329 -0
  99. data/lib/2018-02-01/generated/azure_mgmt_web/models/app_service_plan_collection.rb +99 -0
  100. data/lib/2018-02-01/generated/azure_mgmt_web/models/app_service_plan_patch_resource.rb +293 -0
  101. data/lib/2018-02-01/generated/azure_mgmt_web/models/app_service_plan_restrictions.rb +20 -0
  102. data/lib/2018-02-01/generated/azure_mgmt_web/models/application_logs_config.rb +74 -0
  103. data/lib/2018-02-01/generated/azure_mgmt_web/models/application_stack.rb +109 -0
  104. data/lib/2018-02-01/generated/azure_mgmt_web/models/application_stack_collection.rb +99 -0
  105. data/lib/2018-02-01/generated/azure_mgmt_web/models/auto_heal_action_type.rb +17 -0
  106. data/lib/2018-02-01/generated/azure_mgmt_web/models/auto_heal_actions.rb +72 -0
  107. data/lib/2018-02-01/generated/azure_mgmt_web/models/auto_heal_custom_action.rb +58 -0
  108. data/lib/2018-02-01/generated/azure_mgmt_web/models/auto_heal_rules.rb +61 -0
  109. data/lib/2018-02-01/generated/azure_mgmt_web/models/auto_heal_triggers.rb +91 -0
  110. data/lib/2018-02-01/generated/azure_mgmt_web/models/azure_blob_storage_application_logs_config.rb +73 -0
  111. data/lib/2018-02-01/generated/azure_mgmt_web/models/azure_blob_storage_http_logs_config.rb +72 -0
  112. data/lib/2018-02-01/generated/azure_mgmt_web/models/azure_resource_type.rb +16 -0
  113. data/lib/2018-02-01/generated/azure_mgmt_web/models/azure_table_storage_application_logs_config.rb +60 -0
  114. data/lib/2018-02-01/generated/azure_mgmt_web/models/backup_item.rb +257 -0
  115. data/lib/2018-02-01/generated/azure_mgmt_web/models/backup_item_collection.rb +99 -0
  116. data/lib/2018-02-01/generated/azure_mgmt_web/models/backup_item_status.rb +24 -0
  117. data/lib/2018-02-01/generated/azure_mgmt_web/models/backup_request.rb +128 -0
  118. data/lib/2018-02-01/generated/azure_mgmt_web/models/backup_restore_operation_type.rb +19 -0
  119. data/lib/2018-02-01/generated/azure_mgmt_web/models/backup_schedule.rb +116 -0
  120. data/lib/2018-02-01/generated/azure_mgmt_web/models/billing_meter.rb +137 -0
  121. data/lib/2018-02-01/generated/azure_mgmt_web/models/billing_meter_collection.rb +99 -0
  122. data/lib/2018-02-01/generated/azure_mgmt_web/models/built_in_authentication_provider.rb +19 -0
  123. data/lib/2018-02-01/generated/azure_mgmt_web/models/capability.rb +68 -0
  124. data/lib/2018-02-01/generated/azure_mgmt_web/models/certificate.rb +335 -0
  125. data/lib/2018-02-01/generated/azure_mgmt_web/models/certificate_collection.rb +99 -0
  126. data/lib/2018-02-01/generated/azure_mgmt_web/models/certificate_details.rb +143 -0
  127. data/lib/2018-02-01/generated/azure_mgmt_web/models/certificate_email.rb +92 -0
  128. data/lib/2018-02-01/generated/azure_mgmt_web/models/certificate_order_action.rb +101 -0
  129. data/lib/2018-02-01/generated/azure_mgmt_web/models/certificate_order_action_type.rb +28 -0
  130. data/lib/2018-02-01/generated/azure_mgmt_web/models/certificate_order_status.rb +24 -0
  131. data/lib/2018-02-01/generated/azure_mgmt_web/models/certificate_patch_resource.rb +311 -0
  132. data/lib/2018-02-01/generated/azure_mgmt_web/models/certificate_product_type.rb +16 -0
  133. data/lib/2018-02-01/generated/azure_mgmt_web/models/channels.rb +19 -0
  134. data/lib/2018-02-01/generated/azure_mgmt_web/models/check_name_resource_types.rb +22 -0
  135. data/lib/2018-02-01/generated/azure_mgmt_web/models/clone_ability_result.rb +17 -0
  136. data/lib/2018-02-01/generated/azure_mgmt_web/models/cloning_info.rb +170 -0
  137. data/lib/2018-02-01/generated/azure_mgmt_web/models/compute_mode_options.rb +17 -0
  138. data/lib/2018-02-01/generated/azure_mgmt_web/models/conn_string_info.rb +71 -0
  139. data/lib/2018-02-01/generated/azure_mgmt_web/models/conn_string_value_type_pair.rb +60 -0
  140. data/lib/2018-02-01/generated/azure_mgmt_web/models/connection_string_dictionary.rb +90 -0
  141. data/lib/2018-02-01/generated/azure_mgmt_web/models/connection_string_type.rb +25 -0
  142. data/lib/2018-02-01/generated/azure_mgmt_web/models/contact.rb +138 -0
  143. data/lib/2018-02-01/generated/azure_mgmt_web/models/continuous_web_job.rb +192 -0
  144. data/lib/2018-02-01/generated/azure_mgmt_web/models/continuous_web_job_collection.rb +99 -0
  145. data/lib/2018-02-01/generated/azure_mgmt_web/models/continuous_web_job_status.rb +19 -0
  146. data/lib/2018-02-01/generated/azure_mgmt_web/models/cors_settings.rb +56 -0
  147. data/lib/2018-02-01/generated/azure_mgmt_web/models/csm_move_resource_envelope.rb +71 -0
  148. data/lib/2018-02-01/generated/azure_mgmt_web/models/csm_operation_collection.rb +99 -0
  149. data/lib/2018-02-01/generated/azure_mgmt_web/models/csm_operation_description.rb +82 -0
  150. data/lib/2018-02-01/generated/azure_mgmt_web/models/csm_operation_description_properties.rb +47 -0
  151. data/lib/2018-02-01/generated/azure_mgmt_web/models/csm_operation_display.rb +79 -0
  152. data/lib/2018-02-01/generated/azure_mgmt_web/models/csm_publishing_profile_options.rb +49 -0
  153. data/lib/2018-02-01/generated/azure_mgmt_web/models/csm_slot_entity.rb +58 -0
  154. data/lib/2018-02-01/generated/azure_mgmt_web/models/csm_usage_quota.rb +91 -0
  155. data/lib/2018-02-01/generated/azure_mgmt_web/models/csm_usage_quota_collection.rb +99 -0
  156. data/lib/2018-02-01/generated/azure_mgmt_web/models/custom_host_name_dns_record_type.rb +16 -0
  157. data/lib/2018-02-01/generated/azure_mgmt_web/models/custom_hostname_analysis_result.rb +249 -0
  158. data/lib/2018-02-01/generated/azure_mgmt_web/models/data_source.rb +74 -0
  159. data/lib/2018-02-01/generated/azure_mgmt_web/models/data_table_response_column.rb +68 -0
  160. data/lib/2018-02-01/generated/azure_mgmt_web/models/data_table_response_object.rb +94 -0
  161. data/lib/2018-02-01/generated/azure_mgmt_web/models/database_backup_setting.rb +84 -0
  162. data/lib/2018-02-01/generated/azure_mgmt_web/models/database_type.rb +18 -0
  163. data/lib/2018-02-01/generated/azure_mgmt_web/models/default_error_response.rb +48 -0
  164. data/lib/2018-02-01/generated/azure_mgmt_web/models/default_error_response_error.rb +104 -0
  165. data/lib/2018-02-01/generated/azure_mgmt_web/models/default_error_response_error_details_item.rb +72 -0
  166. data/lib/2018-02-01/generated/azure_mgmt_web/models/deleted_app_restore_request.rb +107 -0
  167. data/lib/2018-02-01/generated/azure_mgmt_web/models/deleted_site.rb +107 -0
  168. data/lib/2018-02-01/generated/azure_mgmt_web/models/deleted_web_app_collection.rb +99 -0
  169. data/lib/2018-02-01/generated/azure_mgmt_web/models/deployment.rb +170 -0
  170. data/lib/2018-02-01/generated/azure_mgmt_web/models/deployment_collection.rb +99 -0
  171. data/lib/2018-02-01/generated/azure_mgmt_web/models/deployment_locations.rb +98 -0
  172. data/lib/2018-02-01/generated/azure_mgmt_web/models/detector_abnormal_time_period.rb +153 -0
  173. data/lib/2018-02-01/generated/azure_mgmt_web/models/detector_definition.rb +118 -0
  174. data/lib/2018-02-01/generated/azure_mgmt_web/models/detector_info.rb +83 -0
  175. data/lib/2018-02-01/generated/azure_mgmt_web/models/detector_response.rb +102 -0
  176. data/lib/2018-02-01/generated/azure_mgmt_web/models/detector_response_collection.rb +99 -0
  177. data/lib/2018-02-01/generated/azure_mgmt_web/models/diagnostic_analysis.rb +153 -0
  178. data/lib/2018-02-01/generated/azure_mgmt_web/models/diagnostic_analysis_collection.rb +99 -0
  179. data/lib/2018-02-01/generated/azure_mgmt_web/models/diagnostic_category.rb +82 -0
  180. data/lib/2018-02-01/generated/azure_mgmt_web/models/diagnostic_category_collection.rb +99 -0
  181. data/lib/2018-02-01/generated/azure_mgmt_web/models/diagnostic_data.rb +60 -0
  182. data/lib/2018-02-01/generated/azure_mgmt_web/models/diagnostic_detector_collection.rb +99 -0
  183. data/lib/2018-02-01/generated/azure_mgmt_web/models/diagnostic_detector_response.rb +197 -0
  184. data/lib/2018-02-01/generated/azure_mgmt_web/models/diagnostic_metric_sample.rb +109 -0
  185. data/lib/2018-02-01/generated/azure_mgmt_web/models/diagnostic_metric_set.rb +113 -0
  186. data/lib/2018-02-01/generated/azure_mgmt_web/models/dimension.rb +81 -0
  187. data/lib/2018-02-01/generated/azure_mgmt_web/models/dns_type.rb +16 -0
  188. data/lib/2018-02-01/generated/azure_mgmt_web/models/dns_verification_test_result.rb +17 -0
  189. data/lib/2018-02-01/generated/azure_mgmt_web/models/domain.rb +372 -0
  190. data/lib/2018-02-01/generated/azure_mgmt_web/models/domain_availablility_check_result.rb +73 -0
  191. data/lib/2018-02-01/generated/azure_mgmt_web/models/domain_collection.rb +99 -0
  192. data/lib/2018-02-01/generated/azure_mgmt_web/models/domain_control_center_sso_request.rb +72 -0
  193. data/lib/2018-02-01/generated/azure_mgmt_web/models/domain_ownership_identifier.rb +81 -0
  194. data/lib/2018-02-01/generated/azure_mgmt_web/models/domain_ownership_identifier_collection.rb +99 -0
  195. data/lib/2018-02-01/generated/azure_mgmt_web/models/domain_patch_resource.rb +348 -0
  196. data/lib/2018-02-01/generated/azure_mgmt_web/models/domain_purchase_consent.rb +79 -0
  197. data/lib/2018-02-01/generated/azure_mgmt_web/models/domain_recommendation_search_parameters.rb +58 -0
  198. data/lib/2018-02-01/generated/azure_mgmt_web/models/domain_status.rb +35 -0
  199. data/lib/2018-02-01/generated/azure_mgmt_web/models/domain_type.rb +16 -0
  200. data/lib/2018-02-01/generated/azure_mgmt_web/models/enabled_config.rb +47 -0
  201. data/lib/2018-02-01/generated/azure_mgmt_web/models/error_entity.rb +118 -0
  202. data/lib/2018-02-01/generated/azure_mgmt_web/models/experiments.rb +55 -0
  203. data/lib/2018-02-01/generated/azure_mgmt_web/models/file_system_application_logs_config.rb +49 -0
  204. data/lib/2018-02-01/generated/azure_mgmt_web/models/file_system_http_logs_config.rb +78 -0
  205. data/lib/2018-02-01/generated/azure_mgmt_web/models/frequency_unit.rb +16 -0
  206. data/lib/2018-02-01/generated/azure_mgmt_web/models/ftps_state.rb +17 -0
  207. data/lib/2018-02-01/generated/azure_mgmt_web/models/function_envelope.rb +177 -0
  208. data/lib/2018-02-01/generated/azure_mgmt_web/models/function_envelope_collection.rb +99 -0
  209. data/lib/2018-02-01/generated/azure_mgmt_web/models/function_secrets.rb +92 -0
  210. data/lib/2018-02-01/generated/azure_mgmt_web/models/geo_region.rb +94 -0
  211. data/lib/2018-02-01/generated/azure_mgmt_web/models/geo_region_collection.rb +99 -0
  212. data/lib/2018-02-01/generated/azure_mgmt_web/models/global_csm_sku_description.rb +131 -0
  213. data/lib/2018-02-01/generated/azure_mgmt_web/models/handler_mapping.rb +73 -0
  214. data/lib/2018-02-01/generated/azure_mgmt_web/models/host_name.rb +119 -0
  215. data/lib/2018-02-01/generated/azure_mgmt_web/models/host_name_binding.rb +179 -0
  216. data/lib/2018-02-01/generated/azure_mgmt_web/models/host_name_binding_collection.rb +99 -0
  217. data/lib/2018-02-01/generated/azure_mgmt_web/models/host_name_ssl_state.rb +106 -0
  218. data/lib/2018-02-01/generated/azure_mgmt_web/models/host_name_type.rb +16 -0
  219. data/lib/2018-02-01/generated/azure_mgmt_web/models/host_type.rb +16 -0
  220. data/lib/2018-02-01/generated/azure_mgmt_web/models/hosting_environment_deployment_info.rb +57 -0
  221. data/lib/2018-02-01/generated/azure_mgmt_web/models/hosting_environment_diagnostics.rb +57 -0
  222. data/lib/2018-02-01/generated/azure_mgmt_web/models/hosting_environment_profile.rb +70 -0
  223. data/lib/2018-02-01/generated/azure_mgmt_web/models/hosting_environment_status.rb +18 -0
  224. data/lib/2018-02-01/generated/azure_mgmt_web/models/http_logs_config.rb +61 -0
  225. data/lib/2018-02-01/generated/azure_mgmt_web/models/hybrid_connection.rb +163 -0
  226. data/lib/2018-02-01/generated/azure_mgmt_web/models/hybrid_connection_collection.rb +99 -0
  227. data/lib/2018-02-01/generated/azure_mgmt_web/models/hybrid_connection_key.rb +95 -0
  228. data/lib/2018-02-01/generated/azure_mgmt_web/models/hybrid_connection_limits.rb +95 -0
  229. data/lib/2018-02-01/generated/azure_mgmt_web/models/identifier.rb +81 -0
  230. data/lib/2018-02-01/generated/azure_mgmt_web/models/identifier_collection.rb +99 -0
  231. data/lib/2018-02-01/generated/azure_mgmt_web/models/in_availability_reason_type.rb +16 -0
  232. data/lib/2018-02-01/generated/azure_mgmt_web/models/internal_load_balancing_mode.rb +17 -0
  233. data/lib/2018-02-01/generated/azure_mgmt_web/models/ip_filter_tag.rb +16 -0
  234. data/lib/2018-02-01/generated/azure_mgmt_web/models/ip_security_restriction.rb +120 -0
  235. data/lib/2018-02-01/generated/azure_mgmt_web/models/issue_type.rb +22 -0
  236. data/lib/2018-02-01/generated/azure_mgmt_web/models/key_vault_secret_status.rb +25 -0
  237. data/lib/2018-02-01/generated/azure_mgmt_web/models/localizable_string.rb +57 -0
  238. data/lib/2018-02-01/generated/azure_mgmt_web/models/log_level.rb +19 -0
  239. data/lib/2018-02-01/generated/azure_mgmt_web/models/log_specification.rb +68 -0
  240. data/lib/2018-02-01/generated/azure_mgmt_web/models/managed_pipeline_mode.rb +16 -0
  241. data/lib/2018-02-01/generated/azure_mgmt_web/models/managed_service_identity.rb +91 -0
  242. data/lib/2018-02-01/generated/azure_mgmt_web/models/managed_service_identity_type.rb +16 -0
  243. data/lib/2018-02-01/generated/azure_mgmt_web/models/metric_availabilily.rb +57 -0
  244. data/lib/2018-02-01/generated/azure_mgmt_web/models/metric_availability.rb +57 -0
  245. data/lib/2018-02-01/generated/azure_mgmt_web/models/metric_definition.rb +128 -0
  246. data/lib/2018-02-01/generated/azure_mgmt_web/models/metric_specification.rb +218 -0
  247. data/lib/2018-02-01/generated/azure_mgmt_web/models/migrate_my_sql_request.rb +94 -0
  248. data/lib/2018-02-01/generated/azure_mgmt_web/models/migrate_my_sql_status.rb +108 -0
  249. data/lib/2018-02-01/generated/azure_mgmt_web/models/msdeploy.rb +165 -0
  250. data/lib/2018-02-01/generated/azure_mgmt_web/models/msdeploy_log.rb +91 -0
  251. data/lib/2018-02-01/generated/azure_mgmt_web/models/msdeploy_log_entry.rb +73 -0
  252. data/lib/2018-02-01/generated/azure_mgmt_web/models/msdeploy_log_entry_type.rb +17 -0
  253. data/lib/2018-02-01/generated/azure_mgmt_web/models/msdeploy_provisioning_state.rb +19 -0
  254. data/lib/2018-02-01/generated/azure_mgmt_web/models/msdeploy_status.rb +132 -0
  255. data/lib/2018-02-01/generated/azure_mgmt_web/models/my_sql_migration_type.rb +16 -0
  256. data/lib/2018-02-01/generated/azure_mgmt_web/models/name_identifier.rb +46 -0
  257. data/lib/2018-02-01/generated/azure_mgmt_web/models/name_identifier_collection.rb +99 -0
  258. data/lib/2018-02-01/generated/azure_mgmt_web/models/name_value_pair.rb +57 -0
  259. data/lib/2018-02-01/generated/azure_mgmt_web/models/network_access_control_entry.rb +81 -0
  260. data/lib/2018-02-01/generated/azure_mgmt_web/models/network_features.rb +140 -0
  261. data/lib/2018-02-01/generated/azure_mgmt_web/models/notification_level.rb +18 -0
  262. data/lib/2018-02-01/generated/azure_mgmt_web/models/operation.rb +135 -0
  263. data/lib/2018-02-01/generated/azure_mgmt_web/models/operation_status.rb +19 -0
  264. data/lib/2018-02-01/generated/azure_mgmt_web/models/perf_mon_counter_collection.rb +99 -0
  265. data/lib/2018-02-01/generated/azure_mgmt_web/models/perf_mon_response.rb +69 -0
  266. data/lib/2018-02-01/generated/azure_mgmt_web/models/perf_mon_sample.rb +68 -0
  267. data/lib/2018-02-01/generated/azure_mgmt_web/models/perf_mon_set.rb +100 -0
  268. data/lib/2018-02-01/generated/azure_mgmt_web/models/premier_add_on.rb +149 -0
  269. data/lib/2018-02-01/generated/azure_mgmt_web/models/premier_add_on_offer.rb +184 -0
  270. data/lib/2018-02-01/generated/azure_mgmt_web/models/premier_add_on_offer_collection.rb +99 -0
  271. data/lib/2018-02-01/generated/azure_mgmt_web/models/premier_add_on_patch_resource.rb +125 -0
  272. data/lib/2018-02-01/generated/azure_mgmt_web/models/private_access.rb +102 -0
  273. data/lib/2018-02-01/generated/azure_mgmt_web/models/private_access_subnet.rb +58 -0
  274. data/lib/2018-02-01/generated/azure_mgmt_web/models/private_access_virtual_network.rb +91 -0
  275. data/lib/2018-02-01/generated/azure_mgmt_web/models/process_info.rb +509 -0
  276. data/lib/2018-02-01/generated/azure_mgmt_web/models/process_info_collection.rb +99 -0
  277. data/lib/2018-02-01/generated/azure_mgmt_web/models/process_module_info.rb +192 -0
  278. data/lib/2018-02-01/generated/azure_mgmt_web/models/process_module_info_collection.rb +99 -0
  279. data/lib/2018-02-01/generated/azure_mgmt_web/models/process_thread_info.rb +214 -0
  280. data/lib/2018-02-01/generated/azure_mgmt_web/models/process_thread_info_collection.rb +99 -0
  281. data/lib/2018-02-01/generated/azure_mgmt_web/models/provisioning_state.rb +19 -0
  282. data/lib/2018-02-01/generated/azure_mgmt_web/models/proxy_only_resource.rb +83 -0
  283. data/lib/2018-02-01/generated/azure_mgmt_web/models/public_certificate.rb +106 -0
  284. data/lib/2018-02-01/generated/azure_mgmt_web/models/public_certificate_collection.rb +99 -0
  285. data/lib/2018-02-01/generated/azure_mgmt_web/models/public_certificate_location.rb +17 -0
  286. data/lib/2018-02-01/generated/azure_mgmt_web/models/publishing_profile_format.rb +17 -0
  287. data/lib/2018-02-01/generated/azure_mgmt_web/models/push_settings.rb +123 -0
  288. data/lib/2018-02-01/generated/azure_mgmt_web/models/ramp_up_rule.rb +141 -0
  289. data/lib/2018-02-01/generated/azure_mgmt_web/models/recommendation.rb +360 -0
  290. data/lib/2018-02-01/generated/azure_mgmt_web/models/recommendation_collection.rb +99 -0
  291. data/lib/2018-02-01/generated/azure_mgmt_web/models/recommendation_rule.rb +237 -0
  292. data/lib/2018-02-01/generated/azure_mgmt_web/models/reissue_certificate_order_request.rb +116 -0
  293. data/lib/2018-02-01/generated/azure_mgmt_web/models/relay_service_connection_entity.rb +147 -0
  294. data/lib/2018-02-01/generated/azure_mgmt_web/models/rendering.rb +71 -0
  295. data/lib/2018-02-01/generated/azure_mgmt_web/models/rendering_type.rb +18 -0
  296. data/lib/2018-02-01/generated/azure_mgmt_web/models/renew_certificate_order_request.rb +104 -0
  297. data/lib/2018-02-01/generated/azure_mgmt_web/models/requests_based_trigger.rb +57 -0
  298. data/lib/2018-02-01/generated/azure_mgmt_web/models/resource.rb +112 -0
  299. data/lib/2018-02-01/generated/azure_mgmt_web/models/resource_collection.rb +98 -0
  300. data/lib/2018-02-01/generated/azure_mgmt_web/models/resource_metric.rb +163 -0
  301. data/lib/2018-02-01/generated/azure_mgmt_web/models/resource_metric_availability.rb +59 -0
  302. data/lib/2018-02-01/generated/azure_mgmt_web/models/resource_metric_collection.rb +99 -0
  303. data/lib/2018-02-01/generated/azure_mgmt_web/models/resource_metric_definition.rb +148 -0
  304. data/lib/2018-02-01/generated/azure_mgmt_web/models/resource_metric_definition_collection.rb +99 -0
  305. data/lib/2018-02-01/generated/azure_mgmt_web/models/resource_metric_name.rb +59 -0
  306. data/lib/2018-02-01/generated/azure_mgmt_web/models/resource_metric_property.rb +57 -0
  307. data/lib/2018-02-01/generated/azure_mgmt_web/models/resource_metric_value.rb +129 -0
  308. data/lib/2018-02-01/generated/azure_mgmt_web/models/resource_name_availability.rb +78 -0
  309. data/lib/2018-02-01/generated/azure_mgmt_web/models/resource_name_availability_request.rb +71 -0
  310. data/lib/2018-02-01/generated/azure_mgmt_web/models/resource_scope_type.rb +17 -0
  311. data/lib/2018-02-01/generated/azure_mgmt_web/models/response_meta_data.rb +48 -0
  312. data/lib/2018-02-01/generated/azure_mgmt_web/models/restore_request.rb +217 -0
  313. data/lib/2018-02-01/generated/azure_mgmt_web/models/route_type.rb +17 -0
  314. data/lib/2018-02-01/generated/azure_mgmt_web/models/scm_type.rb +27 -0
  315. data/lib/2018-02-01/generated/azure_mgmt_web/models/service_specification.rb +76 -0
  316. data/lib/2018-02-01/generated/azure_mgmt_web/models/site.rb +554 -0
  317. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_auth_settings.rb +477 -0
  318. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_availability_state.rb +17 -0
  319. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_cloneability.rb +113 -0
  320. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_cloneability_criterion.rb +57 -0
  321. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_config.rb +676 -0
  322. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_config_resource.rb +711 -0
  323. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_config_resource_collection.rb +99 -0
  324. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_configuration_snapshot_info.rb +94 -0
  325. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_configuration_snapshot_info_collection.rb +101 -0
  326. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_extension_info.rb +301 -0
  327. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_extension_info_collection.rb +99 -0
  328. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_extension_type.rb +16 -0
  329. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_instance.rb +82 -0
  330. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_limits.rb +68 -0
  331. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_load_balancing.rb +19 -0
  332. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_logs_config.rb +118 -0
  333. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_machine_key.rb +79 -0
  334. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_patch_resource.rb +518 -0
  335. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_php_error_log_flag.rb +114 -0
  336. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_seal.rb +46 -0
  337. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_seal_request.rb +58 -0
  338. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_source_control.rb +129 -0
  339. data/lib/2018-02-01/generated/azure_mgmt_web/models/sku_capacity.rb +83 -0
  340. data/lib/2018-02-01/generated/azure_mgmt_web/models/sku_description.rb +142 -0
  341. data/lib/2018-02-01/generated/azure_mgmt_web/models/sku_info.rb +70 -0
  342. data/lib/2018-02-01/generated/azure_mgmt_web/models/sku_info_collection.rb +99 -0
  343. data/lib/2018-02-01/generated/azure_mgmt_web/models/sku_infos.rb +67 -0
  344. data/lib/2018-02-01/generated/azure_mgmt_web/models/sku_name.rb +22 -0
  345. data/lib/2018-02-01/generated/azure_mgmt_web/models/slot_config_names_resource.rb +108 -0
  346. data/lib/2018-02-01/generated/azure_mgmt_web/models/slot_difference.rb +157 -0
  347. data/lib/2018-02-01/generated/azure_mgmt_web/models/slot_difference_collection.rb +99 -0
  348. data/lib/2018-02-01/generated/azure_mgmt_web/models/slot_swap_status.rb +71 -0
  349. data/lib/2018-02-01/generated/azure_mgmt_web/models/slow_requests_based_trigger.rb +68 -0
  350. data/lib/2018-02-01/generated/azure_mgmt_web/models/snapshot.rb +82 -0
  351. data/lib/2018-02-01/generated/azure_mgmt_web/models/snapshot_collection.rb +100 -0
  352. data/lib/2018-02-01/generated/azure_mgmt_web/models/snapshot_recovery_source.rb +62 -0
  353. data/lib/2018-02-01/generated/azure_mgmt_web/models/snapshot_restore_request.rb +133 -0
  354. data/lib/2018-02-01/generated/azure_mgmt_web/models/solution.rb +148 -0
  355. data/lib/2018-02-01/generated/azure_mgmt_web/models/solution_type.rb +17 -0
  356. data/lib/2018-02-01/generated/azure_mgmt_web/models/source_control.rb +114 -0
  357. data/lib/2018-02-01/generated/azure_mgmt_web/models/source_control_collection.rb +99 -0
  358. data/lib/2018-02-01/generated/azure_mgmt_web/models/ssl_state.rb +17 -0
  359. data/lib/2018-02-01/generated/azure_mgmt_web/models/stack_major_version.rb +90 -0
  360. data/lib/2018-02-01/generated/azure_mgmt_web/models/stack_minor_version.rb +69 -0
  361. data/lib/2018-02-01/generated/azure_mgmt_web/models/stamp_capacity.rb +167 -0
  362. data/lib/2018-02-01/generated/azure_mgmt_web/models/stamp_capacity_collection.rb +99 -0
  363. data/lib/2018-02-01/generated/azure_mgmt_web/models/status_codes_based_trigger.rb +90 -0
  364. data/lib/2018-02-01/generated/azure_mgmt_web/models/status_options.rb +17 -0
  365. data/lib/2018-02-01/generated/azure_mgmt_web/models/storage_migration_options.rb +119 -0
  366. data/lib/2018-02-01/generated/azure_mgmt_web/models/storage_migration_response.rb +83 -0
  367. data/lib/2018-02-01/generated/azure_mgmt_web/models/string_dictionary.rb +89 -0
  368. data/lib/2018-02-01/generated/azure_mgmt_web/models/supported_tls_versions.rb +17 -0
  369. data/lib/2018-02-01/generated/azure_mgmt_web/models/swift_virtual_network.rb +96 -0
  370. data/lib/2018-02-01/generated/azure_mgmt_web/models/tld_legal_agreement.rb +79 -0
  371. data/lib/2018-02-01/generated/azure_mgmt_web/models/tld_legal_agreement_collection.rb +99 -0
  372. data/lib/2018-02-01/generated/azure_mgmt_web/models/top_level_domain.rb +82 -0
  373. data/lib/2018-02-01/generated/azure_mgmt_web/models/top_level_domain_agreement_option.rb +61 -0
  374. data/lib/2018-02-01/generated/azure_mgmt_web/models/top_level_domain_collection.rb +99 -0
  375. data/lib/2018-02-01/generated/azure_mgmt_web/models/triggered_job_history.rb +91 -0
  376. data/lib/2018-02-01/generated/azure_mgmt_web/models/triggered_job_history_collection.rb +99 -0
  377. data/lib/2018-02-01/generated/azure_mgmt_web/models/triggered_job_run.rb +193 -0
  378. data/lib/2018-02-01/generated/azure_mgmt_web/models/triggered_web_job.rb +191 -0
  379. data/lib/2018-02-01/generated/azure_mgmt_web/models/triggered_web_job_collection.rb +99 -0
  380. data/lib/2018-02-01/generated/azure_mgmt_web/models/triggered_web_job_status.rb +17 -0
  381. data/lib/2018-02-01/generated/azure_mgmt_web/models/unauthenticated_client_action.rb +16 -0
  382. data/lib/2018-02-01/generated/azure_mgmt_web/models/usage.rb +168 -0
  383. data/lib/2018-02-01/generated/azure_mgmt_web/models/usage_collection.rb +99 -0
  384. data/lib/2018-02-01/generated/azure_mgmt_web/models/usage_state.rb +16 -0
  385. data/lib/2018-02-01/generated/azure_mgmt_web/models/user.rb +125 -0
  386. data/lib/2018-02-01/generated/azure_mgmt_web/models/validate_request.rb +155 -0
  387. data/lib/2018-02-01/generated/azure_mgmt_web/models/validate_resource_types.rb +16 -0
  388. data/lib/2018-02-01/generated/azure_mgmt_web/models/validate_response.rb +59 -0
  389. data/lib/2018-02-01/generated/azure_mgmt_web/models/validate_response_error.rb +57 -0
  390. data/lib/2018-02-01/generated/azure_mgmt_web/models/virtual_application.rb +90 -0
  391. data/lib/2018-02-01/generated/azure_mgmt_web/models/virtual_directory.rb +57 -0
  392. data/lib/2018-02-01/generated/azure_mgmt_web/models/virtual_ipmapping.rb +79 -0
  393. data/lib/2018-02-01/generated/azure_mgmt_web/models/virtual_network_profile.rb +81 -0
  394. data/lib/2018-02-01/generated/azure_mgmt_web/models/vnet_gateway.rb +93 -0
  395. data/lib/2018-02-01/generated/azure_mgmt_web/models/vnet_info.rb +153 -0
  396. data/lib/2018-02-01/generated/azure_mgmt_web/models/vnet_parameters.rb +103 -0
  397. data/lib/2018-02-01/generated/azure_mgmt_web/models/vnet_route.rb +115 -0
  398. data/lib/2018-02-01/generated/azure_mgmt_web/models/vnet_validation_failure_details.rb +102 -0
  399. data/lib/2018-02-01/generated/azure_mgmt_web/models/vnet_validation_test_failure.rb +93 -0
  400. data/lib/2018-02-01/generated/azure_mgmt_web/models/web_app_collection.rb +99 -0
  401. data/lib/2018-02-01/generated/azure_mgmt_web/models/web_app_instance_collection.rb +99 -0
  402. data/lib/2018-02-01/generated/azure_mgmt_web/models/web_job.rb +157 -0
  403. data/lib/2018-02-01/generated/azure_mgmt_web/models/web_job_collection.rb +99 -0
  404. data/lib/2018-02-01/generated/azure_mgmt_web/models/web_job_type.rb +16 -0
  405. data/lib/2018-02-01/generated/azure_mgmt_web/models/worker_pool.rb +102 -0
  406. data/lib/2018-02-01/generated/azure_mgmt_web/models/worker_pool_collection.rb +99 -0
  407. data/lib/2018-02-01/generated/azure_mgmt_web/models/worker_pool_resource.rb +149 -0
  408. data/lib/2018-02-01/generated/azure_mgmt_web/models/worker_size_options.rb +21 -0
  409. data/lib/2018-02-01/generated/azure_mgmt_web/module_definition.rb +9 -0
  410. data/lib/2018-02-01/generated/azure_mgmt_web/provider.rb +661 -0
  411. data/lib/2018-02-01/generated/azure_mgmt_web/recommendations.rb +1331 -0
  412. data/lib/2018-02-01/generated/azure_mgmt_web/top_level_domains.rb +566 -0
  413. data/lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb +45908 -0
  414. data/lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb +2701 -0
  415. data/lib/azure_mgmt_web.rb +3 -2
  416. data/lib/profiles/latest/modules/web_profile_module.rb +1045 -969
  417. data/lib/version.rb +1 -1
  418. metadata +382 -5
@@ -0,0 +1,243 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::Web::Mgmt::V2018_02_01
7
+ #
8
+ # WebSite Management Client
9
+ #
10
+ class DomainRegistrationProvider
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the DomainRegistrationProvider class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [WebSiteManagementClient] reference to the WebSiteManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Implements Csm operations Api to exposes the list of available Csm Apis under
26
+ # the resource provider
27
+ #
28
+ # Implements Csm operations Api to exposes the list of available Csm Apis under
29
+ # the resource provider
30
+ #
31
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
32
+ # will be added to the HTTP request.
33
+ #
34
+ # @return [Array<CsmOperationDescription>] operation results.
35
+ #
36
+ def list_operations(custom_headers:nil)
37
+ first_page = list_operations_as_lazy(custom_headers:custom_headers)
38
+ first_page.get_all_items
39
+ end
40
+
41
+ #
42
+ # Implements Csm operations Api to exposes the list of available Csm Apis under
43
+ # the resource provider
44
+ #
45
+ # Implements Csm operations Api to exposes the list of available Csm Apis under
46
+ # the resource provider
47
+ #
48
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
49
+ # will be added to the HTTP request.
50
+ #
51
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
52
+ #
53
+ def list_operations_with_http_info(custom_headers:nil)
54
+ list_operations_async(custom_headers:custom_headers).value!
55
+ end
56
+
57
+ #
58
+ # Implements Csm operations Api to exposes the list of available Csm Apis under
59
+ # the resource provider
60
+ #
61
+ # Implements Csm operations Api to exposes the list of available Csm Apis under
62
+ # the resource provider
63
+ #
64
+ # @param [Hash{String => String}] A hash of custom headers that will be added
65
+ # to the HTTP request.
66
+ #
67
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
68
+ #
69
+ def list_operations_async(custom_headers:nil)
70
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
71
+
72
+
73
+ request_headers = {}
74
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
75
+
76
+ # Set Headers
77
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
78
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
79
+ path_template = 'providers/Microsoft.DomainRegistration/operations'
80
+
81
+ request_url = @base_url || @client.base_url
82
+
83
+ options = {
84
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
85
+ query_params: {'api-version' => @client.api_version},
86
+ headers: request_headers.merge(custom_headers || {}),
87
+ base_url: request_url
88
+ }
89
+ promise = @client.make_request_async(:get, path_template, options)
90
+
91
+ promise = promise.then do |result|
92
+ http_response = result.response
93
+ status_code = http_response.status
94
+ response_content = http_response.body
95
+ unless status_code == 200
96
+ error_model = JSON.load(response_content)
97
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
98
+ end
99
+
100
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
101
+ # Deserialize Response
102
+ if status_code == 200
103
+ begin
104
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
105
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::CsmOperationCollection.mapper()
106
+ result.body = @client.deserialize(result_mapper, parsed_response)
107
+ rescue Exception => e
108
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
109
+ end
110
+ end
111
+
112
+ result
113
+ end
114
+
115
+ promise.execute
116
+ end
117
+
118
+ #
119
+ # Implements Csm operations Api to exposes the list of available Csm Apis under
120
+ # the resource provider
121
+ #
122
+ # Implements Csm operations Api to exposes the list of available Csm Apis under
123
+ # the resource provider
124
+ #
125
+ # @param next_page_link [String] The NextLink from the previous successful call
126
+ # to List operation.
127
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
128
+ # will be added to the HTTP request.
129
+ #
130
+ # @return [CsmOperationCollection] operation results.
131
+ #
132
+ def list_operations_next(next_page_link, custom_headers:nil)
133
+ response = list_operations_next_async(next_page_link, custom_headers:custom_headers).value!
134
+ response.body unless response.nil?
135
+ end
136
+
137
+ #
138
+ # Implements Csm operations Api to exposes the list of available Csm Apis under
139
+ # the resource provider
140
+ #
141
+ # Implements Csm operations Api to exposes the list of available Csm Apis under
142
+ # the resource provider
143
+ #
144
+ # @param next_page_link [String] The NextLink from the previous successful call
145
+ # to List operation.
146
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
147
+ # will be added to the HTTP request.
148
+ #
149
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
150
+ #
151
+ def list_operations_next_with_http_info(next_page_link, custom_headers:nil)
152
+ list_operations_next_async(next_page_link, custom_headers:custom_headers).value!
153
+ end
154
+
155
+ #
156
+ # Implements Csm operations Api to exposes the list of available Csm Apis under
157
+ # the resource provider
158
+ #
159
+ # Implements Csm operations Api to exposes the list of available Csm Apis under
160
+ # the resource provider
161
+ #
162
+ # @param next_page_link [String] The NextLink from the previous successful call
163
+ # to List operation.
164
+ # @param [Hash{String => String}] A hash of custom headers that will be added
165
+ # to the HTTP request.
166
+ #
167
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
168
+ #
169
+ def list_operations_next_async(next_page_link, custom_headers:nil)
170
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
171
+
172
+
173
+ request_headers = {}
174
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
175
+
176
+ # Set Headers
177
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
178
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
179
+ path_template = '{nextLink}'
180
+
181
+ request_url = @base_url || @client.base_url
182
+
183
+ options = {
184
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
185
+ skip_encoding_path_params: {'nextLink' => next_page_link},
186
+ headers: request_headers.merge(custom_headers || {}),
187
+ base_url: request_url
188
+ }
189
+ promise = @client.make_request_async(:get, path_template, options)
190
+
191
+ promise = promise.then do |result|
192
+ http_response = result.response
193
+ status_code = http_response.status
194
+ response_content = http_response.body
195
+ unless status_code == 200
196
+ error_model = JSON.load(response_content)
197
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
198
+ end
199
+
200
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
201
+ # Deserialize Response
202
+ if status_code == 200
203
+ begin
204
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
205
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::CsmOperationCollection.mapper()
206
+ result.body = @client.deserialize(result_mapper, parsed_response)
207
+ rescue Exception => e
208
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
209
+ end
210
+ end
211
+
212
+ result
213
+ end
214
+
215
+ promise.execute
216
+ end
217
+
218
+ #
219
+ # Implements Csm operations Api to exposes the list of available Csm Apis under
220
+ # the resource provider
221
+ #
222
+ # Implements Csm operations Api to exposes the list of available Csm Apis under
223
+ # the resource provider
224
+ #
225
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
226
+ # will be added to the HTTP request.
227
+ #
228
+ # @return [CsmOperationCollection] which provide lazy access to pages of the
229
+ # response.
230
+ #
231
+ def list_operations_as_lazy(custom_headers:nil)
232
+ response = list_operations_async(custom_headers:custom_headers).value!
233
+ unless response.nil?
234
+ page = response.body
235
+ page.next_method = Proc.new do |next_page_link|
236
+ list_operations_next_async(next_page_link, custom_headers:custom_headers)
237
+ end
238
+ page
239
+ end
240
+ end
241
+
242
+ end
243
+ end
@@ -0,0 +1,2145 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::Web::Mgmt::V2018_02_01
7
+ #
8
+ # WebSite Management Client
9
+ #
10
+ class Domains
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Domains class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [WebSiteManagementClient] reference to the WebSiteManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Check if a domain is available for registration.
26
+ #
27
+ # Check if a domain is available for registration.
28
+ #
29
+ # @param identifier [NameIdentifier] Name of the domain.
30
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
31
+ # will be added to the HTTP request.
32
+ #
33
+ # @return [DomainAvailablilityCheckResult] operation results.
34
+ #
35
+ def check_availability(identifier, custom_headers:nil)
36
+ response = check_availability_async(identifier, custom_headers:custom_headers).value!
37
+ response.body unless response.nil?
38
+ end
39
+
40
+ #
41
+ # Check if a domain is available for registration.
42
+ #
43
+ # Check if a domain is available for registration.
44
+ #
45
+ # @param identifier [NameIdentifier] Name of the domain.
46
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
47
+ # will be added to the HTTP request.
48
+ #
49
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
50
+ #
51
+ def check_availability_with_http_info(identifier, custom_headers:nil)
52
+ check_availability_async(identifier, custom_headers:custom_headers).value!
53
+ end
54
+
55
+ #
56
+ # Check if a domain is available for registration.
57
+ #
58
+ # Check if a domain is available for registration.
59
+ #
60
+ # @param identifier [NameIdentifier] Name of the domain.
61
+ # @param [Hash{String => String}] A hash of custom headers that will be added
62
+ # to the HTTP request.
63
+ #
64
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
65
+ #
66
+ def check_availability_async(identifier, custom_headers:nil)
67
+ fail ArgumentError, 'identifier is nil' if identifier.nil?
68
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
69
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
70
+
71
+
72
+ request_headers = {}
73
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
74
+
75
+ # Set Headers
76
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
77
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
78
+
79
+ # Serialize Request
80
+ request_mapper = Azure::Web::Mgmt::V2018_02_01::Models::NameIdentifier.mapper()
81
+ request_content = @client.serialize(request_mapper, identifier)
82
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
83
+
84
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability'
85
+
86
+ request_url = @base_url || @client.base_url
87
+
88
+ options = {
89
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
90
+ path_params: {'subscriptionId' => @client.subscription_id},
91
+ query_params: {'api-version' => @client.api_version},
92
+ body: request_content,
93
+ headers: request_headers.merge(custom_headers || {}),
94
+ base_url: request_url
95
+ }
96
+ promise = @client.make_request_async(:post, path_template, options)
97
+
98
+ promise = promise.then do |result|
99
+ http_response = result.response
100
+ status_code = http_response.status
101
+ response_content = http_response.body
102
+ unless status_code == 200
103
+ error_model = JSON.load(response_content)
104
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
105
+ end
106
+
107
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
108
+ # Deserialize Response
109
+ if status_code == 200
110
+ begin
111
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
112
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DomainAvailablilityCheckResult.mapper()
113
+ result.body = @client.deserialize(result_mapper, parsed_response)
114
+ rescue Exception => e
115
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
116
+ end
117
+ end
118
+
119
+ result
120
+ end
121
+
122
+ promise.execute
123
+ end
124
+
125
+ #
126
+ # Get all domains in a subscription.
127
+ #
128
+ # Get all domains in a subscription.
129
+ #
130
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
131
+ # will be added to the HTTP request.
132
+ #
133
+ # @return [Array<Domain>] operation results.
134
+ #
135
+ def list(custom_headers:nil)
136
+ first_page = list_as_lazy(custom_headers:custom_headers)
137
+ first_page.get_all_items
138
+ end
139
+
140
+ #
141
+ # Get all domains in a subscription.
142
+ #
143
+ # Get all domains in a subscription.
144
+ #
145
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
146
+ # will be added to the HTTP request.
147
+ #
148
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
149
+ #
150
+ def list_with_http_info(custom_headers:nil)
151
+ list_async(custom_headers:custom_headers).value!
152
+ end
153
+
154
+ #
155
+ # Get all domains in a subscription.
156
+ #
157
+ # Get all domains in a subscription.
158
+ #
159
+ # @param [Hash{String => String}] A hash of custom headers that will be added
160
+ # to the HTTP request.
161
+ #
162
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
163
+ #
164
+ def list_async(custom_headers:nil)
165
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
166
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
167
+
168
+
169
+ request_headers = {}
170
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
171
+
172
+ # Set Headers
173
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
174
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
175
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains'
176
+
177
+ request_url = @base_url || @client.base_url
178
+
179
+ options = {
180
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
181
+ path_params: {'subscriptionId' => @client.subscription_id},
182
+ query_params: {'api-version' => @client.api_version},
183
+ headers: request_headers.merge(custom_headers || {}),
184
+ base_url: request_url
185
+ }
186
+ promise = @client.make_request_async(:get, path_template, options)
187
+
188
+ promise = promise.then do |result|
189
+ http_response = result.response
190
+ status_code = http_response.status
191
+ response_content = http_response.body
192
+ unless status_code == 200
193
+ error_model = JSON.load(response_content)
194
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
195
+ end
196
+
197
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
198
+ # Deserialize Response
199
+ if status_code == 200
200
+ begin
201
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
202
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DomainCollection.mapper()
203
+ result.body = @client.deserialize(result_mapper, parsed_response)
204
+ rescue Exception => e
205
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
206
+ end
207
+ end
208
+
209
+ result
210
+ end
211
+
212
+ promise.execute
213
+ end
214
+
215
+ #
216
+ # Generate a single sign-on request for the domain management portal.
217
+ #
218
+ # Generate a single sign-on request for the domain management portal.
219
+ #
220
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
221
+ # will be added to the HTTP request.
222
+ #
223
+ # @return [DomainControlCenterSsoRequest] operation results.
224
+ #
225
+ def get_control_center_sso_request(custom_headers:nil)
226
+ response = get_control_center_sso_request_async(custom_headers:custom_headers).value!
227
+ response.body unless response.nil?
228
+ end
229
+
230
+ #
231
+ # Generate a single sign-on request for the domain management portal.
232
+ #
233
+ # Generate a single sign-on request for the domain management portal.
234
+ #
235
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
236
+ # will be added to the HTTP request.
237
+ #
238
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
239
+ #
240
+ def get_control_center_sso_request_with_http_info(custom_headers:nil)
241
+ get_control_center_sso_request_async(custom_headers:custom_headers).value!
242
+ end
243
+
244
+ #
245
+ # Generate a single sign-on request for the domain management portal.
246
+ #
247
+ # Generate a single sign-on request for the domain management portal.
248
+ #
249
+ # @param [Hash{String => String}] A hash of custom headers that will be added
250
+ # to the HTTP request.
251
+ #
252
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
253
+ #
254
+ def get_control_center_sso_request_async(custom_headers:nil)
255
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
256
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
257
+
258
+
259
+ request_headers = {}
260
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
261
+
262
+ # Set Headers
263
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
264
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
265
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest'
266
+
267
+ request_url = @base_url || @client.base_url
268
+
269
+ options = {
270
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
271
+ path_params: {'subscriptionId' => @client.subscription_id},
272
+ query_params: {'api-version' => @client.api_version},
273
+ headers: request_headers.merge(custom_headers || {}),
274
+ base_url: request_url
275
+ }
276
+ promise = @client.make_request_async(:post, path_template, options)
277
+
278
+ promise = promise.then do |result|
279
+ http_response = result.response
280
+ status_code = http_response.status
281
+ response_content = http_response.body
282
+ unless status_code == 200
283
+ error_model = JSON.load(response_content)
284
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
285
+ end
286
+
287
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
288
+ # Deserialize Response
289
+ if status_code == 200
290
+ begin
291
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
292
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DomainControlCenterSsoRequest.mapper()
293
+ result.body = @client.deserialize(result_mapper, parsed_response)
294
+ rescue Exception => e
295
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
296
+ end
297
+ end
298
+
299
+ result
300
+ end
301
+
302
+ promise.execute
303
+ end
304
+
305
+ #
306
+ # Get domain name recommendations based on keywords.
307
+ #
308
+ # Get domain name recommendations based on keywords.
309
+ #
310
+ # @param parameters [DomainRecommendationSearchParameters] Search parameters
311
+ # for domain name recommendations.
312
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
313
+ # will be added to the HTTP request.
314
+ #
315
+ # @return [Array<NameIdentifier>] operation results.
316
+ #
317
+ def list_recommendations(parameters, custom_headers:nil)
318
+ first_page = list_recommendations_as_lazy(parameters, custom_headers:custom_headers)
319
+ first_page.get_all_items
320
+ end
321
+
322
+ #
323
+ # Get domain name recommendations based on keywords.
324
+ #
325
+ # Get domain name recommendations based on keywords.
326
+ #
327
+ # @param parameters [DomainRecommendationSearchParameters] Search parameters
328
+ # for domain name recommendations.
329
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
330
+ # will be added to the HTTP request.
331
+ #
332
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
333
+ #
334
+ def list_recommendations_with_http_info(parameters, custom_headers:nil)
335
+ list_recommendations_async(parameters, custom_headers:custom_headers).value!
336
+ end
337
+
338
+ #
339
+ # Get domain name recommendations based on keywords.
340
+ #
341
+ # Get domain name recommendations based on keywords.
342
+ #
343
+ # @param parameters [DomainRecommendationSearchParameters] Search parameters
344
+ # for domain name recommendations.
345
+ # @param [Hash{String => String}] A hash of custom headers that will be added
346
+ # to the HTTP request.
347
+ #
348
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
349
+ #
350
+ def list_recommendations_async(parameters, custom_headers:nil)
351
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
352
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
353
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
354
+
355
+
356
+ request_headers = {}
357
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
358
+
359
+ # Set Headers
360
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
361
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
362
+
363
+ # Serialize Request
364
+ request_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DomainRecommendationSearchParameters.mapper()
365
+ request_content = @client.serialize(request_mapper, parameters)
366
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
367
+
368
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations'
369
+
370
+ request_url = @base_url || @client.base_url
371
+
372
+ options = {
373
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
374
+ path_params: {'subscriptionId' => @client.subscription_id},
375
+ query_params: {'api-version' => @client.api_version},
376
+ body: request_content,
377
+ headers: request_headers.merge(custom_headers || {}),
378
+ base_url: request_url
379
+ }
380
+ promise = @client.make_request_async(:post, path_template, options)
381
+
382
+ promise = promise.then do |result|
383
+ http_response = result.response
384
+ status_code = http_response.status
385
+ response_content = http_response.body
386
+ unless status_code == 200
387
+ error_model = JSON.load(response_content)
388
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
389
+ end
390
+
391
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
392
+ # Deserialize Response
393
+ if status_code == 200
394
+ begin
395
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
396
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::NameIdentifierCollection.mapper()
397
+ result.body = @client.deserialize(result_mapper, parsed_response)
398
+ rescue Exception => e
399
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
400
+ end
401
+ end
402
+
403
+ result
404
+ end
405
+
406
+ promise.execute
407
+ end
408
+
409
+ #
410
+ # Get all domains in a resource group.
411
+ #
412
+ # Get all domains in a resource group.
413
+ #
414
+ # @param resource_group_name [String] Name of the resource group to which the
415
+ # resource belongs.
416
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
417
+ # will be added to the HTTP request.
418
+ #
419
+ # @return [Array<Domain>] operation results.
420
+ #
421
+ def list_by_resource_group(resource_group_name, custom_headers:nil)
422
+ first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers:custom_headers)
423
+ first_page.get_all_items
424
+ end
425
+
426
+ #
427
+ # Get all domains in a resource group.
428
+ #
429
+ # Get all domains in a resource group.
430
+ #
431
+ # @param resource_group_name [String] Name of the resource group to which the
432
+ # resource belongs.
433
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
434
+ # will be added to the HTTP request.
435
+ #
436
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
437
+ #
438
+ def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
439
+ list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
440
+ end
441
+
442
+ #
443
+ # Get all domains in a resource group.
444
+ #
445
+ # Get all domains in a resource group.
446
+ #
447
+ # @param resource_group_name [String] Name of the resource group to which the
448
+ # resource belongs.
449
+ # @param [Hash{String => String}] A hash of custom headers that will be added
450
+ # to the HTTP request.
451
+ #
452
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
453
+ #
454
+ def list_by_resource_group_async(resource_group_name, custom_headers:nil)
455
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
456
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
457
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
458
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
459
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
460
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
461
+
462
+
463
+ request_headers = {}
464
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
465
+
466
+ # Set Headers
467
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
468
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
469
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains'
470
+
471
+ request_url = @base_url || @client.base_url
472
+
473
+ options = {
474
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
475
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
476
+ query_params: {'api-version' => @client.api_version},
477
+ headers: request_headers.merge(custom_headers || {}),
478
+ base_url: request_url
479
+ }
480
+ promise = @client.make_request_async(:get, path_template, options)
481
+
482
+ promise = promise.then do |result|
483
+ http_response = result.response
484
+ status_code = http_response.status
485
+ response_content = http_response.body
486
+ unless status_code == 200
487
+ error_model = JSON.load(response_content)
488
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
489
+ end
490
+
491
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
492
+ # Deserialize Response
493
+ if status_code == 200
494
+ begin
495
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
496
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DomainCollection.mapper()
497
+ result.body = @client.deserialize(result_mapper, parsed_response)
498
+ rescue Exception => e
499
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
500
+ end
501
+ end
502
+
503
+ result
504
+ end
505
+
506
+ promise.execute
507
+ end
508
+
509
+ #
510
+ # Get a domain.
511
+ #
512
+ # Get a domain.
513
+ #
514
+ # @param resource_group_name [String] Name of the resource group to which the
515
+ # resource belongs.
516
+ # @param domain_name [String] Name of the domain.
517
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
518
+ # will be added to the HTTP request.
519
+ #
520
+ # @return [Domain] operation results.
521
+ #
522
+ def get(resource_group_name, domain_name, custom_headers:nil)
523
+ response = get_async(resource_group_name, domain_name, custom_headers:custom_headers).value!
524
+ response.body unless response.nil?
525
+ end
526
+
527
+ #
528
+ # Get a domain.
529
+ #
530
+ # Get a domain.
531
+ #
532
+ # @param resource_group_name [String] Name of the resource group to which the
533
+ # resource belongs.
534
+ # @param domain_name [String] Name of the domain.
535
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
536
+ # will be added to the HTTP request.
537
+ #
538
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
539
+ #
540
+ def get_with_http_info(resource_group_name, domain_name, custom_headers:nil)
541
+ get_async(resource_group_name, domain_name, custom_headers:custom_headers).value!
542
+ end
543
+
544
+ #
545
+ # Get a domain.
546
+ #
547
+ # Get a domain.
548
+ #
549
+ # @param resource_group_name [String] Name of the resource group to which the
550
+ # resource belongs.
551
+ # @param domain_name [String] Name of the domain.
552
+ # @param [Hash{String => String}] A hash of custom headers that will be added
553
+ # to the HTTP request.
554
+ #
555
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
556
+ #
557
+ def get_async(resource_group_name, domain_name, custom_headers:nil)
558
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
559
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
560
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
561
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
562
+ fail ArgumentError, 'domain_name is nil' if domain_name.nil?
563
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
564
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
565
+
566
+
567
+ request_headers = {}
568
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
569
+
570
+ # Set Headers
571
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
572
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
573
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'
574
+
575
+ request_url = @base_url || @client.base_url
576
+
577
+ options = {
578
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
579
+ path_params: {'resourceGroupName' => resource_group_name,'domainName' => domain_name,'subscriptionId' => @client.subscription_id},
580
+ query_params: {'api-version' => @client.api_version},
581
+ headers: request_headers.merge(custom_headers || {}),
582
+ base_url: request_url
583
+ }
584
+ promise = @client.make_request_async(:get, path_template, options)
585
+
586
+ promise = promise.then do |result|
587
+ http_response = result.response
588
+ status_code = http_response.status
589
+ response_content = http_response.body
590
+ unless status_code == 200
591
+ error_model = JSON.load(response_content)
592
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
593
+ end
594
+
595
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
596
+ # Deserialize Response
597
+ if status_code == 200
598
+ begin
599
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
600
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::Domain.mapper()
601
+ result.body = @client.deserialize(result_mapper, parsed_response)
602
+ rescue Exception => e
603
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
604
+ end
605
+ end
606
+
607
+ result
608
+ end
609
+
610
+ promise.execute
611
+ end
612
+
613
+ #
614
+ # Creates or updates a domain.
615
+ #
616
+ # Creates or updates a domain.
617
+ #
618
+ # @param resource_group_name [String] Name of the resource group to which the
619
+ # resource belongs.
620
+ # @param domain_name [String] Name of the domain.
621
+ # @param domain [Domain] Domain registration information.
622
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
623
+ # will be added to the HTTP request.
624
+ #
625
+ # @return [Domain] operation results.
626
+ #
627
+ def create_or_update(resource_group_name, domain_name, domain, custom_headers:nil)
628
+ response = create_or_update_async(resource_group_name, domain_name, domain, custom_headers:custom_headers).value!
629
+ response.body unless response.nil?
630
+ end
631
+
632
+ #
633
+ # @param resource_group_name [String] Name of the resource group to which the
634
+ # resource belongs.
635
+ # @param domain_name [String] Name of the domain.
636
+ # @param domain [Domain] Domain registration information.
637
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
638
+ # will be added to the HTTP request.
639
+ #
640
+ # @return [Concurrent::Promise] promise which provides async access to http
641
+ # response.
642
+ #
643
+ def create_or_update_async(resource_group_name, domain_name, domain, custom_headers:nil)
644
+ # Send request
645
+ promise = begin_create_or_update_async(resource_group_name, domain_name, domain, custom_headers:custom_headers)
646
+
647
+ promise = promise.then do |response|
648
+ # Defining deserialization method.
649
+ deserialize_method = lambda do |parsed_response|
650
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::Domain.mapper()
651
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
652
+ end
653
+
654
+ # Waiting for response.
655
+ @client.get_long_running_operation_result(response, deserialize_method)
656
+ end
657
+
658
+ promise
659
+ end
660
+
661
+ #
662
+ # Delete a domain.
663
+ #
664
+ # Delete a domain.
665
+ #
666
+ # @param resource_group_name [String] Name of the resource group to which the
667
+ # resource belongs.
668
+ # @param domain_name [String] Name of the domain.
669
+ # @param force_hard_delete_domain [Boolean] Specify <code>true</code> to delete
670
+ # the domain immediately. The default is <code>false</code> which deletes the
671
+ # domain after 24 hours.
672
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
673
+ # will be added to the HTTP request.
674
+ #
675
+ #
676
+ def delete(resource_group_name, domain_name, force_hard_delete_domain:nil, custom_headers:nil)
677
+ response = delete_async(resource_group_name, domain_name, force_hard_delete_domain:force_hard_delete_domain, custom_headers:custom_headers).value!
678
+ nil
679
+ end
680
+
681
+ #
682
+ # Delete a domain.
683
+ #
684
+ # Delete a domain.
685
+ #
686
+ # @param resource_group_name [String] Name of the resource group to which the
687
+ # resource belongs.
688
+ # @param domain_name [String] Name of the domain.
689
+ # @param force_hard_delete_domain [Boolean] Specify <code>true</code> to delete
690
+ # the domain immediately. The default is <code>false</code> which deletes the
691
+ # domain after 24 hours.
692
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
693
+ # will be added to the HTTP request.
694
+ #
695
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
696
+ #
697
+ def delete_with_http_info(resource_group_name, domain_name, force_hard_delete_domain:nil, custom_headers:nil)
698
+ delete_async(resource_group_name, domain_name, force_hard_delete_domain:force_hard_delete_domain, custom_headers:custom_headers).value!
699
+ end
700
+
701
+ #
702
+ # Delete a domain.
703
+ #
704
+ # Delete a domain.
705
+ #
706
+ # @param resource_group_name [String] Name of the resource group to which the
707
+ # resource belongs.
708
+ # @param domain_name [String] Name of the domain.
709
+ # @param force_hard_delete_domain [Boolean] Specify <code>true</code> to delete
710
+ # the domain immediately. The default is <code>false</code> which deletes the
711
+ # domain after 24 hours.
712
+ # @param [Hash{String => String}] A hash of custom headers that will be added
713
+ # to the HTTP request.
714
+ #
715
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
716
+ #
717
+ def delete_async(resource_group_name, domain_name, force_hard_delete_domain:nil, custom_headers:nil)
718
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
719
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
720
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
721
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
722
+ fail ArgumentError, 'domain_name is nil' if domain_name.nil?
723
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
724
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
725
+
726
+
727
+ request_headers = {}
728
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
729
+
730
+ # Set Headers
731
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
732
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
733
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'
734
+
735
+ request_url = @base_url || @client.base_url
736
+
737
+ options = {
738
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
739
+ path_params: {'resourceGroupName' => resource_group_name,'domainName' => domain_name,'subscriptionId' => @client.subscription_id},
740
+ query_params: {'forceHardDeleteDomain' => force_hard_delete_domain,'api-version' => @client.api_version},
741
+ headers: request_headers.merge(custom_headers || {}),
742
+ base_url: request_url
743
+ }
744
+ promise = @client.make_request_async(:delete, path_template, options)
745
+
746
+ promise = promise.then do |result|
747
+ http_response = result.response
748
+ status_code = http_response.status
749
+ response_content = http_response.body
750
+ unless status_code == 200 || status_code == 204
751
+ error_model = JSON.load(response_content)
752
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
753
+ end
754
+
755
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
756
+
757
+ result
758
+ end
759
+
760
+ promise.execute
761
+ end
762
+
763
+ #
764
+ # Creates or updates a domain.
765
+ #
766
+ # Creates or updates a domain.
767
+ #
768
+ # @param resource_group_name [String] Name of the resource group to which the
769
+ # resource belongs.
770
+ # @param domain_name [String] Name of the domain.
771
+ # @param domain [DomainPatchResource] Domain registration information.
772
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
773
+ # will be added to the HTTP request.
774
+ #
775
+ # @return [Domain] operation results.
776
+ #
777
+ def update(resource_group_name, domain_name, domain, custom_headers:nil)
778
+ response = update_async(resource_group_name, domain_name, domain, custom_headers:custom_headers).value!
779
+ response.body unless response.nil?
780
+ end
781
+
782
+ #
783
+ # Creates or updates a domain.
784
+ #
785
+ # Creates or updates a domain.
786
+ #
787
+ # @param resource_group_name [String] Name of the resource group to which the
788
+ # resource belongs.
789
+ # @param domain_name [String] Name of the domain.
790
+ # @param domain [DomainPatchResource] Domain registration information.
791
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
792
+ # will be added to the HTTP request.
793
+ #
794
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
795
+ #
796
+ def update_with_http_info(resource_group_name, domain_name, domain, custom_headers:nil)
797
+ update_async(resource_group_name, domain_name, domain, custom_headers:custom_headers).value!
798
+ end
799
+
800
+ #
801
+ # Creates or updates a domain.
802
+ #
803
+ # Creates or updates a domain.
804
+ #
805
+ # @param resource_group_name [String] Name of the resource group to which the
806
+ # resource belongs.
807
+ # @param domain_name [String] Name of the domain.
808
+ # @param domain [DomainPatchResource] Domain registration information.
809
+ # @param [Hash{String => String}] A hash of custom headers that will be added
810
+ # to the HTTP request.
811
+ #
812
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
813
+ #
814
+ def update_async(resource_group_name, domain_name, domain, custom_headers:nil)
815
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
816
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
817
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
818
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
819
+ fail ArgumentError, 'domain_name is nil' if domain_name.nil?
820
+ fail ArgumentError, "'domain_name' should satisfy the constraint - 'Pattern': '[a-zA-Z0-9][a-zA-Z0-9\.-]+'" if !domain_name.nil? && domain_name.match(Regexp.new('^[a-zA-Z0-9][a-zA-Z0-9\.-]+$')).nil?
821
+ fail ArgumentError, 'domain is nil' if domain.nil?
822
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
823
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
824
+
825
+
826
+ request_headers = {}
827
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
828
+
829
+ # Set Headers
830
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
831
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
832
+
833
+ # Serialize Request
834
+ request_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DomainPatchResource.mapper()
835
+ request_content = @client.serialize(request_mapper, domain)
836
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
837
+
838
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'
839
+
840
+ request_url = @base_url || @client.base_url
841
+
842
+ options = {
843
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
844
+ path_params: {'resourceGroupName' => resource_group_name,'domainName' => domain_name,'subscriptionId' => @client.subscription_id},
845
+ query_params: {'api-version' => @client.api_version},
846
+ body: request_content,
847
+ headers: request_headers.merge(custom_headers || {}),
848
+ base_url: request_url
849
+ }
850
+ promise = @client.make_request_async(:patch, path_template, options)
851
+
852
+ promise = promise.then do |result|
853
+ http_response = result.response
854
+ status_code = http_response.status
855
+ response_content = http_response.body
856
+ unless status_code == 202 || status_code == 200
857
+ error_model = JSON.load(response_content)
858
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
859
+ end
860
+
861
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
862
+ # Deserialize Response
863
+ if status_code == 202
864
+ begin
865
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
866
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::Domain.mapper()
867
+ result.body = @client.deserialize(result_mapper, parsed_response)
868
+ rescue Exception => e
869
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
870
+ end
871
+ end
872
+ # Deserialize Response
873
+ if status_code == 200
874
+ begin
875
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
876
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::Domain.mapper()
877
+ result.body = @client.deserialize(result_mapper, parsed_response)
878
+ rescue Exception => e
879
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
880
+ end
881
+ end
882
+
883
+ result
884
+ end
885
+
886
+ promise.execute
887
+ end
888
+
889
+ #
890
+ # Lists domain ownership identifiers.
891
+ #
892
+ # Lists domain ownership identifiers.
893
+ #
894
+ # @param resource_group_name [String] Name of the resource group to which the
895
+ # resource belongs.
896
+ # @param domain_name [String] Name of domain.
897
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
898
+ # will be added to the HTTP request.
899
+ #
900
+ # @return [Array<DomainOwnershipIdentifier>] operation results.
901
+ #
902
+ def list_ownership_identifiers(resource_group_name, domain_name, custom_headers:nil)
903
+ first_page = list_ownership_identifiers_as_lazy(resource_group_name, domain_name, custom_headers:custom_headers)
904
+ first_page.get_all_items
905
+ end
906
+
907
+ #
908
+ # Lists domain ownership identifiers.
909
+ #
910
+ # Lists domain ownership identifiers.
911
+ #
912
+ # @param resource_group_name [String] Name of the resource group to which the
913
+ # resource belongs.
914
+ # @param domain_name [String] Name of domain.
915
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
916
+ # will be added to the HTTP request.
917
+ #
918
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
919
+ #
920
+ def list_ownership_identifiers_with_http_info(resource_group_name, domain_name, custom_headers:nil)
921
+ list_ownership_identifiers_async(resource_group_name, domain_name, custom_headers:custom_headers).value!
922
+ end
923
+
924
+ #
925
+ # Lists domain ownership identifiers.
926
+ #
927
+ # Lists domain ownership identifiers.
928
+ #
929
+ # @param resource_group_name [String] Name of the resource group to which the
930
+ # resource belongs.
931
+ # @param domain_name [String] Name of domain.
932
+ # @param [Hash{String => String}] A hash of custom headers that will be added
933
+ # to the HTTP request.
934
+ #
935
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
936
+ #
937
+ def list_ownership_identifiers_async(resource_group_name, domain_name, custom_headers:nil)
938
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
939
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
940
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
941
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
942
+ fail ArgumentError, 'domain_name is nil' if domain_name.nil?
943
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
944
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
945
+
946
+
947
+ request_headers = {}
948
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
949
+
950
+ # Set Headers
951
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
952
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
953
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers'
954
+
955
+ request_url = @base_url || @client.base_url
956
+
957
+ options = {
958
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
959
+ path_params: {'resourceGroupName' => resource_group_name,'domainName' => domain_name,'subscriptionId' => @client.subscription_id},
960
+ query_params: {'api-version' => @client.api_version},
961
+ headers: request_headers.merge(custom_headers || {}),
962
+ base_url: request_url
963
+ }
964
+ promise = @client.make_request_async(:get, path_template, options)
965
+
966
+ promise = promise.then do |result|
967
+ http_response = result.response
968
+ status_code = http_response.status
969
+ response_content = http_response.body
970
+ unless status_code == 200
971
+ error_model = JSON.load(response_content)
972
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
973
+ end
974
+
975
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
976
+ # Deserialize Response
977
+ if status_code == 200
978
+ begin
979
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
980
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DomainOwnershipIdentifierCollection.mapper()
981
+ result.body = @client.deserialize(result_mapper, parsed_response)
982
+ rescue Exception => e
983
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
984
+ end
985
+ end
986
+
987
+ result
988
+ end
989
+
990
+ promise.execute
991
+ end
992
+
993
+ #
994
+ # Get ownership identifier for domain
995
+ #
996
+ # Get ownership identifier for domain
997
+ #
998
+ # @param resource_group_name [String] Name of the resource group to which the
999
+ # resource belongs.
1000
+ # @param domain_name [String] Name of domain.
1001
+ # @param name [String] Name of identifier.
1002
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1003
+ # will be added to the HTTP request.
1004
+ #
1005
+ # @return [DomainOwnershipIdentifier] operation results.
1006
+ #
1007
+ def get_ownership_identifier(resource_group_name, domain_name, name, custom_headers:nil)
1008
+ response = get_ownership_identifier_async(resource_group_name, domain_name, name, custom_headers:custom_headers).value!
1009
+ response.body unless response.nil?
1010
+ end
1011
+
1012
+ #
1013
+ # Get ownership identifier for domain
1014
+ #
1015
+ # Get ownership identifier for domain
1016
+ #
1017
+ # @param resource_group_name [String] Name of the resource group to which the
1018
+ # resource belongs.
1019
+ # @param domain_name [String] Name of domain.
1020
+ # @param name [String] Name of identifier.
1021
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1022
+ # will be added to the HTTP request.
1023
+ #
1024
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1025
+ #
1026
+ def get_ownership_identifier_with_http_info(resource_group_name, domain_name, name, custom_headers:nil)
1027
+ get_ownership_identifier_async(resource_group_name, domain_name, name, custom_headers:custom_headers).value!
1028
+ end
1029
+
1030
+ #
1031
+ # Get ownership identifier for domain
1032
+ #
1033
+ # Get ownership identifier for domain
1034
+ #
1035
+ # @param resource_group_name [String] Name of the resource group to which the
1036
+ # resource belongs.
1037
+ # @param domain_name [String] Name of domain.
1038
+ # @param name [String] Name of identifier.
1039
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1040
+ # to the HTTP request.
1041
+ #
1042
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1043
+ #
1044
+ def get_ownership_identifier_async(resource_group_name, domain_name, name, custom_headers:nil)
1045
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1046
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1047
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1048
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1049
+ fail ArgumentError, 'domain_name is nil' if domain_name.nil?
1050
+ fail ArgumentError, 'name is nil' if name.nil?
1051
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1052
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1053
+
1054
+
1055
+ request_headers = {}
1056
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1057
+
1058
+ # Set Headers
1059
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1060
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1061
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'
1062
+
1063
+ request_url = @base_url || @client.base_url
1064
+
1065
+ options = {
1066
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1067
+ path_params: {'resourceGroupName' => resource_group_name,'domainName' => domain_name,'name' => name,'subscriptionId' => @client.subscription_id},
1068
+ query_params: {'api-version' => @client.api_version},
1069
+ headers: request_headers.merge(custom_headers || {}),
1070
+ base_url: request_url
1071
+ }
1072
+ promise = @client.make_request_async(:get, path_template, options)
1073
+
1074
+ promise = promise.then do |result|
1075
+ http_response = result.response
1076
+ status_code = http_response.status
1077
+ response_content = http_response.body
1078
+ unless status_code == 200
1079
+ error_model = JSON.load(response_content)
1080
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1081
+ end
1082
+
1083
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1084
+ # Deserialize Response
1085
+ if status_code == 200
1086
+ begin
1087
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1088
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DomainOwnershipIdentifier.mapper()
1089
+ result.body = @client.deserialize(result_mapper, parsed_response)
1090
+ rescue Exception => e
1091
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1092
+ end
1093
+ end
1094
+
1095
+ result
1096
+ end
1097
+
1098
+ promise.execute
1099
+ end
1100
+
1101
+ #
1102
+ # Creates an ownership identifier for a domain or updates identifier details
1103
+ # for an existing identifer
1104
+ #
1105
+ # Creates an ownership identifier for a domain or updates identifier details
1106
+ # for an existing identifer
1107
+ #
1108
+ # @param resource_group_name [String] Name of the resource group to which the
1109
+ # resource belongs.
1110
+ # @param domain_name [String] Name of domain.
1111
+ # @param name [String] Name of identifier.
1112
+ # @param domain_ownership_identifier [DomainOwnershipIdentifier] A JSON
1113
+ # representation of the domain ownership properties.
1114
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1115
+ # will be added to the HTTP request.
1116
+ #
1117
+ # @return [DomainOwnershipIdentifier] operation results.
1118
+ #
1119
+ def create_or_update_ownership_identifier(resource_group_name, domain_name, name, domain_ownership_identifier, custom_headers:nil)
1120
+ response = create_or_update_ownership_identifier_async(resource_group_name, domain_name, name, domain_ownership_identifier, custom_headers:custom_headers).value!
1121
+ response.body unless response.nil?
1122
+ end
1123
+
1124
+ #
1125
+ # Creates an ownership identifier for a domain or updates identifier details
1126
+ # for an existing identifer
1127
+ #
1128
+ # Creates an ownership identifier for a domain or updates identifier details
1129
+ # for an existing identifer
1130
+ #
1131
+ # @param resource_group_name [String] Name of the resource group to which the
1132
+ # resource belongs.
1133
+ # @param domain_name [String] Name of domain.
1134
+ # @param name [String] Name of identifier.
1135
+ # @param domain_ownership_identifier [DomainOwnershipIdentifier] A JSON
1136
+ # representation of the domain ownership properties.
1137
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1138
+ # will be added to the HTTP request.
1139
+ #
1140
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1141
+ #
1142
+ def create_or_update_ownership_identifier_with_http_info(resource_group_name, domain_name, name, domain_ownership_identifier, custom_headers:nil)
1143
+ create_or_update_ownership_identifier_async(resource_group_name, domain_name, name, domain_ownership_identifier, custom_headers:custom_headers).value!
1144
+ end
1145
+
1146
+ #
1147
+ # Creates an ownership identifier for a domain or updates identifier details
1148
+ # for an existing identifer
1149
+ #
1150
+ # Creates an ownership identifier for a domain or updates identifier details
1151
+ # for an existing identifer
1152
+ #
1153
+ # @param resource_group_name [String] Name of the resource group to which the
1154
+ # resource belongs.
1155
+ # @param domain_name [String] Name of domain.
1156
+ # @param name [String] Name of identifier.
1157
+ # @param domain_ownership_identifier [DomainOwnershipIdentifier] A JSON
1158
+ # representation of the domain ownership properties.
1159
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1160
+ # to the HTTP request.
1161
+ #
1162
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1163
+ #
1164
+ def create_or_update_ownership_identifier_async(resource_group_name, domain_name, name, domain_ownership_identifier, custom_headers:nil)
1165
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1166
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1167
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1168
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1169
+ fail ArgumentError, 'domain_name is nil' if domain_name.nil?
1170
+ fail ArgumentError, 'name is nil' if name.nil?
1171
+ fail ArgumentError, 'domain_ownership_identifier is nil' if domain_ownership_identifier.nil?
1172
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1173
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1174
+
1175
+
1176
+ request_headers = {}
1177
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1178
+
1179
+ # Set Headers
1180
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1181
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1182
+
1183
+ # Serialize Request
1184
+ request_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DomainOwnershipIdentifier.mapper()
1185
+ request_content = @client.serialize(request_mapper, domain_ownership_identifier)
1186
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1187
+
1188
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'
1189
+
1190
+ request_url = @base_url || @client.base_url
1191
+
1192
+ options = {
1193
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1194
+ path_params: {'resourceGroupName' => resource_group_name,'domainName' => domain_name,'name' => name,'subscriptionId' => @client.subscription_id},
1195
+ query_params: {'api-version' => @client.api_version},
1196
+ body: request_content,
1197
+ headers: request_headers.merge(custom_headers || {}),
1198
+ base_url: request_url
1199
+ }
1200
+ promise = @client.make_request_async(:put, path_template, options)
1201
+
1202
+ promise = promise.then do |result|
1203
+ http_response = result.response
1204
+ status_code = http_response.status
1205
+ response_content = http_response.body
1206
+ unless status_code == 200
1207
+ error_model = JSON.load(response_content)
1208
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1209
+ end
1210
+
1211
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1212
+ # Deserialize Response
1213
+ if status_code == 200
1214
+ begin
1215
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1216
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DomainOwnershipIdentifier.mapper()
1217
+ result.body = @client.deserialize(result_mapper, parsed_response)
1218
+ rescue Exception => e
1219
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1220
+ end
1221
+ end
1222
+
1223
+ result
1224
+ end
1225
+
1226
+ promise.execute
1227
+ end
1228
+
1229
+ #
1230
+ # Delete ownership identifier for domain
1231
+ #
1232
+ # Delete ownership identifier for domain
1233
+ #
1234
+ # @param resource_group_name [String] Name of the resource group to which the
1235
+ # resource belongs.
1236
+ # @param domain_name [String] Name of domain.
1237
+ # @param name [String] Name of identifier.
1238
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1239
+ # will be added to the HTTP request.
1240
+ #
1241
+ #
1242
+ def delete_ownership_identifier(resource_group_name, domain_name, name, custom_headers:nil)
1243
+ response = delete_ownership_identifier_async(resource_group_name, domain_name, name, custom_headers:custom_headers).value!
1244
+ nil
1245
+ end
1246
+
1247
+ #
1248
+ # Delete ownership identifier for domain
1249
+ #
1250
+ # Delete ownership identifier for domain
1251
+ #
1252
+ # @param resource_group_name [String] Name of the resource group to which the
1253
+ # resource belongs.
1254
+ # @param domain_name [String] Name of domain.
1255
+ # @param name [String] Name of identifier.
1256
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1257
+ # will be added to the HTTP request.
1258
+ #
1259
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1260
+ #
1261
+ def delete_ownership_identifier_with_http_info(resource_group_name, domain_name, name, custom_headers:nil)
1262
+ delete_ownership_identifier_async(resource_group_name, domain_name, name, custom_headers:custom_headers).value!
1263
+ end
1264
+
1265
+ #
1266
+ # Delete ownership identifier for domain
1267
+ #
1268
+ # Delete ownership identifier for domain
1269
+ #
1270
+ # @param resource_group_name [String] Name of the resource group to which the
1271
+ # resource belongs.
1272
+ # @param domain_name [String] Name of domain.
1273
+ # @param name [String] Name of identifier.
1274
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1275
+ # to the HTTP request.
1276
+ #
1277
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1278
+ #
1279
+ def delete_ownership_identifier_async(resource_group_name, domain_name, name, custom_headers:nil)
1280
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1281
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1282
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1283
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1284
+ fail ArgumentError, 'domain_name is nil' if domain_name.nil?
1285
+ fail ArgumentError, 'name is nil' if name.nil?
1286
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1287
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1288
+
1289
+
1290
+ request_headers = {}
1291
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1292
+
1293
+ # Set Headers
1294
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1295
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1296
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'
1297
+
1298
+ request_url = @base_url || @client.base_url
1299
+
1300
+ options = {
1301
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1302
+ path_params: {'resourceGroupName' => resource_group_name,'domainName' => domain_name,'name' => name,'subscriptionId' => @client.subscription_id},
1303
+ query_params: {'api-version' => @client.api_version},
1304
+ headers: request_headers.merge(custom_headers || {}),
1305
+ base_url: request_url
1306
+ }
1307
+ promise = @client.make_request_async(:delete, path_template, options)
1308
+
1309
+ promise = promise.then do |result|
1310
+ http_response = result.response
1311
+ status_code = http_response.status
1312
+ response_content = http_response.body
1313
+ unless status_code == 200 || status_code == 204
1314
+ error_model = JSON.load(response_content)
1315
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1316
+ end
1317
+
1318
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1319
+
1320
+ result
1321
+ end
1322
+
1323
+ promise.execute
1324
+ end
1325
+
1326
+ #
1327
+ # Creates an ownership identifier for a domain or updates identifier details
1328
+ # for an existing identifer
1329
+ #
1330
+ # Creates an ownership identifier for a domain or updates identifier details
1331
+ # for an existing identifer
1332
+ #
1333
+ # @param resource_group_name [String] Name of the resource group to which the
1334
+ # resource belongs.
1335
+ # @param domain_name [String] Name of domain.
1336
+ # @param name [String] Name of identifier.
1337
+ # @param domain_ownership_identifier [DomainOwnershipIdentifier] A JSON
1338
+ # representation of the domain ownership properties.
1339
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1340
+ # will be added to the HTTP request.
1341
+ #
1342
+ # @return [DomainOwnershipIdentifier] operation results.
1343
+ #
1344
+ def update_ownership_identifier(resource_group_name, domain_name, name, domain_ownership_identifier, custom_headers:nil)
1345
+ response = update_ownership_identifier_async(resource_group_name, domain_name, name, domain_ownership_identifier, custom_headers:custom_headers).value!
1346
+ response.body unless response.nil?
1347
+ end
1348
+
1349
+ #
1350
+ # Creates an ownership identifier for a domain or updates identifier details
1351
+ # for an existing identifer
1352
+ #
1353
+ # Creates an ownership identifier for a domain or updates identifier details
1354
+ # for an existing identifer
1355
+ #
1356
+ # @param resource_group_name [String] Name of the resource group to which the
1357
+ # resource belongs.
1358
+ # @param domain_name [String] Name of domain.
1359
+ # @param name [String] Name of identifier.
1360
+ # @param domain_ownership_identifier [DomainOwnershipIdentifier] A JSON
1361
+ # representation of the domain ownership properties.
1362
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1363
+ # will be added to the HTTP request.
1364
+ #
1365
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1366
+ #
1367
+ def update_ownership_identifier_with_http_info(resource_group_name, domain_name, name, domain_ownership_identifier, custom_headers:nil)
1368
+ update_ownership_identifier_async(resource_group_name, domain_name, name, domain_ownership_identifier, custom_headers:custom_headers).value!
1369
+ end
1370
+
1371
+ #
1372
+ # Creates an ownership identifier for a domain or updates identifier details
1373
+ # for an existing identifer
1374
+ #
1375
+ # Creates an ownership identifier for a domain or updates identifier details
1376
+ # for an existing identifer
1377
+ #
1378
+ # @param resource_group_name [String] Name of the resource group to which the
1379
+ # resource belongs.
1380
+ # @param domain_name [String] Name of domain.
1381
+ # @param name [String] Name of identifier.
1382
+ # @param domain_ownership_identifier [DomainOwnershipIdentifier] A JSON
1383
+ # representation of the domain ownership properties.
1384
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1385
+ # to the HTTP request.
1386
+ #
1387
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1388
+ #
1389
+ def update_ownership_identifier_async(resource_group_name, domain_name, name, domain_ownership_identifier, custom_headers:nil)
1390
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1391
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1392
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1393
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1394
+ fail ArgumentError, 'domain_name is nil' if domain_name.nil?
1395
+ fail ArgumentError, 'name is nil' if name.nil?
1396
+ fail ArgumentError, 'domain_ownership_identifier is nil' if domain_ownership_identifier.nil?
1397
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1398
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1399
+
1400
+
1401
+ request_headers = {}
1402
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1403
+
1404
+ # Set Headers
1405
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1406
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1407
+
1408
+ # Serialize Request
1409
+ request_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DomainOwnershipIdentifier.mapper()
1410
+ request_content = @client.serialize(request_mapper, domain_ownership_identifier)
1411
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1412
+
1413
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'
1414
+
1415
+ request_url = @base_url || @client.base_url
1416
+
1417
+ options = {
1418
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1419
+ path_params: {'resourceGroupName' => resource_group_name,'domainName' => domain_name,'name' => name,'subscriptionId' => @client.subscription_id},
1420
+ query_params: {'api-version' => @client.api_version},
1421
+ body: request_content,
1422
+ headers: request_headers.merge(custom_headers || {}),
1423
+ base_url: request_url
1424
+ }
1425
+ promise = @client.make_request_async(:patch, path_template, options)
1426
+
1427
+ promise = promise.then do |result|
1428
+ http_response = result.response
1429
+ status_code = http_response.status
1430
+ response_content = http_response.body
1431
+ unless status_code == 200
1432
+ error_model = JSON.load(response_content)
1433
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1434
+ end
1435
+
1436
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1437
+ # Deserialize Response
1438
+ if status_code == 200
1439
+ begin
1440
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1441
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DomainOwnershipIdentifier.mapper()
1442
+ result.body = @client.deserialize(result_mapper, parsed_response)
1443
+ rescue Exception => e
1444
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1445
+ end
1446
+ end
1447
+
1448
+ result
1449
+ end
1450
+
1451
+ promise.execute
1452
+ end
1453
+
1454
+ #
1455
+ # Renew a domain.
1456
+ #
1457
+ # Renew a domain.
1458
+ #
1459
+ # @param resource_group_name [String] Name of the resource group to which the
1460
+ # resource belongs.
1461
+ # @param domain_name [String] Name of the domain.
1462
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1463
+ # will be added to the HTTP request.
1464
+ #
1465
+ #
1466
+ def renew(resource_group_name, domain_name, custom_headers:nil)
1467
+ response = renew_async(resource_group_name, domain_name, custom_headers:custom_headers).value!
1468
+ nil
1469
+ end
1470
+
1471
+ #
1472
+ # Renew a domain.
1473
+ #
1474
+ # Renew a domain.
1475
+ #
1476
+ # @param resource_group_name [String] Name of the resource group to which the
1477
+ # resource belongs.
1478
+ # @param domain_name [String] Name of the domain.
1479
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1480
+ # will be added to the HTTP request.
1481
+ #
1482
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1483
+ #
1484
+ def renew_with_http_info(resource_group_name, domain_name, custom_headers:nil)
1485
+ renew_async(resource_group_name, domain_name, custom_headers:custom_headers).value!
1486
+ end
1487
+
1488
+ #
1489
+ # Renew a domain.
1490
+ #
1491
+ # Renew a domain.
1492
+ #
1493
+ # @param resource_group_name [String] Name of the resource group to which the
1494
+ # resource belongs.
1495
+ # @param domain_name [String] Name of the domain.
1496
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1497
+ # to the HTTP request.
1498
+ #
1499
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1500
+ #
1501
+ def renew_async(resource_group_name, domain_name, custom_headers:nil)
1502
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1503
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1504
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1505
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1506
+ fail ArgumentError, 'domain_name is nil' if domain_name.nil?
1507
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1508
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1509
+
1510
+
1511
+ request_headers = {}
1512
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1513
+
1514
+ # Set Headers
1515
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1516
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1517
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew'
1518
+
1519
+ request_url = @base_url || @client.base_url
1520
+
1521
+ options = {
1522
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1523
+ path_params: {'resourceGroupName' => resource_group_name,'domainName' => domain_name,'subscriptionId' => @client.subscription_id},
1524
+ query_params: {'api-version' => @client.api_version},
1525
+ headers: request_headers.merge(custom_headers || {}),
1526
+ base_url: request_url
1527
+ }
1528
+ promise = @client.make_request_async(:post, path_template, options)
1529
+
1530
+ promise = promise.then do |result|
1531
+ http_response = result.response
1532
+ status_code = http_response.status
1533
+ response_content = http_response.body
1534
+ unless status_code == 200 || status_code == 202 || status_code == 204 || status_code == 400 || status_code == 500
1535
+ error_model = JSON.load(response_content)
1536
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1537
+ end
1538
+
1539
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1540
+
1541
+ result
1542
+ end
1543
+
1544
+ promise.execute
1545
+ end
1546
+
1547
+ #
1548
+ # Creates or updates a domain.
1549
+ #
1550
+ # Creates or updates a domain.
1551
+ #
1552
+ # @param resource_group_name [String] Name of the resource group to which the
1553
+ # resource belongs.
1554
+ # @param domain_name [String] Name of the domain.
1555
+ # @param domain [Domain] Domain registration information.
1556
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1557
+ # will be added to the HTTP request.
1558
+ #
1559
+ # @return [Domain] operation results.
1560
+ #
1561
+ def begin_create_or_update(resource_group_name, domain_name, domain, custom_headers:nil)
1562
+ response = begin_create_or_update_async(resource_group_name, domain_name, domain, custom_headers:custom_headers).value!
1563
+ response.body unless response.nil?
1564
+ end
1565
+
1566
+ #
1567
+ # Creates or updates a domain.
1568
+ #
1569
+ # Creates or updates a domain.
1570
+ #
1571
+ # @param resource_group_name [String] Name of the resource group to which the
1572
+ # resource belongs.
1573
+ # @param domain_name [String] Name of the domain.
1574
+ # @param domain [Domain] Domain registration information.
1575
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1576
+ # will be added to the HTTP request.
1577
+ #
1578
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1579
+ #
1580
+ def begin_create_or_update_with_http_info(resource_group_name, domain_name, domain, custom_headers:nil)
1581
+ begin_create_or_update_async(resource_group_name, domain_name, domain, custom_headers:custom_headers).value!
1582
+ end
1583
+
1584
+ #
1585
+ # Creates or updates a domain.
1586
+ #
1587
+ # Creates or updates a domain.
1588
+ #
1589
+ # @param resource_group_name [String] Name of the resource group to which the
1590
+ # resource belongs.
1591
+ # @param domain_name [String] Name of the domain.
1592
+ # @param domain [Domain] Domain registration information.
1593
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1594
+ # to the HTTP request.
1595
+ #
1596
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1597
+ #
1598
+ def begin_create_or_update_async(resource_group_name, domain_name, domain, custom_headers:nil)
1599
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1600
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1601
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1602
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1603
+ fail ArgumentError, 'domain_name is nil' if domain_name.nil?
1604
+ fail ArgumentError, "'domain_name' should satisfy the constraint - 'Pattern': '[a-zA-Z0-9][a-zA-Z0-9\.-]+'" if !domain_name.nil? && domain_name.match(Regexp.new('^[a-zA-Z0-9][a-zA-Z0-9\.-]+$')).nil?
1605
+ fail ArgumentError, 'domain is nil' if domain.nil?
1606
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1607
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1608
+
1609
+
1610
+ request_headers = {}
1611
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1612
+
1613
+ # Set Headers
1614
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1615
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1616
+
1617
+ # Serialize Request
1618
+ request_mapper = Azure::Web::Mgmt::V2018_02_01::Models::Domain.mapper()
1619
+ request_content = @client.serialize(request_mapper, domain)
1620
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1621
+
1622
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'
1623
+
1624
+ request_url = @base_url || @client.base_url
1625
+
1626
+ options = {
1627
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1628
+ path_params: {'resourceGroupName' => resource_group_name,'domainName' => domain_name,'subscriptionId' => @client.subscription_id},
1629
+ query_params: {'api-version' => @client.api_version},
1630
+ body: request_content,
1631
+ headers: request_headers.merge(custom_headers || {}),
1632
+ base_url: request_url
1633
+ }
1634
+ promise = @client.make_request_async(:put, path_template, options)
1635
+
1636
+ promise = promise.then do |result|
1637
+ http_response = result.response
1638
+ status_code = http_response.status
1639
+ response_content = http_response.body
1640
+ unless status_code == 202 || status_code == 200
1641
+ error_model = JSON.load(response_content)
1642
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1643
+ end
1644
+
1645
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1646
+ # Deserialize Response
1647
+ if status_code == 202
1648
+ begin
1649
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1650
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::Domain.mapper()
1651
+ result.body = @client.deserialize(result_mapper, parsed_response)
1652
+ rescue Exception => e
1653
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1654
+ end
1655
+ end
1656
+ # Deserialize Response
1657
+ if status_code == 200
1658
+ begin
1659
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1660
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::Domain.mapper()
1661
+ result.body = @client.deserialize(result_mapper, parsed_response)
1662
+ rescue Exception => e
1663
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1664
+ end
1665
+ end
1666
+
1667
+ result
1668
+ end
1669
+
1670
+ promise.execute
1671
+ end
1672
+
1673
+ #
1674
+ # Get all domains in a subscription.
1675
+ #
1676
+ # Get all domains in a subscription.
1677
+ #
1678
+ # @param next_page_link [String] The NextLink from the previous successful call
1679
+ # to List operation.
1680
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1681
+ # will be added to the HTTP request.
1682
+ #
1683
+ # @return [DomainCollection] operation results.
1684
+ #
1685
+ def list_next(next_page_link, custom_headers:nil)
1686
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
1687
+ response.body unless response.nil?
1688
+ end
1689
+
1690
+ #
1691
+ # Get all domains in a subscription.
1692
+ #
1693
+ # Get all domains in a subscription.
1694
+ #
1695
+ # @param next_page_link [String] The NextLink from the previous successful call
1696
+ # to List operation.
1697
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1698
+ # will be added to the HTTP request.
1699
+ #
1700
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1701
+ #
1702
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
1703
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
1704
+ end
1705
+
1706
+ #
1707
+ # Get all domains in a subscription.
1708
+ #
1709
+ # Get all domains in a subscription.
1710
+ #
1711
+ # @param next_page_link [String] The NextLink from the previous successful call
1712
+ # to List operation.
1713
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1714
+ # to the HTTP request.
1715
+ #
1716
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1717
+ #
1718
+ def list_next_async(next_page_link, custom_headers:nil)
1719
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1720
+
1721
+
1722
+ request_headers = {}
1723
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1724
+
1725
+ # Set Headers
1726
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1727
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1728
+ path_template = '{nextLink}'
1729
+
1730
+ request_url = @base_url || @client.base_url
1731
+
1732
+ options = {
1733
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1734
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1735
+ headers: request_headers.merge(custom_headers || {}),
1736
+ base_url: request_url
1737
+ }
1738
+ promise = @client.make_request_async(:get, path_template, options)
1739
+
1740
+ promise = promise.then do |result|
1741
+ http_response = result.response
1742
+ status_code = http_response.status
1743
+ response_content = http_response.body
1744
+ unless status_code == 200
1745
+ error_model = JSON.load(response_content)
1746
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1747
+ end
1748
+
1749
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1750
+ # Deserialize Response
1751
+ if status_code == 200
1752
+ begin
1753
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1754
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DomainCollection.mapper()
1755
+ result.body = @client.deserialize(result_mapper, parsed_response)
1756
+ rescue Exception => e
1757
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1758
+ end
1759
+ end
1760
+
1761
+ result
1762
+ end
1763
+
1764
+ promise.execute
1765
+ end
1766
+
1767
+ #
1768
+ # Get domain name recommendations based on keywords.
1769
+ #
1770
+ # Get domain name recommendations based on keywords.
1771
+ #
1772
+ # @param next_page_link [String] The NextLink from the previous successful call
1773
+ # to List operation.
1774
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1775
+ # will be added to the HTTP request.
1776
+ #
1777
+ # @return [NameIdentifierCollection] operation results.
1778
+ #
1779
+ def list_recommendations_next(next_page_link, custom_headers:nil)
1780
+ response = list_recommendations_next_async(next_page_link, custom_headers:custom_headers).value!
1781
+ response.body unless response.nil?
1782
+ end
1783
+
1784
+ #
1785
+ # Get domain name recommendations based on keywords.
1786
+ #
1787
+ # Get domain name recommendations based on keywords.
1788
+ #
1789
+ # @param next_page_link [String] The NextLink from the previous successful call
1790
+ # to List operation.
1791
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1792
+ # will be added to the HTTP request.
1793
+ #
1794
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1795
+ #
1796
+ def list_recommendations_next_with_http_info(next_page_link, custom_headers:nil)
1797
+ list_recommendations_next_async(next_page_link, custom_headers:custom_headers).value!
1798
+ end
1799
+
1800
+ #
1801
+ # Get domain name recommendations based on keywords.
1802
+ #
1803
+ # Get domain name recommendations based on keywords.
1804
+ #
1805
+ # @param next_page_link [String] The NextLink from the previous successful call
1806
+ # to List operation.
1807
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1808
+ # to the HTTP request.
1809
+ #
1810
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1811
+ #
1812
+ def list_recommendations_next_async(next_page_link, custom_headers:nil)
1813
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1814
+
1815
+
1816
+ request_headers = {}
1817
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1818
+
1819
+ # Set Headers
1820
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1821
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1822
+ path_template = '{nextLink}'
1823
+
1824
+ request_url = @base_url || @client.base_url
1825
+
1826
+ options = {
1827
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1828
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1829
+ headers: request_headers.merge(custom_headers || {}),
1830
+ base_url: request_url
1831
+ }
1832
+ promise = @client.make_request_async(:post, path_template, options)
1833
+
1834
+ promise = promise.then do |result|
1835
+ http_response = result.response
1836
+ status_code = http_response.status
1837
+ response_content = http_response.body
1838
+ unless status_code == 200
1839
+ error_model = JSON.load(response_content)
1840
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1841
+ end
1842
+
1843
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1844
+ # Deserialize Response
1845
+ if status_code == 200
1846
+ begin
1847
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1848
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::NameIdentifierCollection.mapper()
1849
+ result.body = @client.deserialize(result_mapper, parsed_response)
1850
+ rescue Exception => e
1851
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1852
+ end
1853
+ end
1854
+
1855
+ result
1856
+ end
1857
+
1858
+ promise.execute
1859
+ end
1860
+
1861
+ #
1862
+ # Get all domains in a resource group.
1863
+ #
1864
+ # Get all domains in a resource group.
1865
+ #
1866
+ # @param next_page_link [String] The NextLink from the previous successful call
1867
+ # to List operation.
1868
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1869
+ # will be added to the HTTP request.
1870
+ #
1871
+ # @return [DomainCollection] operation results.
1872
+ #
1873
+ def list_by_resource_group_next(next_page_link, custom_headers:nil)
1874
+ response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
1875
+ response.body unless response.nil?
1876
+ end
1877
+
1878
+ #
1879
+ # Get all domains in a resource group.
1880
+ #
1881
+ # Get all domains in a resource group.
1882
+ #
1883
+ # @param next_page_link [String] The NextLink from the previous successful call
1884
+ # to List operation.
1885
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1886
+ # will be added to the HTTP request.
1887
+ #
1888
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1889
+ #
1890
+ def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
1891
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
1892
+ end
1893
+
1894
+ #
1895
+ # Get all domains in a resource group.
1896
+ #
1897
+ # Get all domains in a resource group.
1898
+ #
1899
+ # @param next_page_link [String] The NextLink from the previous successful call
1900
+ # to List operation.
1901
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1902
+ # to the HTTP request.
1903
+ #
1904
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1905
+ #
1906
+ def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
1907
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1908
+
1909
+
1910
+ request_headers = {}
1911
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1912
+
1913
+ # Set Headers
1914
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1915
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1916
+ path_template = '{nextLink}'
1917
+
1918
+ request_url = @base_url || @client.base_url
1919
+
1920
+ options = {
1921
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1922
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1923
+ headers: request_headers.merge(custom_headers || {}),
1924
+ base_url: request_url
1925
+ }
1926
+ promise = @client.make_request_async(:get, path_template, options)
1927
+
1928
+ promise = promise.then do |result|
1929
+ http_response = result.response
1930
+ status_code = http_response.status
1931
+ response_content = http_response.body
1932
+ unless status_code == 200
1933
+ error_model = JSON.load(response_content)
1934
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1935
+ end
1936
+
1937
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1938
+ # Deserialize Response
1939
+ if status_code == 200
1940
+ begin
1941
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1942
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DomainCollection.mapper()
1943
+ result.body = @client.deserialize(result_mapper, parsed_response)
1944
+ rescue Exception => e
1945
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1946
+ end
1947
+ end
1948
+
1949
+ result
1950
+ end
1951
+
1952
+ promise.execute
1953
+ end
1954
+
1955
+ #
1956
+ # Lists domain ownership identifiers.
1957
+ #
1958
+ # Lists domain ownership identifiers.
1959
+ #
1960
+ # @param next_page_link [String] The NextLink from the previous successful call
1961
+ # to List operation.
1962
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1963
+ # will be added to the HTTP request.
1964
+ #
1965
+ # @return [DomainOwnershipIdentifierCollection] operation results.
1966
+ #
1967
+ def list_ownership_identifiers_next(next_page_link, custom_headers:nil)
1968
+ response = list_ownership_identifiers_next_async(next_page_link, custom_headers:custom_headers).value!
1969
+ response.body unless response.nil?
1970
+ end
1971
+
1972
+ #
1973
+ # Lists domain ownership identifiers.
1974
+ #
1975
+ # Lists domain ownership identifiers.
1976
+ #
1977
+ # @param next_page_link [String] The NextLink from the previous successful call
1978
+ # to List operation.
1979
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1980
+ # will be added to the HTTP request.
1981
+ #
1982
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1983
+ #
1984
+ def list_ownership_identifiers_next_with_http_info(next_page_link, custom_headers:nil)
1985
+ list_ownership_identifiers_next_async(next_page_link, custom_headers:custom_headers).value!
1986
+ end
1987
+
1988
+ #
1989
+ # Lists domain ownership identifiers.
1990
+ #
1991
+ # Lists domain ownership identifiers.
1992
+ #
1993
+ # @param next_page_link [String] The NextLink from the previous successful call
1994
+ # to List operation.
1995
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1996
+ # to the HTTP request.
1997
+ #
1998
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1999
+ #
2000
+ def list_ownership_identifiers_next_async(next_page_link, custom_headers:nil)
2001
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2002
+
2003
+
2004
+ request_headers = {}
2005
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2006
+
2007
+ # Set Headers
2008
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2009
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2010
+ path_template = '{nextLink}'
2011
+
2012
+ request_url = @base_url || @client.base_url
2013
+
2014
+ options = {
2015
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2016
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2017
+ headers: request_headers.merge(custom_headers || {}),
2018
+ base_url: request_url
2019
+ }
2020
+ promise = @client.make_request_async(:get, path_template, options)
2021
+
2022
+ promise = promise.then do |result|
2023
+ http_response = result.response
2024
+ status_code = http_response.status
2025
+ response_content = http_response.body
2026
+ unless status_code == 200
2027
+ error_model = JSON.load(response_content)
2028
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
2029
+ end
2030
+
2031
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2032
+ # Deserialize Response
2033
+ if status_code == 200
2034
+ begin
2035
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2036
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::DomainOwnershipIdentifierCollection.mapper()
2037
+ result.body = @client.deserialize(result_mapper, parsed_response)
2038
+ rescue Exception => e
2039
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2040
+ end
2041
+ end
2042
+
2043
+ result
2044
+ end
2045
+
2046
+ promise.execute
2047
+ end
2048
+
2049
+ #
2050
+ # Get all domains in a subscription.
2051
+ #
2052
+ # Get all domains in a subscription.
2053
+ #
2054
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2055
+ # will be added to the HTTP request.
2056
+ #
2057
+ # @return [DomainCollection] which provide lazy access to pages of the
2058
+ # response.
2059
+ #
2060
+ def list_as_lazy(custom_headers:nil)
2061
+ response = list_async(custom_headers:custom_headers).value!
2062
+ unless response.nil?
2063
+ page = response.body
2064
+ page.next_method = Proc.new do |next_page_link|
2065
+ list_next_async(next_page_link, custom_headers:custom_headers)
2066
+ end
2067
+ page
2068
+ end
2069
+ end
2070
+
2071
+ #
2072
+ # Get domain name recommendations based on keywords.
2073
+ #
2074
+ # Get domain name recommendations based on keywords.
2075
+ #
2076
+ # @param parameters [DomainRecommendationSearchParameters] Search parameters
2077
+ # for domain name recommendations.
2078
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2079
+ # will be added to the HTTP request.
2080
+ #
2081
+ # @return [NameIdentifierCollection] which provide lazy access to pages of the
2082
+ # response.
2083
+ #
2084
+ def list_recommendations_as_lazy(parameters, custom_headers:nil)
2085
+ response = list_recommendations_async(parameters, custom_headers:custom_headers).value!
2086
+ unless response.nil?
2087
+ page = response.body
2088
+ page.next_method = Proc.new do |next_page_link|
2089
+ list_recommendations_next_async(next_page_link, custom_headers:custom_headers)
2090
+ end
2091
+ page
2092
+ end
2093
+ end
2094
+
2095
+ #
2096
+ # Get all domains in a resource group.
2097
+ #
2098
+ # Get all domains in a resource group.
2099
+ #
2100
+ # @param resource_group_name [String] Name of the resource group to which the
2101
+ # resource belongs.
2102
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2103
+ # will be added to the HTTP request.
2104
+ #
2105
+ # @return [DomainCollection] which provide lazy access to pages of the
2106
+ # response.
2107
+ #
2108
+ def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil)
2109
+ response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
2110
+ unless response.nil?
2111
+ page = response.body
2112
+ page.next_method = Proc.new do |next_page_link|
2113
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
2114
+ end
2115
+ page
2116
+ end
2117
+ end
2118
+
2119
+ #
2120
+ # Lists domain ownership identifiers.
2121
+ #
2122
+ # Lists domain ownership identifiers.
2123
+ #
2124
+ # @param resource_group_name [String] Name of the resource group to which the
2125
+ # resource belongs.
2126
+ # @param domain_name [String] Name of domain.
2127
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2128
+ # will be added to the HTTP request.
2129
+ #
2130
+ # @return [DomainOwnershipIdentifierCollection] which provide lazy access to
2131
+ # pages of the response.
2132
+ #
2133
+ def list_ownership_identifiers_as_lazy(resource_group_name, domain_name, custom_headers:nil)
2134
+ response = list_ownership_identifiers_async(resource_group_name, domain_name, custom_headers:custom_headers).value!
2135
+ unless response.nil?
2136
+ page = response.body
2137
+ page.next_method = Proc.new do |next_page_link|
2138
+ list_ownership_identifiers_next_async(next_page_link, custom_headers:custom_headers)
2139
+ end
2140
+ page
2141
+ end
2142
+ end
2143
+
2144
+ end
2145
+ end