azure_mgmt_service_fabric 0.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/lib/azure_mgmt_service_fabric.rb +7 -0
  4. data/lib/generated/azure_mgmt_service_fabric/cluster_versions.rb +737 -0
  5. data/lib/generated/azure_mgmt_service_fabric/clusters.rb +907 -0
  6. data/lib/generated/azure_mgmt_service_fabric/models/available_operation_display.rb +74 -0
  7. data/lib/generated/azure_mgmt_service_fabric/models/azure_active_directory.rb +64 -0
  8. data/lib/generated/azure_mgmt_service_fabric/models/certificate_description.rb +66 -0
  9. data/lib/generated/azure_mgmt_service_fabric/models/client_certificate_common_name.rb +66 -0
  10. data/lib/generated/azure_mgmt_service_fabric/models/client_certificate_thumbprint.rb +55 -0
  11. data/lib/generated/azure_mgmt_service_fabric/models/cluster.rb +343 -0
  12. data/lib/generated/azure_mgmt_service_fabric/models/cluster_code_versions_list_result.rb +94 -0
  13. data/lib/generated/azure_mgmt_service_fabric/models/cluster_code_versions_result.rb +95 -0
  14. data/lib/generated/azure_mgmt_service_fabric/models/cluster_health_policy.rb +67 -0
  15. data/lib/generated/azure_mgmt_service_fabric/models/cluster_list_result.rb +94 -0
  16. data/lib/generated/azure_mgmt_service_fabric/models/cluster_update_parameters.rb +204 -0
  17. data/lib/generated/azure_mgmt_service_fabric/models/cluster_upgrade_delta_health_policy.rb +77 -0
  18. data/lib/generated/azure_mgmt_service_fabric/models/cluster_upgrade_policy.rb +141 -0
  19. data/lib/generated/azure_mgmt_service_fabric/models/cluster_version_details.rb +65 -0
  20. data/lib/generated/azure_mgmt_service_fabric/models/diagnostics_storage_account_config.rb +84 -0
  21. data/lib/generated/azure_mgmt_service_fabric/models/endpoint_range_description.rb +54 -0
  22. data/lib/generated/azure_mgmt_service_fabric/models/error_model.rb +45 -0
  23. data/lib/generated/azure_mgmt_service_fabric/models/error_model_error.rb +54 -0
  24. data/lib/generated/azure_mgmt_service_fabric/models/node_type_description.rb +170 -0
  25. data/lib/generated/azure_mgmt_service_fabric/models/operation_list_result.rb +99 -0
  26. data/lib/generated/azure_mgmt_service_fabric/models/operation_result.rb +75 -0
  27. data/lib/generated/azure_mgmt_service_fabric/models/provisioning_state.rb +18 -0
  28. data/lib/generated/azure_mgmt_service_fabric/models/resource.rb +94 -0
  29. data/lib/generated/azure_mgmt_service_fabric/models/settings_parameter_description.rb +54 -0
  30. data/lib/generated/azure_mgmt_service_fabric/models/settings_section_description.rb +64 -0
  31. data/lib/generated/azure_mgmt_service_fabric/module_definition.rb +8 -0
  32. data/lib/generated/azure_mgmt_service_fabric/operations.rb +213 -0
  33. data/lib/generated/azure_mgmt_service_fabric/service_fabric_management_client.rb +137 -0
  34. data/lib/generated/azure_mgmt_service_fabric/version.rb +8 -0
  35. data/lib/generated/azure_mgmt_service_fabric.rb +55 -0
  36. metadata +147 -0
