azure_mgmt_datashare 0.17.0 → 0.17.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/data_share_management_client.rb +1 -1
- data/lib/2019-11-01/generated/azure_mgmt_datashare.rb +121 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/accounts.rb +981 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/consumer_invitations.rb +442 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/consumer_source_data_sets.rb +254 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/data_set_mappings.rb +603 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/data_sets.rb +631 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/data_share_management_client.rb +175 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/invitations.rb +587 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/account.rb +147 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/account_list.rb +99 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/account_update_parameters.rb +54 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/adlsgen1file_data_set.rb +144 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/adlsgen1folder_data_set.rb +133 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/adlsgen2file_data_set.rb +144 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/adlsgen2file_data_set_mapping.rb +182 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/adlsgen2file_system_data_set.rb +133 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/adlsgen2file_system_data_set_mapping.rb +159 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/adlsgen2folder_data_set.rb +144 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/adlsgen2folder_data_set_mapping.rb +170 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/blob_container_data_set.rb +133 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/blob_container_data_set_mapping.rb +159 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/blob_data_set.rb +144 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/blob_data_set_mapping.rb +182 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/blob_folder_data_set.rb +144 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/blob_folder_data_set_mapping.rb +170 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/consumer_invitation.rb +230 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/consumer_invitation_list.rb +99 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/consumer_source_data_set.rb +125 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/consumer_source_data_set_list.rb +99 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/data_set.rb +71 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/data_set_list.rb +101 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/data_set_mapping.rb +71 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/data_set_mapping_list.rb +101 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/data_set_mapping_status.rb +16 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/data_set_type.rb +26 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/data_share_error.rb +47 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/data_share_error_info.rb +88 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/default_dto.rb +101 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/dimension_properties.rb +57 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/identity.rb +70 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/invitation.rb +171 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/invitation_list.rb +99 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/invitation_status.rb +18 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/kusto_cluster_data_set.rb +126 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/kusto_cluster_data_set_mapping.rb +138 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/kusto_database_data_set.rb +126 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/kusto_database_data_set_mapping.rb +138 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/operation_list.rb +99 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/operation_meta_log_specification.rb +68 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/operation_meta_metric_specification.rb +181 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/operation_meta_service_specification.rb +77 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/operation_model.rb +81 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/operation_model_properties.rb +79 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/operation_response.rb +82 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/output_type.rb +16 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/provider_share_subscription.rb +175 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/provider_share_subscription_list.rb +99 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/provisioning_state.rb +19 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/proxy_dto.rb +71 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/recurrence_interval.rb +16 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/scheduled_source_synchronization_setting.rb +73 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/scheduled_synchronization_setting.rb +140 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/scheduled_trigger.rb +162 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/share.rb +146 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/share_kind.rb +16 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/share_list.rb +98 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/share_subscription.rb +233 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/share_subscription_list.rb +99 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/share_subscription_status.rb +18 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/share_subscription_synchronization.rb +119 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/share_subscription_synchronization_list.rb +99 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/share_synchronization.rb +148 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/share_synchronization_list.rb +99 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/source_share_synchronization_setting.rb +46 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/source_share_synchronization_setting_list.rb +101 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/sql_dbtable_data_set.rb +133 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/sql_dbtable_data_set_mapping.rb +159 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/sql_dwtable_data_set.rb +133 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/sql_dwtable_data_set_mapping.rb +159 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/status.rb +20 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/synchronization_details.rb +221 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/synchronization_details_list.rb +99 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/synchronization_mode.rb +16 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/synchronization_setting.rb +71 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/synchronization_setting_list.rb +101 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/synchronize.rb +48 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/trigger.rb +71 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/trigger_list.rb +101 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/trigger_status.rb +17 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/models/type.rb +15 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/module_definition.rb +9 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/operations.rb +232 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/provider_share_subscriptions.rb +636 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/share_subscriptions.rb +1685 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/shares.rb +1101 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/synchronization_settings.rb +664 -0
- data/lib/2019-11-01/generated/azure_mgmt_datashare/triggers.rb +701 -0
- data/lib/azure_mgmt_datashare.rb +1 -0
- data/lib/profiles/latest/modules/datashare_profile_module.rb +212 -196
- data/lib/version.rb +1 -1
- metadata +99 -2
@@ -0,0 +1,701 @@
|
|
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::DataShare::Mgmt::V2019_11_01
|
7
|
+
#
|
8
|
+
# Creates a Microsoft.DataShare management client.
|
9
|
+
#
|
10
|
+
class Triggers
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the Triggers class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [DataShareManagementClient] reference to the DataShareManagementClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Get Trigger in a shareSubscription.
|
26
|
+
#
|
27
|
+
# Get a Trigger in a shareSubscription
|
28
|
+
#
|
29
|
+
# @param resource_group_name [String] The resource group name.
|
30
|
+
# @param account_name [String] The name of the share account.
|
31
|
+
# @param share_subscription_name [String] The name of the shareSubscription.
|
32
|
+
# @param trigger_name [String] The name of the trigger.
|
33
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
34
|
+
# will be added to the HTTP request.
|
35
|
+
#
|
36
|
+
# @return [Trigger] operation results.
|
37
|
+
#
|
38
|
+
def get(resource_group_name, account_name, share_subscription_name, trigger_name, custom_headers:nil)
|
39
|
+
response = get_async(resource_group_name, account_name, share_subscription_name, trigger_name, custom_headers:custom_headers).value!
|
40
|
+
response.body unless response.nil?
|
41
|
+
end
|
42
|
+
|
43
|
+
#
|
44
|
+
# Get Trigger in a shareSubscription.
|
45
|
+
#
|
46
|
+
# Get a Trigger in a shareSubscription
|
47
|
+
#
|
48
|
+
# @param resource_group_name [String] The resource group name.
|
49
|
+
# @param account_name [String] The name of the share account.
|
50
|
+
# @param share_subscription_name [String] The name of the shareSubscription.
|
51
|
+
# @param trigger_name [String] The name of the trigger.
|
52
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
53
|
+
# will be added to the HTTP request.
|
54
|
+
#
|
55
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
56
|
+
#
|
57
|
+
def get_with_http_info(resource_group_name, account_name, share_subscription_name, trigger_name, custom_headers:nil)
|
58
|
+
get_async(resource_group_name, account_name, share_subscription_name, trigger_name, custom_headers:custom_headers).value!
|
59
|
+
end
|
60
|
+
|
61
|
+
#
|
62
|
+
# Get Trigger in a shareSubscription.
|
63
|
+
#
|
64
|
+
# Get a Trigger in a shareSubscription
|
65
|
+
#
|
66
|
+
# @param resource_group_name [String] The resource group name.
|
67
|
+
# @param account_name [String] The name of the share account.
|
68
|
+
# @param share_subscription_name [String] The name of the shareSubscription.
|
69
|
+
# @param trigger_name [String] The name of the trigger.
|
70
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
71
|
+
# to the HTTP request.
|
72
|
+
#
|
73
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
74
|
+
#
|
75
|
+
def get_async(resource_group_name, account_name, share_subscription_name, trigger_name, custom_headers:nil)
|
76
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
77
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
78
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
79
|
+
fail ArgumentError, 'share_subscription_name is nil' if share_subscription_name.nil?
|
80
|
+
fail ArgumentError, 'trigger_name is nil' if trigger_name.nil?
|
81
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
82
|
+
|
83
|
+
|
84
|
+
request_headers = {}
|
85
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
86
|
+
|
87
|
+
# Set Headers
|
88
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
89
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
90
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/triggers/{triggerName}'
|
91
|
+
|
92
|
+
request_url = @base_url || @client.base_url
|
93
|
+
|
94
|
+
options = {
|
95
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
96
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'shareSubscriptionName' => share_subscription_name,'triggerName' => trigger_name},
|
97
|
+
query_params: {'api-version' => @client.api_version},
|
98
|
+
headers: request_headers.merge(custom_headers || {}),
|
99
|
+
base_url: request_url
|
100
|
+
}
|
101
|
+
promise = @client.make_request_async(:get, path_template, options)
|
102
|
+
|
103
|
+
promise = promise.then do |result|
|
104
|
+
http_response = result.response
|
105
|
+
status_code = http_response.status
|
106
|
+
response_content = http_response.body
|
107
|
+
unless status_code == 200
|
108
|
+
error_model = JSON.load(response_content)
|
109
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
110
|
+
end
|
111
|
+
|
112
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
113
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
114
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
115
|
+
# Deserialize Response
|
116
|
+
if status_code == 200
|
117
|
+
begin
|
118
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
119
|
+
result_mapper = Azure::DataShare::Mgmt::V2019_11_01::Models::Trigger.mapper()
|
120
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
121
|
+
rescue Exception => e
|
122
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
result
|
127
|
+
end
|
128
|
+
|
129
|
+
promise.execute
|
130
|
+
end
|
131
|
+
|
132
|
+
#
|
133
|
+
# This method creates a trigger for a share subscription
|
134
|
+
#
|
135
|
+
# Create a Trigger
|
136
|
+
#
|
137
|
+
# @param resource_group_name [String] The resource group name.
|
138
|
+
# @param account_name [String] The name of the share account.
|
139
|
+
# @param share_subscription_name [String] The name of the share subscription
|
140
|
+
# which will hold the data set sink.
|
141
|
+
# @param trigger_name [String] The name of the trigger.
|
142
|
+
# @param trigger [Trigger] Trigger details.
|
143
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
144
|
+
# will be added to the HTTP request.
|
145
|
+
#
|
146
|
+
# @return [Trigger] operation results.
|
147
|
+
#
|
148
|
+
def create(resource_group_name, account_name, share_subscription_name, trigger_name, trigger, custom_headers:nil)
|
149
|
+
response = create_async(resource_group_name, account_name, share_subscription_name, trigger_name, trigger, custom_headers:custom_headers).value!
|
150
|
+
response.body unless response.nil?
|
151
|
+
end
|
152
|
+
|
153
|
+
#
|
154
|
+
# @param resource_group_name [String] The resource group name.
|
155
|
+
# @param account_name [String] The name of the share account.
|
156
|
+
# @param share_subscription_name [String] The name of the share subscription
|
157
|
+
# which will hold the data set sink.
|
158
|
+
# @param trigger_name [String] The name of the trigger.
|
159
|
+
# @param trigger [Trigger] Trigger details.
|
160
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
161
|
+
# will be added to the HTTP request.
|
162
|
+
#
|
163
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
164
|
+
# response.
|
165
|
+
#
|
166
|
+
def create_async(resource_group_name, account_name, share_subscription_name, trigger_name, trigger, custom_headers:nil)
|
167
|
+
# Send request
|
168
|
+
promise = begin_create_async(resource_group_name, account_name, share_subscription_name, trigger_name, trigger, custom_headers:custom_headers)
|
169
|
+
|
170
|
+
promise = promise.then do |response|
|
171
|
+
# Defining deserialization method.
|
172
|
+
deserialize_method = lambda do |parsed_response|
|
173
|
+
result_mapper = Azure::DataShare::Mgmt::V2019_11_01::Models::Trigger.mapper()
|
174
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
175
|
+
end
|
176
|
+
|
177
|
+
# Waiting for response.
|
178
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
179
|
+
end
|
180
|
+
|
181
|
+
promise
|
182
|
+
end
|
183
|
+
|
184
|
+
#
|
185
|
+
# Delete Trigger in a shareSubscription.
|
186
|
+
#
|
187
|
+
# Delete a Trigger in a shareSubscription
|
188
|
+
#
|
189
|
+
# @param resource_group_name [String] The resource group name.
|
190
|
+
# @param account_name [String] The name of the share account.
|
191
|
+
# @param share_subscription_name [String] The name of the shareSubscription.
|
192
|
+
# @param trigger_name [String] The name of the trigger.
|
193
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
194
|
+
# will be added to the HTTP request.
|
195
|
+
#
|
196
|
+
# @return [OperationResponse] operation results.
|
197
|
+
#
|
198
|
+
def delete(resource_group_name, account_name, share_subscription_name, trigger_name, custom_headers:nil)
|
199
|
+
response = delete_async(resource_group_name, account_name, share_subscription_name, trigger_name, custom_headers:custom_headers).value!
|
200
|
+
response.body unless response.nil?
|
201
|
+
end
|
202
|
+
|
203
|
+
#
|
204
|
+
# @param resource_group_name [String] The resource group name.
|
205
|
+
# @param account_name [String] The name of the share account.
|
206
|
+
# @param share_subscription_name [String] The name of the shareSubscription.
|
207
|
+
# @param trigger_name [String] The name of the trigger.
|
208
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
209
|
+
# will be added to the HTTP request.
|
210
|
+
#
|
211
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
212
|
+
# response.
|
213
|
+
#
|
214
|
+
def delete_async(resource_group_name, account_name, share_subscription_name, trigger_name, custom_headers:nil)
|
215
|
+
# Send request
|
216
|
+
promise = begin_delete_async(resource_group_name, account_name, share_subscription_name, trigger_name, custom_headers:custom_headers)
|
217
|
+
|
218
|
+
promise = promise.then do |response|
|
219
|
+
# Defining deserialization method.
|
220
|
+
deserialize_method = lambda do |parsed_response|
|
221
|
+
result_mapper = Azure::DataShare::Mgmt::V2019_11_01::Models::OperationResponse.mapper()
|
222
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
223
|
+
end
|
224
|
+
|
225
|
+
# Waiting for response.
|
226
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
227
|
+
end
|
228
|
+
|
229
|
+
promise
|
230
|
+
end
|
231
|
+
|
232
|
+
#
|
233
|
+
# List Triggers in a share subscription.
|
234
|
+
#
|
235
|
+
# List Triggers in a share subscription
|
236
|
+
#
|
237
|
+
# @param resource_group_name [String] The resource group name.
|
238
|
+
# @param account_name [String] The name of the share account.
|
239
|
+
# @param share_subscription_name [String] The name of the share subscription.
|
240
|
+
# @param skip_token [String] Continuation token
|
241
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
242
|
+
# will be added to the HTTP request.
|
243
|
+
#
|
244
|
+
# @return [Array<Trigger>] operation results.
|
245
|
+
#
|
246
|
+
def list_by_share_subscription(resource_group_name, account_name, share_subscription_name, skip_token:nil, custom_headers:nil)
|
247
|
+
first_page = list_by_share_subscription_as_lazy(resource_group_name, account_name, share_subscription_name, skip_token:skip_token, custom_headers:custom_headers)
|
248
|
+
first_page.get_all_items
|
249
|
+
end
|
250
|
+
|
251
|
+
#
|
252
|
+
# List Triggers in a share subscription.
|
253
|
+
#
|
254
|
+
# List Triggers in a share subscription
|
255
|
+
#
|
256
|
+
# @param resource_group_name [String] The resource group name.
|
257
|
+
# @param account_name [String] The name of the share account.
|
258
|
+
# @param share_subscription_name [String] The name of the share subscription.
|
259
|
+
# @param skip_token [String] Continuation token
|
260
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
261
|
+
# will be added to the HTTP request.
|
262
|
+
#
|
263
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
264
|
+
#
|
265
|
+
def list_by_share_subscription_with_http_info(resource_group_name, account_name, share_subscription_name, skip_token:nil, custom_headers:nil)
|
266
|
+
list_by_share_subscription_async(resource_group_name, account_name, share_subscription_name, skip_token:skip_token, custom_headers:custom_headers).value!
|
267
|
+
end
|
268
|
+
|
269
|
+
#
|
270
|
+
# List Triggers in a share subscription.
|
271
|
+
#
|
272
|
+
# List Triggers in a share subscription
|
273
|
+
#
|
274
|
+
# @param resource_group_name [String] The resource group name.
|
275
|
+
# @param account_name [String] The name of the share account.
|
276
|
+
# @param share_subscription_name [String] The name of the share subscription.
|
277
|
+
# @param skip_token [String] Continuation token
|
278
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
279
|
+
# to the HTTP request.
|
280
|
+
#
|
281
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
282
|
+
#
|
283
|
+
def list_by_share_subscription_async(resource_group_name, account_name, share_subscription_name, skip_token:nil, custom_headers:nil)
|
284
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
285
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
286
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
287
|
+
fail ArgumentError, 'share_subscription_name is nil' if share_subscription_name.nil?
|
288
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
289
|
+
|
290
|
+
|
291
|
+
request_headers = {}
|
292
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
293
|
+
|
294
|
+
# Set Headers
|
295
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
296
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
297
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/triggers'
|
298
|
+
|
299
|
+
request_url = @base_url || @client.base_url
|
300
|
+
|
301
|
+
options = {
|
302
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
303
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'shareSubscriptionName' => share_subscription_name},
|
304
|
+
query_params: {'api-version' => @client.api_version,'$skipToken' => skip_token},
|
305
|
+
headers: request_headers.merge(custom_headers || {}),
|
306
|
+
base_url: request_url
|
307
|
+
}
|
308
|
+
promise = @client.make_request_async(:get, path_template, options)
|
309
|
+
|
310
|
+
promise = promise.then do |result|
|
311
|
+
http_response = result.response
|
312
|
+
status_code = http_response.status
|
313
|
+
response_content = http_response.body
|
314
|
+
unless status_code == 200
|
315
|
+
error_model = JSON.load(response_content)
|
316
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
317
|
+
end
|
318
|
+
|
319
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
320
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
321
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
322
|
+
# Deserialize Response
|
323
|
+
if status_code == 200
|
324
|
+
begin
|
325
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
326
|
+
result_mapper = Azure::DataShare::Mgmt::V2019_11_01::Models::TriggerList.mapper()
|
327
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
328
|
+
rescue Exception => e
|
329
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
330
|
+
end
|
331
|
+
end
|
332
|
+
|
333
|
+
result
|
334
|
+
end
|
335
|
+
|
336
|
+
promise.execute
|
337
|
+
end
|
338
|
+
|
339
|
+
#
|
340
|
+
# This method creates a trigger for a share subscription
|
341
|
+
#
|
342
|
+
# Create a Trigger
|
343
|
+
#
|
344
|
+
# @param resource_group_name [String] The resource group name.
|
345
|
+
# @param account_name [String] The name of the share account.
|
346
|
+
# @param share_subscription_name [String] The name of the share subscription
|
347
|
+
# which will hold the data set sink.
|
348
|
+
# @param trigger_name [String] The name of the trigger.
|
349
|
+
# @param trigger [Trigger] Trigger details.
|
350
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
351
|
+
# will be added to the HTTP request.
|
352
|
+
#
|
353
|
+
# @return [Trigger] operation results.
|
354
|
+
#
|
355
|
+
def begin_create(resource_group_name, account_name, share_subscription_name, trigger_name, trigger, custom_headers:nil)
|
356
|
+
response = begin_create_async(resource_group_name, account_name, share_subscription_name, trigger_name, trigger, custom_headers:custom_headers).value!
|
357
|
+
response.body unless response.nil?
|
358
|
+
end
|
359
|
+
|
360
|
+
#
|
361
|
+
# This method creates a trigger for a share subscription
|
362
|
+
#
|
363
|
+
# Create a Trigger
|
364
|
+
#
|
365
|
+
# @param resource_group_name [String] The resource group name.
|
366
|
+
# @param account_name [String] The name of the share account.
|
367
|
+
# @param share_subscription_name [String] The name of the share subscription
|
368
|
+
# which will hold the data set sink.
|
369
|
+
# @param trigger_name [String] The name of the trigger.
|
370
|
+
# @param trigger [Trigger] Trigger details.
|
371
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
372
|
+
# will be added to the HTTP request.
|
373
|
+
#
|
374
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
375
|
+
#
|
376
|
+
def begin_create_with_http_info(resource_group_name, account_name, share_subscription_name, trigger_name, trigger, custom_headers:nil)
|
377
|
+
begin_create_async(resource_group_name, account_name, share_subscription_name, trigger_name, trigger, custom_headers:custom_headers).value!
|
378
|
+
end
|
379
|
+
|
380
|
+
#
|
381
|
+
# This method creates a trigger for a share subscription
|
382
|
+
#
|
383
|
+
# Create a Trigger
|
384
|
+
#
|
385
|
+
# @param resource_group_name [String] The resource group name.
|
386
|
+
# @param account_name [String] The name of the share account.
|
387
|
+
# @param share_subscription_name [String] The name of the share subscription
|
388
|
+
# which will hold the data set sink.
|
389
|
+
# @param trigger_name [String] The name of the trigger.
|
390
|
+
# @param trigger [Trigger] Trigger details.
|
391
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
392
|
+
# to the HTTP request.
|
393
|
+
#
|
394
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
395
|
+
#
|
396
|
+
def begin_create_async(resource_group_name, account_name, share_subscription_name, trigger_name, trigger, custom_headers:nil)
|
397
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
398
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
399
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
400
|
+
fail ArgumentError, 'share_subscription_name is nil' if share_subscription_name.nil?
|
401
|
+
fail ArgumentError, 'trigger_name is nil' if trigger_name.nil?
|
402
|
+
fail ArgumentError, 'trigger is nil' if trigger.nil?
|
403
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
404
|
+
|
405
|
+
|
406
|
+
request_headers = {}
|
407
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
408
|
+
|
409
|
+
# Set Headers
|
410
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
411
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
412
|
+
|
413
|
+
# Serialize Request
|
414
|
+
request_mapper = Azure::DataShare::Mgmt::V2019_11_01::Models::Trigger.mapper()
|
415
|
+
request_content = @client.serialize(request_mapper, trigger)
|
416
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
417
|
+
|
418
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/triggers/{triggerName}'
|
419
|
+
|
420
|
+
request_url = @base_url || @client.base_url
|
421
|
+
|
422
|
+
options = {
|
423
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
424
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'shareSubscriptionName' => share_subscription_name,'triggerName' => trigger_name},
|
425
|
+
query_params: {'api-version' => @client.api_version},
|
426
|
+
body: request_content,
|
427
|
+
headers: request_headers.merge(custom_headers || {}),
|
428
|
+
base_url: request_url
|
429
|
+
}
|
430
|
+
promise = @client.make_request_async(:put, path_template, options)
|
431
|
+
|
432
|
+
promise = promise.then do |result|
|
433
|
+
http_response = result.response
|
434
|
+
status_code = http_response.status
|
435
|
+
response_content = http_response.body
|
436
|
+
unless status_code == 201 || status_code == 200
|
437
|
+
error_model = JSON.load(response_content)
|
438
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
439
|
+
end
|
440
|
+
|
441
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
442
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
443
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
444
|
+
# Deserialize Response
|
445
|
+
if status_code == 201
|
446
|
+
begin
|
447
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
448
|
+
result_mapper = Azure::DataShare::Mgmt::V2019_11_01::Models::Trigger.mapper()
|
449
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
450
|
+
rescue Exception => e
|
451
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
452
|
+
end
|
453
|
+
end
|
454
|
+
# Deserialize Response
|
455
|
+
if status_code == 200
|
456
|
+
begin
|
457
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
458
|
+
result_mapper = Azure::DataShare::Mgmt::V2019_11_01::Models::Trigger.mapper()
|
459
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
460
|
+
rescue Exception => e
|
461
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
462
|
+
end
|
463
|
+
end
|
464
|
+
|
465
|
+
result
|
466
|
+
end
|
467
|
+
|
468
|
+
promise.execute
|
469
|
+
end
|
470
|
+
|
471
|
+
#
|
472
|
+
# Delete Trigger in a shareSubscription.
|
473
|
+
#
|
474
|
+
# Delete a Trigger in a shareSubscription
|
475
|
+
#
|
476
|
+
# @param resource_group_name [String] The resource group name.
|
477
|
+
# @param account_name [String] The name of the share account.
|
478
|
+
# @param share_subscription_name [String] The name of the shareSubscription.
|
479
|
+
# @param trigger_name [String] The name of the trigger.
|
480
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
481
|
+
# will be added to the HTTP request.
|
482
|
+
#
|
483
|
+
# @return [OperationResponse] operation results.
|
484
|
+
#
|
485
|
+
def begin_delete(resource_group_name, account_name, share_subscription_name, trigger_name, custom_headers:nil)
|
486
|
+
response = begin_delete_async(resource_group_name, account_name, share_subscription_name, trigger_name, custom_headers:custom_headers).value!
|
487
|
+
response.body unless response.nil?
|
488
|
+
end
|
489
|
+
|
490
|
+
#
|
491
|
+
# Delete Trigger in a shareSubscription.
|
492
|
+
#
|
493
|
+
# Delete a Trigger in a shareSubscription
|
494
|
+
#
|
495
|
+
# @param resource_group_name [String] The resource group name.
|
496
|
+
# @param account_name [String] The name of the share account.
|
497
|
+
# @param share_subscription_name [String] The name of the shareSubscription.
|
498
|
+
# @param trigger_name [String] The name of the trigger.
|
499
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
500
|
+
# will be added to the HTTP request.
|
501
|
+
#
|
502
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
503
|
+
#
|
504
|
+
def begin_delete_with_http_info(resource_group_name, account_name, share_subscription_name, trigger_name, custom_headers:nil)
|
505
|
+
begin_delete_async(resource_group_name, account_name, share_subscription_name, trigger_name, custom_headers:custom_headers).value!
|
506
|
+
end
|
507
|
+
|
508
|
+
#
|
509
|
+
# Delete Trigger in a shareSubscription.
|
510
|
+
#
|
511
|
+
# Delete a Trigger in a shareSubscription
|
512
|
+
#
|
513
|
+
# @param resource_group_name [String] The resource group name.
|
514
|
+
# @param account_name [String] The name of the share account.
|
515
|
+
# @param share_subscription_name [String] The name of the shareSubscription.
|
516
|
+
# @param trigger_name [String] The name of the trigger.
|
517
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
518
|
+
# to the HTTP request.
|
519
|
+
#
|
520
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
521
|
+
#
|
522
|
+
def begin_delete_async(resource_group_name, account_name, share_subscription_name, trigger_name, custom_headers:nil)
|
523
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
524
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
525
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
526
|
+
fail ArgumentError, 'share_subscription_name is nil' if share_subscription_name.nil?
|
527
|
+
fail ArgumentError, 'trigger_name is nil' if trigger_name.nil?
|
528
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
529
|
+
|
530
|
+
|
531
|
+
request_headers = {}
|
532
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
533
|
+
|
534
|
+
# Set Headers
|
535
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
536
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
537
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/triggers/{triggerName}'
|
538
|
+
|
539
|
+
request_url = @base_url || @client.base_url
|
540
|
+
|
541
|
+
options = {
|
542
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
543
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'shareSubscriptionName' => share_subscription_name,'triggerName' => trigger_name},
|
544
|
+
query_params: {'api-version' => @client.api_version},
|
545
|
+
headers: request_headers.merge(custom_headers || {}),
|
546
|
+
base_url: request_url
|
547
|
+
}
|
548
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
549
|
+
|
550
|
+
promise = promise.then do |result|
|
551
|
+
http_response = result.response
|
552
|
+
status_code = http_response.status
|
553
|
+
response_content = http_response.body
|
554
|
+
unless status_code == 200 || status_code == 202 || status_code == 204
|
555
|
+
error_model = JSON.load(response_content)
|
556
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
557
|
+
end
|
558
|
+
|
559
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
560
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
561
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
562
|
+
# Deserialize Response
|
563
|
+
if status_code == 200
|
564
|
+
begin
|
565
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
566
|
+
result_mapper = Azure::DataShare::Mgmt::V2019_11_01::Models::OperationResponse.mapper()
|
567
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
568
|
+
rescue Exception => e
|
569
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
570
|
+
end
|
571
|
+
end
|
572
|
+
|
573
|
+
result
|
574
|
+
end
|
575
|
+
|
576
|
+
promise.execute
|
577
|
+
end
|
578
|
+
|
579
|
+
#
|
580
|
+
# List Triggers in a share subscription.
|
581
|
+
#
|
582
|
+
# List Triggers in a share subscription
|
583
|
+
#
|
584
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
585
|
+
# to List operation.
|
586
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
587
|
+
# will be added to the HTTP request.
|
588
|
+
#
|
589
|
+
# @return [TriggerList] operation results.
|
590
|
+
#
|
591
|
+
def list_by_share_subscription_next(next_page_link, custom_headers:nil)
|
592
|
+
response = list_by_share_subscription_next_async(next_page_link, custom_headers:custom_headers).value!
|
593
|
+
response.body unless response.nil?
|
594
|
+
end
|
595
|
+
|
596
|
+
#
|
597
|
+
# List Triggers in a share subscription.
|
598
|
+
#
|
599
|
+
# List Triggers in a share subscription
|
600
|
+
#
|
601
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
602
|
+
# to List operation.
|
603
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
604
|
+
# will be added to the HTTP request.
|
605
|
+
#
|
606
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
607
|
+
#
|
608
|
+
def list_by_share_subscription_next_with_http_info(next_page_link, custom_headers:nil)
|
609
|
+
list_by_share_subscription_next_async(next_page_link, custom_headers:custom_headers).value!
|
610
|
+
end
|
611
|
+
|
612
|
+
#
|
613
|
+
# List Triggers in a share subscription.
|
614
|
+
#
|
615
|
+
# List Triggers in a share subscription
|
616
|
+
#
|
617
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
618
|
+
# to List operation.
|
619
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
620
|
+
# to the HTTP request.
|
621
|
+
#
|
622
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
623
|
+
#
|
624
|
+
def list_by_share_subscription_next_async(next_page_link, custom_headers:nil)
|
625
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
626
|
+
|
627
|
+
|
628
|
+
request_headers = {}
|
629
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
630
|
+
|
631
|
+
# Set Headers
|
632
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
633
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
634
|
+
path_template = '{nextLink}'
|
635
|
+
|
636
|
+
request_url = @base_url || @client.base_url
|
637
|
+
|
638
|
+
options = {
|
639
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
640
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
641
|
+
headers: request_headers.merge(custom_headers || {}),
|
642
|
+
base_url: request_url
|
643
|
+
}
|
644
|
+
promise = @client.make_request_async(:get, path_template, options)
|
645
|
+
|
646
|
+
promise = promise.then do |result|
|
647
|
+
http_response = result.response
|
648
|
+
status_code = http_response.status
|
649
|
+
response_content = http_response.body
|
650
|
+
unless status_code == 200
|
651
|
+
error_model = JSON.load(response_content)
|
652
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
653
|
+
end
|
654
|
+
|
655
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
656
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
657
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
658
|
+
# Deserialize Response
|
659
|
+
if status_code == 200
|
660
|
+
begin
|
661
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
662
|
+
result_mapper = Azure::DataShare::Mgmt::V2019_11_01::Models::TriggerList.mapper()
|
663
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
664
|
+
rescue Exception => e
|
665
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
666
|
+
end
|
667
|
+
end
|
668
|
+
|
669
|
+
result
|
670
|
+
end
|
671
|
+
|
672
|
+
promise.execute
|
673
|
+
end
|
674
|
+
|
675
|
+
#
|
676
|
+
# List Triggers in a share subscription.
|
677
|
+
#
|
678
|
+
# List Triggers in a share subscription
|
679
|
+
#
|
680
|
+
# @param resource_group_name [String] The resource group name.
|
681
|
+
# @param account_name [String] The name of the share account.
|
682
|
+
# @param share_subscription_name [String] The name of the share subscription.
|
683
|
+
# @param skip_token [String] Continuation token
|
684
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
685
|
+
# will be added to the HTTP request.
|
686
|
+
#
|
687
|
+
# @return [TriggerList] which provide lazy access to pages of the response.
|
688
|
+
#
|
689
|
+
def list_by_share_subscription_as_lazy(resource_group_name, account_name, share_subscription_name, skip_token:nil, custom_headers:nil)
|
690
|
+
response = list_by_share_subscription_async(resource_group_name, account_name, share_subscription_name, skip_token:skip_token, custom_headers:custom_headers).value!
|
691
|
+
unless response.nil?
|
692
|
+
page = response.body
|
693
|
+
page.next_method = Proc.new do |next_page_link|
|
694
|
+
list_by_share_subscription_next_async(next_page_link, custom_headers:custom_headers)
|
695
|
+
end
|
696
|
+
page
|
697
|
+
end
|
698
|
+
end
|
699
|
+
|
700
|
+
end
|
701
|
+
end
|