azure_mgmt_netapp 0.17.2 → 0.17.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/azure_net_app_files_management_client.rb +1 -1
- data/lib/2019-05-01/generated/azure_mgmt_netapp/accounts.rb +641 -0
- data/lib/2019-05-01/generated/azure_mgmt_netapp/azure_net_app_files_management_client.rb +415 -0
- data/lib/2019-05-01/generated/azure_mgmt_netapp/models/active_directory.rb +127 -0
- data/lib/2019-05-01/generated/azure_mgmt_netapp/models/capacity_pool.rb +154 -0
- data/lib/2019-05-01/generated/azure_mgmt_netapp/models/capacity_pool_list.rb +55 -0
- data/lib/2019-05-01/generated/azure_mgmt_netapp/models/capacity_pool_patch.rb +125 -0
- data/lib/2019-05-01/generated/azure_mgmt_netapp/models/check_name_resource_types.rb +18 -0
- data/lib/2019-05-01/generated/azure_mgmt_netapp/models/dimension.rb +57 -0
- data/lib/2019-05-01/generated/azure_mgmt_netapp/models/export_policy_rule.rb +113 -0
- data/lib/2019-05-01/generated/azure_mgmt_netapp/models/in_availability_reason_type.rb +16 -0
- data/lib/2019-05-01/generated/azure_mgmt_netapp/models/metric_specification.rb +145 -0
- data/lib/2019-05-01/generated/azure_mgmt_netapp/models/mount_target.rb +210 -0
- data/lib/2019-05-01/generated/azure_mgmt_netapp/models/mount_target_list.rb +55 -0
- data/lib/2019-05-01/generated/azure_mgmt_netapp/models/net_app_account.rb +125 -0
- data/lib/2019-05-01/generated/azure_mgmt_netapp/models/net_app_account_list.rb +55 -0
- data/lib/2019-05-01/generated/azure_mgmt_netapp/models/net_app_account_patch.rb +125 -0
- data/lib/2019-05-01/generated/azure_mgmt_netapp/models/operation.rb +83 -0
- data/lib/2019-05-01/generated/azure_mgmt_netapp/models/operation_display.rb +79 -0
- data/lib/2019-05-01/generated/azure_mgmt_netapp/models/operation_list_result.rb +57 -0
- data/lib/2019-05-01/generated/azure_mgmt_netapp/models/resource_name_availability.rb +78 -0
- data/lib/2019-05-01/generated/azure_mgmt_netapp/models/resource_name_availability_request.rb +72 -0
- data/lib/2019-05-01/generated/azure_mgmt_netapp/models/service_level.rb +17 -0
- data/lib/2019-05-01/generated/azure_mgmt_netapp/models/service_specification.rb +56 -0
- data/lib/2019-05-01/generated/azure_mgmt_netapp/models/snapshot.rb +150 -0
- data/lib/2019-05-01/generated/azure_mgmt_netapp/models/snapshot_patch.rb +46 -0
- data/lib/2019-05-01/generated/azure_mgmt_netapp/models/snapshots_list.rb +55 -0
- data/lib/2019-05-01/generated/azure_mgmt_netapp/models/volume.rb +226 -0
- data/lib/2019-05-01/generated/azure_mgmt_netapp/models/volume_list.rb +55 -0
- data/lib/2019-05-01/generated/azure_mgmt_netapp/models/volume_patch.rb +139 -0
- data/lib/2019-05-01/generated/azure_mgmt_netapp/models/volume_patch_properties_export_policy.rb +58 -0
- data/lib/2019-05-01/generated/azure_mgmt_netapp/models/volume_properties_export_policy.rb +58 -0
- data/lib/2019-05-01/generated/azure_mgmt_netapp/module_definition.rb +9 -0
- data/lib/2019-05-01/generated/azure_mgmt_netapp/mount_targets.rb +134 -0
- data/lib/2019-05-01/generated/azure_mgmt_netapp/operations.rb +113 -0
- data/lib/2019-05-01/generated/azure_mgmt_netapp/pools.rb +665 -0
- data/lib/2019-05-01/generated/azure_mgmt_netapp/snapshots.rb +698 -0
- data/lib/2019-05-01/generated/azure_mgmt_netapp/volumes.rb +684 -0
- data/lib/2019-05-01/generated/azure_mgmt_netapp.rb +62 -0
- data/lib/azure_mgmt_netapp.rb +1 -0
- data/lib/profiles/latest/modules/netapp_profile_module.rb +84 -72
- data/lib/version.rb +1 -1
- metadata +41 -3
@@ -0,0 +1,415 @@
|
|
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::NetApp::Mgmt::V2019_05_01
|
7
|
+
#
|
8
|
+
# A service client - single point of access to the REST API.
|
9
|
+
#
|
10
|
+
class AzureNetAppFilesManagementClient < 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] Subscription credentials which uniquely identify
|
21
|
+
# Microsoft Azure subscription. The subscription ID forms part of the URI
|
22
|
+
# for every service call.
|
23
|
+
attr_accessor :subscription_id
|
24
|
+
|
25
|
+
# @return [String] Version of the API to be used with the client request.
|
26
|
+
attr_reader :api_version
|
27
|
+
|
28
|
+
# @return [String] The preferred language for the response.
|
29
|
+
attr_accessor :accept_language
|
30
|
+
|
31
|
+
# @return [Integer] The retry timeout in seconds for Long Running
|
32
|
+
# Operations. Default value is 30.
|
33
|
+
attr_accessor :long_running_operation_retry_timeout
|
34
|
+
|
35
|
+
# @return [Boolean] Whether a unique x-ms-client-request-id should be
|
36
|
+
# generated. When set to true a unique x-ms-client-request-id value is
|
37
|
+
# generated and included in each request. Default is true.
|
38
|
+
attr_accessor :generate_client_request_id
|
39
|
+
|
40
|
+
# @return [Operations] operations
|
41
|
+
attr_reader :operations
|
42
|
+
|
43
|
+
# @return [Accounts] accounts
|
44
|
+
attr_reader :accounts
|
45
|
+
|
46
|
+
# @return [Pools] pools
|
47
|
+
attr_reader :pools
|
48
|
+
|
49
|
+
# @return [Volumes] volumes
|
50
|
+
attr_reader :volumes
|
51
|
+
|
52
|
+
# @return [MountTargets] mount_targets
|
53
|
+
attr_reader :mount_targets
|
54
|
+
|
55
|
+
# @return [Snapshots] snapshots
|
56
|
+
attr_reader :snapshots
|
57
|
+
|
58
|
+
#
|
59
|
+
# Creates initializes a new instance of the AzureNetAppFilesManagementClient class.
|
60
|
+
# @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
|
61
|
+
# @param base_url [String] the base URI of the service.
|
62
|
+
# @param options [Array] filters to be applied to the HTTP requests.
|
63
|
+
#
|
64
|
+
def initialize(credentials = nil, base_url = nil, options = nil)
|
65
|
+
super(credentials, options)
|
66
|
+
@base_url = base_url || 'https://management.azure.com'
|
67
|
+
|
68
|
+
fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
|
69
|
+
@credentials = credentials
|
70
|
+
|
71
|
+
@operations = Operations.new(self)
|
72
|
+
@accounts = Accounts.new(self)
|
73
|
+
@pools = Pools.new(self)
|
74
|
+
@volumes = Volumes.new(self)
|
75
|
+
@mount_targets = MountTargets.new(self)
|
76
|
+
@snapshots = Snapshots.new(self)
|
77
|
+
@api_version = '2019-05-01'
|
78
|
+
@accept_language = 'en-US'
|
79
|
+
@long_running_operation_retry_timeout = 30
|
80
|
+
@generate_client_request_id = true
|
81
|
+
add_telemetry
|
82
|
+
end
|
83
|
+
|
84
|
+
#
|
85
|
+
# Makes a request and returns the body of the response.
|
86
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
87
|
+
# @param path [String] the path, relative to {base_url}.
|
88
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
89
|
+
# @return [Hash{String=>String}] containing the body of the response.
|
90
|
+
# Example:
|
91
|
+
#
|
92
|
+
# request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
|
93
|
+
# path = "/path"
|
94
|
+
# options = {
|
95
|
+
# body: request_content,
|
96
|
+
# query_params: {'api-version' => '2016-02-01'}
|
97
|
+
# }
|
98
|
+
# result = @client.make_request(:put, path, options)
|
99
|
+
#
|
100
|
+
def make_request(method, path, options = {})
|
101
|
+
result = make_request_with_http_info(method, path, options)
|
102
|
+
result.body unless result.nil?
|
103
|
+
end
|
104
|
+
|
105
|
+
#
|
106
|
+
# Makes a request and returns the operation response.
|
107
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
108
|
+
# @param path [String] the path, relative to {base_url}.
|
109
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
110
|
+
# @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
|
111
|
+
#
|
112
|
+
def make_request_with_http_info(method, path, options = {})
|
113
|
+
result = make_request_async(method, path, options).value!
|
114
|
+
result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
|
115
|
+
result
|
116
|
+
end
|
117
|
+
|
118
|
+
#
|
119
|
+
# Makes a request asynchronously.
|
120
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
121
|
+
# @param path [String] the path, relative to {base_url}.
|
122
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
123
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
124
|
+
#
|
125
|
+
def make_request_async(method, path, options = {})
|
126
|
+
fail ArgumentError, 'method is nil' if method.nil?
|
127
|
+
fail ArgumentError, 'path is nil' if path.nil?
|
128
|
+
|
129
|
+
request_url = options[:base_url] || @base_url
|
130
|
+
if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
|
131
|
+
@request_headers['Content-Type'] = options[:headers]['Content-Type']
|
132
|
+
end
|
133
|
+
|
134
|
+
request_headers = @request_headers
|
135
|
+
request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
|
136
|
+
options.merge!({headers: request_headers.merge(options[:headers] || {})})
|
137
|
+
options.merge!({credentials: @credentials}) unless @credentials.nil?
|
138
|
+
|
139
|
+
super(request_url, method, path, options)
|
140
|
+
end
|
141
|
+
|
142
|
+
#
|
143
|
+
# Check resource name availability
|
144
|
+
#
|
145
|
+
# Check if a resource name is available.
|
146
|
+
#
|
147
|
+
# @param location [String] The location
|
148
|
+
# @param name [String] Resource name to verify.
|
149
|
+
# @param type [CheckNameResourceTypes] Resource type used for verification.
|
150
|
+
# Possible values include: 'Microsoft.NetApp/netAppAccount',
|
151
|
+
# 'Microsoft.NetApp/netAppAccount/capacityPools',
|
152
|
+
# 'Microsoft.NetApp/netAppAccount/capacityPools/volumes',
|
153
|
+
# 'Microsoft.NetApp/netAppAccount/capacityPools/volumes/snapshots'
|
154
|
+
# @param resource_group [String] Resource group name.
|
155
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
156
|
+
# will be added to the HTTP request.
|
157
|
+
#
|
158
|
+
# @return [ResourceNameAvailability] operation results.
|
159
|
+
#
|
160
|
+
def check_name_availability(location, name, type, resource_group, custom_headers:nil)
|
161
|
+
response = check_name_availability_async(location, name, type, resource_group, custom_headers:custom_headers).value!
|
162
|
+
response.body unless response.nil?
|
163
|
+
end
|
164
|
+
|
165
|
+
#
|
166
|
+
# Check resource name availability
|
167
|
+
#
|
168
|
+
# Check if a resource name is available.
|
169
|
+
#
|
170
|
+
# @param location [String] The location
|
171
|
+
# @param name [String] Resource name to verify.
|
172
|
+
# @param type [CheckNameResourceTypes] Resource type used for verification.
|
173
|
+
# Possible values include: 'Microsoft.NetApp/netAppAccount',
|
174
|
+
# 'Microsoft.NetApp/netAppAccount/capacityPools',
|
175
|
+
# 'Microsoft.NetApp/netAppAccount/capacityPools/volumes',
|
176
|
+
# 'Microsoft.NetApp/netAppAccount/capacityPools/volumes/snapshots'
|
177
|
+
# @param resource_group [String] Resource group name.
|
178
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
179
|
+
# will be added to the HTTP request.
|
180
|
+
#
|
181
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
182
|
+
#
|
183
|
+
def check_name_availability_with_http_info(location, name, type, resource_group, custom_headers:nil)
|
184
|
+
check_name_availability_async(location, name, type, resource_group, custom_headers:custom_headers).value!
|
185
|
+
end
|
186
|
+
|
187
|
+
#
|
188
|
+
# Check resource name availability
|
189
|
+
#
|
190
|
+
# Check if a resource name is available.
|
191
|
+
#
|
192
|
+
# @param location [String] The location
|
193
|
+
# @param name [String] Resource name to verify.
|
194
|
+
# @param type [CheckNameResourceTypes] Resource type used for verification.
|
195
|
+
# Possible values include: 'Microsoft.NetApp/netAppAccount',
|
196
|
+
# 'Microsoft.NetApp/netAppAccount/capacityPools',
|
197
|
+
# 'Microsoft.NetApp/netAppAccount/capacityPools/volumes',
|
198
|
+
# 'Microsoft.NetApp/netAppAccount/capacityPools/volumes/snapshots'
|
199
|
+
# @param resource_group [String] Resource group name.
|
200
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
201
|
+
# to the HTTP request.
|
202
|
+
#
|
203
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
204
|
+
#
|
205
|
+
def check_name_availability_async(location, name, type, resource_group, custom_headers:nil)
|
206
|
+
fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
|
207
|
+
fail ArgumentError, 'location is nil' if location.nil?
|
208
|
+
fail ArgumentError, 'api_version is nil' if api_version.nil?
|
209
|
+
fail ArgumentError, 'name is nil' if name.nil?
|
210
|
+
fail ArgumentError, 'type is nil' if type.nil?
|
211
|
+
fail ArgumentError, 'resource_group is nil' if resource_group.nil?
|
212
|
+
|
213
|
+
body = ResourceNameAvailabilityRequest.new
|
214
|
+
unless name.nil? && type.nil? && resource_group.nil?
|
215
|
+
body.name = name
|
216
|
+
body.type = type
|
217
|
+
body.resource_group = resource_group
|
218
|
+
end
|
219
|
+
|
220
|
+
request_headers = {}
|
221
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
222
|
+
|
223
|
+
# Set Headers
|
224
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
225
|
+
request_headers['accept-language'] = accept_language unless accept_language.nil?
|
226
|
+
|
227
|
+
# Serialize Request
|
228
|
+
request_mapper = Azure::NetApp::Mgmt::V2019_05_01::Models::ResourceNameAvailabilityRequest.mapper()
|
229
|
+
request_content = self.serialize(request_mapper, body)
|
230
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
231
|
+
|
232
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkNameAvailability'
|
233
|
+
|
234
|
+
request_url = @base_url || self.base_url
|
235
|
+
|
236
|
+
options = {
|
237
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
238
|
+
path_params: {'subscriptionId' => subscription_id,'location' => location},
|
239
|
+
query_params: {'api-version' => api_version},
|
240
|
+
body: request_content,
|
241
|
+
headers: request_headers.merge(custom_headers || {}),
|
242
|
+
base_url: request_url
|
243
|
+
}
|
244
|
+
promise = self.make_request_async(:post, path_template, options)
|
245
|
+
|
246
|
+
promise = promise.then do |result|
|
247
|
+
http_response = result.response
|
248
|
+
status_code = http_response.status
|
249
|
+
response_content = http_response.body
|
250
|
+
unless status_code == 200
|
251
|
+
error_model = JSON.load(response_content)
|
252
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
253
|
+
end
|
254
|
+
|
255
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
256
|
+
# Deserialize Response
|
257
|
+
if status_code == 200
|
258
|
+
begin
|
259
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
260
|
+
result_mapper = Azure::NetApp::Mgmt::V2019_05_01::Models::ResourceNameAvailability.mapper()
|
261
|
+
result.body = self.deserialize(result_mapper, parsed_response)
|
262
|
+
rescue Exception => e
|
263
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
264
|
+
end
|
265
|
+
end
|
266
|
+
|
267
|
+
result
|
268
|
+
end
|
269
|
+
|
270
|
+
promise.execute
|
271
|
+
end
|
272
|
+
|
273
|
+
#
|
274
|
+
# Check file path availability
|
275
|
+
#
|
276
|
+
# Check if a file path is available.
|
277
|
+
#
|
278
|
+
# @param location [String] The location
|
279
|
+
# @param name [String] Resource name to verify.
|
280
|
+
# @param type [CheckNameResourceTypes] Resource type used for verification.
|
281
|
+
# Possible values include: 'Microsoft.NetApp/netAppAccount',
|
282
|
+
# 'Microsoft.NetApp/netAppAccount/capacityPools',
|
283
|
+
# 'Microsoft.NetApp/netAppAccount/capacityPools/volumes',
|
284
|
+
# 'Microsoft.NetApp/netAppAccount/capacityPools/volumes/snapshots'
|
285
|
+
# @param resource_group [String] Resource group name.
|
286
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
287
|
+
# will be added to the HTTP request.
|
288
|
+
#
|
289
|
+
# @return [ResourceNameAvailability] operation results.
|
290
|
+
#
|
291
|
+
def check_file_path_availability(location, name, type, resource_group, custom_headers:nil)
|
292
|
+
response = check_file_path_availability_async(location, name, type, resource_group, custom_headers:custom_headers).value!
|
293
|
+
response.body unless response.nil?
|
294
|
+
end
|
295
|
+
|
296
|
+
#
|
297
|
+
# Check file path availability
|
298
|
+
#
|
299
|
+
# Check if a file path is available.
|
300
|
+
#
|
301
|
+
# @param location [String] The location
|
302
|
+
# @param name [String] Resource name to verify.
|
303
|
+
# @param type [CheckNameResourceTypes] Resource type used for verification.
|
304
|
+
# Possible values include: 'Microsoft.NetApp/netAppAccount',
|
305
|
+
# 'Microsoft.NetApp/netAppAccount/capacityPools',
|
306
|
+
# 'Microsoft.NetApp/netAppAccount/capacityPools/volumes',
|
307
|
+
# 'Microsoft.NetApp/netAppAccount/capacityPools/volumes/snapshots'
|
308
|
+
# @param resource_group [String] Resource group name.
|
309
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
310
|
+
# will be added to the HTTP request.
|
311
|
+
#
|
312
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
313
|
+
#
|
314
|
+
def check_file_path_availability_with_http_info(location, name, type, resource_group, custom_headers:nil)
|
315
|
+
check_file_path_availability_async(location, name, type, resource_group, custom_headers:custom_headers).value!
|
316
|
+
end
|
317
|
+
|
318
|
+
#
|
319
|
+
# Check file path availability
|
320
|
+
#
|
321
|
+
# Check if a file path is available.
|
322
|
+
#
|
323
|
+
# @param location [String] The location
|
324
|
+
# @param name [String] Resource name to verify.
|
325
|
+
# @param type [CheckNameResourceTypes] Resource type used for verification.
|
326
|
+
# Possible values include: 'Microsoft.NetApp/netAppAccount',
|
327
|
+
# 'Microsoft.NetApp/netAppAccount/capacityPools',
|
328
|
+
# 'Microsoft.NetApp/netAppAccount/capacityPools/volumes',
|
329
|
+
# 'Microsoft.NetApp/netAppAccount/capacityPools/volumes/snapshots'
|
330
|
+
# @param resource_group [String] Resource group name.
|
331
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
332
|
+
# to the HTTP request.
|
333
|
+
#
|
334
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
335
|
+
#
|
336
|
+
def check_file_path_availability_async(location, name, type, resource_group, custom_headers:nil)
|
337
|
+
fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
|
338
|
+
fail ArgumentError, 'location is nil' if location.nil?
|
339
|
+
fail ArgumentError, 'api_version is nil' if api_version.nil?
|
340
|
+
fail ArgumentError, 'name is nil' if name.nil?
|
341
|
+
fail ArgumentError, 'type is nil' if type.nil?
|
342
|
+
fail ArgumentError, 'resource_group is nil' if resource_group.nil?
|
343
|
+
|
344
|
+
body = ResourceNameAvailabilityRequest.new
|
345
|
+
unless name.nil? && type.nil? && resource_group.nil?
|
346
|
+
body.name = name
|
347
|
+
body.type = type
|
348
|
+
body.resource_group = resource_group
|
349
|
+
end
|
350
|
+
|
351
|
+
request_headers = {}
|
352
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
353
|
+
|
354
|
+
# Set Headers
|
355
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
356
|
+
request_headers['accept-language'] = accept_language unless accept_language.nil?
|
357
|
+
|
358
|
+
# Serialize Request
|
359
|
+
request_mapper = Azure::NetApp::Mgmt::V2019_05_01::Models::ResourceNameAvailabilityRequest.mapper()
|
360
|
+
request_content = self.serialize(request_mapper, body)
|
361
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
362
|
+
|
363
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkFilePathAvailability'
|
364
|
+
|
365
|
+
request_url = @base_url || self.base_url
|
366
|
+
|
367
|
+
options = {
|
368
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
369
|
+
path_params: {'subscriptionId' => subscription_id,'location' => location},
|
370
|
+
query_params: {'api-version' => api_version},
|
371
|
+
body: request_content,
|
372
|
+
headers: request_headers.merge(custom_headers || {}),
|
373
|
+
base_url: request_url
|
374
|
+
}
|
375
|
+
promise = self.make_request_async(:post, path_template, options)
|
376
|
+
|
377
|
+
promise = promise.then do |result|
|
378
|
+
http_response = result.response
|
379
|
+
status_code = http_response.status
|
380
|
+
response_content = http_response.body
|
381
|
+
unless status_code == 200
|
382
|
+
error_model = JSON.load(response_content)
|
383
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
384
|
+
end
|
385
|
+
|
386
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
387
|
+
# Deserialize Response
|
388
|
+
if status_code == 200
|
389
|
+
begin
|
390
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
391
|
+
result_mapper = Azure::NetApp::Mgmt::V2019_05_01::Models::ResourceNameAvailability.mapper()
|
392
|
+
result.body = self.deserialize(result_mapper, parsed_response)
|
393
|
+
rescue Exception => e
|
394
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
395
|
+
end
|
396
|
+
end
|
397
|
+
|
398
|
+
result
|
399
|
+
end
|
400
|
+
|
401
|
+
promise.execute
|
402
|
+
end
|
403
|
+
|
404
|
+
|
405
|
+
private
|
406
|
+
#
|
407
|
+
# Adds telemetry information.
|
408
|
+
#
|
409
|
+
def add_telemetry
|
410
|
+
sdk_information = 'azure_mgmt_netapp'
|
411
|
+
sdk_information = "#{sdk_information}/0.17.3"
|
412
|
+
add_user_agent_information(sdk_information)
|
413
|
+
end
|
414
|
+
end
|
415
|
+
end
|
@@ -0,0 +1,127 @@
|
|
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::NetApp::Mgmt::V2019_05_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Active Directory
|
10
|
+
#
|
11
|
+
class ActiveDirectory
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Id of the Active Directory
|
16
|
+
attr_accessor :active_directory_id
|
17
|
+
|
18
|
+
# @return [String] Username of Active Directory domain administrator
|
19
|
+
attr_accessor :username
|
20
|
+
|
21
|
+
# @return [String] Plain text password of Active Directory domain
|
22
|
+
# administrator
|
23
|
+
attr_accessor :password
|
24
|
+
|
25
|
+
# @return [String] Name of the Active Directory domain
|
26
|
+
attr_accessor :domain
|
27
|
+
|
28
|
+
# @return [String] Comma separated list of DNS server IP addresses for
|
29
|
+
# the Active Directory domain
|
30
|
+
attr_accessor :dns
|
31
|
+
|
32
|
+
# @return [String] Status of the Active Directory
|
33
|
+
attr_accessor :status
|
34
|
+
|
35
|
+
# @return [String] NetBIOS name of the SMB server. This name will be
|
36
|
+
# registered as a computer account in the AD and used to mount volumes
|
37
|
+
attr_accessor :smb_server_name
|
38
|
+
|
39
|
+
# @return [String] The Organizational Unit (OU) within the Windows Active
|
40
|
+
# Directory
|
41
|
+
attr_accessor :organizational_unit
|
42
|
+
|
43
|
+
|
44
|
+
#
|
45
|
+
# Mapper for ActiveDirectory class as Ruby Hash.
|
46
|
+
# This will be used for serialization/deserialization.
|
47
|
+
#
|
48
|
+
def self.mapper()
|
49
|
+
{
|
50
|
+
client_side_validation: true,
|
51
|
+
required: false,
|
52
|
+
serialized_name: 'activeDirectory',
|
53
|
+
type: {
|
54
|
+
name: 'Composite',
|
55
|
+
class_name: 'ActiveDirectory',
|
56
|
+
model_properties: {
|
57
|
+
active_directory_id: {
|
58
|
+
client_side_validation: true,
|
59
|
+
required: false,
|
60
|
+
serialized_name: 'activeDirectoryId',
|
61
|
+
type: {
|
62
|
+
name: 'String'
|
63
|
+
}
|
64
|
+
},
|
65
|
+
username: {
|
66
|
+
client_side_validation: true,
|
67
|
+
required: false,
|
68
|
+
serialized_name: 'username',
|
69
|
+
type: {
|
70
|
+
name: 'String'
|
71
|
+
}
|
72
|
+
},
|
73
|
+
password: {
|
74
|
+
client_side_validation: true,
|
75
|
+
required: false,
|
76
|
+
serialized_name: 'password',
|
77
|
+
type: {
|
78
|
+
name: 'String'
|
79
|
+
}
|
80
|
+
},
|
81
|
+
domain: {
|
82
|
+
client_side_validation: true,
|
83
|
+
required: false,
|
84
|
+
serialized_name: 'domain',
|
85
|
+
type: {
|
86
|
+
name: 'String'
|
87
|
+
}
|
88
|
+
},
|
89
|
+
dns: {
|
90
|
+
client_side_validation: true,
|
91
|
+
required: false,
|
92
|
+
serialized_name: 'dns',
|
93
|
+
type: {
|
94
|
+
name: 'String'
|
95
|
+
}
|
96
|
+
},
|
97
|
+
status: {
|
98
|
+
client_side_validation: true,
|
99
|
+
required: false,
|
100
|
+
serialized_name: 'status',
|
101
|
+
type: {
|
102
|
+
name: 'String'
|
103
|
+
}
|
104
|
+
},
|
105
|
+
smb_server_name: {
|
106
|
+
client_side_validation: true,
|
107
|
+
required: false,
|
108
|
+
serialized_name: 'smbServerName',
|
109
|
+
type: {
|
110
|
+
name: 'String'
|
111
|
+
}
|
112
|
+
},
|
113
|
+
organizational_unit: {
|
114
|
+
client_side_validation: true,
|
115
|
+
required: false,
|
116
|
+
serialized_name: 'organizationalUnit',
|
117
|
+
type: {
|
118
|
+
name: 'String'
|
119
|
+
}
|
120
|
+
}
|
121
|
+
}
|
122
|
+
}
|
123
|
+
}
|
124
|
+
end
|
125
|
+
end
|
126
|
+
end
|
127
|
+
end
|
@@ -0,0 +1,154 @@
|
|
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::NetApp::Mgmt::V2019_05_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Capacity pool resource
|
10
|
+
#
|
11
|
+
class CapacityPool
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Resource location
|
16
|
+
attr_accessor :location
|
17
|
+
|
18
|
+
# @return [String] Resource Id
|
19
|
+
attr_accessor :id
|
20
|
+
|
21
|
+
# @return [String] Resource name
|
22
|
+
attr_accessor :name
|
23
|
+
|
24
|
+
# @return [String] Resource type
|
25
|
+
attr_accessor :type
|
26
|
+
|
27
|
+
# @return Resource tags
|
28
|
+
attr_accessor :tags
|
29
|
+
|
30
|
+
# @return [String] poolId. UUID v4 used to identify the Pool
|
31
|
+
attr_accessor :pool_id
|
32
|
+
|
33
|
+
# @return [Integer] size. Provisioned size of the pool (in bytes).
|
34
|
+
# Allowed values are in 4TiB chunks (value must be multiply of
|
35
|
+
# 4398046511104). Default value: 4398046511104 .
|
36
|
+
attr_accessor :size
|
37
|
+
|
38
|
+
# @return [ServiceLevel] serviceLevel. The service level of the file
|
39
|
+
# system. Possible values include: 'Standard', 'Premium', 'Ultra'.
|
40
|
+
# Default value: 'Premium' .
|
41
|
+
attr_accessor :service_level
|
42
|
+
|
43
|
+
# @return [String] Azure lifecycle management
|
44
|
+
attr_accessor :provisioning_state
|
45
|
+
|
46
|
+
|
47
|
+
#
|
48
|
+
# Mapper for CapacityPool class as Ruby Hash.
|
49
|
+
# This will be used for serialization/deserialization.
|
50
|
+
#
|
51
|
+
def self.mapper()
|
52
|
+
{
|
53
|
+
client_side_validation: true,
|
54
|
+
required: false,
|
55
|
+
serialized_name: 'capacityPool',
|
56
|
+
type: {
|
57
|
+
name: 'Composite',
|
58
|
+
class_name: 'CapacityPool',
|
59
|
+
model_properties: {
|
60
|
+
location: {
|
61
|
+
client_side_validation: true,
|
62
|
+
required: true,
|
63
|
+
serialized_name: 'location',
|
64
|
+
type: {
|
65
|
+
name: 'String'
|
66
|
+
}
|
67
|
+
},
|
68
|
+
id: {
|
69
|
+
client_side_validation: true,
|
70
|
+
required: false,
|
71
|
+
read_only: true,
|
72
|
+
serialized_name: 'id',
|
73
|
+
type: {
|
74
|
+
name: 'String'
|
75
|
+
}
|
76
|
+
},
|
77
|
+
name: {
|
78
|
+
client_side_validation: true,
|
79
|
+
required: false,
|
80
|
+
read_only: true,
|
81
|
+
serialized_name: 'name',
|
82
|
+
type: {
|
83
|
+
name: 'String'
|
84
|
+
}
|
85
|
+
},
|
86
|
+
type: {
|
87
|
+
client_side_validation: true,
|
88
|
+
required: false,
|
89
|
+
read_only: true,
|
90
|
+
serialized_name: 'type',
|
91
|
+
type: {
|
92
|
+
name: 'String'
|
93
|
+
}
|
94
|
+
},
|
95
|
+
tags: {
|
96
|
+
client_side_validation: true,
|
97
|
+
required: false,
|
98
|
+
serialized_name: 'tags',
|
99
|
+
type: {
|
100
|
+
name: 'Object'
|
101
|
+
}
|
102
|
+
},
|
103
|
+
pool_id: {
|
104
|
+
client_side_validation: true,
|
105
|
+
required: false,
|
106
|
+
read_only: true,
|
107
|
+
serialized_name: 'properties.poolId',
|
108
|
+
constraints: {
|
109
|
+
MaxLength: 36,
|
110
|
+
MinLength: 36,
|
111
|
+
Pattern: '^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'
|
112
|
+
},
|
113
|
+
type: {
|
114
|
+
name: 'String'
|
115
|
+
}
|
116
|
+
},
|
117
|
+
size: {
|
118
|
+
client_side_validation: true,
|
119
|
+
required: false,
|
120
|
+
serialized_name: 'properties.size',
|
121
|
+
default_value: 4398046511104,
|
122
|
+
constraints: {
|
123
|
+
InclusiveMaximum: 549755813888000,
|
124
|
+
InclusiveMinimum: 4398046511104
|
125
|
+
},
|
126
|
+
type: {
|
127
|
+
name: 'Number'
|
128
|
+
}
|
129
|
+
},
|
130
|
+
service_level: {
|
131
|
+
client_side_validation: true,
|
132
|
+
required: false,
|
133
|
+
serialized_name: 'properties.serviceLevel',
|
134
|
+
default_value: 'Premium',
|
135
|
+
type: {
|
136
|
+
name: 'String'
|
137
|
+
}
|
138
|
+
},
|
139
|
+
provisioning_state: {
|
140
|
+
client_side_validation: true,
|
141
|
+
required: false,
|
142
|
+
read_only: true,
|
143
|
+
serialized_name: 'properties.provisioningState',
|
144
|
+
type: {
|
145
|
+
name: 'String'
|
146
|
+
}
|
147
|
+
}
|
148
|
+
}
|
149
|
+
}
|
150
|
+
}
|
151
|
+
end
|
152
|
+
end
|
153
|
+
end
|
154
|
+
end
|