azure_mgmt_compute 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (124) hide show
  1. checksums.yaml +4 -4
  2. data/lib/generated/azure_mgmt_compute.rb +48 -46
  3. data/lib/generated/azure_mgmt_compute/availability_sets.rb +16 -19
  4. data/lib/generated/azure_mgmt_compute/compute_management_client.rb +18 -5
  5. data/lib/generated/azure_mgmt_compute/container_services.rb +920 -0
  6. data/lib/generated/azure_mgmt_compute/models/additional_unattend_content.rb +9 -10
  7. data/lib/generated/azure_mgmt_compute/models/api_entity_reference.rb +1 -1
  8. data/lib/generated/azure_mgmt_compute/models/api_error.rb +1 -1
  9. data/lib/generated/azure_mgmt_compute/models/api_error_base.rb +1 -1
  10. data/lib/generated/azure_mgmt_compute/models/availability_set.rb +6 -5
  11. data/lib/generated/azure_mgmt_compute/models/availability_set_list_result.rb +2 -2
  12. data/lib/generated/azure_mgmt_compute/models/boot_diagnostics.rb +4 -4
  13. data/lib/generated/azure_mgmt_compute/models/boot_diagnostics_instance_view.rb +3 -3
  14. data/lib/generated/azure_mgmt_compute/models/caching_types.rb +1 -1
  15. data/lib/generated/azure_mgmt_compute/models/component_names.rb +1 -1
  16. data/lib/generated/azure_mgmt_compute/models/compute_long_running_operation_properties.rb +1 -1
  17. data/lib/generated/azure_mgmt_compute/models/container_service.rb +36 -13
  18. data/lib/generated/azure_mgmt_compute/models/container_service_agent_pool_profile.rb +18 -16
  19. data/lib/generated/azure_mgmt_compute/models/container_service_custom_profile.rb +44 -0
  20. data/lib/generated/azure_mgmt_compute/models/container_service_diagnostics_profile.rb +5 -4
  21. data/lib/generated/azure_mgmt_compute/models/container_service_linux_profile.rb +8 -5
  22. data/lib/generated/azure_mgmt_compute/models/container_service_list_result.rb +45 -3
  23. data/lib/generated/azure_mgmt_compute/models/container_service_master_profile.rb +8 -5
  24. data/lib/generated/azure_mgmt_compute/models/container_service_ochestrator_types.rb +3 -1
  25. data/lib/generated/azure_mgmt_compute/models/container_service_orchestrator_profile.rb +7 -6
  26. data/lib/generated/azure_mgmt_compute/models/container_service_service_principal_profile.rb +56 -0
  27. data/lib/generated/azure_mgmt_compute/models/container_service_ssh_configuration.rb +5 -5
  28. data/lib/generated/azure_mgmt_compute/models/container_service_ssh_public_key.rb +3 -3
  29. data/lib/generated/azure_mgmt_compute/models/container_service_vmdiagnostics.rb +7 -7
  30. data/lib/generated/azure_mgmt_compute/models/container_service_vmsize_types.rb +1 -1
  31. data/lib/generated/azure_mgmt_compute/models/container_service_windows_profile.rb +10 -4
  32. data/lib/generated/azure_mgmt_compute/models/data_disk.rb +12 -12
  33. data/lib/generated/azure_mgmt_compute/models/data_disk_image.rb +4 -5
  34. data/lib/generated/azure_mgmt_compute/models/diagnostics_profile.rb +4 -2
  35. data/lib/generated/azure_mgmt_compute/models/disk_create_option_types.rb +1 -1
  36. data/lib/generated/azure_mgmt_compute/models/disk_encryption_settings.rb +7 -7
  37. data/lib/generated/azure_mgmt_compute/models/disk_instance_view.rb +3 -3
  38. data/lib/generated/azure_mgmt_compute/models/hardware_profile.rb +1 -1
  39. data/lib/generated/azure_mgmt_compute/models/image_reference.rb +7 -7
  40. data/lib/generated/azure_mgmt_compute/models/inner_error.rb +1 -1
  41. data/lib/generated/azure_mgmt_compute/models/instance_view_status.rb +7 -7
  42. data/lib/generated/azure_mgmt_compute/models/instance_view_types.rb +1 -1
  43. data/lib/generated/azure_mgmt_compute/models/key_vault_key_reference.rb +4 -4
  44. data/lib/generated/azure_mgmt_compute/models/key_vault_secret_reference.rb +3 -3
  45. data/lib/generated/azure_mgmt_compute/models/linux_configuration.rb +5 -5
  46. data/lib/generated/azure_mgmt_compute/models/list_usages_result.rb +6 -6
  47. data/lib/generated/azure_mgmt_compute/models/network_interface_reference.rb +3 -2
  48. data/lib/generated/azure_mgmt_compute/models/network_profile.rb +4 -2
  49. data/lib/generated/azure_mgmt_compute/models/operating_system_types.rb +1 -1
  50. data/lib/generated/azure_mgmt_compute/models/osdisk.rb +12 -12
  51. data/lib/generated/azure_mgmt_compute/models/osdisk_image.rb +3 -3
  52. data/lib/generated/azure_mgmt_compute/models/osprofile.rb +12 -9
  53. data/lib/generated/azure_mgmt_compute/models/pass_names.rb +1 -1
  54. data/lib/generated/azure_mgmt_compute/models/plan.rb +5 -5
  55. data/lib/generated/azure_mgmt_compute/models/protocol_types.rb +1 -1
  56. data/lib/generated/azure_mgmt_compute/models/purchase_plan.rb +4 -4
  57. data/lib/generated/azure_mgmt_compute/models/setting_names.rb +1 -1
  58. data/lib/generated/azure_mgmt_compute/models/sku.rb +4 -4
  59. data/lib/generated/azure_mgmt_compute/models/ssh_configuration.rb +3 -3
  60. data/lib/generated/azure_mgmt_compute/models/ssh_public_key.rb +7 -7
  61. data/lib/generated/azure_mgmt_compute/models/status_level_types.rb +1 -1
  62. data/lib/generated/azure_mgmt_compute/models/storage_profile.rb +4 -4
  63. data/lib/generated/azure_mgmt_compute/models/upgrade_mode.rb +1 -1
  64. data/lib/generated/azure_mgmt_compute/models/upgrade_policy.rb +1 -1
  65. data/lib/generated/azure_mgmt_compute/models/usage.rb +6 -6
  66. data/lib/generated/azure_mgmt_compute/models/usage_name.rb +3 -3
  67. data/lib/generated/azure_mgmt_compute/models/vault_certificate.rb +3 -3
  68. data/lib/generated/azure_mgmt_compute/models/vault_secret_group.rb +4 -4
  69. data/lib/generated/azure_mgmt_compute/models/virtual_hard_disk.rb +3 -3
  70. data/lib/generated/azure_mgmt_compute/models/virtual_machine.rb +18 -15
  71. data/lib/generated/azure_mgmt_compute/models/virtual_machine_agent_instance_view.rb +5 -5
  72. data/lib/generated/azure_mgmt_compute/models/virtual_machine_capture_parameters.rb +5 -5
  73. data/lib/generated/azure_mgmt_compute/models/virtual_machine_capture_result.rb +1 -1
  74. data/lib/generated/azure_mgmt_compute/models/virtual_machine_extension.rb +3 -3
  75. data/lib/generated/azure_mgmt_compute/models/virtual_machine_extension_handler_instance_view.rb +3 -3
  76. data/lib/generated/azure_mgmt_compute/models/virtual_machine_extension_image.rb +5 -5
  77. data/lib/generated/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb +1 -1
  78. data/lib/generated/azure_mgmt_compute/models/virtual_machine_image.rb +1 -1
  79. data/lib/generated/azure_mgmt_compute/models/virtual_machine_image_resource.rb +4 -4
  80. data/lib/generated/azure_mgmt_compute/models/virtual_machine_instance_view.rb +7 -7
  81. data/lib/generated/azure_mgmt_compute/models/virtual_machine_list_result.rb +4 -4
  82. data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set.rb +1 -1
  83. data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension.rb +3 -3
  84. data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension_profile.rb +1 -1
  85. data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view.rb +1 -1
  86. data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view_statuses_summary.rb +1 -1
  87. data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_ipconfiguration.rb +1 -1
  88. data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_result.rb +1 -1
  89. data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_skus_result.rb +1 -1
  90. data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_with_link_result.rb +3 -3
  91. data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration.rb +1 -1
  92. data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_profile.rb +3 -3
  93. data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osdisk.rb +4 -4
  94. data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osprofile.rb +3 -3
  95. data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku.rb +1 -1
  96. data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku_capacity.rb +1 -1
  97. data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku_scale_type.rb +1 -1
  98. data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_storage_profile.rb +1 -1
  99. data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vm.rb +7 -7
  100. data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmextensions_summary.rb +1 -1
  101. data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_ids.rb +2 -2
  102. data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_required_ids.rb +2 -2
  103. data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_view.rb +1 -1
  104. data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmlist_result.rb +3 -3
  105. data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmprofile.rb +3 -3
  106. data/lib/generated/azure_mgmt_compute/models/virtual_machine_size.rb +12 -8
  107. data/lib/generated/azure_mgmt_compute/models/virtual_machine_size_list_result.rb +2 -2
  108. data/lib/generated/azure_mgmt_compute/models/virtual_machine_size_types.rb +1 -1
  109. data/lib/generated/azure_mgmt_compute/models/virtual_machine_status_code_count.rb +1 -1
  110. data/lib/generated/azure_mgmt_compute/models/win_rmconfiguration.rb +2 -2
  111. data/lib/generated/azure_mgmt_compute/models/win_rmlistener.rb +5 -6
  112. data/lib/generated/azure_mgmt_compute/models/windows_configuration.rb +11 -10
  113. data/lib/generated/azure_mgmt_compute/module_definition.rb +1 -1
  114. data/lib/generated/azure_mgmt_compute/usage_operations.rb +51 -37
  115. data/lib/generated/azure_mgmt_compute/version.rb +2 -2
  116. data/lib/generated/azure_mgmt_compute/virtual_machine_extension_images.rb +1 -1
  117. data/lib/generated/azure_mgmt_compute/virtual_machine_extensions.rb +131 -131
  118. data/lib/generated/azure_mgmt_compute/virtual_machine_images.rb +70 -58
  119. data/lib/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb +430 -422
  120. data/lib/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb +729 -747
  121. data/lib/generated/azure_mgmt_compute/virtual_machine_sizes.rb +1 -1
  122. data/lib/generated/azure_mgmt_compute/virtual_machines.rb +526 -515
  123. metadata +7 -5
  124. data/lib/generated/azure_mgmt_compute/container_service_operations.rb +0 -508
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: azure_mgmt_compute
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Microsoft Corporation
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-14 00:00:00.000000000 Z
11
+ date: 2016-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 0.6.0
75
+ version: 0.6.2
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 0.6.0
82
+ version: 0.6.2
83
83
  description: Microsoft Azure Compute Management Client Library for Ruby
