azure_mgmt_datashare 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare.rb +117 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/accounts.rb +981 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/consumer_invitations.rb +442 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/consumer_source_data_sets.rb +254 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/data_set_mappings.rb +603 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/data_sets.rb +587 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/data_share_management_client.rb +175 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/invitations.rb +587 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/account.rb +135 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/account_list.rb +99 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/account_update_parameters.rb +54 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/adlsgen1file_data_set.rb +144 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/adlsgen1folder_data_set.rb +133 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/adlsgen2file_data_set.rb +144 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/adlsgen2file_data_set_mapping.rb +167 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/adlsgen2file_system_data_set.rb +133 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/adlsgen2file_system_data_set_mapping.rb +144 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/adlsgen2folder_data_set.rb +144 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/adlsgen2folder_data_set_mapping.rb +155 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/blob_container_data_set.rb +133 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/blob_container_data_set_mapping.rb +144 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/blob_data_set.rb +144 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/blob_data_set_mapping.rb +167 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/blob_folder_data_set.rb +144 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/blob_folder_data_set_mapping.rb +155 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/consumer_invitation.rb +194 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/consumer_invitation_list.rb +99 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/consumer_source_data_set.rb +101 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/consumer_source_data_set_list.rb +99 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/data_set.rb +71 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/data_set_list.rb +101 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/data_set_mapping.rb +71 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/data_set_mapping_list.rb +101 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/data_set_mapping_status.rb +16 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/data_set_type.rb +24 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/data_share_error.rb +47 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/data_share_error_info.rb +88 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/default_dto.rb +101 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/dimension_properties.rb +57 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/identity.rb +70 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/invitation.rb +159 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/invitation_list.rb +99 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/invitation_status.rb +18 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/operation_list.rb +99 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/operation_meta_log_specification.rb +68 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/operation_meta_metric_specification.rb +181 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/operation_meta_service_specification.rb +77 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/operation_model.rb +81 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/operation_model_properties.rb +79 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/operation_response.rb +82 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/output_type.rb +16 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/provider_share_subscription.rb +148 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/provider_share_subscription_list.rb +99 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/provisioning_state.rb +19 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/proxy_dto.rb +71 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/recurrence_interval.rb +16 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/scheduled_source_synchronization_setting.rb +73 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/scheduled_synchronization_setting.rb +140 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/scheduled_trigger.rb +162 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/share.rb +133 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/share_kind.rb +15 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/share_list.rb +98 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/share_subscription.rb +197 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/share_subscription_list.rb +99 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/share_subscription_status.rb +18 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/share_subscription_synchronization.rb +106 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/share_subscription_synchronization_list.rb +99 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/share_synchronization.rb +123 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/share_synchronization_list.rb +99 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/source_share_synchronization_setting.rb +46 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/source_share_synchronization_setting_list.rb +101 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/sql_dbtable_data_set.rb +122 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/sql_dbtable_data_set_mapping.rb +133 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/sql_dwtable_data_set.rb +122 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/sql_dwtable_data_set_mapping.rb +133 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/status.rb +20 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/synchronization_details.rb +221 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/synchronization_details_list.rb +99 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/synchronization_mode.rb +16 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/synchronization_setting.rb +71 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/synchronization_setting_list.rb +101 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/synchronize.rb +48 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/trigger.rb +71 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/trigger_list.rb +101 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/trigger_status.rb +17 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/models/type.rb +15 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/module_definition.rb +9 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/operations.rb +232 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/provider_share_subscriptions.rb +636 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/share_subscriptions.rb +1685 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/shares.rb +1101 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/synchronization_settings.rb +667 -0
- data/lib/2018-11-01-preview/generated/azure_mgmt_datashare/triggers.rb +701 -0
- data/lib/azure_mgmt_datashare.rb +6 -0
- data/lib/module_definition.rb +7 -0
- data/lib/profiles/latest/datashare_latest_profile_client.rb +40 -0
- data/lib/profiles/latest/datashare_module_definition.rb +8 -0
- data/lib/profiles/latest/modules/datashare_profile_module.rb +395 -0
- data/lib/version.rb +7 -0
- metadata +217 -0
|
@@ -0,0 +1,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::V2018_11_01_preview
|
|
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::V2018_11_01_preview::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::V2018_11_01_preview::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::V2018_11_01_preview::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::V2018_11_01_preview::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::V2018_11_01_preview::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
|
+
# Get source share synchronization settings for a shareSubscription.
|
|
304
|
+
#
|
|
305
|
+
# Get synchronization settings set on a share
|
|
306
|
+
#
|
|
307
|
+
# @param resource_group_name [String] The resource group name.
|
|
308
|
+
# @param account_name [String] The name of the share account.
|
|
309
|
+
# @param share_subscription_name [String] The name of the shareSubscription.
|
|
310
|
+
# @param skip_token [String] Continuation token
|
|
311
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
312
|
+
# will be added to the HTTP request.
|
|
313
|
+
#
|
|
314
|
+
# @return [Array<SourceShareSynchronizationSetting>] operation results.
|
|
315
|
+
#
|
|
316
|
+
def list_source_share_synchronization_settings(resource_group_name, account_name, share_subscription_name, skip_token:nil, custom_headers:nil)
|
|
317
|
+
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)
|
|
318
|
+
first_page.get_all_items
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
#
|
|
322
|
+
# Get source share synchronization settings for a shareSubscription.
|
|
323
|
+
#
|
|
324
|
+
# Get synchronization settings set on a share
|
|
325
|
+
#
|
|
326
|
+
# @param resource_group_name [String] The resource group name.
|
|
327
|
+
# @param account_name [String] The name of the share account.
|
|
328
|
+
# @param share_subscription_name [String] The name of the shareSubscription.
|
|
329
|
+
# @param skip_token [String] Continuation token
|
|
330
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
331
|
+
# will be added to the HTTP request.
|
|
332
|
+
#
|
|
333
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
334
|
+
#
|
|
335
|
+
def list_source_share_synchronization_settings_with_http_info(resource_group_name, account_name, share_subscription_name, skip_token:nil, custom_headers:nil)
|
|
336
|
+
list_source_share_synchronization_settings_async(resource_group_name, account_name, share_subscription_name, skip_token:skip_token, custom_headers:custom_headers).value!
|
|
337
|
+
end
|
|
338
|
+
|
|
339
|
+
#
|
|
340
|
+
# Get source share synchronization settings for a shareSubscription.
|
|
341
|
+
#
|
|
342
|
+
# Get synchronization settings set on a share
|
|
343
|
+
#
|
|
344
|
+
# @param resource_group_name [String] The resource group name.
|
|
345
|
+
# @param account_name [String] The name of the share account.
|
|
346
|
+
# @param share_subscription_name [String] The name of the shareSubscription.
|
|
347
|
+
# @param skip_token [String] Continuation token
|
|
348
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
349
|
+
# to the HTTP request.
|
|
350
|
+
#
|
|
351
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
352
|
+
#
|
|
353
|
+
def list_source_share_synchronization_settings_async(resource_group_name, account_name, share_subscription_name, skip_token:nil, custom_headers:nil)
|
|
354
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
|
355
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
|
356
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
|
357
|
+
fail ArgumentError, 'share_subscription_name is nil' if share_subscription_name.nil?
|
|
358
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
request_headers = {}
|
|
362
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
|
363
|
+
|
|
364
|
+
# Set Headers
|
|
365
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
366
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
367
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/listSourceShareSynchronizationSettings'
|
|
368
|
+
|
|
369
|
+
request_url = @base_url || @client.base_url
|
|
370
|
+
|
|
371
|
+
options = {
|
|
372
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
373
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'shareSubscriptionName' => share_subscription_name},
|
|
374
|
+
query_params: {'api-version' => @client.api_version,'$skipToken' => skip_token},
|
|
375
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
376
|
+
base_url: request_url
|
|
377
|
+
}
|
|
378
|
+
promise = @client.make_request_async(:post, path_template, options)
|
|
379
|
+
|
|
380
|
+
promise = promise.then do |result|
|
|
381
|
+
http_response = result.response
|
|
382
|
+
status_code = http_response.status
|
|
383
|
+
response_content = http_response.body
|
|
384
|
+
unless status_code == 200
|
|
385
|
+
error_model = JSON.load(response_content)
|
|
386
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
|
387
|
+
end
|
|
388
|
+
|
|
389
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
390
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
|
391
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
|
392
|
+
# Deserialize Response
|
|
393
|
+
if status_code == 200
|
|
394
|
+
begin
|
|
395
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
396
|
+
result_mapper = Azure::DataShare::Mgmt::V2018_11_01_preview::Models::SourceShareSynchronizationSettingList.mapper()
|
|
397
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
|
398
|
+
rescue Exception => e
|
|
399
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
400
|
+
end
|
|
401
|
+
end
|
|
402
|
+
|
|
403
|
+
result
|
|
404
|
+
end
|
|
405
|
+
|
|
406
|
+
promise.execute
|
|
407
|
+
end
|
|
408
|
+
|
|
409
|
+
#
|
|
410
|
+
# List Synchronizations in a share subscription.
|
|
411
|
+
#
|
|
412
|
+
# List synchronizations of a share subscription
|
|
413
|
+
#
|
|
414
|
+
# @param resource_group_name [String] The resource group name.
|
|
415
|
+
# @param account_name [String] The name of the share account.
|
|
416
|
+
# @param share_subscription_name [String] The name of the share subscription.
|
|
417
|
+
# @param skip_token [String] Continuation token
|
|
418
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
419
|
+
# will be added to the HTTP request.
|
|
420
|
+
#
|
|
421
|
+
# @return [Array<ShareSubscriptionSynchronization>] operation results.
|
|
422
|
+
#
|
|
423
|
+
def list_synchronizations(resource_group_name, account_name, share_subscription_name, skip_token:nil, custom_headers:nil)
|
|
424
|
+
first_page = list_synchronizations_as_lazy(resource_group_name, account_name, share_subscription_name, skip_token:skip_token, custom_headers:custom_headers)
|
|
425
|
+
first_page.get_all_items
|
|
426
|
+
end
|
|
427
|
+
|
|
428
|
+
#
|
|
429
|
+
# List Synchronizations in a share subscription.
|
|
430
|
+
#
|
|
431
|
+
# List synchronizations of a share subscription
|
|
432
|
+
#
|
|
433
|
+
# @param resource_group_name [String] The resource group name.
|
|
434
|
+
# @param account_name [String] The name of the share account.
|
|
435
|
+
# @param share_subscription_name [String] The name of the share subscription.
|
|
436
|
+
# @param skip_token [String] Continuation token
|
|
437
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
438
|
+
# will be added to the HTTP request.
|
|
439
|
+
#
|
|
440
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
441
|
+
#
|
|
442
|
+
def list_synchronizations_with_http_info(resource_group_name, account_name, share_subscription_name, skip_token:nil, custom_headers:nil)
|
|
443
|
+
list_synchronizations_async(resource_group_name, account_name, share_subscription_name, skip_token:skip_token, custom_headers:custom_headers).value!
|
|
444
|
+
end
|
|
445
|
+
|
|
446
|
+
#
|
|
447
|
+
# List Synchronizations in a share subscription.
|
|
448
|
+
#
|
|
449
|
+
# List synchronizations of a share subscription
|
|
450
|
+
#
|
|
451
|
+
# @param resource_group_name [String] The resource group name.
|
|
452
|
+
# @param account_name [String] The name of the share account.
|
|
453
|
+
# @param share_subscription_name [String] The name of the share subscription.
|
|
454
|
+
# @param skip_token [String] Continuation token
|
|
455
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
456
|
+
# to the HTTP request.
|
|
457
|
+
#
|
|
458
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
459
|
+
#
|
|
460
|
+
def list_synchronizations_async(resource_group_name, account_name, share_subscription_name, skip_token:nil, custom_headers:nil)
|
|
461
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
|
462
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
|
463
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
|
464
|
+
fail ArgumentError, 'share_subscription_name is nil' if share_subscription_name.nil?
|
|
465
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
request_headers = {}
|
|
469
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
|
470
|
+
|
|
471
|
+
# Set Headers
|
|
472
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
473
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
474
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/listSynchronizations'
|
|
475
|
+
|
|
476
|
+
request_url = @base_url || @client.base_url
|
|
477
|
+
|
|
478
|
+
options = {
|
|
479
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
480
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'shareSubscriptionName' => share_subscription_name},
|
|
481
|
+
query_params: {'api-version' => @client.api_version,'$skipToken' => skip_token},
|
|
482
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
483
|
+
base_url: request_url
|
|
484
|
+
}
|
|
485
|
+
promise = @client.make_request_async(:post, path_template, options)
|
|
486
|
+
|
|
487
|
+
promise = promise.then do |result|
|
|
488
|
+
http_response = result.response
|
|
489
|
+
status_code = http_response.status
|
|
490
|
+
response_content = http_response.body
|
|
491
|
+
unless status_code == 200
|
|
492
|
+
error_model = JSON.load(response_content)
|
|
493
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
|
494
|
+
end
|
|
495
|
+
|
|
496
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
497
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
|
498
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
|
499
|
+
# Deserialize Response
|
|
500
|
+
if status_code == 200
|
|
501
|
+
begin
|
|
502
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
503
|
+
result_mapper = Azure::DataShare::Mgmt::V2018_11_01_preview::Models::ShareSubscriptionSynchronizationList.mapper()
|
|
504
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
|
505
|
+
rescue Exception => e
|
|
506
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
507
|
+
end
|
|
508
|
+
end
|
|
509
|
+
|
|
510
|
+
result
|
|
511
|
+
end
|
|
512
|
+
|
|
513
|
+
promise.execute
|
|
514
|
+
end
|
|
515
|
+
|
|
516
|
+
#
|
|
517
|
+
# List data set level details for a share subscription synchronization
|
|
518
|
+
#
|
|
519
|
+
# List synchronization details
|
|
520
|
+
#
|
|
521
|
+
# @param resource_group_name [String] The resource group name.
|
|
522
|
+
# @param account_name [String] The name of the share account.
|
|
523
|
+
# @param share_subscription_name [String] The name of the share subscription.
|
|
524
|
+
# @param share_subscription_synchronization [ShareSubscriptionSynchronization]
|
|
525
|
+
# Share Subscription Synchronization payload.
|
|
526
|
+
# @param skip_token [String] Continuation token
|
|
527
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
528
|
+
# will be added to the HTTP request.
|
|
529
|
+
#
|
|
530
|
+
# @return [Array<SynchronizationDetails>] operation results.
|
|
531
|
+
#
|
|
532
|
+
def list_synchronization_details(resource_group_name, account_name, share_subscription_name, share_subscription_synchronization, skip_token:nil, custom_headers:nil)
|
|
533
|
+
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)
|
|
534
|
+
first_page.get_all_items
|
|
535
|
+
end
|
|
536
|
+
|
|
537
|
+
#
|
|
538
|
+
# List data set level details for a share subscription synchronization
|
|
539
|
+
#
|
|
540
|
+
# List synchronization details
|
|
541
|
+
#
|
|
542
|
+
# @param resource_group_name [String] The resource group name.
|
|
543
|
+
# @param account_name [String] The name of the share account.
|
|
544
|
+
# @param share_subscription_name [String] The name of the share subscription.
|
|
545
|
+
# @param share_subscription_synchronization [ShareSubscriptionSynchronization]
|
|
546
|
+
# Share Subscription Synchronization payload.
|
|
547
|
+
# @param skip_token [String] Continuation token
|
|
548
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
549
|
+
# will be added to the HTTP request.
|
|
550
|
+
#
|
|
551
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
552
|
+
#
|
|
553
|
+
def list_synchronization_details_with_http_info(resource_group_name, account_name, share_subscription_name, share_subscription_synchronization, skip_token:nil, custom_headers:nil)
|
|
554
|
+
list_synchronization_details_async(resource_group_name, account_name, share_subscription_name, share_subscription_synchronization, skip_token:skip_token, custom_headers:custom_headers).value!
|
|
555
|
+
end
|
|
556
|
+
|
|
557
|
+
#
|
|
558
|
+
# List data set level details for a share subscription synchronization
|
|
559
|
+
#
|
|
560
|
+
# List synchronization details
|
|
561
|
+
#
|
|
562
|
+
# @param resource_group_name [String] The resource group name.
|
|
563
|
+
# @param account_name [String] The name of the share account.
|
|
564
|
+
# @param share_subscription_name [String] The name of the share subscription.
|
|
565
|
+
# @param share_subscription_synchronization [ShareSubscriptionSynchronization]
|
|
566
|
+
# Share Subscription Synchronization payload.
|
|
567
|
+
# @param skip_token [String] Continuation token
|
|
568
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
569
|
+
# to the HTTP request.
|
|
570
|
+
#
|
|
571
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
572
|
+
#
|
|
573
|
+
def list_synchronization_details_async(resource_group_name, account_name, share_subscription_name, share_subscription_synchronization, skip_token:nil, custom_headers:nil)
|
|
574
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
|
575
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
|
576
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
|
577
|
+
fail ArgumentError, 'share_subscription_name is nil' if share_subscription_name.nil?
|
|
578
|
+
fail ArgumentError, 'share_subscription_synchronization is nil' if share_subscription_synchronization.nil?
|
|
579
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
|
580
|
+
|
|
581
|
+
|
|
582
|
+
request_headers = {}
|
|
583
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
|
584
|
+
|
|
585
|
+
# Set Headers
|
|
586
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
587
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
588
|
+
|
|
589
|
+
# Serialize Request
|
|
590
|
+
request_mapper = Azure::DataShare::Mgmt::V2018_11_01_preview::Models::ShareSubscriptionSynchronization.mapper()
|
|
591
|
+
request_content = @client.serialize(request_mapper, share_subscription_synchronization)
|
|
592
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
|
593
|
+
|
|
594
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/listSynchronizationDetails'
|
|
595
|
+
|
|
596
|
+
request_url = @base_url || @client.base_url
|
|
597
|
+
|
|
598
|
+
options = {
|
|
599
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
600
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'shareSubscriptionName' => share_subscription_name},
|
|
601
|
+
query_params: {'api-version' => @client.api_version,'$skipToken' => skip_token},
|
|
602
|
+
body: request_content,
|
|
603
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
604
|
+
base_url: request_url
|
|
605
|
+
}
|
|
606
|
+
promise = @client.make_request_async(:post, path_template, options)
|
|
607
|
+
|
|
608
|
+
promise = promise.then do |result|
|
|
609
|
+
http_response = result.response
|
|
610
|
+
status_code = http_response.status
|
|
611
|
+
response_content = http_response.body
|
|
612
|
+
unless status_code == 200
|
|
613
|
+
error_model = JSON.load(response_content)
|
|
614
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
|
615
|
+
end
|
|
616
|
+
|
|
617
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
618
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
|
619
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
|
620
|
+
# Deserialize Response
|
|
621
|
+
if status_code == 200
|
|
622
|
+
begin
|
|
623
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
624
|
+
result_mapper = Azure::DataShare::Mgmt::V2018_11_01_preview::Models::SynchronizationDetailsList.mapper()
|
|
625
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
|
626
|
+
rescue Exception => e
|
|
627
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
628
|
+
end
|
|
629
|
+
end
|
|
630
|
+
|
|
631
|
+
result
|
|
632
|
+
end
|
|
633
|
+
|
|
634
|
+
promise.execute
|
|
635
|
+
end
|
|
636
|
+
|
|
637
|
+
#
|
|
638
|
+
# Initiate an asynchronous data share job
|
|
639
|
+
#
|
|
640
|
+
# Initiate a copy
|
|
641
|
+
#
|
|
642
|
+
# @param resource_group_name [String] The resource group name.
|
|
643
|
+
# @param account_name [String] The name of the share account.
|
|
644
|
+
# @param share_subscription_name [String] The name of share subscription
|
|
645
|
+
# @param synchronize [Synchronize] Synchronize payload
|
|
646
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
647
|
+
# will be added to the HTTP request.
|
|
648
|
+
#
|
|
649
|
+
# @return [ShareSubscriptionSynchronization] operation results.
|
|
650
|
+
#
|
|
651
|
+
def synchronize_method(resource_group_name, account_name, share_subscription_name, synchronize, custom_headers:nil)
|
|
652
|
+
response = synchronize_method_async(resource_group_name, account_name, share_subscription_name, synchronize, custom_headers:custom_headers).value!
|
|
653
|
+
response.body unless response.nil?
|
|
654
|
+
end
|
|
655
|
+
|
|
656
|
+
#
|
|
657
|
+
# @param resource_group_name [String] The resource group name.
|
|
658
|
+
# @param account_name [String] The name of the share account.
|
|
659
|
+
# @param share_subscription_name [String] The name of share subscription
|
|
660
|
+
# @param synchronize [Synchronize] Synchronize payload
|
|
661
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
662
|
+
# will be added to the HTTP request.
|
|
663
|
+
#
|
|
664
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
|
665
|
+
# response.
|
|
666
|
+
#
|
|
667
|
+
def synchronize_method_async(resource_group_name, account_name, share_subscription_name, synchronize, custom_headers:nil)
|
|
668
|
+
# Send request
|
|
669
|
+
promise = begin_synchronize_method_async(resource_group_name, account_name, share_subscription_name, synchronize, custom_headers:custom_headers)
|
|
670
|
+
|
|
671
|
+
promise = promise.then do |response|
|
|
672
|
+
# Defining deserialization method.
|
|
673
|
+
deserialize_method = lambda do |parsed_response|
|
|
674
|
+
result_mapper = Azure::DataShare::Mgmt::V2018_11_01_preview::Models::ShareSubscriptionSynchronization.mapper()
|
|
675
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
|
676
|
+
end
|
|
677
|
+
|
|
678
|
+
# Waiting for response.
|
|
679
|
+
@client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::AZURE_ASYNC_OPERATION)
|
|
680
|
+
end
|
|
681
|
+
|
|
682
|
+
promise
|
|
683
|
+
end
|
|
684
|
+
|
|
685
|
+
#
|
|
686
|
+
# Request cancellation of a data share snapshot
|
|
687
|
+
#
|
|
688
|
+
# Request to cancel a synchronization.
|
|
689
|
+
#
|
|
690
|
+
# @param resource_group_name [String] The resource group name.
|
|
691
|
+
# @param account_name [String] The name of the share account.
|
|
692
|
+
# @param share_subscription_name [String] The name of the shareSubscription.
|
|
693
|
+
# @param share_subscription_synchronization [ShareSubscriptionSynchronization]
|
|
694
|
+
# Share Subscription Synchronization payload.
|
|
695
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
696
|
+
# will be added to the HTTP request.
|
|
697
|
+
#
|
|
698
|
+
# @return [ShareSubscriptionSynchronization] operation results.
|
|
699
|
+
#
|
|
700
|
+
def cancel_synchronization(resource_group_name, account_name, share_subscription_name, share_subscription_synchronization, custom_headers:nil)
|
|
701
|
+
response = cancel_synchronization_async(resource_group_name, account_name, share_subscription_name, share_subscription_synchronization, custom_headers:custom_headers).value!
|
|
702
|
+
response.body unless response.nil?
|
|
703
|
+
end
|
|
704
|
+
|
|
705
|
+
#
|
|
706
|
+
# @param resource_group_name [String] The resource group name.
|
|
707
|
+
# @param account_name [String] The name of the share account.
|
|
708
|
+
# @param share_subscription_name [String] The name of the shareSubscription.
|
|
709
|
+
# @param share_subscription_synchronization [ShareSubscriptionSynchronization]
|
|
710
|
+
# Share Subscription Synchronization payload.
|
|
711
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
712
|
+
# will be added to the HTTP request.
|
|
713
|
+
#
|
|
714
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
|
715
|
+
# response.
|
|
716
|
+
#
|
|
717
|
+
def cancel_synchronization_async(resource_group_name, account_name, share_subscription_name, share_subscription_synchronization, custom_headers:nil)
|
|
718
|
+
# Send request
|
|
719
|
+
promise = begin_cancel_synchronization_async(resource_group_name, account_name, share_subscription_name, share_subscription_synchronization, custom_headers:custom_headers)
|
|
720
|
+
|
|
721
|
+
promise = promise.then do |response|
|
|
722
|
+
# Defining deserialization method.
|
|
723
|
+
deserialize_method = lambda do |parsed_response|
|
|
724
|
+
result_mapper = Azure::DataShare::Mgmt::V2018_11_01_preview::Models::ShareSubscriptionSynchronization.mapper()
|
|
725
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
|
726
|
+
end
|
|
727
|
+
|
|
728
|
+
# Waiting for response.
|
|
729
|
+
@client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::AZURE_ASYNC_OPERATION)
|
|
730
|
+
end
|
|
731
|
+
|
|
732
|
+
promise
|
|
733
|
+
end
|
|
734
|
+
|
|
735
|
+
#
|
|
736
|
+
# List of available share subscriptions under an account.
|
|
737
|
+
#
|
|
738
|
+
# List share subscriptions in an account
|
|
739
|
+
#
|
|
740
|
+
# @param resource_group_name [String] The resource group name.
|
|
741
|
+
# @param account_name [String] The name of the share account.
|
|
742
|
+
# @param skip_token [String] Continuation Token
|
|
743
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
744
|
+
# will be added to the HTTP request.
|
|
745
|
+
#
|
|
746
|
+
# @return [Array<ShareSubscription>] operation results.
|
|
747
|
+
#
|
|
748
|
+
def list_by_account(resource_group_name, account_name, skip_token:nil, custom_headers:nil)
|
|
749
|
+
first_page = list_by_account_as_lazy(resource_group_name, account_name, skip_token:skip_token, custom_headers:custom_headers)
|
|
750
|
+
first_page.get_all_items
|
|
751
|
+
end
|
|
752
|
+
|
|
753
|
+
#
|
|
754
|
+
# List of available share subscriptions under an account.
|
|
755
|
+
#
|
|
756
|
+
# List share subscriptions in an account
|
|
757
|
+
#
|
|
758
|
+
# @param resource_group_name [String] The resource group name.
|
|
759
|
+
# @param account_name [String] The name of the share account.
|
|
760
|
+
# @param skip_token [String] Continuation Token
|
|
761
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
762
|
+
# will be added to the HTTP request.
|
|
763
|
+
#
|
|
764
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
765
|
+
#
|
|
766
|
+
def list_by_account_with_http_info(resource_group_name, account_name, skip_token:nil, custom_headers:nil)
|
|
767
|
+
list_by_account_async(resource_group_name, account_name, skip_token:skip_token, custom_headers:custom_headers).value!
|
|
768
|
+
end
|
|
769
|
+
|
|
770
|
+
#
|
|
771
|
+
# List of available share subscriptions under an account.
|
|
772
|
+
#
|
|
773
|
+
# List share subscriptions in an account
|
|
774
|
+
#
|
|
775
|
+
# @param resource_group_name [String] The resource group name.
|
|
776
|
+
# @param account_name [String] The name of the share account.
|
|
777
|
+
# @param skip_token [String] Continuation Token
|
|
778
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
779
|
+
# to the HTTP request.
|
|
780
|
+
#
|
|
781
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
782
|
+
#
|
|
783
|
+
def list_by_account_async(resource_group_name, account_name, skip_token:nil, custom_headers:nil)
|
|
784
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
|
785
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
|
786
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
|
787
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
|
788
|
+
|
|
789
|
+
|
|
790
|
+
request_headers = {}
|
|
791
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
|
792
|
+
|
|
793
|
+
# Set Headers
|
|
794
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
795
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
796
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions'
|
|
797
|
+
|
|
798
|
+
request_url = @base_url || @client.base_url
|
|
799
|
+
|
|
800
|
+
options = {
|
|
801
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
802
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
|
|
803
|
+
query_params: {'api-version' => @client.api_version,'$skipToken' => skip_token},
|
|
804
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
805
|
+
base_url: request_url
|
|
806
|
+
}
|
|
807
|
+
promise = @client.make_request_async(:get, path_template, options)
|
|
808
|
+
|
|
809
|
+
promise = promise.then do |result|
|
|
810
|
+
http_response = result.response
|
|
811
|
+
status_code = http_response.status
|
|
812
|
+
response_content = http_response.body
|
|
813
|
+
unless status_code == 200
|
|
814
|
+
error_model = JSON.load(response_content)
|
|
815
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
|
816
|
+
end
|
|
817
|
+
|
|
818
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
819
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
|
820
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
|
821
|
+
# Deserialize Response
|
|
822
|
+
if status_code == 200
|
|
823
|
+
begin
|
|
824
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
825
|
+
result_mapper = Azure::DataShare::Mgmt::V2018_11_01_preview::Models::ShareSubscriptionList.mapper()
|
|
826
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
|
827
|
+
rescue Exception => e
|
|
828
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
829
|
+
end
|
|
830
|
+
end
|
|
831
|
+
|
|
832
|
+
result
|
|
833
|
+
end
|
|
834
|
+
|
|
835
|
+
promise.execute
|
|
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::V2018_11_01_preview::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::V2018_11_01_preview::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::V2018_11_01_preview::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::V2018_11_01_preview::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::V2018_11_01_preview::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::V2018_11_01_preview::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::V2018_11_01_preview::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
|
+
# Get source share synchronization settings for a shareSubscription.
|
|
1197
|
+
#
|
|
1198
|
+
# Get synchronization settings set on a share
|
|
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 [SourceShareSynchronizationSettingList] operation results.
|
|
1206
|
+
#
|
|
1207
|
+
def list_source_share_synchronization_settings_next(next_page_link, custom_headers:nil)
|
|
1208
|
+
response = list_source_share_synchronization_settings_next_async(next_page_link, custom_headers:custom_headers).value!
|
|
1209
|
+
response.body unless response.nil?
|
|
1210
|
+
end
|
|
1211
|
+
|
|
1212
|
+
#
|
|
1213
|
+
# Get source share synchronization settings for a shareSubscription.
|
|
1214
|
+
#
|
|
1215
|
+
# Get synchronization settings set on a share
|
|
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_source_share_synchronization_settings_next_with_http_info(next_page_link, custom_headers:nil)
|
|
1225
|
+
list_source_share_synchronization_settings_next_async(next_page_link, custom_headers:custom_headers).value!
|
|
1226
|
+
end
|
|
1227
|
+
|
|
1228
|
+
#
|
|
1229
|
+
# Get source share synchronization settings for a shareSubscription.
|
|
1230
|
+
#
|
|
1231
|
+
# Get synchronization settings set on a share
|
|
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_source_share_synchronization_settings_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(:post, 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::V2018_11_01_preview::Models::SourceShareSynchronizationSettingList.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
|
+
# List Synchronizations in a share subscription.
|
|
1293
|
+
#
|
|
1294
|
+
# List synchronizations of a share subscription
|
|
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 [ShareSubscriptionSynchronizationList] operation results.
|
|
1302
|
+
#
|
|
1303
|
+
def list_synchronizations_next(next_page_link, custom_headers:nil)
|
|
1304
|
+
response = list_synchronizations_next_async(next_page_link, custom_headers:custom_headers).value!
|
|
1305
|
+
response.body unless response.nil?
|
|
1306
|
+
end
|
|
1307
|
+
|
|
1308
|
+
#
|
|
1309
|
+
# List Synchronizations in a share subscription.
|
|
1310
|
+
#
|
|
1311
|
+
# List synchronizations of a share subscription
|
|
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_synchronizations_next_with_http_info(next_page_link, custom_headers:nil)
|
|
1321
|
+
list_synchronizations_next_async(next_page_link, custom_headers:custom_headers).value!
|
|
1322
|
+
end
|
|
1323
|
+
|
|
1324
|
+
#
|
|
1325
|
+
# List Synchronizations in a share subscription.
|
|
1326
|
+
#
|
|
1327
|
+
# List synchronizations of a share subscription
|
|
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_synchronizations_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::V2018_11_01_preview::Models::ShareSubscriptionSynchronizationList.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 data set level details for a share subscription synchronization
|
|
1389
|
+
#
|
|
1390
|
+
# List synchronization details
|
|
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 [SynchronizationDetailsList] operation results.
|
|
1398
|
+
#
|
|
1399
|
+
def list_synchronization_details_next(next_page_link, custom_headers:nil)
|
|
1400
|
+
response = list_synchronization_details_next_async(next_page_link, custom_headers:custom_headers).value!
|
|
1401
|
+
response.body unless response.nil?
|
|
1402
|
+
end
|
|
1403
|
+
|
|
1404
|
+
#
|
|
1405
|
+
# List data set level details for a share subscription synchronization
|
|
1406
|
+
#
|
|
1407
|
+
# List synchronization details
|
|
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_synchronization_details_next_with_http_info(next_page_link, custom_headers:nil)
|
|
1417
|
+
list_synchronization_details_next_async(next_page_link, custom_headers:custom_headers).value!
|
|
1418
|
+
end
|
|
1419
|
+
|
|
1420
|
+
#
|
|
1421
|
+
# List data set level details for a share subscription synchronization
|
|
1422
|
+
#
|
|
1423
|
+
# List synchronization details
|
|
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_synchronization_details_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::V2018_11_01_preview::Models::SynchronizationDetailsList.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 of available share subscriptions under an account.
|
|
1485
|
+
#
|
|
1486
|
+
# List share subscriptions in an account
|
|
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 [ShareSubscriptionList] operation results.
|
|
1494
|
+
#
|
|
1495
|
+
def list_by_account_next(next_page_link, custom_headers:nil)
|
|
1496
|
+
response = list_by_account_next_async(next_page_link, custom_headers:custom_headers).value!
|
|
1497
|
+
response.body unless response.nil?
|
|
1498
|
+
end
|
|
1499
|
+
|
|
1500
|
+
#
|
|
1501
|
+
# List of available share subscriptions under an account.
|
|
1502
|
+
#
|
|
1503
|
+
# List share subscriptions in an account
|
|
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_by_account_next_with_http_info(next_page_link, custom_headers:nil)
|
|
1513
|
+
list_by_account_next_async(next_page_link, custom_headers:custom_headers).value!
|
|
1514
|
+
end
|
|
1515
|
+
|
|
1516
|
+
#
|
|
1517
|
+
# List of available share subscriptions under an account.
|
|
1518
|
+
#
|
|
1519
|
+
# List share subscriptions in an account
|
|
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_by_account_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(:get, 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::V2018_11_01_preview::Models::ShareSubscriptionList.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
|
+
# Get source share synchronization settings for a shareSubscription.
|
|
1581
|
+
#
|
|
1582
|
+
# Get synchronization settings set on a share
|
|
1583
|
+
#
|
|
1584
|
+
# @param resource_group_name [String] The resource group name.
|
|
1585
|
+
# @param account_name [String] The name of the share account.
|
|
1586
|
+
# @param share_subscription_name [String] The name of the shareSubscription.
|
|
1587
|
+
# @param skip_token [String] Continuation token
|
|
1588
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
1589
|
+
# will be added to the HTTP request.
|
|
1590
|
+
#
|
|
1591
|
+
# @return [SourceShareSynchronizationSettingList] which provide lazy access to
|
|
1592
|
+
# pages of the response.
|
|
1593
|
+
#
|
|
1594
|
+
def list_source_share_synchronization_settings_as_lazy(resource_group_name, account_name, share_subscription_name, skip_token:nil, custom_headers:nil)
|
|
1595
|
+
response = list_source_share_synchronization_settings_async(resource_group_name, account_name, share_subscription_name, skip_token:skip_token, custom_headers:custom_headers).value!
|
|
1596
|
+
unless response.nil?
|
|
1597
|
+
page = response.body
|
|
1598
|
+
page.next_method = Proc.new do |next_page_link|
|
|
1599
|
+
list_source_share_synchronization_settings_next_async(next_page_link, custom_headers:custom_headers)
|
|
1600
|
+
end
|
|
1601
|
+
page
|
|
1602
|
+
end
|
|
1603
|
+
end
|
|
1604
|
+
|
|
1605
|
+
#
|
|
1606
|
+
# List Synchronizations in a share subscription.
|
|
1607
|
+
#
|
|
1608
|
+
# List synchronizations of a share subscription
|
|
1609
|
+
#
|
|
1610
|
+
# @param resource_group_name [String] The resource group name.
|
|
1611
|
+
# @param account_name [String] The name of the share account.
|
|
1612
|
+
# @param share_subscription_name [String] The name of the share subscription.
|
|
1613
|
+
# @param skip_token [String] Continuation token
|
|
1614
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
1615
|
+
# will be added to the HTTP request.
|
|
1616
|
+
#
|
|
1617
|
+
# @return [ShareSubscriptionSynchronizationList] which provide lazy access to
|
|
1618
|
+
# pages of the response.
|
|
1619
|
+
#
|
|
1620
|
+
def list_synchronizations_as_lazy(resource_group_name, account_name, share_subscription_name, skip_token:nil, custom_headers:nil)
|
|
1621
|
+
response = list_synchronizations_async(resource_group_name, account_name, share_subscription_name, skip_token:skip_token, custom_headers:custom_headers).value!
|
|
1622
|
+
unless response.nil?
|
|
1623
|
+
page = response.body
|
|
1624
|
+
page.next_method = Proc.new do |next_page_link|
|
|
1625
|
+
list_synchronizations_next_async(next_page_link, custom_headers:custom_headers)
|
|
1626
|
+
end
|
|
1627
|
+
page
|
|
1628
|
+
end
|
|
1629
|
+
end
|
|
1630
|
+
|
|
1631
|
+
#
|
|
1632
|
+
# List data set level details for a share subscription synchronization
|
|
1633
|
+
#
|
|
1634
|
+
# List synchronization details
|
|
1635
|
+
#
|
|
1636
|
+
# @param resource_group_name [String] The resource group name.
|
|
1637
|
+
# @param account_name [String] The name of the share account.
|
|
1638
|
+
# @param share_subscription_name [String] The name of the share subscription.
|
|
1639
|
+
# @param share_subscription_synchronization [ShareSubscriptionSynchronization]
|
|
1640
|
+
# Share Subscription Synchronization payload.
|
|
1641
|
+
# @param skip_token [String] Continuation token
|
|
1642
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
1643
|
+
# will be added to the HTTP request.
|
|
1644
|
+
#
|
|
1645
|
+
# @return [SynchronizationDetailsList] which provide lazy access to pages of
|
|
1646
|
+
# the response.
|
|
1647
|
+
#
|
|
1648
|
+
def list_synchronization_details_as_lazy(resource_group_name, account_name, share_subscription_name, share_subscription_synchronization, skip_token:nil, custom_headers:nil)
|
|
1649
|
+
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!
|
|
1650
|
+
unless response.nil?
|
|
1651
|
+
page = response.body
|
|
1652
|
+
page.next_method = Proc.new do |next_page_link|
|
|
1653
|
+
list_synchronization_details_next_async(next_page_link, custom_headers:custom_headers)
|
|
1654
|
+
end
|
|
1655
|
+
page
|
|
1656
|
+
end
|
|
1657
|
+
end
|
|
1658
|
+
|
|
1659
|
+
#
|
|
1660
|
+
# List of available share subscriptions under an account.
|
|
1661
|
+
#
|
|
1662
|
+
# List share subscriptions in an account
|
|
1663
|
+
#
|
|
1664
|
+
# @param resource_group_name [String] The resource group name.
|
|
1665
|
+
# @param account_name [String] The name of the share account.
|
|
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 [ShareSubscriptionList] which provide lazy access to pages of the
|
|
1671
|
+
# response.
|
|
1672
|
+
#
|
|
1673
|
+
def list_by_account_as_lazy(resource_group_name, account_name, skip_token:nil, custom_headers:nil)
|
|
1674
|
+
response = list_by_account_async(resource_group_name, account_name, 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_by_account_next_async(next_page_link, custom_headers:custom_headers)
|
|
1679
|
+
end
|
|
1680
|
+
page
|
|
1681
|
+
end
|
|
1682
|
+
end
|
|
1683
|
+
|
|
1684
|
+
end
|
|
1685
|
+
end
|