azure_mgmt_event_grid 0.17.10 → 0.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (592) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +20 -20
  3. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid.rb +56 -56
  4. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  5. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb +1841 -1841
  6. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/models/endpoint_type.rb +15 -15
  7. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/models/event_subscription.rb +134 -134
  8. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_destination.rb +72 -72
  9. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_filter.rb +98 -98
  10. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_full_url.rb +47 -47
  11. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_provisioning_state.rb +20 -20
  12. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_update_parameters.rb +81 -81
  13. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/models/event_subscriptions_list_result.rb +55 -55
  14. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/models/event_type.rb +95 -95
  15. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/models/event_types_list_result.rb +55 -55
  16. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/models/operation.rb +81 -81
  17. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/models/operation_info.rb +79 -79
  18. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/models/operation_origin.rb +17 -17
  19. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/models/operations_list_result.rb +55 -55
  20. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/models/resource.rb +80 -80
  21. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/models/resource_region_type.rb +16 -16
  22. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/models/topic.rb +112 -112
  23. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/models/topic_provisioning_state.rb +20 -20
  24. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/models/topic_regenerate_key_request.rb +46 -46
  25. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/models/topic_shared_access_keys.rb +57 -57
  26. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/models/topic_type_info.rb +120 -120
  27. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/models/topic_type_provisioning_state.rb +20 -20
  28. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/models/topic_types_list_result.rb +55 -55
  29. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/models/topics_list_result.rb +55 -55
  30. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/models/tracked_resource.rb +92 -92
  31. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/module_definition.rb +9 -9
  32. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/operations.rb +118 -118
  33. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/topic_types.rb +305 -305
  34. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/topics.rb +946 -946
  35. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid.rb +58 -58
  36. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  37. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb +1841 -1841
  38. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/event_hub_event_subscription_destination.rb +62 -62
  39. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/event_subscription.rb +136 -136
  40. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_destination.rb +47 -47
  41. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_filter.rb +98 -98
  42. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_full_url.rb +47 -47
  43. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_provisioning_state.rb +20 -20
  44. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_update_parameters.rb +83 -83
  45. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/event_subscriptions_list_result.rb +55 -55
  46. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/event_type.rb +95 -95
  47. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/event_types_list_result.rb +55 -55
  48. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/operation.rb +81 -81
  49. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/operation_info.rb +79 -79
  50. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/operation_origin.rb +17 -17
  51. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/operations_list_result.rb +55 -55
  52. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/resource.rb +80 -80
  53. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/resource_region_type.rb +16 -16
  54. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/topic.rb +112 -112
  55. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/topic_provisioning_state.rb +20 -20
  56. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/topic_regenerate_key_request.rb +46 -46
  57. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/topic_shared_access_keys.rb +57 -57
  58. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/topic_type_info.rb +139 -139
  59. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/topic_type_provisioning_state.rb +20 -20
  60. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/topic_types_list_result.rb +55 -55
  61. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/topic_update_parameters.rb +54 -54
  62. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/topics_list_result.rb +55 -55
  63. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/tracked_resource.rb +92 -92
  64. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/models/web_hook_event_subscription_destination.rb +75 -75
  65. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/module_definition.rb +9 -9
  66. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/operations.rb +118 -118
  67. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/topic_types.rb +305 -305
  68. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/topics.rb +1113 -1113
  69. data/lib/2018-01-01/generated/azure_mgmt_event_grid.rb +57 -57
  70. data/lib/2018-01-01/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  71. data/lib/2018-01-01/generated/azure_mgmt_event_grid/event_subscriptions.rb +1837 -1837
  72. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/event_hub_event_subscription_destination.rb +62 -62
  73. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/event_subscription.rb +136 -136
  74. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/event_subscription_destination.rb +47 -47
  75. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/event_subscription_filter.rb +98 -98
  76. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/event_subscription_full_url.rb +47 -47
  77. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/event_subscription_provisioning_state.rb +20 -20
  78. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/event_subscription_update_parameters.rb +83 -83
  79. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/event_subscriptions_list_result.rb +55 -55
  80. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/event_type.rb +95 -95
  81. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/event_types_list_result.rb +55 -55
  82. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/operation.rb +80 -80
  83. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/operation_info.rb +79 -79
  84. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/operations_list_result.rb +55 -55
  85. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/resource.rb +80 -80
  86. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/resource_region_type.rb +16 -16
  87. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/topic.rb +112 -112
  88. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/topic_provisioning_state.rb +20 -20
  89. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/topic_regenerate_key_request.rb +46 -46
  90. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/topic_shared_access_keys.rb +57 -57
  91. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/topic_type_info.rb +139 -139
  92. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/topic_type_provisioning_state.rb +20 -20
  93. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/topic_types_list_result.rb +55 -55
  94. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/topic_update_parameters.rb +54 -54
  95. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/topics_list_result.rb +55 -55
  96. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/tracked_resource.rb +92 -92
  97. data/lib/2018-01-01/generated/azure_mgmt_event_grid/models/web_hook_event_subscription_destination.rb +75 -75
  98. data/lib/2018-01-01/generated/azure_mgmt_event_grid/module_definition.rb +9 -9
  99. data/lib/2018-01-01/generated/azure_mgmt_event_grid/operations.rb +118 -118
  100. data/lib/2018-01-01/generated/azure_mgmt_event_grid/topic_types.rb +305 -305
  101. data/lib/2018-01-01/generated/azure_mgmt_event_grid/topics.rb +1113 -1113
  102. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid.rb +68 -68
  103. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  104. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb +1837 -1837
  105. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/models/dead_letter_destination.rb +50 -50
  106. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/models/event_delivery_schema.rb +17 -17
  107. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/models/event_hub_event_subscription_destination.rb +62 -62
  108. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/models/event_subscription.rb +180 -180
  109. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/models/event_subscription_destination.rb +49 -49
  110. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/models/event_subscription_filter.rb +98 -98
  111. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/models/event_subscription_full_url.rb +47 -47
  112. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/models/event_subscription_provisioning_state.rb +21 -21
  113. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/models/event_subscription_update_parameters.rb +125 -125
  114. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/models/event_subscriptions_list_result.rb +55 -55
  115. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/models/event_type.rb +95 -95
  116. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/models/event_types_list_result.rb +55 -55
  117. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/models/hybrid_connection_event_subscription_destination.rb +64 -64
  118. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/models/input_schema.rb +17 -17
  119. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/models/input_schema_mapping.rb +49 -49
  120. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/models/json_field.rb +50 -50
  121. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/models/json_field_with_default.rb +65 -65
  122. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/models/json_input_schema_mapping.rb +130 -130
  123. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/models/operation.rb +80 -80
  124. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/models/operation_info.rb +79 -79
  125. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/models/operations_list_result.rb +55 -55
  126. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/models/resource.rb +80 -80
  127. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/models/resource_region_type.rb +16 -16
  128. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/models/retry_policy.rb +57 -57
  129. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/models/storage_blob_dead_letter_destination.rb +74 -74
  130. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/models/storage_queue_event_subscription_destination.rb +75 -75
  131. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/models/topic.rb +144 -144
  132. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/models/topic_provisioning_state.rb +20 -20
  133. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/models/topic_regenerate_key_request.rb +46 -46
  134. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/models/topic_shared_access_keys.rb +57 -57
  135. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/models/topic_type_info.rb +139 -139
  136. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/models/topic_type_provisioning_state.rb +20 -20
  137. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/models/topic_types_list_result.rb +55 -55
  138. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/models/topic_update_parameters.rb +54 -54
  139. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/models/topics_list_result.rb +55 -55
  140. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/models/tracked_resource.rb +92 -92
  141. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/models/web_hook_event_subscription_destination.rb +75 -75
  142. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/module_definition.rb +9 -9
  143. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/operations.rb +118 -118
  144. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/topic_types.rb +305 -305
  145. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/topics.rb +1113 -1113
  146. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid.rb +91 -91
  147. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/domain_topics.rb +235 -235
  148. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/domains.rb +1002 -1002
  149. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  150. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb +1947 -1947
  151. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/advanced_filter.rb +70 -70
  152. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/bool_equals_advanced_filter.rb +69 -69
  153. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/dead_letter_destination.rb +50 -50
  154. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/domain.rb +140 -140
  155. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/domain_provisioning_state.rb +20 -20
  156. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/domain_regenerate_key_request.rb +46 -46
  157. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/domain_shared_access_keys.rb +57 -57
  158. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/domain_topic.rb +62 -62
  159. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/domain_topics_list_result.rb +55 -55
  160. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/domain_update_parameters.rb +54 -54
  161. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/domains_list_result.rb +55 -55
  162. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/event_delivery_schema.rb +17 -17
  163. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/event_hub_event_subscription_destination.rb +62 -62
  164. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/event_subscription.rb +189 -189
  165. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_destination.rb +49 -49
  166. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_filter.rb +120 -120
  167. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_full_url.rb +47 -47
  168. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_provisioning_state.rb +21 -21
  169. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_update_parameters.rb +137 -137
  170. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/event_subscriptions_list_result.rb +55 -55
  171. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/event_type.rb +95 -95
  172. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/event_types_list_result.rb +55 -55
  173. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/hybrid_connection_event_subscription_destination.rb +64 -64
  174. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/input_schema.rb +17 -17
  175. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/input_schema_mapping.rb +49 -49
  176. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/json_field.rb +50 -50
  177. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/json_field_with_default.rb +65 -65
  178. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/json_input_schema_mapping.rb +130 -130
  179. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/number_greater_than_advanced_filter.rb +69 -69
  180. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/number_greater_than_or_equals_advanced_filter.rb +69 -69
  181. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/number_in_advanced_filter.rb +77 -77
  182. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/number_less_than_advanced_filter.rb +69 -69
  183. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/number_less_than_or_equals_advanced_filter.rb +69 -69
  184. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/number_not_in_advanced_filter.rb +77 -77
  185. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/operation.rb +80 -80
  186. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/operation_info.rb +79 -79
  187. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/operations_list_result.rb +55 -55
  188. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/resource.rb +80 -80
  189. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/resource_region_type.rb +16 -16
  190. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/retry_policy.rb +57 -57
  191. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/storage_blob_dead_letter_destination.rb +74 -74
  192. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/storage_queue_event_subscription_destination.rb +75 -75
  193. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/string_begins_with_advanced_filter.rb +77 -77
  194. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/string_contains_advanced_filter.rb +77 -77
  195. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/string_ends_with_advanced_filter.rb +77 -77
  196. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/string_in_advanced_filter.rb +77 -77
  197. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/string_not_in_advanced_filter.rb +77 -77
  198. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/topic.rb +144 -144
  199. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/topic_provisioning_state.rb +20 -20
  200. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/topic_regenerate_key_request.rb +46 -46
  201. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/topic_shared_access_keys.rb +57 -57
  202. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/topic_type_info.rb +139 -139
  203. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/topic_type_provisioning_state.rb +20 -20
  204. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/topic_types_list_result.rb +55 -55
  205. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/topic_update_parameters.rb +54 -54
  206. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/topics_list_result.rb +55 -55
  207. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/tracked_resource.rb +92 -92
  208. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/web_hook_event_subscription_destination.rb +75 -75
  209. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/module_definition.rb +9 -9
  210. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/operations.rb +118 -118
  211. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/topic_types.rb +305 -305
  212. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/topics.rb +1113 -1113
  213. data/lib/2019-01-01/generated/azure_mgmt_event_grid.rb +62 -62
  214. data/lib/2019-01-01/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  215. data/lib/2019-01-01/generated/azure_mgmt_event_grid/event_subscriptions.rb +1837 -1837
  216. data/lib/2019-01-01/generated/azure_mgmt_event_grid/models/dead_letter_destination.rb +50 -50
  217. data/lib/2019-01-01/generated/azure_mgmt_event_grid/models/event_hub_event_subscription_destination.rb +62 -62
  218. data/lib/2019-01-01/generated/azure_mgmt_event_grid/models/event_subscription.rb +165 -165
  219. data/lib/2019-01-01/generated/azure_mgmt_event_grid/models/event_subscription_destination.rb +49 -49
  220. data/lib/2019-01-01/generated/azure_mgmt_event_grid/models/event_subscription_filter.rb +98 -98
  221. data/lib/2019-01-01/generated/azure_mgmt_event_grid/models/event_subscription_full_url.rb +47 -47
  222. data/lib/2019-01-01/generated/azure_mgmt_event_grid/models/event_subscription_provisioning_state.rb +21 -21
  223. data/lib/2019-01-01/generated/azure_mgmt_event_grid/models/event_subscription_update_parameters.rb +112 -112
  224. data/lib/2019-01-01/generated/azure_mgmt_event_grid/models/event_subscriptions_list_result.rb +55 -55
  225. data/lib/2019-01-01/generated/azure_mgmt_event_grid/models/event_type.rb +95 -95
  226. data/lib/2019-01-01/generated/azure_mgmt_event_grid/models/event_types_list_result.rb +55 -55
  227. data/lib/2019-01-01/generated/azure_mgmt_event_grid/models/hybrid_connection_event_subscription_destination.rb +64 -64
  228. data/lib/2019-01-01/generated/azure_mgmt_event_grid/models/operation.rb +80 -80
  229. data/lib/2019-01-01/generated/azure_mgmt_event_grid/models/operation_info.rb +79 -79
  230. data/lib/2019-01-01/generated/azure_mgmt_event_grid/models/operations_list_result.rb +55 -55
  231. data/lib/2019-01-01/generated/azure_mgmt_event_grid/models/resource.rb +80 -80
  232. data/lib/2019-01-01/generated/azure_mgmt_event_grid/models/resource_region_type.rb +16 -16
  233. data/lib/2019-01-01/generated/azure_mgmt_event_grid/models/retry_policy.rb +57 -57
  234. data/lib/2019-01-01/generated/azure_mgmt_event_grid/models/storage_blob_dead_letter_destination.rb +75 -75
  235. data/lib/2019-01-01/generated/azure_mgmt_event_grid/models/storage_queue_event_subscription_destination.rb +75 -75
  236. data/lib/2019-01-01/generated/azure_mgmt_event_grid/models/topic.rb +112 -112
  237. data/lib/2019-01-01/generated/azure_mgmt_event_grid/models/topic_provisioning_state.rb +20 -20
  238. data/lib/2019-01-01/generated/azure_mgmt_event_grid/models/topic_regenerate_key_request.rb +46 -46
  239. data/lib/2019-01-01/generated/azure_mgmt_event_grid/models/topic_shared_access_keys.rb +57 -57
  240. data/lib/2019-01-01/generated/azure_mgmt_event_grid/models/topic_type_info.rb +139 -139
  241. data/lib/2019-01-01/generated/azure_mgmt_event_grid/models/topic_type_provisioning_state.rb +20 -20
  242. data/lib/2019-01-01/generated/azure_mgmt_event_grid/models/topic_types_list_result.rb +55 -55
  243. data/lib/2019-01-01/generated/azure_mgmt_event_grid/models/topic_update_parameters.rb +54 -54
  244. data/lib/2019-01-01/generated/azure_mgmt_event_grid/models/topics_list_result.rb +55 -55
  245. data/lib/2019-01-01/generated/azure_mgmt_event_grid/models/tracked_resource.rb +92 -92
  246. data/lib/2019-01-01/generated/azure_mgmt_event_grid/models/web_hook_event_subscription_destination.rb +75 -75
  247. data/lib/2019-01-01/generated/azure_mgmt_event_grid/module_definition.rb +9 -9
  248. data/lib/2019-01-01/generated/azure_mgmt_event_grid/operations.rb +118 -118
  249. data/lib/2019-01-01/generated/azure_mgmt_event_grid/topic_types.rb +305 -305
  250. data/lib/2019-01-01/generated/azure_mgmt_event_grid/topics.rb +1113 -1113
  251. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid.rb +93 -93
  252. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/domain_topics.rb +663 -663
  253. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/domains.rb +1256 -1256
  254. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  255. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb +3368 -3368
  256. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/advanced_filter.rb +74 -74
  257. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/bool_equals_advanced_filter.rb +69 -69
  258. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/dead_letter_destination.rb +50 -50
  259. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/domain.rb +142 -142
  260. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/domain_provisioning_state.rb +20 -20
  261. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/domain_regenerate_key_request.rb +46 -46
  262. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/domain_shared_access_keys.rb +57 -57
  263. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/domain_topic.rb +75 -75
  264. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/domain_topic_provisioning_state.rb +20 -20
  265. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/domain_topics_list_result.rb +98 -98
  266. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/domain_update_parameters.rb +54 -54
  267. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/domains_list_result.rb +98 -98
  268. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/event_delivery_schema.rb +17 -17
  269. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/event_hub_event_subscription_destination.rb +62 -62
  270. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/event_subscription.rb +189 -189
  271. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/event_subscription_destination.rb +50 -50
  272. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/event_subscription_filter.rb +120 -120
  273. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/event_subscription_full_url.rb +47 -47
  274. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/event_subscription_provisioning_state.rb +21 -21
  275. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/event_subscription_update_parameters.rb +137 -137
  276. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/event_subscriptions_list_result.rb +98 -98
  277. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/event_type.rb +106 -106
  278. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/event_types_list_result.rb +55 -55
  279. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/hybrid_connection_event_subscription_destination.rb +64 -64
  280. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/input_schema.rb +17 -17
  281. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/input_schema_mapping.rb +49 -49
  282. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/json_field.rb +50 -50
  283. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/json_field_with_default.rb +67 -67
  284. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/json_input_schema_mapping.rb +130 -130
  285. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/number_greater_than_advanced_filter.rb +69 -69
  286. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/number_greater_than_or_equals_advanced_filter.rb +69 -69
  287. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/number_in_advanced_filter.rb +77 -77
  288. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/number_less_than_advanced_filter.rb +69 -69
  289. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/number_less_than_or_equals_advanced_filter.rb +69 -69
  290. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/number_not_in_advanced_filter.rb +77 -77
  291. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/operation.rb +80 -80
  292. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/operation_info.rb +79 -79
  293. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/operations_list_result.rb +55 -55
  294. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/resource.rb +80 -80
  295. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/resource_region_type.rb +16 -16
  296. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/retry_policy.rb +57 -57
  297. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/service_bus_queue_event_subscription_destination.rb +63 -63
  298. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/storage_blob_dead_letter_destination.rb +74 -74
  299. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/storage_queue_event_subscription_destination.rb +75 -75
  300. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/string_begins_with_advanced_filter.rb +77 -77
  301. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/string_contains_advanced_filter.rb +77 -77
  302. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/string_ends_with_advanced_filter.rb +77 -77
  303. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/string_in_advanced_filter.rb +77 -77
  304. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/string_not_in_advanced_filter.rb +77 -77
  305. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/topic.rb +144 -144
  306. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/topic_provisioning_state.rb +20 -20
  307. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/topic_regenerate_key_request.rb +46 -46
  308. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/topic_shared_access_keys.rb +57 -57
  309. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/topic_type_info.rb +139 -139
  310. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/topic_type_provisioning_state.rb +20 -20
  311. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/topic_types_list_result.rb +55 -55
  312. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/topic_update_parameters.rb +54 -54
  313. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/topics_list_result.rb +98 -98
  314. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/tracked_resource.rb +92 -92
  315. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/models/web_hook_event_subscription_destination.rb +75 -75
  316. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/module_definition.rb +9 -9
  317. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/operations.rb +118 -118
  318. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/topic_types.rb +305 -305
  319. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/topics.rb +1367 -1367
  320. data/lib/2019-06-01/generated/azure_mgmt_event_grid.rb +87 -87
  321. data/lib/2019-06-01/generated/azure_mgmt_event_grid/domain_topics.rb +699 -699
  322. data/lib/2019-06-01/generated/azure_mgmt_event_grid/domains.rb +1328 -1328
  323. data/lib/2019-06-01/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  324. data/lib/2019-06-01/generated/azure_mgmt_event_grid/event_subscriptions.rb +3648 -3648
  325. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/advanced_filter.rb +74 -74
  326. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/bool_equals_advanced_filter.rb +69 -69
  327. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/dead_letter_destination.rb +50 -50
  328. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/domain.rb +112 -112
  329. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/domain_provisioning_state.rb +20 -20
  330. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/domain_regenerate_key_request.rb +46 -46
  331. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/domain_shared_access_keys.rb +57 -57
  332. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/domain_topic.rb +75 -75
  333. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/domain_topic_provisioning_state.rb +20 -20
  334. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/domain_topics_list_result.rb +98 -98
  335. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/domain_update_parameters.rb +54 -54
  336. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/domains_list_result.rb +98 -98
  337. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/event_hub_event_subscription_destination.rb +62 -62
  338. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/event_subscription.rb +176 -176
  339. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/event_subscription_destination.rb +50 -50
  340. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/event_subscription_filter.rb +120 -120
  341. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/event_subscription_full_url.rb +47 -47
  342. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/event_subscription_provisioning_state.rb +21 -21
  343. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/event_subscription_update_parameters.rb +124 -124
  344. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/event_subscriptions_list_result.rb +98 -98
  345. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/event_type.rb +106 -106
  346. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/event_types_list_result.rb +55 -55
  347. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/hybrid_connection_event_subscription_destination.rb +64 -64
  348. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/number_greater_than_advanced_filter.rb +69 -69
  349. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/number_greater_than_or_equals_advanced_filter.rb +69 -69
  350. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/number_in_advanced_filter.rb +77 -77
  351. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/number_less_than_advanced_filter.rb +69 -69
  352. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/number_less_than_or_equals_advanced_filter.rb +69 -69
  353. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/number_not_in_advanced_filter.rb +77 -77
  354. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/operation.rb +80 -80
  355. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/operation_info.rb +79 -79
  356. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/operations_list_result.rb +55 -55
  357. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/resource.rb +80 -80
  358. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/resource_region_type.rb +16 -16
  359. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/retry_policy.rb +57 -57
  360. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/service_bus_queue_event_subscription_destination.rb +63 -63
  361. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/storage_blob_dead_letter_destination.rb +74 -74
  362. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/storage_queue_event_subscription_destination.rb +75 -75
  363. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/string_begins_with_advanced_filter.rb +77 -77
  364. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/string_contains_advanced_filter.rb +77 -77
  365. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/string_ends_with_advanced_filter.rb +77 -77
  366. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/string_in_advanced_filter.rb +77 -77
  367. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/string_not_in_advanced_filter.rb +77 -77
  368. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/topic.rb +112 -112
  369. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/topic_provisioning_state.rb +20 -20
  370. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/topic_regenerate_key_request.rb +46 -46
  371. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/topic_shared_access_keys.rb +57 -57
  372. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/topic_type_info.rb +139 -139
  373. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/topic_type_provisioning_state.rb +20 -20
  374. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/topic_types_list_result.rb +55 -55
  375. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/topic_update_parameters.rb +54 -54
  376. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/topics_list_result.rb +98 -98
  377. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/tracked_resource.rb +92 -92
  378. data/lib/2019-06-01/generated/azure_mgmt_event_grid/models/web_hook_event_subscription_destination.rb +75 -75
  379. data/lib/2019-06-01/generated/azure_mgmt_event_grid/module_definition.rb +9 -9
  380. data/lib/2019-06-01/generated/azure_mgmt_event_grid/operations.rb +118 -118
  381. data/lib/2019-06-01/generated/azure_mgmt_event_grid/topic_types.rb +305 -305
  382. data/lib/2019-06-01/generated/azure_mgmt_event_grid/topics.rb +1439 -1439
  383. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid.rb +95 -95
  384. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/domain_topics.rb +699 -699
  385. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/domains.rb +1328 -1328
  386. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  387. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb +3648 -3648
  388. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/advanced_filter.rb +74 -74
  389. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/azure_function_event_subscription_destination.rb +86 -86
  390. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/bool_equals_advanced_filter.rb +69 -69
  391. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/dead_letter_destination.rb +50 -50
  392. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/domain.rb +154 -154
  393. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/domain_provisioning_state.rb +20 -20
  394. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/domain_regenerate_key_request.rb +46 -46
  395. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/domain_shared_access_keys.rb +57 -57
  396. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/domain_topic.rb +75 -75
  397. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/domain_topic_provisioning_state.rb +20 -20
  398. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/domain_topics_list_result.rb +98 -98
  399. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/domain_update_parameters.rb +54 -54
  400. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/domains_list_result.rb +98 -98
  401. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/event_delivery_schema.rb +17 -17
  402. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/event_hub_event_subscription_destination.rb +62 -62
  403. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/event_subscription.rb +189 -189
  404. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/event_subscription_destination.rb +52 -52
  405. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/event_subscription_filter.rb +120 -120
  406. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/event_subscription_full_url.rb +47 -47
  407. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/event_subscription_provisioning_state.rb +21 -21
  408. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/event_subscription_update_parameters.rb +137 -137
  409. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/event_subscriptions_list_result.rb +98 -98
  410. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/event_type.rb +106 -106
  411. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/event_types_list_result.rb +55 -55
  412. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/hybrid_connection_event_subscription_destination.rb +64 -64
  413. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/input_schema.rb +17 -17
  414. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/input_schema_mapping.rb +49 -49
  415. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/json_field.rb +50 -50
  416. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/json_field_with_default.rb +67 -67
  417. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/json_input_schema_mapping.rb +130 -130
  418. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/number_greater_than_advanced_filter.rb +69 -69
  419. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/number_greater_than_or_equals_advanced_filter.rb +69 -69
  420. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/number_in_advanced_filter.rb +77 -77
  421. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/number_less_than_advanced_filter.rb +69 -69
  422. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/number_less_than_or_equals_advanced_filter.rb +69 -69
  423. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/number_not_in_advanced_filter.rb +77 -77
  424. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/operation.rb +80 -80
  425. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/operation_info.rb +79 -79
  426. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/operations_list_result.rb +55 -55
  427. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/resource.rb +80 -80
  428. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/resource_region_type.rb +16 -16
  429. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/retry_policy.rb +57 -57
  430. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/service_bus_queue_event_subscription_destination.rb +63 -63
  431. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/service_bus_topic_event_subscription_destination.rb +64 -64
  432. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/storage_blob_dead_letter_destination.rb +74 -74
  433. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/storage_queue_event_subscription_destination.rb +75 -75
  434. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/string_begins_with_advanced_filter.rb +77 -77
  435. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/string_contains_advanced_filter.rb +77 -77
  436. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/string_ends_with_advanced_filter.rb +77 -77
  437. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/string_in_advanced_filter.rb +77 -77
  438. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/string_not_in_advanced_filter.rb +77 -77
  439. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/topic.rb +156 -156
  440. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/topic_provisioning_state.rb +20 -20
  441. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/topic_regenerate_key_request.rb +46 -46
  442. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/topic_shared_access_keys.rb +57 -57
  443. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/topic_type_info.rb +139 -139
  444. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/topic_type_provisioning_state.rb +20 -20
  445. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/topic_types_list_result.rb +55 -55
  446. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/topic_update_parameters.rb +54 -54
  447. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/topics_list_result.rb +98 -98
  448. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/tracked_resource.rb +92 -92
  449. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/models/web_hook_event_subscription_destination.rb +122 -122
  450. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/module_definition.rb +9 -9
  451. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/operations.rb +118 -118
  452. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/topic_types.rb +305 -305
  453. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/topics.rb +1439 -1439
  454. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid.rb +78 -19
  455. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/domain_topics.rb +0 -0
  456. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/domains.rb +1 -1
  457. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/event_channels.rb +614 -0
  458. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb +42 -1
  459. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb +0 -0
  460. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/extension_topics.rb +141 -0
  461. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/advanced_filter.rb +0 -0
  462. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/azure_function_event_subscription_destination.rb +0 -0
  463. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/bool_equals_advanced_filter.rb +0 -0
  464. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/connection_state.rb +69 -0
  465. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/dead_letter_destination.rb +0 -0
  466. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/dead_letter_with_resource_identity.rb +66 -0
  467. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/delivery_with_resource_identity.rb +67 -0
  468. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/domain.rb +57 -9
  469. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/domain_provisioning_state.rb +0 -0
  470. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/domain_regenerate_key_request.rb +0 -0
  471. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/domain_shared_access_keys.rb +0 -0
  472. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/domain_topic.rb +0 -0
  473. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/domain_topic_provisioning_state.rb +0 -0
  474. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/domain_topics_list_result.rb +0 -0
  475. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/domain_update_parameters.rb +39 -12
  476. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/domains_list_result.rb +0 -0
  477. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/event_channel.rb +102 -0
  478. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/event_channel_destination.rb +75 -0
  479. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/event_channel_provisioning_state.rb +20 -0
  480. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/event_channel_source.rb +48 -0
  481. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/event_channels_list_result.rb +98 -0
  482. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/event_delivery_schema.rb +0 -0
  483. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/event_hub_event_subscription_destination.rb +0 -0
  484. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/event_subscription.rb +41 -2
  485. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/event_subscription_destination.rb +1 -1
  486. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/event_subscription_filter.rb +0 -0
  487. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/event_subscription_full_url.rb +0 -0
  488. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/event_subscription_identity.rb +61 -0
  489. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/event_subscription_identity_type.rb +16 -0
  490. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/event_subscription_provisioning_state.rb +0 -0
  491. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/event_subscription_update_parameters.rb +41 -2
  492. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/event_subscriptions_list_result.rb +0 -0
  493. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/event_type.rb +0 -0
  494. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/event_types_list_result.rb +0 -0
  495. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/extension_topic.rb +86 -0
  496. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/hybrid_connection_event_subscription_destination.rb +0 -0
  497. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/identity_info.rb +96 -0
  498. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/identity_type.rb +18 -0
  499. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/inbound_ip_rule.rb +0 -0
  500. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/input_schema.rb +0 -0
  501. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/input_schema_mapping.rb +0 -0
  502. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/ip_action_type.rb +0 -0
  503. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/json_field.rb +0 -0
  504. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/json_field_with_default.rb +0 -0
  505. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/json_input_schema_mapping.rb +0 -0
  506. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/number_greater_than_advanced_filter.rb +0 -0
  507. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/number_greater_than_or_equals_advanced_filter.rb +0 -0
  508. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/number_in_advanced_filter.rb +0 -0
  509. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/number_less_than_advanced_filter.rb +0 -0
  510. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/number_less_than_or_equals_advanced_filter.rb +0 -0
  511. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/number_not_in_advanced_filter.rb +0 -0
  512. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/operation.rb +0 -0
  513. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/operation_info.rb +0 -0
  514. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/operations_list_result.rb +0 -0
  515. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/partner_namespace.rb +126 -0
  516. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/partner_namespace_provisioning_state.rb +20 -0
  517. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/partner_namespace_regenerate_key_request.rb +46 -0
  518. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/partner_namespace_shared_access_keys.rb +57 -0
  519. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/partner_namespace_update_parameters.rb +54 -0
  520. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/partner_namespaces_list_result.rb +98 -0
  521. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/partner_registration.rb +207 -0
  522. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/partner_registration_event_types_list_result.rb +68 -0
  523. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/partner_registration_provisioning_state.rb +20 -0
  524. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/partner_registration_update_parameters.rb +117 -0
  525. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/partner_registration_visibility_state.rb +17 -0
  526. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/partner_registrations_list_result.rb +99 -0
  527. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/partner_topic.rb +125 -0
  528. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/partner_topic_activation_state.rb +17 -0
  529. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/partner_topic_provisioning_state.rb +20 -0
  530. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/partner_topic_type.rb +134 -0
  531. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/partner_topic_type_authorization_state.rb +17 -0
  532. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/partner_topic_types_list_result.rb +55 -0
  533. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/partner_topic_update_parameters.rb +54 -0
  534. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/partner_topics_list_result.rb +98 -0
  535. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/persisted_connection_status.rb +18 -0
  536. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/private_endpoint.rb +46 -0
  537. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/private_endpoint_connection.rb +120 -0
  538. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/private_endpoint_connection_list_result.rb +100 -0
  539. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/private_link_resource.rb +128 -0
  540. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/private_link_resources_list_result.rb +99 -0
  541. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/public_network_access.rb +16 -0
  542. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/resource.rb +0 -0
  543. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/resource_provisioning_state.rb +20 -0
  544. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/resource_region_type.rb +0 -0
  545. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/resource_sku.rb +48 -0
  546. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/retry_policy.rb +0 -0
  547. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/service_bus_queue_event_subscription_destination.rb +0 -0
  548. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/service_bus_topic_event_subscription_destination.rb +0 -0
  549. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/sku.rb +16 -0
  550. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/sku_definitions_for_resource_type.rb +67 -0
  551. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/sku_definitions_for_resource_type_list_result.rb +67 -0
  552. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/storage_blob_dead_letter_destination.rb +0 -0
  553. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/storage_queue_event_subscription_destination.rb +0 -0
  554. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/string_begins_with_advanced_filter.rb +0 -0
  555. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/string_contains_advanced_filter.rb +0 -0
  556. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/string_ends_with_advanced_filter.rb +0 -0
  557. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/string_in_advanced_filter.rb +0 -0
  558. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/string_not_in_advanced_filter.rb +0 -0
  559. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/system_topic.rb +134 -0
  560. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/system_topic_update_parameters.rb +54 -0
  561. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/system_topics_list_result.rb +98 -0
  562. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/topic.rb +57 -9
  563. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/topic_provisioning_state.rb +0 -0
  564. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/topic_regenerate_key_request.rb +0 -0
  565. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/topic_shared_access_keys.rb +0 -0
  566. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/topic_type_info.rb +0 -0
  567. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/topic_type_provisioning_state.rb +0 -0
  568. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/topic_types_list_result.rb +0 -0
  569. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/topic_update_parameters.rb +37 -10
  570. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/topics_list_result.rb +0 -0
  571. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/tracked_resource.rb +0 -0
  572. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/user_identity_properties.rb +57 -0
  573. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/models/web_hook_event_subscription_destination.rb +0 -0
  574. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/module_definition.rb +0 -0
  575. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/operations.rb +0 -0
  576. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/partner_namespaces.rb +1333 -0
  577. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/partner_registrations.rb +1074 -0
  578. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/partner_topic_event_subscriptions.rb +878 -0
  579. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/partner_topics.rb +1102 -0
  580. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/private_endpoint_connections.rb +773 -0
  581. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/private_link_resources.rb +423 -0
  582. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/system_topic_event_subscriptions.rb +874 -0
  583. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/system_topics.rb +1128 -0
  584. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/topic_types.rb +0 -0
  585. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/topics.rb +1 -1
  586. data/lib/azure_mgmt_event_grid.rb +5 -5
  587. data/lib/module_definition.rb +7 -7
  588. data/lib/profiles/latest/eventgrid_latest_profile_client.rb +40 -40
  589. data/lib/profiles/latest/eventgrid_module_definition.rb +8 -8
  590. data/lib/profiles/latest/modules/eventgrid_profile_module.rb +282 -66
  591. data/lib/version.rb +1 -1
  592. metadata +62 -3
