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,791 @@
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 PrivateEndpointConnections
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the PrivateEndpointConnections 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 specific private endpoint connection.
26
+ #
27
+ # Get a specific private endpoint connection under a topic or domain.
28
+ #
29
+ # @param resource_group_name [String] The name of the resource group within the
30
+ # user's subscription.
31
+ # @param parent_type [Enum] The type of the parent resource. This can be either
32
+ # \'topics\' or \'domains\'. Possible values include: 'topics', 'domains'
33
+ # @param parent_name [String] The name of the parent resource (namely, either,
34
+ # the topic name or domain name).
35
+ # @param private_endpoint_connection_name [String] The name of the private
36
+ # endpoint connection connection.
37
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
38
+ # will be added to the HTTP request.
39
+ #
40
+ # @return [PrivateEndpointConnection] operation results.
41
+ #
42
+ def get(resource_group_name, parent_type, parent_name, private_endpoint_connection_name, custom_headers:nil)
43
+ response = get_async(resource_group_name, parent_type, parent_name, private_endpoint_connection_name, custom_headers:custom_headers).value!
44
+ response.body unless response.nil?
45
+ end
46
+
47
+ #
48
+ # Get a specific private endpoint connection.
49
+ #
50
+ # Get a specific private endpoint connection under a topic or domain.
51
+ #
52
+ # @param resource_group_name [String] The name of the resource group within the
53
+ # user's subscription.
54
+ # @param parent_type [Enum] The type of the parent resource. This can be either
55
+ # \'topics\' or \'domains\'. Possible values include: 'topics', 'domains'
56
+ # @param parent_name [String] The name of the parent resource (namely, either,
57
+ # the topic name or domain name).
58
+ # @param private_endpoint_connection_name [String] The name of the private
59
+ # endpoint connection connection.
60
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
61
+ # will be added to the HTTP request.
62
+ #
63
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
64
+ #
65
+ def get_with_http_info(resource_group_name, parent_type, parent_name, private_endpoint_connection_name, custom_headers:nil)
66
+ get_async(resource_group_name, parent_type, parent_name, private_endpoint_connection_name, custom_headers:custom_headers).value!
67
+ end
68
+
69
+ #
70
+ # Get a specific private endpoint connection.
71
+ #
72
+ # Get a specific private endpoint connection under a topic or domain.
73
+ #
74
+ # @param resource_group_name [String] The name of the resource group within the
75
+ # user's subscription.
76
+ # @param parent_type [Enum] The type of the parent resource. This can be either
77
+ # \'topics\' or \'domains\'. Possible values include: 'topics', 'domains'
78
+ # @param parent_name [String] The name of the parent resource (namely, either,
79
+ # the topic name or domain name).
80
+ # @param private_endpoint_connection_name [String] The name of the private
81
+ # endpoint connection connection.
82
+ # @param [Hash{String => String}] A hash of custom headers that will be added
83
+ # to the HTTP request.
84
+ #
85
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
86
+ #
87
+ def get_async(resource_group_name, parent_type, parent_name, private_endpoint_connection_name, custom_headers:nil)
88
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
89
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
90
+ fail ArgumentError, 'parent_type is nil' if parent_type.nil?
91
+ fail ArgumentError, 'parent_name is nil' if parent_name.nil?
92
+ fail ArgumentError, 'private_endpoint_connection_name is nil' if private_endpoint_connection_name.nil?
93
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
94
+
95
+
96
+ request_headers = {}
97
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
98
+
99
+ # Set Headers
100
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
101
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
102
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{parentType}/{parentName}/privateEndpointConnections/{privateEndpointConnectionName}'
103
+
104
+ request_url = @base_url || @client.base_url
105
+
106
+ options = {
107
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
108
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'parentType' => parent_type,'parentName' => parent_name,'privateEndpointConnectionName' => private_endpoint_connection_name},
109
+ query_params: {'api-version' => @client.api_version},
110
+ headers: request_headers.merge(custom_headers || {}),
111
+ base_url: request_url
112
+ }
113
+ promise = @client.make_request_async(:get, path_template, options)
114
+
115
+ promise = promise.then do |result|
116
+ http_response = result.response
117
+ status_code = http_response.status
118
+ response_content = http_response.body
119
+ unless status_code == 200
120
+ error_model = JSON.load(response_content)
121
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
122
+ end
123
+
124
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
125
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
126
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
127
+ # Deserialize Response
128
+ if status_code == 200
129
+ begin
130
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
131
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::PrivateEndpointConnection.mapper()
132
+ result.body = @client.deserialize(result_mapper, parsed_response)
133
+ rescue Exception => e
134
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
135
+ end
136
+ end
137
+
138
+ result
139
+ end
140
+
141
+ promise.execute
142
+ end
143
+
144
+ #
145
+ # Update a specific private endpoint connection.
146
+ #
147
+ # Update a specific private endpoint connection under a topic or domain.
148
+ #
149
+ # @param resource_group_name [String] The name of the resource group within the
150
+ # user's subscription.
151
+ # @param parent_type [Enum] The type of the parent resource. This can be either
152
+ # \'topics\' or \'domains\'. Possible values include: 'topics', 'domains'
153
+ # @param parent_name [String] The name of the parent resource (namely, either,
154
+ # the topic name or domain name).
155
+ # @param private_endpoint_connection_name [String] The name of the private
156
+ # endpoint connection connection.
157
+ # @param private_endpoint_connection [PrivateEndpointConnection] The private
158
+ # endpoint connection object to update.
159
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
160
+ # will be added to the HTTP request.
161
+ #
162
+ # @return [PrivateEndpointConnection] operation results.
163
+ #
164
+ def update(resource_group_name, parent_type, parent_name, private_endpoint_connection_name, private_endpoint_connection, custom_headers:nil)
165
+ response = update_async(resource_group_name, parent_type, parent_name, private_endpoint_connection_name, private_endpoint_connection, custom_headers:custom_headers).value!
166
+ response.body unless response.nil?
167
+ end
168
+
169
+ #
170
+ # @param resource_group_name [String] The name of the resource group within the
171
+ # user's subscription.
172
+ # @param parent_type [Enum] The type of the parent resource. This can be either
173
+ # \'topics\' or \'domains\'. Possible values include: 'topics', 'domains'
174
+ # @param parent_name [String] The name of the parent resource (namely, either,
175
+ # the topic name or domain name).
176
+ # @param private_endpoint_connection_name [String] The name of the private
177
+ # endpoint connection connection.
178
+ # @param private_endpoint_connection [PrivateEndpointConnection] The private
179
+ # endpoint connection object to update.
180
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
181
+ # will be added to the HTTP request.
182
+ #
183
+ # @return [Concurrent::Promise] promise which provides async access to http
184
+ # response.
185
+ #
186
+ def update_async(resource_group_name, parent_type, parent_name, private_endpoint_connection_name, private_endpoint_connection, custom_headers:nil)
187
+ # Send request
188
+ promise = begin_update_async(resource_group_name, parent_type, parent_name, private_endpoint_connection_name, private_endpoint_connection, custom_headers:custom_headers)
189
+
190
+ promise = promise.then do |response|
191
+ # Defining deserialization method.
192
+ deserialize_method = lambda do |parsed_response|
193
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::PrivateEndpointConnection.mapper()
194
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
195
+ end
196
+
197
+ # Waiting for response.
198
+ @client.get_long_running_operation_result(response, deserialize_method)
199
+ end
200
+
201
+ promise
202
+ end
203
+
204
+ #
205
+ # Delete a specific private endpoint connection.
206
+ #
207
+ # Delete a specific private endpoint connection 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 [Enum] The type of the parent resource. This can be either
212
+ # \'topics\' or \'domains\'. Possible values include: 'topics', 'domains'
213
+ # @param parent_name [String] The name of the parent resource (namely, either,
214
+ # the topic name or domain name).
215
+ # @param private_endpoint_connection_name [String] The name of the private
216
+ # endpoint connection connection.
217
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
218
+ # will be added to the HTTP request.
219
+ #
220
+ def delete(resource_group_name, parent_type, parent_name, private_endpoint_connection_name, custom_headers:nil)
221
+ response = delete_async(resource_group_name, parent_type, parent_name, private_endpoint_connection_name, custom_headers:custom_headers).value!
222
+ nil
223
+ end
224
+
225
+ #
226
+ # @param resource_group_name [String] The name of the resource group within the
227
+ # user's subscription.
228
+ # @param parent_type [Enum] The type of the parent resource. This can be either
229
+ # \'topics\' or \'domains\'. Possible values include: 'topics', 'domains'
230
+ # @param parent_name [String] The name of the parent resource (namely, either,
231
+ # the topic name or domain name).
232
+ # @param private_endpoint_connection_name [String] The name of the private
233
+ # endpoint connection connection.
234
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
235
+ # will be added to the HTTP request.
236
+ #
237
+ # @return [Concurrent::Promise] promise which provides async access to http
238
+ # response.
239
+ #
240
+ def delete_async(resource_group_name, parent_type, parent_name, private_endpoint_connection_name, custom_headers:nil)
241
+ # Send request
242
+ promise = begin_delete_async(resource_group_name, parent_type, parent_name, private_endpoint_connection_name, custom_headers:custom_headers)
243
+
244
+ promise = promise.then do |response|
245
+ # Defining deserialization method.
246
+ deserialize_method = lambda do |parsed_response|
247
+ end
248
+
249
+ # Waiting for response.
250
+ @client.get_long_running_operation_result(response, deserialize_method)
251
+ end
252
+
253
+ promise
254
+ end
255
+
256
+ #
257
+ # Lists all private endpoint connections under a resource.
258
+ #
259
+ # Get all private endpoint connections under a topic or domain.
260
+ #
261
+ # @param resource_group_name [String] The name of the resource group within the
262
+ # user's subscription.
263
+ # @param parent_type [Enum] The type of the parent resource. This can be either
264
+ # \'topics\' or \'domains\'. Possible values include: 'topics', 'domains'
265
+ # @param parent_name [String] The name of the parent resource (namely, either,
266
+ # the topic name or domain name).
267
+ # @param filter [String] The query used to filter the search results using
268
+ # OData syntax. Filtering is permitted on the 'name' property only and with
269
+ # limited number of OData operations. These operations are: the 'contains'
270
+ # function as well as the following logical operations: not, and, or, eq (for
271
+ # equal), and ne (for not equal). No arithmetic operations are supported. The
272
+ # following is a valid filter example: $filter=contains(namE, 'PATTERN') and
273
+ # name ne 'PATTERN-1'. The following is not a valid filter example:
274
+ # $filter=location eq 'westus'.
275
+ # @param top [Integer] The number of results to return per page for the list
276
+ # operation. Valid range for top parameter is 1 to 100. If not specified, the
277
+ # default number of results to be returned is 20 items per page.
278
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
279
+ # will be added to the HTTP request.
280
+ #
281
+ # @return [Array<PrivateEndpointConnection>] operation results.
282
+ #
283
+ def list_by_resource(resource_group_name, parent_type, parent_name, filter:nil, top:nil, custom_headers:nil)
284
+ first_page = list_by_resource_as_lazy(resource_group_name, parent_type, parent_name, filter:filter, top:top, custom_headers:custom_headers)
285
+ first_page.get_all_items
286
+ end
287
+
288
+ #
289
+ # Lists all private endpoint connections under a resource.
290
+ #
291
+ # Get all private endpoint connections under a topic or domain.
292
+ #
293
+ # @param resource_group_name [String] The name of the resource group within the
294
+ # user's subscription.
295
+ # @param parent_type [Enum] The type of the parent resource. This can be either
296
+ # \'topics\' or \'domains\'. Possible values include: 'topics', 'domains'
297
+ # @param parent_name [String] The name of the parent resource (namely, either,
298
+ # the topic name or domain name).
299
+ # @param filter [String] The query used to filter the search results using
300
+ # OData syntax. Filtering is permitted on the 'name' property only and with
301
+ # limited number of OData operations. These operations are: the 'contains'
302
+ # function as well as the following logical operations: not, and, or, eq (for
303
+ # equal), and ne (for not equal). No arithmetic operations are supported. The
304
+ # following is a valid filter example: $filter=contains(namE, 'PATTERN') and
305
+ # name ne 'PATTERN-1'. The following is not a valid filter example:
306
+ # $filter=location eq 'westus'.
307
+ # @param top [Integer] The number of results to return per page for the list
308
+ # operation. Valid range for top parameter is 1 to 100. If not specified, the
309
+ # default number of results to be returned is 20 items per page.
310
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
311
+ # will be added to the HTTP request.
312
+ #
313
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
314
+ #
315
+ def list_by_resource_with_http_info(resource_group_name, parent_type, parent_name, filter:nil, top:nil, custom_headers:nil)
316
+ list_by_resource_async(resource_group_name, parent_type, parent_name, filter:filter, top:top, custom_headers:custom_headers).value!
317
+ end
318
+
319
+ #
320
+ # Lists all private endpoint connections under a resource.
321
+ #
322
+ # Get all private endpoint connections under a topic or domain.
323
+ #
324
+ # @param resource_group_name [String] The name of the resource group within the
325
+ # user's subscription.
326
+ # @param parent_type [Enum] The type of the parent resource. This can be either
327
+ # \'topics\' or \'domains\'. Possible values include: 'topics', 'domains'
328
+ # @param parent_name [String] The name of the parent resource (namely, either,
329
+ # the topic name or domain name).
330
+ # @param filter [String] The query used to filter the search results using
331
+ # OData syntax. Filtering is permitted on the 'name' property only and with
332
+ # limited number of OData operations. These operations are: the 'contains'
333
+ # function as well as the following logical operations: not, and, or, eq (for
334
+ # equal), and ne (for not equal). No arithmetic operations are supported. The
335
+ # following is a valid filter example: $filter=contains(namE, 'PATTERN') and
336
+ # name ne 'PATTERN-1'. The following is not a valid filter example:
337
+ # $filter=location eq 'westus'.
338
+ # @param top [Integer] The number of results to return per page for the list
339
+ # operation. Valid range for top parameter is 1 to 100. If not specified, the
340
+ # default number of results to be returned is 20 items per page.
341
+ # @param [Hash{String => String}] A hash of custom headers that will be added
342
+ # to the HTTP request.
343
+ #
344
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
345
+ #
346
+ def list_by_resource_async(resource_group_name, parent_type, parent_name, filter:nil, top:nil, custom_headers:nil)
347
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
348
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
349
+ fail ArgumentError, 'parent_type is nil' if parent_type.nil?
350
+ fail ArgumentError, 'parent_name is nil' if parent_name.nil?
351
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
352
+
353
+
354
+ request_headers = {}
355
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
356
+
357
+ # Set Headers
358
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
359
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
360
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{parentType}/{parentName}/privateEndpointConnections'
361
+
362
+ request_url = @base_url || @client.base_url
363
+
364
+ options = {
365
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
366
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'parentType' => parent_type,'parentName' => parent_name},
367
+ query_params: {'api-version' => @client.api_version,'$filter' => filter,'$top' => top},
368
+ headers: request_headers.merge(custom_headers || {}),
369
+ base_url: request_url
370
+ }
371
+ promise = @client.make_request_async(:get, path_template, options)
372
+
373
+ promise = promise.then do |result|
374
+ http_response = result.response
375
+ status_code = http_response.status
376
+ response_content = http_response.body
377
+ unless status_code == 200
378
+ error_model = JSON.load(response_content)
379
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
380
+ end
381
+
382
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
383
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
384
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
385
+ # Deserialize Response
386
+ if status_code == 200
387
+ begin
388
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
389
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::PrivateEndpointConnectionListResult.mapper()
390
+ result.body = @client.deserialize(result_mapper, parsed_response)
391
+ rescue Exception => e
392
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
393
+ end
394
+ end
395
+
396
+ result
397
+ end
398
+
399
+ promise.execute
400
+ end
401
+
402
+ #
403
+ # Update a specific private endpoint connection.
404
+ #
405
+ # Update a specific private endpoint connection under a topic or domain.
406
+ #
407
+ # @param resource_group_name [String] The name of the resource group within the
408
+ # user's subscription.
409
+ # @param parent_type [Enum] The type of the parent resource. This can be either
410
+ # \'topics\' or \'domains\'. Possible values include: 'topics', 'domains'
411
+ # @param parent_name [String] The name of the parent resource (namely, either,
412
+ # the topic name or domain name).
413
+ # @param private_endpoint_connection_name [String] The name of the private
414
+ # endpoint connection connection.
415
+ # @param private_endpoint_connection [PrivateEndpointConnection] The private
416
+ # endpoint connection object to update.
417
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
418
+ # will be added to the HTTP request.
419
+ #
420
+ # @return [PrivateEndpointConnection] operation results.
421
+ #
422
+ def begin_update(resource_group_name, parent_type, parent_name, private_endpoint_connection_name, private_endpoint_connection, custom_headers:nil)
423
+ response = begin_update_async(resource_group_name, parent_type, parent_name, private_endpoint_connection_name, private_endpoint_connection, custom_headers:custom_headers).value!
424
+ response.body unless response.nil?
425
+ end
426
+
427
+ #
428
+ # Update a specific private endpoint connection.
429
+ #
430
+ # Update a specific private endpoint connection under a topic or domain.
431
+ #
432
+ # @param resource_group_name [String] The name of the resource group within the
433
+ # user's subscription.
434
+ # @param parent_type [Enum] The type of the parent resource. This can be either
435
+ # \'topics\' or \'domains\'. Possible values include: 'topics', 'domains'
436
+ # @param parent_name [String] The name of the parent resource (namely, either,
437
+ # the topic name or domain name).
438
+ # @param private_endpoint_connection_name [String] The name of the private
439
+ # endpoint connection connection.
440
+ # @param private_endpoint_connection [PrivateEndpointConnection] The private
441
+ # endpoint connection object to update.
442
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
443
+ # will be added to the HTTP request.
444
+ #
445
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
446
+ #
447
+ def begin_update_with_http_info(resource_group_name, parent_type, parent_name, private_endpoint_connection_name, private_endpoint_connection, custom_headers:nil)
448
+ begin_update_async(resource_group_name, parent_type, parent_name, private_endpoint_connection_name, private_endpoint_connection, custom_headers:custom_headers).value!
449
+ end
450
+
451
+ #
452
+ # Update a specific private endpoint connection.
453
+ #
454
+ # Update a specific private endpoint connection under a topic or domain.
455
+ #
456
+ # @param resource_group_name [String] The name of the resource group within the
457
+ # user's subscription.
458
+ # @param parent_type [Enum] The type of the parent resource. This can be either
459
+ # \'topics\' or \'domains\'. Possible values include: 'topics', 'domains'
460
+ # @param parent_name [String] The name of the parent resource (namely, either,
461
+ # the topic name or domain name).
462
+ # @param private_endpoint_connection_name [String] The name of the private
463
+ # endpoint connection connection.
464
+ # @param private_endpoint_connection [PrivateEndpointConnection] The private
465
+ # endpoint connection object to update.
466
+ # @param [Hash{String => String}] A hash of custom headers that will be added
467
+ # to the HTTP request.
468
+ #
469
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
470
+ #
471
+ def begin_update_async(resource_group_name, parent_type, parent_name, private_endpoint_connection_name, private_endpoint_connection, custom_headers:nil)
472
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
473
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
474
+ fail ArgumentError, 'parent_type is nil' if parent_type.nil?
475
+ fail ArgumentError, 'parent_name is nil' if parent_name.nil?
476
+ fail ArgumentError, 'private_endpoint_connection_name is nil' if private_endpoint_connection_name.nil?
477
+ fail ArgumentError, 'private_endpoint_connection is nil' if private_endpoint_connection.nil?
478
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
479
+
480
+
481
+ request_headers = {}
482
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
483
+
484
+ # Set Headers
485
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
486
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
487
+
488
+ # Serialize Request
489
+ request_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::PrivateEndpointConnection.mapper()
490
+ request_content = @client.serialize(request_mapper, private_endpoint_connection)
491
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
492
+
493
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{parentType}/{parentName}/privateEndpointConnections/{privateEndpointConnectionName}'
494
+
495
+ request_url = @base_url || @client.base_url
496
+
497
+ options = {
498
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
499
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'parentType' => parent_type,'parentName' => parent_name,'privateEndpointConnectionName' => private_endpoint_connection_name},
500
+ query_params: {'api-version' => @client.api_version},
501
+ body: request_content,
502
+ headers: request_headers.merge(custom_headers || {}),
503
+ base_url: request_url
504
+ }
505
+ promise = @client.make_request_async(:put, path_template, options)
506
+
507
+ promise = promise.then do |result|
508
+ http_response = result.response
509
+ status_code = http_response.status
510
+ response_content = http_response.body
511
+ unless status_code == 200 || status_code == 201
512
+ error_model = JSON.load(response_content)
513
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
514
+ end
515
+
516
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
517
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
518
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
519
+ # Deserialize Response
520
+ if status_code == 200
521
+ begin
522
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
523
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::PrivateEndpointConnection.mapper()
524
+ result.body = @client.deserialize(result_mapper, parsed_response)
525
+ rescue Exception => e
526
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
527
+ end
528
+ end
529
+ # Deserialize Response
530
+ if status_code == 201
531
+ begin
532
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
533
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::PrivateEndpointConnection.mapper()
534
+ result.body = @client.deserialize(result_mapper, parsed_response)
535
+ rescue Exception => e
536
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
537
+ end
538
+ end
539
+
540
+ result
541
+ end
542
+
543
+ promise.execute
544
+ end
545
+
546
+ #
547
+ # Delete a specific private endpoint connection.
548
+ #
549
+ # Delete a specific private endpoint connection under a topic or domain.
550
+ #
551
+ # @param resource_group_name [String] The name of the resource group within the
552
+ # user's subscription.
553
+ # @param parent_type [Enum] The type of the parent resource. This can be either
554
+ # \'topics\' or \'domains\'. Possible values include: 'topics', 'domains'
555
+ # @param parent_name [String] The name of the parent resource (namely, either,
556
+ # the topic name or domain name).
557
+ # @param private_endpoint_connection_name [String] The name of the private
558
+ # endpoint connection connection.
559
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
560
+ # will be added to the HTTP request.
561
+ #
562
+ #
563
+ def begin_delete(resource_group_name, parent_type, parent_name, private_endpoint_connection_name, custom_headers:nil)
564
+ response = begin_delete_async(resource_group_name, parent_type, parent_name, private_endpoint_connection_name, custom_headers:custom_headers).value!
565
+ nil
566
+ end
567
+
568
+ #
569
+ # Delete a specific private endpoint connection.
570
+ #
571
+ # Delete a specific private endpoint connection under a topic or domain.
572
+ #
573
+ # @param resource_group_name [String] The name of the resource group within the
574
+ # user's subscription.
575
+ # @param parent_type [Enum] The type of the parent resource. This can be either
576
+ # \'topics\' or \'domains\'. Possible values include: 'topics', 'domains'
577
+ # @param parent_name [String] The name of the parent resource (namely, either,
578
+ # the topic name or domain name).
579
+ # @param private_endpoint_connection_name [String] The name of the private
580
+ # endpoint connection connection.
581
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
582
+ # will be added to the HTTP request.
583
+ #
584
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
585
+ #
586
+ def begin_delete_with_http_info(resource_group_name, parent_type, parent_name, private_endpoint_connection_name, custom_headers:nil)
587
+ begin_delete_async(resource_group_name, parent_type, parent_name, private_endpoint_connection_name, custom_headers:custom_headers).value!
588
+ end
589
+
590
+ #
591
+ # Delete a specific private endpoint connection.
592
+ #
593
+ # Delete a specific private endpoint connection under a topic or domain.
594
+ #
595
+ # @param resource_group_name [String] The name of the resource group within the
596
+ # user's subscription.
597
+ # @param parent_type [Enum] The type of the parent resource. This can be either
598
+ # \'topics\' or \'domains\'. Possible values include: 'topics', 'domains'
599
+ # @param parent_name [String] The name of the parent resource (namely, either,
600
+ # the topic name or domain name).
601
+ # @param private_endpoint_connection_name [String] The name of the private
602
+ # endpoint connection connection.
603
+ # @param [Hash{String => String}] A hash of custom headers that will be added
604
+ # to the HTTP request.
605
+ #
606
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
607
+ #
608
+ def begin_delete_async(resource_group_name, parent_type, parent_name, private_endpoint_connection_name, custom_headers:nil)
609
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
610
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
611
+ fail ArgumentError, 'parent_type is nil' if parent_type.nil?
612
+ fail ArgumentError, 'parent_name is nil' if parent_name.nil?
613
+ fail ArgumentError, 'private_endpoint_connection_name is nil' if private_endpoint_connection_name.nil?
614
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
615
+
616
+
617
+ request_headers = {}
618
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
619
+
620
+ # Set Headers
621
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
622
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
623
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{parentType}/{parentName}/privateEndpointConnections/{privateEndpointConnectionName}'
624
+
625
+ request_url = @base_url || @client.base_url
626
+
627
+ options = {
628
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
629
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'parentType' => parent_type,'parentName' => parent_name,'privateEndpointConnectionName' => private_endpoint_connection_name},
630
+ query_params: {'api-version' => @client.api_version},
631
+ headers: request_headers.merge(custom_headers || {}),
632
+ base_url: request_url
633
+ }
634
+ promise = @client.make_request_async(:delete, path_template, options)
635
+
636
+ promise = promise.then do |result|
637
+ http_response = result.response
638
+ status_code = http_response.status
639
+ response_content = http_response.body
640
+ unless status_code == 202 || status_code == 204
641
+ error_model = JSON.load(response_content)
642
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
643
+ end
644
+
645
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
646
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
647
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
648
+
649
+ result
650
+ end
651
+
652
+ promise.execute
653
+ end
654
+
655
+ #
656
+ # Lists all private endpoint connections under a resource.
657
+ #
658
+ # Get all private endpoint connections under a topic or domain.
659
+ #
660
+ # @param next_page_link [String] The NextLink from the previous successful call
661
+ # to List operation.
662
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
663
+ # will be added to the HTTP request.
664
+ #
665
+ # @return [PrivateEndpointConnectionListResult] operation results.
666
+ #
667
+ def list_by_resource_next(next_page_link, custom_headers:nil)
668
+ response = list_by_resource_next_async(next_page_link, custom_headers:custom_headers).value!
669
+ response.body unless response.nil?
670
+ end
671
+
672
+ #
673
+ # Lists all private endpoint connections under a resource.
674
+ #
675
+ # Get all private endpoint connections under a topic or domain.
676
+ #
677
+ # @param next_page_link [String] The NextLink from the previous successful call
678
+ # to List operation.
679
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
680
+ # will be added to the HTTP request.
681
+ #
682
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
683
+ #
684
+ def list_by_resource_next_with_http_info(next_page_link, custom_headers:nil)
685
+ list_by_resource_next_async(next_page_link, custom_headers:custom_headers).value!
686
+ end
687
+
688
+ #
689
+ # Lists all private endpoint connections under a resource.
690
+ #
691
+ # Get all private endpoint connections under a topic or domain.
692
+ #
693
+ # @param next_page_link [String] The NextLink from the previous successful call
694
+ # to List operation.
695
+ # @param [Hash{String => String}] A hash of custom headers that will be added
696
+ # to the HTTP request.
697
+ #
698
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
699
+ #
700
+ def list_by_resource_next_async(next_page_link, custom_headers:nil)
701
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
702
+
703
+
704
+ request_headers = {}
705
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
706
+
707
+ # Set Headers
708
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
709
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
710
+ path_template = '{nextLink}'
711
+
712
+ request_url = @base_url || @client.base_url
713
+
714
+ options = {
715
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
716
+ skip_encoding_path_params: {'nextLink' => next_page_link},
717
+ headers: request_headers.merge(custom_headers || {}),
718
+ base_url: request_url
719
+ }
720
+ promise = @client.make_request_async(:get, path_template, options)
721
+
722
+ promise = promise.then do |result|
723
+ http_response = result.response
724
+ status_code = http_response.status
725
+ response_content = http_response.body
726
+ unless status_code == 200
727
+ error_model = JSON.load(response_content)
728
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
729
+ end
730
+
731
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
732
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
733
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
734
+ # Deserialize Response
735
+ if status_code == 200
736
+ begin
737
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
738
+ result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::PrivateEndpointConnectionListResult.mapper()
739
+ result.body = @client.deserialize(result_mapper, parsed_response)
740
+ rescue Exception => e
741
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
742
+ end
743
+ end
744
+
745
+ result
746
+ end
747
+
748
+ promise.execute
749
+ end
750
+
751
+ #
752
+ # Lists all private endpoint connections under a resource.
753
+ #
754
+ # Get all private endpoint connections under a topic or domain.
755
+ #
756
+ # @param resource_group_name [String] The name of the resource group within the
757
+ # user's subscription.
758
+ # @param parent_type [Enum] The type of the parent resource. This can be either
759
+ # \'topics\' or \'domains\'. Possible values include: 'topics', 'domains'
760
+ # @param parent_name [String] The name of the parent resource (namely, either,
761
+ # the topic name or domain name).
762
+ # @param filter [String] The query used to filter the search results using
763
+ # OData syntax. Filtering is permitted on the 'name' property only and with
764
+ # limited number of OData operations. These operations are: the 'contains'
765
+ # function as well as the following logical operations: not, and, or, eq (for
766
+ # equal), and ne (for not equal). No arithmetic operations are supported. The
767
+ # following is a valid filter example: $filter=contains(namE, 'PATTERN') and
768
+ # name ne 'PATTERN-1'. The following is not a valid filter example:
769
+ # $filter=location eq 'westus'.
770
+ # @param top [Integer] The number of results to return per page for the list
771
+ # operation. Valid range for top parameter is 1 to 100. If not specified, the
772
+ # default number of results to be returned is 20 items per page.
773
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
774
+ # will be added to the HTTP request.
775
+ #
776
+ # @return [PrivateEndpointConnectionListResult] which provide lazy access to
777
+ # pages of the response.
778
+ #
779
+ def list_by_resource_as_lazy(resource_group_name, parent_type, parent_name, filter:nil, top:nil, custom_headers:nil)
780
+ response = list_by_resource_async(resource_group_name, parent_type, parent_name, filter:filter, top:top, custom_headers:custom_headers).value!
781
+ unless response.nil?
782
+ page = response.body
783
+ page.next_method = Proc.new do |next_page_link|
784
+ list_by_resource_next_async(next_page_link, custom_headers:custom_headers)
785
+ end
786
+ page
787
+ end
788
+ end
789
+
790
+ end
791
+ end