84
84
  email: azrubyteam@microsoft.com
85
85
  executables: []
@@ -92,7 +92,7 @@ files:
92
92
  - lib/generated/azure_mgmt_compute.rb
93
93
  - lib/generated/azure_mgmt_compute/availability_sets.rb
94
94
  - lib/generated/azure_mgmt_compute/compute_management_client.rb
95
- - lib/generated/azure_mgmt_compute/container_service_operations.rb
95
+ - lib/generated/azure_mgmt_compute/container_services.rb
96
96
  - lib/generated/azure_mgmt_compute/models/additional_unattend_content.rb
97
97
  - lib/generated/azure_mgmt_compute/models/api_entity_reference.rb
98
98
  - lib/generated/azure_mgmt_compute/models/api_error.rb
@@ -106,12 +106,14 @@ files:
106
106
  - lib/generated/azure_mgmt_compute/models/compute_long_running_operation_properties.rb
107
107
  - lib/generated/azure_mgmt_compute/models/container_service.rb
108
108
  - lib/generated/azure_mgmt_compute/models/container_service_agent_pool_profile.rb
109
+ - lib/generated/azure_mgmt_compute/models/container_service_custom_profile.rb
109
110
  - lib/generated/azure_mgmt_compute/models/container_service_diagnostics_profile.rb