@@ -1,62 +1,62 @@
1
- # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator.
3
- # Changes may cause incorrect behavior and will be lost if the code is
4
- # regenerated.
5
-
6
- require 'uri'
7
- require 'cgi'
8
- require 'date'
9
- require 'json'
10
- require 'base64'
11
- require 'erb'
12
- require 'securerandom'
13
- require 'time'
14
- require 'timeliness'
15
- require 'faraday'
16
- require 'faraday-cookie_jar'
17
- require 'concurrent'
18
- require 'ms_rest'
19
- require '2019-01-01/generated/azure_mgmt_event_grid/module_definition'
20
- require 'ms_rest_azure'
21
-
22
- module Azure::EventGrid::Mgmt::V2019_01_01
23
- autoload :EventSubscriptions, '2019-01-01/generated/azure_mgmt_event_grid/event_subscriptions.rb'
24
- autoload :Operations, '2019-01-01/generated/azure_mgmt_event_grid/operations.rb'
25
- autoload :Topics, '2019-01-01/generated/azure_mgmt_event_grid/topics.rb'
26
- autoload :TopicTypes, '2019-01-01/generated/azure_mgmt_event_grid/topic_types.rb'
27
- autoload :EventGridManagementClient, '2019-01-01/generated/azure_mgmt_event_grid/event_grid_management_client.rb'
28
-
29
- module Models
30
- autoload :EventSubscriptionsListResult, '2019-01-01/generated/azure_mgmt_event_grid/models/event_subscriptions_list_result.rb'
31
- autoload :OperationInfo, '2019-01-01/generated/azure_mgmt_event_grid/models/operation_info.rb'
32
- autoload :EventSubscriptionFilter, '2019-01-01/generated/azure_mgmt_event_grid/models/event_subscription_filter.rb'
33
- autoload :Operation, '2019-01-01/generated/azure_mgmt_event_grid/models/operation.rb'
34
- autoload :DeadLetterDestination, '2019-01-01/generated/azure_mgmt_event_grid/models/dead_letter_destination.rb'
35
- autoload :OperationsListResult, '2019-01-01/generated/azure_mgmt_event_grid/models/operations_list_result.rb'
36
- autoload :EventSubscriptionUpdateParameters, '2019-01-01/generated/azure_mgmt_event_grid/models/event_subscription_update_parameters.rb'
37
- autoload :EventSubscriptionFullUrl, '2019-01-01/generated/azure_mgmt_event_grid/models/event_subscription_full_url.rb'
38
- autoload :TopicTypesListResult, '2019-01-01/generated/azure_mgmt_event_grid/models/topic_types_list_result.rb'
39
- autoload :EventSubscriptionDestination, '2019-01-01/generated/azure_mgmt_event_grid/models/event_subscription_destination.rb'
40
- autoload :TopicRegenerateKeyRequest, '2019-01-01/generated/azure_mgmt_event_grid/models/topic_regenerate_key_request.rb'
41
- autoload :RetryPolicy, '2019-01-01/generated/azure_mgmt_event_grid/models/retry_policy.rb'
42
- autoload :Resource, '2019-01-01/generated/azure_mgmt_event_grid/models/resource.rb'
43
- autoload :TopicSharedAccessKeys, '2019-01-01/generated/azure_mgmt_event_grid/models/topic_shared_access_keys.rb'
44
- autoload :TopicsListResult, '2019-01-01/generated/azure_mgmt_event_grid/models/topics_list_result.rb'
45
- autoload :EventTypesListResult, '2019-01-01/generated/azure_mgmt_event_grid/models/event_types_list_result.rb'
46
- autoload :TopicUpdateParameters, '2019-01-01/generated/azure_mgmt_event_grid/models/topic_update_parameters.rb'
47
- autoload :StorageBlobDeadLetterDestination, '2019-01-01/generated/azure_mgmt_event_grid/models/storage_blob_dead_letter_destination.rb'
48
- autoload :WebHookEventSubscriptionDestination, '2019-01-01/generated/azure_mgmt_event_grid/models/web_hook_event_subscription_destination.rb'
49
- autoload :EventHubEventSubscriptionDestination, '2019-01-01/generated/azure_mgmt_event_grid/models/event_hub_event_subscription_destination.rb'
50
- autoload :StorageQueueEventSubscriptionDestination, '2019-01-01/generated/azure_mgmt_event_grid/models/storage_queue_event_subscription_destination.rb'
51
- autoload :HybridConnectionEventSubscriptionDestination, '2019-01-01/generated/azure_mgmt_event_grid/models/hybrid_connection_event_subscription_destination.rb'
52
- autoload :EventSubscription, '2019-01-01/generated/azure_mgmt_event_grid/models/event_subscription.rb'
53
- autoload :TrackedResource, '2019-01-01/generated/azure_mgmt_event_grid/models/tracked_resource.rb'
54
- autoload :Topic, '2019-01-01/generated/azure_mgmt_event_grid/models/topic.rb'
55
- autoload :EventType, '2019-01-01/generated/azure_mgmt_event_grid/models/event_type.rb'
56
- autoload :TopicTypeInfo, '2019-01-01/generated/azure_mgmt_event_grid/models/topic_type_info.rb'
57
- autoload :EventSubscriptionProvisioningState, '2019-01-01/generated/azure_mgmt_event_grid/models/event_subscription_provisioning_state.rb'
58
- autoload :TopicProvisioningState, '2019-01-01/generated/azure_mgmt_event_grid/models/topic_provisioning_state.rb'
59
- autoload :ResourceRegionType, '2019-01-01/generated/azure_mgmt_event_grid/models/resource_region_type.rb'
60
- autoload :TopicTypeProvisioningState, '2019-01-01/generated/azure_mgmt_event_grid/models/topic_type_provisioning_state.rb'
61
- end
62
- end
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ require 'uri'
7
+ require 'cgi'
8
+ require 'date'
9
+ require 'json'
10
+ require 'base64'
11
+ require 'erb'
12
+ require 'securerandom'
13
+ require 'time'
14
+ require 'timeliness'
15
+ require 'faraday'
16
+ require 'faraday-cookie_jar'
17
+ require 'concurrent'
18
+ require 'ms_rest'
19
+ require '2019-01-01/generated/azure_mgmt_event_grid/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::EventGrid::Mgmt::V2019_01_01
23
+ autoload :EventSubscriptions, '2019-01-01/generated/azure_mgmt_event_grid/event_subscriptions.rb'
24
+ autoload :Operations, '2019-01-01/generated/azure_mgmt_event_grid/operations.rb'
25
+ autoload :Topics, '2019-01-01/generated/azure_mgmt_event_grid/topics.rb'
26
+ autoload :TopicTypes, '2019-01-01/generated/azure_mgmt_event_grid/topic_types.rb'
27
+ autoload :EventGridManagementClient, '2019-01-01/generated/azure_mgmt_event_grid/event_grid_management_client.rb'
28
+
29
+ module Models
30
+ autoload :EventSubscriptionsListResult, '2019-01-01/generated/azure_mgmt_event_grid/models/event_subscriptions_list_result.rb'
31
+ autoload :OperationInfo, '2019-01-01/generated/azure_mgmt_event_grid/models/operation_info.rb'
32
+ autoload :EventSubscriptionFilter, '2019-01-01/generated/azure_mgmt_event_grid/models/event_subscription_filter.rb'
33
+ autoload :Operation, '2019-01-01/generated/azure_mgmt_event_grid/models/operation.rb'
34
+ autoload :DeadLetterDestination, '2019-01-01/generated/azure_mgmt_event_grid/models/dead_letter_destination.rb'
35
+ autoload :OperationsListResult, '2019-01-01/generated/azure_mgmt_event_grid/models/operations_list_result.rb'
36
+ autoload :EventSubscriptionUpdateParameters, '2019-01-01/generated/azure_mgmt_event_grid/models/event_subscription_update_parameters.rb'
37
+ autoload :EventSubscriptionFullUrl, '2019-01-01/generated/azure_mgmt_event_grid/models/event_subscription_full_url.rb'
38
+ autoload :TopicTypesListResult, '2019-01-01/generated/azure_mgmt_event_grid/models/topic_types_list_result.rb'
39
+ autoload :EventSubscriptionDestination, '2019-01-01/generated/azure_mgmt_event_grid/models/event_subscription_destination.rb'
40
+ autoload :TopicRegenerateKeyRequest, '2019-01-01/generated/azure_mgmt_event_grid/models/topic_regenerate_key_request.rb'
41
+ autoload :RetryPolicy, '2019-01-01/generated/azure_mgmt_event_grid/models/retry_policy.rb'
42
+ autoload :Resource, '2019-01-01/generated/azure_mgmt_event_grid/models/resource.rb'
43
+ autoload :TopicSharedAccessKeys, '2019-01-01/generated/azure_mgmt_event_grid/models/topic_shared_access_keys.rb'
44
+ autoload :TopicsListResult, '2019-01-01/generated/azure_mgmt_event_grid/models/topics_list_result.rb'
45
+ autoload :EventTypesListResult, '2019-01-01/generated/azure_mgmt_event_grid/models/event_types_list_result.rb'
46
+ autoload :TopicUpdateParameters, '2019-01-01/generated/azure_mgmt_event_grid/models/topic_update_parameters.rb'
47
+ autoload :StorageBlobDeadLetterDestination, '2019-01-01/generated/azure_mgmt_event_grid/models/storage_blob_dead_letter_destination.rb'
48
+ autoload :WebHookEventSubscriptionDestination, '2019-01-01/generated/azure_mgmt_event_grid/models/web_hook_event_subscription_destination.rb'
49
+ autoload :EventHubEventSubscriptionDestination, '2019-01-01/generated/azure_mgmt_event_grid/models/event_hub_event_subscription_destination.rb'
50
+ autoload :StorageQueueEventSubscriptionDestination, '2019-01-01/generated/azure_mgmt_event_grid/models/storage_queue_event_subscription_destination.rb'
51
+ autoload :HybridConnectionEventSubscriptionDestination, '2019-01-01/generated/azure_mgmt_event_grid/models/hybrid_connection_event_subscription_destination.rb'
52
+ autoload :EventSubscription, '2019-01-01/generated/azure_mgmt_event_grid/models/event_subscription.rb'
53
+ autoload :TrackedResource, '2019-01-01/generated/azure_mgmt_event_grid/models/tracked_resource.rb'
54
+ autoload :Topic, '2019-01-01/generated/azure_mgmt_event_grid/models/topic.rb'
55
+ autoload :EventType, '2019-01-01/generated/azure_mgmt_event_grid/models/event_type.rb'
56
+ autoload :TopicTypeInfo, '2019-01-01/generated/azure_mgmt_event_grid/models/topic_type_info.rb'
57
+ autoload :EventSubscriptionProvisioningState, '2019-01-01/generated/azure_mgmt_event_grid/models/event_subscription_provisioning_state.rb'
58
+ autoload :TopicProvisioningState, '2019-01-01/generated/azure_mgmt_event_grid/models/topic_provisioning_state.rb'
59
+ autoload :ResourceRegionType, '2019-01-01/generated/azure_mgmt_event_grid/models/resource_region_type.rb'
60
+ autoload :TopicTypeProvisioningState, '2019-01-01/generated/azure_mgmt_event_grid/models/topic_type_provisioning_state.rb'
61
+ end
62
+ end
@@ -138,7 +138,7 @@ module Azure::EventGrid::Mgmt::V2019_01_01
138
138
  #
