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,175 @@
|
|
|
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
|
+
# A service client - single point of access to the REST API.
|
|
9
|
+
#
|
|
10
|
+
class DataShareManagementClient < MsRestAzure::AzureServiceClient
|
|
11
|
+
include MsRestAzure
|
|
12
|
+
include MsRestAzure::Serialization
|
|
13
|
+
|
|
14
|
+
# @return [String] the base URI of the service.
|
|
15
|
+
attr_accessor :base_url
|
|
16
|
+
|
|
17
|
+
# @return Credentials needed for the client to connect to Azure.
|
|
18
|
+
attr_reader :credentials
|
|
19
|
+
|
|
20
|
+
# @return [String] The api version to use.
|
|
21
|
+
attr_reader :api_version
|
|
22
|
+
|
|
23
|
+
# @return [String] The subscription identifier
|
|
24
|
+
attr_accessor :subscription_id
|
|
25
|
+
|
|
26
|
+
# @return [String] The preferred language for the response.
|
|
27
|
+
attr_accessor :accept_language
|
|
28
|
+
|
|
29
|
+
# @return [Integer] The retry timeout in seconds for Long Running
|
|
30
|
+
# Operations. Default value is 30.
|
|
31
|
+
attr_accessor :long_running_operation_retry_timeout
|
|
32
|
+
|
|
33
|
+
# @return [Boolean] Whether a unique x-ms-client-request-id should be
|
|
34
|
+
# generated. When set to true a unique x-ms-client-request-id value is
|
|
35
|
+
# generated and included in each request. Default is true.
|
|
36
|
+
attr_accessor :generate_client_request_id
|
|
37
|
+
|
|
38
|
+
# @return [Accounts] accounts
|
|
39
|
+
attr_reader :accounts
|
|
40
|
+
|
|
41
|
+
# @return [ConsumerInvitations] consumer_invitations
|
|
42
|
+
attr_reader :consumer_invitations
|
|
43
|
+
|
|
44
|
+
# @return [DataSets] data_sets
|
|
45
|
+
attr_reader :data_sets
|
|
46
|
+
|
|
47
|
+
# @return [DataSetMappings] data_set_mappings
|
|
48
|
+
attr_reader :data_set_mappings
|
|
49
|
+
|
|
50
|
+
# @return [Invitations] invitations
|
|
51
|
+
attr_reader :invitations
|
|
52
|
+
|
|
53
|
+
# @return [Operations] operations
|
|
54
|
+
attr_reader :operations
|
|
55
|
+
|
|
56
|
+
# @return [Shares] shares
|
|
57
|
+
attr_reader :shares
|
|
58
|
+
|
|
59
|
+
# @return [ProviderShareSubscriptions] provider_share_subscriptions
|
|
60
|
+
attr_reader :provider_share_subscriptions
|
|
61
|
+
|
|
62
|
+
# @return [ShareSubscriptions] share_subscriptions
|
|
63
|
+
attr_reader :share_subscriptions
|
|
64
|
+
|
|
65
|
+
# @return [ConsumerSourceDataSets] consumer_source_data_sets
|
|
66
|
+
attr_reader :consumer_source_data_sets
|
|
67
|
+
|
|
68
|
+
# @return [SynchronizationSettings] synchronization_settings
|
|
69
|
+
attr_reader :synchronization_settings
|
|
70
|
+
|
|
71
|
+
# @return [Triggers] triggers
|
|
72
|
+
attr_reader :triggers
|
|
73
|
+
|
|
74
|
+
#
|
|
75
|
+
# Creates initializes a new instance of the DataShareManagementClient class.
|
|
76
|
+
# @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
|
|
77
|
+
# @param base_url [String] the base URI of the service.
|
|
78
|
+
# @param options [Array] filters to be applied to the HTTP requests.
|
|
79
|
+
#
|
|
80
|
+
def initialize(credentials = nil, base_url = nil, options = nil)
|
|
81
|
+
super(credentials, options)
|
|
82
|
+
@base_url = base_url || 'https://management.azure.com'
|
|
83
|
+
|
|
84
|
+
fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
|
|
85
|
+
@credentials = credentials
|
|
86
|
+
|
|
87
|
+
@accounts = Accounts.new(self)
|
|
88
|
+
@consumer_invitations = ConsumerInvitations.new(self)
|
|
89
|
+
@data_sets = DataSets.new(self)
|
|
90
|
+
@data_set_mappings = DataSetMappings.new(self)
|
|
91
|
+
@invitations = Invitations.new(self)
|
|
92
|
+
@operations = Operations.new(self)
|
|
93
|
+
@shares = Shares.new(self)
|
|
94
|
+
@provider_share_subscriptions = ProviderShareSubscriptions.new(self)
|
|
95
|
+
@share_subscriptions = ShareSubscriptions.new(self)
|
|
96
|
+
@consumer_source_data_sets = ConsumerSourceDataSets.new(self)
|
|
97
|
+
@synchronization_settings = SynchronizationSettings.new(self)
|
|
98
|
+
@triggers = Triggers.new(self)
|
|
99
|
+
@api_version = '2018-11-01-preview'
|
|
100
|
+
@accept_language = 'en-US'
|
|
101
|
+
@long_running_operation_retry_timeout = 30
|
|
102
|
+
@generate_client_request_id = true
|
|
103
|
+
add_telemetry
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
#
|
|
107
|
+
# Makes a request and returns the body of the response.
|
|
108
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
|
109
|
+
# @param path [String] the path, relative to {base_url}.
|
|
110
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
|
111
|
+
# @return [Hash{String=>String}] containing the body of the response.
|
|
112
|
+
# Example:
|
|
113
|
+
#
|
|
114
|
+
# request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
|
|
115
|
+
# path = "/path"
|
|
116
|
+
# options = {
|
|
117
|
+
# body: request_content,
|
|
118
|
+
# query_params: {'api-version' => '2016-02-01'}
|
|
119
|
+
# }
|
|
120
|
+
# result = @client.make_request(:put, path, options)
|
|
121
|
+
#
|
|
122
|
+
def make_request(method, path, options = {})
|
|
123
|
+
result = make_request_with_http_info(method, path, options)
|
|
124
|
+
result.body unless result.nil?
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
#
|
|
128
|
+
# Makes a request and returns the operation response.
|
|
129
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
|
130
|
+
# @param path [String] the path, relative to {base_url}.
|
|
131
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
|
132
|
+
# @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
|
|
133
|
+
#
|
|
134
|
+
def make_request_with_http_info(method, path, options = {})
|
|
135
|
+
result = make_request_async(method, path, options).value!
|
|
136
|
+
result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
|
|
137
|
+
result
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
#
|
|
141
|
+
# Makes a request asynchronously.
|
|
142
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
|
143
|
+
# @param path [String] the path, relative to {base_url}.
|
|
144
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
|
145
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
146
|
+
#
|
|
147
|
+
def make_request_async(method, path, options = {})
|
|
148
|
+
fail ArgumentError, 'method is nil' if method.nil?
|
|
149
|
+
fail ArgumentError, 'path is nil' if path.nil?
|
|
150
|
+
|
|
151
|
+
request_url = options[:base_url] || @base_url
|
|
152
|
+
if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
|
|
153
|
+
@request_headers['Content-Type'] = options[:headers]['Content-Type']
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
request_headers = @request_headers
|
|
157
|
+
request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
|
|
158
|
+
options.merge!({headers: request_headers.merge(options[:headers] || {})})
|
|
159
|
+
options.merge!({credentials: @credentials}) unless @credentials.nil?
|
|
160
|
+
|
|
161
|
+
super(request_url, method, path, options)
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
private
|
|
166
|
+
#
|
|
167
|
+
# Adds telemetry information.
|
|
168
|
+
#
|
|
169
|
+
def add_telemetry
|
|
170
|
+
sdk_information = 'azure_mgmt_datashare'
|
|
171
|
+
sdk_information = "#{sdk_information}/0.17.0"
|
|
172
|
+
add_user_agent_information(sdk_information)
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
end
|
|
@@ -0,0 +1,587 @@
|
|
|
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 Invitations
|
|
11
|
+
include MsRestAzure
|
|
12
|
+
|
|
13
|
+
#
|
|
14
|
+
# Creates and initializes a new instance of the Invitations 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 Invitation in a share.
|
|
26
|
+
#
|
|
27
|
+
# Get an invitation in a share
|
|
28
|
+
#
|
|
29
|
+
# @param resource_group_name [String] The resource group name.
|
|
30
|
+
# @param account_name [String] The name of the share account.
|
|
31
|
+
# @param share_name [String] The name of the share.
|
|
32
|
+
# @param invitation_name [String] The name of the invitation.
|
|
33
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
34
|
+
# will be added to the HTTP request.
|
|
35
|
+
#
|
|
36
|
+
# @return [Invitation] operation results.
|
|
37
|
+
#
|
|
38
|
+
def get(resource_group_name, account_name, share_name, invitation_name, custom_headers:nil)
|
|
39
|
+
response = get_async(resource_group_name, account_name, share_name, invitation_name, custom_headers:custom_headers).value!
|
|
40
|
+
response.body unless response.nil?
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
#
|
|
44
|
+
# Get Invitation in a share.
|
|
45
|
+
#
|
|
46
|
+
# Get an invitation in a share
|
|
47
|
+
#
|
|
48
|
+
# @param resource_group_name [String] The resource group name.
|
|
49
|
+
# @param account_name [String] The name of the share account.
|
|
50
|
+
# @param share_name [String] The name of the share.
|
|
51
|
+
# @param invitation_name [String] The name of the invitation.
|
|
52
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
53
|
+
# will be added to the HTTP request.
|
|
54
|
+
#
|
|
55
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
56
|
+
#
|
|
57
|
+
def get_with_http_info(resource_group_name, account_name, share_name, invitation_name, custom_headers:nil)
|
|
58
|
+
get_async(resource_group_name, account_name, share_name, invitation_name, custom_headers:custom_headers).value!
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
#
|
|
62
|
+
# Get Invitation in a share.
|
|
63
|
+
#
|
|
64
|
+
# Get an invitation in a share
|
|
65
|
+
#
|
|
66
|
+
# @param resource_group_name [String] The resource group name.
|
|
67
|
+
# @param account_name [String] The name of the share account.
|
|
68
|
+
# @param share_name [String] The name of the share.
|
|
69
|
+
# @param invitation_name [String] The name of the invitation.
|
|
70
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
71
|
+
# to the HTTP request.
|
|
72
|
+
#
|
|
73
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
74
|
+
#
|
|
75
|
+
def get_async(resource_group_name, account_name, share_name, invitation_name, custom_headers:nil)
|
|
76
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
|
77
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
|
78
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
|
79
|
+
fail ArgumentError, 'share_name is nil' if share_name.nil?
|
|
80
|
+
fail ArgumentError, 'invitation_name is nil' if invitation_name.nil?
|
|
81
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
request_headers = {}
|
|
85
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
|
86
|
+
|
|
87
|
+
# Set Headers
|
|
88
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
89
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
90
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/invitations/{invitationName}'
|
|
91
|
+
|
|
92
|
+
request_url = @base_url || @client.base_url
|
|
93
|
+
|
|
94
|
+
options = {
|
|
95
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
96
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'shareName' => share_name,'invitationName' => invitation_name},
|
|
97
|
+
query_params: {'api-version' => @client.api_version},
|
|
98
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
99
|
+
base_url: request_url
|
|
100
|
+
}
|
|
101
|
+
promise = @client.make_request_async(:get, path_template, options)
|
|
102
|
+
|
|
103
|
+
promise = promise.then do |result|
|
|
104
|
+
http_response = result.response
|
|
105
|
+
status_code = http_response.status
|
|
106
|
+
response_content = http_response.body
|
|
107
|
+
unless status_code == 200
|
|
108
|
+
error_model = JSON.load(response_content)
|
|
109
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
113
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
|
114
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
|
115
|
+
# Deserialize Response
|
|
116
|
+
if status_code == 200
|
|
117
|
+
begin
|
|
118
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
119
|
+
result_mapper = Azure::DataShare::Mgmt::V2018_11_01_preview::Models::Invitation.mapper()
|
|
120
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
|
121
|
+
rescue Exception => e
|
|
122
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
result
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
promise.execute
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
#
|
|
133
|
+
# Sends a new invitation to a recipient to access a share.
|
|
134
|
+
#
|
|
135
|
+
# Create an invitation
|
|
136
|
+
#
|
|
137
|
+
# @param resource_group_name [String] The resource group name.
|
|
138
|
+
# @param account_name [String] The name of the share account.
|
|
139
|
+
# @param share_name [String] The name of the share to send the invitation for.
|
|
140
|
+
# @param invitation_name [String] The name of the invitation.
|
|
141
|
+
# @param invitation [Invitation] Invitation details.
|
|
142
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
143
|
+
# will be added to the HTTP request.
|
|
144
|
+
#
|
|
145
|
+
# @return [Invitation] operation results.
|
|
146
|
+
#
|
|
147
|
+
def create(resource_group_name, account_name, share_name, invitation_name, invitation, custom_headers:nil)
|
|
148
|
+
response = create_async(resource_group_name, account_name, share_name, invitation_name, invitation, custom_headers:custom_headers).value!
|
|
149
|
+
response.body unless response.nil?
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
#
|
|
153
|
+
# Sends a new invitation to a recipient to access a share.
|
|
154
|
+
#
|
|
155
|
+
# Create an invitation
|
|
156
|
+
#
|
|
157
|
+
# @param resource_group_name [String] The resource group name.
|
|
158
|
+
# @param account_name [String] The name of the share account.
|
|
159
|
+
# @param share_name [String] The name of the share to send the invitation for.
|
|
160
|
+
# @param invitation_name [String] The name of the invitation.
|
|
161
|
+
# @param invitation [Invitation] Invitation details.
|
|
162
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
163
|
+
# will be added to the HTTP request.
|
|
164
|
+
#
|
|
165
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
166
|
+
#
|
|
167
|
+
def create_with_http_info(resource_group_name, account_name, share_name, invitation_name, invitation, custom_headers:nil)
|
|
168
|
+
create_async(resource_group_name, account_name, share_name, invitation_name, invitation, custom_headers:custom_headers).value!
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
#
|
|
172
|
+
# Sends a new invitation to a recipient to access a share.
|
|
173
|
+
#
|
|
174
|
+
# Create an invitation
|
|
175
|
+
#
|
|
176
|
+
# @param resource_group_name [String] The resource group name.
|
|
177
|
+
# @param account_name [String] The name of the share account.
|
|
178
|
+
# @param share_name [String] The name of the share to send the invitation for.
|
|
179
|
+
# @param invitation_name [String] The name of the invitation.
|
|
180
|
+
# @param invitation [Invitation] Invitation details.
|
|
181
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
182
|
+
# to the HTTP request.
|
|
183
|
+
#
|
|
184
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
185
|
+
#
|
|
186
|
+
def create_async(resource_group_name, account_name, share_name, invitation_name, invitation, custom_headers:nil)
|
|
187
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
|
188
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
|
189
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
|
190
|
+
fail ArgumentError, 'share_name is nil' if share_name.nil?
|
|
191
|
+
fail ArgumentError, 'invitation_name is nil' if invitation_name.nil?
|
|
192
|
+
fail ArgumentError, 'invitation is nil' if invitation.nil?
|
|
193
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
request_headers = {}
|
|
197
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
|
198
|
+
|
|
199
|
+
# Set Headers
|
|
200
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
201
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
202
|
+
|
|
203
|
+
# Serialize Request
|
|
204
|
+
request_mapper = Azure::DataShare::Mgmt::V2018_11_01_preview::Models::Invitation.mapper()
|
|
205
|
+
request_content = @client.serialize(request_mapper, invitation)
|
|
206
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
|
207
|
+
|
|
208
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/invitations/{invitationName}'
|
|
209
|
+
|
|
210
|
+
request_url = @base_url || @client.base_url
|
|
211
|
+
|
|
212
|
+
options = {
|
|
213
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
214
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'shareName' => share_name,'invitationName' => invitation_name},
|
|
215
|
+
query_params: {'api-version' => @client.api_version},
|
|
216
|
+
body: request_content,
|
|
217
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
218
|
+
base_url: request_url
|
|
219
|
+
}
|
|
220
|
+
promise = @client.make_request_async(:put, path_template, options)
|
|
221
|
+
|
|
222
|
+
promise = promise.then do |result|
|
|
223
|
+
http_response = result.response
|
|
224
|
+
status_code = http_response.status
|
|
225
|
+
response_content = http_response.body
|
|
226
|
+
unless status_code == 201 || status_code == 200
|
|
227
|
+
error_model = JSON.load(response_content)
|
|
228
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
232
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
|
233
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
|
234
|
+
# Deserialize Response
|
|
235
|
+
if status_code == 201
|
|
236
|
+
begin
|
|
237
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
238
|
+
result_mapper = Azure::DataShare::Mgmt::V2018_11_01_preview::Models::Invitation.mapper()
|
|
239
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
|
240
|
+
rescue Exception => e
|
|
241
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
242
|
+
end
|
|
243
|
+
end
|
|
244
|
+
# Deserialize Response
|
|
245
|
+
if status_code == 200
|
|
246
|
+
begin
|
|
247
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
248
|
+
result_mapper = Azure::DataShare::Mgmt::V2018_11_01_preview::Models::Invitation.mapper()
|
|
249
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
|
250
|
+
rescue Exception => e
|
|
251
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
252
|
+
end
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
result
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
promise.execute
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
#
|
|
262
|
+
# Delete Invitation in a share.
|
|
263
|
+
#
|
|
264
|
+
# Delete an invitation in a share
|
|
265
|
+
#
|
|
266
|
+
# @param resource_group_name [String] The resource group name.
|
|
267
|
+
# @param account_name [String] The name of the share account.
|
|
268
|
+
# @param share_name [String] The name of the share.
|
|
269
|
+
# @param invitation_name [String] The name of the invitation.
|
|
270
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
271
|
+
# will be added to the HTTP request.
|
|
272
|
+
#
|
|
273
|
+
#
|
|
274
|
+
def delete(resource_group_name, account_name, share_name, invitation_name, custom_headers:nil)
|
|
275
|
+
response = delete_async(resource_group_name, account_name, share_name, invitation_name, custom_headers:custom_headers).value!
|
|
276
|
+
nil
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
#
|
|
280
|
+
# Delete Invitation in a share.
|
|
281
|
+
#
|
|
282
|
+
# Delete an invitation in a share
|
|
283
|
+
#
|
|
284
|
+
# @param resource_group_name [String] The resource group name.
|
|
285
|
+
# @param account_name [String] The name of the share account.
|
|
286
|
+
# @param share_name [String] The name of the share.
|
|
287
|
+
# @param invitation_name [String] The name of the invitation.
|
|
288
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
289
|
+
# will be added to the HTTP request.
|
|
290
|
+
#
|
|
291
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
292
|
+
#
|
|
293
|
+
def delete_with_http_info(resource_group_name, account_name, share_name, invitation_name, custom_headers:nil)
|
|
294
|
+
delete_async(resource_group_name, account_name, share_name, invitation_name, custom_headers:custom_headers).value!
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
#
|
|
298
|
+
# Delete Invitation in a share.
|
|
299
|
+
#
|
|
300
|
+
# Delete an invitation in a share
|
|
301
|
+
#
|
|
302
|
+
# @param resource_group_name [String] The resource group name.
|
|
303
|
+
# @param account_name [String] The name of the share account.
|
|
304
|
+
# @param share_name [String] The name of the share.
|
|
305
|
+
# @param invitation_name [String] The name of the invitation.
|
|
306
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
307
|
+
# to the HTTP request.
|
|
308
|
+
#
|
|
309
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
310
|
+
#
|
|
311
|
+
def delete_async(resource_group_name, account_name, share_name, invitation_name, custom_headers:nil)
|
|
312
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
|
313
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
|
314
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
|
315
|
+
fail ArgumentError, 'share_name is nil' if share_name.nil?
|
|
316
|
+
fail ArgumentError, 'invitation_name is nil' if invitation_name.nil?
|
|
317
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
request_headers = {}
|
|
321
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
|
322
|
+
|
|
323
|
+
# Set Headers
|
|
324
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
325
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
326
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/invitations/{invitationName}'
|
|
327
|
+
|
|
328
|
+
request_url = @base_url || @client.base_url
|
|
329
|
+
|
|
330
|
+
options = {
|
|
331
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
332
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'shareName' => share_name,'invitationName' => invitation_name},
|
|
333
|
+
query_params: {'api-version' => @client.api_version},
|
|
334
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
335
|
+
base_url: request_url
|
|
336
|
+
}
|
|
337
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
|
338
|
+
|
|
339
|
+
promise = promise.then do |result|
|
|
340
|
+
http_response = result.response
|
|
341
|
+
status_code = http_response.status
|
|
342
|
+
response_content = http_response.body
|
|
343
|
+
unless status_code == 200 || status_code == 204
|
|
344
|
+
error_model = JSON.load(response_content)
|
|
345
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
|
346
|
+
end
|
|
347
|
+
|
|
348
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
349
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
|
350
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
|
351
|
+
|
|
352
|
+
result
|
|
353
|
+
end
|
|
354
|
+
|
|
355
|
+
promise.execute
|
|
356
|
+
end
|
|
357
|
+
|
|
358
|
+
#
|
|
359
|
+
# List all Invitations in a share.
|
|
360
|
+
#
|
|
361
|
+
# List invitations in a share
|
|
362
|
+
#
|
|
363
|
+
# @param resource_group_name [String] The resource group name.
|
|
364
|
+
# @param account_name [String] The name of the share account.
|
|
365
|
+
# @param share_name [String] The name of the share.
|
|
366
|
+
# @param skip_token [String] The continuation token
|
|
367
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
368
|
+
# will be added to the HTTP request.
|
|
369
|
+
#
|
|
370
|
+
# @return [Array<Invitation>] operation results.
|
|
371
|
+
#
|
|
372
|
+
def list_by_share(resource_group_name, account_name, share_name, skip_token:nil, custom_headers:nil)
|
|
373
|
+
first_page = list_by_share_as_lazy(resource_group_name, account_name, share_name, skip_token:skip_token, custom_headers:custom_headers)
|
|
374
|
+
first_page.get_all_items
|
|
375
|
+
end
|
|
376
|
+
|
|
377
|
+
#
|
|
378
|
+
# List all Invitations in a share.
|
|
379
|
+
#
|
|
380
|
+
# List invitations in a share
|
|
381
|
+
#
|
|
382
|
+
# @param resource_group_name [String] The resource group name.
|
|
383
|
+
# @param account_name [String] The name of the share account.
|
|
384
|
+
# @param share_name [String] The name of the share.
|
|
385
|
+
# @param skip_token [String] The continuation token
|
|
386
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
387
|
+
# will be added to the HTTP request.
|
|
388
|
+
#
|
|
389
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
390
|
+
#
|
|
391
|
+
def list_by_share_with_http_info(resource_group_name, account_name, share_name, skip_token:nil, custom_headers:nil)
|
|
392
|
+
list_by_share_async(resource_group_name, account_name, share_name, skip_token:skip_token, custom_headers:custom_headers).value!
|
|
393
|
+
end
|
|
394
|
+
|
|
395
|
+
#
|
|
396
|
+
# List all Invitations in a share.
|
|
397
|
+
#
|
|
398
|
+
# List invitations in a share
|
|
399
|
+
#
|
|
400
|
+
# @param resource_group_name [String] The resource group name.
|
|
401
|
+
# @param account_name [String] The name of the share account.
|
|
402
|
+
# @param share_name [String] The name of the share.
|
|
403
|
+
# @param skip_token [String] The continuation token
|
|
404
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
405
|
+
# to the HTTP request.
|
|
406
|
+
#
|
|
407
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
408
|
+
#
|
|
409
|
+
def list_by_share_async(resource_group_name, account_name, share_name, skip_token:nil, custom_headers:nil)
|
|
410
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
|
411
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
|
412
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
|
413
|
+
fail ArgumentError, 'share_name is nil' if share_name.nil?
|
|
414
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
request_headers = {}
|
|
418
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
|
419
|
+
|
|
420
|
+
# Set Headers
|
|
421
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
422
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
423
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/invitations'
|
|
424
|
+
|
|
425
|
+
request_url = @base_url || @client.base_url
|
|
426
|
+
|
|
427
|
+
options = {
|
|
428
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
429
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'shareName' => share_name},
|
|
430
|
+
query_params: {'api-version' => @client.api_version,'$skipToken' => skip_token},
|
|
431
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
432
|
+
base_url: request_url
|
|
433
|
+
}
|
|
434
|
+
promise = @client.make_request_async(:get, path_template, options)
|
|
435
|
+
|
|
436
|
+
promise = promise.then do |result|
|
|
437
|
+
http_response = result.response
|
|
438
|
+
status_code = http_response.status
|
|
439
|
+
response_content = http_response.body
|
|
440
|
+
unless status_code == 200
|
|
441
|
+
error_model = JSON.load(response_content)
|
|
442
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
|
443
|
+
end
|
|
444
|
+
|
|
445
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
446
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
|
447
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
|
448
|
+
# Deserialize Response
|
|
449
|
+
if status_code == 200
|
|
450
|
+
begin
|
|
451
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
452
|
+
result_mapper = Azure::DataShare::Mgmt::V2018_11_01_preview::Models::InvitationList.mapper()
|
|
453
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
|
454
|
+
rescue Exception => e
|
|
455
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
456
|
+
end
|
|
457
|
+
end
|
|
458
|
+
|
|
459
|
+
result
|
|
460
|
+
end
|
|
461
|
+
|
|
462
|
+
promise.execute
|
|
463
|
+
end
|
|
464
|
+
|
|
465
|
+
#
|
|
466
|
+
# List all Invitations in a share.
|
|
467
|
+
#
|
|
468
|
+
# List invitations in a share
|
|
469
|
+
#
|
|
470
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
|
471
|
+
# to List operation.
|
|
472
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
473
|
+
# will be added to the HTTP request.
|
|
474
|
+
#
|
|
475
|
+
# @return [InvitationList] operation results.
|
|
476
|
+
#
|
|
477
|
+
def list_by_share_next(next_page_link, custom_headers:nil)
|
|
478
|
+
response = list_by_share_next_async(next_page_link, custom_headers:custom_headers).value!
|
|
479
|
+
response.body unless response.nil?
|
|
480
|
+
end
|
|
481
|
+
|
|
482
|
+
#
|
|
483
|
+
# List all Invitations in a share.
|
|
484
|
+
#
|
|
485
|
+
# List invitations in a share
|
|
486
|
+
#
|
|
487
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
|
488
|
+
# to List operation.
|
|
489
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
490
|
+
# will be added to the HTTP request.
|
|
491
|
+
#
|
|
492
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
493
|
+
#
|
|
494
|
+
def list_by_share_next_with_http_info(next_page_link, custom_headers:nil)
|
|
495
|
+
list_by_share_next_async(next_page_link, custom_headers:custom_headers).value!
|
|
496
|
+
end
|
|
497
|
+
|
|
498
|
+
#
|
|
499
|
+
# List all Invitations in a share.
|
|
500
|
+
#
|
|
501
|
+
# List invitations in a share
|
|
502
|
+
#
|
|
503
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
|
504
|
+
# to List operation.
|
|
505
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
506
|
+
# to the HTTP request.
|
|
507
|
+
#
|
|
508
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
509
|
+
#
|
|
510
|
+
def list_by_share_next_async(next_page_link, custom_headers:nil)
|
|
511
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
request_headers = {}
|
|
515
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
|
516
|
+
|
|
517
|
+
# Set Headers
|
|
518
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
519
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
520
|
+
path_template = '{nextLink}'
|
|
521
|
+
|
|
522
|
+
request_url = @base_url || @client.base_url
|
|
523
|
+
|
|
524
|
+
options = {
|
|
525
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
526
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
|
527
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
528
|
+
base_url: request_url
|
|
529
|
+
}
|
|
530
|
+
promise = @client.make_request_async(:get, path_template, options)
|
|
531
|
+
|
|
532
|
+
promise = promise.then do |result|
|
|
533
|
+
http_response = result.response
|
|
534
|
+
status_code = http_response.status
|
|
535
|
+
response_content = http_response.body
|
|
536
|
+
unless status_code == 200
|
|
537
|
+
error_model = JSON.load(response_content)
|
|
538
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
|
539
|
+
end
|
|
540
|
+
|
|
541
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
542
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
|
543
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
|
544
|
+
# Deserialize Response
|
|
545
|
+
if status_code == 200
|
|
546
|
+
begin
|
|
547
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
548
|
+
result_mapper = Azure::DataShare::Mgmt::V2018_11_01_preview::Models::InvitationList.mapper()
|
|
549
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
|
550
|
+
rescue Exception => e
|
|
551
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
552
|
+
end
|
|
553
|
+
end
|
|
554
|
+
|
|
555
|
+
result
|
|
556
|
+
end
|
|
557
|
+
|
|
558
|
+
promise.execute
|
|
559
|
+
end
|
|
560
|
+
|
|
561
|
+
#
|
|
562
|
+
# List all Invitations in a share.
|
|
563
|
+
#
|
|
564
|
+
# List invitations in a share
|
|
565
|
+
#
|
|
566
|
+
# @param resource_group_name [String] The resource group name.
|
|
567
|
+
# @param account_name [String] The name of the share account.
|
|
568
|
+
# @param share_name [String] The name of the share.
|
|
569
|
+
# @param skip_token [String] The continuation token
|
|
570
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
571
|
+
# will be added to the HTTP request.
|
|
572
|
+
#
|
|
573
|
+
# @return [InvitationList] which provide lazy access to pages of the response.
|
|
574
|
+
#
|
|
575
|
+
def list_by_share_as_lazy(resource_group_name, account_name, share_name, skip_token:nil, custom_headers:nil)
|
|
576
|
+
response = list_by_share_async(resource_group_name, account_name, share_name, skip_token:skip_token, custom_headers:custom_headers).value!
|
|
577
|
+
unless response.nil?
|
|
578
|
+
page = response.body
|
|
579
|
+
page.next_method = Proc.new do |next_page_link|
|
|
580
|
+
list_by_share_next_async(next_page_link, custom_headers:custom_headers)
|
|
581
|
+
end
|
|
582
|
+
page
|
|
583
|
+
end
|
|
584
|
+
end
|
|
585
|
+
|
|
586
|
+
end
|
|
587
|
+
end
|