azure_mgmt_compute 0.16.0 → 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.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2015-06-15/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  3. data/lib/2016-03-30/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  4. data/lib/2016-04-30-preview/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  5. data/lib/2017-03-30/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  6. data/lib/2017-09-01/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  7. data/lib/2017-12-01/generated/azure_mgmt_compute.rb +66 -60
  8. data/lib/2017-12-01/generated/azure_mgmt_compute/availability_sets.rb +106 -0
  9. data/lib/2017-12-01/generated/azure_mgmt_compute/compute_management_client.rb +5 -1
  10. data/lib/2017-12-01/generated/azure_mgmt_compute/images.rb +162 -0
  11. data/lib/2017-12-01/generated/azure_mgmt_compute/models/availability_set_update.rb +137 -0
  12. data/lib/2017-12-01/generated/azure_mgmt_compute/models/compute_operation_list_result.rb +56 -0
  13. data/lib/2017-12-01/generated/azure_mgmt_compute/models/compute_operation_value.rb +108 -0
  14. data/lib/2017-12-01/generated/azure_mgmt_compute/models/data_disk.rb +1 -2
  15. data/lib/2017-12-01/generated/azure_mgmt_compute/models/hardware_profile.rb +24 -24
  16. data/lib/2017-12-01/generated/azure_mgmt_compute/models/image_data_disk.rb +1 -2
  17. data/lib/2017-12-01/generated/azure_mgmt_compute/models/image_osdisk.rb +1 -2
  18. data/lib/2017-12-01/generated/azure_mgmt_compute/models/image_storage_profile.rb +14 -1
  19. data/lib/2017-12-01/generated/azure_mgmt_compute/models/image_update.rb +91 -0
  20. data/lib/2017-12-01/generated/azure_mgmt_compute/models/managed_disk_parameters.rb +1 -2
  21. data/lib/2017-12-01/generated/azure_mgmt_compute/models/osdisk.rb +1 -2
  22. data/lib/2017-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set.rb +23 -0
  23. data/lib/2017-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_data_disk.rb +1 -2
  24. data/lib/2017-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_managed_disk_parameters.rb +1 -2
  25. data/lib/2017-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osdisk.rb +1 -2
  26. data/lib/2017-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_view.rb +13 -0
  27. data/lib/2017-12-01/generated/azure_mgmt_compute/models/virtual_machine_update.rb +247 -0
  28. data/lib/2017-12-01/generated/azure_mgmt_compute/operations.rb +107 -0
  29. data/lib/2017-12-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb +280 -0
  30. data/lib/2017-12-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb +302 -0
  31. data/lib/2017-12-01/generated/azure_mgmt_compute/virtual_machines.rb +162 -0
  32. data/lib/profiles/latest/modules/compute_profile_module.rb +214 -192
  33. data/lib/version.rb +1 -1
  34. metadata +8 -2
@@ -44,8 +44,7 @@ module Azure::Compute::Mgmt::V2017_12_01
44
44
  required: false,
45
45
  serialized_name: 'storageAccountType',
46
46
  type: {
47
- name: 'Enum',
48
- module: 'StorageAccountTypes'
47
+ name: 'String'
49
48
  }
50
49
  }
51
50
  }
@@ -149,8 +149,7 @@ module Azure::Compute::Mgmt::V2017_12_01
149
149
  required: true,
150
150
  serialized_name: 'createOption',
151
151
  type: {
152
- name: 'Enum',
153
- module: 'DiskCreateOptionTypes'
152
+ name: 'String'
154
153
  }
155
154
  },
156
155
  disk_size_gb: {
@@ -46,6 +46,13 @@ module Azure::Compute::Mgmt::V2017_12_01
46
46
  # placement group, of max size 100 virtual machines.
47
47
  attr_accessor :single_placement_group
48
48
 
49
+ # @return [Boolean] Whether to force stictly even Virtual Machine
50
+ # distribution cross x-zones in case there is zone outage.
51
+ attr_accessor :zone_balance
52
+
53
+ # @return [Integer] Fault Domain count for each placement group.
54
+ attr_accessor :platform_fault_domain_count
55
+
49
56
  # @return [VirtualMachineScaleSetIdentity] The identity of the virtual
50
57
  # machine scale set, if configured.
51
58
  attr_accessor :identity
@@ -188,6 +195,22 @@ module Azure::Compute::Mgmt::V2017_12_01
188
195
  name: 'Boolean'
189
196
  }
190
197
  },