110
111
  - lib/generated/azure_mgmt_compute/models/container_service_linux_profile.rb
111
112
  - lib/generated/azure_mgmt_compute/models/container_service_list_result.rb
112
113
  - lib/generated/azure_mgmt_compute/models/container_service_master_profile.rb
113
114
  - lib/generated/azure_mgmt_compute/models/container_service_ochestrator_types.rb
114
115
  - lib/generated/azure_mgmt_compute/models/container_service_orchestrator_profile.rb
116
+ - lib/generated/azure_mgmt_compute/models/container_service_service_principal_profile.rb
115
117
  - lib/generated/azure_mgmt_compute/models/container_service_ssh_configuration.rb
116
118
  - lib/generated/azure_mgmt_compute/models/container_service_ssh_public_key.rb
117
119
  - lib/generated/azure_mgmt_compute/models/container_service_vmdiagnostics.rb
@@ -1,508 +0,0 @@
1
- # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
- # Changes may cause incorrect behavior and will be lost if the code is
4
- # regenerated.
5
-
6
- module Azure::ARM::Compute
7
- #
8
- # Composite Swagger for Compute Client
9
- #
10
- class ContainerServiceOperations
11
- include Azure::ARM::Compute::Models
12
- include MsRestAzure
13
-
14
- #
15
- # Creates and initializes a new instance of the ContainerServiceOperations class.
16
- # @param client service class for accessing basic functionality.
17
- #
18
- def initialize(client)
19
- @client = client
20
- end
21
-
22
- # @return [ComputeManagementClient] reference to the ComputeManagementClient
23
- attr_reader :client
24
-
25
- #
26
- # The operation to create or update a container service.
27
- #
28
- # @param resource_group_name [String] The name of the resource group.
29
- # @param container_service_name [String] The name of the container service
30
- # within the given subscription and resource group.
31
- # @param parameters [ContainerService] Parameters supplied to the Create
32
- # Container Service operation.
33
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
34
- # will be added to the HTTP request.
35
- #
36
- # @return [ContainerService] operation results.
37
- #
38
- def create_or_update(resource_group_name, container_service_name, parameters, custom_headers = nil)
39
- response = create_or_update_async(resource_group_name, container_service_name, parameters, custom_headers).value!
40
- response.body unless response.nil?
41
- end
42
-
43
- #
44
- # @param resource_group_name [String] The name of the resource group.
45
- # @param container_service_name [String] The name of the container service
46
- # within the given subscription and resource group.
47
- # @param parameters [ContainerService] Parameters supplied to the Create
48
- # Container Service operation.
49
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
50
- # will be added to the HTTP request.
51
- #
52
- # @return [Concurrent::Promise] promise which provides async access to http
53
- # response.
54
- #
55
- def create_or_update_async(resource_group_name, container_service_name, parameters, custom_headers = nil)
56
- # Send request
57
- promise = begin_create_or_update_async(resource_group_name, container_service_name, parameters, custom_headers)
58
-
59
- promise = promise.then do |response|
60
- # Defining deserialization method.
61
- deserialize_method = lambda do |parsed_response|
62
- result_mapper = ContainerService.mapper()
63
- parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
64
- end
65
-
66
- # Waiting for response.
67
- @client.get_long_running_operation_result(response, deserialize_method)
68
- end
69
-
70
- promise
71
- end
72
-
73
- #
74
- # The operation to create or update a container service.
75
- #
76
- # @param resource_group_name [String] The name of the resource group.
77
- # @param container_service_name [String] The name of the container service
78
- # within the given subscription and resource group.
79
- # @param parameters [ContainerService] Parameters supplied to the Create
80
- # Container Service operation.
81
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
82
- # will be added to the HTTP request.
83
- #
84
- # @return [ContainerService] operation results.
85
- #
86
- def begin_create_or_update(resource_group_name, container_service_name, parameters, custom_headers = nil)
87
- response = begin_create_or_update_async(resource_group_name, container_service_name, parameters, custom_headers).value!
88
- response.body unless response.nil?
89
- end
90
-
91
- #
92
- # The operation to create or update a container service.
93
- #
94
- # @param resource_group_name [String] The name of the resource group.
95
- # @param container_service_name [String] The name of the container service
96
- # within the given subscription and resource group.
97
- # @param parameters [ContainerService] Parameters supplied to the Create
98
- # Container Service operation.
99
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
100
- # will be added to the HTTP request.
101
- #
102
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
103
- #
104
- def begin_create_or_update_with_http_info(resource_group_name, container_service_name, parameters, custom_headers = nil)
105
- begin_create_or_update_async(resource_group_name, container_service_name, parameters, custom_headers).value!
106
- end
107
-
108
- #
109
- # The operation to create or update a container service.
110
- #
111
- # @param resource_group_name [String] The name of the resource group.
112
- # @param container_service_name [String] The name of the container service
113
- # within the given subscription and resource group.
114
- # @param parameters [ContainerService] Parameters supplied to the Create
115
- # Container Service operation.
116
- # @param [Hash{String => String}] A hash of custom headers that will be added
117
- # to the HTTP request.
118
- #
119
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
120
- #
121
- def begin_create_or_update_async(resource_group_name, container_service_name, parameters, custom_headers = nil)
122
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
123
- fail ArgumentError, 'container_service_name is nil' if container_service_name.nil?
124
- fail ArgumentError, 'parameters is nil' if parameters.nil?
125
- api_version = '2016-03-30'
126
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
127
-
128
-
129
- request_headers = {}
130
-
131
- # Set Headers
132
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
133
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
134
-
135
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
136
-
137
- # Serialize Request
138
- request_mapper = ContainerService.mapper()
139
- request_content = @client.serialize(request_mapper, parameters, 'parameters')
140
- request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
141
-
142
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}'
143
-
144
- request_url = @base_url || @client.base_url
145
-
146
- options = {
147
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
148
- path_params: {'resourceGroupName' => resource_group_name,'containerServiceName' => container_service_name,'subscriptionId' => @client.subscription_id},
149
- query_params: {'api-version' => api_version},
150
- body: request_content,
151
- headers: request_headers.merge(custom_headers || {}),
152
- base_url: request_url
153
- }
154
- promise = @client.make_request_async(:put, path_template, options)
155
-
156
- promise = promise.then do |result|
157
- http_response = result.response
158
- status_code = http_response.status
159
- response_content = http_response.body
160
- unless status_code == 200 || status_code == 201 || status_code == 202
161
- error_model = JSON.load(response_content)
162
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
163
- end
164
-
165
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
166
- # Deserialize Response
167
- if status_code == 200
168
- begin
169
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
170
- result_mapper = ContainerService.mapper()
171
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
172
- rescue Exception => e
173
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
174
- end
175
- end
176
- # Deserialize Response
177
- if status_code == 201
178
- begin
179
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
180
- result_mapper = ContainerService.mapper()
181
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
182
- rescue Exception => e
183
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
184
- end
185
- end
186
- # Deserialize Response
187
- if status_code == 202
188
- begin
189
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
190
- result_mapper = ContainerService.mapper()
191
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
192
- rescue Exception => e
193
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
194
- end
195
- end
196
-
197
- result
198
- end
199
-
200
- promise.execute
201
- end
202
-
203
- #
204
- # The operation to get a container service.
205
- #
206
- # @param resource_group_name [String] The name of the resource group.
207
- # @param container_service_name [String] The name of the container service
208
- # within the given subscription and resource group.
209
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
210
- # will be added to the HTTP request.
211
- #
212
- # @return [ContainerService] operation results.
213
- #
214
- def get(resource_group_name, container_service_name, custom_headers = nil)
215
- response = get_async(resource_group_name, container_service_name, custom_headers).value!
216
- response.body unless response.nil?
217
- end
218
-
219
- #
220
- # The operation to get a container service.
221
- #
222
- # @param resource_group_name [String] The name of the resource group.
223
- # @param container_service_name [String] The name of the container service
224
- # within the given subscription and resource group.
225
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
226
- # will be added to the HTTP request.
227
- #
228
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
229
- #
230
- def get_with_http_info(resource_group_name, container_service_name, custom_headers = nil)
231
- get_async(resource_group_name, container_service_name, custom_headers).value!
232
- end
233
-
234
- #
235
- # The operation to get a container service.
236
- #
237
- # @param resource_group_name [String] The name of the resource group.
238
- # @param container_service_name [String] The name of the container service
239
- # within the given subscription and resource group.
240
- # @param [Hash{String => String}] A hash of custom headers that will be added
241
- # to the HTTP request.
242
- #
243
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
244
- #
245
- def get_async(resource_group_name, container_service_name, custom_headers = nil)
246
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
247
- fail ArgumentError, 'container_service_name is nil' if container_service_name.nil?
248
- api_version = '2016-03-30'
249
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
250
-
251
-
252
- request_headers = {}
253
-
254
- # Set Headers
255
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
256
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
257
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}'
258
-
259
- request_url = @base_url || @client.base_url
260
-
261
- options = {
262
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
263
- path_params: {'resourceGroupName' => resource_group_name,'containerServiceName' => container_service_name,'subscriptionId' => @client.subscription_id},
264
- query_params: {'api-version' => api_version},
265
- headers: request_headers.merge(custom_headers || {}),
266
- base_url: request_url
267
- }
268
- promise = @client.make_request_async(:get, path_template, options)
269
-
270
- promise = promise.then do |result|
271
- http_response = result.response
272
- status_code = http_response.status
273
- response_content = http_response.body
274
- unless status_code == 200
275
- error_model = JSON.load(response_content)
276
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
277
- end
278
-
279
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
280
- # Deserialize Response
281
- if status_code == 200
282
- begin
283
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
284
- result_mapper = ContainerService.mapper()
285
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
286
- rescue Exception => e
287
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
288
- end
289
- end
290
-
291
- result
292
- end
293
-
294
- promise.execute
295
- end
296
-
297
- #
298
- # The operation to delete a container service.
299
- #
300
- # @param resource_group_name [String] The name of the resource group.
301
- # @param container_service_name [String] The name of the container service
302
- # within the given subscription and resource group.
303
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
304
- # will be added to the HTTP request.
305
- #
306
- def delete(resource_group_name, container_service_name, custom_headers = nil)
307
- response = delete_async(resource_group_name, container_service_name, custom_headers).value!
308
- nil
309
- end
310
-
311
- #
312
- # @param resource_group_name [String] The name of the resource group.
313
- # @param container_service_name [String] The name of the container service
314
- # within the given subscription and resource group.
315
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
316
- # will be added to the HTTP request.
317
- #
318
- # @return [Concurrent::Promise] promise which provides async access to http
319
- # response.
320
- #
321
- def delete_async(resource_group_name, container_service_name, custom_headers = nil)
322
- # Send request
323
- promise = begin_delete_async(resource_group_name, container_service_name, custom_headers)
324
-
325
- promise = promise.then do |response|
326
- # Defining deserialization method.
327
- deserialize_method = lambda do |parsed_response|
328
- end
329
-
330
- # Waiting for response.
331
- @client.get_long_running_operation_result(response, deserialize_method)
332
- end
333
-
334
- promise
335
- end
336
-
337
- #
338
- # The operation to delete a container service.
339
- #
340
- # @param resource_group_name [String] The name of the resource group.
341
- # @param container_service_name [String] The name of the container service
342
- # within the given subscription and resource group.
343
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
344
- # will be added to the HTTP request.
345
- #
346
- #
347
- def begin_delete(resource_group_name, container_service_name, custom_headers = nil)
348
- response = begin_delete_async(resource_group_name, container_service_name, custom_headers).value!
349
- nil
350
- end
351
-
352
- #
353
- # The operation to delete a container service.
354
- #
355
- # @param resource_group_name [String] The name of the resource group.
356
- # @param container_service_name [String] The name of the container service
357
- # within the given subscription and resource group.
358
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
359
- # will be added to the HTTP request.
360
- #
361
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
362
- #
363
- def begin_delete_with_http_info(resource_group_name, container_service_name, custom_headers = nil)
364
- begin_delete_async(resource_group_name, container_service_name, custom_headers).value!
365
- end
366
-
367
- #
368
- # The operation to delete a container service.
369
- #
370
- # @param resource_group_name [String] The name of the resource group.
371
- # @param container_service_name [String] The name of the container service
372
- # within the given subscription and resource group.
373
- # @param [Hash{String => String}] A hash of custom headers that will be added
374
- # to the HTTP request.
375
- #
376
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
377
- #
378
- def begin_delete_async(resource_group_name, container_service_name, custom_headers = nil)
379
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
380
- fail ArgumentError, 'container_service_name is nil' if container_service_name.nil?
381
- api_version = '2016-03-30'
382
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
383
-
384
-
385
- request_headers = {}
386
-
387
- # Set Headers
388
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
389
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
390
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}'
391
-
392
- request_url = @base_url || @client.base_url
393
-
394
- options = {
395
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
396
- path_params: {'resourceGroupName' => resource_group_name,'containerServiceName' => container_service_name,'subscriptionId' => @client.subscription_id},
397
- query_params: {'api-version' => api_version},
398
- headers: request_headers.merge(custom_headers || {}),
399
- base_url: request_url
400
- }
401
- promise = @client.make_request_async(:delete, path_template, options)
402
-
403
- promise = promise.then do |result|
404
- http_response = result.response
405
- status_code = http_response.status
406
- response_content = http_response.body
407
- unless status_code == 202 || status_code == 204
408
- error_model = JSON.load(response_content)
409
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
410
- end
411
-
412
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
413
-
414
- result
415
- end
416
-
417
- promise.execute
418
- end
419
-
420
- #
421
- # The operation to list container services.
422
- #
423
- # @param resource_group_name [String] The name of the resource group.
424
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
425
- # will be added to the HTTP request.
426
- #
427
- # @return [ContainerServiceListResult] operation results.
428
- #
429
- def list(resource_group_name, custom_headers = nil)
430
- response = list_async(resource_group_name, custom_headers).value!
431
- response.body unless response.nil?
432
- end
433
-
434
- #
435
- # The operation to list container services.
436
- #
437
- # @param resource_group_name [String] The name of the resource group.
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 list_with_http_info(resource_group_name, custom_headers = nil)
444
- list_async(resource_group_name, custom_headers).value!
445
- end
446
-
447
- #
448
- # The operation to list container services.
449
- #
450
- # @param resource_group_name [String] The name of the resource group.
451
- # @param [Hash{String => String}] A hash of custom headers that will be added
452
- # to the HTTP request.
453
- #
454
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
455
- #
456
- def list_async(resource_group_name, custom_headers = nil)
457
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
458
- api_version = '2016-03-30'
459
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
460
-
461
-
462
- request_headers = {}
463
-
464
- # Set Headers
465
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
466
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
467
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices'
468
-
469
- request_url = @base_url || @client.base_url
470
-
471
- options = {
472
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
473
- path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
474
- query_params: {'api-version' => api_version},
475
- headers: request_headers.merge(custom_headers || {}),
476
- base_url: request_url
477
- }
478
- promise = @client.make_request_async(:get, path_template, options)
479
-
480
- promise = promise.then do |result|
481
- http_response = result.response
482
- status_code = http_response.status
483
- response_content = http_response.body
484
- unless status_code == 200
485
- error_model = JSON.load(response_content)
486
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
487
- end
488
-
489
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
490
- # Deserialize Response
491
- if status_code == 200
492
- begin
493
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
494
- result_mapper = ContainerServiceListResult.mapper()
495
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
496
- rescue Exception => e
497
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
498
- end
499
- end
500
-
501
- result
502
- end
503
-
504
- promise.execute
505
- end
506
-
507
- end
508
- end