azure_mgmt_azurestack 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 (43) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/lib/2017-06-01/generated/azure_mgmt_azurestack.rb +58 -0
  4. data/lib/2017-06-01/generated/azure_mgmt_azurestack/azure_stack_management_client.rb +145 -0
  5. data/lib/2017-06-01/generated/azure_mgmt_azurestack/customer_subscriptions.rb +528 -0
  6. data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/activation_key_result.rb +46 -0
  7. data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/compute_role.rb +17 -0
  8. data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/customer_subscription.rb +81 -0
  9. data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/customer_subscription_list.rb +98 -0
  10. data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/data_disk_image.rb +59 -0
  11. data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/display.rb +86 -0
  12. data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/error_details.rb +71 -0
  13. data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/error_response.rb +48 -0
  14. data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/extended_product.rb +184 -0
  15. data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/icon_uris.rb +90 -0
  16. data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/location.rb +15 -0
  17. data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/operating_system.rb +17 -0
  18. data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/operation.rb +71 -0
  19. data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/operation_list.rb +98 -0
  20. data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/os_disk_image.rb +60 -0
  21. data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/product.rb +271 -0
  22. data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/product_link.rb +57 -0
  23. data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/product_list.rb +98 -0
  24. data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/product_properties.rb +46 -0
  25. data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/provisioning_state.rb +18 -0
  26. data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/registration.rb +131 -0
  27. data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/registration_list.rb +98 -0
  28. data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/registration_parameter.rb +58 -0
  29. data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/resource.rb +92 -0
  30. data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/tracked_resource.rb +115 -0
  31. data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/virtual_machine_extension_product_properties.rb +123 -0
  32. data/lib/2017-06-01/generated/azure_mgmt_azurestack/models/virtual_machine_product_properties.rb +81 -0
  33. data/lib/2017-06-01/generated/azure_mgmt_azurestack/module_definition.rb +9 -0
  34. data/lib/2017-06-01/generated/azure_mgmt_azurestack/operations.rb +218 -0
  35. data/lib/2017-06-01/generated/azure_mgmt_azurestack/products.rb +426 -0
  36. data/lib/2017-06-01/generated/azure_mgmt_azurestack/registrations.rb +717 -0
  37. data/lib/azure_mgmt_azurestack.rb +6 -0
  38. data/lib/module_definition.rb +7 -0
  39. data/lib/profiles/latest/azurestack_latest_profile_client.rb +40 -0
  40. data/lib/profiles/latest/azurestack_module_definition.rb +8 -0
  41. data/lib/profiles/latest/modules/azurestack_profile_module.rb +175 -0
  42. data/lib/version.rb +7 -0
  43. metadata +158 -0
