azure_mgmt_azurestack 0.17.0 → 0.17.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.txt +20 -20
- data/lib/2017-06-01/generated/azure_mgmt_azurestack.rb +16 -10
- data/lib/2017-06-01/generated/azure_mgmt_azurestack/azure_stack_management_client.rb +1 -1
- data/lib/2017-06-01/generated/azure_mgmt_azurestack/customer_subscriptions.rb +0 -0
- data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/activation_key_result.rb +0 -0
- data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/category.rb +16 -0
- data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/compatibility.rb +89 -0
- data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/compatibility_issue.rb +24 -0
- data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/compute_role.rb +0 -0
- data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/customer_subscription.rb +0 -0
- data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/customer_subscription_list.rb +0 -0
- data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/data_disk_image.rb +0 -0
- data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/device_configuration.rb +60 -0
- data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/display.rb +0 -0
- data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/error_details.rb +0 -0
- data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/error_response.rb +0 -0
- data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/extended_product.rb +0 -0
- data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/icon_uris.rb +0 -0
- data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/location.rb +0 -0
- data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/marketplace_product_log_update.rb +83 -0
- data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/operating_system.rb +0 -0
- data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/operation.rb +0 -0
- data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/operation_list.rb +0 -0
- data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/os_disk_image.rb +0 -0
- data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/product.rb +12 -0
- data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/product_link.rb +0 -0
- data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/product_list.rb +0 -0
- data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/product_log.rb +167 -0
- data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/product_properties.rb +0 -0
- data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/provisioning_state.rb +0 -0
- data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/registration.rb +0 -0
- data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/registration_list.rb +0 -0
- data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/registration_parameter.rb +0 -0
- data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/resource.rb +0 -0
- data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/tracked_resource.rb +0 -0
- data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/virtual_machine_extension_product_properties.rb +0 -0
- data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/virtual_machine_product_properties.rb +0 -0
- data/lib/2017-06-01/generated/azure_mgmt_azurestack/module_definition.rb +0 -0
- data/lib/2017-06-01/generated/azure_mgmt_azurestack/operations.rb +0 -0
- data/lib/2017-06-01/generated/azure_mgmt_azurestack/products.rb +314 -0
- data/lib/2017-06-01/generated/azure_mgmt_azurestack/registrations.rb +0 -0
- data/lib/azure_mgmt_azurestack.rb +6 -6
- data/lib/module_definition.rb +7 -7
- data/lib/profiles/latest/azurestack_latest_profile_client.rb +40 -40
- data/lib/profiles/latest/azurestack_module_definition.rb +8 -8
- data/lib/profiles/latest/modules/azurestack_profile_module.rb +55 -31
- data/lib/version.rb +1 -1
- metadata +9 -4
File without changes
|
File without changes
|
@@ -0,0 +1,167 @@
|
|
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::AzureStack::Mgmt::V2017_06_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Product action log.
|
10
|
+
#
|
11
|
+
class ProductLog
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Log ID.
|
16
|
+
attr_accessor :id
|
17
|
+
|
18
|
+
# @return [String] Logged product ID.
|
19
|
+
attr_accessor :product_id
|
20
|
+
|
21
|
+
# @return [String] Logged subscription ID.
|
22
|
+
attr_accessor :subscription_id
|
23
|
+
|
24
|
+
# @return [String] Logged registration name.
|
25
|
+
attr_accessor :registration_name
|
26
|
+
|
27
|
+
# @return [String] Logged resource group name.
|
28
|
+
attr_accessor :resource_group_name
|
29
|
+
|
30
|
+
# @return [String] Logged operation.
|
31
|
+
attr_accessor :operation
|
32
|
+
|
33
|
+
# @return [String] Operation start datetime.
|
34
|
+
attr_accessor :start_date
|
35
|
+
|
36
|
+
# @return [String] Operation end datetime.
|
37
|
+
attr_accessor :end_date
|
38
|
+
|
39
|
+
# @return [String] Operation status.
|
40
|
+
attr_accessor :status
|
41
|
+
|
42
|
+
# @return [String] Operation error data.
|
43
|
+
attr_accessor :error
|
44
|
+
|
45
|
+
# @return [String] Operation error details.
|
46
|
+
attr_accessor :details
|
47
|
+
|
48
|
+
|
49
|
+
#
|
50
|
+
# Mapper for ProductLog class as Ruby Hash.
|
51
|
+
# This will be used for serialization/deserialization.
|
52
|
+
#
|
53
|
+
def self.mapper()
|
54
|
+
{
|
55
|
+
client_side_validation: true,
|
56
|
+
required: false,
|
57
|
+
serialized_name: 'ProductLog',
|
58
|
+
type: {
|
59
|
+
name: 'Composite',
|
60
|
+
class_name: 'ProductLog',
|
61
|
+
model_properties: {
|
62
|
+
id: {
|
63
|
+
client_side_validation: true,
|
64
|
+
required: false,
|
65
|
+
read_only: true,
|
66
|
+
serialized_name: 'id',
|
67
|
+
type: {
|
68
|
+
name: 'String'
|
69
|
+
}
|
70
|
+
},
|
71
|
+
product_id: {
|
72
|
+
client_side_validation: true,
|
73
|
+
required: false,
|
74
|
+
read_only: true,
|
75
|
+
serialized_name: 'productId',
|
76
|
+
type: {
|
77
|
+
name: 'String'
|
78
|
+
}
|
79
|
+
},
|
80
|
+
subscription_id: {
|
81
|
+
client_side_validation: true,
|
82
|
+
required: false,
|
83
|
+
read_only: true,
|
84
|
+
serialized_name: 'subscriptionId',
|
85
|
+
type: {
|
86
|
+
name: 'String'
|
87
|
+
}
|
88
|
+
},
|
89
|
+
registration_name: {
|
90
|
+
client_side_validation: true,
|
91
|
+
required: false,
|
92
|
+
read_only: true,
|
93
|
+
serialized_name: 'registrationName',
|
94
|
+
type: {
|
95
|
+
name: 'String'
|
96
|
+
}
|
97
|
+
},
|
98
|
+
resource_group_name: {
|
99
|
+
client_side_validation: true,
|
100
|
+
required: false,
|
101
|
+
read_only: true,
|
102
|
+
serialized_name: 'resourceGroupName',
|
103
|
+
type: {
|
104
|
+
name: 'String'
|
105
|
+
}
|
106
|
+
},
|
107
|
+
operation: {
|
108
|
+
client_side_validation: true,
|
109
|
+
required: false,
|
110
|
+
read_only: true,
|
111
|
+
serialized_name: 'operation',
|
112
|
+
type: {
|
113
|
+
name: 'String'
|
114
|
+
}
|
115
|
+
},
|
116
|
+
start_date: {
|
117
|
+
client_side_validation: true,
|
118
|
+
required: false,
|
119
|
+
read_only: true,
|
120
|
+
serialized_name: 'startDate',
|
121
|
+
type: {
|
122
|
+
name: 'String'
|
123
|
+
}
|
124
|
+
},
|
125
|
+
end_date: {
|
126
|
+
client_side_validation: true,
|
127
|
+
required: false,
|
128
|
+
read_only: true,
|
129
|
+
serialized_name: 'endDate',
|
130
|
+
type: {
|
131
|
+
name: 'String'
|
132
|
+
}
|
133
|
+
},
|
134
|
+
status: {
|
135
|
+
client_side_validation: true,
|
136
|
+
required: false,
|
137
|
+
read_only: true,
|
138
|
+
serialized_name: 'status',
|
139
|
+
type: {
|
140
|
+
name: 'String'
|
141
|
+
}
|
142
|
+
},
|
143
|
+
error: {
|
144
|
+
client_side_validation: true,
|
145
|
+
required: false,
|
146
|
+
read_only: true,
|
147
|
+
serialized_name: 'error',
|
148
|
+
type: {
|
149
|
+
name: 'String'
|
150
|
+
}
|
151
|
+
},
|
152
|
+
details: {
|
153
|
+
client_side_validation: true,
|
154
|
+
required: false,
|
155
|
+
read_only: true,
|
156
|
+
serialized_name: 'details',
|
157
|
+
type: {
|
158
|
+
name: 'String'
|
159
|
+
}
|
160
|
+
}
|
161
|
+
}
|
162
|
+
}
|
163
|
+
}
|
164
|
+
end
|
165
|
+
end
|
166
|
+
end
|
167
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/virtual_machine_product_properties.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
@@ -311,6 +311,320 @@ module Azure::AzureStack::Mgmt::V2017_06_01
|
|
311
311
|
promise.execute
|
312
312
|
end
|
313
313
|
|
314
|
+
#
|
315
|
+
# Returns a list of products.
|
316
|
+
#
|
317
|
+
# @param resource_group [String] Name of the resource group.
|
318
|
+
# @param registration_name [String] Name of the Azure Stack registration.
|
319
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
320
|
+
# will be added to the HTTP request.
|
321
|
+
#
|
322
|
+
# @return [ProductList] operation results.
|
323
|
+
#
|
324
|
+
def get_products(resource_group, registration_name, custom_headers:nil)
|
325
|
+
response = get_products_async(resource_group, registration_name, custom_headers:custom_headers).value!
|
326
|
+
response.body unless response.nil?
|
327
|
+
end
|
328
|
+
|
329
|
+
#
|
330
|
+
# Returns a list of products.
|
331
|
+
#
|
332
|
+
# @param resource_group [String] Name of the resource group.
|
333
|
+
# @param registration_name [String] Name of the Azure Stack registration.
|
334
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
335
|
+
# will be added to the HTTP request.
|
336
|
+
#
|
337
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
338
|
+
#
|
339
|
+
def get_products_with_http_info(resource_group, registration_name, custom_headers:nil)
|
340
|
+
get_products_async(resource_group, registration_name, custom_headers:custom_headers).value!
|
341
|
+
end
|
342
|
+
|
343
|
+
#
|
344
|
+
# Returns a list of products.
|
345
|
+
#
|
346
|
+
# @param resource_group [String] Name of the resource group.
|
347
|
+
# @param registration_name [String] Name of the Azure Stack registration.
|
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 get_products_async(resource_group, registration_name, custom_headers:nil)
|
354
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
355
|
+
fail ArgumentError, 'resource_group is nil' if resource_group.nil?
|
356
|
+
fail ArgumentError, 'registration_name is nil' if registration_name.nil?
|
357
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
358
|
+
|
359
|
+
device_configuration = nil
|
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
|
+
|
368
|
+
# Serialize Request
|
369
|
+
request_mapper = Azure::AzureStack::Mgmt::V2017_06_01::Models::DeviceConfiguration.mapper()
|
370
|
+
request_content = @client.serialize(request_mapper, device_configuration)
|
371
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
372
|
+
|
373
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products/_all/GetProducts'
|
374
|
+
|
375
|
+
request_url = @base_url || @client.base_url
|
376
|
+
|
377
|
+
options = {
|
378
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
379
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroup' => resource_group,'registrationName' => registration_name},
|
380
|
+
query_params: {'api-version' => @client.api_version},
|
381
|
+
body: request_content,
|
382
|
+
headers: request_headers.merge(custom_headers || {}),
|
383
|
+
base_url: request_url
|
384
|
+
}
|
385
|
+
promise = @client.make_request_async(:post, path_template, options)
|
386
|
+
|
387
|
+
promise = promise.then do |result|
|
388
|
+
http_response = result.response
|
389
|
+
status_code = http_response.status
|
390
|
+
response_content = http_response.body
|
391
|
+
unless status_code == 200
|
392
|
+
error_model = JSON.load(response_content)
|
393
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
394
|
+
end
|
395
|
+
|
396
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
397
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
398
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
399
|
+
# Deserialize Response
|
400
|
+
if status_code == 200
|
401
|
+
begin
|
402
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
403
|
+
result_mapper = Azure::AzureStack::Mgmt::V2017_06_01::Models::ProductList.mapper()
|
404
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
405
|
+
rescue Exception => e
|
406
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
407
|
+
end
|
408
|
+
end
|
409
|
+
|
410
|
+
result
|
411
|
+
end
|
412
|
+
|
413
|
+
promise.execute
|
414
|
+
end
|
415
|
+
|
416
|
+
#
|
417
|
+
# Returns the specified product.
|
418
|
+
#
|
419
|
+
# @param resource_group [String] Name of the resource group.
|
420
|
+
# @param registration_name [String] Name of the Azure Stack registration.
|
421
|
+
# @param product_name [String] Name of the product.
|
422
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
423
|
+
# will be added to the HTTP request.
|
424
|
+
#
|
425
|
+
# @return [Product] operation results.
|
426
|
+
#
|
427
|
+
def get_product(resource_group, registration_name, product_name, custom_headers:nil)
|
428
|
+
response = get_product_async(resource_group, registration_name, product_name, custom_headers:custom_headers).value!
|
429
|
+
response.body unless response.nil?
|
430
|
+
end
|
431
|
+
|
432
|
+
#
|
433
|
+
# Returns the specified product.
|
434
|
+
#
|
435
|
+
# @param resource_group [String] Name of the resource group.
|
436
|
+
# @param registration_name [String] Name of the Azure Stack registration.
|
437
|
+
# @param product_name [String] Name of the product.
|
438
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
439
|
+
# will be added to the HTTP request.
|
440
|
+
#
|
441
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
442
|
+
#
|
443
|
+
def get_product_with_http_info(resource_group, registration_name, product_name, custom_headers:nil)
|
444
|
+
get_product_async(resource_group, registration_name, product_name, custom_headers:custom_headers).value!
|
445
|
+
end
|
446
|
+
|
447
|
+
#
|
448
|
+
# Returns the specified product.
|
449
|
+
#
|
450
|
+
# @param resource_group [String] Name of the resource group.
|
451
|
+
# @param registration_name [String] Name of the Azure Stack registration.
|
452
|
+
# @param product_name [String] Name of the product.
|
453
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
454
|
+
# to the HTTP request.
|
455
|
+
#
|
456
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
457
|
+
#
|
458
|
+
def get_product_async(resource_group, registration_name, product_name, custom_headers:nil)
|
459
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
460
|
+
fail ArgumentError, 'resource_group is nil' if resource_group.nil?
|
461
|
+
fail ArgumentError, 'registration_name is nil' if registration_name.nil?
|
462
|
+
fail ArgumentError, 'product_name is nil' if product_name.nil?
|
463
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
464
|
+
|
465
|
+
device_configuration = nil
|
466
|
+
|
467
|
+
request_headers = {}
|
468
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
469
|
+
|
470
|
+
# Set Headers
|
471
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
472
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
473
|
+
|
474
|
+
# Serialize Request
|
475
|
+
request_mapper = Azure::AzureStack::Mgmt::V2017_06_01::Models::DeviceConfiguration.mapper()
|
476
|
+
request_content = @client.serialize(request_mapper, device_configuration)
|
477
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
478
|
+
|
479
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products/{productName}/GetProduct'
|
480
|
+
|
481
|
+
request_url = @base_url || @client.base_url
|
482
|
+
|
483
|
+
options = {
|
484
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
485
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroup' => resource_group,'registrationName' => registration_name,'productName' => product_name},
|
486
|
+
query_params: {'api-version' => @client.api_version},
|
487
|
+
body: request_content,
|
488
|
+
headers: request_headers.merge(custom_headers || {}),
|
489
|
+
base_url: request_url
|
490
|
+
}
|
491
|
+
promise = @client.make_request_async(:post, path_template, options)
|
492
|
+
|
493
|
+
promise = promise.then do |result|
|
494
|
+
http_response = result.response
|
495
|
+
status_code = http_response.status
|
496
|
+
response_content = http_response.body
|
497
|
+
unless status_code == 200
|
498
|
+
error_model = JSON.load(response_content)
|
499
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
500
|
+
end
|
501
|
+
|
502
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
503
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
504
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
505
|
+
# Deserialize Response
|
506
|
+
if status_code == 200
|
507
|
+
begin
|
508
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
509
|
+
result_mapper = Azure::AzureStack::Mgmt::V2017_06_01::Models::Product.mapper()
|
510
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
511
|
+
rescue Exception => e
|
512
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
513
|
+
end
|
514
|
+
end
|
515
|
+
|
516
|
+
result
|
517
|
+
end
|
518
|
+
|
519
|
+
promise.execute
|
520
|
+
end
|
521
|
+
|
522
|
+
#
|
523
|
+
# Returns the specified product.
|
524
|
+
#
|
525
|
+
# @param resource_group [String] Name of the resource group.
|
526
|
+
# @param registration_name [String] Name of the Azure Stack registration.
|
527
|
+
# @param product_name [String] Name of the product.
|
528
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
529
|
+
# will be added to the HTTP request.
|
530
|
+
#
|
531
|
+
# @return [ProductLog] operation results.
|
532
|
+
#
|
533
|
+
def upload_log(resource_group, registration_name, product_name, custom_headers:nil)
|
534
|
+
response = upload_log_async(resource_group, registration_name, product_name, custom_headers:custom_headers).value!
|
535
|
+
response.body unless response.nil?
|
536
|
+
end
|
537
|
+
|
538
|
+
#
|
539
|
+
# Returns the specified product.
|
540
|
+
#
|
541
|
+
# @param resource_group [String] Name of the resource group.
|
542
|
+
# @param registration_name [String] Name of the Azure Stack registration.
|
543
|
+
# @param product_name [String] Name of the product.
|
544
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
545
|
+
# will be added to the HTTP request.
|
546
|
+
#
|
547
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
548
|
+
#
|
549
|
+
def upload_log_with_http_info(resource_group, registration_name, product_name, custom_headers:nil)
|
550
|
+
upload_log_async(resource_group, registration_name, product_name, custom_headers:custom_headers).value!
|
551
|
+
end
|
552
|
+
|
553
|
+
#
|
554
|
+
# Returns the specified product.
|
555
|
+
#
|
556
|
+
# @param resource_group [String] Name of the resource group.
|
557
|
+
# @param registration_name [String] Name of the Azure Stack registration.
|
558
|
+
# @param product_name [String] Name of the product.
|
559
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
560
|
+
# to the HTTP request.
|
561
|
+
#
|
562
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
563
|
+
#
|
564
|
+
def upload_log_async(resource_group, registration_name, product_name, custom_headers:nil)
|
565
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
566
|
+
fail ArgumentError, 'resource_group is nil' if resource_group.nil?
|
567
|
+
fail ArgumentError, 'registration_name is nil' if registration_name.nil?
|
568
|
+
fail ArgumentError, 'product_name is nil' if product_name.nil?
|
569
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
570
|
+
|
571
|
+
marketplace_product_log_update = nil
|
572
|
+
|
573
|
+
request_headers = {}
|
574
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
575
|
+
|
576
|
+
# Set Headers
|
577
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
578
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
579
|
+
|
580
|
+
# Serialize Request
|
581
|
+
request_mapper = Azure::AzureStack::Mgmt::V2017_06_01::Models::MarketplaceProductLogUpdate.mapper()
|
582
|
+
request_content = @client.serialize(request_mapper, marketplace_product_log_update)
|
583
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
584
|
+
|
585
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products/{productName}/uploadProductLog'
|
586
|
+
|
587
|
+
request_url = @base_url || @client.base_url
|
588
|
+
|
589
|
+
options = {
|
590
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
591
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroup' => resource_group,'registrationName' => registration_name,'productName' => product_name},
|
592
|
+
query_params: {'api-version' => @client.api_version},
|
593
|
+
body: request_content,
|
594
|
+
headers: request_headers.merge(custom_headers || {}),
|
595
|
+
base_url: request_url
|
596
|
+
}
|
597
|
+
promise = @client.make_request_async(:post, path_template, options)
|
598
|
+
|
599
|
+
promise = promise.then do |result|
|
600
|
+
http_response = result.response
|
601
|
+
status_code = http_response.status
|
602
|
+
response_content = http_response.body
|
603
|
+
unless status_code == 200
|
604
|
+
error_model = JSON.load(response_content)
|
605
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
606
|
+
end
|
607
|
+
|
608
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
609
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
610
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
611
|
+
# Deserialize Response
|
612
|
+
if status_code == 200
|
613
|
+
begin
|
614
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
615
|
+
result_mapper = Azure::AzureStack::Mgmt::V2017_06_01::Models::ProductLog.mapper()
|
616
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
617
|
+
rescue Exception => e
|
618
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
619
|
+
end
|
620
|
+
end
|
621
|
+
|
622
|
+
result
|
623
|
+
end
|
624
|
+
|
625
|
+
promise.execute
|
626
|
+
end
|
627
|
+
|
314
628
|
#
|
315
629
|
# Returns a list of products.
|
316
630
|
#
|