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,1685 @@
|
|
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 ShareSubscriptions
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the ShareSubscriptions 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 shareSubscription in an account.
|
26
|
+
#
|
27
|
+
# Get a shareSubscription in an account
|
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 custom_headers [Hash{String => String}] A hash of custom headers that
|
33
|
+
# will be added to the HTTP request.
|
34
|
+
#
|
35
|
+
# @return [ShareSubscription] operation results.
|
36
|
+
#
|
37
|
+
def get(resource_group_name, account_name, share_subscription_name, custom_headers:nil)
|
38
|
+
response = get_async(resource_group_name, account_name, share_subscription_name, custom_headers:custom_headers).value!
|
39
|
+
response.body unless response.nil?
|
40
|
+
end
|
41
|
+
|
42
|
+
#
|
43
|
+
# Get shareSubscription in an account.
|
44
|
+
#
|
45
|
+
# Get a shareSubscription in an account
|
46
|
+
#
|
47
|
+
# @param resource_group_name [String] The resource group name.
|
48
|
+
# @param account_name [String] The name of the share account.
|
49
|
+
# @param share_subscription_name [String] The name of the shareSubscription.
|
50
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
51
|
+
# will be added to the HTTP request.
|
52
|
+
#
|
53
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
54
|
+
#
|
55
|
+
def get_with_http_info(resource_group_name, account_name, share_subscription_name, custom_headers:nil)
|
56
|
+
get_async(resource_group_name, account_name, share_subscription_name, custom_headers:custom_headers).value!
|
57
|
+
end
|
58
|
+
|
59
|
+
#
|
60
|
+
# Get shareSubscription in an account.
|
61
|
+
#
|
62
|
+
# Get a shareSubscription in an account
|
63
|
+
#
|
64
|
+
# @param resource_group_name [String] The resource group name.
|
65
|
+
# @param account_name [String] The name of the share account.
|
66
|
+
# @param share_subscription_name [String] The name of the shareSubscription.
|
67
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
68
|
+
# to the HTTP request.
|
69
|
+
#
|
70
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
71
|
+
#
|
72
|
+
def get_async(resource_group_name, account_name, share_subscription_name, custom_headers:nil)
|
73
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
74
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
75
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
76
|
+
fail ArgumentError, 'share_subscription_name is nil' if share_subscription_name.nil?
|
77
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
78
|
+
|
79
|
+
|
80
|
+
request_headers = {}
|
81
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
82
|
+
|
83
|
+
# Set Headers
|
84
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
85
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
86
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}'
|
87
|
+
|
88
|
+
request_url = @base_url || @client.base_url
|
89
|
+
|
90
|
+
options = {
|
91
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
92
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'shareSubscriptionName' => share_subscription_name},
|
93
|
+
query_params: {'api-version' => @client.api_version},
|
94
|
+
headers: request_headers.merge(custom_headers || {}),
|
95
|
+
base_url: request_url
|
96
|
+
}
|
97
|
+
promise = @client.make_request_async(:get, path_template, options)
|
98
|
+
|
99
|
+
promise = promise.then do |result|
|
100
|
+
http_response = result.response
|
101
|
+
status_code = http_response.status
|
102
|
+
response_content = http_response.body
|
103
|
+
unless status_code == 200
|
104
|
+
error_model = JSON.load(response_content)
|
105
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
106
|
+
end
|
107
|
+
|
108
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
109
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
110
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
111
|
+
# Deserialize Response
|
112
|
+
if status_code == 200
|
113
|
+
begin
|
114
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
115
|
+
result_mapper = Azure::DataShare::Mgmt::V2019_11_01::Models::ShareSubscription.mapper()
|
116
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
117
|
+
rescue Exception => e
|
118
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
result
|
123
|
+
end
|
124
|
+
|
125
|
+
promise.execute
|
126
|
+
end
|
127
|
+
|
128
|
+
#
|
129
|
+
# Create shareSubscription in an account.
|
130
|
+
#
|
131
|
+
# Create a shareSubscription in an account
|
132
|
+
#
|
133
|
+
# @param resource_group_name [String] The resource group name.
|
134
|
+
# @param account_name [String] The name of the share account.
|
135
|
+
# @param share_subscription_name [String] The name of the shareSubscription.
|
136
|
+
# @param share_subscription [ShareSubscription] create parameters for
|
137
|
+
# shareSubscription
|
138
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
139
|
+
# will be added to the HTTP request.
|
140
|
+
#
|
141
|
+
# @return [ShareSubscription] operation results.
|
142
|
+
#
|
143
|
+
def create(resource_group_name, account_name, share_subscription_name, share_subscription, custom_headers:nil)
|
144
|
+
response = create_async(resource_group_name, account_name, share_subscription_name, share_subscription, custom_headers:custom_headers).value!
|
145
|
+
response.body unless response.nil?
|
146
|
+
end
|
147
|
+
|
148
|
+
#
|
149
|
+
# Create shareSubscription in an account.
|
150
|
+
#
|
151
|
+
# Create a shareSubscription in an account
|
152
|
+
#
|
153
|
+
# @param resource_group_name [String] The resource group name.
|
154
|
+
# @param account_name [String] The name of the share account.
|
155
|
+
# @param share_subscription_name [String] The name of the shareSubscription.
|
156
|
+
# @param share_subscription [ShareSubscription] create parameters for
|
157
|
+
# shareSubscription
|
158
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
159
|
+
# will be added to the HTTP request.
|
160
|
+
#
|
161
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
162
|
+
#
|
163
|
+
def create_with_http_info(resource_group_name, account_name, share_subscription_name, share_subscription, custom_headers:nil)
|
164
|
+
create_async(resource_group_name, account_name, share_subscription_name, share_subscription, custom_headers:custom_headers).value!
|
165
|
+
end
|
166
|
+
|
167
|
+
#
|
168
|
+
# Create shareSubscription in an account.
|
169
|
+
#
|
170
|
+
# Create a shareSubscription in an account
|
171
|
+
#
|
172
|
+
# @param resource_group_name [String] The resource group name.
|
173
|
+
# @param account_name [String] The name of the share account.
|
174
|
+
# @param share_subscription_name [String] The name of the shareSubscription.
|
175
|
+
# @param share_subscription [ShareSubscription] create parameters for
|
176
|
+
# shareSubscription
|
177
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
178
|
+
# to the HTTP request.
|
179
|
+
#
|
180
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
181
|
+
#
|
182
|
+
def create_async(resource_group_name, account_name, share_subscription_name, share_subscription, custom_headers:nil)
|
183
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
184
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
185
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
186
|
+
fail ArgumentError, 'share_subscription_name is nil' if share_subscription_name.nil?
|
187
|
+
fail ArgumentError, 'share_subscription is nil' if share_subscription.nil?
|
188
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
189
|
+
|
190
|
+
|
191
|
+
request_headers = {}
|
192
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
193
|
+
|
194
|
+
# Set Headers
|
195
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
196
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
197
|
+
|
198
|
+
# Serialize Request
|
199
|
+
request_mapper = Azure::DataShare::Mgmt::V2019_11_01::Models::ShareSubscription.mapper()
|
200
|
+
request_content = @client.serialize(request_mapper, share_subscription)
|
201
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
202
|
+
|
203
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}'
|
204
|
+
|
205
|
+
request_url = @base_url || @client.base_url
|
206
|
+
|
207
|
+
options = {
|
208
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
209
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'shareSubscriptionName' => share_subscription_name},
|
210
|
+
query_params: {'api-version' => @client.api_version},
|
211
|
+
body: request_content,
|
212
|
+
headers: request_headers.merge(custom_headers || {}),
|
213
|
+
base_url: request_url
|
214
|
+
}
|
215
|
+
promise = @client.make_request_async(:put, path_template, options)
|
216
|
+
|
217
|
+
promise = promise.then do |result|
|
218
|
+
http_response = result.response
|
219
|
+
status_code = http_response.status
|
220
|
+
response_content = http_response.body
|
221
|
+
unless status_code == 200 || status_code == 201
|
222
|
+
error_model = JSON.load(response_content)
|
223
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
224
|
+
end
|
225
|
+
|
226
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
227
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
228
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
229
|
+
# Deserialize Response
|
230
|
+
if status_code == 200
|
231
|
+
begin
|
232
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
233
|
+
result_mapper = Azure::DataShare::Mgmt::V2019_11_01::Models::ShareSubscription.mapper()
|
234
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
235
|
+
rescue Exception => e
|
236
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
237
|
+
end
|
238
|
+
end
|
239
|
+
# Deserialize Response
|
240
|
+
if status_code == 201
|
241
|
+
begin
|
242
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
243
|
+
result_mapper = Azure::DataShare::Mgmt::V2019_11_01::Models::ShareSubscription.mapper()
|
244
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
245
|
+
rescue Exception => e
|
246
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
247
|
+
end
|
248
|
+
end
|
249
|
+
|
250
|
+
result
|
251
|
+
end
|
252
|
+
|
253
|
+
promise.execute
|
254
|
+
end
|
255
|
+
|
256
|
+
#
|
257
|
+
# Delete shareSubscription in an account.
|
258
|
+
#
|
259
|
+
# Delete a shareSubscription in an account
|
260
|
+
#
|
261
|
+
# @param resource_group_name [String] The resource group name.
|
262
|
+
# @param account_name [String] The name of the share account.
|
263
|
+
# @param share_subscription_name [String] The name of the shareSubscription.
|
264
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
265
|
+
# will be added to the HTTP request.
|
266
|
+
#
|
267
|
+
# @return [OperationResponse] operation results.
|
268
|
+
#
|
269
|
+
def delete(resource_group_name, account_name, share_subscription_name, custom_headers:nil)
|
270
|
+
response = delete_async(resource_group_name, account_name, share_subscription_name, custom_headers:custom_headers).value!
|
271
|
+
response.body unless response.nil?
|
272
|
+
end
|
273
|
+
|
274
|
+
#
|
275
|
+
# @param resource_group_name [String] The resource group name.
|
276
|
+
# @param account_name [String] The name of the share account.
|
277
|
+
# @param share_subscription_name [String] The name of the shareSubscription.
|
278
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
279
|
+
# will be added to the HTTP request.
|
280
|
+
#
|
281
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
282
|
+
# response.
|
283
|
+
#
|
284
|
+
def delete_async(resource_group_name, account_name, share_subscription_name, custom_headers:nil)
|
285
|
+
# Send request
|
286
|
+
promise = begin_delete_async(resource_group_name, account_name, share_subscription_name, custom_headers:custom_headers)
|
287
|
+
|
288
|
+
promise = promise.then do |response|
|
289
|
+
# Defining deserialization method.
|
290
|
+
deserialize_method = lambda do |parsed_response|
|
291
|
+
result_mapper = Azure::DataShare::Mgmt::V2019_11_01::Models::OperationResponse.mapper()
|
292
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
293
|
+
end
|
294
|
+
|
295
|
+
# Waiting for response.
|
296
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
297
|
+
end
|
298
|
+
|
299
|
+
promise
|
300
|
+
end
|
301
|
+
|
302
|
+
#
|
303
|
+
# List of available share subscriptions under an account.
|
304
|
+
#
|
305
|
+
# List share subscriptions in an account
|
306
|
+
#
|
307
|
+
# @param resource_group_name [String] The resource group name.
|
308
|
+
# @param account_name [String] The name of the share account.
|
309
|
+
# @param skip_token [String] Continuation Token
|
310
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
311
|
+
# will be added to the HTTP request.
|
312
|
+
#
|
313
|
+
# @return [Array<ShareSubscription>] operation results.
|
314
|
+
#
|
315
|
+
def list_by_account(resource_group_name, account_name, skip_token:nil, custom_headers:nil)
|
316
|
+
first_page = list_by_account_as_lazy(resource_group_name, account_name, skip_token:skip_token, custom_headers:custom_headers)
|
317
|
+
first_page.get_all_items
|
318
|
+
end
|
319
|
+
|
320
|
+
#
|
321
|
+
# List of available share subscriptions under an account.
|
322
|
+
#
|
323
|
+
# List share subscriptions in an account
|
324
|
+
#
|
325
|
+
# @param resource_group_name [String] The resource group name.
|
326
|
+
# @param account_name [String] The name of the share account.
|
327
|
+
# @param skip_token [String] Continuation Token
|
328
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
329
|
+
# will be added to the HTTP request.
|
330
|
+
#
|
331
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
332
|
+
#
|
333
|
+
def list_by_account_with_http_info(resource_group_name, account_name, skip_token:nil, custom_headers:nil)
|
334
|
+
list_by_account_async(resource_group_name, account_name, skip_token:skip_token, custom_headers:custom_headers).value!
|
335
|
+
end
|
336
|
+
|
337
|
+
#
|
338
|
+
# List of available share subscriptions under an account.
|
339
|
+
#
|
340
|
+
# List share subscriptions in an account
|
341
|
+
#
|
342
|
+
# @param resource_group_name [String] The resource group name.
|
343
|
+
# @param account_name [String] The name of the share account.
|
344
|
+
# @param skip_token [String] Continuation Token
|
345
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
346
|
+
# to the HTTP request.
|
347
|
+
#
|
348
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
349
|
+
#
|
350
|
+
def list_by_account_async(resource_group_name, account_name, skip_token:nil, custom_headers:nil)
|
351
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
352
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
353
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
354
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
355
|
+
|
356
|
+
|
357
|
+
request_headers = {}
|
358
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
359
|
+
|
360
|
+
# Set Headers
|
361
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
362
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
363
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions'
|
364
|
+
|
365
|
+
request_url = @base_url || @client.base_url
|
366
|
+
|
367
|
+
options = {
|
368
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
369
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
|
370
|
+
query_params: {'api-version' => @client.api_version,'$skipToken' => skip_token},
|
371
|
+
headers: request_headers.merge(custom_headers || {}),
|
372
|
+
base_url: request_url
|
373
|
+
}
|
374
|
+
promise = @client.make_request_async(:get, path_template, options)
|
375
|
+
|
376
|
+
promise = promise.then do |result|
|
377
|
+
http_response = result.response
|
378
|
+
status_code = http_response.status
|
379
|
+
response_content = http_response.body
|
380
|
+
unless status_code == 200
|
381
|
+
error_model = JSON.load(response_content)
|
382
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
383
|
+
end
|
384
|
+
|
385
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
386
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
387
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
388
|
+
# Deserialize Response
|
389
|
+
if status_code == 200
|
390
|
+
begin
|
391
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
392
|
+
result_mapper = Azure::DataShare::Mgmt::V2019_11_01::Models::ShareSubscriptionList.mapper()
|
393
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
394
|
+
rescue Exception => e
|
395
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
396
|
+
end
|
397
|
+
end
|
398
|
+
|
399
|
+
result
|
400
|
+
end
|
401
|
+
|
402
|
+
promise.execute
|
403
|
+
end
|
404
|
+
|
405
|
+
#
|
406
|
+
# Get source share synchronization settings for a shareSubscription.
|
407
|
+
#
|
408
|
+
# Get synchronization settings set on a share
|
409
|
+
#
|
410
|
+
# @param resource_group_name [String] The resource group name.
|
411
|
+
# @param account_name [String] The name of the share account.
|
412
|
+
# @param share_subscription_name [String] The name of the shareSubscription.
|
413
|
+
# @param skip_token [String] Continuation token
|
414
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
415
|
+
# will be added to the HTTP request.
|
416
|
+
#
|
417
|
+
# @return [Array<SourceShareSynchronizationSetting>] operation results.
|
418
|
+
#
|
419
|
+
def list_source_share_synchronization_settings(resource_group_name, account_name, share_subscription_name, skip_token:nil, custom_headers:nil)
|
420
|
+
first_page = list_source_share_synchronization_settings_as_lazy(resource_group_name, account_name, share_subscription_name, skip_token:skip_token, custom_headers:custom_headers)
|
421
|
+
first_page.get_all_items
|
422
|
+
end
|
423
|
+
|
424
|
+
#
|
425
|
+
# Get source share synchronization settings for a shareSubscription.
|
426
|
+
#
|
427
|
+
# Get synchronization settings set on a share
|
428
|
+
#
|
429
|
+
# @param resource_group_name [String] The resource group name.
|
430
|
+
# @param account_name [String] The name of the share account.
|
431
|
+
# @param share_subscription_name [String] The name of the shareSubscription.
|
432
|
+
# @param skip_token [String] Continuation token
|
433
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
434
|
+
# will be added to the HTTP request.
|
435
|
+
#
|
436
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
437
|
+
#
|
438
|
+
def list_source_share_synchronization_settings_with_http_info(resource_group_name, account_name, share_subscription_name, skip_token:nil, custom_headers:nil)
|
439
|
+
list_source_share_synchronization_settings_async(resource_group_name, account_name, share_subscription_name, skip_token:skip_token, custom_headers:custom_headers).value!
|
440
|
+
end
|
441
|
+
|
442
|
+
#
|
443
|
+
# Get source share synchronization settings for a shareSubscription.
|
444
|
+
#
|
445
|
+
# Get synchronization settings set on a share
|
446
|
+
#
|
447
|
+
# @param resource_group_name [String] The resource group name.
|
448
|
+
# @param account_name [String] The name of the share account.
|
449
|
+
# @param share_subscription_name [String] The name of the shareSubscription.
|
450
|
+
# @param skip_token [String] Continuation token
|
451
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
452
|
+
# to the HTTP request.
|
453
|
+
#
|
454
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
455
|
+
#
|
456
|
+
def list_source_share_synchronization_settings_async(resource_group_name, account_name, share_subscription_name, skip_token:nil, custom_headers:nil)
|
457
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
458
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
459
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
460
|
+
fail ArgumentError, 'share_subscription_name is nil' if share_subscription_name.nil?
|
461
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
462
|
+
|
463
|
+
|
464
|
+
request_headers = {}
|
465
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
466
|
+
|
467
|
+
# Set Headers
|
468
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
469
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
470
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/listSourceShareSynchronizationSettings'
|
471
|
+
|
472
|
+
request_url = @base_url || @client.base_url
|
473
|
+
|
474
|
+
options = {
|
475
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
476
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'shareSubscriptionName' => share_subscription_name},
|
477
|
+
query_params: {'api-version' => @client.api_version,'$skipToken' => skip_token},
|
478
|
+
headers: request_headers.merge(custom_headers || {}),
|
479
|
+
base_url: request_url
|
480
|
+
}
|
481
|
+
promise = @client.make_request_async(:post, path_template, options)
|
482
|
+
|
483
|
+
promise = promise.then do |result|
|
484
|
+
http_response = result.response
|
485
|
+
status_code = http_response.status
|
486
|
+
response_content = http_response.body
|
487
|
+
unless status_code == 200
|
488
|
+
error_model = JSON.load(response_content)
|
489
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
490
|
+
end
|
491
|
+
|
492
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
493
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
494
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
495
|
+
# Deserialize Response
|
496
|
+
if status_code == 200
|
497
|
+
begin
|
498
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
499
|
+
result_mapper = Azure::DataShare::Mgmt::V2019_11_01::Models::SourceShareSynchronizationSettingList.mapper()
|
500
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
501
|
+
rescue Exception => e
|
502
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
503
|
+
end
|
504
|
+
end
|
505
|
+
|
506
|
+
result
|
507
|
+
end
|
508
|
+
|
509
|
+
promise.execute
|
510
|
+
end
|
511
|
+
|
512
|
+
#
|
513
|
+
# List Synchronizations in a share subscription.
|
514
|
+
#
|
515
|
+
# List synchronizations of a share subscription
|
516
|
+
#
|
517
|
+
# @param resource_group_name [String] The resource group name.
|
518
|
+
# @param account_name [String] The name of the share account.
|
519
|
+
# @param share_subscription_name [String] The name of the share subscription.
|
520
|
+
# @param skip_token [String] Continuation token
|
521
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
522
|
+
# will be added to the HTTP request.
|
523
|
+
#
|
524
|
+
# @return [Array<ShareSubscriptionSynchronization>] operation results.
|
525
|
+
#
|
526
|
+
def list_synchronizations(resource_group_name, account_name, share_subscription_name, skip_token:nil, custom_headers:nil)
|
527
|
+
first_page = list_synchronizations_as_lazy(resource_group_name, account_name, share_subscription_name, skip_token:skip_token, custom_headers:custom_headers)
|
528
|
+
first_page.get_all_items
|
529
|
+
end
|
530
|
+
|
531
|
+
#
|
532
|
+
# List Synchronizations in a share subscription.
|
533
|
+
#
|
534
|
+
# List synchronizations of a share subscription
|
535
|
+
#
|
536
|
+
# @param resource_group_name [String] The resource group name.
|
537
|
+
# @param account_name [String] The name of the share account.
|
538
|
+
# @param share_subscription_name [String] The name of the share subscription.
|
539
|
+
# @param skip_token [String] Continuation token
|
540
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
541
|
+
# will be added to the HTTP request.
|
542
|
+
#
|
543
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
544
|
+
#
|
545
|
+
def list_synchronizations_with_http_info(resource_group_name, account_name, share_subscription_name, skip_token:nil, custom_headers:nil)
|
546
|
+
list_synchronizations_async(resource_group_name, account_name, share_subscription_name, skip_token:skip_token, custom_headers:custom_headers).value!
|
547
|
+
end
|
548
|
+
|
549
|
+
#
|
550
|
+
# List Synchronizations in a share subscription.
|
551
|
+
#
|
552
|
+
# List synchronizations of a share subscription
|
553
|
+
#
|
554
|
+
# @param resource_group_name [String] The resource group name.
|
555
|
+
# @param account_name [String] The name of the share account.
|
556
|
+
# @param share_subscription_name [String] The name of the share subscription.
|
557
|
+
# @param skip_token [String] Continuation token
|
558
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
559
|
+
# to the HTTP request.
|
560
|
+
#
|
561
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
562
|
+
#
|
563
|
+
def list_synchronizations_async(resource_group_name, account_name, share_subscription_name, skip_token:nil, custom_headers:nil)
|
564
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
565
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
566
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
567
|
+
fail ArgumentError, 'share_subscription_name is nil' if share_subscription_name.nil?
|
568
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
569
|
+
|
570
|
+
|
571
|
+
request_headers = {}
|
572
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
573
|
+
|
574
|
+
# Set Headers
|
575
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
576
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
577
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/listSynchronizations'
|
578
|
+
|
579
|
+
request_url = @base_url || @client.base_url
|
580
|
+
|
581
|
+
options = {
|
582
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
583
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'shareSubscriptionName' => share_subscription_name},
|
584
|
+
query_params: {'api-version' => @client.api_version,'$skipToken' => skip_token},
|
585
|
+
headers: request_headers.merge(custom_headers || {}),
|
586
|
+
base_url: request_url
|
587
|
+
}
|
588
|
+
promise = @client.make_request_async(:post, path_template, options)
|
589
|
+
|
590
|
+
promise = promise.then do |result|
|
591
|
+
http_response = result.response
|
592
|
+
status_code = http_response.status
|
593
|
+
response_content = http_response.body
|
594
|
+
unless status_code == 200
|
595
|
+
error_model = JSON.load(response_content)
|
596
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
597
|
+
end
|
598
|
+
|
599
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
600
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
601
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
602
|
+
# Deserialize Response
|
603
|
+
if status_code == 200
|
604
|
+
begin
|
605
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
606
|
+
result_mapper = Azure::DataShare::Mgmt::V2019_11_01::Models::ShareSubscriptionSynchronizationList.mapper()
|
607
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
608
|
+
rescue Exception => e
|
609
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
610
|
+
end
|
611
|
+
end
|
612
|
+
|
613
|
+
result
|
614
|
+
end
|
615
|
+
|
616
|
+
promise.execute
|
617
|
+
end
|
618
|
+
|
619
|
+
#
|
620
|
+
# List data set level details for a share subscription synchronization
|
621
|
+
#
|
622
|
+
# List synchronization details
|
623
|
+
#
|
624
|
+
# @param resource_group_name [String] The resource group name.
|
625
|
+
# @param account_name [String] The name of the share account.
|
626
|
+
# @param share_subscription_name [String] The name of the share subscription.
|
627
|
+
# @param share_subscription_synchronization [ShareSubscriptionSynchronization]
|
628
|
+
# Share Subscription Synchronization payload.
|
629
|
+
# @param skip_token [String] Continuation token
|
630
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
631
|
+
# will be added to the HTTP request.
|
632
|
+
#
|
633
|
+
# @return [Array<SynchronizationDetails>] operation results.
|
634
|
+
#
|
635
|
+
def list_synchronization_details(resource_group_name, account_name, share_subscription_name, share_subscription_synchronization, skip_token:nil, custom_headers:nil)
|
636
|
+
first_page = list_synchronization_details_as_lazy(resource_group_name, account_name, share_subscription_name, share_subscription_synchronization, skip_token:skip_token, custom_headers:custom_headers)
|
637
|
+
first_page.get_all_items
|
638
|
+
end
|
639
|
+
|
640
|
+
#
|
641
|
+
# List data set level details for a share subscription synchronization
|
642
|
+
#
|
643
|
+
# List synchronization details
|
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_subscription_name [String] The name of the share subscription.
|
648
|
+
# @param share_subscription_synchronization [ShareSubscriptionSynchronization]
|
649
|
+
# Share Subscription Synchronization payload.
|
650
|
+
# @param skip_token [String] Continuation token
|
651
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
652
|
+
# will be added to the HTTP request.
|
653
|
+
#
|
654
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
655
|
+
#
|
656
|
+
def list_synchronization_details_with_http_info(resource_group_name, account_name, share_subscription_name, share_subscription_synchronization, skip_token:nil, custom_headers:nil)
|
657
|
+
list_synchronization_details_async(resource_group_name, account_name, share_subscription_name, share_subscription_synchronization, skip_token:skip_token, custom_headers:custom_headers).value!
|
658
|
+
end
|
659
|
+
|
660
|
+
#
|
661
|
+
# List data set level details for a share subscription synchronization
|
662
|
+
#
|
663
|
+
# List synchronization details
|
664
|
+
#
|
665
|
+
# @param resource_group_name [String] The resource group name.
|
666
|
+
# @param account_name [String] The name of the share account.
|
667
|
+
# @param share_subscription_name [String] The name of the share subscription.
|
668
|
+
# @param share_subscription_synchronization [ShareSubscriptionSynchronization]
|
669
|
+
# Share Subscription Synchronization payload.
|
670
|
+
# @param skip_token [String] Continuation token
|
671
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
672
|
+
# to the HTTP request.
|
673
|
+
#
|
674
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
675
|
+
#
|
676
|
+
def list_synchronization_details_async(resource_group_name, account_name, share_subscription_name, share_subscription_synchronization, skip_token:nil, custom_headers:nil)
|
677
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
678
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
679
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
680
|
+
fail ArgumentError, 'share_subscription_name is nil' if share_subscription_name.nil?
|
681
|
+
fail ArgumentError, 'share_subscription_synchronization is nil' if share_subscription_synchronization.nil?
|
682
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
683
|
+
|
684
|
+
|
685
|
+
request_headers = {}
|
686
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
687
|
+
|
688
|
+
# Set Headers
|
689
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
690
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
691
|
+
|
692
|
+
# Serialize Request
|
693
|
+
request_mapper = Azure::DataShare::Mgmt::V2019_11_01::Models::ShareSubscriptionSynchronization.mapper()
|
694
|
+
request_content = @client.serialize(request_mapper, share_subscription_synchronization)
|
695
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
696
|
+
|
697
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/listSynchronizationDetails'
|
698
|
+
|
699
|
+
request_url = @base_url || @client.base_url
|
700
|
+
|
701
|
+
options = {
|
702
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
703
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'shareSubscriptionName' => share_subscription_name},
|
704
|
+
query_params: {'api-version' => @client.api_version,'$skipToken' => skip_token},
|
705
|
+
body: request_content,
|
706
|
+
headers: request_headers.merge(custom_headers || {}),
|
707
|
+
base_url: request_url
|
708
|
+
}
|
709
|
+
promise = @client.make_request_async(:post, path_template, options)
|
710
|
+
|
711
|
+
promise = promise.then do |result|
|
712
|
+
http_response = result.response
|
713
|
+
status_code = http_response.status
|
714
|
+
response_content = http_response.body
|
715
|
+
unless status_code == 200
|
716
|
+
error_model = JSON.load(response_content)
|
717
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
718
|
+
end
|
719
|
+
|
720
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
721
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
722
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
723
|
+
# Deserialize Response
|
724
|
+
if status_code == 200
|
725
|
+
begin
|
726
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
727
|
+
result_mapper = Azure::DataShare::Mgmt::V2019_11_01::Models::SynchronizationDetailsList.mapper()
|
728
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
729
|
+
rescue Exception => e
|
730
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
731
|
+
end
|
732
|
+
end
|
733
|
+
|
734
|
+
result
|
735
|
+
end
|
736
|
+
|
737
|
+
promise.execute
|
738
|
+
end
|
739
|
+
|
740
|
+
#
|
741
|
+
# Initiate an asynchronous data share job
|
742
|
+
#
|
743
|
+
# Initiate a copy
|
744
|
+
#
|
745
|
+
# @param resource_group_name [String] The resource group name.
|
746
|
+
# @param account_name [String] The name of the share account.
|
747
|
+
# @param share_subscription_name [String] The name of share subscription
|
748
|
+
# @param synchronize [Synchronize] Synchronize payload
|
749
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
750
|
+
# will be added to the HTTP request.
|
751
|
+
#
|
752
|
+
# @return [ShareSubscriptionSynchronization] operation results.
|
753
|
+
#
|
754
|
+
def synchronize_method(resource_group_name, account_name, share_subscription_name, synchronize, custom_headers:nil)
|
755
|
+
response = synchronize_method_async(resource_group_name, account_name, share_subscription_name, synchronize, custom_headers:custom_headers).value!
|
756
|
+
response.body unless response.nil?
|
757
|
+
end
|
758
|
+
|
759
|
+
#
|
760
|
+
# @param resource_group_name [String] The resource group name.
|
761
|
+
# @param account_name [String] The name of the share account.
|
762
|
+
# @param share_subscription_name [String] The name of share subscription
|
763
|
+
# @param synchronize [Synchronize] Synchronize payload
|
764
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
765
|
+
# will be added to the HTTP request.
|
766
|
+
#
|
767
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
768
|
+
# response.
|
769
|
+
#
|
770
|
+
def synchronize_method_async(resource_group_name, account_name, share_subscription_name, synchronize, custom_headers:nil)
|
771
|
+
# Send request
|
772
|
+
promise = begin_synchronize_method_async(resource_group_name, account_name, share_subscription_name, synchronize, custom_headers:custom_headers)
|
773
|
+
|
774
|
+
promise = promise.then do |response|
|
775
|
+
# Defining deserialization method.
|
776
|
+
deserialize_method = lambda do |parsed_response|
|
777
|
+
result_mapper = Azure::DataShare::Mgmt::V2019_11_01::Models::ShareSubscriptionSynchronization.mapper()
|
778
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
779
|
+
end
|
780
|
+
|
781
|
+
# Waiting for response.
|
782
|
+
@client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::AZURE_ASYNC_OPERATION)
|
783
|
+
end
|
784
|
+
|
785
|
+
promise
|
786
|
+
end
|
787
|
+
|
788
|
+
#
|
789
|
+
# Request cancellation of a data share snapshot
|
790
|
+
#
|
791
|
+
# Request to cancel a synchronization.
|
792
|
+
#
|
793
|
+
# @param resource_group_name [String] The resource group name.
|
794
|
+
# @param account_name [String] The name of the share account.
|
795
|
+
# @param share_subscription_name [String] The name of the shareSubscription.
|
796
|
+
# @param share_subscription_synchronization [ShareSubscriptionSynchronization]
|
797
|
+
# Share Subscription Synchronization payload.
|
798
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
799
|
+
# will be added to the HTTP request.
|
800
|
+
#
|
801
|
+
# @return [ShareSubscriptionSynchronization] operation results.
|
802
|
+
#
|
803
|
+
def cancel_synchronization(resource_group_name, account_name, share_subscription_name, share_subscription_synchronization, custom_headers:nil)
|
804
|
+
response = cancel_synchronization_async(resource_group_name, account_name, share_subscription_name, share_subscription_synchronization, custom_headers:custom_headers).value!
|
805
|
+
response.body unless response.nil?
|
806
|
+
end
|
807
|
+
|
808
|
+
#
|
809
|
+
# @param resource_group_name [String] The resource group name.
|
810
|
+
# @param account_name [String] The name of the share account.
|
811
|
+
# @param share_subscription_name [String] The name of the shareSubscription.
|
812
|
+
# @param share_subscription_synchronization [ShareSubscriptionSynchronization]
|
813
|
+
# Share Subscription Synchronization payload.
|
814
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
815
|
+
# will be added to the HTTP request.
|
816
|
+
#
|
817
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
818
|
+
# response.
|
819
|
+
#
|
820
|
+
def cancel_synchronization_async(resource_group_name, account_name, share_subscription_name, share_subscription_synchronization, custom_headers:nil)
|
821
|
+
# Send request
|
822
|
+
promise = begin_cancel_synchronization_async(resource_group_name, account_name, share_subscription_name, share_subscription_synchronization, custom_headers:custom_headers)
|
823
|
+
|
824
|
+
promise = promise.then do |response|
|
825
|
+
# Defining deserialization method.
|
826
|
+
deserialize_method = lambda do |parsed_response|
|
827
|
+
result_mapper = Azure::DataShare::Mgmt::V2019_11_01::Models::ShareSubscriptionSynchronization.mapper()
|
828
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
829
|
+
end
|
830
|
+
|
831
|
+
# Waiting for response.
|
832
|
+
@client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::AZURE_ASYNC_OPERATION)
|
833
|
+
end
|
834
|
+
|
835
|
+
promise
|
836
|
+
end
|
837
|
+
|
838
|
+
#
|
839
|
+
# Delete shareSubscription in an account.
|
840
|
+
#
|
841
|
+
# Delete a shareSubscription in an account
|
842
|
+
#
|
843
|
+
# @param resource_group_name [String] The resource group name.
|
844
|
+
# @param account_name [String] The name of the share account.
|
845
|
+
# @param share_subscription_name [String] The name of the shareSubscription.
|
846
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
847
|
+
# will be added to the HTTP request.
|
848
|
+
#
|
849
|
+
# @return [OperationResponse] operation results.
|
850
|
+
#
|
851
|
+
def begin_delete(resource_group_name, account_name, share_subscription_name, custom_headers:nil)
|
852
|
+
response = begin_delete_async(resource_group_name, account_name, share_subscription_name, custom_headers:custom_headers).value!
|
853
|
+
response.body unless response.nil?
|
854
|
+
end
|
855
|
+
|
856
|
+
#
|
857
|
+
# Delete shareSubscription in an account.
|
858
|
+
#
|
859
|
+
# Delete a shareSubscription in an account
|
860
|
+
#
|
861
|
+
# @param resource_group_name [String] The resource group name.
|
862
|
+
# @param account_name [String] The name of the share account.
|
863
|
+
# @param share_subscription_name [String] The name of the shareSubscription.
|
864
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
865
|
+
# will be added to the HTTP request.
|
866
|
+
#
|
867
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
868
|
+
#
|
869
|
+
def begin_delete_with_http_info(resource_group_name, account_name, share_subscription_name, custom_headers:nil)
|
870
|
+
begin_delete_async(resource_group_name, account_name, share_subscription_name, custom_headers:custom_headers).value!
|
871
|
+
end
|
872
|
+
|
873
|
+
#
|
874
|
+
# Delete shareSubscription in an account.
|
875
|
+
#
|
876
|
+
# Delete a shareSubscription in an account
|
877
|
+
#
|
878
|
+
# @param resource_group_name [String] The resource group name.
|
879
|
+
# @param account_name [String] The name of the share account.
|
880
|
+
# @param share_subscription_name [String] The name of the shareSubscription.
|
881
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
882
|
+
# to the HTTP request.
|
883
|
+
#
|
884
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
885
|
+
#
|
886
|
+
def begin_delete_async(resource_group_name, account_name, share_subscription_name, custom_headers:nil)
|
887
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
888
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
889
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
890
|
+
fail ArgumentError, 'share_subscription_name is nil' if share_subscription_name.nil?
|
891
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
892
|
+
|
893
|
+
|
894
|
+
request_headers = {}
|
895
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
896
|
+
|
897
|
+
# Set Headers
|
898
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
899
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
900
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}'
|
901
|
+
|
902
|
+
request_url = @base_url || @client.base_url
|
903
|
+
|
904
|
+
options = {
|
905
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
906
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'shareSubscriptionName' => share_subscription_name},
|
907
|
+
query_params: {'api-version' => @client.api_version},
|
908
|
+
headers: request_headers.merge(custom_headers || {}),
|
909
|
+
base_url: request_url
|
910
|
+
}
|
911
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
912
|
+
|
913
|
+
promise = promise.then do |result|
|
914
|
+
http_response = result.response
|
915
|
+
status_code = http_response.status
|
916
|
+
response_content = http_response.body
|
917
|
+
unless status_code == 200 || status_code == 202 || status_code == 204
|
918
|
+
error_model = JSON.load(response_content)
|
919
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
920
|
+
end
|
921
|
+
|
922
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
923
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
924
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
925
|
+
# Deserialize Response
|
926
|
+
if status_code == 200
|
927
|
+
begin
|
928
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
929
|
+
result_mapper = Azure::DataShare::Mgmt::V2019_11_01::Models::OperationResponse.mapper()
|
930
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
931
|
+
rescue Exception => e
|
932
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
933
|
+
end
|
934
|
+
end
|
935
|
+
|
936
|
+
result
|
937
|
+
end
|
938
|
+
|
939
|
+
promise.execute
|
940
|
+
end
|
941
|
+
|
942
|
+
#
|
943
|
+
# Initiate an asynchronous data share job
|
944
|
+
#
|
945
|
+
# Initiate a copy
|
946
|
+
#
|
947
|
+
# @param resource_group_name [String] The resource group name.
|
948
|
+
# @param account_name [String] The name of the share account.
|
949
|
+
# @param share_subscription_name [String] The name of share subscription
|
950
|
+
# @param synchronize [Synchronize] Synchronize payload
|
951
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
952
|
+
# will be added to the HTTP request.
|
953
|
+
#
|
954
|
+
# @return [ShareSubscriptionSynchronization] operation results.
|
955
|
+
#
|
956
|
+
def begin_synchronize_method(resource_group_name, account_name, share_subscription_name, synchronize, custom_headers:nil)
|
957
|
+
response = begin_synchronize_method_async(resource_group_name, account_name, share_subscription_name, synchronize, custom_headers:custom_headers).value!
|
958
|
+
response.body unless response.nil?
|
959
|
+
end
|
960
|
+
|
961
|
+
#
|
962
|
+
# Initiate an asynchronous data share job
|
963
|
+
#
|
964
|
+
# Initiate a copy
|
965
|
+
#
|
966
|
+
# @param resource_group_name [String] The resource group name.
|
967
|
+
# @param account_name [String] The name of the share account.
|
968
|
+
# @param share_subscription_name [String] The name of share subscription
|
969
|
+
# @param synchronize [Synchronize] Synchronize payload
|
970
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
971
|
+
# will be added to the HTTP request.
|
972
|
+
#
|
973
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
974
|
+
#
|
975
|
+
def begin_synchronize_method_with_http_info(resource_group_name, account_name, share_subscription_name, synchronize, custom_headers:nil)
|
976
|
+
begin_synchronize_method_async(resource_group_name, account_name, share_subscription_name, synchronize, custom_headers:custom_headers).value!
|
977
|
+
end
|
978
|
+
|
979
|
+
#
|
980
|
+
# Initiate an asynchronous data share job
|
981
|
+
#
|
982
|
+
# Initiate a copy
|
983
|
+
#
|
984
|
+
# @param resource_group_name [String] The resource group name.
|
985
|
+
# @param account_name [String] The name of the share account.
|
986
|
+
# @param share_subscription_name [String] The name of share subscription
|
987
|
+
# @param synchronize [Synchronize] Synchronize payload
|
988
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
989
|
+
# to the HTTP request.
|
990
|
+
#
|
991
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
992
|
+
#
|
993
|
+
def begin_synchronize_method_async(resource_group_name, account_name, share_subscription_name, synchronize, custom_headers:nil)
|
994
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
995
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
996
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
997
|
+
fail ArgumentError, 'share_subscription_name is nil' if share_subscription_name.nil?
|
998
|
+
fail ArgumentError, 'synchronize is nil' if synchronize.nil?
|
999
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1000
|
+
|
1001
|
+
|
1002
|
+
request_headers = {}
|
1003
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1004
|
+
|
1005
|
+
# Set Headers
|
1006
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1007
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1008
|
+
|
1009
|
+
# Serialize Request
|
1010
|
+
request_mapper = Azure::DataShare::Mgmt::V2019_11_01::Models::Synchronize.mapper()
|
1011
|
+
request_content = @client.serialize(request_mapper, synchronize)
|
1012
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
1013
|
+
|
1014
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/Synchronize'
|
1015
|
+
|
1016
|
+
request_url = @base_url || @client.base_url
|
1017
|
+
|
1018
|
+
options = {
|
1019
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1020
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'shareSubscriptionName' => share_subscription_name},
|
1021
|
+
query_params: {'api-version' => @client.api_version},
|
1022
|
+
body: request_content,
|
1023
|
+
headers: request_headers.merge(custom_headers || {}),
|
1024
|
+
base_url: request_url
|
1025
|
+
}
|
1026
|
+
promise = @client.make_request_async(:post, path_template, options)
|
1027
|
+
|
1028
|
+
promise = promise.then do |result|
|
1029
|
+
http_response = result.response
|
1030
|
+
status_code = http_response.status
|
1031
|
+
response_content = http_response.body
|
1032
|
+
unless status_code == 200 || status_code == 202
|
1033
|
+
error_model = JSON.load(response_content)
|
1034
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
1035
|
+
end
|
1036
|
+
|
1037
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1038
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1039
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1040
|
+
# Deserialize Response
|
1041
|
+
if status_code == 200
|
1042
|
+
begin
|
1043
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1044
|
+
result_mapper = Azure::DataShare::Mgmt::V2019_11_01::Models::ShareSubscriptionSynchronization.mapper()
|
1045
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1046
|
+
rescue Exception => e
|
1047
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1048
|
+
end
|
1049
|
+
end
|
1050
|
+
# Deserialize Response
|
1051
|
+
if status_code == 202
|
1052
|
+
begin
|
1053
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1054
|
+
result_mapper = Azure::DataShare::Mgmt::V2019_11_01::Models::ShareSubscriptionSynchronization.mapper()
|
1055
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1056
|
+
rescue Exception => e
|
1057
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1058
|
+
end
|
1059
|
+
end
|
1060
|
+
|
1061
|
+
result
|
1062
|
+
end
|
1063
|
+
|
1064
|
+
promise.execute
|
1065
|
+
end
|
1066
|
+
|
1067
|
+
#
|
1068
|
+
# Request cancellation of a data share snapshot
|
1069
|
+
#
|
1070
|
+
# Request to cancel a synchronization.
|
1071
|
+
#
|
1072
|
+
# @param resource_group_name [String] The resource group name.
|
1073
|
+
# @param account_name [String] The name of the share account.
|
1074
|
+
# @param share_subscription_name [String] The name of the shareSubscription.
|
1075
|
+
# @param share_subscription_synchronization [ShareSubscriptionSynchronization]
|
1076
|
+
# Share Subscription Synchronization payload.
|
1077
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1078
|
+
# will be added to the HTTP request.
|
1079
|
+
#
|
1080
|
+
# @return [ShareSubscriptionSynchronization] operation results.
|
1081
|
+
#
|
1082
|
+
def begin_cancel_synchronization(resource_group_name, account_name, share_subscription_name, share_subscription_synchronization, custom_headers:nil)
|
1083
|
+
response = begin_cancel_synchronization_async(resource_group_name, account_name, share_subscription_name, share_subscription_synchronization, custom_headers:custom_headers).value!
|
1084
|
+
response.body unless response.nil?
|
1085
|
+
end
|
1086
|
+
|
1087
|
+
#
|
1088
|
+
# Request cancellation of a data share snapshot
|
1089
|
+
#
|
1090
|
+
# Request to cancel a synchronization.
|
1091
|
+
#
|
1092
|
+
# @param resource_group_name [String] The resource group name.
|
1093
|
+
# @param account_name [String] The name of the share account.
|
1094
|
+
# @param share_subscription_name [String] The name of the shareSubscription.
|
1095
|
+
# @param share_subscription_synchronization [ShareSubscriptionSynchronization]
|
1096
|
+
# Share Subscription Synchronization payload.
|
1097
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1098
|
+
# will be added to the HTTP request.
|
1099
|
+
#
|
1100
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1101
|
+
#
|
1102
|
+
def begin_cancel_synchronization_with_http_info(resource_group_name, account_name, share_subscription_name, share_subscription_synchronization, custom_headers:nil)
|
1103
|
+
begin_cancel_synchronization_async(resource_group_name, account_name, share_subscription_name, share_subscription_synchronization, custom_headers:custom_headers).value!
|
1104
|
+
end
|
1105
|
+
|
1106
|
+
#
|
1107
|
+
# Request cancellation of a data share snapshot
|
1108
|
+
#
|
1109
|
+
# Request to cancel a synchronization.
|
1110
|
+
#
|
1111
|
+
# @param resource_group_name [String] The resource group name.
|
1112
|
+
# @param account_name [String] The name of the share account.
|
1113
|
+
# @param share_subscription_name [String] The name of the shareSubscription.
|
1114
|
+
# @param share_subscription_synchronization [ShareSubscriptionSynchronization]
|
1115
|
+
# Share Subscription Synchronization payload.
|
1116
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1117
|
+
# to the HTTP request.
|
1118
|
+
#
|
1119
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1120
|
+
#
|
1121
|
+
def begin_cancel_synchronization_async(resource_group_name, account_name, share_subscription_name, share_subscription_synchronization, custom_headers:nil)
|
1122
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1123
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1124
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
1125
|
+
fail ArgumentError, 'share_subscription_name is nil' if share_subscription_name.nil?
|
1126
|
+
fail ArgumentError, 'share_subscription_synchronization is nil' if share_subscription_synchronization.nil?
|
1127
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1128
|
+
|
1129
|
+
|
1130
|
+
request_headers = {}
|
1131
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1132
|
+
|
1133
|
+
# Set Headers
|
1134
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1135
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1136
|
+
|
1137
|
+
# Serialize Request
|
1138
|
+
request_mapper = Azure::DataShare::Mgmt::V2019_11_01::Models::ShareSubscriptionSynchronization.mapper()
|
1139
|
+
request_content = @client.serialize(request_mapper, share_subscription_synchronization)
|
1140
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
1141
|
+
|
1142
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/cancelSynchronization'
|
1143
|
+
|
1144
|
+
request_url = @base_url || @client.base_url
|
1145
|
+
|
1146
|
+
options = {
|
1147
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1148
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'shareSubscriptionName' => share_subscription_name},
|
1149
|
+
query_params: {'api-version' => @client.api_version},
|
1150
|
+
body: request_content,
|
1151
|
+
headers: request_headers.merge(custom_headers || {}),
|
1152
|
+
base_url: request_url
|
1153
|
+
}
|
1154
|
+
promise = @client.make_request_async(:post, path_template, options)
|
1155
|
+
|
1156
|
+
promise = promise.then do |result|
|
1157
|
+
http_response = result.response
|
1158
|
+
status_code = http_response.status
|
1159
|
+
response_content = http_response.body
|
1160
|
+
unless status_code == 200 || status_code == 202
|
1161
|
+
error_model = JSON.load(response_content)
|
1162
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
1163
|
+
end
|
1164
|
+
|
1165
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1166
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1167
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1168
|
+
# Deserialize Response
|
1169
|
+
if status_code == 200
|
1170
|
+
begin
|
1171
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1172
|
+
result_mapper = Azure::DataShare::Mgmt::V2019_11_01::Models::ShareSubscriptionSynchronization.mapper()
|
1173
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1174
|
+
rescue Exception => e
|
1175
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1176
|
+
end
|
1177
|
+
end
|
1178
|
+
# Deserialize Response
|
1179
|
+
if status_code == 202
|
1180
|
+
begin
|
1181
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1182
|
+
result_mapper = Azure::DataShare::Mgmt::V2019_11_01::Models::ShareSubscriptionSynchronization.mapper()
|
1183
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1184
|
+
rescue Exception => e
|
1185
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1186
|
+
end
|
1187
|
+
end
|
1188
|
+
|
1189
|
+
result
|
1190
|
+
end
|
1191
|
+
|
1192
|
+
promise.execute
|
1193
|
+
end
|
1194
|
+
|
1195
|
+
#
|
1196
|
+
# List of available share subscriptions under an account.
|
1197
|
+
#
|
1198
|
+
# List share subscriptions in an account
|
1199
|
+
#
|
1200
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1201
|
+
# to List operation.
|
1202
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1203
|
+
# will be added to the HTTP request.
|
1204
|
+
#
|
1205
|
+
# @return [ShareSubscriptionList] operation results.
|
1206
|
+
#
|
1207
|
+
def list_by_account_next(next_page_link, custom_headers:nil)
|
1208
|
+
response = list_by_account_next_async(next_page_link, custom_headers:custom_headers).value!
|
1209
|
+
response.body unless response.nil?
|
1210
|
+
end
|
1211
|
+
|
1212
|
+
#
|
1213
|
+
# List of available share subscriptions under an account.
|
1214
|
+
#
|
1215
|
+
# List share subscriptions in an account
|
1216
|
+
#
|
1217
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1218
|
+
# to List operation.
|
1219
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1220
|
+
# will be added to the HTTP request.
|
1221
|
+
#
|
1222
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1223
|
+
#
|
1224
|
+
def list_by_account_next_with_http_info(next_page_link, custom_headers:nil)
|
1225
|
+
list_by_account_next_async(next_page_link, custom_headers:custom_headers).value!
|
1226
|
+
end
|
1227
|
+
|
1228
|
+
#
|
1229
|
+
# List of available share subscriptions under an account.
|
1230
|
+
#
|
1231
|
+
# List share subscriptions in an account
|
1232
|
+
#
|
1233
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1234
|
+
# to List operation.
|
1235
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1236
|
+
# to the HTTP request.
|
1237
|
+
#
|
1238
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1239
|
+
#
|
1240
|
+
def list_by_account_next_async(next_page_link, custom_headers:nil)
|
1241
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
1242
|
+
|
1243
|
+
|
1244
|
+
request_headers = {}
|
1245
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1246
|
+
|
1247
|
+
# Set Headers
|
1248
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1249
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1250
|
+
path_template = '{nextLink}'
|
1251
|
+
|
1252
|
+
request_url = @base_url || @client.base_url
|
1253
|
+
|
1254
|
+
options = {
|
1255
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1256
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
1257
|
+
headers: request_headers.merge(custom_headers || {}),
|
1258
|
+
base_url: request_url
|
1259
|
+
}
|
1260
|
+
promise = @client.make_request_async(:get, path_template, options)
|
1261
|
+
|
1262
|
+
promise = promise.then do |result|
|
1263
|
+
http_response = result.response
|
1264
|
+
status_code = http_response.status
|
1265
|
+
response_content = http_response.body
|
1266
|
+
unless status_code == 200
|
1267
|
+
error_model = JSON.load(response_content)
|
1268
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
1269
|
+
end
|
1270
|
+
|
1271
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1272
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1273
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1274
|
+
# Deserialize Response
|
1275
|
+
if status_code == 200
|
1276
|
+
begin
|
1277
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1278
|
+
result_mapper = Azure::DataShare::Mgmt::V2019_11_01::Models::ShareSubscriptionList.mapper()
|
1279
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1280
|
+
rescue Exception => e
|
1281
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1282
|
+
end
|
1283
|
+
end
|
1284
|
+
|
1285
|
+
result
|
1286
|
+
end
|
1287
|
+
|
1288
|
+
promise.execute
|
1289
|
+
end
|
1290
|
+
|
1291
|
+
#
|
1292
|
+
# Get source share synchronization settings for a shareSubscription.
|
1293
|
+
#
|
1294
|
+
# Get synchronization settings set on a share
|
1295
|
+
#
|
1296
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1297
|
+
# to List operation.
|
1298
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1299
|
+
# will be added to the HTTP request.
|
1300
|
+
#
|
1301
|
+
# @return [SourceShareSynchronizationSettingList] operation results.
|
1302
|
+
#
|
1303
|
+
def list_source_share_synchronization_settings_next(next_page_link, custom_headers:nil)
|
1304
|
+
response = list_source_share_synchronization_settings_next_async(next_page_link, custom_headers:custom_headers).value!
|
1305
|
+
response.body unless response.nil?
|
1306
|
+
end
|
1307
|
+
|
1308
|
+
#
|
1309
|
+
# Get source share synchronization settings for a shareSubscription.
|
1310
|
+
#
|
1311
|
+
# Get synchronization settings set on a share
|
1312
|
+
#
|
1313
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1314
|
+
# to List operation.
|
1315
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1316
|
+
# will be added to the HTTP request.
|
1317
|
+
#
|
1318
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1319
|
+
#
|
1320
|
+
def list_source_share_synchronization_settings_next_with_http_info(next_page_link, custom_headers:nil)
|
1321
|
+
list_source_share_synchronization_settings_next_async(next_page_link, custom_headers:custom_headers).value!
|
1322
|
+
end
|
1323
|
+
|
1324
|
+
#
|
1325
|
+
# Get source share synchronization settings for a shareSubscription.
|
1326
|
+
#
|
1327
|
+
# Get synchronization settings set on a share
|
1328
|
+
#
|
1329
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1330
|
+
# to List operation.
|
1331
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1332
|
+
# to the HTTP request.
|
1333
|
+
#
|
1334
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1335
|
+
#
|
1336
|
+
def list_source_share_synchronization_settings_next_async(next_page_link, custom_headers:nil)
|
1337
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
1338
|
+
|
1339
|
+
|
1340
|
+
request_headers = {}
|
1341
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1342
|
+
|
1343
|
+
# Set Headers
|
1344
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1345
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1346
|
+
path_template = '{nextLink}'
|
1347
|
+
|
1348
|
+
request_url = @base_url || @client.base_url
|
1349
|
+
|
1350
|
+
options = {
|
1351
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1352
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
1353
|
+
headers: request_headers.merge(custom_headers || {}),
|
1354
|
+
base_url: request_url
|
1355
|
+
}
|
1356
|
+
promise = @client.make_request_async(:post, path_template, options)
|
1357
|
+
|
1358
|
+
promise = promise.then do |result|
|
1359
|
+
http_response = result.response
|
1360
|
+
status_code = http_response.status
|
1361
|
+
response_content = http_response.body
|
1362
|
+
unless status_code == 200
|
1363
|
+
error_model = JSON.load(response_content)
|
1364
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
1365
|
+
end
|
1366
|
+
|
1367
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1368
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1369
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1370
|
+
# Deserialize Response
|
1371
|
+
if status_code == 200
|
1372
|
+
begin
|
1373
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1374
|
+
result_mapper = Azure::DataShare::Mgmt::V2019_11_01::Models::SourceShareSynchronizationSettingList.mapper()
|
1375
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1376
|
+
rescue Exception => e
|
1377
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1378
|
+
end
|
1379
|
+
end
|
1380
|
+
|
1381
|
+
result
|
1382
|
+
end
|
1383
|
+
|
1384
|
+
promise.execute
|
1385
|
+
end
|
1386
|
+
|
1387
|
+
#
|
1388
|
+
# List Synchronizations in a share subscription.
|
1389
|
+
#
|
1390
|
+
# List synchronizations of a share subscription
|
1391
|
+
#
|
1392
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1393
|
+
# to List operation.
|
1394
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1395
|
+
# will be added to the HTTP request.
|
1396
|
+
#
|
1397
|
+
# @return [ShareSubscriptionSynchronizationList] operation results.
|
1398
|
+
#
|
1399
|
+
def list_synchronizations_next(next_page_link, custom_headers:nil)
|
1400
|
+
response = list_synchronizations_next_async(next_page_link, custom_headers:custom_headers).value!
|
1401
|
+
response.body unless response.nil?
|
1402
|
+
end
|
1403
|
+
|
1404
|
+
#
|
1405
|
+
# List Synchronizations in a share subscription.
|
1406
|
+
#
|
1407
|
+
# List synchronizations of a share subscription
|
1408
|
+
#
|
1409
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1410
|
+
# to List operation.
|
1411
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1412
|
+
# will be added to the HTTP request.
|
1413
|
+
#
|
1414
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1415
|
+
#
|
1416
|
+
def list_synchronizations_next_with_http_info(next_page_link, custom_headers:nil)
|
1417
|
+
list_synchronizations_next_async(next_page_link, custom_headers:custom_headers).value!
|
1418
|
+
end
|
1419
|
+
|
1420
|
+
#
|
1421
|
+
# List Synchronizations in a share subscription.
|
1422
|
+
#
|
1423
|
+
# List synchronizations of a share subscription
|
1424
|
+
#
|
1425
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1426
|
+
# to List operation.
|
1427
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1428
|
+
# to the HTTP request.
|
1429
|
+
#
|
1430
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1431
|
+
#
|
1432
|
+
def list_synchronizations_next_async(next_page_link, custom_headers:nil)
|
1433
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
1434
|
+
|
1435
|
+
|
1436
|
+
request_headers = {}
|
1437
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1438
|
+
|
1439
|
+
# Set Headers
|
1440
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1441
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1442
|
+
path_template = '{nextLink}'
|
1443
|
+
|
1444
|
+
request_url = @base_url || @client.base_url
|
1445
|
+
|
1446
|
+
options = {
|
1447
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1448
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
1449
|
+
headers: request_headers.merge(custom_headers || {}),
|
1450
|
+
base_url: request_url
|
1451
|
+
}
|
1452
|
+
promise = @client.make_request_async(:post, path_template, options)
|
1453
|
+
|
1454
|
+
promise = promise.then do |result|
|
1455
|
+
http_response = result.response
|
1456
|
+
status_code = http_response.status
|
1457
|
+
response_content = http_response.body
|
1458
|
+
unless status_code == 200
|
1459
|
+
error_model = JSON.load(response_content)
|
1460
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
1461
|
+
end
|
1462
|
+
|
1463
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1464
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1465
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1466
|
+
# Deserialize Response
|
1467
|
+
if status_code == 200
|
1468
|
+
begin
|
1469
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1470
|
+
result_mapper = Azure::DataShare::Mgmt::V2019_11_01::Models::ShareSubscriptionSynchronizationList.mapper()
|
1471
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1472
|
+
rescue Exception => e
|
1473
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1474
|
+
end
|
1475
|
+
end
|
1476
|
+
|
1477
|
+
result
|
1478
|
+
end
|
1479
|
+
|
1480
|
+
promise.execute
|
1481
|
+
end
|
1482
|
+
|
1483
|
+
#
|
1484
|
+
# List data set level details for a share subscription synchronization
|
1485
|
+
#
|
1486
|
+
# List synchronization details
|
1487
|
+
#
|
1488
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1489
|
+
# to List operation.
|
1490
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1491
|
+
# will be added to the HTTP request.
|
1492
|
+
#
|
1493
|
+
# @return [SynchronizationDetailsList] operation results.
|
1494
|
+
#
|
1495
|
+
def list_synchronization_details_next(next_page_link, custom_headers:nil)
|
1496
|
+
response = list_synchronization_details_next_async(next_page_link, custom_headers:custom_headers).value!
|
1497
|
+
response.body unless response.nil?
|
1498
|
+
end
|
1499
|
+
|
1500
|
+
#
|
1501
|
+
# List data set level details for a share subscription synchronization
|
1502
|
+
#
|
1503
|
+
# List synchronization details
|
1504
|
+
#
|
1505
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1506
|
+
# to List operation.
|
1507
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1508
|
+
# will be added to the HTTP request.
|
1509
|
+
#
|
1510
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1511
|
+
#
|
1512
|
+
def list_synchronization_details_next_with_http_info(next_page_link, custom_headers:nil)
|
1513
|
+
list_synchronization_details_next_async(next_page_link, custom_headers:custom_headers).value!
|
1514
|
+
end
|
1515
|
+
|
1516
|
+
#
|
1517
|
+
# List data set level details for a share subscription synchronization
|
1518
|
+
#
|
1519
|
+
# List synchronization details
|
1520
|
+
#
|
1521
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1522
|
+
# to List operation.
|
1523
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1524
|
+
# to the HTTP request.
|
1525
|
+
#
|
1526
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1527
|
+
#
|
1528
|
+
def list_synchronization_details_next_async(next_page_link, custom_headers:nil)
|
1529
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
1530
|
+
|
1531
|
+
|
1532
|
+
request_headers = {}
|
1533
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1534
|
+
|
1535
|
+
# Set Headers
|
1536
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1537
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1538
|
+
path_template = '{nextLink}'
|
1539
|
+
|
1540
|
+
request_url = @base_url || @client.base_url
|
1541
|
+
|
1542
|
+
options = {
|
1543
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1544
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
1545
|
+
headers: request_headers.merge(custom_headers || {}),
|
1546
|
+
base_url: request_url
|
1547
|
+
}
|
1548
|
+
promise = @client.make_request_async(:post, path_template, options)
|
1549
|
+
|
1550
|
+
promise = promise.then do |result|
|
1551
|
+
http_response = result.response
|
1552
|
+
status_code = http_response.status
|
1553
|
+
response_content = http_response.body
|
1554
|
+
unless status_code == 200
|
1555
|
+
error_model = JSON.load(response_content)
|
1556
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
1557
|
+
end
|
1558
|
+
|
1559
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1560
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1561
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1562
|
+
# Deserialize Response
|
1563
|
+
if status_code == 200
|
1564
|
+
begin
|
1565
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1566
|
+
result_mapper = Azure::DataShare::Mgmt::V2019_11_01::Models::SynchronizationDetailsList.mapper()
|
1567
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1568
|
+
rescue Exception => e
|
1569
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1570
|
+
end
|
1571
|
+
end
|
1572
|
+
|
1573
|
+
result
|
1574
|
+
end
|
1575
|
+
|
1576
|
+
promise.execute
|
1577
|
+
end
|
1578
|
+
|
1579
|
+
#
|
1580
|
+
# List of available share subscriptions under an account.
|
1581
|
+
#
|
1582
|
+
# List share subscriptions in an account
|
1583
|
+
#
|
1584
|
+
# @param resource_group_name [String] The resource group name.
|
1585
|
+
# @param account_name [String] The name of the share account.
|
1586
|
+
# @param skip_token [String] Continuation Token
|
1587
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1588
|
+
# will be added to the HTTP request.
|
1589
|
+
#
|
1590
|
+
# @return [ShareSubscriptionList] which provide lazy access to pages of the
|
1591
|
+
# response.
|
1592
|
+
#
|
1593
|
+
def list_by_account_as_lazy(resource_group_name, account_name, skip_token:nil, custom_headers:nil)
|
1594
|
+
response = list_by_account_async(resource_group_name, account_name, skip_token:skip_token, custom_headers:custom_headers).value!
|
1595
|
+
unless response.nil?
|
1596
|
+
page = response.body
|
1597
|
+
page.next_method = Proc.new do |next_page_link|
|
1598
|
+
list_by_account_next_async(next_page_link, custom_headers:custom_headers)
|
1599
|
+
end
|
1600
|
+
page
|
1601
|
+
end
|
1602
|
+
end
|
1603
|
+
|
1604
|
+
#
|
1605
|
+
# Get source share synchronization settings for a shareSubscription.
|
1606
|
+
#
|
1607
|
+
# Get synchronization settings set on a share
|
1608
|
+
#
|
1609
|
+
# @param resource_group_name [String] The resource group name.
|
1610
|
+
# @param account_name [String] The name of the share account.
|
1611
|
+
# @param share_subscription_name [String] The name of the shareSubscription.
|
1612
|
+
# @param skip_token [String] Continuation token
|
1613
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1614
|
+
# will be added to the HTTP request.
|
1615
|
+
#
|
1616
|
+
# @return [SourceShareSynchronizationSettingList] which provide lazy access to
|
1617
|
+
# pages of the response.
|
1618
|
+
#
|
1619
|
+
def list_source_share_synchronization_settings_as_lazy(resource_group_name, account_name, share_subscription_name, skip_token:nil, custom_headers:nil)
|
1620
|
+
response = list_source_share_synchronization_settings_async(resource_group_name, account_name, share_subscription_name, skip_token:skip_token, custom_headers:custom_headers).value!
|
1621
|
+
unless response.nil?
|
1622
|
+
page = response.body
|
1623
|
+
page.next_method = Proc.new do |next_page_link|
|
1624
|
+
list_source_share_synchronization_settings_next_async(next_page_link, custom_headers:custom_headers)
|
1625
|
+
end
|
1626
|
+
page
|
1627
|
+
end
|
1628
|
+
end
|
1629
|
+
|
1630
|
+
#
|
1631
|
+
# List Synchronizations in a share subscription.
|
1632
|
+
#
|
1633
|
+
# List synchronizations of a share subscription
|
1634
|
+
#
|
1635
|
+
# @param resource_group_name [String] The resource group name.
|
1636
|
+
# @param account_name [String] The name of the share account.
|
1637
|
+
# @param share_subscription_name [String] The name of the share subscription.
|
1638
|
+
# @param skip_token [String] Continuation token
|
1639
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1640
|
+
# will be added to the HTTP request.
|
1641
|
+
#
|
1642
|
+
# @return [ShareSubscriptionSynchronizationList] which provide lazy access to
|
1643
|
+
# pages of the response.
|
1644
|
+
#
|
1645
|
+
def list_synchronizations_as_lazy(resource_group_name, account_name, share_subscription_name, skip_token:nil, custom_headers:nil)
|
1646
|
+
response = list_synchronizations_async(resource_group_name, account_name, share_subscription_name, skip_token:skip_token, custom_headers:custom_headers).value!
|
1647
|
+
unless response.nil?
|
1648
|
+
page = response.body
|
1649
|
+
page.next_method = Proc.new do |next_page_link|
|
1650
|
+
list_synchronizations_next_async(next_page_link, custom_headers:custom_headers)
|
1651
|
+
end
|
1652
|
+
page
|
1653
|
+
end
|
1654
|
+
end
|
1655
|
+
|
1656
|
+
#
|
1657
|
+
# List data set level details for a share subscription synchronization
|
1658
|
+
#
|
1659
|
+
# List synchronization details
|
1660
|
+
#
|
1661
|
+
# @param resource_group_name [String] The resource group name.
|
1662
|
+
# @param account_name [String] The name of the share account.
|
1663
|
+
# @param share_subscription_name [String] The name of the share subscription.
|
1664
|
+
# @param share_subscription_synchronization [ShareSubscriptionSynchronization]
|
1665
|
+
# Share Subscription Synchronization payload.
|
1666
|
+
# @param skip_token [String] Continuation token
|
1667
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1668
|
+
# will be added to the HTTP request.
|
1669
|
+
#
|
1670
|
+
# @return [SynchronizationDetailsList] which provide lazy access to pages of
|
1671
|
+
# the response.
|
1672
|
+
#
|
1673
|
+
def list_synchronization_details_as_lazy(resource_group_name, account_name, share_subscription_name, share_subscription_synchronization, skip_token:nil, custom_headers:nil)
|
1674
|
+
response = list_synchronization_details_async(resource_group_name, account_name, share_subscription_name, share_subscription_synchronization, skip_token:skip_token, custom_headers:custom_headers).value!
|
1675
|
+
unless response.nil?
|
1676
|
+
page = response.body
|
1677
|
+
page.next_method = Proc.new do |next_page_link|
|
1678
|
+
list_synchronization_details_next_async(next_page_link, custom_headers:custom_headers)
|
1679
|
+
end
|
1680
|
+
page
|
1681
|
+
end
|
1682
|
+
end
|
1683
|
+
|
1684
|
+
end
|
1685
|
+
end
|