@@ -0,0 +1,99 @@
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::ARM::ServiceFabric
7
+ module Models
8
+ #
9
+ # Result of the request to list ServiceFabric operations. It contains a
10
+ # list of operations and a URL link to get the next set of results.
11
+ #
12
+ class OperationListResult
13
+
14
+ include MsRestAzure
15
+
16
+ include MsRest::JSONable
17
+ # @return [Array<OperationResult>] List of ServiceFabric operations
18
+ # supported by the Microsoft.ServiceFabric resource provider.
19
+ attr_accessor :value
20
+
21
+ # @return [String] URL to get the next set of operation list results if
22
+ # there are any.
23
+ attr_accessor :next_link
24
+
25
+ # return [Proc] with next page method call.
26
+ attr_accessor :next_method
27
+
28
+ #
29
+ # Gets the rest of the items for the request, enabling auto-pagination.
30
+ #
31
+ # @return [Array<OperationResult>] operation results.
32
+ #
33
+ def get_all_items
34
+ items = @value
35
+ page = self
36
+ while page.next_link != nil do
37
+ page = page.get_next_page
38
+ items.concat(page.value)
39
+ end
40
+ items
41
+ end
42
+
43
+ #
44
+ # Gets the next page of results.
45
+ #
46
+ # @return [OperationListResult] with next page content.
47
+ #
48
+ def get_next_page
49
+ response = @next_method.call(@next_link).value! unless @next_method.nil?
50
+ unless response.nil?
51
+ @next_link = response.body.next_link
52
+ @value = response.body.value
53
+ self
54
+ end
55
+ end
56
+
57
+ #
58
+ # Mapper for OperationListResult class as Ruby Hash.
59
+ # This will be used for serialization/deserialization.
60
+ #
61
+ def self.mapper()
62
+ {
63
+ required: false,
64
+ serialized_name: 'OperationListResult',
65
+ type: {
66
+ name: 'Composite',
67
+ class_name: 'OperationListResult',
68
+ model_properties: {
69
+ value: {
70
+ required: false,
71
+ read_only: true,
72
+ serialized_name: 'value',
73
+ type: {
74
+ name: 'Sequence',
75
+ element: {
76
+ required: false,
77
+ serialized_name: 'OperationResultElementType',
78
+ type: {
79
+ name: 'Composite',
80
+ class_name: 'OperationResult'
81
+ }
82
+ }
83
+ }
84
+ },
85
+ next_link: {
86
+ required: false,
87
+ read_only: true,
88
+ serialized_name: 'nextLink',
89
+ type: {
90
+ name: 'String'
91
+ }
92
+ }
93
+ }
94
+ }
95
+ }
96
+ end
97
+ end
98
+ end
99
+ end
@@ -0,0 +1,75 @@
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::ARM::ServiceFabric
7
+ module Models
8
+ #
9
+ # Available operation list result
10
+ #
11
+ class OperationResult
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Result name
16
+ attr_accessor :name
17
+
18
+ # @return [AvailableOperationDisplay] Dispaly of the result
19
+ attr_accessor :display
20
+
21
+ # @return [String] Origin result
22
+ attr_accessor :origin
23
+
24
+ # @return [String] The URL to use for getting the next set of results.
25
+ attr_accessor :next_link
26
+
27
+
28
+ #
29
+ # Mapper for OperationResult class as Ruby Hash.
30
+ # This will be used for serialization/deserialization.
31
+ #
32
+ def self.mapper()
33
+ {
34
+ required: false,
35
+ serialized_name: 'OperationResult',
36
+ type: {
37
+ name: 'Composite',
38
+ class_name: 'OperationResult',
39
+ model_properties: {
40
+ name: {
41
+ required: false,
42
+ serialized_name: 'name',
43
+ type: {
44
+ name: 'String'
45
+ }
46
+ },
47
+ display: {
48
+ required: false,
49
+ serialized_name: 'display',
50
+ type: {
51
+ name: 'Composite',
52
+ class_name: 'AvailableOperationDisplay'
53
+ }
54
+ },
55
+ origin: {
56
+ required: false,
57
+ serialized_name: 'origin',
58
+ type: {
59
+ name: 'String'
60
+ }
61
+ },
62
+ next_link: {
63
+ required: false,
64
+ serialized_name: 'nextLink',
65
+ type: {
66
+ name: 'String'
67
+ }
68
+ }
69
+ }
70
+ }
71
+ }
72
+ end
73
+ end
74
+ end
75
+ end
@@ -0,0 +1,18 @@
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::ARM::ServiceFabric
7
+ module Models
8
+ #
9
+ # Defines values for ProvisioningState
10
+ #
11
+ module ProvisioningState
12
+ Updating = "Updating"
13
+ Succeeded = "Succeeded"
14
+ Failed = "Failed"
15
+ Canceled = "Canceled"
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,94 @@
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::ARM::ServiceFabric
7
+ module Models
8
+ #
9
+ # The resource model definition.
10
+ #
11
+ class Resource
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Resource ID.
16
+ attr_accessor :id
17
+
18
+ # @return [String] Resource name.
19
+ attr_accessor :name
20
+
21
+ # @return [String] Resource type.
22
+ attr_accessor :type
23
+
24
+ # @return [String] Resource location.
25
+ attr_accessor :location
26
+
27
+ # @return [Hash{String => String}] Resource tags.
28
+ attr_accessor :tags
29
+
30
+
31
+ #
32
+ # Mapper for Resource class as Ruby Hash.
33
+ # This will be used for serialization/deserialization.
34
+ #
35
+ def self.mapper()
36
+ {
37
+ required: false,
38
+ serialized_name: 'Resource',
39
+ type: {
40
+ name: 'Composite',
41
+ class_name: 'Resource',
42
+ model_properties: {
43
+ id: {
44
+ required: false,
45
+ read_only: true,
46
+ serialized_name: 'id',
47
+ type: {
48
+ name: 'String'
49
+ }
50
+ },
51
+ name: {
52
+ required: false,
53
+ read_only: true,
54
+ serialized_name: 'name',
55
+ type: {
56
+ name: 'String'
57
+ }
58
+ },
59
+ type: {
60
+ required: false,
61
+ read_only: true,
62
+ serialized_name: 'type',
63
+ type: {
64
+ name: 'String'
65
+ }
66
+ },
67
+ location: {
68
+ required: true,
69
+ serialized_name: 'location',
70
+ type: {
71
+ name: 'String'
72
+ }
73
+ },
74
+ tags: {
75
+ required: false,
76
+ serialized_name: 'tags',
77
+ type: {
78
+ name: 'Dictionary',
79
+ value: {
80
+ required: false,
81
+ serialized_name: 'StringElementType',
82
+ type: {
83
+ name: 'String'
84
+ }
85
+ }
86
+ }
87
+ }
88
+ }
89
+ }
90
+ }
91
+ end
92
+ end
93
+ end
94
+ end
@@ -0,0 +1,54 @@
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::ARM::ServiceFabric
7
+ module Models
8
+ #
9
+ # ServiceFabric settings under sections
10
+ #
11
+ class SettingsParameterDescription
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The name of settings property
16
+ attr_accessor :name
17
+
18
+ # @return [String] The value of the property
19
+ attr_accessor :value
20
+
21
+
22
+ #
23
+ # Mapper for SettingsParameterDescription class as Ruby Hash.
24
+ # This will be used for serialization/deserialization.
25
+ #
26
+ def self.mapper()
27
+ {
28
+ required: false,
29
+ serialized_name: 'SettingsParameterDescription',
30
+ type: {
31
+ name: 'Composite',
32
+ class_name: 'SettingsParameterDescription',
33
+ model_properties: {
34
+ name: {
35
+ required: true,
36
+ serialized_name: 'name',
37
+ type: {
38
+ name: 'String'
39
+ }
40
+ },
41
+ value: {
42
+ required: true,
43
+ serialized_name: 'value',
44
+ type: {
45
+ name: 'String'
46
+ }
47
+ }
48
+ }
49
+ }
50
+ }
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,64 @@
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::ARM::ServiceFabric
7
+ module Models
8
+ #
9
+ # ServiceFabric section settings
10
+ #
11
+ class SettingsSectionDescription
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The name of settings section
16
+ attr_accessor :name
17
+
18
+ # @return [Array<SettingsParameterDescription>] Collection of settings in
19
+ # the section, each setting is a tuple consisting of setting name and
20
+ # value
21
+ attr_accessor :parameters
22
+
23
+
24
+ #
25
+ # Mapper for SettingsSectionDescription class as Ruby Hash.
26
+ # This will be used for serialization/deserialization.
27
+ #
28
+ def self.mapper()
29
+ {
30
+ required: false,
31
+ serialized_name: 'SettingsSectionDescription',
32
+ type: {
33
+ name: 'Composite',
34
+ class_name: 'SettingsSectionDescription',
35
+ model_properties: {
36
+ name: {
37
+ required: true,
38
+ serialized_name: 'name',
39
+ type: {
40
+ name: 'String'
41
+ }
42
+ },
43
+ parameters: {
44
+ required: true,
45
+ serialized_name: 'parameters',
46
+ type: {
47
+ name: 'Sequence',
48
+ element: {
49
+ required: false,
50
+ serialized_name: 'SettingsParameterDescriptionElementType',
51
+ type: {
52
+ name: 'Composite',
53
+ class_name: 'SettingsParameterDescription'
54
+ }
55
+ }
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }
61
+ end
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,8 @@
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::ARM end
8
+ module Azure::ARM::ServiceFabric end
@@ -0,0 +1,213 @@
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::ARM::ServiceFabric
7
+ #
8
+ # Operations
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 [ServiceFabricManagementClient] reference to the ServiceFabricManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Lists all of the available ServiceFabric REST API 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<OperationResult>] operation results.
31
+ #
32
+ def list(custom_headers = nil)
33
+ first_page = list_as_lazy(custom_headers)
34
+ first_page.get_all_items
35
+ end
36
+
37
+ #
38
+ # Lists all of the available ServiceFabric REST API 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).value!
47
+ end
48
+
49
+ #
50
+ # Lists all of the available ServiceFabric REST API 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
+
63
+ # Set Headers
64
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
65
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
66
+ path_template = 'providers/Microsoft.ServiceFabric/operations'
67
+
68
+ request_url = @base_url || @client.base_url
69
+
70
+ options = {
71
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
72
+ query_params: {'api-version' => @client.api_version},
73
+ headers: request_headers.merge(custom_headers || {}),
74
+ base_url: request_url
75
+ }
76
+ promise = @client.make_request_async(:get, path_template, options)
77
+
78
+ promise = promise.then do |result|
79
+ http_response = result.response
80
+ status_code = http_response.status
81
+ response_content = http_response.body
82
+ unless status_code == 200
83
+ error_model = JSON.load(response_content)
84
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
85
+ end
86
+
87
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
88
+ # Deserialize Response
89
+ if status_code == 200
90
+ begin
91
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
92
+ result_mapper = Azure::ARM::ServiceFabric::Models::OperationListResult.mapper()
93
+ result.body = @client.deserialize(result_mapper, parsed_response)
94
+ rescue Exception => e
95
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
96
+ end
97
+ end
98
+
99
+ result
100
+ end
101
+
102
+ promise.execute
103
+ end
104
+
105
+ #
106
+ # Lists all of the available ServiceFabric REST API operations.
107
+ #
108
+ # @param next_page_link [String] The NextLink from the previous successful call
109
+ # to List operation.
110
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
111
+ # will be added to the HTTP request.
112
+ #
113
+ # @return [OperationListResult] operation results.
114
+ #
115
+ def list_next(next_page_link, custom_headers = nil)
116
+ response = list_next_async(next_page_link, custom_headers).value!
117
+ response.body unless response.nil?
118
+ end
119
+
120
+ #
121
+ # Lists all of the available ServiceFabric REST API operations.
122
+ #
123
+ # @param next_page_link [String] The NextLink from the previous successful call
124
+ # to List operation.
125
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
126
+ # will be added to the HTTP request.
127
+ #
128
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
129
+ #
130
+ def list_next_with_http_info(next_page_link, custom_headers = nil)
131
+ list_next_async(next_page_link, custom_headers).value!
132
+ end
133
+
134
+ #
135
+ # Lists all of the available ServiceFabric REST API operations.
136
+ #
137
+ # @param next_page_link [String] The NextLink from the previous successful call
138
+ # to List operation.
139
+ # @param [Hash{String => String}] A hash of custom headers that will be added
140
+ # to the HTTP request.
141
+ #
142
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
143
+ #
144
+ def list_next_async(next_page_link, custom_headers = nil)
145
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
146
+
147
+
148
+ request_headers = {}
149
+
150
+ # Set Headers
151
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
152
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
153
+ path_template = '{nextLink}'
154
+
155
+ request_url = @base_url || @client.base_url
156
+
157
+ options = {
158
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
159
+ skip_encoding_path_params: {'nextLink' => next_page_link},
160
+ headers: request_headers.merge(custom_headers || {}),
161
+ base_url: request_url
162
+ }
163
+ promise = @client.make_request_async(:get, path_template, options)
164
+
165
+ promise = promise.then do |result|
166
+ http_response = result.response
167
+ status_code = http_response.status
168
+ response_content = http_response.body
169
+ unless status_code == 200
170
+ error_model = JSON.load(response_content)
171
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
172
+ end
173
+
174
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
175
+ # Deserialize Response
176
+ if status_code == 200
177
+ begin
178
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
179
+ result_mapper = Azure::ARM::ServiceFabric::Models::OperationListResult.mapper()
180
+ result.body = @client.deserialize(result_mapper, parsed_response)
181
+ rescue Exception => e
182
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
183
+ end
184
+ end
185
+
186
+ result
187
+ end
188
+
189
+ promise.execute
190
+ end
191
+
192
+ #
193
+ # Lists all of the available ServiceFabric REST API operations.
194
+ #
195
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
196
+ # will be added to the HTTP request.
197
+ #
198
+ # @return [OperationListResult] which provide lazy access to pages of the
199
+ # response.
200
+ #
201
+ def list_as_lazy(custom_headers = nil)
202
+ response = list_async(custom_headers).value!
203
+ unless response.nil?
204
+ page = response.body
205
+ page.next_method = Proc.new do |next_page_link|
206
+ list_next_async(next_page_link, custom_headers)
207
+ end
208
+ page
209
+ end
210
+ end
211
+
212
+ end
213
+ end