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,2651 @@
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 AppServiceCertificateOrders
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the AppServiceCertificateOrders 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
+ # List all certificate orders in a subscription.
26
+ #
27
+ # List all certificate orders in a subscription.
28
+ #
29
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
30
+ # will be added to the HTTP request.
31
+ #
32
+ # @return [Array<AppServiceCertificateOrder>] operation results.
33
+ #
34
+ def list(custom_headers:nil)
35
+ first_page = list_as_lazy(custom_headers:custom_headers)
36
+ first_page.get_all_items
37
+ end
38
+
39
+ #
40
+ # List all certificate orders in a subscription.
41
+ #
42
+ # List all certificate orders in a subscription.
43
+ #
44
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
45
+ # will be added to the HTTP request.
46
+ #
47
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
48
+ #
49
+ def list_with_http_info(custom_headers:nil)
50
+ list_async(custom_headers:custom_headers).value!
51
+ end
52
+
53
+ #
54
+ # List all certificate orders in a subscription.
55
+ #
56
+ # List all certificate orders in a subscription.
57
+ #
58
+ # @param [Hash{String => String}] A hash of custom headers that will be added
59
+ # to the HTTP request.
60
+ #
61
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
62
+ #
63
+ def list_async(custom_headers:nil)
64
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
65
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
66
+
67
+
68
+ request_headers = {}
69
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
70
+
71
+ # Set Headers
72
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
73
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
74
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders'
75
+
76
+ request_url = @base_url || @client.base_url
77
+
78
+ options = {
79
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
80
+ path_params: {'subscriptionId' => @client.subscription_id},
81
+ query_params: {'api-version' => @client.api_version},
82
+ headers: request_headers.merge(custom_headers || {}),
83
+ base_url: request_url
84
+ }
85
+ promise = @client.make_request_async(:get, path_template, options)
86
+
87
+ promise = promise.then do |result|
88
+ http_response = result.response
89
+ status_code = http_response.status
90
+ response_content = http_response.body
91
+ unless status_code == 200
92
+ error_model = JSON.load(response_content)
93
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
94
+ end
95
+
96
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
97
+ # Deserialize Response
98
+ if status_code == 200
99
+ begin
100
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
101
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::AppServiceCertificateOrderCollection.mapper()
102
+ result.body = @client.deserialize(result_mapper, parsed_response)
103
+ rescue Exception => e
104
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
105
+ end
106
+ end
107
+
108
+ result
109
+ end
110
+
111
+ promise.execute
112
+ end
113
+
114
+ #
115
+ # Validate information for a certificate order.
116
+ #
117
+ # Validate information for a certificate order.
118
+ #
119
+ # @param app_service_certificate_order [AppServiceCertificateOrder] Information
120
+ # for a certificate order.
121
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
122
+ # will be added to the HTTP request.
123
+ #
124
+ #
125
+ def validate_purchase_information(app_service_certificate_order, custom_headers:nil)
126
+ response = validate_purchase_information_async(app_service_certificate_order, custom_headers:custom_headers).value!
127
+ nil
128
+ end
129
+
130
+ #
131
+ # Validate information for a certificate order.
132
+ #
133
+ # Validate information for a certificate order.
134
+ #
135
+ # @param app_service_certificate_order [AppServiceCertificateOrder] Information
136
+ # for a certificate order.
137
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
138
+ # will be added to the HTTP request.
139
+ #
140
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
141
+ #
142
+ def validate_purchase_information_with_http_info(app_service_certificate_order, custom_headers:nil)
143
+ validate_purchase_information_async(app_service_certificate_order, custom_headers:custom_headers).value!
144
+ end
145
+
146
+ #
147
+ # Validate information for a certificate order.
148
+ #
149
+ # Validate information for a certificate order.
150
+ #
151
+ # @param app_service_certificate_order [AppServiceCertificateOrder] Information
152
+ # for a certificate order.
153
+ # @param [Hash{String => String}] A hash of custom headers that will be added
154
+ # to the HTTP request.
155
+ #
156
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
157
+ #
158
+ def validate_purchase_information_async(app_service_certificate_order, custom_headers:nil)
159
+ fail ArgumentError, 'app_service_certificate_order is nil' if app_service_certificate_order.nil?
160
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
161
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
162
+
163
+
164
+ request_headers = {}
165
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
166
+
167
+ # Set Headers
168
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
169
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
170
+
171
+ # Serialize Request
172
+ request_mapper = Azure::Web::Mgmt::V2018_02_01::Models::AppServiceCertificateOrder.mapper()
173
+ request_content = @client.serialize(request_mapper, app_service_certificate_order)
174
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
175
+
176
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation'
177
+
178
+ request_url = @base_url || @client.base_url
179
+
180
+ options = {
181
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
182
+ path_params: {'subscriptionId' => @client.subscription_id},
183
+ query_params: {'api-version' => @client.api_version},
184
+ body: request_content,
185
+ headers: request_headers.merge(custom_headers || {}),
186
+ base_url: request_url
187
+ }
188
+ promise = @client.make_request_async(:post, path_template, options)
189
+
190
+ promise = promise.then do |result|
191
+ http_response = result.response
192
+ status_code = http_response.status
193
+ response_content = http_response.body
194
+ unless status_code == 204
195
+ error_model = JSON.load(response_content)
196
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
197
+ end
198
+
199
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
200
+
201
+ result
202
+ end
203
+
204
+ promise.execute
205
+ end
206
+
207
+ #
208
+ # Get certificate orders in a resource group.
209
+ #
210
+ # Get certificate orders in a resource group.
211
+ #
212
+ # @param resource_group_name [String] Name of the resource group to which the
213
+ # resource belongs.
214
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
215
+ # will be added to the HTTP request.
216
+ #
217
+ # @return [Array<AppServiceCertificateOrder>] operation results.
218
+ #
219
+ def list_by_resource_group(resource_group_name, custom_headers:nil)
220
+ first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers:custom_headers)
221
+ first_page.get_all_items
222
+ end
223
+
224
+ #
225
+ # Get certificate orders in a resource group.
226
+ #
227
+ # Get certificate orders in a resource group.
228
+ #
229
+ # @param resource_group_name [String] Name of the resource group to which the
230
+ # resource belongs.
231
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
232
+ # will be added to the HTTP request.
233
+ #
234
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
235
+ #
236
+ def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
237
+ list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
238
+ end
239
+
240
+ #
241
+ # Get certificate orders in a resource group.
242
+ #
243
+ # Get certificate orders in a resource group.
244
+ #
245
+ # @param resource_group_name [String] Name of the resource group to which the
246
+ # resource belongs.
247
+ # @param [Hash{String => String}] A hash of custom headers that will be added
248
+ # to the HTTP request.
249
+ #
250
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
251
+ #
252
+ def list_by_resource_group_async(resource_group_name, custom_headers:nil)
253
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
254
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
255
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
256
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
257
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
258
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
259
+
260
+
261
+ request_headers = {}
262
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
263
+
264
+ # Set Headers
265
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
266
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
267
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders'
268
+
269
+ request_url = @base_url || @client.base_url
270
+
271
+ options = {
272
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
273
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
274
+ query_params: {'api-version' => @client.api_version},
275
+ headers: request_headers.merge(custom_headers || {}),
276
+ base_url: request_url
277
+ }
278
+ promise = @client.make_request_async(:get, path_template, options)
279
+
280
+ promise = promise.then do |result|
281
+ http_response = result.response
282
+ status_code = http_response.status
283
+ response_content = http_response.body
284
+ unless status_code == 200
285
+ error_model = JSON.load(response_content)
286
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
287
+ end
288
+
289
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
290
+ # Deserialize Response
291
+ if status_code == 200
292
+ begin
293
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
294
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::AppServiceCertificateOrderCollection.mapper()
295
+ result.body = @client.deserialize(result_mapper, parsed_response)
296
+ rescue Exception => e
297
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
298
+ end
299
+ end
300
+
301
+ result
302
+ end
303
+
304
+ promise.execute
305
+ end
306
+
307
+ #
308
+ # Get a certificate order.
309
+ #
310
+ # Get a certificate order.
311
+ #
312
+ # @param resource_group_name [String] Name of the resource group to which the
313
+ # resource belongs.
314
+ # @param certificate_order_name [String] Name of the certificate order..
315
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
316
+ # will be added to the HTTP request.
317
+ #
318
+ # @return [AppServiceCertificateOrder] operation results.
319
+ #
320
+ def get(resource_group_name, certificate_order_name, custom_headers:nil)
321
+ response = get_async(resource_group_name, certificate_order_name, custom_headers:custom_headers).value!
322
+ response.body unless response.nil?
323
+ end
324
+
325
+ #
326
+ # Get a certificate order.
327
+ #
328
+ # Get a certificate order.
329
+ #
330
+ # @param resource_group_name [String] Name of the resource group to which the
331
+ # resource belongs.
332
+ # @param certificate_order_name [String] Name of the certificate order..
333
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
334
+ # will be added to the HTTP request.
335
+ #
336
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
337
+ #
338
+ def get_with_http_info(resource_group_name, certificate_order_name, custom_headers:nil)
339
+ get_async(resource_group_name, certificate_order_name, custom_headers:custom_headers).value!
340
+ end
341
+
342
+ #
343
+ # Get a certificate order.
344
+ #
345
+ # Get a certificate order.
346
+ #
347
+ # @param resource_group_name [String] Name of the resource group to which the
348
+ # resource belongs.
349
+ # @param certificate_order_name [String] Name of the certificate order..
350
+ # @param [Hash{String => String}] A hash of custom headers that will be added
351
+ # to the HTTP request.
352
+ #
353
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
354
+ #
355
+ def get_async(resource_group_name, certificate_order_name, custom_headers:nil)
356
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
357
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
358
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
359
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
360
+ fail ArgumentError, 'certificate_order_name is nil' if certificate_order_name.nil?
361
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
362
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
363
+
364
+
365
+ request_headers = {}
366
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
367
+
368
+ # Set Headers
369
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
370
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
371
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'
372
+
373
+ request_url = @base_url || @client.base_url
374
+
375
+ options = {
376
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
377
+ path_params: {'resourceGroupName' => resource_group_name,'certificateOrderName' => certificate_order_name,'subscriptionId' => @client.subscription_id},
378
+ query_params: {'api-version' => @client.api_version},
379
+ headers: request_headers.merge(custom_headers || {}),
380
+ base_url: request_url
381
+ }
382
+ promise = @client.make_request_async(:get, path_template, options)
383
+
384
+ promise = promise.then do |result|
385
+ http_response = result.response
386
+ status_code = http_response.status
387
+ response_content = http_response.body
388
+ unless status_code == 200
389
+ error_model = JSON.load(response_content)
390
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
391
+ end
392
+
393
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
394
+ # Deserialize Response
395
+ if status_code == 200
396
+ begin
397
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
398
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::AppServiceCertificateOrder.mapper()
399
+ result.body = @client.deserialize(result_mapper, parsed_response)
400
+ rescue Exception => e
401
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
402
+ end
403
+ end
404
+
405
+ result
406
+ end
407
+
408
+ promise.execute
409
+ end
410
+
411
+ #
412
+ # Create or update a certificate purchase order.
413
+ #
414
+ # Create or update a certificate purchase order.
415
+ #
416
+ # @param resource_group_name [String] Name of the resource group to which the
417
+ # resource belongs.
418
+ # @param certificate_order_name [String] Name of the certificate order.
419
+ # @param certificate_distinguished_name [AppServiceCertificateOrder]
420
+ # Distinguished name to to use for the certificate order.
421
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
422
+ # will be added to the HTTP request.
423
+ #
424
+ # @return [AppServiceCertificateOrder] operation results.
425
+ #
426
+ def create_or_update(resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers:nil)
427
+ response = create_or_update_async(resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers:custom_headers).value!
428
+ response.body unless response.nil?
429
+ end
430
+
431
+ #
432
+ # @param resource_group_name [String] Name of the resource group to which the
433
+ # resource belongs.
434
+ # @param certificate_order_name [String] Name of the certificate order.
435
+ # @param certificate_distinguished_name [AppServiceCertificateOrder]
436
+ # Distinguished name to to use for the certificate order.
437
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
438
+ # will be added to the HTTP request.
439
+ #
440
+ # @return [Concurrent::Promise] promise which provides async access to http
441
+ # response.
442
+ #
443
+ def create_or_update_async(resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers:nil)
444
+ # Send request
445
+ promise = begin_create_or_update_async(resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers:custom_headers)
446
+
447
+ promise = promise.then do |response|
448
+ # Defining deserialization method.
449
+ deserialize_method = lambda do |parsed_response|
450
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::AppServiceCertificateOrder.mapper()
451
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
452
+ end
453
+
454
+ # Waiting for response.
455
+ @client.get_long_running_operation_result(response, deserialize_method)
456
+ end
457
+
458
+ promise
459
+ end
460
+
461
+ #
462
+ # Delete an existing certificate order.
463
+ #
464
+ # Delete an existing certificate order.
465
+ #
466
+ # @param resource_group_name [String] Name of the resource group to which the
467
+ # resource belongs.
468
+ # @param certificate_order_name [String] Name of the certificate order.
469
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
470
+ # will be added to the HTTP request.
471
+ #
472
+ #
473
+ def delete(resource_group_name, certificate_order_name, custom_headers:nil)
474
+ response = delete_async(resource_group_name, certificate_order_name, custom_headers:custom_headers).value!
475
+ nil
476
+ end
477
+
478
+ #
479
+ # Delete an existing certificate order.
480
+ #
481
+ # Delete an existing certificate order.
482
+ #
483
+ # @param resource_group_name [String] Name of the resource group to which the
484
+ # resource belongs.
485
+ # @param certificate_order_name [String] Name of the certificate order.
486
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
487
+ # will be added to the HTTP request.
488
+ #
489
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
490
+ #
491
+ def delete_with_http_info(resource_group_name, certificate_order_name, custom_headers:nil)
492
+ delete_async(resource_group_name, certificate_order_name, custom_headers:custom_headers).value!
493
+ end
494
+
495
+ #
496
+ # Delete an existing certificate order.
497
+ #
498
+ # Delete an existing certificate order.
499
+ #
500
+ # @param resource_group_name [String] Name of the resource group to which the
501
+ # resource belongs.
502
+ # @param certificate_order_name [String] Name of the certificate order.
503
+ # @param [Hash{String => String}] A hash of custom headers that will be added
504
+ # to the HTTP request.
505
+ #
506
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
507
+ #
508
+ def delete_async(resource_group_name, certificate_order_name, custom_headers:nil)
509
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
510
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
511
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
512
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
513
+ fail ArgumentError, 'certificate_order_name is nil' if certificate_order_name.nil?
514
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
515
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
516
+
517
+
518
+ request_headers = {}
519
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
520
+
521
+ # Set Headers
522
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
523
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
524
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'
525
+
526
+ request_url = @base_url || @client.base_url
527
+
528
+ options = {
529
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
530
+ path_params: {'resourceGroupName' => resource_group_name,'certificateOrderName' => certificate_order_name,'subscriptionId' => @client.subscription_id},
531
+ query_params: {'api-version' => @client.api_version},
532
+ headers: request_headers.merge(custom_headers || {}),
533
+ base_url: request_url
534
+ }
535
+ promise = @client.make_request_async(:delete, path_template, options)
536
+
537
+ promise = promise.then do |result|
538
+ http_response = result.response
539
+ status_code = http_response.status
540
+ response_content = http_response.body
541
+ unless status_code == 200 || status_code == 204
542
+ error_model = JSON.load(response_content)
543
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
544
+ end
545
+
546
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
547
+
548
+ result
549
+ end
550
+
551
+ promise.execute
552
+ end
553
+
554
+ #
555
+ # Create or update a certificate purchase order.
556
+ #
557
+ # Create or update a certificate purchase order.
558
+ #
559
+ # @param resource_group_name [String] Name of the resource group to which the
560
+ # resource belongs.
561
+ # @param certificate_order_name [String] Name of the certificate order.
562
+ # @param certificate_distinguished_name
563
+ # [AppServiceCertificateOrderPatchResource] Distinguished name to to use for
564
+ # the certificate order.
565
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
566
+ # will be added to the HTTP request.
567
+ #
568
+ # @return [AppServiceCertificateOrder] operation results.
569
+ #
570
+ def update(resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers:nil)
571
+ response = update_async(resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers:custom_headers).value!
572
+ response.body unless response.nil?
573
+ end
574
+
575
+ #
576
+ # Create or update a certificate purchase order.
577
+ #
578
+ # Create or update a certificate purchase order.
579
+ #
580
+ # @param resource_group_name [String] Name of the resource group to which the
581
+ # resource belongs.
582
+ # @param certificate_order_name [String] Name of the certificate order.
583
+ # @param certificate_distinguished_name
584
+ # [AppServiceCertificateOrderPatchResource] Distinguished name to to use for
585
+ # the certificate order.
586
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
587
+ # will be added to the HTTP request.
588
+ #
589
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
590
+ #
591
+ def update_with_http_info(resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers:nil)
592
+ update_async(resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers:custom_headers).value!
593
+ end
594
+
595
+ #
596
+ # Create or update a certificate purchase order.
597
+ #
598
+ # Create or update a certificate purchase order.
599
+ #
600
+ # @param resource_group_name [String] Name of the resource group to which the
601
+ # resource belongs.
602
+ # @param certificate_order_name [String] Name of the certificate order.
603
+ # @param certificate_distinguished_name
604
+ # [AppServiceCertificateOrderPatchResource] Distinguished name to to use for
605
+ # the certificate order.
606
+ # @param [Hash{String => String}] A hash of custom headers that will be added
607
+ # to the HTTP request.
608
+ #
609
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
610
+ #
611
+ def update_async(resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers:nil)
612
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
613
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
614
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
615
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
616
+ fail ArgumentError, 'certificate_order_name is nil' if certificate_order_name.nil?
617
+ fail ArgumentError, 'certificate_distinguished_name is nil' if certificate_distinguished_name.nil?
618
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
619
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
620
+
621
+
622
+ request_headers = {}
623
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
624
+
625
+ # Set Headers
626
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
627
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
628
+
629
+ # Serialize Request
630
+ request_mapper = Azure::Web::Mgmt::V2018_02_01::Models::AppServiceCertificateOrderPatchResource.mapper()
631
+ request_content = @client.serialize(request_mapper, certificate_distinguished_name)
632
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
633
+
634
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'
635
+
636
+ request_url = @base_url || @client.base_url
637
+
638
+ options = {
639
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
640
+ path_params: {'resourceGroupName' => resource_group_name,'certificateOrderName' => certificate_order_name,'subscriptionId' => @client.subscription_id},
641
+ query_params: {'api-version' => @client.api_version},
642
+ body: request_content,
643
+ headers: request_headers.merge(custom_headers || {}),
644
+ base_url: request_url
645
+ }
646
+ promise = @client.make_request_async(:patch, path_template, options)
647
+
648
+ promise = promise.then do |result|
649
+ http_response = result.response
650
+ status_code = http_response.status
651
+ response_content = http_response.body
652
+ unless status_code == 200 || status_code == 201
653
+ error_model = JSON.load(response_content)
654
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
655
+ end
656
+
657
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
658
+ # Deserialize Response
659
+ if status_code == 200
660
+ begin
661
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
662
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::AppServiceCertificateOrder.mapper()
663
+ result.body = @client.deserialize(result_mapper, parsed_response)
664
+ rescue Exception => e
665
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
666
+ end
667
+ end
668
+ # Deserialize Response
669
+ if status_code == 201
670
+ begin
671
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
672
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::AppServiceCertificateOrder.mapper()
673
+ result.body = @client.deserialize(result_mapper, parsed_response)
674
+ rescue Exception => e
675
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
676
+ end
677
+ end
678
+
679
+ result
680
+ end
681
+
682
+ promise.execute
683
+ end
684
+
685
+ #
686
+ # List all certificates associated with a certificate order.
687
+ #
688
+ # List all certificates associated with a certificate order.
689
+ #
690
+ # @param resource_group_name [String] Name of the resource group to which the
691
+ # resource belongs.
692
+ # @param certificate_order_name [String] Name of the certificate order.
693
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
694
+ # will be added to the HTTP request.
695
+ #
696
+ # @return [Array<AppServiceCertificateResource>] operation results.
697
+ #
698
+ def list_certificates(resource_group_name, certificate_order_name, custom_headers:nil)
699
+ first_page = list_certificates_as_lazy(resource_group_name, certificate_order_name, custom_headers:custom_headers)
700
+ first_page.get_all_items
701
+ end
702
+
703
+ #
704
+ # List all certificates associated with a certificate order.
705
+ #
706
+ # List all certificates associated with a certificate order.
707
+ #
708
+ # @param resource_group_name [String] Name of the resource group to which the
709
+ # resource belongs.
710
+ # @param certificate_order_name [String] Name of the certificate order.
711
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
712
+ # will be added to the HTTP request.
713
+ #
714
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
715
+ #
716
+ def list_certificates_with_http_info(resource_group_name, certificate_order_name, custom_headers:nil)
717
+ list_certificates_async(resource_group_name, certificate_order_name, custom_headers:custom_headers).value!
718
+ end
719
+
720
+ #
721
+ # List all certificates associated with a certificate order.
722
+ #
723
+ # List all certificates associated with a certificate order.
724
+ #
725
+ # @param resource_group_name [String] Name of the resource group to which the
726
+ # resource belongs.
727
+ # @param certificate_order_name [String] Name of the certificate order.
728
+ # @param [Hash{String => String}] A hash of custom headers that will be added
729
+ # to the HTTP request.
730
+ #
731
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
732
+ #
733
+ def list_certificates_async(resource_group_name, certificate_order_name, custom_headers:nil)
734
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
735
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
736
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
737
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
738
+ fail ArgumentError, 'certificate_order_name is nil' if certificate_order_name.nil?
739
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
740
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
741
+
742
+
743
+ request_headers = {}
744
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
745
+
746
+ # Set Headers
747
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
748
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
749
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates'
750
+
751
+ request_url = @base_url || @client.base_url
752
+
753
+ options = {
754
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
755
+ path_params: {'resourceGroupName' => resource_group_name,'certificateOrderName' => certificate_order_name,'subscriptionId' => @client.subscription_id},
756
+ query_params: {'api-version' => @client.api_version},
757
+ headers: request_headers.merge(custom_headers || {}),
758
+ base_url: request_url
759
+ }
760
+ promise = @client.make_request_async(:get, path_template, options)
761
+
762
+ promise = promise.then do |result|
763
+ http_response = result.response
764
+ status_code = http_response.status
765
+ response_content = http_response.body
766
+ unless status_code == 200
767
+ error_model = JSON.load(response_content)
768
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
769
+ end
770
+
771
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
772
+ # Deserialize Response
773
+ if status_code == 200
774
+ begin
775
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
776
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::AppServiceCertificateCollection.mapper()
777
+ result.body = @client.deserialize(result_mapper, parsed_response)
778
+ rescue Exception => e
779
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
780
+ end
781
+ end
782
+
783
+ result
784
+ end
785
+
786
+ promise.execute
787
+ end
788
+
789
+ #
790
+ # Get the certificate associated with a certificate order.
791
+ #
792
+ # Get the certificate associated with a certificate order.
793
+ #
794
+ # @param resource_group_name [String] Name of the resource group to which the
795
+ # resource belongs.
796
+ # @param certificate_order_name [String] Name of the certificate order.
797
+ # @param name [String] Name of the certificate.
798
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
799
+ # will be added to the HTTP request.
800
+ #
801
+ # @return [AppServiceCertificateResource] operation results.
802
+ #
803
+ def get_certificate(resource_group_name, certificate_order_name, name, custom_headers:nil)
804
+ response = get_certificate_async(resource_group_name, certificate_order_name, name, custom_headers:custom_headers).value!
805
+ response.body unless response.nil?
806
+ end
807
+
808
+ #
809
+ # Get the certificate associated with a certificate order.
810
+ #
811
+ # Get the certificate associated with a certificate order.
812
+ #
813
+ # @param resource_group_name [String] Name of the resource group to which the
814
+ # resource belongs.
815
+ # @param certificate_order_name [String] Name of the certificate order.
816
+ # @param name [String] Name of the certificate.
817
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
818
+ # will be added to the HTTP request.
819
+ #
820
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
821
+ #
822
+ def get_certificate_with_http_info(resource_group_name, certificate_order_name, name, custom_headers:nil)
823
+ get_certificate_async(resource_group_name, certificate_order_name, name, custom_headers:custom_headers).value!
824
+ end
825
+
826
+ #
827
+ # Get the certificate associated with a certificate order.
828
+ #
829
+ # Get the certificate associated with a certificate order.
830
+ #
831
+ # @param resource_group_name [String] Name of the resource group to which the
832
+ # resource belongs.
833
+ # @param certificate_order_name [String] Name of the certificate order.
834
+ # @param name [String] Name of the certificate.
835
+ # @param [Hash{String => String}] A hash of custom headers that will be added
836
+ # to the HTTP request.
837
+ #
838
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
839
+ #
840
+ def get_certificate_async(resource_group_name, certificate_order_name, name, custom_headers:nil)
841
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
842
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
843
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
844
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
845
+ fail ArgumentError, 'certificate_order_name is nil' if certificate_order_name.nil?
846
+ fail ArgumentError, 'name is nil' if name.nil?
847
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
848
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
849
+
850
+
851
+ request_headers = {}
852
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
853
+
854
+ # Set Headers
855
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
856
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
857
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'
858
+
859
+ request_url = @base_url || @client.base_url
860
+
861
+ options = {
862
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
863
+ path_params: {'resourceGroupName' => resource_group_name,'certificateOrderName' => certificate_order_name,'name' => name,'subscriptionId' => @client.subscription_id},
864
+ query_params: {'api-version' => @client.api_version},
865
+ headers: request_headers.merge(custom_headers || {}),
866
+ base_url: request_url
867
+ }
868
+ promise = @client.make_request_async(:get, path_template, options)
869
+
870
+ promise = promise.then do |result|
871
+ http_response = result.response
872
+ status_code = http_response.status
873
+ response_content = http_response.body
874
+ unless status_code == 200
875
+ error_model = JSON.load(response_content)
876
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
877
+ end
878
+
879
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
880
+ # Deserialize Response
881
+ if status_code == 200
882
+ begin
883
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
884
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::AppServiceCertificateResource.mapper()
885
+ result.body = @client.deserialize(result_mapper, parsed_response)
886
+ rescue Exception => e
887
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
888
+ end
889
+ end
890
+
891
+ result
892
+ end
893
+
894
+ promise.execute
895
+ end
896
+
897
+ #
898
+ # Creates or updates a certificate and associates with key vault secret.
899
+ #
900
+ # Creates or updates a certificate and associates with key vault secret.
901
+ #
902
+ # @param resource_group_name [String] Name of the resource group to which the
903
+ # resource belongs.
904
+ # @param certificate_order_name [String] Name of the certificate order.
905
+ # @param name [String] Name of the certificate.
906
+ # @param key_vault_certificate [AppServiceCertificateResource] Key vault
907
+ # certificate resource Id.
908
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
909
+ # will be added to the HTTP request.
910
+ #
911
+ # @return [AppServiceCertificateResource] operation results.
912
+ #
913
+ def create_or_update_certificate(resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers:nil)
914
+ response = create_or_update_certificate_async(resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers:custom_headers).value!
915
+ response.body unless response.nil?
916
+ end
917
+
918
+ #
919
+ # @param resource_group_name [String] Name of the resource group to which the
920
+ # resource belongs.
921
+ # @param certificate_order_name [String] Name of the certificate order.
922
+ # @param name [String] Name of the certificate.
923
+ # @param key_vault_certificate [AppServiceCertificateResource] Key vault
924
+ # certificate resource Id.
925
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
926
+ # will be added to the HTTP request.
927
+ #
928
+ # @return [Concurrent::Promise] promise which provides async access to http
929
+ # response.
930
+ #
931
+ def create_or_update_certificate_async(resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers:nil)
932
+ # Send request
933
+ promise = begin_create_or_update_certificate_async(resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers:custom_headers)
934
+
935
+ promise = promise.then do |response|
936
+ # Defining deserialization method.
937
+ deserialize_method = lambda do |parsed_response|
938
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::AppServiceCertificateResource.mapper()
939
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
940
+ end
941
+
942
+ # Waiting for response.
943
+ @client.get_long_running_operation_result(response, deserialize_method)
944
+ end
945
+
946
+ promise
947
+ end
948
+
949
+ #
950
+ # Delete the certificate associated with a certificate order.
951
+ #
952
+ # Delete the certificate associated with a certificate order.
953
+ #
954
+ # @param resource_group_name [String] Name of the resource group to which the
955
+ # resource belongs.
956
+ # @param certificate_order_name [String] Name of the certificate order.
957
+ # @param name [String] Name of the certificate.
958
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
959
+ # will be added to the HTTP request.
960
+ #
961
+ #
962
+ def delete_certificate(resource_group_name, certificate_order_name, name, custom_headers:nil)
963
+ response = delete_certificate_async(resource_group_name, certificate_order_name, name, custom_headers:custom_headers).value!
964
+ nil
965
+ end
966
+
967
+ #
968
+ # Delete the certificate associated with a certificate order.
969
+ #
970
+ # Delete the certificate associated with a certificate order.
971
+ #
972
+ # @param resource_group_name [String] Name of the resource group to which the
973
+ # resource belongs.
974
+ # @param certificate_order_name [String] Name of the certificate order.
975
+ # @param name [String] Name of the certificate.
976
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
977
+ # will be added to the HTTP request.
978
+ #
979
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
980
+ #
981
+ def delete_certificate_with_http_info(resource_group_name, certificate_order_name, name, custom_headers:nil)
982
+ delete_certificate_async(resource_group_name, certificate_order_name, name, custom_headers:custom_headers).value!
983
+ end
984
+
985
+ #
986
+ # Delete the certificate associated with a certificate order.
987
+ #
988
+ # Delete the certificate associated with a certificate order.
989
+ #
990
+ # @param resource_group_name [String] Name of the resource group to which the
991
+ # resource belongs.
992
+ # @param certificate_order_name [String] Name of the certificate order.
993
+ # @param name [String] Name of the certificate.
994
+ # @param [Hash{String => String}] A hash of custom headers that will be added
995
+ # to the HTTP request.
996
+ #
997
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
998
+ #
999
+ def delete_certificate_async(resource_group_name, certificate_order_name, name, custom_headers:nil)
1000
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1001
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1002
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1003
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1004
+ fail ArgumentError, 'certificate_order_name is nil' if certificate_order_name.nil?
1005
+ fail ArgumentError, 'name is nil' if name.nil?
1006
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1007
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1008
+
1009
+
1010
+ request_headers = {}
1011
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1012
+
1013
+ # Set Headers
1014
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1015
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1016
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'
1017
+
1018
+ request_url = @base_url || @client.base_url
1019
+
1020
+ options = {
1021
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1022
+ path_params: {'resourceGroupName' => resource_group_name,'certificateOrderName' => certificate_order_name,'name' => name,'subscriptionId' => @client.subscription_id},
1023
+ query_params: {'api-version' => @client.api_version},
1024
+ headers: request_headers.merge(custom_headers || {}),
1025
+ base_url: request_url
1026
+ }
1027
+ promise = @client.make_request_async(:delete, path_template, options)
1028
+
1029
+ promise = promise.then do |result|
1030
+ http_response = result.response
1031
+ status_code = http_response.status
1032
+ response_content = http_response.body
1033
+ unless status_code == 200 || status_code == 204
1034
+ error_model = JSON.load(response_content)
1035
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1036
+ end
1037
+
1038
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1039
+
1040
+ result
1041
+ end
1042
+
1043
+ promise.execute
1044
+ end
1045
+
1046
+ #
1047
+ # Creates or updates a certificate and associates with key vault secret.
1048
+ #
1049
+ # Creates or updates a certificate and associates with key vault secret.
1050
+ #
1051
+ # @param resource_group_name [String] Name of the resource group to which the
1052
+ # resource belongs.
1053
+ # @param certificate_order_name [String] Name of the certificate order.
1054
+ # @param name [String] Name of the certificate.
1055
+ # @param key_vault_certificate [AppServiceCertificatePatchResource] Key vault
1056
+ # certificate resource Id.
1057
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1058
+ # will be added to the HTTP request.
1059
+ #
1060
+ # @return [AppServiceCertificateResource] operation results.
1061
+ #
1062
+ def update_certificate(resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers:nil)
1063
+ response = update_certificate_async(resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers:custom_headers).value!
1064
+ response.body unless response.nil?
1065
+ end
1066
+
1067
+ #
1068
+ # Creates or updates a certificate and associates with key vault secret.
1069
+ #
1070
+ # Creates or updates a certificate and associates with key vault secret.
1071
+ #
1072
+ # @param resource_group_name [String] Name of the resource group to which the
1073
+ # resource belongs.
1074
+ # @param certificate_order_name [String] Name of the certificate order.
1075
+ # @param name [String] Name of the certificate.
1076
+ # @param key_vault_certificate [AppServiceCertificatePatchResource] Key vault
1077
+ # certificate resource Id.
1078
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1079
+ # will be added to the HTTP request.
1080
+ #
1081
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1082
+ #
1083
+ def update_certificate_with_http_info(resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers:nil)
1084
+ update_certificate_async(resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers:custom_headers).value!
1085
+ end
1086
+
1087
+ #
1088
+ # Creates or updates a certificate and associates with key vault secret.
1089
+ #
1090
+ # Creates or updates a certificate and associates with key vault secret.
1091
+ #
1092
+ # @param resource_group_name [String] Name of the resource group to which the
1093
+ # resource belongs.
1094
+ # @param certificate_order_name [String] Name of the certificate order.
1095
+ # @param name [String] Name of the certificate.
1096
+ # @param key_vault_certificate [AppServiceCertificatePatchResource] Key vault
1097
+ # certificate resource Id.
1098
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1099
+ # to the HTTP request.
1100
+ #
1101
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1102
+ #
1103
+ def update_certificate_async(resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers:nil)
1104
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1105
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1106
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1107
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1108
+ fail ArgumentError, 'certificate_order_name is nil' if certificate_order_name.nil?
1109
+ fail ArgumentError, 'name is nil' if name.nil?
1110
+ fail ArgumentError, 'key_vault_certificate is nil' if key_vault_certificate.nil?
1111
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1112
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1113
+
1114
+
1115
+ request_headers = {}
1116
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1117
+
1118
+ # Set Headers
1119
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1120
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1121
+
1122
+ # Serialize Request
1123
+ request_mapper = Azure::Web::Mgmt::V2018_02_01::Models::AppServiceCertificatePatchResource.mapper()
1124
+ request_content = @client.serialize(request_mapper, key_vault_certificate)
1125
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1126
+
1127
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'
1128
+
1129
+ request_url = @base_url || @client.base_url
1130
+
1131
+ options = {
1132
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1133
+ path_params: {'resourceGroupName' => resource_group_name,'certificateOrderName' => certificate_order_name,'name' => name,'subscriptionId' => @client.subscription_id},
1134
+ query_params: {'api-version' => @client.api_version},
1135
+ body: request_content,
1136
+ headers: request_headers.merge(custom_headers || {}),
1137
+ base_url: request_url
1138
+ }
1139
+ promise = @client.make_request_async(:patch, path_template, options)
1140
+
1141
+ promise = promise.then do |result|
1142
+ http_response = result.response
1143
+ status_code = http_response.status
1144
+ response_content = http_response.body
1145
+ unless status_code == 200 || status_code == 201
1146
+ error_model = JSON.load(response_content)
1147
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1148
+ end
1149
+
1150
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1151
+ # Deserialize Response
1152
+ if status_code == 200
1153
+ begin
1154
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1155
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::AppServiceCertificateResource.mapper()
1156
+ result.body = @client.deserialize(result_mapper, parsed_response)
1157
+ rescue Exception => e
1158
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1159
+ end
1160
+ end
1161
+ # Deserialize Response
1162
+ if status_code == 201
1163
+ begin
1164
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1165
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::AppServiceCertificateResource.mapper()
1166
+ result.body = @client.deserialize(result_mapper, parsed_response)
1167
+ rescue Exception => e
1168
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1169
+ end
1170
+ end
1171
+
1172
+ result
1173
+ end
1174
+
1175
+ promise.execute
1176
+ end
1177
+
1178
+ #
1179
+ # Reissue an existing certificate order.
1180
+ #
1181
+ # Reissue an existing certificate order.
1182
+ #
1183
+ # @param resource_group_name [String] Name of the resource group to which the
1184
+ # resource belongs.
1185
+ # @param certificate_order_name [String] Name of the certificate order.
1186
+ # @param reissue_certificate_order_request [ReissueCertificateOrderRequest]
1187
+ # Parameters for the reissue.
1188
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1189
+ # will be added to the HTTP request.
1190
+ #
1191
+ #
1192
+ def reissue(resource_group_name, certificate_order_name, reissue_certificate_order_request, custom_headers:nil)
1193
+ response = reissue_async(resource_group_name, certificate_order_name, reissue_certificate_order_request, custom_headers:custom_headers).value!
1194
+ nil
1195
+ end
1196
+
1197
+ #
1198
+ # Reissue an existing certificate order.
1199
+ #
1200
+ # Reissue an existing certificate order.
1201
+ #
1202
+ # @param resource_group_name [String] Name of the resource group to which the
1203
+ # resource belongs.
1204
+ # @param certificate_order_name [String] Name of the certificate order.
1205
+ # @param reissue_certificate_order_request [ReissueCertificateOrderRequest]
1206
+ # Parameters for the reissue.
1207
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1208
+ # will be added to the HTTP request.
1209
+ #
1210
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1211
+ #
1212
+ def reissue_with_http_info(resource_group_name, certificate_order_name, reissue_certificate_order_request, custom_headers:nil)
1213
+ reissue_async(resource_group_name, certificate_order_name, reissue_certificate_order_request, custom_headers:custom_headers).value!
1214
+ end
1215
+
1216
+ #
1217
+ # Reissue an existing certificate order.
1218
+ #
1219
+ # Reissue an existing certificate order.
1220
+ #
1221
+ # @param resource_group_name [String] Name of the resource group to which the
1222
+ # resource belongs.
1223
+ # @param certificate_order_name [String] Name of the certificate order.
1224
+ # @param reissue_certificate_order_request [ReissueCertificateOrderRequest]
1225
+ # Parameters for the reissue.
1226
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1227
+ # to the HTTP request.
1228
+ #
1229
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1230
+ #
1231
+ def reissue_async(resource_group_name, certificate_order_name, reissue_certificate_order_request, custom_headers:nil)
1232
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1233
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1234
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1235
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1236
+ fail ArgumentError, 'certificate_order_name is nil' if certificate_order_name.nil?
1237
+ fail ArgumentError, 'reissue_certificate_order_request is nil' if reissue_certificate_order_request.nil?
1238
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1239
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1240
+
1241
+
1242
+ request_headers = {}
1243
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1244
+
1245
+ # Set Headers
1246
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1247
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1248
+
1249
+ # Serialize Request
1250
+ request_mapper = Azure::Web::Mgmt::V2018_02_01::Models::ReissueCertificateOrderRequest.mapper()
1251
+ request_content = @client.serialize(request_mapper, reissue_certificate_order_request)
1252
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1253
+
1254
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue'
1255
+
1256
+ request_url = @base_url || @client.base_url
1257
+
1258
+ options = {
1259
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1260
+ path_params: {'resourceGroupName' => resource_group_name,'certificateOrderName' => certificate_order_name,'subscriptionId' => @client.subscription_id},
1261
+ query_params: {'api-version' => @client.api_version},
1262
+ body: request_content,
1263
+ headers: request_headers.merge(custom_headers || {}),
1264
+ base_url: request_url
1265
+ }
1266
+ promise = @client.make_request_async(:post, path_template, options)
1267
+
1268
+ promise = promise.then do |result|
1269
+ http_response = result.response
1270
+ status_code = http_response.status
1271
+ response_content = http_response.body
1272
+ unless status_code == 204
1273
+ error_model = JSON.load(response_content)
1274
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1275
+ end
1276
+
1277
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1278
+
1279
+ result
1280
+ end
1281
+
1282
+ promise.execute
1283
+ end
1284
+
1285
+ #
1286
+ # Renew an existing certificate order.
1287
+ #
1288
+ # Renew an existing certificate order.
1289
+ #
1290
+ # @param resource_group_name [String] Name of the resource group to which the
1291
+ # resource belongs.
1292
+ # @param certificate_order_name [String] Name of the certificate order.
1293
+ # @param renew_certificate_order_request [RenewCertificateOrderRequest] Renew
1294
+ # parameters
1295
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1296
+ # will be added to the HTTP request.
1297
+ #
1298
+ #
1299
+ def renew(resource_group_name, certificate_order_name, renew_certificate_order_request, custom_headers:nil)
1300
+ response = renew_async(resource_group_name, certificate_order_name, renew_certificate_order_request, custom_headers:custom_headers).value!
1301
+ nil
1302
+ end
1303
+
1304
+ #
1305
+ # Renew an existing certificate order.
1306
+ #
1307
+ # Renew an existing certificate order.
1308
+ #
1309
+ # @param resource_group_name [String] Name of the resource group to which the
1310
+ # resource belongs.
1311
+ # @param certificate_order_name [String] Name of the certificate order.
1312
+ # @param renew_certificate_order_request [RenewCertificateOrderRequest] Renew
1313
+ # parameters
1314
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1315
+ # will be added to the HTTP request.
1316
+ #
1317
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1318
+ #
1319
+ def renew_with_http_info(resource_group_name, certificate_order_name, renew_certificate_order_request, custom_headers:nil)
1320
+ renew_async(resource_group_name, certificate_order_name, renew_certificate_order_request, custom_headers:custom_headers).value!
1321
+ end
1322
+
1323
+ #
1324
+ # Renew an existing certificate order.
1325
+ #
1326
+ # Renew an existing certificate order.
1327
+ #
1328
+ # @param resource_group_name [String] Name of the resource group to which the
1329
+ # resource belongs.
1330
+ # @param certificate_order_name [String] Name of the certificate order.
1331
+ # @param renew_certificate_order_request [RenewCertificateOrderRequest] Renew
1332
+ # parameters
1333
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1334
+ # to the HTTP request.
1335
+ #
1336
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1337
+ #
1338
+ def renew_async(resource_group_name, certificate_order_name, renew_certificate_order_request, custom_headers:nil)
1339
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1340
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1341
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1342
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1343
+ fail ArgumentError, 'certificate_order_name is nil' if certificate_order_name.nil?
1344
+ fail ArgumentError, 'renew_certificate_order_request is nil' if renew_certificate_order_request.nil?
1345
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1346
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1347
+
1348
+
1349
+ request_headers = {}
1350
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1351
+
1352
+ # Set Headers
1353
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1354
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1355
+
1356
+ # Serialize Request
1357
+ request_mapper = Azure::Web::Mgmt::V2018_02_01::Models::RenewCertificateOrderRequest.mapper()
1358
+ request_content = @client.serialize(request_mapper, renew_certificate_order_request)
1359
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1360
+
1361
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew'
1362
+
1363
+ request_url = @base_url || @client.base_url
1364
+
1365
+ options = {
1366
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1367
+ path_params: {'resourceGroupName' => resource_group_name,'certificateOrderName' => certificate_order_name,'subscriptionId' => @client.subscription_id},
1368
+ query_params: {'api-version' => @client.api_version},
1369
+ body: request_content,
1370
+ headers: request_headers.merge(custom_headers || {}),
1371
+ base_url: request_url
1372
+ }
1373
+ promise = @client.make_request_async(:post, path_template, options)
1374
+
1375
+ promise = promise.then do |result|
1376
+ http_response = result.response
1377
+ status_code = http_response.status
1378
+ response_content = http_response.body
1379
+ unless status_code == 204
1380
+ error_model = JSON.load(response_content)
1381
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1382
+ end
1383
+
1384
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1385
+
1386
+ result
1387
+ end
1388
+
1389
+ promise.execute
1390
+ end
1391
+
1392
+ #
1393
+ # Resend certificate email.
1394
+ #
1395
+ # Resend certificate email.
1396
+ #
1397
+ # @param resource_group_name [String] Name of the resource group to which the
1398
+ # resource belongs.
1399
+ # @param certificate_order_name [String] Name of the certificate order.
1400
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1401
+ # will be added to the HTTP request.
1402
+ #
1403
+ #
1404
+ def resend_email(resource_group_name, certificate_order_name, custom_headers:nil)
1405
+ response = resend_email_async(resource_group_name, certificate_order_name, custom_headers:custom_headers).value!
1406
+ nil
1407
+ end
1408
+
1409
+ #
1410
+ # Resend certificate email.
1411
+ #
1412
+ # Resend certificate email.
1413
+ #
1414
+ # @param resource_group_name [String] Name of the resource group to which the
1415
+ # resource belongs.
1416
+ # @param certificate_order_name [String] Name of the certificate order.
1417
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1418
+ # will be added to the HTTP request.
1419
+ #
1420
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1421
+ #
1422
+ def resend_email_with_http_info(resource_group_name, certificate_order_name, custom_headers:nil)
1423
+ resend_email_async(resource_group_name, certificate_order_name, custom_headers:custom_headers).value!
1424
+ end
1425
+
1426
+ #
1427
+ # Resend certificate email.
1428
+ #
1429
+ # Resend certificate email.
1430
+ #
1431
+ # @param resource_group_name [String] Name of the resource group to which the
1432
+ # resource belongs.
1433
+ # @param certificate_order_name [String] Name of the certificate order.
1434
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1435
+ # to the HTTP request.
1436
+ #
1437
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1438
+ #
1439
+ def resend_email_async(resource_group_name, certificate_order_name, custom_headers:nil)
1440
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1441
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1442
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1443
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1444
+ fail ArgumentError, 'certificate_order_name is nil' if certificate_order_name.nil?
1445
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1446
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1447
+
1448
+
1449
+ request_headers = {}
1450
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1451
+
1452
+ # Set Headers
1453
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1454
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1455
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail'
1456
+
1457
+ request_url = @base_url || @client.base_url
1458
+
1459
+ options = {
1460
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1461
+ path_params: {'resourceGroupName' => resource_group_name,'certificateOrderName' => certificate_order_name,'subscriptionId' => @client.subscription_id},
1462
+ query_params: {'api-version' => @client.api_version},
1463
+ headers: request_headers.merge(custom_headers || {}),
1464
+ base_url: request_url
1465
+ }
1466
+ promise = @client.make_request_async(:post, path_template, options)
1467
+
1468
+ promise = promise.then do |result|
1469
+ http_response = result.response
1470
+ status_code = http_response.status
1471
+ response_content = http_response.body
1472
+ unless status_code == 204
1473
+ error_model = JSON.load(response_content)
1474
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1475
+ end
1476
+
1477
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1478
+
1479
+ result
1480
+ end
1481
+
1482
+ promise.execute
1483
+ end
1484
+
1485
+ #
1486
+ # Verify domain ownership for this certificate order.
1487
+ #
1488
+ # Verify domain ownership for this certificate order.
1489
+ #
1490
+ # @param resource_group_name [String] Name of the resource group to which the
1491
+ # resource belongs.
1492
+ # @param certificate_order_name [String] Name of the certificate order.
1493
+ # @param name_identifier [NameIdentifier] Email address
1494
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1495
+ # will be added to the HTTP request.
1496
+ #
1497
+ #
1498
+ def resend_request_emails(resource_group_name, certificate_order_name, name_identifier, custom_headers:nil)
1499
+ response = resend_request_emails_async(resource_group_name, certificate_order_name, name_identifier, custom_headers:custom_headers).value!
1500
+ nil
1501
+ end
1502
+
1503
+ #
1504
+ # Verify domain ownership for this certificate order.
1505
+ #
1506
+ # Verify domain ownership for this certificate order.
1507
+ #
1508
+ # @param resource_group_name [String] Name of the resource group to which the
1509
+ # resource belongs.
1510
+ # @param certificate_order_name [String] Name of the certificate order.
1511
+ # @param name_identifier [NameIdentifier] Email address
1512
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1513
+ # will be added to the HTTP request.
1514
+ #
1515
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1516
+ #
1517
+ def resend_request_emails_with_http_info(resource_group_name, certificate_order_name, name_identifier, custom_headers:nil)
1518
+ resend_request_emails_async(resource_group_name, certificate_order_name, name_identifier, custom_headers:custom_headers).value!
1519
+ end
1520
+
1521
+ #
1522
+ # Verify domain ownership for this certificate order.
1523
+ #
1524
+ # Verify domain ownership for this certificate order.
1525
+ #
1526
+ # @param resource_group_name [String] Name of the resource group to which the
1527
+ # resource belongs.
1528
+ # @param certificate_order_name [String] Name of the certificate order.
1529
+ # @param name_identifier [NameIdentifier] Email address
1530
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1531
+ # to the HTTP request.
1532
+ #
1533
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1534
+ #
1535
+ def resend_request_emails_async(resource_group_name, certificate_order_name, name_identifier, custom_headers:nil)
1536
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1537
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1538
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1539
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1540
+ fail ArgumentError, 'certificate_order_name is nil' if certificate_order_name.nil?
1541
+ fail ArgumentError, 'name_identifier is nil' if name_identifier.nil?
1542
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1543
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1544
+
1545
+
1546
+ request_headers = {}
1547
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1548
+
1549
+ # Set Headers
1550
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1551
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1552
+
1553
+ # Serialize Request
1554
+ request_mapper = Azure::Web::Mgmt::V2018_02_01::Models::NameIdentifier.mapper()
1555
+ request_content = @client.serialize(request_mapper, name_identifier)
1556
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1557
+
1558
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails'
1559
+
1560
+ request_url = @base_url || @client.base_url
1561
+
1562
+ options = {
1563
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1564
+ path_params: {'resourceGroupName' => resource_group_name,'certificateOrderName' => certificate_order_name,'subscriptionId' => @client.subscription_id},
1565
+ query_params: {'api-version' => @client.api_version},
1566
+ body: request_content,
1567
+ headers: request_headers.merge(custom_headers || {}),
1568
+ base_url: request_url
1569
+ }
1570
+ promise = @client.make_request_async(:post, path_template, options)
1571
+
1572
+ promise = promise.then do |result|
1573
+ http_response = result.response
1574
+ status_code = http_response.status
1575
+ response_content = http_response.body
1576
+ unless status_code == 204
1577
+ error_model = JSON.load(response_content)
1578
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1579
+ end
1580
+
1581
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1582
+
1583
+ result
1584
+ end
1585
+
1586
+ promise.execute
1587
+ end
1588
+
1589
+ #
1590
+ # Verify domain ownership for this certificate order.
1591
+ #
1592
+ # Verify domain ownership for this certificate order.
1593
+ #
1594
+ # @param resource_group_name [String] Name of the resource group to which the
1595
+ # resource belongs.
1596
+ # @param certificate_order_name [String] Name of the certificate order.
1597
+ # @param site_seal_request [SiteSealRequest] Site seal request.
1598
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1599
+ # will be added to the HTTP request.
1600
+ #
1601
+ # @return [SiteSeal] operation results.
1602
+ #
1603
+ def retrieve_site_seal(resource_group_name, certificate_order_name, site_seal_request, custom_headers:nil)
1604
+ response = retrieve_site_seal_async(resource_group_name, certificate_order_name, site_seal_request, custom_headers:custom_headers).value!
1605
+ response.body unless response.nil?
1606
+ end
1607
+
1608
+ #
1609
+ # Verify domain ownership for this certificate order.
1610
+ #
1611
+ # Verify domain ownership for this certificate order.
1612
+ #
1613
+ # @param resource_group_name [String] Name of the resource group to which the
1614
+ # resource belongs.
1615
+ # @param certificate_order_name [String] Name of the certificate order.
1616
+ # @param site_seal_request [SiteSealRequest] Site seal request.
1617
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1618
+ # will be added to the HTTP request.
1619
+ #
1620
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1621
+ #
1622
+ def retrieve_site_seal_with_http_info(resource_group_name, certificate_order_name, site_seal_request, custom_headers:nil)
1623
+ retrieve_site_seal_async(resource_group_name, certificate_order_name, site_seal_request, custom_headers:custom_headers).value!
1624
+ end
1625
+
1626
+ #
1627
+ # Verify domain ownership for this certificate order.
1628
+ #
1629
+ # Verify domain ownership for this certificate order.
1630
+ #
1631
+ # @param resource_group_name [String] Name of the resource group to which the
1632
+ # resource belongs.
1633
+ # @param certificate_order_name [String] Name of the certificate order.
1634
+ # @param site_seal_request [SiteSealRequest] Site seal request.
1635
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1636
+ # to the HTTP request.
1637
+ #
1638
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1639
+ #
1640
+ def retrieve_site_seal_async(resource_group_name, certificate_order_name, site_seal_request, custom_headers:nil)
1641
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1642
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1643
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1644
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1645
+ fail ArgumentError, 'certificate_order_name is nil' if certificate_order_name.nil?
1646
+ fail ArgumentError, 'site_seal_request is nil' if site_seal_request.nil?
1647
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1648
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1649
+
1650
+
1651
+ request_headers = {}
1652
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1653
+
1654
+ # Set Headers
1655
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1656
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1657
+
1658
+ # Serialize Request
1659
+ request_mapper = Azure::Web::Mgmt::V2018_02_01::Models::SiteSealRequest.mapper()
1660
+ request_content = @client.serialize(request_mapper, site_seal_request)
1661
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1662
+
1663
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal'
1664
+
1665
+ request_url = @base_url || @client.base_url
1666
+
1667
+ options = {
1668
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1669
+ path_params: {'resourceGroupName' => resource_group_name,'certificateOrderName' => certificate_order_name,'subscriptionId' => @client.subscription_id},
1670
+ query_params: {'api-version' => @client.api_version},
1671
+ body: request_content,
1672
+ headers: request_headers.merge(custom_headers || {}),
1673
+ base_url: request_url
1674
+ }
1675
+ promise = @client.make_request_async(:post, path_template, options)
1676
+
1677
+ promise = promise.then do |result|
1678
+ http_response = result.response
1679
+ status_code = http_response.status
1680
+ response_content = http_response.body
1681
+ unless status_code == 200
1682
+ error_model = JSON.load(response_content)
1683
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1684
+ end
1685
+
1686
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1687
+ # Deserialize Response
1688
+ if status_code == 200
1689
+ begin
1690
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1691
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::SiteSeal.mapper()
1692
+ result.body = @client.deserialize(result_mapper, parsed_response)
1693
+ rescue Exception => e
1694
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1695
+ end
1696
+ end
1697
+
1698
+ result
1699
+ end
1700
+
1701
+ promise.execute
1702
+ end
1703
+
1704
+ #
1705
+ # Verify domain ownership for this certificate order.
1706
+ #
1707
+ # Verify domain ownership for this certificate order.
1708
+ #
1709
+ # @param resource_group_name [String] Name of the resource group to which the
1710
+ # resource belongs.
1711
+ # @param certificate_order_name [String] Name of the certificate order.
1712
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1713
+ # will be added to the HTTP request.
1714
+ #
1715
+ #
1716
+ def verify_domain_ownership(resource_group_name, certificate_order_name, custom_headers:nil)
1717
+ response = verify_domain_ownership_async(resource_group_name, certificate_order_name, custom_headers:custom_headers).value!
1718
+ nil
1719
+ end
1720
+
1721
+ #
1722
+ # Verify domain ownership for this certificate order.
1723
+ #
1724
+ # Verify domain ownership for this certificate order.
1725
+ #
1726
+ # @param resource_group_name [String] Name of the resource group to which the
1727
+ # resource belongs.
1728
+ # @param certificate_order_name [String] Name of the certificate order.
1729
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1730
+ # will be added to the HTTP request.
1731
+ #
1732
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1733
+ #
1734
+ def verify_domain_ownership_with_http_info(resource_group_name, certificate_order_name, custom_headers:nil)
1735
+ verify_domain_ownership_async(resource_group_name, certificate_order_name, custom_headers:custom_headers).value!
1736
+ end
1737
+
1738
+ #
1739
+ # Verify domain ownership for this certificate order.
1740
+ #
1741
+ # Verify domain ownership for this certificate order.
1742
+ #
1743
+ # @param resource_group_name [String] Name of the resource group to which the
1744
+ # resource belongs.
1745
+ # @param certificate_order_name [String] Name of the certificate order.
1746
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1747
+ # to the HTTP request.
1748
+ #
1749
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1750
+ #
1751
+ def verify_domain_ownership_async(resource_group_name, certificate_order_name, custom_headers:nil)
1752
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1753
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1754
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1755
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1756
+ fail ArgumentError, 'certificate_order_name is nil' if certificate_order_name.nil?
1757
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1758
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1759
+
1760
+
1761
+ request_headers = {}
1762
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1763
+
1764
+ # Set Headers
1765
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1766
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1767
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership'
1768
+
1769
+ request_url = @base_url || @client.base_url
1770
+
1771
+ options = {
1772
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1773
+ path_params: {'resourceGroupName' => resource_group_name,'certificateOrderName' => certificate_order_name,'subscriptionId' => @client.subscription_id},
1774
+ query_params: {'api-version' => @client.api_version},
1775
+ headers: request_headers.merge(custom_headers || {}),
1776
+ base_url: request_url
1777
+ }
1778
+ promise = @client.make_request_async(:post, path_template, options)
1779
+
1780
+ promise = promise.then do |result|
1781
+ http_response = result.response
1782
+ status_code = http_response.status
1783
+ response_content = http_response.body
1784
+ unless status_code == 204
1785
+ error_model = JSON.load(response_content)
1786
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1787
+ end
1788
+
1789
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1790
+
1791
+ result
1792
+ end
1793
+
1794
+ promise.execute
1795
+ end
1796
+
1797
+ #
1798
+ # Retrieve the list of certificate actions.
1799
+ #
1800
+ # Retrieve the list of certificate actions.
1801
+ #
1802
+ # @param resource_group_name [String] Name of the resource group to which the
1803
+ # resource belongs.
1804
+ # @param name [String] Name of the certificate order.
1805
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1806
+ # will be added to the HTTP request.
1807
+ #
1808
+ # @return [Array] operation results.
1809
+ #
1810
+ def retrieve_certificate_actions(resource_group_name, name, custom_headers:nil)
1811
+ response = retrieve_certificate_actions_async(resource_group_name, name, custom_headers:custom_headers).value!
1812
+ response.body unless response.nil?
1813
+ end
1814
+
1815
+ #
1816
+ # Retrieve the list of certificate actions.
1817
+ #
1818
+ # Retrieve the list of certificate actions.
1819
+ #
1820
+ # @param resource_group_name [String] Name of the resource group to which the
1821
+ # resource belongs.
1822
+ # @param name [String] Name of the certificate order.
1823
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1824
+ # will be added to the HTTP request.
1825
+ #
1826
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1827
+ #
1828
+ def retrieve_certificate_actions_with_http_info(resource_group_name, name, custom_headers:nil)
1829
+ retrieve_certificate_actions_async(resource_group_name, name, custom_headers:custom_headers).value!
1830
+ end
1831
+
1832
+ #
1833
+ # Retrieve the list of certificate actions.
1834
+ #
1835
+ # Retrieve the list of certificate actions.
1836
+ #
1837
+ # @param resource_group_name [String] Name of the resource group to which the
1838
+ # resource belongs.
1839
+ # @param name [String] Name of the certificate order.
1840
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1841
+ # to the HTTP request.
1842
+ #
1843
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1844
+ #
1845
+ def retrieve_certificate_actions_async(resource_group_name, name, custom_headers:nil)
1846
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1847
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1848
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1849
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1850
+ fail ArgumentError, 'name is nil' if name.nil?
1851
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1852
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1853
+
1854
+
1855
+ request_headers = {}
1856
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1857
+
1858
+ # Set Headers
1859
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1860
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1861
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions'
1862
+
1863
+ request_url = @base_url || @client.base_url
1864
+
1865
+ options = {
1866
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1867
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
1868
+ query_params: {'api-version' => @client.api_version},
1869
+ headers: request_headers.merge(custom_headers || {}),
1870
+ base_url: request_url
1871
+ }
1872
+ promise = @client.make_request_async(:post, path_template, options)
1873
+
1874
+ promise = promise.then do |result|
1875
+ http_response = result.response
1876
+ status_code = http_response.status
1877
+ response_content = http_response.body
1878
+ unless status_code == 200
1879
+ error_model = JSON.load(response_content)
1880
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1881
+ end
1882
+
1883
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1884
+ # Deserialize Response
1885
+ if status_code == 200
1886
+ begin
1887
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1888
+ result_mapper = {
1889
+ client_side_validation: true,
1890
+ required: false,
1891
+ serialized_name: 'parsed_response',
1892
+ type: {
1893
+ name: 'Sequence',
1894
+ element: {
1895
+ client_side_validation: true,
1896
+ required: false,
1897
+ serialized_name: 'CertificateOrderActionElementType',
1898
+ type: {
1899
+ name: 'Composite',
1900
+ class_name: 'CertificateOrderAction'
1901
+ }
1902
+ }
1903
+ }
1904
+ }
1905
+ result.body = @client.deserialize(result_mapper, parsed_response)
1906
+ rescue Exception => e
1907
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1908
+ end
1909
+ end
1910
+
1911
+ result
1912
+ end
1913
+
1914
+ promise.execute
1915
+ end
1916
+
1917
+ #
1918
+ # Retrieve email history.
1919
+ #
1920
+ # Retrieve email history.
1921
+ #
1922
+ # @param resource_group_name [String] Name of the resource group to which the
1923
+ # resource belongs.
1924
+ # @param name [String] Name of the certificate order.
1925
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1926
+ # will be added to the HTTP request.
1927
+ #
1928
+ # @return [Array] operation results.
1929
+ #
1930
+ def retrieve_certificate_email_history(resource_group_name, name, custom_headers:nil)
1931
+ response = retrieve_certificate_email_history_async(resource_group_name, name, custom_headers:custom_headers).value!
1932
+ response.body unless response.nil?
1933
+ end
1934
+
1935
+ #
1936
+ # Retrieve email history.
1937
+ #
1938
+ # Retrieve email history.
1939
+ #
1940
+ # @param resource_group_name [String] Name of the resource group to which the
1941
+ # resource belongs.
1942
+ # @param name [String] Name of the certificate order.
1943
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1944
+ # will be added to the HTTP request.
1945
+ #
1946
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1947
+ #
1948
+ def retrieve_certificate_email_history_with_http_info(resource_group_name, name, custom_headers:nil)
1949
+ retrieve_certificate_email_history_async(resource_group_name, name, custom_headers:custom_headers).value!
1950
+ end
1951
+
1952
+ #
1953
+ # Retrieve email history.
1954
+ #
1955
+ # Retrieve email history.
1956
+ #
1957
+ # @param resource_group_name [String] Name of the resource group to which the
1958
+ # resource belongs.
1959
+ # @param name [String] Name of the certificate order.
1960
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1961
+ # to the HTTP request.
1962
+ #
1963
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1964
+ #
1965
+ def retrieve_certificate_email_history_async(resource_group_name, name, custom_headers:nil)
1966
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1967
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1968
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1969
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
1970
+ fail ArgumentError, 'name is nil' if name.nil?
1971
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1972
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1973
+
1974
+
1975
+ request_headers = {}
1976
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1977
+
1978
+ # Set Headers
1979
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1980
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1981
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory'
1982
+
1983
+ request_url = @base_url || @client.base_url
1984
+
1985
+ options = {
1986
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1987
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
1988
+ query_params: {'api-version' => @client.api_version},
1989
+ headers: request_headers.merge(custom_headers || {}),
1990
+ base_url: request_url
1991
+ }
1992
+ promise = @client.make_request_async(:post, path_template, options)
1993
+
1994
+ promise = promise.then do |result|
1995
+ http_response = result.response
1996
+ status_code = http_response.status
1997
+ response_content = http_response.body
1998
+ unless status_code == 200
1999
+ error_model = JSON.load(response_content)
2000
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
2001
+ end
2002
+
2003
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2004
+ # Deserialize Response
2005
+ if status_code == 200
2006
+ begin
2007
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2008
+ result_mapper = {
2009
+ client_side_validation: true,
2010
+ required: false,
2011
+ serialized_name: 'parsed_response',
2012
+ type: {
2013
+ name: 'Sequence',
2014
+ element: {
2015
+ client_side_validation: true,
2016
+ required: false,
2017
+ serialized_name: 'CertificateEmailElementType',
2018
+ type: {
2019
+ name: 'Composite',
2020
+ class_name: 'CertificateEmail'
2021
+ }
2022
+ }
2023
+ }
2024
+ }
2025
+ result.body = @client.deserialize(result_mapper, parsed_response)
2026
+ rescue Exception => e
2027
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2028
+ end
2029
+ end
2030
+
2031
+ result
2032
+ end
2033
+
2034
+ promise.execute
2035
+ end
2036
+
2037
+ #
2038
+ # Create or update a certificate purchase order.
2039
+ #
2040
+ # Create or update a certificate purchase order.
2041
+ #
2042
+ # @param resource_group_name [String] Name of the resource group to which the
2043
+ # resource belongs.
2044
+ # @param certificate_order_name [String] Name of the certificate order.
2045
+ # @param certificate_distinguished_name [AppServiceCertificateOrder]
2046
+ # Distinguished name to to use for the certificate order.
2047
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2048
+ # will be added to the HTTP request.
2049
+ #
2050
+ # @return [AppServiceCertificateOrder] operation results.
2051
+ #
2052
+ def begin_create_or_update(resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers:nil)
2053
+ response = begin_create_or_update_async(resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers:custom_headers).value!
2054
+ response.body unless response.nil?
2055
+ end
2056
+
2057
+ #
2058
+ # Create or update a certificate purchase order.
2059
+ #
2060
+ # Create or update a certificate purchase order.
2061
+ #
2062
+ # @param resource_group_name [String] Name of the resource group to which the
2063
+ # resource belongs.
2064
+ # @param certificate_order_name [String] Name of the certificate order.
2065
+ # @param certificate_distinguished_name [AppServiceCertificateOrder]
2066
+ # Distinguished name to to use for the certificate order.
2067
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2068
+ # will be added to the HTTP request.
2069
+ #
2070
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2071
+ #
2072
+ def begin_create_or_update_with_http_info(resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers:nil)
2073
+ begin_create_or_update_async(resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers:custom_headers).value!
2074
+ end
2075
+
2076
+ #
2077
+ # Create or update a certificate purchase order.
2078
+ #
2079
+ # Create or update a certificate purchase order.
2080
+ #
2081
+ # @param resource_group_name [String] Name of the resource group to which the
2082
+ # resource belongs.
2083
+ # @param certificate_order_name [String] Name of the certificate order.
2084
+ # @param certificate_distinguished_name [AppServiceCertificateOrder]
2085
+ # Distinguished name to to use for the certificate order.
2086
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2087
+ # to the HTTP request.
2088
+ #
2089
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2090
+ #
2091
+ def begin_create_or_update_async(resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers:nil)
2092
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2093
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
2094
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
2095
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
2096
+ fail ArgumentError, 'certificate_order_name is nil' if certificate_order_name.nil?
2097
+ fail ArgumentError, 'certificate_distinguished_name is nil' if certificate_distinguished_name.nil?
2098
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2099
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2100
+
2101
+
2102
+ request_headers = {}
2103
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2104
+
2105
+ # Set Headers
2106
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2107
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2108
+
2109
+ # Serialize Request
2110
+ request_mapper = Azure::Web::Mgmt::V2018_02_01::Models::AppServiceCertificateOrder.mapper()
2111
+ request_content = @client.serialize(request_mapper, certificate_distinguished_name)
2112
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2113
+
2114
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'
2115
+
2116
+ request_url = @base_url || @client.base_url
2117
+
2118
+ options = {
2119
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2120
+ path_params: {'resourceGroupName' => resource_group_name,'certificateOrderName' => certificate_order_name,'subscriptionId' => @client.subscription_id},
2121
+ query_params: {'api-version' => @client.api_version},
2122
+ body: request_content,
2123
+ headers: request_headers.merge(custom_headers || {}),
2124
+ base_url: request_url
2125
+ }
2126
+ promise = @client.make_request_async(:put, path_template, options)
2127
+
2128
+ promise = promise.then do |result|
2129
+ http_response = result.response
2130
+ status_code = http_response.status
2131
+ response_content = http_response.body
2132
+ unless status_code == 200 || status_code == 201
2133
+ error_model = JSON.load(response_content)
2134
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
2135
+ end
2136
+
2137
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2138
+ # Deserialize Response
2139
+ if status_code == 200
2140
+ begin
2141
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2142
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::AppServiceCertificateOrder.mapper()
2143
+ result.body = @client.deserialize(result_mapper, parsed_response)
2144
+ rescue Exception => e
2145
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2146
+ end
2147
+ end
2148
+ # Deserialize Response
2149
+ if status_code == 201
2150
+ begin
2151
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2152
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::AppServiceCertificateOrder.mapper()
2153
+ result.body = @client.deserialize(result_mapper, parsed_response)
2154
+ rescue Exception => e
2155
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2156
+ end
2157
+ end
2158
+
2159
+ result
2160
+ end
2161
+
2162
+ promise.execute
2163
+ end
2164
+
2165
+ #
2166
+ # Creates or updates a certificate and associates with key vault secret.
2167
+ #
2168
+ # Creates or updates a certificate and associates with key vault secret.
2169
+ #
2170
+ # @param resource_group_name [String] Name of the resource group to which the
2171
+ # resource belongs.
2172
+ # @param certificate_order_name [String] Name of the certificate order.
2173
+ # @param name [String] Name of the certificate.
2174
+ # @param key_vault_certificate [AppServiceCertificateResource] Key vault
2175
+ # certificate resource Id.
2176
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2177
+ # will be added to the HTTP request.
2178
+ #
2179
+ # @return [AppServiceCertificateResource] operation results.
2180
+ #
2181
+ def begin_create_or_update_certificate(resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers:nil)
2182
+ response = begin_create_or_update_certificate_async(resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers:custom_headers).value!
2183
+ response.body unless response.nil?
2184
+ end
2185
+
2186
+ #
2187
+ # Creates or updates a certificate and associates with key vault secret.
2188
+ #
2189
+ # Creates or updates a certificate and associates with key vault secret.
2190
+ #
2191
+ # @param resource_group_name [String] Name of the resource group to which the
2192
+ # resource belongs.
2193
+ # @param certificate_order_name [String] Name of the certificate order.
2194
+ # @param name [String] Name of the certificate.
2195
+ # @param key_vault_certificate [AppServiceCertificateResource] Key vault
2196
+ # certificate resource Id.
2197
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2198
+ # will be added to the HTTP request.
2199
+ #
2200
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2201
+ #
2202
+ def begin_create_or_update_certificate_with_http_info(resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers:nil)
2203
+ begin_create_or_update_certificate_async(resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers:custom_headers).value!
2204
+ end
2205
+
2206
+ #
2207
+ # Creates or updates a certificate and associates with key vault secret.
2208
+ #
2209
+ # Creates or updates a certificate and associates with key vault secret.
2210
+ #
2211
+ # @param resource_group_name [String] Name of the resource group to which the
2212
+ # resource belongs.
2213
+ # @param certificate_order_name [String] Name of the certificate order.
2214
+ # @param name [String] Name of the certificate.
2215
+ # @param key_vault_certificate [AppServiceCertificateResource] Key vault
2216
+ # certificate resource Id.
2217
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2218
+ # to the HTTP request.
2219
+ #
2220
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2221
+ #
2222
+ def begin_create_or_update_certificate_async(resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers:nil)
2223
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2224
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
2225
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
2226
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
2227
+ fail ArgumentError, 'certificate_order_name is nil' if certificate_order_name.nil?
2228
+ fail ArgumentError, 'name is nil' if name.nil?
2229
+ fail ArgumentError, 'key_vault_certificate is nil' if key_vault_certificate.nil?
2230
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2231
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2232
+
2233
+
2234
+ request_headers = {}
2235
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2236
+
2237
+ # Set Headers
2238
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2239
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2240
+
2241
+ # Serialize Request
2242
+ request_mapper = Azure::Web::Mgmt::V2018_02_01::Models::AppServiceCertificateResource.mapper()
2243
+ request_content = @client.serialize(request_mapper, key_vault_certificate)
2244
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2245
+
2246
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'
2247
+
2248
+ request_url = @base_url || @client.base_url
2249
+
2250
+ options = {
2251
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2252
+ path_params: {'resourceGroupName' => resource_group_name,'certificateOrderName' => certificate_order_name,'name' => name,'subscriptionId' => @client.subscription_id},
2253
+ query_params: {'api-version' => @client.api_version},
2254
+ body: request_content,
2255
+ headers: request_headers.merge(custom_headers || {}),
2256
+ base_url: request_url
2257
+ }
2258
+ promise = @client.make_request_async(:put, path_template, options)
2259
+
2260
+ promise = promise.then do |result|
2261
+ http_response = result.response
2262
+ status_code = http_response.status
2263
+ response_content = http_response.body
2264
+ unless status_code == 200 || status_code == 201
2265
+ error_model = JSON.load(response_content)
2266
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
2267
+ end
2268
+
2269
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2270
+ # Deserialize Response
2271
+ if status_code == 200
2272
+ begin
2273
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2274
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::AppServiceCertificateResource.mapper()
2275
+ result.body = @client.deserialize(result_mapper, parsed_response)
2276
+ rescue Exception => e
2277
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2278
+ end
2279
+ end
2280
+ # Deserialize Response
2281
+ if status_code == 201
2282
+ begin
2283
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2284
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::AppServiceCertificateResource.mapper()
2285
+ result.body = @client.deserialize(result_mapper, parsed_response)
2286
+ rescue Exception => e
2287
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2288
+ end
2289
+ end
2290
+
2291
+ result
2292
+ end
2293
+
2294
+ promise.execute
2295
+ end
2296
+
2297
+ #
2298
+ # List all certificate orders in a subscription.
2299
+ #
2300
+ # List all certificate orders in a subscription.
2301
+ #
2302
+ # @param next_page_link [String] The NextLink from the previous successful call
2303
+ # to List operation.
2304
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2305
+ # will be added to the HTTP request.
2306
+ #
2307
+ # @return [AppServiceCertificateOrderCollection] operation results.
2308
+ #
2309
+ def list_next(next_page_link, custom_headers:nil)
2310
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
2311
+ response.body unless response.nil?
2312
+ end
2313
+
2314
+ #
2315
+ # List all certificate orders in a subscription.
2316
+ #
2317
+ # List all certificate orders in a subscription.
2318
+ #
2319
+ # @param next_page_link [String] The NextLink from the previous successful call
2320
+ # to List operation.
2321
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2322
+ # will be added to the HTTP request.
2323
+ #
2324
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2325
+ #
2326
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
2327
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
2328
+ end
2329
+
2330
+ #
2331
+ # List all certificate orders in a subscription.
2332
+ #
2333
+ # List all certificate orders in a subscription.
2334
+ #
2335
+ # @param next_page_link [String] The NextLink from the previous successful call
2336
+ # to List operation.
2337
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2338
+ # to the HTTP request.
2339
+ #
2340
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2341
+ #
2342
+ def list_next_async(next_page_link, custom_headers:nil)
2343
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2344
+
2345
+
2346
+ request_headers = {}
2347
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2348
+
2349
+ # Set Headers
2350
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2351
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2352
+ path_template = '{nextLink}'
2353
+
2354
+ request_url = @base_url || @client.base_url
2355
+
2356
+ options = {
2357
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2358
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2359
+ headers: request_headers.merge(custom_headers || {}),
2360
+ base_url: request_url
2361
+ }
2362
+ promise = @client.make_request_async(:get, path_template, options)
2363
+
2364
+ promise = promise.then do |result|
2365
+ http_response = result.response
2366
+ status_code = http_response.status
2367
+ response_content = http_response.body
2368
+ unless status_code == 200
2369
+ error_model = JSON.load(response_content)
2370
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
2371
+ end
2372
+
2373
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2374
+ # Deserialize Response
2375
+ if status_code == 200
2376
+ begin
2377
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2378
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::AppServiceCertificateOrderCollection.mapper()
2379
+ result.body = @client.deserialize(result_mapper, parsed_response)
2380
+ rescue Exception => e
2381
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2382
+ end
2383
+ end
2384
+
2385
+ result
2386
+ end
2387
+
2388
+ promise.execute
2389
+ end
2390
+
2391
+ #
2392
+ # Get certificate orders in a resource group.
2393
+ #
2394
+ # Get certificate orders in a resource group.
2395
+ #
2396
+ # @param next_page_link [String] The NextLink from the previous successful call
2397
+ # to List operation.
2398
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2399
+ # will be added to the HTTP request.
2400
+ #
2401
+ # @return [AppServiceCertificateOrderCollection] operation results.
2402
+ #
2403
+ def list_by_resource_group_next(next_page_link, custom_headers:nil)
2404
+ response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
2405
+ response.body unless response.nil?
2406
+ end
2407
+
2408
+ #
2409
+ # Get certificate orders in a resource group.
2410
+ #
2411
+ # Get certificate orders in a resource group.
2412
+ #
2413
+ # @param next_page_link [String] The NextLink from the previous successful call
2414
+ # to List operation.
2415
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2416
+ # will be added to the HTTP request.
2417
+ #
2418
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2419
+ #
2420
+ def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
2421
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
2422
+ end
2423
+
2424
+ #
2425
+ # Get certificate orders in a resource group.
2426
+ #
2427
+ # Get certificate orders in a resource group.
2428
+ #
2429
+ # @param next_page_link [String] The NextLink from the previous successful call
2430
+ # to List operation.
2431
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2432
+ # to the HTTP request.
2433
+ #
2434
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2435
+ #
2436
+ def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
2437
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2438
+
2439
+
2440
+ request_headers = {}
2441
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2442
+
2443
+ # Set Headers
2444
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2445
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2446
+ path_template = '{nextLink}'
2447
+
2448
+ request_url = @base_url || @client.base_url
2449
+
2450
+ options = {
2451
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2452
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2453
+ headers: request_headers.merge(custom_headers || {}),
2454
+ base_url: request_url
2455
+ }
2456
+ promise = @client.make_request_async(:get, path_template, options)
2457
+
2458
+ promise = promise.then do |result|
2459
+ http_response = result.response
2460
+ status_code = http_response.status
2461
+ response_content = http_response.body
2462
+ unless status_code == 200
2463
+ error_model = JSON.load(response_content)
2464
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
2465
+ end
2466
+
2467
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2468
+ # Deserialize Response
2469
+ if status_code == 200
2470
+ begin
2471
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2472
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::AppServiceCertificateOrderCollection.mapper()
2473
+ result.body = @client.deserialize(result_mapper, parsed_response)
2474
+ rescue Exception => e
2475
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2476
+ end
2477
+ end
2478
+
2479
+ result
2480
+ end
2481
+
2482
+ promise.execute
2483
+ end
2484
+
2485
+ #
2486
+ # List all certificates associated with a certificate order.
2487
+ #
2488
+ # List all certificates associated with a certificate order.
2489
+ #
2490
+ # @param next_page_link [String] The NextLink from the previous successful call
2491
+ # to List operation.
2492
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2493
+ # will be added to the HTTP request.
2494
+ #
2495
+ # @return [AppServiceCertificateCollection] operation results.
2496
+ #
2497
+ def list_certificates_next(next_page_link, custom_headers:nil)
2498
+ response = list_certificates_next_async(next_page_link, custom_headers:custom_headers).value!
2499
+ response.body unless response.nil?
2500
+ end
2501
+
2502
+ #
2503
+ # List all certificates associated with a certificate order.
2504
+ #
2505
+ # List all certificates associated with a certificate order.
2506
+ #
2507
+ # @param next_page_link [String] The NextLink from the previous successful call
2508
+ # to List operation.
2509
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2510
+ # will be added to the HTTP request.
2511
+ #
2512
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2513
+ #
2514
+ def list_certificates_next_with_http_info(next_page_link, custom_headers:nil)
2515
+ list_certificates_next_async(next_page_link, custom_headers:custom_headers).value!
2516
+ end
2517
+
2518
+ #
2519
+ # List all certificates associated with a certificate order.
2520
+ #
2521
+ # List all certificates associated with a certificate order.
2522
+ #
2523
+ # @param next_page_link [String] The NextLink from the previous successful call
2524
+ # to List operation.
2525
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2526
+ # to the HTTP request.
2527
+ #
2528
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2529
+ #
2530
+ def list_certificates_next_async(next_page_link, custom_headers:nil)
2531
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2532
+
2533
+
2534
+ request_headers = {}
2535
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2536
+
2537
+ # Set Headers
2538
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2539
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2540
+ path_template = '{nextLink}'
2541
+
2542
+ request_url = @base_url || @client.base_url
2543
+
2544
+ options = {
2545
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2546
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2547
+ headers: request_headers.merge(custom_headers || {}),
2548
+ base_url: request_url
2549
+ }
2550
+ promise = @client.make_request_async(:get, path_template, options)
2551
+
2552
+ promise = promise.then do |result|
2553
+ http_response = result.response
2554
+ status_code = http_response.status
2555
+ response_content = http_response.body
2556
+ unless status_code == 200
2557
+ error_model = JSON.load(response_content)
2558
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
2559
+ end
2560
+
2561
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2562
+ # Deserialize Response
2563
+ if status_code == 200
2564
+ begin
2565
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2566
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::AppServiceCertificateCollection.mapper()
2567
+ result.body = @client.deserialize(result_mapper, parsed_response)
2568
+ rescue Exception => e
2569
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2570
+ end
2571
+ end
2572
+
2573
+ result
2574
+ end
2575
+
2576
+ promise.execute
2577
+ end
2578
+
2579
+ #
2580
+ # List all certificate orders in a subscription.
2581
+ #
2582
+ # List all certificate orders in a subscription.
2583
+ #
2584
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2585
+ # will be added to the HTTP request.
2586
+ #
2587
+ # @return [AppServiceCertificateOrderCollection] which provide lazy access to
2588
+ # pages of the response.
2589
+ #
2590
+ def list_as_lazy(custom_headers:nil)
2591
+ response = list_async(custom_headers:custom_headers).value!
2592
+ unless response.nil?
2593
+ page = response.body
2594
+ page.next_method = Proc.new do |next_page_link|
2595
+ list_next_async(next_page_link, custom_headers:custom_headers)
2596
+ end
2597
+ page
2598
+ end
2599
+ end
2600
+
2601
+ #
2602
+ # Get certificate orders in a resource group.
2603
+ #
2604
+ # Get certificate orders in a resource group.
2605
+ #
2606
+ # @param resource_group_name [String] Name of the resource group to which the
2607
+ # resource belongs.
2608
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2609
+ # will be added to the HTTP request.
2610
+ #
2611
+ # @return [AppServiceCertificateOrderCollection] which provide lazy access to
2612
+ # pages of the response.
2613
+ #
2614
+ def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil)
2615
+ response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
2616
+ unless response.nil?
2617
+ page = response.body
2618
+ page.next_method = Proc.new do |next_page_link|
2619
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
2620
+ end
2621
+ page
2622
+ end
2623
+ end
2624
+
2625
+ #
2626
+ # List all certificates associated with a certificate order.
2627
+ #
2628
+ # List all certificates associated with a certificate order.
2629
+ #
2630
+ # @param resource_group_name [String] Name of the resource group to which the
2631
+ # resource belongs.
2632
+ # @param certificate_order_name [String] Name of the certificate order.
2633
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2634
+ # will be added to the HTTP request.
2635
+ #
2636
+ # @return [AppServiceCertificateCollection] which provide lazy access to pages
2637
+ # of the response.
2638
+ #
2639
+ def list_certificates_as_lazy(resource_group_name, certificate_order_name, custom_headers:nil)
2640
+ response = list_certificates_async(resource_group_name, certificate_order_name, custom_headers:custom_headers).value!
2641
+ unless response.nil?
2642
+ page = response.body
2643
+ page.next_method = Proc.new do |next_page_link|
2644
+ list_certificates_next_async(next_page_link, custom_headers:custom_headers)
2645
+ end
2646
+ page
2647
+ end
2648
+ end
2649
+
2650
+ end
2651
+ end