198
+ zone_balance: {
199
+ client_side_validation: true,
200
+ required: false,
201
+ serialized_name: 'properties.zoneBalance',
202
+ type: {
203
+ name: 'Boolean'
204
+ }
205
+ },
206
+ platform_fault_domain_count: {
207
+ client_side_validation: true,
208
+ required: false,
209
+ serialized_name: 'properties.platformFaultDomainCount',
210
+ type: {
211
+ name: 'Number'
212
+ }
213
+ },
191
214
  identity: {
192
215
  client_side_validation: true,
193
216
  required: false,
@@ -97,8 +97,7 @@ module Azure::Compute::Mgmt::V2017_12_01
97
97
  required: true,
98
98
  serialized_name: 'createOption',
99
99
  type: {
100
- name: 'Enum',
101
- module: 'DiskCreateOptionTypes'
100
+ name: 'String'
102
101
  }
103
102
  },
104
103
  disk_size_gb: {
@@ -37,8 +37,7 @@ module Azure::Compute::Mgmt::V2017_12_01
37
37
  required: false,
38
38
  serialized_name: 'storageAccountType',
39
39
  type: {
40
- name: 'Enum',
41
- module: 'StorageAccountTypes'
40
+ name: 'String'
42
41
  }
43
42
  }
44
43
  }
@@ -98,8 +98,7 @@ module Azure::Compute::Mgmt::V2017_12_01
98
98
  required: true,
99
99
  serialized_name: 'createOption',
100
100
  type: {
101
- name: 'Enum',
102
- module: 'DiskCreateOptionTypes'
101
+ name: 'String'
103
102
  }
104
103
  },
105
104
  os_type: {
@@ -25,6 +25,10 @@ module Azure::Compute::Mgmt::V2017_12_01
25
25
  # virtual machine.
26
26
  attr_accessor :vm_agent
27
27
 
28
+ # @return [MaintenanceRedeployStatus] The Maintenance Operation status on
29
+ # the virtual machine.
30
+ attr_accessor :maintenance_redeploy_status
31
+
28
32
  # @return [Array<DiskInstanceView>] The disks information.
29
33
  attr_accessor :disks
30
34
 
@@ -97,6 +101,15 @@ module Azure::Compute::Mgmt::V2017_12_01
97
101
  class_name: 'VirtualMachineAgentInstanceView'
98
102
  }
99
103
  },
