azure_mgmt_event_grid 0.20.2 → 0.21.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (163) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  3. data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  4. data/lib/2018-01-01/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  5. data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  6. data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  7. data/lib/2019-01-01/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  8. data/lib/2019-02-01-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  9. data/lib/2019-06-01/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  10. data/lib/2020-01-01-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  11. data/lib/2020-04-01-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  12. data/lib/2020-06-01/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
  13. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid.rb +171 -0
  14. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/domain_topics.rb +699 -0
  15. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/domains.rb +1328 -0
  16. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_channels.rb +658 -0
  17. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb +194 -0
  18. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb +3775 -0
  19. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/extension_topics.rb +141 -0
  20. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/advanced_filter.rb +81 -0
  21. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/azure_function_event_subscription_destination.rb +112 -0
  22. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/bool_equals_advanced_filter.rb +69 -0
  23. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/connection_state.rb +69 -0
  24. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/created_by_type.rb +18 -0
  25. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/dead_letter_destination.rb +50 -0
  26. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/dead_letter_with_resource_identity.rb +66 -0
  27. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/delivery_attribute_list_result.rb +58 -0
  28. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/delivery_attribute_mapping.rb +58 -0
  29. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/delivery_with_resource_identity.rb +67 -0
  30. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/domain.rb +253 -0
  31. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/domain_provisioning_state.rb +20 -0
  32. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/domain_regenerate_key_request.rb +46 -0
  33. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/domain_shared_access_keys.rb +57 -0
  34. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/domain_topic.rb +89 -0
  35. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/domain_topic_provisioning_state.rb +20 -0
  36. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/domain_topics_list_result.rb +98 -0
  37. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/domain_update_parameters.rb +117 -0
  38. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/domains_list_result.rb +98 -0
  39. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/dynamic_delivery_attribute_mapping.rb +69 -0
  40. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_channel.rb +172 -0
  41. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_channel_destination.rb +75 -0
  42. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_channel_filter.rb +70 -0
  43. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_channel_provisioning_state.rb +20 -0
  44. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_channel_source.rb +48 -0
  45. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_channels_list_result.rb +98 -0
  46. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_delivery_schema.rb +17 -0
  47. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_hub_event_subscription_destination.rb +84 -0
  48. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_subscription.rb +244 -0
  49. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_destination.rb +52 -0
  50. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_filter.rb +132 -0
  51. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_full_url.rb +47 -0
  52. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_identity.rb +61 -0
  53. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_identity_type.rb +16 -0
  54. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_provisioning_state.rb +21 -0
  55. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_update_parameters.rb +176 -0
  56. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_subscriptions_list_result.rb +98 -0
  57. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_type.rb +106 -0
  58. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/event_types_list_result.rb +55 -0
  59. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/extended_location.rb +57 -0
  60. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/extension_topic.rb +86 -0
  61. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/hybrid_connection_event_subscription_destination.rb +86 -0
  62. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/identity_info.rb +96 -0
  63. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/identity_type.rb +18 -0
  64. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/inbound_ip_rule.rb +59 -0
  65. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/input_schema.rb +17 -0
  66. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/input_schema_mapping.rb +49 -0
  67. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/ip_action_type.rb +15 -0
  68. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/is_not_null_advanced_filter.rb +58 -0
  69. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/is_null_or_undefined_advanced_filter.rb +58 -0
  70. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/json_field.rb +50 -0
  71. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/json_field_with_default.rb +67 -0
  72. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/json_input_schema_mapping.rb +130 -0
  73. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/number_greater_than_advanced_filter.rb +69 -0
  74. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/number_greater_than_or_equals_advanced_filter.rb +69 -0
  75. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/number_in_advanced_filter.rb +77 -0
  76. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/number_in_range_advanced_filter.rb +85 -0
  77. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/number_less_than_advanced_filter.rb +69 -0
  78. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/number_less_than_or_equals_advanced_filter.rb +69 -0
  79. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/number_not_in_advanced_filter.rb +77 -0
  80. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/number_not_in_range_advanced_filter.rb +85 -0
  81. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/operation.rb +80 -0
  82. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/operation_info.rb +79 -0
  83. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/operations_list_result.rb +55 -0
  84. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_namespace.rb +140 -0
  85. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_namespace_provisioning_state.rb +20 -0
  86. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_namespace_regenerate_key_request.rb +46 -0
  87. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_namespace_shared_access_keys.rb +57 -0
  88. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_namespace_update_parameters.rb +54 -0
  89. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_namespaces_list_result.rb +98 -0
  90. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_registration.rb +278 -0
  91. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_registration_event_types_list_result.rb +68 -0
  92. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_registration_provisioning_state.rb +20 -0
  93. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_registration_update_parameters.rb +137 -0
  94. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_registration_visibility_state.rb +17 -0
  95. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_registrations_list_result.rb +99 -0
  96. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_topic.rb +179 -0
  97. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_topic_activation_state.rb +17 -0
  98. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_topic_provisioning_state.rb +20 -0
  99. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_topic_readiness_state.rb +18 -0
  100. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_topic_type.rb +134 -0
  101. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_topic_type_authorization_state.rb +17 -0
  102. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_topic_types_list_result.rb +55 -0
  103. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_topic_update_parameters.rb +54 -0
  104. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/partner_topics_list_result.rb +98 -0
  105. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/persisted_connection_status.rb +18 -0
  106. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/private_endpoint.rb +46 -0
  107. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/private_endpoint_connection.rb +121 -0
  108. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/private_endpoint_connection_list_result.rb +100 -0
  109. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/private_link_resource.rb +128 -0
  110. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/private_link_resources_list_result.rb +99 -0
  111. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/public_network_access.rb +16 -0
  112. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/resource.rb +80 -0
  113. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/resource_kind.rb +16 -0
  114. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/resource_provisioning_state.rb +20 -0
  115. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/resource_region_type.rb +16 -0
  116. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/resource_sku.rb +47 -0
  117. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/retry_policy.rb +61 -0
  118. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/service_bus_queue_event_subscription_destination.rb +85 -0
  119. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/service_bus_topic_event_subscription_destination.rb +86 -0
  120. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/sku.rb +16 -0
  121. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/static_delivery_attribute_mapping.rb +81 -0
  122. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/storage_blob_dead_letter_destination.rb +74 -0
  123. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/storage_queue_event_subscription_destination.rb +86 -0
  124. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/string_begins_with_advanced_filter.rb +77 -0
  125. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/string_contains_advanced_filter.rb +77 -0
  126. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/string_ends_with_advanced_filter.rb +77 -0
  127. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/string_in_advanced_filter.rb +77 -0
  128. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/string_not_begins_with_advanced_filter.rb +77 -0
  129. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/string_not_contains_advanced_filter.rb +77 -0
  130. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/string_not_ends_with_advanced_filter.rb +77 -0
  131. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/string_not_in_advanced_filter.rb +77 -0
  132. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/system_data.rb +105 -0
  133. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/system_topic.rb +159 -0
  134. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/system_topic_update_parameters.rb +66 -0
  135. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/system_topics_list_result.rb +98 -0
  136. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/topic.rb +278 -0
  137. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/topic_provisioning_state.rb +20 -0
  138. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/topic_regenerate_key_request.rb +46 -0
  139. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/topic_shared_access_keys.rb +57 -0
  140. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/topic_type_info.rb +169 -0
  141. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/topic_type_provisioning_state.rb +20 -0
  142. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/topic_types_list_result.rb +55 -0
  143. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/topic_update_parameters.rb +117 -0
  144. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/topics_list_result.rb +98 -0
  145. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/tracked_resource.rb +92 -0
  146. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/user_identity_properties.rb +57 -0
  147. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/models/web_hook_event_subscription_destination.rb +148 -0
  148. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/module_definition.rb +9 -0
  149. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/operations.rb +118 -0
  150. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/partner_namespaces.rb +1333 -0
  151. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/partner_registrations.rb +1074 -0
  152. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/partner_topic_event_subscriptions.rb +1156 -0
  153. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/partner_topics.rb +1102 -0
  154. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/private_endpoint_connections.rb +791 -0
  155. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/private_link_resources.rb +423 -0
  156. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/system_topic_event_subscriptions.rb +1152 -0
  157. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/system_topics.rb +1128 -0
  158. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/topic_types.rb +305 -0
  159. data/lib/2020-10-15-preview/generated/azure_mgmt_event_grid/topics.rb +1489 -0
  160. data/lib/azure_mgmt_event_grid.rb +8 -7
  161. data/lib/profiles/latest/modules/eventgrid_profile_module.rb +417 -181
  162. data/lib/version.rb +1 -1
  163. metadata +150 -3
