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