104
+ maintenance_redeploy_status: {
105
+ client_side_validation: true,
106
+ required: false,
107
+ serialized_name: 'maintenanceRedeployStatus',
108
+ type: {
109
+ name: 'Composite',
110
+ class_name: 'MaintenanceRedeployStatus'
111
+ }
112
+ },
100
113
  disks: {
101
114
  client_side_validation: true,
102
115
  required: false,
@@ -0,0 +1,247 @@
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::Compute::Mgmt::V2017_12_01
7
+ module Models
8
+ #
9
+ # Describes a Virtual Machine.
10
+ #
11
+ class VirtualMachineUpdate < UpdateResource
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Plan] Specifies information about the marketplace image used
16
+ # to create the virtual machine. This element is only used for
17
+ # marketplace images. Before you can use a marketplace image from an API,
18
+ # you must enable the image for programmatic use. In the Azure portal,
19
+ # find the marketplace image that you want to use and then click **Want
20
+ # to deploy programmatically, Get Started ->**. Enter any required
21
+ # information and then click **Save**.
22
+ attr_accessor :plan
23
+
24
+ # @return [HardwareProfile] Specifies the hardware settings for the
25
+ # virtual machine.
26
+ attr_accessor :hardware_profile
27
+
28
+ # @return [StorageProfile] Specifies the storage settings for the virtual
29
+ # machine disks.
30
+ attr_accessor :storage_profile
31
+
32
+ # @return [OSProfile] Specifies the operating system settings for the
33
+ # virtual machine.
34
+ attr_accessor :os_profile
35
+
36
+ # @return [NetworkProfile] Specifies the network interfaces of the
37
+ # virtual machine.
38
+ attr_accessor :network_profile
39
+
40
+ # @return [DiagnosticsProfile] Specifies the boot diagnostic settings
41
+ # state. <br><br>Minimum api-version: 2015-06-15.
42
+ attr_accessor :diagnostics_profile
43
+
44
+ # @return [SubResource] Specifies information about the availability set
45
+ # that the virtual machine should be assigned to. Virtual machines
46
+ # specified in the same availability set are allocated to different nodes
47
+ # to maximize availability. For more information about availability sets,
48
+ # see [Manage the availability of virtual
49
+ # machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
50
+ # <br><br> For more information on Azure planned maintainance, see
51
+ # [Planned maintenance for virtual machines in
52
+ # Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
53
+ # <br><br> Currently, a VM can only be added to availability set at
54
+ # creation time. An existing VM cannot be added to an availability set.
55
+ attr_accessor :availability_set
56
+
57
+ # @return [String] The provisioning state, which only appears in the
58
+ # response.
59
+ attr_accessor :provisioning_state
60
+
61
+ # @return [VirtualMachineInstanceView] The virtual machine instance view.
62
+ attr_accessor :instance_view
63
+
64
+ # @return [String] Specifies that the image or disk that is being used
65
+ # was licensed on-premises. This element is only used for images that
66
+ # contain the Windows Server operating system. <br><br> Possible values
67
+ # are: <br><br> Windows_Client <br><br> Windows_Server <br><br> If this
68
+ # element is included in a request for an update, the value must match
69
+ # the initial value. This value cannot be updated. <br><br> For more
70
+ # information, see [Azure Hybrid Use Benefit for Windows
71
+ # Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
72
+ # <br><br> Minimum api-version: 2015-06-15
73
+ attr_accessor :license_type
74
+
75
+ # @return [String] Specifies the VM unique ID which is a 128-bits
76
+ # identifier that is encoded and stored in all Azure IaaS VMs SMBIOS and
77
+ # can be read using platform BIOS commands.
78
+ attr_accessor :vm_id
79
+
80
+ # @return [VirtualMachineIdentity] The identity of the virtual machine,
81
+ # if configured.
82
+ attr_accessor :identity
83
+
84
+ # @return [Array<String>] The virtual machine zones.
85
+ attr_accessor :zones
86
+
87
+
88
+ #
89
+ # Mapper for VirtualMachineUpdate class as Ruby Hash.
90
+ # This will be used for serialization/deserialization.
91
+ #
92
+ def self.mapper()
93
+ {
94
+ client_side_validation: true,
95
+ required: false,
96
+ serialized_name: 'VirtualMachineUpdate',
97
+ type: {
98
+ name: 'Composite',
99
+ class_name: 'VirtualMachineUpdate',
100
+ model_properties: {
101
+ tags: {
102
+ client_side_validation: true,
103
+ required: false,
104
+ serialized_name: 'tags',
105
+ type: {
106
+ name: 'Dictionary',
107
+ value: {
108
+ client_side_validation: true,
109
+ required: false,
110
+ serialized_name: 'StringElementType',
111
+ type: {
112
+ name: 'String'
113
+ }
114
+ }
115
+ }
116
+ },
117
+ plan: {
118
+ client_side_validation: true,
119
+ required: false,
120
+ serialized_name: 'plan',
121
+ type: {
122
+ name: 'Composite',
123
+ class_name: 'Plan'
124
+ }
125
+ },
126
+ hardware_profile: {
127
+ client_side_validation: true,
128
+ required: false,
129
+ serialized_name: 'properties.hardwareProfile',
130
+ type: {
131
+ name: 'Composite',
132
+ class_name: 'HardwareProfile'
133
+ }
134
+ },
135
+ storage_profile: {
136
+ client_side_validation: true,
137
+ required: false,
138
+ serialized_name: 'properties.storageProfile',
139
+ type: {
140
+ name: 'Composite',
141
+ class_name: 'StorageProfile'
142
+ }
143
+ },
144
+ os_profile: {
145
+ client_side_validation: true,
146
+ required: false,
147
+ serialized_name: 'properties.osProfile',
148
+ type: {
149
+ name: 'Composite',
150
+ class_name: 'OSProfile'
151
+ }
152
+ },
153
+ network_profile: {
154
+ client_side_validation: true,
155
+ required: false,
156
+ serialized_name: 'properties.networkProfile',
157
+ type: {
158
+ name: 'Composite',
159
+ class_name: 'NetworkProfile'
160
+ }
161
+ },
162
+ diagnostics_profile: {
163
+ client_side_validation: true,
164
+ required: false,
165
+ serialized_name: 'properties.diagnosticsProfile',
166
+ type: {
167
+ name: 'Composite',
168
+ class_name: 'DiagnosticsProfile'
169
+ }
170
+ },
171
+ availability_set: {
172
+ client_side_validation: true,
173
+ required: false,
174
+ serialized_name: 'properties.availabilitySet',
175
+ type: {
176
+ name: 'Composite',
177
+ class_name: 'SubResource'
178
+ }
179
+ },
180
+ provisioning_state: {
181
+ client_side_validation: true,
182
+ required: false,
183
+ read_only: true,
184
+ serialized_name: 'properties.provisioningState',
185
+ type: {
186
+ name: 'String'
187
+ }
188
+ },
189
+ instance_view: {
190
+ client_side_validation: true,
191
+ required: false,
192
+ read_only: true,
193
+ serialized_name: 'properties.instanceView',
194
+ type: {
195
+ name: 'Composite',
196
+ class_name: 'VirtualMachineInstanceView'
197
+ }
198
+ },
199
+ license_type: {
200
+ client_side_validation: true,
201
+ required: false,
202
+ serialized_name: 'properties.licenseType',
203
+ type: {
204
+ name: 'String'
205
+ }
206
+ },
207
+ vm_id: {
208
+ client_side_validation: true,
209
+ required: false,
210
+ read_only: true,
211
+ serialized_name: 'properties.vmId',
212
+ type: {
213
+ name: 'String'
214
+ }
215
+ },
216
+ identity: {
217
+ client_side_validation: true,
218
+ required: false,
219
+ serialized_name: 'identity',
220
+ type: {
221
+ name: 'Composite',
222
+ class_name: 'VirtualMachineIdentity'
223
+ }
224
+ },
225
+ zones: {
226
+ client_side_validation: true,
227
+ required: false,
228
+ serialized_name: 'zones',
229
+ type: {
230
+ name: 'Sequence',
231
+ element: {
232
+ client_side_validation: true,
233
+ required: false,
234
+ serialized_name: 'StringElementType',
235
+ type: {
236
+ name: 'String'
237
+ }
238
+ }
239
+ }
240
+ }
241
+ }
242
+ }
243
+ }
244
+ end
245
+ end
246
+ end
247
+ end
@@ -0,0 +1,107 @@
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::Compute::Mgmt::V2017_12_01
7
+ #
8
+ # Compute Client
9
+ #
10
+ class Operations
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Operations class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [ComputeManagementClient] reference to the ComputeManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Gets a list of compute operations.
26
+ #
27
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
28
+ # will be added to the HTTP request.
29
+ #
30
+ # @return [ComputeOperationListResult] operation results.
31
+ #
32
+ def list(custom_headers:nil)
33
+ response = list_async(custom_headers:custom_headers).value!
34
+ response.body unless response.nil?
35
+ end
36
+
37
+ #
38
+ # Gets a list of compute operations.
39
+ #
40
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
41
+ # will be added to the HTTP request.
42
+ #
43
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
44
+ #
45
+ def list_with_http_info(custom_headers:nil)
46
+ list_async(custom_headers:custom_headers).value!
47
+ end
48
+
49
+ #
50
+ # Gets a list of compute operations.
51
+ #
52
+ # @param [Hash{String => String}] A hash of custom headers that will be added
53
+ # to the HTTP request.
54
+ #
55
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
56
+ #
57
+ def list_async(custom_headers:nil)
58
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
59
+
60
+
61
+ request_headers = {}
62
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
63
+
64
+ # Set Headers
65
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
66
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
67
+ path_template = 'providers/Microsoft.Compute/operations'
68
+
69
+ request_url = @base_url || @client.base_url
70
+
71
+ options = {
72
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
73
+ query_params: {'api-version' => @client.api_version},
74
+ headers: request_headers.merge(custom_headers || {}),
75
+ base_url: request_url
76
+ }
77
+ promise = @client.make_request_async(:get, path_template, options)
78
+
79
+ promise = promise.then do |result|
80
+ http_response = result.response
81
+ status_code = http_response.status
82
+ response_content = http_response.body
83
+ unless status_code == 200
84
+ error_model = JSON.load(response_content)
85
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
86
+ end
87
+
88
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
89
+ # Deserialize Response
90
+ if status_code == 200
91
+ begin
92
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
93
+ result_mapper = Azure::Compute::Mgmt::V2017_12_01::Models::ComputeOperationListResult.mapper()
94
+ result.body = @client.deserialize(result_mapper, parsed_response)
95
+ rescue Exception => e
96
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
97
+ end
98
+ end
99
+
100
+ result
101
+ end
102
+
103
+ promise.execute
104
+ end
105
+
106
+ end
107
+ end