@@ -0,0 +1,115 @@
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
+ # Base resource object.
10
+ #
11
+ class TrackedResource
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] ID of the resource.
16
+ attr_accessor :id
17
+
18
+ # @return [String] Name of the resource.
19
+ attr_accessor :name
20
+
21
+ # @return [String] Type of Resource.
22
+ attr_accessor :type
23
+
24
+ # @return [String] Location of the resource. Default value: 'global' .
25
+ attr_accessor :location
26
+
27
+ # @return [Hash{String => String}] Custom tags for the resource.
28
+ attr_accessor :tags
29
+
30
+ # @return [String] The entity tag used for optimistic concurrency when
31
+ # modifying the resource.
32
+ attr_accessor :etag
33
+
34
+
35
+ #
36
+ # Mapper for TrackedResource class as Ruby Hash.
37
+ # This will be used for serialization/deserialization.
38
+ #
39
+ def self.mapper()
40
+ {
41
+ client_side_validation: true,
42
+ required: false,
43
+ serialized_name: 'TrackedResource',
44
+ type: {
45
+ name: 'Composite',
46
+ class_name: 'TrackedResource',
47
+ model_properties: {
48
+ id: {
49
+ client_side_validation: true,
50
+ required: false,
51
+ read_only: true,
52
+ serialized_name: 'id',
53
+ type: {
54
+ name: 'String'
55
+ }
56
+ },
57
+ name: {
58
+ client_side_validation: true,
59
+ required: false,
60
+ read_only: true,
61
+ serialized_name: 'name',
62
+ type: {
63
+ name: 'String'
64
+ }
65
+ },
66
+ type: {
67
+ client_side_validation: true,
68
+ required: false,
69
+ read_only: true,
70
+ serialized_name: 'type',
71
+ type: {
72
+ name: 'String'
73
+ }
74
+ },
75
+ location: {
76
+ client_side_validation: true,
77
+ required: true,
78
+ is_constant: true,
79
+ serialized_name: 'location',
80
+ default_value: 'global',
81
+ type: {
82
+ name: 'String'
83
+ }
84
+ },
85
+ tags: {
86
+ client_side_validation: true,
87
+ required: false,
88
+ serialized_name: 'tags',
89
+ type: {
90
+ name: 'Dictionary',
91
+ value: {
92
+ client_side_validation: true,
93
+ required: false,
94
+ serialized_name: 'StringElementType',
95
+ type: {
96
+ name: 'String'
97
+ }
98
+ }
99
+ }
100
+ },
101
+ etag: {
102
+ client_side_validation: true,
103
+ required: false,
104
+ serialized_name: 'etag',
105
+ type: {
106
+ name: 'String'
107
+ }
108
+ }
109
+ }
110
+ }
111
+ }
112
+ end
113
+ end
114
+ end
115
+ end
@@ -0,0 +1,123 @@
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 information.
10
+ #
11
+ class VirtualMachineExtensionProductProperties
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [ComputeRole] Specifies kind of compute role included in the
16
+ # package. Possible values include: 'None', 'IaaS', 'PaaS'
17
+ attr_accessor :compute_role
18
+
19
+ # @return [Boolean] Specifies if product is a Virtual Machine Extension.
20
+ attr_accessor :is_system_extension
21
+
22
+ # @return [String] The URI.
23
+ attr_accessor :uri
24
+
25
+ # @return [Boolean] Indicates if specified product supports multiple
26
+ # extensions.
27
+ attr_accessor :support_multiple_extensions
28
+
29
+ # @return [String] Specifies product version.
30
+ attr_accessor :version
31
+
32
+ # @return [OperatingSystem] Specifies operating system used by the
33
+ # product. Possible values include: 'None', 'Windows', 'Linux'
34
+ attr_accessor :vm_os_type
35
+
36
+ # @return [Boolean] Indicates if virtual machine Scale Set is enabled in
37
+ # the specified product.
38
+ attr_accessor :vm_scale_set_enabled
39
+
40
+
41
+ #
42
+ # Mapper for VirtualMachineExtensionProductProperties class as Ruby Hash.
43
+ # This will be used for serialization/deserialization.
44
+ #
45
+ def self.mapper()
46
+ {
47
+ client_side_validation: true,
48
+ required: false,
49
+ serialized_name: 'VirtualMachineExtensionProductProperties',
50
+ type: {
51
+ name: 'Composite',
52
+ class_name: 'VirtualMachineExtensionProductProperties',
53
+ model_properties: {
54
+ compute_role: {
55
+ client_side_validation: true,
56
+ required: false,
57
+ read_only: true,
58
+ serialized_name: 'computeRole',
59
+ type: {
60
+ name: 'String'
61
+ }
62
+ },
63
+ is_system_extension: {
64
+ client_side_validation: true,
65
+ required: false,
66
+ read_only: true,
67
+ serialized_name: 'isSystemExtension',
68
+ type: {
69
+ name: 'Boolean'
70
+ }
71
+ },
72
+ uri: {
73
+ client_side_validation: true,
74
+ required: false,
75
+ read_only: true,
76
+ serialized_name: 'sourceBlob.uri',
77
+ type: {
78
+ name: 'String'
79
+ }
80
+ },
81
+ support_multiple_extensions: {
82
+ client_side_validation: true,
83
+ required: false,
84
+ read_only: true,
85
+ serialized_name: 'supportMultipleExtensions',
86
+ type: {
87
+ name: 'Boolean'
88
+ }
89
+ },
90
+ version: {
91
+ client_side_validation: true,
92
+ required: false,
93
+ read_only: true,
94
+ serialized_name: 'version',
95
+ type: {
96
+ name: 'String'
97
+ }
98
+ },
99
+ vm_os_type: {
100
+ client_side_validation: true,
101
+ required: false,
102
+ read_only: true,
103
+ serialized_name: 'vmOsType',
104
+ type: {
105
+ name: 'String'
106
+ }
107
+ },
108
+ vm_scale_set_enabled: {
109
+ client_side_validation: true,
110
+ required: false,
111
+ read_only: true,
112
+ serialized_name: 'vmScaleSetEnabled',
113
+ type: {
114
+ name: 'Boolean'
115
+ }
116
+ }
117
+ }
118
+ }
119
+ }
120
+ end
121
+ end
122
+ end
123
+ end
@@ -0,0 +1,81 @@
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 information.
10
+ #
11
+ class VirtualMachineProductProperties
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Specifies product version.
16
+ attr_accessor :version
17
+
18
+ # @return [OsDiskImage] OS disk image used by product.
19
+ attr_accessor :os_disk_image
20
+
21
+ # @return [Array<DataDiskImage>] List of attached data disks.
22
+ attr_accessor :data_disk_images
23
+
24
+
25
+ #
26
+ # Mapper for VirtualMachineProductProperties class as Ruby Hash.
27
+ # This will be used for serialization/deserialization.
28
+ #
29
+ def self.mapper()
30
+ {
31
+ client_side_validation: true,
32
+ required: false,
33
+ serialized_name: 'VirtualMachineProductProperties',
34
+ type: {
35
+ name: 'Composite',
36
+ class_name: 'VirtualMachineProductProperties',
37
+ model_properties: {
38
+ version: {
39
+ client_side_validation: true,
40
+ required: false,
41
+ read_only: true,
42
+ serialized_name: 'version',
43
+ type: {
44
+ name: 'String'
45
+ }
46
+ },
47
+ os_disk_image: {
48
+ client_side_validation: true,
49
+ required: false,
50
+ read_only: true,
51
+ serialized_name: 'osDiskImage',
52
+ type: {
53
+ name: 'Composite',
54
+ class_name: 'OsDiskImage'
55
+ }
56
+ },
57
+ data_disk_images: {
58
+ client_side_validation: true,
59
+ required: false,
60
+ read_only: true,
61
+ serialized_name: 'dataDiskImages',
62
+ type: {
63
+ name: 'Sequence',
64
+ element: {
65
+ client_side_validation: true,
66
+ required: false,
67
+ serialized_name: 'DataDiskImageElementType',
68
+ type: {
69
+ name: 'Composite',
70
+ class_name: 'DataDiskImage'
71
+ }
72
+ }
73
+ }
74
+ }
75
+ }
76
+ }
77
+ }
78
+ end
79
+ end
80
+ end
81
+ end
@@ -0,0 +1,9 @@
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 end
7
+ module Azure::AzureStack end
8
+ module Azure::AzureStack::Mgmt end
9
+ module Azure::AzureStack::Mgmt::V2017_06_01 end
@@ -0,0 +1,218 @@
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
+ #
8
+ # Azure Stack
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 [AzureStackManagementClient] reference to the AzureStackManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Returns the list of supported REST 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 [Array<Operation>] operation results.
31
+ #
32
+ def list(custom_headers:nil)
33
+ first_page = list_as_lazy(custom_headers:custom_headers)
34
+ first_page.get_all_items
35
+ end
36
+
37
+ #
38
+ # Returns the list of supported REST 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
+ # Returns the list of supported REST 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.AzureStack/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
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
90
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
91
+ # Deserialize Response
92
+ if status_code == 200
93
+ begin
94
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
95
+ result_mapper = Azure::AzureStack::Mgmt::V2017_06_01::Models::OperationList.mapper()
96
+ result.body = @client.deserialize(result_mapper, parsed_response)
97
+ rescue Exception => e
98
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
99
+ end
100
+ end
101
+
102
+ result
103
+ end
104
+
105
+ promise.execute
106
+ end
107
+
108
+ #
109
+ # Returns the list of supported REST operations.
110
+ #
111
+ # @param next_page_link [String] The NextLink from the previous successful call
112
+ # to List operation.
113
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
114
+ # will be added to the HTTP request.
115
+ #
116
+ # @return [OperationList] operation results.
117
+ #
118
+ def list_next(next_page_link, custom_headers:nil)
119
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
120
+ response.body unless response.nil?
121
+ end
122
+
123
+ #
124
+ # Returns the list of supported REST operations.
125
+ #
126
+ # @param next_page_link [String] The NextLink from the previous successful call
127
+ # to List operation.
128
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
129
+ # will be added to the HTTP request.
130
+ #
131
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
132
+ #
133
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
134
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
135
+ end
136
+
137
+ #
138
+ # Returns the list of supported REST operations.
139
+ #
140
+ # @param next_page_link [String] The NextLink from the previous successful call
141
+ # to List operation.
142
+ # @param [Hash{String => String}] A hash of custom headers that will be added
143
+ # to the HTTP request.
144
+ #
145
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
146
+ #
147
+ def list_next_async(next_page_link, custom_headers:nil)
148
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
149
+
150
+
151
+ request_headers = {}
152
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
153
+
154
+ # Set Headers
155
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
156
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
157
+ path_template = '{nextLink}'
158
+
159
+ request_url = @base_url || @client.base_url
160
+
161
+ options = {
162
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
163
+ skip_encoding_path_params: {'nextLink' => next_page_link},
164
+ headers: request_headers.merge(custom_headers || {}),
165
+ base_url: request_url
166
+ }
167
+ promise = @client.make_request_async(:get, path_template, options)
168
+
169
+ promise = promise.then do |result|
170
+ http_response = result.response
171
+ status_code = http_response.status
172
+ response_content = http_response.body
173
+ unless status_code == 200
174
+ error_model = JSON.load(response_content)
175
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
176
+ end
177
+
178
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
179
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
180
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
181
+ # Deserialize Response
182
+ if status_code == 200
183
+ begin
184
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
185
+ result_mapper = Azure::AzureStack::Mgmt::V2017_06_01::Models::OperationList.mapper()
186
+ result.body = @client.deserialize(result_mapper, parsed_response)
187
+ rescue Exception => e
188
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
189
+ end
190
+ end
191
+
192
+ result
193
+ end
194
+
195
+ promise.execute
196
+ end
197
+
198
+ #
199
+ # Returns the list of supported REST operations.
200
+ #
201
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
202
+ # will be added to the HTTP request.
203
+ #
204
+ # @return [OperationList] which provide lazy access to pages of the response.
205
+ #
206
+ def list_as_lazy(custom_headers:nil)
207
+ response = list_async(custom_headers:custom_headers).value!
208
+ unless response.nil?
209
+ page = response.body
210
+ page.next_method = Proc.new do |next_page_link|
211
+ list_next_async(next_page_link, custom_headers:custom_headers)
212
+ end
213
+ page
214
+ end
215
+ end
216
+
217
+ end
218
+ end