139
139
  def add_telemetry
140
140
  sdk_information = 'azure_mgmt_event_grid'
141
- sdk_information = "#{sdk_information}/0.17.10"
141
+ sdk_information = "#{sdk_information}/0.18.0"
142
142
  add_user_agent_information(sdk_information)
143
143
  end
144
144
  end
@@ -1,1837 +1,1837 @@
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::EventGrid::Mgmt::V2019_01_01
7
- #
8
- # Azure EventGrid Management Client
9
- #
10
- class EventSubscriptions
11
- include MsRestAzure
12
-
13
- #
14
- # Creates and initializes a new instance of the EventSubscriptions class.
15
- # @param client service class for accessing basic functionality.
16
- #
17
- def initialize(client)
18
- @client = client
19
- end
20
-
21
- # @return [EventGridManagementClient] reference to the EventGridManagementClient
22
- attr_reader :client
23
-
24
- #
25
- # Get an event subscription
26
- #
27
- # Get properties of an event subscription
28
- #
29
- # @param scope [String] The scope of the event subscription. The scope can be a
30
- # subscription, or a resource group, or a top level resource belonging to a
31
- # resource provider namespace, or an EventGrid topic. For example, use
32
- # '/subscriptions/{subscriptionId}/' for a subscription,
33
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
34
- # resource group, and
35
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
36
- # for a resource, and
37
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
38
- # for an EventGrid topic.
39
- # @param event_subscription_name [String] Name of the event subscription
40
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
41
- # will be added to the HTTP request.
42
- #
43
- # @return [EventSubscription] operation results.
44
- #
45
- def get(scope, event_subscription_name, custom_headers:nil)
46
- response = get_async(scope, event_subscription_name, custom_headers:custom_headers).value!
47
- response.body unless response.nil?
48
- end
49
-
50
- #
51
- # Get an event subscription
52
- #
53
- # Get properties of an event subscription
54
- #
55
- # @param scope [String] The scope of the event subscription. The scope can be a
56
- # subscription, or a resource group, or a top level resource belonging to a
57
- # resource provider namespace, or an EventGrid topic. For example, use
58
- # '/subscriptions/{subscriptionId}/' for a subscription,
59
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
60
- # resource group, and
61
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
62
- # for a resource, and
63
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
64
- # for an EventGrid topic.
65
- # @param event_subscription_name [String] Name of the event subscription
66
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
67
- # will be added to the HTTP request.
68
- #
69
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
70
- #
71
- def get_with_http_info(scope, event_subscription_name, custom_headers:nil)
72
- get_async(scope, event_subscription_name, custom_headers:custom_headers).value!
73
- end
74
-
75
- #
76
- # Get an event subscription
77
- #
78
- # Get properties of an event subscription
79
- #
80
- # @param scope [String] The scope of the event subscription. The scope can be a
81
- # subscription, or a resource group, or a top level resource belonging to a
82
- # resource provider namespace, or an EventGrid topic. For example, use
83
- # '/subscriptions/{subscriptionId}/' for a subscription,
84
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
85
- # resource group, and
86
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
87
- # for a resource, and
88
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
89
- # for an EventGrid topic.
90
- # @param event_subscription_name [String] Name of the event subscription
91
- # @param [Hash{String => String}] A hash of custom headers that will be added
92
- # to the HTTP request.
93
- #
94
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
95
- #
96
- def get_async(scope, event_subscription_name, custom_headers:nil)
97
- fail ArgumentError, 'scope is nil' if scope.nil?
98
- fail ArgumentError, 'event_subscription_name is nil' if event_subscription_name.nil?
99
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
100
-
101
-
102
- request_headers = {}
103
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
104
-
105
- # Set Headers
106
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
107
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
108
- path_template = '{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}'
109
-
110
- request_url = @base_url || @client.base_url
111
-
112
- options = {
113
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
114
- path_params: {'eventSubscriptionName' => event_subscription_name},
115
- skip_encoding_path_params: {'scope' => scope},
116
- query_params: {'api-version' => @client.api_version},
117
- headers: request_headers.merge(custom_headers || {}),
118
- base_url: request_url
119
- }
120
- promise = @client.make_request_async(:get, path_template, options)
121
-
122
- promise = promise.then do |result|
123
- http_response = result.response
124
- status_code = http_response.status
125
- response_content = http_response.body
126
- unless status_code == 200
127
- error_model = JSON.load(response_content)
128
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
129
- end
130
-
131
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
132
- result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
133
- result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
134
- # Deserialize Response
135
- if status_code == 200
136
- begin
137
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
138
- result_mapper = Azure::EventGrid::Mgmt::V2019_01_01::Models::EventSubscription.mapper()
139
- result.body = @client.deserialize(result_mapper, parsed_response)
140
- rescue Exception => e
141
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
142
- end
143
- end
144
-
145
- result
146
- end
147
-
148
- promise.execute
149
- end
150
-
151
- #
152
- # Create or update an event subscription
153
- #
154
- # Asynchronously creates a new event subscription or updates an existing event
155
- # subscription based on the specified scope.
156
- #
157
- # @param scope [String] The identifier of the resource to which the event
158
- # subscription needs to be created or updated. The scope can be a subscription,
159
- # or a resource group, or a top level resource belonging to a resource provider
160
- # namespace, or an EventGrid topic. For example, use
161
- # '/subscriptions/{subscriptionId}/' for a subscription,
162
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
163
- # resource group, and
164
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
165
- # for a resource, and
166
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
167
- # for an EventGrid topic.
168
- # @param event_subscription_name [String] Name of the event subscription. Event
169
- # subscription names must be between 3 and 64 characters in length and should
170
- # use alphanumeric letters only.
171
- # @param event_subscription_info [EventSubscription] Event subscription
172
- # properties containing the destination and filter information
173
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
174
- # will be added to the HTTP request.
175
- #
176
- # @return [EventSubscription] operation results.
177
- #
178
- def create_or_update(scope, event_subscription_name, event_subscription_info, custom_headers:nil)
179
- response = create_or_update_async(scope, event_subscription_name, event_subscription_info, custom_headers:custom_headers).value!
180
- response.body unless response.nil?
181
- end
182
-
183
- #
184
- # @param scope [String] The identifier of the resource to which the event
185
- # subscription needs to be created or updated. The scope can be a subscription,
186
- # or a resource group, or a top level resource belonging to a resource provider
187
- # namespace, or an EventGrid topic. For example, use
188
- # '/subscriptions/{subscriptionId}/' for a subscription,
189
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
190
- # resource group, and
191
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
192
- # for a resource, and
193
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
194
- # for an EventGrid topic.
195
- # @param event_subscription_name [String] Name of the event subscription. Event
196
- # subscription names must be between 3 and 64 characters in length and should
197
- # use alphanumeric letters only.
198
- # @param event_subscription_info [EventSubscription] Event subscription
199
- # properties containing the destination and filter information
200
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
201
- # will be added to the HTTP request.
202
- #
203
- # @return [Concurrent::Promise] promise which provides async access to http
204
- # response.
205
- #
206
- def create_or_update_async(scope, event_subscription_name, event_subscription_info, custom_headers:nil)
207
- # Send request
208
- promise = begin_create_or_update_async(scope, event_subscription_name, event_subscription_info, custom_headers:custom_headers)
209
-
210
- promise = promise.then do |response|
211
- # Defining deserialization method.
212
- deserialize_method = lambda do |parsed_response|
213
- result_mapper = Azure::EventGrid::Mgmt::V2019_01_01::Models::EventSubscription.mapper()
214
- parsed_response = @client.deserialize(result_mapper, parsed_response)
215
- end
216
-
217
- # Waiting for response.
218
- @client.get_long_running_operation_result(response, deserialize_method)
219
- end
220
-
221
- promise
222
- end
223
-
224
- #
225
- # Delete an event subscription
226
- #
227
- # Delete an existing event subscription
228
- #
229
- # @param scope [String] The scope of the event subscription. The scope can be a
230
- # subscription, or a resource group, or a top level resource belonging to a
231
- # resource provider namespace, or an EventGrid topic. For example, use
232
- # '/subscriptions/{subscriptionId}/' for a subscription,
233
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
234
- # resource group, and
235
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
236
- # for a resource, and
237
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
238
- # for an EventGrid topic.
239
- # @param event_subscription_name [String] Name of the event subscription
240
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
241
- # will be added to the HTTP request.
242
- #
243
- def delete(scope, event_subscription_name, custom_headers:nil)
244
- response = delete_async(scope, event_subscription_name, custom_headers:custom_headers).value!
245
- nil
246
- end
247
-
248
- #
249
- # @param scope [String] The scope of the event subscription. The scope can be a
250
- # subscription, or a resource group, or a top level resource belonging to a
251
- # resource provider namespace, or an EventGrid topic. For example, use
252
- # '/subscriptions/{subscriptionId}/' for a subscription,
253
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
254
- # resource group, and
255
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
256
- # for a resource, and
257
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
258
- # for an EventGrid topic.
259
- # @param event_subscription_name [String] Name of the event subscription
260
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
261
- # will be added to the HTTP request.
262
- #
263
- # @return [Concurrent::Promise] promise which provides async access to http
264
- # response.
265
- #
266
- def delete_async(scope, event_subscription_name, custom_headers:nil)
267
- # Send request
268
- promise = begin_delete_async(scope, event_subscription_name, custom_headers:custom_headers)
269
-
270
- promise = promise.then do |response|
271
- # Defining deserialization method.
272
- deserialize_method = lambda do |parsed_response|
273
- end
274
-
275
- # Waiting for response.
276
- @client.get_long_running_operation_result(response, deserialize_method)
277
- end
278
-
279
- promise
280
- end
281
-
282
- #
283
- # Update an event subscription
284
- #
285
- # Asynchronously updates an existing event subscription.
286
- #
287
- # @param scope [String] The scope of existing event subscription. The scope can
288
- # be a subscription, or a resource group, or a top level resource belonging to
289
- # a resource provider namespace, or an EventGrid topic. For example, use
290
- # '/subscriptions/{subscriptionId}/' for a subscription,
291
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
292
- # resource group, and
293
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
294
- # for a resource, and
295
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
296
- # for an EventGrid topic.
297
- # @param event_subscription_name [String] Name of the event subscription to be
298
- # updated
299
- # @param event_subscription_update_parameters
300
- # [EventSubscriptionUpdateParameters] Updated event subscription information
301
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
302
- # will be added to the HTTP request.
303
- #
304
- # @return [EventSubscription] operation results.
305
- #
306
- def update(scope, event_subscription_name, event_subscription_update_parameters, custom_headers:nil)
307
- response = update_async(scope, event_subscription_name, event_subscription_update_parameters, custom_headers:custom_headers).value!
308
- response.body unless response.nil?
309
- end
310
-
311
- #
312
- # @param scope [String] The scope of existing event subscription. The scope can
313
- # be a subscription, or a resource group, or a top level resource belonging to
314
- # a resource provider namespace, or an EventGrid topic. For example, use
315
- # '/subscriptions/{subscriptionId}/' for a subscription,
316
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
317
- # resource group, and
318
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
319
- # for a resource, and
320
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
321
- # for an EventGrid topic.
322
- # @param event_subscription_name [String] Name of the event subscription to be
323
- # updated
324
- # @param event_subscription_update_parameters
325
- # [EventSubscriptionUpdateParameters] Updated event subscription information
326
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
327
- # will be added to the HTTP request.
328
- #
329
- # @return [Concurrent::Promise] promise which provides async access to http
330
- # response.
331
- #
332
- def update_async(scope, event_subscription_name, event_subscription_update_parameters, custom_headers:nil)
333
- # Send request
334
- promise = begin_update_async(scope, event_subscription_name, event_subscription_update_parameters, custom_headers:custom_headers)
335
-
336
- promise = promise.then do |response|
337
- # Defining deserialization method.
338
- deserialize_method = lambda do |parsed_response|
339
- result_mapper = Azure::EventGrid::Mgmt::V2019_01_01::Models::EventSubscription.mapper()
340
- parsed_response = @client.deserialize(result_mapper, parsed_response)
341
- end
342
-
343
- # Waiting for response.
344
- @client.get_long_running_operation_result(response, deserialize_method)
345
- end
346
-
347
- promise
348
- end
349
-
350
- #
351
- # Get full URL of an event subscription
352
- #
353
- # Get the full endpoint URL for an event subscription
354
- #
355
- # @param scope [String] The scope of the event subscription. The scope can be a
356
- # subscription, or a resource group, or a top level resource belonging to a
357
- # resource provider namespace, or an EventGrid topic. For example, use
358
- # '/subscriptions/{subscriptionId}/' for a subscription,
359
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
360
- # resource group, and
361
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
362
- # for a resource, and
363
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
364
- # for an EventGrid topic.
365
- # @param event_subscription_name [String] Name of the event subscription
366
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
367
- # will be added to the HTTP request.
368
- #
369
- # @return [EventSubscriptionFullUrl] operation results.
370
- #
371
- def get_full_url(scope, event_subscription_name, custom_headers:nil)
372
- response = get_full_url_async(scope, event_subscription_name, custom_headers:custom_headers).value!
373
- response.body unless response.nil?
374
- end
375
-
376
- #
377
- # Get full URL of an event subscription
378
- #
379
- # Get the full endpoint URL for an event subscription
380
- #
381
- # @param scope [String] The scope of the event subscription. The scope can be a
382
- # subscription, or a resource group, or a top level resource belonging to a
383
- # resource provider namespace, or an EventGrid topic. For example, use
384
- # '/subscriptions/{subscriptionId}/' for a subscription,
385
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
386
- # resource group, and
387
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
388
- # for a resource, and
389
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
390
- # for an EventGrid topic.
391
- # @param event_subscription_name [String] Name of the event subscription
392
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
393
- # will be added to the HTTP request.
394
- #
395
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
396
- #
397
- def get_full_url_with_http_info(scope, event_subscription_name, custom_headers:nil)
398
- get_full_url_async(scope, event_subscription_name, custom_headers:custom_headers).value!
399
- end
400
-
401
- #
402
- # Get full URL of an event subscription
403
- #
404
- # Get the full endpoint URL for an event subscription
405
- #
406
- # @param scope [String] The scope of the event subscription. The scope can be a
407
- # subscription, or a resource group, or a top level resource belonging to a
408
- # resource provider namespace, or an EventGrid topic. For example, use
409
- # '/subscriptions/{subscriptionId}/' for a subscription,
410
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
411
- # resource group, and
412
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
413
- # for a resource, and
414
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
415
- # for an EventGrid topic.
416
- # @param event_subscription_name [String] Name of the event subscription
417
- # @param [Hash{String => String}] A hash of custom headers that will be added
418
- # to the HTTP request.
419
- #
420
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
421
- #
422
- def get_full_url_async(scope, event_subscription_name, custom_headers:nil)
423
- fail ArgumentError, 'scope is nil' if scope.nil?
424
- fail ArgumentError, 'event_subscription_name is nil' if event_subscription_name.nil?
425
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
426
-
427
-
428
- request_headers = {}
429
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
430
-
431
- # Set Headers
432
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
433
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
434
- path_template = '{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}/getFullUrl'
435
-
436
- request_url = @base_url || @client.base_url
437
-
438
- options = {
439
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
440
- path_params: {'eventSubscriptionName' => event_subscription_name},
441
- skip_encoding_path_params: {'scope' => scope},
442
- query_params: {'api-version' => @client.api_version},
443
- headers: request_headers.merge(custom_headers || {}),
444
- base_url: request_url
445
- }
446
- promise = @client.make_request_async(:post, path_template, options)
447
-
448
- promise = promise.then do |result|
449
- http_response = result.response
450
- status_code = http_response.status
451
- response_content = http_response.body
452
- unless status_code == 200
453
- error_model = JSON.load(response_content)
454
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
455
- end
456
-
457
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
458
- result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
459
- result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
460
- # Deserialize Response
461
- if status_code == 200
462
- begin
463
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
464
- result_mapper = Azure::EventGrid::Mgmt::V2019_01_01::Models::EventSubscriptionFullUrl.mapper()
465
- result.body = @client.deserialize(result_mapper, parsed_response)
466
- rescue Exception => e
467
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
468
- end
469
- end
470
-
471
- result
472
- end
473
-
474
- promise.execute
475
- end
476
-
477
- #
478
- # Get an aggregated list of all global event subscriptions under an Azure
479
- # subscription
480
- #
481
- # List all aggregated global event subscriptions under a specific Azure
482
- # subscription
483
- #
484
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
485
- # will be added to the HTTP request.
486
- #
487
- # @return [EventSubscriptionsListResult] operation results.
488
- #
489
- def list_global_by_subscription(custom_headers:nil)
490
- response = list_global_by_subscription_async(custom_headers:custom_headers).value!
491
- response.body unless response.nil?
492
- end
493
-
494
- #
495
- # Get an aggregated list of all global event subscriptions under an Azure
496
- # subscription
497
- #
498
- # List all aggregated global event subscriptions under a specific Azure
499
- # subscription
500
- #
501
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
502
- # will be added to the HTTP request.
503
- #
504
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
505
- #
506
- def list_global_by_subscription_with_http_info(custom_headers:nil)
507
- list_global_by_subscription_async(custom_headers:custom_headers).value!
508
- end
509
-
510
- #
511
- # Get an aggregated list of all global event subscriptions under an Azure
512
- # subscription
513
- #
514
- # List all aggregated global event subscriptions under a specific Azure
515
- # subscription
516
- #
517
- # @param [Hash{String => String}] A hash of custom headers that will be added
518
- # to the HTTP request.
519
- #
520
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
521
- #
522
- def list_global_by_subscription_async(custom_headers:nil)
523
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
524
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
525
-
526
-
527
- request_headers = {}
528
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
529
-
530
- # Set Headers
531
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
532
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
533
- path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/eventSubscriptions'
534
-
535
- request_url = @base_url || @client.base_url
536
-
537
- options = {
538
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
539
- path_params: {'subscriptionId' => @client.subscription_id},
540
- query_params: {'api-version' => @client.api_version},
541
- headers: request_headers.merge(custom_headers || {}),
542
- base_url: request_url
543
- }
544
- promise = @client.make_request_async(:get, path_template, options)
545
-
546
- promise = promise.then do |result|
547
- http_response = result.response
548
- status_code = http_response.status
549
- response_content = http_response.body
550
- unless status_code == 200
551
- error_model = JSON.load(response_content)
552
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
553
- end
554
-
555
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
556
- result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
557
- result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
558
- # Deserialize Response
559
- if status_code == 200
560
- begin
561
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
562
- result_mapper = Azure::EventGrid::Mgmt::V2019_01_01::Models::EventSubscriptionsListResult.mapper()
563
- result.body = @client.deserialize(result_mapper, parsed_response)
564
- rescue Exception => e
565
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
566
- end
567
- end
568
-
569
- result
570
- end
571
-
572
- promise.execute
573
- end
574
-
575
- #
576
- # List all global event subscriptions for a topic type
577
- #
578
- # List all global event subscriptions under an Azure subscription for a topic
579
- # type.
580
- #
581
- # @param topic_type_name [String] Name of the topic type
582
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
583
- # will be added to the HTTP request.
584
- #
585
- # @return [EventSubscriptionsListResult] operation results.
586
- #
587
- def list_global_by_subscription_for_topic_type(topic_type_name, custom_headers:nil)
588
- response = list_global_by_subscription_for_topic_type_async(topic_type_name, custom_headers:custom_headers).value!
589
- response.body unless response.nil?
590
- end
591
-
592
- #
593
- # List all global event subscriptions for a topic type
594
- #
595
- # List all global event subscriptions under an Azure subscription for a topic
596
- # type.
597
- #
598
- # @param topic_type_name [String] Name of the topic type
599
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
600
- # will be added to the HTTP request.
601
- #
602
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
603
- #
604
- def list_global_by_subscription_for_topic_type_with_http_info(topic_type_name, custom_headers:nil)
605
- list_global_by_subscription_for_topic_type_async(topic_type_name, custom_headers:custom_headers).value!
606
- end
607
-
608
- #
609
- # List all global event subscriptions for a topic type
610
- #
611
- # List all global event subscriptions under an Azure subscription for a topic
612
- # type.
613
- #
614
- # @param topic_type_name [String] Name of the topic type
615
- # @param [Hash{String => String}] A hash of custom headers that will be added
616
- # to the HTTP request.
617
- #
618
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
619
- #
620
- def list_global_by_subscription_for_topic_type_async(topic_type_name, custom_headers:nil)
621
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
622
- fail ArgumentError, 'topic_type_name is nil' if topic_type_name.nil?
623
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
624
-
625
-
626
- request_headers = {}
627
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
628
-
629
- # Set Headers
630
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
631
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
632
- path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topicTypes/{topicTypeName}/eventSubscriptions'
633
-
634
- request_url = @base_url || @client.base_url
635
-
636
- options = {
637
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
638
- path_params: {'subscriptionId' => @client.subscription_id,'topicTypeName' => topic_type_name},
639
- query_params: {'api-version' => @client.api_version},
640
- headers: request_headers.merge(custom_headers || {}),
641
- base_url: request_url
642
- }
643
- promise = @client.make_request_async(:get, path_template, options)
644
-
645
- promise = promise.then do |result|
646
- http_response = result.response
647
- status_code = http_response.status
648
- response_content = http_response.body
649
- unless status_code == 200
650
- error_model = JSON.load(response_content)
651
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
652
- end
653
-
654
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
655
- result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
656
- result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
657
- # Deserialize Response
658
- if status_code == 200
659
- begin
660
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
661
- result_mapper = Azure::EventGrid::Mgmt::V2019_01_01::Models::EventSubscriptionsListResult.mapper()
662
- result.body = @client.deserialize(result_mapper, parsed_response)
663
- rescue Exception => e
664
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
665
- end
666
- end
667
-
668
- result
669
- end
670
-
671
- promise.execute
672
- end
673
-
674
- #
675
- # List all global event subscriptions under an Azure subscription and resource
676
- # group
677
- #
678
- # List all global event subscriptions under a specific Azure subscription and
679
- # resource group
680
- #
681
- # @param resource_group_name [String] The name of the resource group within the
682
- # user's subscription.
683
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
684
- # will be added to the HTTP request.
685
- #
686
- # @return [EventSubscriptionsListResult] operation results.
687
- #
688
- def list_global_by_resource_group(resource_group_name, custom_headers:nil)
689
- response = list_global_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
690
- response.body unless response.nil?
691
- end
692
-
693
- #
694
- # List all global event subscriptions under an Azure subscription and resource
695
- # group
696
- #
697
- # List all global event subscriptions under a specific Azure subscription and
698
- # resource group
699
- #
700
- # @param resource_group_name [String] The name of the resource group within the
701
- # user's subscription.
702
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
703
- # will be added to the HTTP request.
704
- #
705
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
706
- #
707
- def list_global_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
708
- list_global_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
709
- end
710
-
711
- #
712
- # List all global event subscriptions under an Azure subscription and resource
713
- # group
714
- #
715
- # List all global event subscriptions under a specific Azure subscription and
716
- # resource group
717
- #
718
- # @param resource_group_name [String] The name of the resource group within the
719
- # user's subscription.
720
- # @param [Hash{String => String}] A hash of custom headers that will be added
721
- # to the HTTP request.
722
- #
723
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
724
- #
725
- def list_global_by_resource_group_async(resource_group_name, custom_headers:nil)
726
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
727
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
728
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
729
-
730
-
731
- request_headers = {}
732
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
733
-
734
- # Set Headers
735
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
736
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
737
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/eventSubscriptions'
738
-
739
- request_url = @base_url || @client.base_url
740
-
741
- options = {
742
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
743
- path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
744
- query_params: {'api-version' => @client.api_version},
745
- headers: request_headers.merge(custom_headers || {}),
746
- base_url: request_url
747
- }
748
- promise = @client.make_request_async(:get, path_template, options)
749
-
750
- promise = promise.then do |result|
751
- http_response = result.response
752
- status_code = http_response.status
753
- response_content = http_response.body
754
- unless status_code == 200
755
- error_model = JSON.load(response_content)
756
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
757
- end
758
-
759
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
760
- result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
761
- result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
762
- # Deserialize Response
763
- if status_code == 200
764
- begin
765
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
766
- result_mapper = Azure::EventGrid::Mgmt::V2019_01_01::Models::EventSubscriptionsListResult.mapper()
767
- result.body = @client.deserialize(result_mapper, parsed_response)
768
- rescue Exception => e
769
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
770
- end
771
- end
772
-
773
- result
774
- end
775
-
776
- promise.execute
777
- end
778
-
779
- #
780
- # List all global event subscriptions under a resource group for a topic type
781
- #
782
- # List all global event subscriptions under a resource group for a specific
783
- # topic type.
784
- #
785
- # @param resource_group_name [String] The name of the resource group within the
786
- # user's subscription.
787
- # @param topic_type_name [String] Name of the topic type
788
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
789
- # will be added to the HTTP request.
790
- #
791
- # @return [EventSubscriptionsListResult] operation results.
792
- #
793
- def list_global_by_resource_group_for_topic_type(resource_group_name, topic_type_name, custom_headers:nil)
794
- response = list_global_by_resource_group_for_topic_type_async(resource_group_name, topic_type_name, custom_headers:custom_headers).value!
795
- response.body unless response.nil?
796
- end
797
-
798
- #
799
- # List all global event subscriptions under a resource group for a topic type
800
- #
801
- # List all global event subscriptions under a resource group for a specific
802
- # topic type.
803
- #
804
- # @param resource_group_name [String] The name of the resource group within the
805
- # user's subscription.
806
- # @param topic_type_name [String] Name of the topic type
807
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
808
- # will be added to the HTTP request.
809
- #
810
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
811
- #
812
- def list_global_by_resource_group_for_topic_type_with_http_info(resource_group_name, topic_type_name, custom_headers:nil)
813
- list_global_by_resource_group_for_topic_type_async(resource_group_name, topic_type_name, custom_headers:custom_headers).value!
814
- end
815
-
816
- #
817
- # List all global event subscriptions under a resource group for a topic type
818
- #
819
- # List all global event subscriptions under a resource group for a specific
820
- # topic type.
821
- #
822
- # @param resource_group_name [String] The name of the resource group within the
823
- # user's subscription.
824
- # @param topic_type_name [String] Name of the topic type
825
- # @param [Hash{String => String}] A hash of custom headers that will be added
826
- # to the HTTP request.
827
- #
828
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
829
- #
830
- def list_global_by_resource_group_for_topic_type_async(resource_group_name, topic_type_name, custom_headers:nil)
831
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
832
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
833
- fail ArgumentError, 'topic_type_name is nil' if topic_type_name.nil?
834
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
835
-
836
-
837
- request_headers = {}
838
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
839
-
840
- # Set Headers
841
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
842
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
843
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topicTypes/{topicTypeName}/eventSubscriptions'
844
-
845
- request_url = @base_url || @client.base_url
846
-
847
- options = {
848
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
849
- path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'topicTypeName' => topic_type_name},
850
- query_params: {'api-version' => @client.api_version},
851
- headers: request_headers.merge(custom_headers || {}),
852
- base_url: request_url
853
- }
854
- promise = @client.make_request_async(:get, path_template, options)
855
-
856
- promise = promise.then do |result|
857
- http_response = result.response
858
- status_code = http_response.status
859
- response_content = http_response.body
860
- unless status_code == 200
861
- error_model = JSON.load(response_content)
862
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
863
- end
864
-
865
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
866
- result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
867
- result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
868
- # Deserialize Response
869
- if status_code == 200
870
- begin
871
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
872
- result_mapper = Azure::EventGrid::Mgmt::V2019_01_01::Models::EventSubscriptionsListResult.mapper()
873
- result.body = @client.deserialize(result_mapper, parsed_response)
874
- rescue Exception => e
875
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
876
- end
877
- end
878
-
879
- result
880
- end
881
-
882
- promise.execute
883
- end
884
-
885
- #
886
- # List all regional event subscriptions under an Azure subscription
887
- #
888
- # List all event subscriptions from the given location under a specific Azure
889
- # subscription
890
- #
891
- # @param location [String] Name of the location
892
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
893
- # will be added to the HTTP request.
894
- #
895
- # @return [EventSubscriptionsListResult] operation results.
896
- #
897
- def list_regional_by_subscription(location, custom_headers:nil)
898
- response = list_regional_by_subscription_async(location, custom_headers:custom_headers).value!
899
- response.body unless response.nil?
900
- end
901
-
902
- #
903
- # List all regional event subscriptions under an Azure subscription
904
- #
905
- # List all event subscriptions from the given location under a specific Azure
906
- # subscription
907
- #
908
- # @param location [String] Name of the location
909
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
910
- # will be added to the HTTP request.
911
- #
912
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
913
- #
914
- def list_regional_by_subscription_with_http_info(location, custom_headers:nil)
915
- list_regional_by_subscription_async(location, custom_headers:custom_headers).value!
916
- end
917
-
918
- #
919
- # List all regional event subscriptions under an Azure subscription
920
- #
921
- # List all event subscriptions from the given location under a specific Azure
922
- # subscription
923
- #
924
- # @param location [String] Name of the location
925
- # @param [Hash{String => String}] A hash of custom headers that will be added
926
- # to the HTTP request.
927
- #
928
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
929
- #
930
- def list_regional_by_subscription_async(location, custom_headers:nil)
931
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
932
- fail ArgumentError, 'location is nil' if location.nil?
933
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
934
-
935
-
936
- request_headers = {}
937
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
938
-
939
- # Set Headers
940
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
941
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
942
- path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/locations/{location}/eventSubscriptions'
943
-
944
- request_url = @base_url || @client.base_url
945
-
946
- options = {
947
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
948
- path_params: {'subscriptionId' => @client.subscription_id,'location' => location},
949
- query_params: {'api-version' => @client.api_version},
950
- headers: request_headers.merge(custom_headers || {}),
951
- base_url: request_url
952
- }
953
- promise = @client.make_request_async(:get, path_template, options)
954
-
955
- promise = promise.then do |result|
956
- http_response = result.response
957
- status_code = http_response.status
958
- response_content = http_response.body
959
- unless status_code == 200
960
- error_model = JSON.load(response_content)
961
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
962
- end
963
-
964
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
965
- result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
966
- result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
967
- # Deserialize Response
968
- if status_code == 200
969
- begin
970
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
971
- result_mapper = Azure::EventGrid::Mgmt::V2019_01_01::Models::EventSubscriptionsListResult.mapper()
972
- result.body = @client.deserialize(result_mapper, parsed_response)
973
- rescue Exception => e
974
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
975
- end
976
- end
977
-
978
- result
979
- end
980
-
981
- promise.execute
982
- end
983
-
984
- #
985
- # List all regional event subscriptions under an Azure subscription and
986
- # resource group
987
- #
988
- # List all event subscriptions from the given location under a specific Azure
989
- # subscription and resource group
990
- #
991
- # @param resource_group_name [String] The name of the resource group within the
992
- # user's subscription.
993
- # @param location [String] Name of the location
994
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
995
- # will be added to the HTTP request.
996
- #
997
- # @return [EventSubscriptionsListResult] operation results.
998
- #
999
- def list_regional_by_resource_group(resource_group_name, location, custom_headers:nil)
1000
- response = list_regional_by_resource_group_async(resource_group_name, location, custom_headers:custom_headers).value!
1001
- response.body unless response.nil?
1002
- end
1003
-
1004
- #
1005
- # List all regional event subscriptions under an Azure subscription and
1006
- # resource group
1007
- #
1008
- # List all event subscriptions from the given location under a specific Azure
1009
- # subscription and resource group
1010
- #
1011
- # @param resource_group_name [String] The name of the resource group within the
1012
- # user's subscription.
1013
- # @param location [String] Name of the location
1014
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1015
- # will be added to the HTTP request.
1016
- #
1017
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1018
- #
1019
- def list_regional_by_resource_group_with_http_info(resource_group_name, location, custom_headers:nil)
1020
- list_regional_by_resource_group_async(resource_group_name, location, custom_headers:custom_headers).value!
1021
- end
1022
-
1023
- #
1024
- # List all regional event subscriptions under an Azure subscription and
1025
- # resource group
1026
- #
1027
- # List all event subscriptions from the given location under a specific Azure
1028
- # subscription and resource group
1029
- #
1030
- # @param resource_group_name [String] The name of the resource group within the
1031
- # user's subscription.
1032
- # @param location [String] Name of the location
1033
- # @param [Hash{String => String}] A hash of custom headers that will be added
1034
- # to the HTTP request.
1035
- #
1036
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1037
- #
1038
- def list_regional_by_resource_group_async(resource_group_name, location, custom_headers:nil)
1039
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1040
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1041
- fail ArgumentError, 'location is nil' if location.nil?
1042
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1043
-
1044
-
1045
- request_headers = {}
1046
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
1047
-
1048
- # Set Headers
1049
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1050
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1051
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/locations/{location}/eventSubscriptions'
1052
-
1053
- request_url = @base_url || @client.base_url
1054
-
1055
- options = {
1056
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1057
- path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'location' => location},
1058
- query_params: {'api-version' => @client.api_version},
1059
- headers: request_headers.merge(custom_headers || {}),
1060
- base_url: request_url
1061
- }
1062
- promise = @client.make_request_async(:get, path_template, options)
1063
-
1064
- promise = promise.then do |result|
1065
- http_response = result.response
1066
- status_code = http_response.status
1067
- response_content = http_response.body
1068
- unless status_code == 200
1069
- error_model = JSON.load(response_content)
1070
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1071
- end
1072
-
1073
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1074
- result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1075
- result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1076
- # Deserialize Response
1077
- if status_code == 200
1078
- begin
1079
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1080
- result_mapper = Azure::EventGrid::Mgmt::V2019_01_01::Models::EventSubscriptionsListResult.mapper()
1081
- result.body = @client.deserialize(result_mapper, parsed_response)
1082
- rescue Exception => e
1083
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1084
- end
1085
- end
1086
-
1087
- result
1088
- end
1089
-
1090
- promise.execute
1091
- end
1092
-
1093
- #
1094
- # List all regional event subscriptions under an Azure subscription for a topic
1095
- # type
1096
- #
1097
- # List all event subscriptions from the given location under a specific Azure
1098
- # subscription and topic type.
1099
- #
1100
- # @param location [String] Name of the location
1101
- # @param topic_type_name [String] Name of the topic type
1102
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1103
- # will be added to the HTTP request.
1104
- #
1105
- # @return [EventSubscriptionsListResult] operation results.
1106
- #
1107
- def list_regional_by_subscription_for_topic_type(location, topic_type_name, custom_headers:nil)
1108
- response = list_regional_by_subscription_for_topic_type_async(location, topic_type_name, custom_headers:custom_headers).value!
1109
- response.body unless response.nil?
1110
- end
1111
-
1112
- #
1113
- # List all regional event subscriptions under an Azure subscription for a topic
1114
- # type
1115
- #
1116
- # List all event subscriptions from the given location under a specific Azure
1117
- # subscription and topic type.
1118
- #
1119
- # @param location [String] Name of the location
1120
- # @param topic_type_name [String] Name of the topic type
1121
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1122
- # will be added to the HTTP request.
1123
- #
1124
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1125
- #
1126
- def list_regional_by_subscription_for_topic_type_with_http_info(location, topic_type_name, custom_headers:nil)
1127
- list_regional_by_subscription_for_topic_type_async(location, topic_type_name, custom_headers:custom_headers).value!
1128
- end
1129
-
1130
- #
1131
- # List all regional event subscriptions under an Azure subscription for a topic
1132
- # type
1133
- #
1134
- # List all event subscriptions from the given location under a specific Azure
1135
- # subscription and topic type.
1136
- #
1137
- # @param location [String] Name of the location
1138
- # @param topic_type_name [String] Name of the topic type
1139
- # @param [Hash{String => String}] A hash of custom headers that will be added
1140
- # to the HTTP request.
1141
- #
1142
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1143
- #
1144
- def list_regional_by_subscription_for_topic_type_async(location, topic_type_name, custom_headers:nil)
1145
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1146
- fail ArgumentError, 'location is nil' if location.nil?
1147
- fail ArgumentError, 'topic_type_name is nil' if topic_type_name.nil?
1148
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1149
-
1150
-
1151
- request_headers = {}
1152
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
1153
-
1154
- # Set Headers
1155
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1156
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1157
- path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/locations/{location}/topicTypes/{topicTypeName}/eventSubscriptions'
1158
-
1159
- request_url = @base_url || @client.base_url
1160
-
1161
- options = {
1162
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1163
- path_params: {'subscriptionId' => @client.subscription_id,'location' => location,'topicTypeName' => topic_type_name},
1164
- query_params: {'api-version' => @client.api_version},
1165
- headers: request_headers.merge(custom_headers || {}),
1166
- base_url: request_url
1167
- }
1168
- promise = @client.make_request_async(:get, path_template, options)
1169
-
1170
- promise = promise.then do |result|
1171
- http_response = result.response
1172
- status_code = http_response.status
1173
- response_content = http_response.body
1174
- unless status_code == 200
1175
- error_model = JSON.load(response_content)
1176
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1177
- end
1178
-
1179
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1180
- result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1181
- result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1182
- # Deserialize Response
1183
- if status_code == 200
1184
- begin
1185
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1186
- result_mapper = Azure::EventGrid::Mgmt::V2019_01_01::Models::EventSubscriptionsListResult.mapper()
1187
- result.body = @client.deserialize(result_mapper, parsed_response)
1188
- rescue Exception => e
1189
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1190
- end
1191
- end
1192
-
1193
- result
1194
- end
1195
-
1196
- promise.execute
1197
- end
1198
-
1199
- #
1200
- # List all regional event subscriptions under an Azure subscription and
1201
- # resource group for a topic type
1202
- #
1203
- # List all event subscriptions from the given location under a specific Azure
1204
- # subscription and resource group and topic type
1205
- #
1206
- # @param resource_group_name [String] The name of the resource group within the
1207
- # user's subscription.
1208
- # @param location [String] Name of the location
1209
- # @param topic_type_name [String] Name of the topic type
1210
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1211
- # will be added to the HTTP request.
1212
- #
1213
- # @return [EventSubscriptionsListResult] operation results.
1214
- #
1215
- def list_regional_by_resource_group_for_topic_type(resource_group_name, location, topic_type_name, custom_headers:nil)
1216
- response = list_regional_by_resource_group_for_topic_type_async(resource_group_name, location, topic_type_name, custom_headers:custom_headers).value!
1217
- response.body unless response.nil?
1218
- end
1219
-
1220
- #
1221
- # List all regional event subscriptions under an Azure subscription and
1222
- # resource group for a topic type
1223
- #
1224
- # List all event subscriptions from the given location under a specific Azure
1225
- # subscription and resource group and topic type
1226
- #
1227
- # @param resource_group_name [String] The name of the resource group within the
1228
- # user's subscription.
1229
- # @param location [String] Name of the location
1230
- # @param topic_type_name [String] Name of the topic type
1231
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1232
- # will be added to the HTTP request.
1233
- #
1234
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1235
- #
1236
- def list_regional_by_resource_group_for_topic_type_with_http_info(resource_group_name, location, topic_type_name, custom_headers:nil)
1237
- list_regional_by_resource_group_for_topic_type_async(resource_group_name, location, topic_type_name, custom_headers:custom_headers).value!
1238
- end
1239
-
1240
- #
1241
- # List all regional event subscriptions under an Azure subscription and
1242
- # resource group for a topic type
1243
- #
1244
- # List all event subscriptions from the given location under a specific Azure
1245
- # subscription and resource group and topic type
1246
- #
1247
- # @param resource_group_name [String] The name of the resource group within the
1248
- # user's subscription.
1249
- # @param location [String] Name of the location
1250
- # @param topic_type_name [String] Name of the topic type
1251
- # @param [Hash{String => String}] A hash of custom headers that will be added
1252
- # to the HTTP request.
1253
- #
1254
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1255
- #
1256
- def list_regional_by_resource_group_for_topic_type_async(resource_group_name, location, topic_type_name, custom_headers:nil)
1257
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1258
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1259
- fail ArgumentError, 'location is nil' if location.nil?
1260
- fail ArgumentError, 'topic_type_name is nil' if topic_type_name.nil?
1261
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1262
-
1263
-
1264
- request_headers = {}
1265
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
1266
-
1267
- # Set Headers
1268
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1269
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1270
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/locations/{location}/topicTypes/{topicTypeName}/eventSubscriptions'
1271
-
1272
- request_url = @base_url || @client.base_url
1273
-
1274
- options = {
1275
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1276
- path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'location' => location,'topicTypeName' => topic_type_name},
1277
- query_params: {'api-version' => @client.api_version},
1278
- headers: request_headers.merge(custom_headers || {}),
1279
- base_url: request_url
1280
- }
1281
- promise = @client.make_request_async(:get, path_template, options)
1282
-
1283
- promise = promise.then do |result|
1284
- http_response = result.response
1285
- status_code = http_response.status
1286
- response_content = http_response.body
1287
- unless status_code == 200
1288
- error_model = JSON.load(response_content)
1289
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1290
- end
1291
-
1292
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1293
- result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1294
- result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1295
- # Deserialize Response
1296
- if status_code == 200
1297
- begin
1298
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1299
- result_mapper = Azure::EventGrid::Mgmt::V2019_01_01::Models::EventSubscriptionsListResult.mapper()
1300
- result.body = @client.deserialize(result_mapper, parsed_response)
1301
- rescue Exception => e
1302
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1303
- end
1304
- end
1305
-
1306
- result
1307
- end
1308
-
1309
- promise.execute
1310
- end
1311
-
1312
- #
1313
- # List all event subscriptions for a specific topic
1314
- #
1315
- # List all event subscriptions that have been created for a specific topic
1316
- #
1317
- # @param resource_group_name [String] The name of the resource group within the
1318
- # user's subscription.
1319
- # @param provider_namespace [String] Namespace of the provider of the topic
1320
- # @param resource_type_name [String] Name of the resource type
1321
- # @param resource_name [String] Name of the resource
1322
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1323
- # will be added to the HTTP request.
1324
- #
1325
- # @return [EventSubscriptionsListResult] operation results.
1326
- #
1327
- def list_by_resource(resource_group_name, provider_namespace, resource_type_name, resource_name, custom_headers:nil)
1328
- response = list_by_resource_async(resource_group_name, provider_namespace, resource_type_name, resource_name, custom_headers:custom_headers).value!
1329
- response.body unless response.nil?
1330
- end
1331
-
1332
- #
1333
- # List all event subscriptions for a specific topic
1334
- #
1335
- # List all event subscriptions that have been created for a specific topic
1336
- #
1337
- # @param resource_group_name [String] The name of the resource group within the
1338
- # user's subscription.
1339
- # @param provider_namespace [String] Namespace of the provider of the topic
1340
- # @param resource_type_name [String] Name of the resource type
1341
- # @param resource_name [String] Name of the resource
1342
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1343
- # will be added to the HTTP request.
1344
- #
1345
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1346
- #
1347
- def list_by_resource_with_http_info(resource_group_name, provider_namespace, resource_type_name, resource_name, custom_headers:nil)
1348
- list_by_resource_async(resource_group_name, provider_namespace, resource_type_name, resource_name, custom_headers:custom_headers).value!
1349
- end
1350
-
1351
- #
1352
- # List all event subscriptions for a specific topic
1353
- #
1354
- # List all event subscriptions that have been created for a specific topic
1355
- #
1356
- # @param resource_group_name [String] The name of the resource group within the
1357
- # user's subscription.
1358
- # @param provider_namespace [String] Namespace of the provider of the topic
1359
- # @param resource_type_name [String] Name of the resource type
1360
- # @param resource_name [String] Name of the resource
1361
- # @param [Hash{String => String}] A hash of custom headers that will be added
1362
- # to the HTTP request.
1363
- #
1364
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1365
- #
1366
- def list_by_resource_async(resource_group_name, provider_namespace, resource_type_name, resource_name, custom_headers:nil)
1367
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1368
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1369
- fail ArgumentError, 'provider_namespace is nil' if provider_namespace.nil?
1370
- fail ArgumentError, 'resource_type_name is nil' if resource_type_name.nil?
1371
- fail ArgumentError, 'resource_name is nil' if resource_name.nil?
1372
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1373
-
1374
-
1375
- request_headers = {}
1376
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
1377
-
1378
- # Set Headers
1379
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1380
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1381
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{providerNamespace}/{resourceTypeName}/{resourceName}/providers/Microsoft.EventGrid/eventSubscriptions'
1382
-
1383
- request_url = @base_url || @client.base_url
1384
-
1385
- options = {
1386
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1387
- path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'providerNamespace' => provider_namespace,'resourceTypeName' => resource_type_name,'resourceName' => resource_name},
1388
- query_params: {'api-version' => @client.api_version},
1389
- headers: request_headers.merge(custom_headers || {}),
1390
- base_url: request_url
1391
- }
1392
- promise = @client.make_request_async(:get, path_template, options)
1393
-
1394
- promise = promise.then do |result|
1395
- http_response = result.response
1396
- status_code = http_response.status
1397
- response_content = http_response.body
1398
- unless status_code == 200
1399
- error_model = JSON.load(response_content)
1400
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1401
- end
1402
-
1403
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1404
- result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1405
- result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1406
- # Deserialize Response
1407
- if status_code == 200
1408
- begin
1409
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1410
- result_mapper = Azure::EventGrid::Mgmt::V2019_01_01::Models::EventSubscriptionsListResult.mapper()
1411
- result.body = @client.deserialize(result_mapper, parsed_response)
1412
- rescue Exception => e
1413
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1414
- end
1415
- end
1416
-
1417
- result
1418
- end
1419
-
1420
- promise.execute
1421
- end
1422
-
1423
- #
1424
- # Create or update an event subscription
1425
- #
1426
- # Asynchronously creates a new event subscription or updates an existing event
1427
- # subscription based on the specified scope.
1428
- #
1429
- # @param scope [String] The identifier of the resource to which the event
1430
- # subscription needs to be created or updated. The scope can be a subscription,
1431
- # or a resource group, or a top level resource belonging to a resource provider
1432
- # namespace, or an EventGrid topic. For example, use
1433
- # '/subscriptions/{subscriptionId}/' for a subscription,
1434
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
1435
- # resource group, and
1436
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
1437
- # for a resource, and
1438
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
1439
- # for an EventGrid topic.
1440
- # @param event_subscription_name [String] Name of the event subscription. Event
1441
- # subscription names must be between 3 and 64 characters in length and should
1442
- # use alphanumeric letters only.
1443
- # @param event_subscription_info [EventSubscription] Event subscription
1444
- # properties containing the destination and filter information
1445
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1446
- # will be added to the HTTP request.
1447
- #
1448
- # @return [EventSubscription] operation results.
1449
- #
1450
- def begin_create_or_update(scope, event_subscription_name, event_subscription_info, custom_headers:nil)
1451
- response = begin_create_or_update_async(scope, event_subscription_name, event_subscription_info, custom_headers:custom_headers).value!
1452
- response.body unless response.nil?
1453
- end
1454
-
1455
- #
1456
- # Create or update an event subscription
1457
- #
1458
- # Asynchronously creates a new event subscription or updates an existing event
1459
- # subscription based on the specified scope.
1460
- #
1461
- # @param scope [String] The identifier of the resource to which the event
1462
- # subscription needs to be created or updated. The scope can be a subscription,
1463
- # or a resource group, or a top level resource belonging to a resource provider
1464
- # namespace, or an EventGrid topic. For example, use
1465
- # '/subscriptions/{subscriptionId}/' for a subscription,
1466
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
1467
- # resource group, and
1468
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
1469
- # for a resource, and
1470
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
1471
- # for an EventGrid topic.
1472
- # @param event_subscription_name [String] Name of the event subscription. Event
1473
- # subscription names must be between 3 and 64 characters in length and should
1474
- # use alphanumeric letters only.
1475
- # @param event_subscription_info [EventSubscription] Event subscription
1476
- # properties containing the destination and filter information
1477
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1478
- # will be added to the HTTP request.
1479
- #
1480
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1481
- #
1482
- def begin_create_or_update_with_http_info(scope, event_subscription_name, event_subscription_info, custom_headers:nil)
1483
- begin_create_or_update_async(scope, event_subscription_name, event_subscription_info, custom_headers:custom_headers).value!
1484
- end
1485
-
1486
- #
1487
- # Create or update an event subscription
1488
- #
1489
- # Asynchronously creates a new event subscription or updates an existing event
1490
- # subscription based on the specified scope.
1491
- #
1492
- # @param scope [String] The identifier of the resource to which the event
1493
- # subscription needs to be created or updated. The scope can be a subscription,
1494
- # or a resource group, or a top level resource belonging to a resource provider
1495
- # namespace, or an EventGrid topic. For example, use
1496
- # '/subscriptions/{subscriptionId}/' for a subscription,
1497
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
1498
- # resource group, and
1499
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
1500
- # for a resource, and
1501
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
1502
- # for an EventGrid topic.
1503
- # @param event_subscription_name [String] Name of the event subscription. Event
1504
- # subscription names must be between 3 and 64 characters in length and should
1505
- # use alphanumeric letters only.
1506
- # @param event_subscription_info [EventSubscription] Event subscription
1507
- # properties containing the destination and filter information
1508
- # @param [Hash{String => String}] A hash of custom headers that will be added
1509
- # to the HTTP request.
1510
- #
1511
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1512
- #
1513
- def begin_create_or_update_async(scope, event_subscription_name, event_subscription_info, custom_headers:nil)
1514
- fail ArgumentError, 'scope is nil' if scope.nil?
1515
- fail ArgumentError, 'event_subscription_name is nil' if event_subscription_name.nil?
1516
- fail ArgumentError, 'event_subscription_info is nil' if event_subscription_info.nil?
1517
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1518
-
1519
-
1520
- request_headers = {}
1521
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
1522
-
1523
- # Set Headers
1524
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1525
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1526
-
1527
- # Serialize Request
1528
- request_mapper = Azure::EventGrid::Mgmt::V2019_01_01::Models::EventSubscription.mapper()
1529
- request_content = @client.serialize(request_mapper, event_subscription_info)
1530
- request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1531
-
1532
- path_template = '{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}'
1533
-
1534
- request_url = @base_url || @client.base_url
1535
-
1536
- options = {
1537
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1538
- path_params: {'eventSubscriptionName' => event_subscription_name},
1539
- skip_encoding_path_params: {'scope' => scope},
1540
- query_params: {'api-version' => @client.api_version},
1541
- body: request_content,
1542
- headers: request_headers.merge(custom_headers || {}),
1543
- base_url: request_url
1544
- }
1545
- promise = @client.make_request_async(:put, path_template, options)
1546
-
1547
- promise = promise.then do |result|
1548
- http_response = result.response
1549
- status_code = http_response.status
1550
- response_content = http_response.body
1551
- unless status_code == 201
1552
- error_model = JSON.load(response_content)
1553
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1554
- end
1555
-
1556
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1557
- result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1558
- result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1559
- # Deserialize Response
1560
- if status_code == 201
1561
- begin
1562
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1563
- result_mapper = Azure::EventGrid::Mgmt::V2019_01_01::Models::EventSubscription.mapper()
1564
- result.body = @client.deserialize(result_mapper, parsed_response)
1565
- rescue Exception => e
1566
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1567
- end
1568
- end
1569
-
1570
- result
1571
- end
1572
-
1573
- promise.execute
1574
- end
1575
-
1576
- #
1577
- # Delete an event subscription
1578
- #
1579
- # Delete an existing event subscription
1580
- #
1581
- # @param scope [String] The scope of the event subscription. The scope can be a
1582
- # subscription, or a resource group, or a top level resource belonging to a
1583
- # resource provider namespace, or an EventGrid topic. For example, use
1584
- # '/subscriptions/{subscriptionId}/' for a subscription,
1585
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
1586
- # resource group, and
1587
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
1588
- # for a resource, and
1589
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
1590
- # for an EventGrid topic.
1591
- # @param event_subscription_name [String] Name of the event subscription
1592
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1593
- # will be added to the HTTP request.
1594
- #
1595
- #
1596
- def begin_delete(scope, event_subscription_name, custom_headers:nil)
1597
- response = begin_delete_async(scope, event_subscription_name, custom_headers:custom_headers).value!
1598
- nil
1599
- end
1600
-
1601
- #
1602
- # Delete an event subscription
1603
- #
1604
- # Delete an existing event subscription
1605
- #
1606
- # @param scope [String] The scope of the event subscription. The scope can be a
1607
- # subscription, or a resource group, or a top level resource belonging to a
1608
- # resource provider namespace, or an EventGrid topic. For example, use
1609
- # '/subscriptions/{subscriptionId}/' for a subscription,
1610
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
1611
- # resource group, and
1612
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
1613
- # for a resource, and
1614
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
1615
- # for an EventGrid topic.
1616
- # @param event_subscription_name [String] Name of the event subscription
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 begin_delete_with_http_info(scope, event_subscription_name, custom_headers:nil)
1623
- begin_delete_async(scope, event_subscription_name, custom_headers:custom_headers).value!
1624
- end
1625
-
1626
- #
1627
- # Delete an event subscription
1628
- #
1629
- # Delete an existing event subscription
1630
- #
1631
- # @param scope [String] The scope of the event subscription. The scope can be a
1632
- # subscription, or a resource group, or a top level resource belonging to a
1633
- # resource provider namespace, or an EventGrid topic. For example, use
1634
- # '/subscriptions/{subscriptionId}/' for a subscription,
1635
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
1636
- # resource group, and
1637
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
1638
- # for a resource, and
1639
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
1640
- # for an EventGrid topic.
1641
- # @param event_subscription_name [String] Name of the event subscription
1642
- # @param [Hash{String => String}] A hash of custom headers that will be added
1643
- # to the HTTP request.
1644
- #
1645
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1646
- #
1647
- def begin_delete_async(scope, event_subscription_name, custom_headers:nil)
1648
- fail ArgumentError, 'scope is nil' if scope.nil?
1649
- fail ArgumentError, 'event_subscription_name is nil' if event_subscription_name.nil?
1650
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1651
-
1652
-
1653
- request_headers = {}
1654
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
1655
-
1656
- # Set Headers
1657
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1658
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1659
- path_template = '{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}'
1660
-
1661
- request_url = @base_url || @client.base_url
1662
-
1663
- options = {
1664
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1665
- path_params: {'eventSubscriptionName' => event_subscription_name},
1666
- skip_encoding_path_params: {'scope' => scope},
1667
- query_params: {'api-version' => @client.api_version},
1668
- headers: request_headers.merge(custom_headers || {}),
1669
- base_url: request_url
1670
- }
1671
- promise = @client.make_request_async(:delete, path_template, options)
1672
-
1673
- promise = promise.then do |result|
1674
- http_response = result.response
1675
- status_code = http_response.status
1676
- response_content = http_response.body
1677
- unless status_code == 200 || status_code == 202 || status_code == 204
1678
- error_model = JSON.load(response_content)
1679
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1680
- end
1681
-
1682
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1683
- result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1684
- result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1685
-
1686
- result
1687
- end
1688
-
1689
- promise.execute
1690
- end
1691
-
1692
- #
1693
- # Update an event subscription
1694
- #
1695
- # Asynchronously updates an existing event subscription.
1696
- #
1697
- # @param scope [String] The scope of existing event subscription. The scope can
1698
- # be a subscription, or a resource group, or a top level resource belonging to
1699
- # a resource provider namespace, or an EventGrid topic. For example, use
1700
- # '/subscriptions/{subscriptionId}/' for a subscription,
1701
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
1702
- # resource group, and
1703
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
1704
- # for a resource, and
1705
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
1706
- # for an EventGrid topic.
1707
- # @param event_subscription_name [String] Name of the event subscription to be
1708
- # updated
1709
- # @param event_subscription_update_parameters
1710
- # [EventSubscriptionUpdateParameters] Updated event subscription information
1711
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1712
- # will be added to the HTTP request.
1713
- #
1714
- # @return [EventSubscription] operation results.
1715
- #
1716
- def begin_update(scope, event_subscription_name, event_subscription_update_parameters, custom_headers:nil)
1717
- response = begin_update_async(scope, event_subscription_name, event_subscription_update_parameters, custom_headers:custom_headers).value!
1718
- response.body unless response.nil?
1719
- end
1720
-
1721
- #
1722
- # Update an event subscription
1723
- #
1724
- # Asynchronously updates an existing event subscription.
1725
- #
1726
- # @param scope [String] The scope of existing event subscription. The scope can
1727
- # be a subscription, or a resource group, or a top level resource belonging to
1728
- # a resource provider namespace, or an EventGrid topic. For example, use
1729
- # '/subscriptions/{subscriptionId}/' for a subscription,
1730
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
1731
- # resource group, and
1732
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
1733
- # for a resource, and
1734
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
1735
- # for an EventGrid topic.
1736
- # @param event_subscription_name [String] Name of the event subscription to be
1737
- # updated
1738
- # @param event_subscription_update_parameters
1739
- # [EventSubscriptionUpdateParameters] Updated event subscription information
1740
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1741
- # will be added to the HTTP request.
1742
- #
1743
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1744
- #
1745
- def begin_update_with_http_info(scope, event_subscription_name, event_subscription_update_parameters, custom_headers:nil)
1746
- begin_update_async(scope, event_subscription_name, event_subscription_update_parameters, custom_headers:custom_headers).value!
1747
- end
1748
-
1749
- #
1750
- # Update an event subscription
1751
- #
1752
- # Asynchronously updates an existing event subscription.
1753
- #
1754
- # @param scope [String] The scope of existing event subscription. The scope can
1755
- # be a subscription, or a resource group, or a top level resource belonging to
1756
- # a resource provider namespace, or an EventGrid topic. For example, use
1757
- # '/subscriptions/{subscriptionId}/' for a subscription,
1758
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
1759
- # resource group, and
1760
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
1761
- # for a resource, and
1762
- # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
1763
- # for an EventGrid topic.
1764
- # @param event_subscription_name [String] Name of the event subscription to be
1765
- # updated
1766
- # @param event_subscription_update_parameters
1767
- # [EventSubscriptionUpdateParameters] Updated event subscription information
1768
- # @param [Hash{String => String}] A hash of custom headers that will be added
1769
- # to the HTTP request.
1770
- #
1771
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1772
- #
1773
- def begin_update_async(scope, event_subscription_name, event_subscription_update_parameters, custom_headers:nil)
1774
- fail ArgumentError, 'scope is nil' if scope.nil?
1775
- fail ArgumentError, 'event_subscription_name is nil' if event_subscription_name.nil?
1776
- fail ArgumentError, 'event_subscription_update_parameters is nil' if event_subscription_update_parameters.nil?
1777
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1778
-
1779
-
1780
- request_headers = {}
1781
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
1782
-
1783
- # Set Headers
1784
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1785
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1786
-
1787
- # Serialize Request
1788
- request_mapper = Azure::EventGrid::Mgmt::V2019_01_01::Models::EventSubscriptionUpdateParameters.mapper()
1789
- request_content = @client.serialize(request_mapper, event_subscription_update_parameters)
1790
- request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1791
-
1792
- path_template = '{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}'
1793
-
1794
- request_url = @base_url || @client.base_url
1795
-
1796
- options = {
1797
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1798
- path_params: {'eventSubscriptionName' => event_subscription_name},
1799
- skip_encoding_path_params: {'scope' => scope},
1800
- query_params: {'api-version' => @client.api_version},
1801
- body: request_content,
1802
- headers: request_headers.merge(custom_headers || {}),
1803
- base_url: request_url
1804
- }
1805
- promise = @client.make_request_async(:patch, path_template, options)
1806
-
1807
- promise = promise.then do |result|
1808
- http_response = result.response
1809
- status_code = http_response.status
1810
- response_content = http_response.body
1811
- unless status_code == 201
1812
- error_model = JSON.load(response_content)
1813
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1814
- end
1815
-
1816
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1817
- result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1818
- result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1819
- # Deserialize Response
1820
- if status_code == 201
1821
- begin
1822
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1823
- result_mapper = Azure::EventGrid::Mgmt::V2019_01_01::Models::EventSubscription.mapper()
1824
- result.body = @client.deserialize(result_mapper, parsed_response)
1825
- rescue Exception => e
1826
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1827
- end
1828
- end
1829
-
1830
- result
1831
- end
1832
-
1833
- promise.execute
1834
- end
1835
-
1836
- end
1837
- end
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::EventGrid::Mgmt::V2019_01_01
7
+ #
8
+ # Azure EventGrid Management Client
9
+ #
10
+ class EventSubscriptions
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the EventSubscriptions class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [EventGridManagementClient] reference to the EventGridManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Get an event subscription
26
+ #
27
+ # Get properties of an event subscription
28
+ #
29
+ # @param scope [String] The scope of the event subscription. The scope can be a
30
+ # subscription, or a resource group, or a top level resource belonging to a
31
+ # resource provider namespace, or an EventGrid topic. For example, use
32
+ # '/subscriptions/{subscriptionId}/' for a subscription,
33
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
34
+ # resource group, and
35
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
36
+ # for a resource, and
37
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
38
+ # for an EventGrid topic.
39
+ # @param event_subscription_name [String] Name of the event subscription
40
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
41
+ # will be added to the HTTP request.
42
+ #
43
+ # @return [EventSubscription] operation results.
44
+ #
45
+ def get(scope, event_subscription_name, custom_headers:nil)
46
+ response = get_async(scope, event_subscription_name, custom_headers:custom_headers).value!
47
+ response.body unless response.nil?
48
+ end
49
+
50
+ #
51
+ # Get an event subscription
52
+ #
53
+ # Get properties of an event subscription
54
+ #
55
+ # @param scope [String] The scope of the event subscription. The scope can be a
56
+ # subscription, or a resource group, or a top level resource belonging to a
57
+ # resource provider namespace, or an EventGrid topic. For example, use
58
+ # '/subscriptions/{subscriptionId}/' for a subscription,
59
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
60
+ # resource group, and
61
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
62
+ # for a resource, and
63
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
64
+ # for an EventGrid topic.
65
+ # @param event_subscription_name [String] Name of the event subscription
66
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
67
+ # will be added to the HTTP request.
68
+ #
69
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
70
+ #
71
+ def get_with_http_info(scope, event_subscription_name, custom_headers:nil)
72
+ get_async(scope, event_subscription_name, custom_headers:custom_headers).value!
73
+ end
74
+
75
+ #
76
+ # Get an event subscription
77
+ #
78
+ # Get properties of an event subscription
79
+ #
80
+ # @param scope [String] The scope of the event subscription. The scope can be a
81
+ # subscription, or a resource group, or a top level resource belonging to a
82
+ # resource provider namespace, or an EventGrid topic. For example, use
83
+ # '/subscriptions/{subscriptionId}/' for a subscription,
84
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
85
+ # resource group, and
86
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
87
+ # for a resource, and
88
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
89
+ # for an EventGrid topic.
90
+ # @param event_subscription_name [String] Name of the event subscription
91
+ # @param [Hash{String => String}] A hash of custom headers that will be added
92
+ # to the HTTP request.
93
+ #
94
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
95
+ #
96
+ def get_async(scope, event_subscription_name, custom_headers:nil)
97
+ fail ArgumentError, 'scope is nil' if scope.nil?
98
+ fail ArgumentError, 'event_subscription_name is nil' if event_subscription_name.nil?
99
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
100
+
101
+
102
+ request_headers = {}
103
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
104
+
105
+ # Set Headers
106
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
107
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
108
+ path_template = '{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}'
109
+
110
+ request_url = @base_url || @client.base_url
111
+
112
+ options = {
113
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
114
+ path_params: {'eventSubscriptionName' => event_subscription_name},
115
+ skip_encoding_path_params: {'scope' => scope},
116
+ query_params: {'api-version' => @client.api_version},
117
+ headers: request_headers.merge(custom_headers || {}),
118
+ base_url: request_url
119
+ }
120
+ promise = @client.make_request_async(:get, path_template, options)
121
+
122
+ promise = promise.then do |result|
123
+ http_response = result.response
124
+ status_code = http_response.status
125
+ response_content = http_response.body
126
+ unless status_code == 200
127
+ error_model = JSON.load(response_content)
128
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
129
+ end
130
+
131
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
132
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
133
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
134
+ # Deserialize Response
135
+ if status_code == 200
136
+ begin
137
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
138
+ result_mapper = Azure::EventGrid::Mgmt::V2019_01_01::Models::EventSubscription.mapper()
139
+ result.body = @client.deserialize(result_mapper, parsed_response)
140
+ rescue Exception => e
141
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
142
+ end
143
+ end
144
+
145
+ result
146
+ end
147
+
148
+ promise.execute
149
+ end
150
+
151
+ #
152
+ # Create or update an event subscription
153
+ #
154
+ # Asynchronously creates a new event subscription or updates an existing event
155
+ # subscription based on the specified scope.
156
+ #
157
+ # @param scope [String] The identifier of the resource to which the event
158
+ # subscription needs to be created or updated. The scope can be a subscription,
159
+ # or a resource group, or a top level resource belonging to a resource provider
160
+ # namespace, or an EventGrid topic. For example, use
161
+ # '/subscriptions/{subscriptionId}/' for a subscription,
162
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
163
+ # resource group, and
164
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
165
+ # for a resource, and
166
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
167
+ # for an EventGrid topic.
168
+ # @param event_subscription_name [String] Name of the event subscription. Event
169
+ # subscription names must be between 3 and 64 characters in length and should
170
+ # use alphanumeric letters only.
171
+ # @param event_subscription_info [EventSubscription] Event subscription
172
+ # properties containing the destination and filter information
173
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
174
+ # will be added to the HTTP request.
175
+ #
176
+ # @return [EventSubscription] operation results.
177
+ #
178
+ def create_or_update(scope, event_subscription_name, event_subscription_info, custom_headers:nil)
179
+ response = create_or_update_async(scope, event_subscription_name, event_subscription_info, custom_headers:custom_headers).value!
180
+ response.body unless response.nil?
181
+ end
182
+
183
+ #
184
+ # @param scope [String] The identifier of the resource to which the event
185
+ # subscription needs to be created or updated. The scope can be a subscription,
186
+ # or a resource group, or a top level resource belonging to a resource provider
187
+ # namespace, or an EventGrid topic. For example, use
188
+ # '/subscriptions/{subscriptionId}/' for a subscription,
189
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
190
+ # resource group, and
191
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
192
+ # for a resource, and
193
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
194
+ # for an EventGrid topic.
195
+ # @param event_subscription_name [String] Name of the event subscription. Event
196
+ # subscription names must be between 3 and 64 characters in length and should
197
+ # use alphanumeric letters only.
198
+ # @param event_subscription_info [EventSubscription] Event subscription
199
+ # properties containing the destination and filter information
200
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
201
+ # will be added to the HTTP request.
202
+ #
203
+ # @return [Concurrent::Promise] promise which provides async access to http
204
+ # response.
205
+ #
206
+ def create_or_update_async(scope, event_subscription_name, event_subscription_info, custom_headers:nil)
207
+ # Send request
208
+ promise = begin_create_or_update_async(scope, event_subscription_name, event_subscription_info, custom_headers:custom_headers)
209
+
210
+ promise = promise.then do |response|
211
+ # Defining deserialization method.
212
+ deserialize_method = lambda do |parsed_response|
213
+ result_mapper = Azure::EventGrid::Mgmt::V2019_01_01::Models::EventSubscription.mapper()
214
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
215
+ end
216
+
217
+ # Waiting for response.
218
+ @client.get_long_running_operation_result(response, deserialize_method)
219
+ end
220
+
221
+ promise
222
+ end
223
+
224
+ #
225
+ # Delete an event subscription
226
+ #
227
+ # Delete an existing event subscription
228
+ #
229
+ # @param scope [String] The scope of the event subscription. The scope can be a
230
+ # subscription, or a resource group, or a top level resource belonging to a
231
+ # resource provider namespace, or an EventGrid topic. For example, use
232
+ # '/subscriptions/{subscriptionId}/' for a subscription,
233
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
234
+ # resource group, and
235
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
236
+ # for a resource, and
237
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
238
+ # for an EventGrid topic.
239
+ # @param event_subscription_name [String] Name of the event subscription
240
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
241
+ # will be added to the HTTP request.
242
+ #
243
+ def delete(scope, event_subscription_name, custom_headers:nil)
244
+ response = delete_async(scope, event_subscription_name, custom_headers:custom_headers).value!
245
+ nil
246
+ end
247
+
248
+ #
249
+ # @param scope [String] The scope of the event subscription. The scope can be a
250
+ # subscription, or a resource group, or a top level resource belonging to a
251
+ # resource provider namespace, or an EventGrid topic. For example, use
252
+ # '/subscriptions/{subscriptionId}/' for a subscription,
253
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
254
+ # resource group, and
255
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
256
+ # for a resource, and
257
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
258
+ # for an EventGrid topic.
259
+ # @param event_subscription_name [String] Name of the event subscription
260
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
261
+ # will be added to the HTTP request.
262
+ #
263
+ # @return [Concurrent::Promise] promise which provides async access to http
264
+ # response.
265
+ #
266
+ def delete_async(scope, event_subscription_name, custom_headers:nil)
267
+ # Send request
268
+ promise = begin_delete_async(scope, event_subscription_name, custom_headers:custom_headers)
269
+
270
+ promise = promise.then do |response|
271
+ # Defining deserialization method.
272
+ deserialize_method = lambda do |parsed_response|
273
+ end
274
+
275
+ # Waiting for response.
276
+ @client.get_long_running_operation_result(response, deserialize_method)
277
+ end
278
+
279
+ promise
280
+ end
281
+
282
+ #
283
+ # Update an event subscription
284
+ #
285
+ # Asynchronously updates an existing event subscription.
286
+ #
287
+ # @param scope [String] The scope of existing event subscription. The scope can
288
+ # be a subscription, or a resource group, or a top level resource belonging to
289
+ # a resource provider namespace, or an EventGrid topic. For example, use
290
+ # '/subscriptions/{subscriptionId}/' for a subscription,
291
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
292
+ # resource group, and
293
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
294
+ # for a resource, and
295
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
296
+ # for an EventGrid topic.
297
+ # @param event_subscription_name [String] Name of the event subscription to be
298
+ # updated
299
+ # @param event_subscription_update_parameters
300
+ # [EventSubscriptionUpdateParameters] Updated event subscription information
301
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
302
+ # will be added to the HTTP request.
303
+ #
304
+ # @return [EventSubscription] operation results.
305
+ #
306
+ def update(scope, event_subscription_name, event_subscription_update_parameters, custom_headers:nil)
307
+ response = update_async(scope, event_subscription_name, event_subscription_update_parameters, custom_headers:custom_headers).value!
308
+ response.body unless response.nil?
309
+ end
310
+
311
+ #
312
+ # @param scope [String] The scope of existing event subscription. The scope can
313
+ # be a subscription, or a resource group, or a top level resource belonging to
314
+ # a resource provider namespace, or an EventGrid topic. For example, use
315
+ # '/subscriptions/{subscriptionId}/' for a subscription,
316
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
317
+ # resource group, and
318
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
319
+ # for a resource, and
320
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
321
+ # for an EventGrid topic.
322
+ # @param event_subscription_name [String] Name of the event subscription to be
323
+ # updated
324
+ # @param event_subscription_update_parameters
325
+ # [EventSubscriptionUpdateParameters] Updated event subscription information
326
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
327
+ # will be added to the HTTP request.
328
+ #
329
+ # @return [Concurrent::Promise] promise which provides async access to http
330
+ # response.
331
+ #
332
+ def update_async(scope, event_subscription_name, event_subscription_update_parameters, custom_headers:nil)
333
+ # Send request
334
+ promise = begin_update_async(scope, event_subscription_name, event_subscription_update_parameters, custom_headers:custom_headers)
335
+
336
+ promise = promise.then do |response|
337
+ # Defining deserialization method.
338
+ deserialize_method = lambda do |parsed_response|
339
+ result_mapper = Azure::EventGrid::Mgmt::V2019_01_01::Models::EventSubscription.mapper()
340
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
341
+ end
342
+
343
+ # Waiting for response.
344
+ @client.get_long_running_operation_result(response, deserialize_method)
345
+ end
346
+
347
+ promise
348
+ end
349
+
350
+ #
351
+ # Get full URL of an event subscription
352
+ #
353
+ # Get the full endpoint URL for an event subscription
354
+ #
355
+ # @param scope [String] The scope of the event subscription. The scope can be a
356
+ # subscription, or a resource group, or a top level resource belonging to a
357
+ # resource provider namespace, or an EventGrid topic. For example, use
358
+ # '/subscriptions/{subscriptionId}/' for a subscription,
359
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
360
+ # resource group, and
361
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
362
+ # for a resource, and
363
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
364
+ # for an EventGrid topic.
365
+ # @param event_subscription_name [String] Name of the event subscription
366
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
367
+ # will be added to the HTTP request.
368
+ #
369
+ # @return [EventSubscriptionFullUrl] operation results.
370
+ #
371
+ def get_full_url(scope, event_subscription_name, custom_headers:nil)
372
+ response = get_full_url_async(scope, event_subscription_name, custom_headers:custom_headers).value!
373
+ response.body unless response.nil?
374
+ end
375
+
376
+ #
377
+ # Get full URL of an event subscription
378
+ #
379
+ # Get the full endpoint URL for an event subscription
380
+ #
381
+ # @param scope [String] The scope of the event subscription. The scope can be a
382
+ # subscription, or a resource group, or a top level resource belonging to a
383
+ # resource provider namespace, or an EventGrid topic. For example, use
384
+ # '/subscriptions/{subscriptionId}/' for a subscription,
385
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
386
+ # resource group, and
387
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
388
+ # for a resource, and
389
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
390
+ # for an EventGrid topic.
391
+ # @param event_subscription_name [String] Name of the event subscription
392
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
393
+ # will be added to the HTTP request.
394
+ #
395
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
396
+ #
397
+ def get_full_url_with_http_info(scope, event_subscription_name, custom_headers:nil)
398
+ get_full_url_async(scope, event_subscription_name, custom_headers:custom_headers).value!
399
+ end
400
+
401
+ #
402
+ # Get full URL of an event subscription
403
+ #
404
+ # Get the full endpoint URL for an event subscription
405
+ #
406
+ # @param scope [String] The scope of the event subscription. The scope can be a
407
+ # subscription, or a resource group, or a top level resource belonging to a
408
+ # resource provider namespace, or an EventGrid topic. For example, use
409
+ # '/subscriptions/{subscriptionId}/' for a subscription,
410
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
411
+ # resource group, and
412
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
413
+ # for a resource, and
414
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
415
+ # for an EventGrid topic.
416
+ # @param event_subscription_name [String] Name of the event subscription
417
+ # @param [Hash{String => String}] A hash of custom headers that will be added
418
+ # to the HTTP request.
419
+ #
420
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
421
+ #
422
+ def get_full_url_async(scope, event_subscription_name, custom_headers:nil)
423
+ fail ArgumentError, 'scope is nil' if scope.nil?
424
+ fail ArgumentError, 'event_subscription_name is nil' if event_subscription_name.nil?
425
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
426
+
427
+
428
+ request_headers = {}
429
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
430
+
431
+ # Set Headers
432
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
433
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
434
+ path_template = '{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}/getFullUrl'
435
+
436
+ request_url = @base_url || @client.base_url
437
+
438
+ options = {
439
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
440
+ path_params: {'eventSubscriptionName' => event_subscription_name},
441
+ skip_encoding_path_params: {'scope' => scope},
442
+ query_params: {'api-version' => @client.api_version},
443
+ headers: request_headers.merge(custom_headers || {}),
444
+ base_url: request_url
445
+ }
446
+ promise = @client.make_request_async(:post, path_template, options)
447
+
448
+ promise = promise.then do |result|
449
+ http_response = result.response
450
+ status_code = http_response.status
451
+ response_content = http_response.body
452
+ unless status_code == 200
453
+ error_model = JSON.load(response_content)
454
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
455
+ end
456
+
457
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
458
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
459
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
460
+ # Deserialize Response
461
+ if status_code == 200
462
+ begin
463
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
464
+ result_mapper = Azure::EventGrid::Mgmt::V2019_01_01::Models::EventSubscriptionFullUrl.mapper()
465
+ result.body = @client.deserialize(result_mapper, parsed_response)
466
+ rescue Exception => e
467
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
468
+ end
469
+ end
470
+
471
+ result
472
+ end
473
+
474
+ promise.execute
475
+ end
476
+
477
+ #
478
+ # Get an aggregated list of all global event subscriptions under an Azure
479
+ # subscription
480
+ #
481
+ # List all aggregated global event subscriptions under a specific Azure
482
+ # subscription
483
+ #
484
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
485
+ # will be added to the HTTP request.
486
+ #
487
+ # @return [EventSubscriptionsListResult] operation results.
488
+ #
489
+ def list_global_by_subscription(custom_headers:nil)
490
+ response = list_global_by_subscription_async(custom_headers:custom_headers).value!
491
+ response.body unless response.nil?
492
+ end
493
+
494
+ #
495
+ # Get an aggregated list of all global event subscriptions under an Azure
496
+ # subscription
497
+ #
498
+ # List all aggregated global event subscriptions under a specific Azure
499
+ # subscription
500
+ #
501
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
502
+ # will be added to the HTTP request.
503
+ #
504
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
505
+ #
506
+ def list_global_by_subscription_with_http_info(custom_headers:nil)
507
+ list_global_by_subscription_async(custom_headers:custom_headers).value!
508
+ end
509
+
510
+ #
511
+ # Get an aggregated list of all global event subscriptions under an Azure
512
+ # subscription
513
+ #
514
+ # List all aggregated global event subscriptions under a specific Azure
515
+ # subscription
516
+ #
517
+ # @param [Hash{String => String}] A hash of custom headers that will be added
518
+ # to the HTTP request.
519
+ #
520
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
521
+ #
522
+ def list_global_by_subscription_async(custom_headers:nil)
523
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
524
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
525
+
526
+
527
+ request_headers = {}
528
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
529
+
530
+ # Set Headers
531
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
532
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
533
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/eventSubscriptions'
534
+
535
+ request_url = @base_url || @client.base_url
536
+
537
+ options = {
538
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
539
+ path_params: {'subscriptionId' => @client.subscription_id},
540
+ query_params: {'api-version' => @client.api_version},
541
+ headers: request_headers.merge(custom_headers || {}),
542
+ base_url: request_url
543
+ }
544
+ promise = @client.make_request_async(:get, path_template, options)
545
+
546
+ promise = promise.then do |result|
547
+ http_response = result.response
548
+ status_code = http_response.status
549
+ response_content = http_response.body
550
+ unless status_code == 200
551
+ error_model = JSON.load(response_content)
552
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
553
+ end
554
+
555
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
556
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
557
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
558
+ # Deserialize Response
559
+ if status_code == 200
560
+ begin
561
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
562
+ result_mapper = Azure::EventGrid::Mgmt::V2019_01_01::Models::EventSubscriptionsListResult.mapper()
563
+ result.body = @client.deserialize(result_mapper, parsed_response)
564
+ rescue Exception => e
565
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
566
+ end
567
+ end
568
+
569
+ result
570
+ end
571
+
572
+ promise.execute
573
+ end
574
+
575
+ #
576
+ # List all global event subscriptions for a topic type
577
+ #
578
+ # List all global event subscriptions under an Azure subscription for a topic
579
+ # type.
580
+ #
581
+ # @param topic_type_name [String] Name of the topic type
582
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
583
+ # will be added to the HTTP request.
584
+ #
585
+ # @return [EventSubscriptionsListResult] operation results.
586
+ #
587
+ def list_global_by_subscription_for_topic_type(topic_type_name, custom_headers:nil)
588
+ response = list_global_by_subscription_for_topic_type_async(topic_type_name, custom_headers:custom_headers).value!
589
+ response.body unless response.nil?
590
+ end
591
+
592
+ #
593
+ # List all global event subscriptions for a topic type
594
+ #
595
+ # List all global event subscriptions under an Azure subscription for a topic
596
+ # type.
597
+ #
598
+ # @param topic_type_name [String] Name of the topic type
599
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
600
+ # will be added to the HTTP request.
601
+ #
602
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
603
+ #
604
+ def list_global_by_subscription_for_topic_type_with_http_info(topic_type_name, custom_headers:nil)
605
+ list_global_by_subscription_for_topic_type_async(topic_type_name, custom_headers:custom_headers).value!
606
+ end
607
+
608
+ #
609
+ # List all global event subscriptions for a topic type
610
+ #
611
+ # List all global event subscriptions under an Azure subscription for a topic
612
+ # type.
613
+ #
614
+ # @param topic_type_name [String] Name of the topic type
615
+ # @param [Hash{String => String}] A hash of custom headers that will be added
616
+ # to the HTTP request.
617
+ #
618
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
619
+ #
620
+ def list_global_by_subscription_for_topic_type_async(topic_type_name, custom_headers:nil)
621
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
622
+ fail ArgumentError, 'topic_type_name is nil' if topic_type_name.nil?
623
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
624
+
625
+
626
+ request_headers = {}
627
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
628
+
629
+ # Set Headers
630
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
631
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
632
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topicTypes/{topicTypeName}/eventSubscriptions'
633
+
634
+ request_url = @base_url || @client.base_url
635
+
636
+ options = {
637
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
638
+ path_params: {'subscriptionId' => @client.subscription_id,'topicTypeName' => topic_type_name},
639
+ query_params: {'api-version' => @client.api_version},
640
+ headers: request_headers.merge(custom_headers || {}),
641
+ base_url: request_url
642
+ }
643
+ promise = @client.make_request_async(:get, path_template, options)
644
+
645
+ promise = promise.then do |result|
646
+ http_response = result.response
647
+ status_code = http_response.status
648
+ response_content = http_response.body
649
+ unless status_code == 200
650
+ error_model = JSON.load(response_content)
651
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
652
+ end
653
+
654
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
655
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
656
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
657
+ # Deserialize Response
658
+ if status_code == 200
659
+ begin
660
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
661
+ result_mapper = Azure::EventGrid::Mgmt::V2019_01_01::Models::EventSubscriptionsListResult.mapper()
662
+ result.body = @client.deserialize(result_mapper, parsed_response)
663
+ rescue Exception => e
664
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
665
+ end
666
+ end
667
+
668
+ result
669
+ end
670
+
671
+ promise.execute
672
+ end
673
+
674
+ #
675
+ # List all global event subscriptions under an Azure subscription and resource
676
+ # group
677
+ #
678
+ # List all global event subscriptions under a specific Azure subscription and
679
+ # resource group
680
+ #
681
+ # @param resource_group_name [String] The name of the resource group within the
682
+ # user's subscription.
683
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
684
+ # will be added to the HTTP request.
685
+ #
686
+ # @return [EventSubscriptionsListResult] operation results.
687
+ #
688
+ def list_global_by_resource_group(resource_group_name, custom_headers:nil)
689
+ response = list_global_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
690
+ response.body unless response.nil?
691
+ end
692
+
693
+ #
694
+ # List all global event subscriptions under an Azure subscription and resource
695
+ # group
696
+ #
697
+ # List all global event subscriptions under a specific Azure subscription and
698
+ # resource group
699
+ #
700
+ # @param resource_group_name [String] The name of the resource group within the
701
+ # user's subscription.
702
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
703
+ # will be added to the HTTP request.
704
+ #
705
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
706
+ #
707
+ def list_global_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
708
+ list_global_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
709
+ end
710
+
711
+ #
712
+ # List all global event subscriptions under an Azure subscription and resource
713
+ # group
714
+ #
715
+ # List all global event subscriptions under a specific Azure subscription and
716
+ # resource group
717
+ #
718
+ # @param resource_group_name [String] The name of the resource group within the
719
+ # user's subscription.
720
+ # @param [Hash{String => String}] A hash of custom headers that will be added
721
+ # to the HTTP request.
722
+ #
723
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
724
+ #
725
+ def list_global_by_resource_group_async(resource_group_name, custom_headers:nil)
726
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
727
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
728
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
729
+
730
+
731
+ request_headers = {}
732
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
733
+
734
+ # Set Headers
735
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
736
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
737
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/eventSubscriptions'
738
+
739
+ request_url = @base_url || @client.base_url
740
+
741
+ options = {
742
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
743
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
744
+ query_params: {'api-version' => @client.api_version},
745
+ headers: request_headers.merge(custom_headers || {}),
746
+ base_url: request_url
747
+ }
748
+ promise = @client.make_request_async(:get, path_template, options)
749
+
750
+ promise = promise.then do |result|
751
+ http_response = result.response
752
+ status_code = http_response.status
753
+ response_content = http_response.body
754
+ unless status_code == 200
755
+ error_model = JSON.load(response_content)
756
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
757
+ end
758
+
759
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
760
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
761
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
762
+ # Deserialize Response
763
+ if status_code == 200
764
+ begin
765
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
766
+ result_mapper = Azure::EventGrid::Mgmt::V2019_01_01::Models::EventSubscriptionsListResult.mapper()
767
+ result.body = @client.deserialize(result_mapper, parsed_response)
768
+ rescue Exception => e
769
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
770
+ end
771
+ end
772
+
773
+ result
774
+ end
775
+
776
+ promise.execute
777
+ end
778
+
779
+ #
780
+ # List all global event subscriptions under a resource group for a topic type
781
+ #
782
+ # List all global event subscriptions under a resource group for a specific
783
+ # topic type.
784
+ #
785
+ # @param resource_group_name [String] The name of the resource group within the
786
+ # user's subscription.
787
+ # @param topic_type_name [String] Name of the topic type
788
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
789
+ # will be added to the HTTP request.
790
+ #
791
+ # @return [EventSubscriptionsListResult] operation results.
792
+ #
793
+ def list_global_by_resource_group_for_topic_type(resource_group_name, topic_type_name, custom_headers:nil)
794
+ response = list_global_by_resource_group_for_topic_type_async(resource_group_name, topic_type_name, custom_headers:custom_headers).value!
795
+ response.body unless response.nil?
796
+ end
797
+
798
+ #
799
+ # List all global event subscriptions under a resource group for a topic type
800
+ #
801
+ # List all global event subscriptions under a resource group for a specific
802
+ # topic type.
803
+ #
804
+ # @param resource_group_name [String] The name of the resource group within the
805
+ # user's subscription.
806
+ # @param topic_type_name [String] Name of the topic type
807
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
808
+ # will be added to the HTTP request.
809
+ #
810
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
811
+ #
812
+ def list_global_by_resource_group_for_topic_type_with_http_info(resource_group_name, topic_type_name, custom_headers:nil)
813
+ list_global_by_resource_group_for_topic_type_async(resource_group_name, topic_type_name, custom_headers:custom_headers).value!
814
+ end
815
+
816
+ #
817
+ # List all global event subscriptions under a resource group for a topic type
818
+ #
819
+ # List all global event subscriptions under a resource group for a specific
820
+ # topic type.
821
+ #
822
+ # @param resource_group_name [String] The name of the resource group within the
823
+ # user's subscription.
824
+ # @param topic_type_name [String] Name of the topic type
825
+ # @param [Hash{String => String}] A hash of custom headers that will be added
826
+ # to the HTTP request.
827
+ #
828
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
829
+ #
830
+ def list_global_by_resource_group_for_topic_type_async(resource_group_name, topic_type_name, custom_headers:nil)
831
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
832
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
833
+ fail ArgumentError, 'topic_type_name is nil' if topic_type_name.nil?
834
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
835
+
836
+
837
+ request_headers = {}
838
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
839
+
840
+ # Set Headers
841
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
842
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
843
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topicTypes/{topicTypeName}/eventSubscriptions'
844
+
845
+ request_url = @base_url || @client.base_url
846
+
847
+ options = {
848
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
849
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'topicTypeName' => topic_type_name},
850
+ query_params: {'api-version' => @client.api_version},
851
+ headers: request_headers.merge(custom_headers || {}),
852
+ base_url: request_url
853
+ }
854
+ promise = @client.make_request_async(:get, path_template, options)
855
+
856
+ promise = promise.then do |result|
857
+ http_response = result.response
858
+ status_code = http_response.status
859
+ response_content = http_response.body
860
+ unless status_code == 200
861
+ error_model = JSON.load(response_content)
862
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
863
+ end
864
+
865
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
866
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
867
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
868
+ # Deserialize Response
869
+ if status_code == 200
870
+ begin
871
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
872
+ result_mapper = Azure::EventGrid::Mgmt::V2019_01_01::Models::EventSubscriptionsListResult.mapper()
873
+ result.body = @client.deserialize(result_mapper, parsed_response)
874
+ rescue Exception => e
875
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
876
+ end
877
+ end
878
+
879
+ result
880
+ end
881
+
882
+ promise.execute
883
+ end
884
+
885
+ #
886
+ # List all regional event subscriptions under an Azure subscription
887
+ #
888
+ # List all event subscriptions from the given location under a specific Azure
889
+ # subscription
890
+ #
891
+ # @param location [String] Name of the location
892
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
893
+ # will be added to the HTTP request.
894
+ #
895
+ # @return [EventSubscriptionsListResult] operation results.
896
+ #
897
+ def list_regional_by_subscription(location, custom_headers:nil)
898
+ response = list_regional_by_subscription_async(location, custom_headers:custom_headers).value!
899
+ response.body unless response.nil?
900
+ end
901
+
902
+ #
903
+ # List all regional event subscriptions under an Azure subscription
904
+ #
905
+ # List all event subscriptions from the given location under a specific Azure
906
+ # subscription
907
+ #
908
+ # @param location [String] Name of the location
909
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
910
+ # will be added to the HTTP request.
911
+ #
912
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
913
+ #
914
+ def list_regional_by_subscription_with_http_info(location, custom_headers:nil)
915
+ list_regional_by_subscription_async(location, custom_headers:custom_headers).value!
916
+ end
917
+
918
+ #
919
+ # List all regional event subscriptions under an Azure subscription
920
+ #
921
+ # List all event subscriptions from the given location under a specific Azure
922
+ # subscription
923
+ #
924
+ # @param location [String] Name of the location
925
+ # @param [Hash{String => String}] A hash of custom headers that will be added
926
+ # to the HTTP request.
927
+ #
928
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
929
+ #
930
+ def list_regional_by_subscription_async(location, custom_headers:nil)
931
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
932
+ fail ArgumentError, 'location is nil' if location.nil?
933
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
934
+
935
+
936
+ request_headers = {}
937
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
938
+
939
+ # Set Headers
940
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
941
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
942
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/locations/{location}/eventSubscriptions'
943
+
944
+ request_url = @base_url || @client.base_url
945
+
946
+ options = {
947
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
948
+ path_params: {'subscriptionId' => @client.subscription_id,'location' => location},
949
+ query_params: {'api-version' => @client.api_version},
950
+ headers: request_headers.merge(custom_headers || {}),
951
+ base_url: request_url
952
+ }
953
+ promise = @client.make_request_async(:get, path_template, options)
954
+
955
+ promise = promise.then do |result|
956
+ http_response = result.response
957
+ status_code = http_response.status
958
+ response_content = http_response.body
959
+ unless status_code == 200
960
+ error_model = JSON.load(response_content)
961
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
962
+ end
963
+
964
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
965
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
966
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
967
+ # Deserialize Response
968
+ if status_code == 200
969
+ begin
970
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
971
+ result_mapper = Azure::EventGrid::Mgmt::V2019_01_01::Models::EventSubscriptionsListResult.mapper()
972
+ result.body = @client.deserialize(result_mapper, parsed_response)
973
+ rescue Exception => e
974
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
975
+ end
976
+ end
977
+
978
+ result
979
+ end
980
+
981
+ promise.execute
982
+ end
983
+
984
+ #
985
+ # List all regional event subscriptions under an Azure subscription and
986
+ # resource group
987
+ #
988
+ # List all event subscriptions from the given location under a specific Azure
989
+ # subscription and resource group
990
+ #
991
+ # @param resource_group_name [String] The name of the resource group within the
992
+ # user's subscription.
993
+ # @param location [String] Name of the location
994
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
995
+ # will be added to the HTTP request.
996
+ #
997
+ # @return [EventSubscriptionsListResult] operation results.
998
+ #
999
+ def list_regional_by_resource_group(resource_group_name, location, custom_headers:nil)
1000
+ response = list_regional_by_resource_group_async(resource_group_name, location, custom_headers:custom_headers).value!
1001
+ response.body unless response.nil?
1002
+ end
1003
+
1004
+ #
1005
+ # List all regional event subscriptions under an Azure subscription and
1006
+ # resource group
1007
+ #
1008
+ # List all event subscriptions from the given location under a specific Azure
1009
+ # subscription and resource group
1010
+ #
1011
+ # @param resource_group_name [String] The name of the resource group within the
1012
+ # user's subscription.
1013
+ # @param location [String] Name of the location
1014
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1015
+ # will be added to the HTTP request.
1016
+ #
1017
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1018
+ #
1019
+ def list_regional_by_resource_group_with_http_info(resource_group_name, location, custom_headers:nil)
1020
+ list_regional_by_resource_group_async(resource_group_name, location, custom_headers:custom_headers).value!
1021
+ end
1022
+
1023
+ #
1024
+ # List all regional event subscriptions under an Azure subscription and
1025
+ # resource group
1026
+ #
1027
+ # List all event subscriptions from the given location under a specific Azure
1028
+ # subscription and resource group
1029
+ #
1030
+ # @param resource_group_name [String] The name of the resource group within the
1031
+ # user's subscription.
1032
+ # @param location [String] Name of the location
1033
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1034
+ # to the HTTP request.
1035
+ #
1036
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1037
+ #
1038
+ def list_regional_by_resource_group_async(resource_group_name, location, custom_headers:nil)
1039
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1040
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1041
+ fail ArgumentError, 'location is nil' if location.nil?
1042
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1043
+
1044
+
1045
+ request_headers = {}
1046
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1047
+
1048
+ # Set Headers
1049
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1050
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1051
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/locations/{location}/eventSubscriptions'
1052
+
1053
+ request_url = @base_url || @client.base_url
1054
+
1055
+ options = {
1056
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1057
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'location' => location},
1058
+ query_params: {'api-version' => @client.api_version},
1059
+ headers: request_headers.merge(custom_headers || {}),
1060
+ base_url: request_url
1061
+ }
1062
+ promise = @client.make_request_async(:get, path_template, options)
1063
+
1064
+ promise = promise.then do |result|
1065
+ http_response = result.response
1066
+ status_code = http_response.status
1067
+ response_content = http_response.body
1068
+ unless status_code == 200
1069
+ error_model = JSON.load(response_content)
1070
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1071
+ end
1072
+
1073
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1074
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1075
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1076
+ # Deserialize Response
1077
+ if status_code == 200
1078
+ begin
1079
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1080
+ result_mapper = Azure::EventGrid::Mgmt::V2019_01_01::Models::EventSubscriptionsListResult.mapper()
1081
+ result.body = @client.deserialize(result_mapper, parsed_response)
1082
+ rescue Exception => e
1083
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1084
+ end
1085
+ end
1086
+
1087
+ result
1088
+ end
1089
+
1090
+ promise.execute
1091
+ end
1092
+
1093
+ #
1094
+ # List all regional event subscriptions under an Azure subscription for a topic
1095
+ # type
1096
+ #
1097
+ # List all event subscriptions from the given location under a specific Azure
1098
+ # subscription and topic type.
1099
+ #
1100
+ # @param location [String] Name of the location
1101
+ # @param topic_type_name [String] Name of the topic type
1102
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1103
+ # will be added to the HTTP request.
1104
+ #
1105
+ # @return [EventSubscriptionsListResult] operation results.
1106
+ #
1107
+ def list_regional_by_subscription_for_topic_type(location, topic_type_name, custom_headers:nil)
1108
+ response = list_regional_by_subscription_for_topic_type_async(location, topic_type_name, custom_headers:custom_headers).value!
1109
+ response.body unless response.nil?
1110
+ end
1111
+
1112
+ #
1113
+ # List all regional event subscriptions under an Azure subscription for a topic
1114
+ # type
1115
+ #
1116
+ # List all event subscriptions from the given location under a specific Azure
1117
+ # subscription and topic type.
1118
+ #
1119
+ # @param location [String] Name of the location
1120
+ # @param topic_type_name [String] Name of the topic type
1121
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1122
+ # will be added to the HTTP request.
1123
+ #
1124
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1125
+ #
1126
+ def list_regional_by_subscription_for_topic_type_with_http_info(location, topic_type_name, custom_headers:nil)
1127
+ list_regional_by_subscription_for_topic_type_async(location, topic_type_name, custom_headers:custom_headers).value!
1128
+ end
1129
+
1130
+ #
1131
+ # List all regional event subscriptions under an Azure subscription for a topic
1132
+ # type
1133
+ #
1134
+ # List all event subscriptions from the given location under a specific Azure
1135
+ # subscription and topic type.
1136
+ #
1137
+ # @param location [String] Name of the location
1138
+ # @param topic_type_name [String] Name of the topic type
1139
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1140
+ # to the HTTP request.
1141
+ #
1142
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1143
+ #
1144
+ def list_regional_by_subscription_for_topic_type_async(location, topic_type_name, custom_headers:nil)
1145
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1146
+ fail ArgumentError, 'location is nil' if location.nil?
1147
+ fail ArgumentError, 'topic_type_name is nil' if topic_type_name.nil?
1148
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1149
+
1150
+
1151
+ request_headers = {}
1152
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1153
+
1154
+ # Set Headers
1155
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1156
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1157
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/locations/{location}/topicTypes/{topicTypeName}/eventSubscriptions'
1158
+
1159
+ request_url = @base_url || @client.base_url
1160
+
1161
+ options = {
1162
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1163
+ path_params: {'subscriptionId' => @client.subscription_id,'location' => location,'topicTypeName' => topic_type_name},
1164
+ query_params: {'api-version' => @client.api_version},
1165
+ headers: request_headers.merge(custom_headers || {}),
1166
+ base_url: request_url
1167
+ }
1168
+ promise = @client.make_request_async(:get, path_template, options)
1169
+
1170
+ promise = promise.then do |result|
1171
+ http_response = result.response
1172
+ status_code = http_response.status
1173
+ response_content = http_response.body
1174
+ unless status_code == 200
1175
+ error_model = JSON.load(response_content)
1176
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1177
+ end
1178
+
1179
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1180
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1181
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1182
+ # Deserialize Response
1183
+ if status_code == 200
1184
+ begin
1185
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1186
+ result_mapper = Azure::EventGrid::Mgmt::V2019_01_01::Models::EventSubscriptionsListResult.mapper()
1187
+ result.body = @client.deserialize(result_mapper, parsed_response)
1188
+ rescue Exception => e
1189
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1190
+ end
1191
+ end
1192
+
1193
+ result
1194
+ end
1195
+
1196
+ promise.execute
1197
+ end
1198
+
1199
+ #
1200
+ # List all regional event subscriptions under an Azure subscription and
1201
+ # resource group for a topic type
1202
+ #
1203
+ # List all event subscriptions from the given location under a specific Azure
1204
+ # subscription and resource group and topic type
1205
+ #
1206
+ # @param resource_group_name [String] The name of the resource group within the
1207
+ # user's subscription.
1208
+ # @param location [String] Name of the location
1209
+ # @param topic_type_name [String] Name of the topic type
1210
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1211
+ # will be added to the HTTP request.
1212
+ #
1213
+ # @return [EventSubscriptionsListResult] operation results.
1214
+ #
1215
+ def list_regional_by_resource_group_for_topic_type(resource_group_name, location, topic_type_name, custom_headers:nil)
1216
+ response = list_regional_by_resource_group_for_topic_type_async(resource_group_name, location, topic_type_name, custom_headers:custom_headers).value!
1217
+ response.body unless response.nil?
1218
+ end
1219
+
1220
+ #
1221
+ # List all regional event subscriptions under an Azure subscription and
1222
+ # resource group for a topic type
1223
+ #
1224
+ # List all event subscriptions from the given location under a specific Azure
1225
+ # subscription and resource group and topic type
1226
+ #
1227
+ # @param resource_group_name [String] The name of the resource group within the
1228
+ # user's subscription.
1229
+ # @param location [String] Name of the location
1230
+ # @param topic_type_name [String] Name of the topic type
1231
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1232
+ # will be added to the HTTP request.
1233
+ #
1234
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1235
+ #
1236
+ def list_regional_by_resource_group_for_topic_type_with_http_info(resource_group_name, location, topic_type_name, custom_headers:nil)
1237
+ list_regional_by_resource_group_for_topic_type_async(resource_group_name, location, topic_type_name, custom_headers:custom_headers).value!
1238
+ end
1239
+
1240
+ #
1241
+ # List all regional event subscriptions under an Azure subscription and
1242
+ # resource group for a topic type
1243
+ #
1244
+ # List all event subscriptions from the given location under a specific Azure
1245
+ # subscription and resource group and topic type
1246
+ #
1247
+ # @param resource_group_name [String] The name of the resource group within the
1248
+ # user's subscription.
1249
+ # @param location [String] Name of the location
1250
+ # @param topic_type_name [String] Name of the topic type
1251
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1252
+ # to the HTTP request.
1253
+ #
1254
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1255
+ #
1256
+ def list_regional_by_resource_group_for_topic_type_async(resource_group_name, location, topic_type_name, custom_headers:nil)
1257
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1258
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1259
+ fail ArgumentError, 'location is nil' if location.nil?
1260
+ fail ArgumentError, 'topic_type_name is nil' if topic_type_name.nil?
1261
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1262
+
1263
+
1264
+ request_headers = {}
1265
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1266
+
1267
+ # Set Headers
1268
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1269
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1270
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/locations/{location}/topicTypes/{topicTypeName}/eventSubscriptions'
1271
+
1272
+ request_url = @base_url || @client.base_url
1273
+
1274
+ options = {
1275
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1276
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'location' => location,'topicTypeName' => topic_type_name},
1277
+ query_params: {'api-version' => @client.api_version},
1278
+ headers: request_headers.merge(custom_headers || {}),
1279
+ base_url: request_url
1280
+ }
1281
+ promise = @client.make_request_async(:get, path_template, options)
1282
+
1283
+ promise = promise.then do |result|
1284
+ http_response = result.response
1285
+ status_code = http_response.status
1286
+ response_content = http_response.body
1287
+ unless status_code == 200
1288
+ error_model = JSON.load(response_content)
1289
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1290
+ end
1291
+
1292
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1293
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1294
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1295
+ # Deserialize Response
1296
+ if status_code == 200
1297
+ begin
1298
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1299
+ result_mapper = Azure::EventGrid::Mgmt::V2019_01_01::Models::EventSubscriptionsListResult.mapper()
1300
+ result.body = @client.deserialize(result_mapper, parsed_response)
1301
+ rescue Exception => e
1302
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1303
+ end
1304
+ end
1305
+
1306
+ result
1307
+ end
1308
+
1309
+ promise.execute
1310
+ end
1311
+
1312
+ #
1313
+ # List all event subscriptions for a specific topic
1314
+ #
1315
+ # List all event subscriptions that have been created for a specific topic
1316
+ #
1317
+ # @param resource_group_name [String] The name of the resource group within the
1318
+ # user's subscription.
1319
+ # @param provider_namespace [String] Namespace of the provider of the topic
1320
+ # @param resource_type_name [String] Name of the resource type
1321
+ # @param resource_name [String] Name of the resource
1322
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1323
+ # will be added to the HTTP request.
1324
+ #
1325
+ # @return [EventSubscriptionsListResult] operation results.
1326
+ #
1327
+ def list_by_resource(resource_group_name, provider_namespace, resource_type_name, resource_name, custom_headers:nil)
1328
+ response = list_by_resource_async(resource_group_name, provider_namespace, resource_type_name, resource_name, custom_headers:custom_headers).value!
1329
+ response.body unless response.nil?
1330
+ end
1331
+
1332
+ #
1333
+ # List all event subscriptions for a specific topic
1334
+ #
1335
+ # List all event subscriptions that have been created for a specific topic
1336
+ #
1337
+ # @param resource_group_name [String] The name of the resource group within the
1338
+ # user's subscription.
1339
+ # @param provider_namespace [String] Namespace of the provider of the topic
1340
+ # @param resource_type_name [String] Name of the resource type
1341
+ # @param resource_name [String] Name of the resource
1342
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1343
+ # will be added to the HTTP request.
1344
+ #
1345
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1346
+ #
1347
+ def list_by_resource_with_http_info(resource_group_name, provider_namespace, resource_type_name, resource_name, custom_headers:nil)
1348
+ list_by_resource_async(resource_group_name, provider_namespace, resource_type_name, resource_name, custom_headers:custom_headers).value!
1349
+ end
1350
+
1351
+ #
1352
+ # List all event subscriptions for a specific topic
1353
+ #
1354
+ # List all event subscriptions that have been created for a specific topic
1355
+ #
1356
+ # @param resource_group_name [String] The name of the resource group within the
1357
+ # user's subscription.
1358
+ # @param provider_namespace [String] Namespace of the provider of the topic
1359
+ # @param resource_type_name [String] Name of the resource type
1360
+ # @param resource_name [String] Name of the resource
1361
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1362
+ # to the HTTP request.
1363
+ #
1364
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1365
+ #
1366
+ def list_by_resource_async(resource_group_name, provider_namespace, resource_type_name, resource_name, custom_headers:nil)
1367
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1368
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1369
+ fail ArgumentError, 'provider_namespace is nil' if provider_namespace.nil?
1370
+ fail ArgumentError, 'resource_type_name is nil' if resource_type_name.nil?
1371
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
1372
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1373
+
1374
+
1375
+ request_headers = {}
1376
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1377
+
1378
+ # Set Headers
1379
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1380
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1381
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{providerNamespace}/{resourceTypeName}/{resourceName}/providers/Microsoft.EventGrid/eventSubscriptions'
1382
+
1383
+ request_url = @base_url || @client.base_url
1384
+
1385
+ options = {
1386
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1387
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'providerNamespace' => provider_namespace,'resourceTypeName' => resource_type_name,'resourceName' => resource_name},
1388
+ query_params: {'api-version' => @client.api_version},
1389
+ headers: request_headers.merge(custom_headers || {}),
1390
+ base_url: request_url
1391
+ }
1392
+ promise = @client.make_request_async(:get, path_template, options)
1393
+
1394
+ promise = promise.then do |result|
1395
+ http_response = result.response
1396
+ status_code = http_response.status
1397
+ response_content = http_response.body
1398
+ unless status_code == 200
1399
+ error_model = JSON.load(response_content)
1400
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1401
+ end
1402
+
1403
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1404
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1405
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1406
+ # Deserialize Response
1407
+ if status_code == 200
1408
+ begin
1409
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1410
+ result_mapper = Azure::EventGrid::Mgmt::V2019_01_01::Models::EventSubscriptionsListResult.mapper()
1411
+ result.body = @client.deserialize(result_mapper, parsed_response)
1412
+ rescue Exception => e
1413
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1414
+ end
1415
+ end
1416
+
1417
+ result
1418
+ end
1419
+
1420
+ promise.execute
1421
+ end
1422
+
1423
+ #
1424
+ # Create or update an event subscription
1425
+ #
1426
+ # Asynchronously creates a new event subscription or updates an existing event
1427
+ # subscription based on the specified scope.
1428
+ #
1429
+ # @param scope [String] The identifier of the resource to which the event
1430
+ # subscription needs to be created or updated. The scope can be a subscription,
1431
+ # or a resource group, or a top level resource belonging to a resource provider
1432
+ # namespace, or an EventGrid topic. For example, use
1433
+ # '/subscriptions/{subscriptionId}/' for a subscription,
1434
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
1435
+ # resource group, and
1436
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
1437
+ # for a resource, and
1438
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
1439
+ # for an EventGrid topic.
1440
+ # @param event_subscription_name [String] Name of the event subscription. Event
1441
+ # subscription names must be between 3 and 64 characters in length and should
1442
+ # use alphanumeric letters only.
1443
+ # @param event_subscription_info [EventSubscription] Event subscription
1444
+ # properties containing the destination and filter information
1445
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1446
+ # will be added to the HTTP request.
1447
+ #
1448
+ # @return [EventSubscription] operation results.
1449
+ #
1450
+ def begin_create_or_update(scope, event_subscription_name, event_subscription_info, custom_headers:nil)
1451
+ response = begin_create_or_update_async(scope, event_subscription_name, event_subscription_info, custom_headers:custom_headers).value!
1452
+ response.body unless response.nil?
1453
+ end
1454
+
1455
+ #
1456
+ # Create or update an event subscription
1457
+ #
1458
+ # Asynchronously creates a new event subscription or updates an existing event
1459
+ # subscription based on the specified scope.
1460
+ #
1461
+ # @param scope [String] The identifier of the resource to which the event
1462
+ # subscription needs to be created or updated. The scope can be a subscription,
1463
+ # or a resource group, or a top level resource belonging to a resource provider
1464
+ # namespace, or an EventGrid topic. For example, use
1465
+ # '/subscriptions/{subscriptionId}/' for a subscription,
1466
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
1467
+ # resource group, and
1468
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
1469
+ # for a resource, and
1470
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
1471
+ # for an EventGrid topic.
1472
+ # @param event_subscription_name [String] Name of the event subscription. Event
1473
+ # subscription names must be between 3 and 64 characters in length and should
1474
+ # use alphanumeric letters only.
1475
+ # @param event_subscription_info [EventSubscription] Event subscription
1476
+ # properties containing the destination and filter information
1477
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1478
+ # will be added to the HTTP request.
1479
+ #
1480
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1481
+ #
1482
+ def begin_create_or_update_with_http_info(scope, event_subscription_name, event_subscription_info, custom_headers:nil)
1483
+ begin_create_or_update_async(scope, event_subscription_name, event_subscription_info, custom_headers:custom_headers).value!
1484
+ end
1485
+
1486
+ #
1487
+ # Create or update an event subscription
1488
+ #
1489
+ # Asynchronously creates a new event subscription or updates an existing event
1490
+ # subscription based on the specified scope.
1491
+ #
1492
+ # @param scope [String] The identifier of the resource to which the event
1493
+ # subscription needs to be created or updated. The scope can be a subscription,
1494
+ # or a resource group, or a top level resource belonging to a resource provider
1495
+ # namespace, or an EventGrid topic. For example, use
1496
+ # '/subscriptions/{subscriptionId}/' for a subscription,
1497
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
1498
+ # resource group, and
1499
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
1500
+ # for a resource, and
1501
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
1502
+ # for an EventGrid topic.
1503
+ # @param event_subscription_name [String] Name of the event subscription. Event
1504
+ # subscription names must be between 3 and 64 characters in length and should
1505
+ # use alphanumeric letters only.
1506
+ # @param event_subscription_info [EventSubscription] Event subscription
1507
+ # properties containing the destination and filter information
1508
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1509
+ # to the HTTP request.
1510
+ #
1511
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1512
+ #
1513
+ def begin_create_or_update_async(scope, event_subscription_name, event_subscription_info, custom_headers:nil)
1514
+ fail ArgumentError, 'scope is nil' if scope.nil?
1515
+ fail ArgumentError, 'event_subscription_name is nil' if event_subscription_name.nil?
1516
+ fail ArgumentError, 'event_subscription_info is nil' if event_subscription_info.nil?
1517
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1518
+
1519
+
1520
+ request_headers = {}
1521
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1522
+
1523
+ # Set Headers
1524
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1525
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1526
+
1527
+ # Serialize Request
1528
+ request_mapper = Azure::EventGrid::Mgmt::V2019_01_01::Models::EventSubscription.mapper()
1529
+ request_content = @client.serialize(request_mapper, event_subscription_info)
1530
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1531
+
1532
+ path_template = '{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}'
1533
+
1534
+ request_url = @base_url || @client.base_url
1535
+
1536
+ options = {
1537
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1538
+ path_params: {'eventSubscriptionName' => event_subscription_name},
1539
+ skip_encoding_path_params: {'scope' => scope},
1540
+ query_params: {'api-version' => @client.api_version},
1541
+ body: request_content,
1542
+ headers: request_headers.merge(custom_headers || {}),
1543
+ base_url: request_url
1544
+ }
1545
+ promise = @client.make_request_async(:put, path_template, options)
1546
+
1547
+ promise = promise.then do |result|
1548
+ http_response = result.response
1549
+ status_code = http_response.status
1550
+ response_content = http_response.body
1551
+ unless status_code == 201
1552
+ error_model = JSON.load(response_content)
1553
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1554
+ end
1555
+
1556
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1557
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1558
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1559
+ # Deserialize Response
1560
+ if status_code == 201
1561
+ begin
1562
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1563
+ result_mapper = Azure::EventGrid::Mgmt::V2019_01_01::Models::EventSubscription.mapper()
1564
+ result.body = @client.deserialize(result_mapper, parsed_response)
1565
+ rescue Exception => e
1566
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1567
+ end
1568
+ end
1569
+
1570
+ result
1571
+ end
1572
+
1573
+ promise.execute
1574
+ end
1575
+
1576
+ #
1577
+ # Delete an event subscription
1578
+ #
1579
+ # Delete an existing event subscription
1580
+ #
1581
+ # @param scope [String] The scope of the event subscription. The scope can be a
1582
+ # subscription, or a resource group, or a top level resource belonging to a
1583
+ # resource provider namespace, or an EventGrid topic. For example, use
1584
+ # '/subscriptions/{subscriptionId}/' for a subscription,
1585
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
1586
+ # resource group, and
1587
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
1588
+ # for a resource, and
1589
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
1590
+ # for an EventGrid topic.
1591
+ # @param event_subscription_name [String] Name of the event subscription
1592
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1593
+ # will be added to the HTTP request.
1594
+ #
1595
+ #
1596
+ def begin_delete(scope, event_subscription_name, custom_headers:nil)
1597
+ response = begin_delete_async(scope, event_subscription_name, custom_headers:custom_headers).value!
1598
+ nil
1599
+ end
1600
+
1601
+ #
1602
+ # Delete an event subscription
1603
+ #
1604
+ # Delete an existing event subscription
1605
+ #
1606
+ # @param scope [String] The scope of the event subscription. The scope can be a
1607
+ # subscription, or a resource group, or a top level resource belonging to a
1608
+ # resource provider namespace, or an EventGrid topic. For example, use
1609
+ # '/subscriptions/{subscriptionId}/' for a subscription,
1610
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
1611
+ # resource group, and
1612
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
1613
+ # for a resource, and
1614
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
1615
+ # for an EventGrid topic.
1616
+ # @param event_subscription_name [String] Name of the event subscription
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 begin_delete_with_http_info(scope, event_subscription_name, custom_headers:nil)
1623
+ begin_delete_async(scope, event_subscription_name, custom_headers:custom_headers).value!
1624
+ end
1625
+
1626
+ #
1627
+ # Delete an event subscription
1628
+ #
1629
+ # Delete an existing event subscription
1630
+ #
1631
+ # @param scope [String] The scope of the event subscription. The scope can be a
1632
+ # subscription, or a resource group, or a top level resource belonging to a
1633
+ # resource provider namespace, or an EventGrid topic. For example, use
1634
+ # '/subscriptions/{subscriptionId}/' for a subscription,
1635
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
1636
+ # resource group, and
1637
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
1638
+ # for a resource, and
1639
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
1640
+ # for an EventGrid topic.
1641
+ # @param event_subscription_name [String] Name of the event subscription
1642
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1643
+ # to the HTTP request.
1644
+ #
1645
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1646
+ #
1647
+ def begin_delete_async(scope, event_subscription_name, custom_headers:nil)
1648
+ fail ArgumentError, 'scope is nil' if scope.nil?
1649
+ fail ArgumentError, 'event_subscription_name is nil' if event_subscription_name.nil?
1650
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1651
+
1652
+
1653
+ request_headers = {}
1654
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1655
+
1656
+ # Set Headers
1657
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1658
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1659
+ path_template = '{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}'
1660
+
1661
+ request_url = @base_url || @client.base_url
1662
+
1663
+ options = {
1664
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1665
+ path_params: {'eventSubscriptionName' => event_subscription_name},
1666
+ skip_encoding_path_params: {'scope' => scope},
1667
+ query_params: {'api-version' => @client.api_version},
1668
+ headers: request_headers.merge(custom_headers || {}),
1669
+ base_url: request_url
1670
+ }
1671
+ promise = @client.make_request_async(:delete, path_template, options)
1672
+
1673
+ promise = promise.then do |result|
1674
+ http_response = result.response
1675
+ status_code = http_response.status
1676
+ response_content = http_response.body
1677
+ unless status_code == 200 || status_code == 202 || status_code == 204
1678
+ error_model = JSON.load(response_content)
1679
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1680
+ end
1681
+
1682
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1683
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1684
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1685
+
1686
+ result
1687
+ end
1688
+
1689
+ promise.execute
1690
+ end
1691
+
1692
+ #
1693
+ # Update an event subscription
1694
+ #
1695
+ # Asynchronously updates an existing event subscription.
1696
+ #
1697
+ # @param scope [String] The scope of existing event subscription. The scope can
1698
+ # be a subscription, or a resource group, or a top level resource belonging to
1699
+ # a resource provider namespace, or an EventGrid topic. For example, use
1700
+ # '/subscriptions/{subscriptionId}/' for a subscription,
1701
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
1702
+ # resource group, and
1703
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
1704
+ # for a resource, and
1705
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
1706
+ # for an EventGrid topic.
1707
+ # @param event_subscription_name [String] Name of the event subscription to be
1708
+ # updated
1709
+ # @param event_subscription_update_parameters
1710
+ # [EventSubscriptionUpdateParameters] Updated event subscription information
1711
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1712
+ # will be added to the HTTP request.
1713
+ #
1714
+ # @return [EventSubscription] operation results.
1715
+ #
1716
+ def begin_update(scope, event_subscription_name, event_subscription_update_parameters, custom_headers:nil)
1717
+ response = begin_update_async(scope, event_subscription_name, event_subscription_update_parameters, custom_headers:custom_headers).value!
1718
+ response.body unless response.nil?
1719
+ end
1720
+
1721
+ #
1722
+ # Update an event subscription
1723
+ #
1724
+ # Asynchronously updates an existing event subscription.
1725
+ #
1726
+ # @param scope [String] The scope of existing event subscription. The scope can
1727
+ # be a subscription, or a resource group, or a top level resource belonging to
1728
+ # a resource provider namespace, or an EventGrid topic. For example, use
1729
+ # '/subscriptions/{subscriptionId}/' for a subscription,
1730
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
1731
+ # resource group, and
1732
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
1733
+ # for a resource, and
1734
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
1735
+ # for an EventGrid topic.
1736
+ # @param event_subscription_name [String] Name of the event subscription to be
1737
+ # updated
1738
+ # @param event_subscription_update_parameters
1739
+ # [EventSubscriptionUpdateParameters] Updated event subscription information
1740
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1741
+ # will be added to the HTTP request.
1742
+ #
1743
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1744
+ #
1745
+ def begin_update_with_http_info(scope, event_subscription_name, event_subscription_update_parameters, custom_headers:nil)
1746
+ begin_update_async(scope, event_subscription_name, event_subscription_update_parameters, custom_headers:custom_headers).value!
1747
+ end
1748
+
1749
+ #
1750
+ # Update an event subscription
1751
+ #
1752
+ # Asynchronously updates an existing event subscription.
1753
+ #
1754
+ # @param scope [String] The scope of existing event subscription. The scope can
1755
+ # be a subscription, or a resource group, or a top level resource belonging to
1756
+ # a resource provider namespace, or an EventGrid topic. For example, use
1757
+ # '/subscriptions/{subscriptionId}/' for a subscription,
1758
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a
1759
+ # resource group, and
1760
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
1761
+ # for a resource, and
1762
+ # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'
1763
+ # for an EventGrid topic.
1764
+ # @param event_subscription_name [String] Name of the event subscription to be
1765
+ # updated
1766
+ # @param event_subscription_update_parameters
1767
+ # [EventSubscriptionUpdateParameters] Updated event subscription information
1768
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1769
+ # to the HTTP request.
1770
+ #
1771
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1772
+ #
1773
+ def begin_update_async(scope, event_subscription_name, event_subscription_update_parameters, custom_headers:nil)
1774
+ fail ArgumentError, 'scope is nil' if scope.nil?
1775
+ fail ArgumentError, 'event_subscription_name is nil' if event_subscription_name.nil?
1776
+ fail ArgumentError, 'event_subscription_update_parameters is nil' if event_subscription_update_parameters.nil?
1777
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1778
+
1779
+
1780
+ request_headers = {}
1781
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1782
+
1783
+ # Set Headers
1784
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1785
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1786
+
1787
+ # Serialize Request
1788
+ request_mapper = Azure::EventGrid::Mgmt::V2019_01_01::Models::EventSubscriptionUpdateParameters.mapper()
1789
+ request_content = @client.serialize(request_mapper, event_subscription_update_parameters)
1790
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1791
+
1792
+ path_template = '{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}'
1793
+
1794
+ request_url = @base_url || @client.base_url
1795
+
1796
+ options = {
1797
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1798
+ path_params: {'eventSubscriptionName' => event_subscription_name},
1799
+ skip_encoding_path_params: {'scope' => scope},
1800
+ query_params: {'api-version' => @client.api_version},
1801
+ body: request_content,
1802
+ headers: request_headers.merge(custom_headers || {}),
1803
+ base_url: request_url
1804
+ }
1805
+ promise = @client.make_request_async(:patch, path_template, options)
1806
+
1807
+ promise = promise.then do |result|
1808
+ http_response = result.response
1809
+ status_code = http_response.status
1810
+ response_content = http_response.body
1811
+ unless status_code == 201
1812
+ error_model = JSON.load(response_content)
1813
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1814
+ end
1815
+
1816
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1817
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1818
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1819
+ # Deserialize Response
1820
+ if status_code == 201
1821
+ begin
1822
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1823
+ result_mapper = Azure::EventGrid::Mgmt::V2019_01_01::Models::EventSubscription.mapper()
1824
+ result.body = @client.deserialize(result_mapper, parsed_response)
1825
+ rescue Exception => e
1826
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1827
+ end
1828
+ end
1829
+
1830
+ result
1831
+ end
1832
+
1833
+ promise.execute
1834
+ end
1835
+
1836
+ end
1837
+ end