@@ -0,0 +1,423 @@
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::V2020_10_15_preview
7
+ #
8
+ # Azure EventGrid Management Client
9
+ #
10
+ class PrivateLinkResources
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the PrivateLinkResources 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 a private link resource.
26
+ #
27
+ # Get properties of a private link resource.
28
+ #
29
+ # @param resource_group_name [String] The name of the resource group within the
30
+ # user's subscription.
31
+ # @param parent_type [String] The type of the parent resource. This can be
32
+ # either \'topics\' or \'domains\'.
33
+ # @param parent_name [String] The name of the parent resource (namely, either,
34
+ # the topic name or domain name).
35
+ # @param private_link_resource_name [String] The name of private link resource.
36
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
37
+ # will be added to the HTTP request.
38
+ #
39
+ # @return [PrivateLinkResource] operation results.
40
+ #
41
+ def get(resource_group_name, parent_type, parent_name, private_link_resource_name, custom_headers:nil)
42
+ response = get_async(resource_group_name, parent_type, parent_name, private_link_resource_name, custom_headers:custom_headers).value!
43
+ response.body unless response.nil?
44
+ end
45
+
46
+ #
47
+ # Get a private link resource.
48
+ #
49
+ # Get properties of a private link resource.
50
+ #
51
+ # @param resource_group_name [String] The name of the resource group within the
52
+ # user's subscription.
53
+ # @param parent_type [String] The type of the parent resource. This can be
54
+ # either \'topics\' or \'domains\'.
55
+ # @param parent_name [String] The name of the parent resource (namely, either,
56
+ # the topic name or domain name).
57
+ # @param private_link_resource_name [String] The name of private link resource.
58
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
59
+ # will be added to the HTTP request.
60
+ #
61
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
62
+ #
63
+ def get_with_http_info(resource_group_name, parent_type, parent_name, private_link_resource_name, custom_headers:nil)
64
+ get_async(resource_group_name, parent_type, parent_name, private_link_resource_name, custom_headers:custom_headers).value!
65
+ end
66
+
67
+ #
68
+ # Get a private link resource.
69
+ #
70
+ # Get properties of a private link resource.
71
+ #
72
+ # @param resource_group_name [String] The name of the resource group within the
73
+ # user's subscription.
74
+ # @param parent_type [String] The type of the parent resource. This can be
75
+ # either \'topics\' or \'domains\'.
76
+ # @param parent_name [String] The name of the parent resource (namely, either,
77
+ # the topic name or domain name).
78
+ # @param private_link_resource_name [String] The name of private link resource.
79
+ # @param [Hash{String => String}] A hash of custom headers that will be added
80
+ # to the HTTP request.
81
+ #
82
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
83
+ #
84
+ def get_async(resource_group_name, parent_type, parent_name, private_link_resource_name, custom_headers:nil)
85
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
86
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
87
+ fail ArgumentError, 'parent_type is nil' if parent_type.nil?
88
+ fail ArgumentError, 'parent_name is nil' if parent_name.nil?
89
+ fail ArgumentError, 'private_link_resource_name is nil' if private_link_resource_name.nil?
90
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
91
+
92
+
93
+ request_headers = {}
94
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
95
+
96
+ # Set Headers
97
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
98
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
99
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{parentType}/{parentName}/privateLinkResources/{privateLinkResourceName}'
100
+
101
+ request_url = @base_url || @client.base_url
102
+
103
+ options = {
104
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
105
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'parentType' => parent_type,'parentName' => parent_name,'privateLinkResourceName' => private_link_resource_name},
106
+ query_params: {'api-version' => @client.api_version},
107
+ headers: request_headers.merge(custom_headers || {}),
108
+ base_url: request_url
109
+ }
110
+ promise = @client.make_request_async(:get, path_template, options)
111
+
112
+ promise = promise.then do |result|
113
+ http_response = result.response
114
+ status_code = http_response.status
115
+ response_content = http_response.body
116
+ unless status_code == 200
117
+ error_model = JSON.load(response_content)
118
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
119
+ end
120
+
121
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
122
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
123
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
124
+ # Deserialize Response
125
+ if status_code == 200
126
+ begin
127
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
128
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::PrivateLinkResource.mapper()
129
+ result.body = @client.deserialize(result_mapper, parsed_response)
130
+ rescue Exception => e
131
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
132
+ end
133
+ end
134
+
135
+ result
136
+ end
137
+
138
+ promise.execute
139
+ end
140
+
141
+ #
142
+ # List private link resources under specific topic or domain.
143
+ #
144
+ # List all the private link resources under a topic or domain.
145
+ #
146
+ # @param resource_group_name [String] The name of the resource group within the
147
+ # user's subscription.
148
+ # @param parent_type [String] The type of the parent resource. This can be
149
+ # either \'topics\' or \'domains\'.
150
+ # @param parent_name [String] The name of the parent resource (namely, either,
151
+ # the topic name or domain name).
152
+ # @param filter [String] The query used to filter the search results using
153
+ # OData syntax. Filtering is permitted on the 'name' property only and with
154
+ # limited number of OData operations. These operations are: the 'contains'
155
+ # function as well as the following logical operations: not, and, or, eq (for
156
+ # equal), and ne (for not equal). No arithmetic operations are supported. The
157
+ # following is a valid filter example: $filter=contains(namE, 'PATTERN') and
158
+ # name ne 'PATTERN-1'. The following is not a valid filter example:
159
+ # $filter=location eq 'westus'.
160
+ # @param top [Integer] The number of results to return per page for the list
161
+ # operation. Valid range for top parameter is 1 to 100. If not specified, the
162
+ # default number of results to be returned is 20 items per page.
163
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
164
+ # will be added to the HTTP request.
165
+ #
166
+ # @return [Array<PrivateLinkResource>] operation results.
167
+ #
168
+ def list_by_resource(resource_group_name, parent_type, parent_name, filter:nil, top:nil, custom_headers:nil)
169
+ first_page = list_by_resource_as_lazy(resource_group_name, parent_type, parent_name, filter:filter, top:top, custom_headers:custom_headers)
170
+ first_page.get_all_items
171
+ end
172
+
173
+ #
174
+ # List private link resources under specific topic or domain.
175
+ #
176
+ # List all the private link resources under a topic or domain.
177
+ #
178
+ # @param resource_group_name [String] The name of the resource group within the
179
+ # user's subscription.
180
+ # @param parent_type [String] The type of the parent resource. This can be
181
+ # either \'topics\' or \'domains\'.
182
+ # @param parent_name [String] The name of the parent resource (namely, either,
183
+ # the topic name or domain name).
184
+ # @param filter [String] The query used to filter the search results using
185
+ # OData syntax. Filtering is permitted on the 'name' property only and with
186
+ # limited number of OData operations. These operations are: the 'contains'
187
+ # function as well as the following logical operations: not, and, or, eq (for
188
+ # equal), and ne (for not equal). No arithmetic operations are supported. The
189
+ # following is a valid filter example: $filter=contains(namE, 'PATTERN') and
190
+ # name ne 'PATTERN-1'. The following is not a valid filter example:
191
+ # $filter=location eq 'westus'.
192
+ # @param top [Integer] The number of results to return per page for the list
193
+ # operation. Valid range for top parameter is 1 to 100. If not specified, the
194
+ # default number of results to be returned is 20 items per page.
195
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
196
+ # will be added to the HTTP request.
197
+ #
198
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
199
+ #
200
+ def list_by_resource_with_http_info(resource_group_name, parent_type, parent_name, filter:nil, top:nil, custom_headers:nil)
201
+ list_by_resource_async(resource_group_name, parent_type, parent_name, filter:filter, top:top, custom_headers:custom_headers).value!
202
+ end
203
+
204
+ #
205
+ # List private link resources under specific topic or domain.
206
+ #
207
+ # List all the private link resources under a topic or domain.
208
+ #
209
+ # @param resource_group_name [String] The name of the resource group within the
210
+ # user's subscription.
211
+ # @param parent_type [String] The type of the parent resource. This can be
212
+ # either \'topics\' or \'domains\'.
213
+ # @param parent_name [String] The name of the parent resource (namely, either,
214
+ # the topic name or domain name).
215
+ # @param filter [String] The query used to filter the search results using
216
+ # OData syntax. Filtering is permitted on the 'name' property only and with
217
+ # limited number of OData operations. These operations are: the 'contains'
218
+ # function as well as the following logical operations: not, and, or, eq (for
219
+ # equal), and ne (for not equal). No arithmetic operations are supported. The
220
+ # following is a valid filter example: $filter=contains(namE, 'PATTERN') and
221
+ # name ne 'PATTERN-1'. The following is not a valid filter example:
222
+ # $filter=location eq 'westus'.
223
+ # @param top [Integer] The number of results to return per page for the list
224
+ # operation. Valid range for top parameter is 1 to 100. If not specified, the
225
+ # default number of results to be returned is 20 items per page.
226
+ # @param [Hash{String => String}] A hash of custom headers that will be added
227
+ # to the HTTP request.
228
+ #
229
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
230
+ #
231
+ def list_by_resource_async(resource_group_name, parent_type, parent_name, filter:nil, top:nil, custom_headers:nil)
232
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
233
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
234
+ fail ArgumentError, 'parent_type is nil' if parent_type.nil?
235
+ fail ArgumentError, 'parent_name is nil' if parent_name.nil?
236
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
237
+
238
+
239
+ request_headers = {}
240
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
241
+
242
+ # Set Headers
243
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
244
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
245
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{parentType}/{parentName}/privateLinkResources'
246
+
247
+ request_url = @base_url || @client.base_url
248
+
249
+ options = {
250
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
251
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'parentType' => parent_type,'parentName' => parent_name},
252
+ query_params: {'api-version' => @client.api_version,'$filter' => filter,'$top' => top},
253
+ headers: request_headers.merge(custom_headers || {}),
254
+ base_url: request_url
255
+ }
256
+ promise = @client.make_request_async(:get, path_template, options)
257
+
258
+ promise = promise.then do |result|
259
+ http_response = result.response
260
+ status_code = http_response.status
261
+ response_content = http_response.body
262
+ unless status_code == 200
263
+ error_model = JSON.load(response_content)
264
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
265
+ end
266
+
267
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
268
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
269
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
270
+ # Deserialize Response
271
+ if status_code == 200
272
+ begin
273
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
274
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::PrivateLinkResourcesListResult.mapper()
275
+ result.body = @client.deserialize(result_mapper, parsed_response)
276
+ rescue Exception => e
277
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
278
+ end
279
+ end
280
+
281
+ result
282
+ end
283
+
284
+ promise.execute
285
+ end
286
+
287
+ #
288
+ # List private link resources under specific topic or domain.
289
+ #
290
+ # List all the private link resources under a topic or domain.
291
+ #
292
+ # @param next_page_link [String] The NextLink from the previous successful call
293
+ # to List operation.
294
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
295
+ # will be added to the HTTP request.
296
+ #
297
+ # @return [PrivateLinkResourcesListResult] operation results.
298
+ #
299
+ def list_by_resource_next(next_page_link, custom_headers:nil)
300
+ response = list_by_resource_next_async(next_page_link, custom_headers:custom_headers).value!
301
+ response.body unless response.nil?
302
+ end
303
+
304
+ #
305
+ # List private link resources under specific topic or domain.
306
+ #
307
+ # List all the private link resources under a topic or domain.
308
+ #
309
+ # @param next_page_link [String] The NextLink from the previous successful call
310
+ # to List operation.
311
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
312
+ # will be added to the HTTP request.
313
+ #
314
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
315
+ #
316
+ def list_by_resource_next_with_http_info(next_page_link, custom_headers:nil)
317
+ list_by_resource_next_async(next_page_link, custom_headers:custom_headers).value!
318
+ end
319
+
320
+ #
321
+ # List private link resources under specific topic or domain.
322
+ #
323
+ # List all the private link resources under a topic or domain.
324
+ #
325
+ # @param next_page_link [String] The NextLink from the previous successful call
326
+ # to List operation.
327
+ # @param [Hash{String => String}] A hash of custom headers that will be added
328
+ # to the HTTP request.
329
+ #
330
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
331
+ #
332
+ def list_by_resource_next_async(next_page_link, custom_headers:nil)
333
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
334
+
335
+
336
+ request_headers = {}
337
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
338
+
339
+ # Set Headers
340
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
341
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
342
+ path_template = '{nextLink}'
343
+
344
+ request_url = @base_url || @client.base_url
345
+
346
+ options = {
347
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
348
+ skip_encoding_path_params: {'nextLink' => next_page_link},
349
+ headers: request_headers.merge(custom_headers || {}),
350
+ base_url: request_url
351
+ }
352
+ promise = @client.make_request_async(:get, path_template, options)
353
+
354
+ promise = promise.then do |result|
355
+ http_response = result.response
356
+ status_code = http_response.status
357
+ response_content = http_response.body
358
+ unless status_code == 200
359
+ error_model = JSON.load(response_content)
360
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
361
+ end
362
+
363
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
364
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
365
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
366
+ # Deserialize Response
367
+ if status_code == 200
368
+ begin
369
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
370
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::PrivateLinkResourcesListResult.mapper()
371
+ result.body = @client.deserialize(result_mapper, parsed_response)
372
+ rescue Exception => e
373
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
374
+ end
375
+ end
376
+
377
+ result
378
+ end
379
+
380
+ promise.execute
381
+ end
382
+
383
+ #
384
+ # List private link resources under specific topic or domain.
385
+ #
386
+ # List all the private link resources under a topic or domain.
387
+ #
388
+ # @param resource_group_name [String] The name of the resource group within the
389
+ # user's subscription.
390
+ # @param parent_type [String] The type of the parent resource. This can be
391
+ # either \'topics\' or \'domains\'.
392
+ # @param parent_name [String] The name of the parent resource (namely, either,
393
+ # the topic name or domain name).
394
+ # @param filter [String] The query used to filter the search results using
395
+ # OData syntax. Filtering is permitted on the 'name' property only and with
396
+ # limited number of OData operations. These operations are: the 'contains'
397
+ # function as well as the following logical operations: not, and, or, eq (for
398
+ # equal), and ne (for not equal). No arithmetic operations are supported. The
399
+ # following is a valid filter example: $filter=contains(namE, 'PATTERN') and
400
+ # name ne 'PATTERN-1'. The following is not a valid filter example:
401
+ # $filter=location eq 'westus'.
402
+ # @param top [Integer] The number of results to return per page for the list
403
+ # operation. Valid range for top parameter is 1 to 100. If not specified, the
404
+ # default number of results to be returned is 20 items per page.
405
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
406
+ # will be added to the HTTP request.
407
+ #
408
+ # @return [PrivateLinkResourcesListResult] which provide lazy access to pages
409
+ # of the response.
410
+ #
411
+ def list_by_resource_as_lazy(resource_group_name, parent_type, parent_name, filter:nil, top:nil, custom_headers:nil)
412
+ response = list_by_resource_async(resource_group_name, parent_type, parent_name, filter:filter, top:top, custom_headers:custom_headers).value!
413
+ unless response.nil?
414
+ page = response.body
415
+ page.next_method = Proc.new do |next_page_link|
416
+ list_by_resource_next_async(next_page_link, custom_headers:custom_headers)
417
+ end
418
+ page
419
+ end
420
+ end
421
+
422
+ end
423
+ end
@@ -0,0 +1,1152 @@
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::V2020_10_15_preview
7
+ #
8
+ # Azure EventGrid Management Client
9
+ #
10
+ class SystemTopicEventSubscriptions
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the SystemTopicEventSubscriptions 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 of a system topic.
26
+ #
27
+ # Get an event subscription.
28
+ #
29
+ # @param resource_group_name [String] The name of the resource group within the
30
+ # user's subscription.
31
+ # @param system_topic_name [String] Name of the system topic.
32
+ # @param event_subscription_name [String] Name of the event subscription to be
33
+ # created. Event subscription names must be between 3 and 100 characters in
34
+ # length and use alphanumeric letters only.
35
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
36
+ # will be added to the HTTP request.
37
+ #
38
+ # @return [EventSubscription] operation results.
39
+ #
40
+ def get(resource_group_name, system_topic_name, event_subscription_name, custom_headers:nil)
41
+ response = get_async(resource_group_name, system_topic_name, event_subscription_name, custom_headers:custom_headers).value!
42
+ response.body unless response.nil?
43
+ end
44
+
45
+ #
46
+ # Get an event subscription of a system topic.
47
+ #
48
+ # Get an event subscription.
49
+ #
50
+ # @param resource_group_name [String] The name of the resource group within the
51
+ # user's subscription.
52
+ # @param system_topic_name [String] Name of the system topic.
53
+ # @param event_subscription_name [String] Name of the event subscription to be
54
+ # created. Event subscription names must be between 3 and 100 characters in
55
+ # length and use alphanumeric letters only.
56
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
57
+ # will be added to the HTTP request.
58
+ #
59
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
60
+ #
61
+ def get_with_http_info(resource_group_name, system_topic_name, event_subscription_name, custom_headers:nil)
62
+ get_async(resource_group_name, system_topic_name, event_subscription_name, custom_headers:custom_headers).value!
63
+ end
64
+
65
+ #
66
+ # Get an event subscription of a system topic.
67
+ #
68
+ # Get an event subscription.
69
+ #
70
+ # @param resource_group_name [String] The name of the resource group within the
71
+ # user's subscription.
72
+ # @param system_topic_name [String] Name of the system topic.
73
+ # @param event_subscription_name [String] Name of the event subscription to be
74
+ # created. Event subscription names must be between 3 and 100 characters in
75
+ # length and use alphanumeric letters only.
76
+ # @param [Hash{String => String}] A hash of custom headers that will be added
77
+ # to the HTTP request.
78
+ #
79
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
80
+ #
81
+ def get_async(resource_group_name, system_topic_name, event_subscription_name, custom_headers:nil)
82
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
83
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
84
+ fail ArgumentError, 'system_topic_name is nil' if system_topic_name.nil?
85
+ fail ArgumentError, 'event_subscription_name is nil' if event_subscription_name.nil?
86
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
87
+
88
+
89
+ request_headers = {}
90
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
91
+
92
+ # Set Headers
93
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
94
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
95
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}'
96
+
97
+ request_url = @base_url || @client.base_url
98
+
99
+ options = {
100
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
101
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'systemTopicName' => system_topic_name,'eventSubscriptionName' => event_subscription_name},
102
+ query_params: {'api-version' => @client.api_version},
103
+ headers: request_headers.merge(custom_headers || {}),
104
+ base_url: request_url
105
+ }
106
+ promise = @client.make_request_async(:get, path_template, options)
107
+
108
+ promise = promise.then do |result|
109
+ http_response = result.response
110
+ status_code = http_response.status
111
+ response_content = http_response.body
112
+ unless status_code == 200
113
+ error_model = JSON.load(response_content)
114
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
115
+ end
116
+
117
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
118
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
119
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
120
+ # Deserialize Response
121
+ if status_code == 200
122
+ begin
123
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
124
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscription.mapper()
125
+ result.body = @client.deserialize(result_mapper, parsed_response)
126
+ rescue Exception => e
127
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
128
+ end
129
+ end
130
+
131
+ result
132
+ end
133
+
134
+ promise.execute
135
+ end
136
+
137
+ #
138
+ # Create or update an event subscription for a system topic.
139
+ #
140
+ # Asynchronously creates or updates an event subscription with the specified
141
+ # parameters. Existing event subscriptions will be updated with this API.
142
+ #
143
+ # @param resource_group_name [String] The name of the resource group within the
144
+ # user's subscription.
145
+ # @param system_topic_name [String] Name of the system topic.
146
+ # @param event_subscription_name [String] Name of the event subscription to be
147
+ # created. Event subscription names must be between 3 and 100 characters in
148
+ # length and use alphanumeric letters only.
149
+ # @param event_subscription_info [EventSubscription] Event subscription
150
+ # properties containing the destination and filter information.
151
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
152
+ # will be added to the HTTP request.
153
+ #
154
+ # @return [EventSubscription] operation results.
155
+ #
156
+ def create_or_update(resource_group_name, system_topic_name, event_subscription_name, event_subscription_info, custom_headers:nil)
157
+ response = create_or_update_async(resource_group_name, system_topic_name, event_subscription_name, event_subscription_info, custom_headers:custom_headers).value!
158
+ response.body unless response.nil?
159
+ end
160
+
161
+ #
162
+ # @param resource_group_name [String] The name of the resource group within the
163
+ # user's subscription.
164
+ # @param system_topic_name [String] Name of the system topic.
165
+ # @param event_subscription_name [String] Name of the event subscription to be
166
+ # created. Event subscription names must be between 3 and 100 characters in
167
+ # length and use alphanumeric letters only.
168
+ # @param event_subscription_info [EventSubscription] Event subscription
169
+ # properties containing the destination and filter information.
170
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
171
+ # will be added to the HTTP request.
172
+ #
173
+ # @return [Concurrent::Promise] promise which provides async access to http
174
+ # response.
175
+ #
176
+ def create_or_update_async(resource_group_name, system_topic_name, event_subscription_name, event_subscription_info, custom_headers:nil)
177
+ # Send request
178
+ promise = begin_create_or_update_async(resource_group_name, system_topic_name, event_subscription_name, event_subscription_info, custom_headers:custom_headers)
179
+
180
+ promise = promise.then do |response|
181
+ # Defining deserialization method.
182
+ deserialize_method = lambda do |parsed_response|
183
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscription.mapper()
184
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
185
+ end
186
+
187
+ # Waiting for response.
188
+ @client.get_long_running_operation_result(response, deserialize_method)
189
+ end
190
+
191
+ promise
192
+ end
193
+
194
+ #
195
+ # Delete an event subscription of a system topic.
196
+ #
197
+ # Delete an event subscription of a system topic.
198
+ #
199
+ # @param resource_group_name [String] The name of the resource group within the
200
+ # user's subscription.
201
+ # @param system_topic_name [String] Name of the system topic.
202
+ # @param event_subscription_name [String] Name of the event subscription to be
203
+ # created. Event subscription names must be between 3 and 100 characters in
204
+ # length and use alphanumeric letters only.
205
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
206
+ # will be added to the HTTP request.
207
+ #
208
+ def delete(resource_group_name, system_topic_name, event_subscription_name, custom_headers:nil)
209
+ response = delete_async(resource_group_name, system_topic_name, event_subscription_name, custom_headers:custom_headers).value!
210
+ nil
211
+ end
212
+
213
+ #
214
+ # @param resource_group_name [String] The name of the resource group within the
215
+ # user's subscription.
216
+ # @param system_topic_name [String] Name of the system topic.
217
+ # @param event_subscription_name [String] Name of the event subscription to be
218
+ # created. Event subscription names must be between 3 and 100 characters in
219
+ # length and use alphanumeric letters only.
220
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
221
+ # will be added to the HTTP request.
222
+ #
223
+ # @return [Concurrent::Promise] promise which provides async access to http
224
+ # response.
225
+ #
226
+ def delete_async(resource_group_name, system_topic_name, event_subscription_name, custom_headers:nil)
227
+ # Send request
228
+ promise = begin_delete_async(resource_group_name, system_topic_name, event_subscription_name, custom_headers:custom_headers)
229
+
230
+ promise = promise.then do |response|
231
+ # Defining deserialization method.
232
+ deserialize_method = lambda do |parsed_response|
233
+ end
234
+
235
+ # Waiting for response.
236
+ @client.get_long_running_operation_result(response, deserialize_method)
237
+ end
238
+
239
+ promise
240
+ end
241
+
242
+ #
243
+ # Update event subscription of a system topic.
244
+ #
245
+ # Update event subscription of a system topic.
246
+ #
247
+ # @param resource_group_name [String] The name of the resource group within the
248
+ # user's subscription.
249
+ # @param system_topic_name [String] Name of the system topic.
250
+ # @param event_subscription_name [String] Name of the event subscription to be
251
+ # created. Event subscription names must be between 3 and 100 characters in
252
+ # length and use alphanumeric letters only.
253
+ # @param event_subscription_update_parameters
254
+ # [EventSubscriptionUpdateParameters] Updated event subscription information.
255
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
256
+ # will be added to the HTTP request.
257
+ #
258
+ # @return [EventSubscription] operation results.
259
+ #
260
+ def update(resource_group_name, system_topic_name, event_subscription_name, event_subscription_update_parameters, custom_headers:nil)
261
+ response = update_async(resource_group_name, system_topic_name, event_subscription_name, event_subscription_update_parameters, custom_headers:custom_headers).value!
262
+ response.body unless response.nil?
263
+ end
264
+
265
+ #
266
+ # @param resource_group_name [String] The name of the resource group within the
267
+ # user's subscription.
268
+ # @param system_topic_name [String] Name of the system topic.
269
+ # @param event_subscription_name [String] Name of the event subscription to be
270
+ # created. Event subscription names must be between 3 and 100 characters in
271
+ # length and use alphanumeric letters only.
272
+ # @param event_subscription_update_parameters
273
+ # [EventSubscriptionUpdateParameters] Updated event subscription information.
274
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
275
+ # will be added to the HTTP request.
276
+ #
277
+ # @return [Concurrent::Promise] promise which provides async access to http
278
+ # response.
279
+ #
280
+ def update_async(resource_group_name, system_topic_name, event_subscription_name, event_subscription_update_parameters, custom_headers:nil)
281
+ # Send request
282
+ promise = begin_update_async(resource_group_name, system_topic_name, event_subscription_name, event_subscription_update_parameters, custom_headers:custom_headers)
283
+
284
+ promise = promise.then do |response|
285
+ # Defining deserialization method.
286
+ deserialize_method = lambda do |parsed_response|
287
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscription.mapper()
288
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
289
+ end
290
+
291
+ # Waiting for response.
292
+ @client.get_long_running_operation_result(response, deserialize_method)
293
+ end
294
+
295
+ promise
296
+ end
297
+
298
+ #
299
+ # Get full URL of an event subscription of a system topic
300
+ #
301
+ # Get the full endpoint URL for an event subscription of a system topic.
302
+ #
303
+ # @param resource_group_name [String] The name of the resource group within the
304
+ # user's subscription.
305
+ # @param system_topic_name [String] Name of the system topic.
306
+ # @param event_subscription_name [String] Name of the event subscription to be
307
+ # created. Event subscription names must be between 3 and 100 characters in
308
+ # length and use alphanumeric letters only.
309
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
310
+ # will be added to the HTTP request.
311
+ #
312
+ # @return [EventSubscriptionFullUrl] operation results.
313
+ #
314
+ def get_full_url(resource_group_name, system_topic_name, event_subscription_name, custom_headers:nil)
315
+ response = get_full_url_async(resource_group_name, system_topic_name, event_subscription_name, custom_headers:custom_headers).value!
316
+ response.body unless response.nil?
317
+ end
318
+
319
+ #
320
+ # Get full URL of an event subscription of a system topic
321
+ #
322
+ # Get the full endpoint URL for an event subscription of a system topic.
323
+ #
324
+ # @param resource_group_name [String] The name of the resource group within the
325
+ # user's subscription.
326
+ # @param system_topic_name [String] Name of the system topic.
327
+ # @param event_subscription_name [String] Name of the event subscription to be
328
+ # created. Event subscription names must be between 3 and 100 characters in
329
+ # length and use alphanumeric letters only.
330
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
331
+ # will be added to the HTTP request.
332
+ #
333
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
334
+ #
335
+ def get_full_url_with_http_info(resource_group_name, system_topic_name, event_subscription_name, custom_headers:nil)
336
+ get_full_url_async(resource_group_name, system_topic_name, event_subscription_name, custom_headers:custom_headers).value!
337
+ end
338
+
339
+ #
340
+ # Get full URL of an event subscription of a system topic
341
+ #
342
+ # Get the full endpoint URL for an event subscription of a system topic.
343
+ #
344
+ # @param resource_group_name [String] The name of the resource group within the
345
+ # user's subscription.
346
+ # @param system_topic_name [String] Name of the system topic.
347
+ # @param event_subscription_name [String] Name of the event subscription to be
348
+ # created. Event subscription names must be between 3 and 100 characters in
349
+ # length and use alphanumeric letters only.
350
+ # @param [Hash{String => String}] A hash of custom headers that will be added
351
+ # to the HTTP request.
352
+ #
353
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
354
+ #
355
+ def get_full_url_async(resource_group_name, system_topic_name, event_subscription_name, custom_headers:nil)
356
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
357
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
358
+ fail ArgumentError, 'system_topic_name is nil' if system_topic_name.nil?
359
+ fail ArgumentError, 'event_subscription_name is nil' if event_subscription_name.nil?
360
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
361
+
362
+
363
+ request_headers = {}
364
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
365
+
366
+ # Set Headers
367
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
368
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
369
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl'
370
+
371
+ request_url = @base_url || @client.base_url
372
+
373
+ options = {
374
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
375
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'systemTopicName' => system_topic_name,'eventSubscriptionName' => event_subscription_name},
376
+ query_params: {'api-version' => @client.api_version},
377
+ headers: request_headers.merge(custom_headers || {}),
378
+ base_url: request_url
379
+ }
380
+ promise = @client.make_request_async(:post, path_template, options)
381
+
382
+ promise = promise.then do |result|
383
+ http_response = result.response
384
+ status_code = http_response.status
385
+ response_content = http_response.body
386
+ unless status_code == 200
387
+ error_model = JSON.load(response_content)
388
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
389
+ end
390
+
391
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
392
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
393
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
394
+ # Deserialize Response
395
+ if status_code == 200
396
+ begin
397
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
398
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscriptionFullUrl.mapper()
399
+ result.body = @client.deserialize(result_mapper, parsed_response)
400
+ rescue Exception => e
401
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
402
+ end
403
+ end
404
+
405
+ result
406
+ end
407
+
408
+ promise.execute
409
+ end
410
+
411
+ #
412
+ # List event subscriptions of a system topic.
413
+ #
414
+ # List event subscriptions that belong to a specific system topic.
415
+ #
416
+ # @param resource_group_name [String] The name of the resource group within the
417
+ # user's subscription.
418
+ # @param system_topic_name [String] Name of the system topic.
419
+ # @param filter [String] The query used to filter the search results using
420
+ # OData syntax. Filtering is permitted on the 'name' property only and with
421
+ # limited number of OData operations. These operations are: the 'contains'
422
+ # function as well as the following logical operations: not, and, or, eq (for
423
+ # equal), and ne (for not equal). No arithmetic operations are supported. The
424
+ # following is a valid filter example: $filter=contains(namE, 'PATTERN') and
425
+ # name ne 'PATTERN-1'. The following is not a valid filter example:
426
+ # $filter=location eq 'westus'.
427
+ # @param top [Integer] The number of results to return per page for the list
428
+ # operation. Valid range for top parameter is 1 to 100. If not specified, the
429
+ # default number of results to be returned is 20 items per page.
430
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
431
+ # will be added to the HTTP request.
432
+ #
433
+ # @return [Array<EventSubscription>] operation results.
434
+ #
435
+ def list_by_system_topic(resource_group_name, system_topic_name, filter:nil, top:nil, custom_headers:nil)
436
+ first_page = list_by_system_topic_as_lazy(resource_group_name, system_topic_name, filter:filter, top:top, custom_headers:custom_headers)
437
+ first_page.get_all_items
438
+ end
439
+
440
+ #
441
+ # List event subscriptions of a system topic.
442
+ #
443
+ # List event subscriptions that belong to a specific system topic.
444
+ #
445
+ # @param resource_group_name [String] The name of the resource group within the
446
+ # user's subscription.
447
+ # @param system_topic_name [String] Name of the system topic.
448
+ # @param filter [String] The query used to filter the search results using
449
+ # OData syntax. Filtering is permitted on the 'name' property only and with
450
+ # limited number of OData operations. These operations are: the 'contains'
451
+ # function as well as the following logical operations: not, and, or, eq (for
452
+ # equal), and ne (for not equal). No arithmetic operations are supported. The
453
+ # following is a valid filter example: $filter=contains(namE, 'PATTERN') and
454
+ # name ne 'PATTERN-1'. The following is not a valid filter example:
455
+ # $filter=location eq 'westus'.
456
+ # @param top [Integer] The number of results to return per page for the list
457
+ # operation. Valid range for top parameter is 1 to 100. If not specified, the
458
+ # default number of results to be returned is 20 items per page.
459
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
460
+ # will be added to the HTTP request.
461
+ #
462
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
463
+ #
464
+ def list_by_system_topic_with_http_info(resource_group_name, system_topic_name, filter:nil, top:nil, custom_headers:nil)
465
+ list_by_system_topic_async(resource_group_name, system_topic_name, filter:filter, top:top, custom_headers:custom_headers).value!
466
+ end
467
+
468
+ #
469
+ # List event subscriptions of a system topic.
470
+ #
471
+ # List event subscriptions that belong to a specific system topic.
472
+ #
473
+ # @param resource_group_name [String] The name of the resource group within the
474
+ # user's subscription.
475
+ # @param system_topic_name [String] Name of the system topic.
476
+ # @param filter [String] The query used to filter the search results using
477
+ # OData syntax. Filtering is permitted on the 'name' property only and with
478
+ # limited number of OData operations. These operations are: the 'contains'
479
+ # function as well as the following logical operations: not, and, or, eq (for
480
+ # equal), and ne (for not equal). No arithmetic operations are supported. The
481
+ # following is a valid filter example: $filter=contains(namE, 'PATTERN') and
482
+ # name ne 'PATTERN-1'. The following is not a valid filter example:
483
+ # $filter=location eq 'westus'.
484
+ # @param top [Integer] The number of results to return per page for the list
485
+ # operation. Valid range for top parameter is 1 to 100. If not specified, the
486
+ # default number of results to be returned is 20 items per page.
487
+ # @param [Hash{String => String}] A hash of custom headers that will be added
488
+ # to the HTTP request.
489
+ #
490
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
491
+ #
492
+ def list_by_system_topic_async(resource_group_name, system_topic_name, filter:nil, top:nil, custom_headers:nil)
493
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
494
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
495
+ fail ArgumentError, 'system_topic_name is nil' if system_topic_name.nil?
496
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
497
+
498
+
499
+ request_headers = {}
500
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
501
+
502
+ # Set Headers
503
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
504
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
505
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions'
506
+
507
+ request_url = @base_url || @client.base_url
508
+
509
+ options = {
510
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
511
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'systemTopicName' => system_topic_name},
512
+ query_params: {'api-version' => @client.api_version,'$filter' => filter,'$top' => top},
513
+ headers: request_headers.merge(custom_headers || {}),
514
+ base_url: request_url
515
+ }
516
+ promise = @client.make_request_async(:get, path_template, options)
517
+
518
+ promise = promise.then do |result|
519
+ http_response = result.response
520
+ status_code = http_response.status
521
+ response_content = http_response.body
522
+ unless status_code == 200
523
+ error_model = JSON.load(response_content)
524
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
525
+ end
526
+
527
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
528
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
529
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
530
+ # Deserialize Response
531
+ if status_code == 200
532
+ begin
533
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
534
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscriptionsListResult.mapper()
535
+ result.body = @client.deserialize(result_mapper, parsed_response)
536
+ rescue Exception => e
537
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
538
+ end
539
+ end
540
+
541
+ result
542
+ end
543
+
544
+ promise.execute
545
+ end
546
+
547
+ #
548
+ # Get delivery attributes for an event subscription.
549
+ #
550
+ # Get all delivery attributes for an event subscription.
551
+ #
552
+ # @param resource_group_name [String] The name of the resource group within the
553
+ # user's subscription.
554
+ # @param system_topic_name [String] Name of the system topic.
555
+ # @param event_subscription_name [String] Name of the event subscription to be
556
+ # created. Event subscription names must be between 3 and 100 characters in
557
+ # length and use alphanumeric letters only.
558
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
559
+ # will be added to the HTTP request.
560
+ #
561
+ # @return [DeliveryAttributeListResult] operation results.
562
+ #
563
+ def get_delivery_attributes(resource_group_name, system_topic_name, event_subscription_name, custom_headers:nil)
564
+ response = get_delivery_attributes_async(resource_group_name, system_topic_name, event_subscription_name, custom_headers:custom_headers).value!
565
+ response.body unless response.nil?
566
+ end
567
+
568
+ #
569
+ # Get delivery attributes for an event subscription.
570
+ #
571
+ # Get all delivery attributes for an event subscription.
572
+ #
573
+ # @param resource_group_name [String] The name of the resource group within the
574
+ # user's subscription.
575
+ # @param system_topic_name [String] Name of the system topic.
576
+ # @param event_subscription_name [String] Name of the event subscription to be
577
+ # created. Event subscription names must be between 3 and 100 characters in
578
+ # length and use alphanumeric letters only.
579
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
580
+ # will be added to the HTTP request.
581
+ #
582
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
583
+ #
584
+ def get_delivery_attributes_with_http_info(resource_group_name, system_topic_name, event_subscription_name, custom_headers:nil)
585
+ get_delivery_attributes_async(resource_group_name, system_topic_name, event_subscription_name, custom_headers:custom_headers).value!
586
+ end
587
+
588
+ #
589
+ # Get delivery attributes for an event subscription.
590
+ #
591
+ # Get all delivery attributes for an event subscription.
592
+ #
593
+ # @param resource_group_name [String] The name of the resource group within the
594
+ # user's subscription.
595
+ # @param system_topic_name [String] Name of the system topic.
596
+ # @param event_subscription_name [String] Name of the event subscription to be
597
+ # created. Event subscription names must be between 3 and 100 characters in
598
+ # length and use alphanumeric letters only.
599
+ # @param [Hash{String => String}] A hash of custom headers that will be added
600
+ # to the HTTP request.
601
+ #
602
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
603
+ #
604
+ def get_delivery_attributes_async(resource_group_name, system_topic_name, event_subscription_name, custom_headers:nil)
605
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
606
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
607
+ fail ArgumentError, 'system_topic_name is nil' if system_topic_name.nil?
608
+ fail ArgumentError, 'event_subscription_name is nil' if event_subscription_name.nil?
609
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
610
+
611
+
612
+ request_headers = {}
613
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
614
+
615
+ # Set Headers
616
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
617
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
618
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes'
619
+
620
+ request_url = @base_url || @client.base_url
621
+
622
+ options = {
623
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
624
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'systemTopicName' => system_topic_name,'eventSubscriptionName' => event_subscription_name},
625
+ query_params: {'api-version' => @client.api_version},
626
+ headers: request_headers.merge(custom_headers || {}),
627
+ base_url: request_url
628
+ }
629
+ promise = @client.make_request_async(:post, path_template, options)
630
+
631
+ promise = promise.then do |result|
632
+ http_response = result.response
633
+ status_code = http_response.status
634
+ response_content = http_response.body
635
+ unless status_code == 200
636
+ error_model = JSON.load(response_content)
637
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
638
+ end
639
+
640
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
641
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
642
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
643
+ # Deserialize Response
644
+ if status_code == 200
645
+ begin
646
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
647
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::DeliveryAttributeListResult.mapper()
648
+ result.body = @client.deserialize(result_mapper, parsed_response)
649
+ rescue Exception => e
650
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
651
+ end
652
+ end
653
+
654
+ result
655
+ end
656
+
657
+ promise.execute
658
+ end
659
+
660
+ #
661
+ # Create or update an event subscription for a system topic.
662
+ #
663
+ # Asynchronously creates or updates an event subscription with the specified
664
+ # parameters. Existing event subscriptions will be updated with this API.
665
+ #
666
+ # @param resource_group_name [String] The name of the resource group within the
667
+ # user's subscription.
668
+ # @param system_topic_name [String] Name of the system topic.
669
+ # @param event_subscription_name [String] Name of the event subscription to be
670
+ # created. Event subscription names must be between 3 and 100 characters in
671
+ # length and use alphanumeric letters only.
672
+ # @param event_subscription_info [EventSubscription] Event subscription
673
+ # properties containing the destination and filter information.
674
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
675
+ # will be added to the HTTP request.
676
+ #
677
+ # @return [EventSubscription] operation results.
678
+ #
679
+ def begin_create_or_update(resource_group_name, system_topic_name, event_subscription_name, event_subscription_info, custom_headers:nil)
680
+ response = begin_create_or_update_async(resource_group_name, system_topic_name, event_subscription_name, event_subscription_info, custom_headers:custom_headers).value!
681
+ response.body unless response.nil?
682
+ end
683
+
684
+ #
685
+ # Create or update an event subscription for a system topic.
686
+ #
687
+ # Asynchronously creates or updates an event subscription with the specified
688
+ # parameters. Existing event subscriptions will be updated with this API.
689
+ #
690
+ # @param resource_group_name [String] The name of the resource group within the
691
+ # user's subscription.
692
+ # @param system_topic_name [String] Name of the system topic.
693
+ # @param event_subscription_name [String] Name of the event subscription to be
694
+ # created. Event subscription names must be between 3 and 100 characters in
695
+ # length and use alphanumeric letters only.
696
+ # @param event_subscription_info [EventSubscription] Event subscription
697
+ # properties containing the destination and filter information.
698
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
699
+ # will be added to the HTTP request.
700
+ #
701
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
702
+ #
703
+ def begin_create_or_update_with_http_info(resource_group_name, system_topic_name, event_subscription_name, event_subscription_info, custom_headers:nil)
704
+ begin_create_or_update_async(resource_group_name, system_topic_name, event_subscription_name, event_subscription_info, custom_headers:custom_headers).value!
705
+ end
706
+
707
+ #
708
+ # Create or update an event subscription for a system topic.
709
+ #
710
+ # Asynchronously creates or updates an event subscription with the specified
711
+ # parameters. Existing event subscriptions will be updated with this API.
712
+ #
713
+ # @param resource_group_name [String] The name of the resource group within the
714
+ # user's subscription.
715
+ # @param system_topic_name [String] Name of the system topic.
716
+ # @param event_subscription_name [String] Name of the event subscription to be
717
+ # created. Event subscription names must be between 3 and 100 characters in
718
+ # length and use alphanumeric letters only.
719
+ # @param event_subscription_info [EventSubscription] Event subscription
720
+ # properties containing the destination and filter information.
721
+ # @param [Hash{String => String}] A hash of custom headers that will be added
722
+ # to the HTTP request.
723
+ #
724
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
725
+ #
726
+ def begin_create_or_update_async(resource_group_name, system_topic_name, event_subscription_name, event_subscription_info, custom_headers:nil)
727
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
728
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
729
+ fail ArgumentError, 'system_topic_name is nil' if system_topic_name.nil?
730
+ fail ArgumentError, 'event_subscription_name is nil' if event_subscription_name.nil?
731
+ fail ArgumentError, 'event_subscription_info is nil' if event_subscription_info.nil?
732
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
733
+
734
+
735
+ request_headers = {}
736
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
737
+
738
+ # Set Headers
739
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
740
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
741
+
742
+ # Serialize Request
743
+ request_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscription.mapper()
744
+ request_content = @client.serialize(request_mapper, event_subscription_info)
745
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
746
+
747
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}'
748
+
749
+ request_url = @base_url || @client.base_url
750
+
751
+ options = {
752
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
753
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'systemTopicName' => system_topic_name,'eventSubscriptionName' => event_subscription_name},
754
+ query_params: {'api-version' => @client.api_version},
755
+ body: request_content,
756
+ headers: request_headers.merge(custom_headers || {}),
757
+ base_url: request_url
758
+ }
759
+ promise = @client.make_request_async(:put, path_template, options)
760
+
761
+ promise = promise.then do |result|
762
+ http_response = result.response
763
+ status_code = http_response.status
764
+ response_content = http_response.body
765
+ unless status_code == 201
766
+ error_model = JSON.load(response_content)
767
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
768
+ end
769
+
770
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
771
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
772
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
773
+ # Deserialize Response
774
+ if status_code == 201
775
+ begin
776
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
777
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscription.mapper()
778
+ result.body = @client.deserialize(result_mapper, parsed_response)
779
+ rescue Exception => e
780
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
781
+ end
782
+ end
783
+
784
+ result
785
+ end
786
+
787
+ promise.execute
788
+ end
789
+
790
+ #
791
+ # Delete an event subscription of a system topic.
792
+ #
793
+ # Delete an event subscription of a system topic.
794
+ #
795
+ # @param resource_group_name [String] The name of the resource group within the
796
+ # user's subscription.
797
+ # @param system_topic_name [String] Name of the system topic.
798
+ # @param event_subscription_name [String] Name of the event subscription to be
799
+ # created. Event subscription names must be between 3 and 100 characters in
800
+ # length and use alphanumeric letters only.
801
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
802
+ # will be added to the HTTP request.
803
+ #
804
+ #
805
+ def begin_delete(resource_group_name, system_topic_name, event_subscription_name, custom_headers:nil)
806
+ response = begin_delete_async(resource_group_name, system_topic_name, event_subscription_name, custom_headers:custom_headers).value!
807
+ nil
808
+ end
809
+
810
+ #
811
+ # Delete an event subscription of a system topic.
812
+ #
813
+ # Delete an event subscription of a system topic.
814
+ #
815
+ # @param resource_group_name [String] The name of the resource group within the
816
+ # user's subscription.
817
+ # @param system_topic_name [String] Name of the system topic.
818
+ # @param event_subscription_name [String] Name of the event subscription to be
819
+ # created. Event subscription names must be between 3 and 100 characters in
820
+ # length and use alphanumeric letters only.
821
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
822
+ # will be added to the HTTP request.
823
+ #
824
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
825
+ #
826
+ def begin_delete_with_http_info(resource_group_name, system_topic_name, event_subscription_name, custom_headers:nil)
827
+ begin_delete_async(resource_group_name, system_topic_name, event_subscription_name, custom_headers:custom_headers).value!
828
+ end
829
+
830
+ #
831
+ # Delete an event subscription of a system topic.
832
+ #
833
+ # Delete an event subscription of a system topic.
834
+ #
835
+ # @param resource_group_name [String] The name of the resource group within the
836
+ # user's subscription.
837
+ # @param system_topic_name [String] Name of the system topic.
838
+ # @param event_subscription_name [String] Name of the event subscription to be
839
+ # created. Event subscription names must be between 3 and 100 characters in
840
+ # length and use alphanumeric letters only.
841
+ # @param [Hash{String => String}] A hash of custom headers that will be added
842
+ # to the HTTP request.
843
+ #
844
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
845
+ #
846
+ def begin_delete_async(resource_group_name, system_topic_name, event_subscription_name, custom_headers:nil)
847
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
848
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
849
+ fail ArgumentError, 'system_topic_name is nil' if system_topic_name.nil?
850
+ fail ArgumentError, 'event_subscription_name is nil' if event_subscription_name.nil?
851
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
852
+
853
+
854
+ request_headers = {}
855
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
856
+
857
+ # Set Headers
858
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
859
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
860
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}'
861
+
862
+ request_url = @base_url || @client.base_url
863
+
864
+ options = {
865
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
866
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'systemTopicName' => system_topic_name,'eventSubscriptionName' => event_subscription_name},
867
+ query_params: {'api-version' => @client.api_version},
868
+ headers: request_headers.merge(custom_headers || {}),
869
+ base_url: request_url
870
+ }
871
+ promise = @client.make_request_async(:delete, path_template, options)
872
+
873
+ promise = promise.then do |result|
874
+ http_response = result.response
875
+ status_code = http_response.status
876
+ response_content = http_response.body
877
+ unless status_code == 200 || status_code == 202 || status_code == 204
878
+ error_model = JSON.load(response_content)
879
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
880
+ end
881
+
882
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
883
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
884
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
885
+
886
+ result
887
+ end
888
+
889
+ promise.execute
890
+ end
891
+
892
+ #
893
+ # Update event subscription of a system topic.
894
+ #
895
+ # Update event subscription of a system topic.
896
+ #
897
+ # @param resource_group_name [String] The name of the resource group within the
898
+ # user's subscription.
899
+ # @param system_topic_name [String] Name of the system topic.
900
+ # @param event_subscription_name [String] Name of the event subscription to be
901
+ # created. Event subscription names must be between 3 and 100 characters in
902
+ # length and use alphanumeric letters only.
903
+ # @param event_subscription_update_parameters
904
+ # [EventSubscriptionUpdateParameters] Updated event subscription information.
905
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
906
+ # will be added to the HTTP request.
907
+ #
908
+ # @return [EventSubscription] operation results.
909
+ #
910
+ def begin_update(resource_group_name, system_topic_name, event_subscription_name, event_subscription_update_parameters, custom_headers:nil)
911
+ response = begin_update_async(resource_group_name, system_topic_name, event_subscription_name, event_subscription_update_parameters, custom_headers:custom_headers).value!
912
+ response.body unless response.nil?
913
+ end
914
+
915
+ #
916
+ # Update event subscription of a system topic.
917
+ #
918
+ # Update event subscription of a system topic.
919
+ #
920
+ # @param resource_group_name [String] The name of the resource group within the
921
+ # user's subscription.
922
+ # @param system_topic_name [String] Name of the system topic.
923
+ # @param event_subscription_name [String] Name of the event subscription to be
924
+ # created. Event subscription names must be between 3 and 100 characters in
925
+ # length and use alphanumeric letters only.
926
+ # @param event_subscription_update_parameters
927
+ # [EventSubscriptionUpdateParameters] Updated event subscription information.
928
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
929
+ # will be added to the HTTP request.
930
+ #
931
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
932
+ #
933
+ def begin_update_with_http_info(resource_group_name, system_topic_name, event_subscription_name, event_subscription_update_parameters, custom_headers:nil)
934
+ begin_update_async(resource_group_name, system_topic_name, event_subscription_name, event_subscription_update_parameters, custom_headers:custom_headers).value!
935
+ end
936
+
937
+ #
938
+ # Update event subscription of a system topic.
939
+ #
940
+ # Update event subscription of a system topic.
941
+ #
942
+ # @param resource_group_name [String] The name of the resource group within the
943
+ # user's subscription.
944
+ # @param system_topic_name [String] Name of the system topic.
945
+ # @param event_subscription_name [String] Name of the event subscription to be
946
+ # created. Event subscription names must be between 3 and 100 characters in
947
+ # length and use alphanumeric letters only.
948
+ # @param event_subscription_update_parameters
949
+ # [EventSubscriptionUpdateParameters] Updated event subscription information.
950
+ # @param [Hash{String => String}] A hash of custom headers that will be added
951
+ # to the HTTP request.
952
+ #
953
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
954
+ #
955
+ def begin_update_async(resource_group_name, system_topic_name, event_subscription_name, event_subscription_update_parameters, custom_headers:nil)
956
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
957
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
958
+ fail ArgumentError, 'system_topic_name is nil' if system_topic_name.nil?
959
+ fail ArgumentError, 'event_subscription_name is nil' if event_subscription_name.nil?
960
+ fail ArgumentError, 'event_subscription_update_parameters is nil' if event_subscription_update_parameters.nil?
961
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
962
+
963
+
964
+ request_headers = {}
965
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
966
+
967
+ # Set Headers
968
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
969
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
970
+
971
+ # Serialize Request
972
+ request_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscriptionUpdateParameters.mapper()
973
+ request_content = @client.serialize(request_mapper, event_subscription_update_parameters)
974
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
975
+
976
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}'
977
+
978
+ request_url = @base_url || @client.base_url
979
+
980
+ options = {
981
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
982
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'systemTopicName' => system_topic_name,'eventSubscriptionName' => event_subscription_name},
983
+ query_params: {'api-version' => @client.api_version},
984
+ body: request_content,
985
+ headers: request_headers.merge(custom_headers || {}),
986
+ base_url: request_url
987
+ }
988
+ promise = @client.make_request_async(:patch, path_template, options)
989
+
990
+ promise = promise.then do |result|
991
+ http_response = result.response
992
+ status_code = http_response.status
993
+ response_content = http_response.body
994
+ unless status_code == 201
995
+ error_model = JSON.load(response_content)
996
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
997
+ end
998
+
999
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1000
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1001
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1002
+ # Deserialize Response
1003
+ if status_code == 201
1004
+ begin
1005
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1006
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscription.mapper()
1007
+ result.body = @client.deserialize(result_mapper, parsed_response)
1008
+ rescue Exception => e
1009
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1010
+ end
1011
+ end
1012
+
1013
+ result
1014
+ end
1015
+
1016
+ promise.execute
1017
+ end
1018
+
1019
+ #
1020
+ # List event subscriptions of a system topic.
1021
+ #
1022
+ # List event subscriptions that belong to a specific system topic.
1023
+ #
1024
+ # @param next_page_link [String] The NextLink from the previous successful call
1025
+ # to List operation.
1026
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1027
+ # will be added to the HTTP request.
1028
+ #
1029
+ # @return [EventSubscriptionsListResult] operation results.
1030
+ #
1031
+ def list_by_system_topic_next(next_page_link, custom_headers:nil)
1032
+ response = list_by_system_topic_next_async(next_page_link, custom_headers:custom_headers).value!
1033
+ response.body unless response.nil?
1034
+ end
1035
+
1036
+ #
1037
+ # List event subscriptions of a system topic.
1038
+ #
1039
+ # List event subscriptions that belong to a specific system topic.
1040
+ #
1041
+ # @param next_page_link [String] The NextLink from the previous successful call
1042
+ # to List operation.
1043
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1044
+ # will be added to the HTTP request.
1045
+ #
1046
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1047
+ #
1048
+ def list_by_system_topic_next_with_http_info(next_page_link, custom_headers:nil)
1049
+ list_by_system_topic_next_async(next_page_link, custom_headers:custom_headers).value!
1050
+ end
1051
+
1052
+ #
1053
+ # List event subscriptions of a system topic.
1054
+ #
1055
+ # List event subscriptions that belong to a specific system topic.
1056
+ #
1057
+ # @param next_page_link [String] The NextLink from the previous successful call
1058
+ # to List operation.
1059
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1060
+ # to the HTTP request.
1061
+ #
1062
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1063
+ #
1064
+ def list_by_system_topic_next_async(next_page_link, custom_headers:nil)
1065
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1066
+
1067
+
1068
+ request_headers = {}
1069
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1070
+
1071
+ # Set Headers
1072
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1073
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1074
+ path_template = '{nextLink}'
1075
+
1076
+ request_url = @base_url || @client.base_url
1077
+
1078
+ options = {
1079
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1080
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1081
+ headers: request_headers.merge(custom_headers || {}),
1082
+ base_url: request_url
1083
+ }
1084
+ promise = @client.make_request_async(:get, path_template, options)
1085
+
1086
+ promise = promise.then do |result|
1087
+ http_response = result.response
1088
+ status_code = http_response.status
1089
+ response_content = http_response.body
1090
+ unless status_code == 200
1091
+ error_model = JSON.load(response_content)
1092
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1093
+ end
1094
+
1095
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1096
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1097
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1098
+ # Deserialize Response
1099
+ if status_code == 200
1100
+ begin
1101
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1102
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscriptionsListResult.mapper()
1103
+ result.body = @client.deserialize(result_mapper, parsed_response)
1104
+ rescue Exception => e
1105
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1106
+ end
1107
+ end
1108
+
1109
+ result
1110
+ end
1111
+
1112
+ promise.execute
1113
+ end
1114
+
1115
+ #
1116
+ # List event subscriptions of a system topic.
1117
+ #
1118
+ # List event subscriptions that belong to a specific system topic.
1119
+ #
1120
+ # @param resource_group_name [String] The name of the resource group within the
1121
+ # user's subscription.
1122
+ # @param system_topic_name [String] Name of the system topic.
1123
+ # @param filter [String] The query used to filter the search results using
1124
+ # OData syntax. Filtering is permitted on the 'name' property only and with
1125
+ # limited number of OData operations. These operations are: the 'contains'
1126
+ # function as well as the following logical operations: not, and, or, eq (for
1127
+ # equal), and ne (for not equal). No arithmetic operations are supported. The
1128
+ # following is a valid filter example: $filter=contains(namE, 'PATTERN') and
1129
+ # name ne 'PATTERN-1'. The following is not a valid filter example:
1130
+ # $filter=location eq 'westus'.
1131
+ # @param top [Integer] The number of results to return per page for the list
1132
+ # operation. Valid range for top parameter is 1 to 100. If not specified, the
1133
+ # default number of results to be returned is 20 items per page.
1134
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1135
+ # will be added to the HTTP request.
1136
+ #
1137
+ # @return [EventSubscriptionsListResult] which provide lazy access to pages of
1138
+ # the response.
1139
+ #
1140
+ def list_by_system_topic_as_lazy(resource_group_name, system_topic_name, filter:nil, top:nil, custom_headers:nil)
1141
+ response = list_by_system_topic_async(resource_group_name, system_topic_name, filter:filter, top:top, custom_headers:custom_headers).value!
1142
+ unless response.nil?
1143
+ page = response.body
1144
+ page.next_method = Proc.new do |next_page_link|
1145
+ list_by_system_topic_next_async(next_page_link, custom_headers:custom_headers)
1146
+ end
1147
+ page
1148
+ end
1149
+ end
1150
+
1151
+ end
1152
+ end