azure_mgmt_mysql 0.17.1 → 0.17.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2017-12-01-preview/generated/azure_mgmt_mysql/my_sqlmanagement_client.rb +1 -1
  3. data/lib/2017-12-01/generated/azure_mgmt_mysql/my_sqlmanagement_client.rb +1 -1
  4. data/lib/2018-06-01/generated/azure_mgmt_mysql.rb +52 -0
  5. data/lib/2018-06-01/generated/azure_mgmt_mysql/advisors.rb +349 -0
  6. data/lib/2018-06-01/generated/azure_mgmt_mysql/location_based_recommended_action_sessions_operation_status.rb +124 -0
  7. data/lib/2018-06-01/generated/azure_mgmt_mysql/location_based_recommended_action_sessions_result.rb +256 -0
  8. data/lib/2018-06-01/generated/azure_mgmt_mysql/models/advisor.rb +73 -0
  9. data/lib/2018-06-01/generated/azure_mgmt_mysql/models/advisors_result_list.rb +100 -0
  10. data/lib/2018-06-01/generated/azure_mgmt_mysql/models/azure_entity_resource.rb +75 -0
  11. data/lib/2018-06-01/generated/azure_mgmt_mysql/models/error_additional_info.rb +59 -0
  12. data/lib/2018-06-01/generated/azure_mgmt_mysql/models/error_response.rb +113 -0
  13. data/lib/2018-06-01/generated/azure_mgmt_mysql/models/private_endpoint_connection.rb +100 -0
  14. data/lib/2018-06-01/generated/azure_mgmt_mysql/models/private_endpoint_connection_list_result.rb +100 -0
  15. data/lib/2018-06-01/generated/azure_mgmt_mysql/models/private_endpoint_property.rb +47 -0
  16. data/lib/2018-06-01/generated/azure_mgmt_mysql/models/private_link_resource.rb +76 -0
  17. data/lib/2018-06-01/generated/azure_mgmt_mysql/models/private_link_resource_list_result.rb +100 -0
  18. data/lib/2018-06-01/generated/azure_mgmt_mysql/models/private_link_resource_properties.rb +68 -0
  19. data/lib/2018-06-01/generated/azure_mgmt_mysql/models/private_link_service_connection_state_property.rb +72 -0
  20. data/lib/2018-06-01/generated/azure_mgmt_mysql/models/proxy_resource.rb +63 -0
  21. data/lib/2018-06-01/generated/azure_mgmt_mysql/models/recommendation_action.rb +158 -0
  22. data/lib/2018-06-01/generated/azure_mgmt_mysql/models/recommendation_actions_result_list.rb +101 -0
  23. data/lib/2018-06-01/generated/azure_mgmt_mysql/models/recommended_action_sessions_operation_status.rb +68 -0
  24. data/lib/2018-06-01/generated/azure_mgmt_mysql/models/resource.rb +83 -0
  25. data/lib/2018-06-01/generated/azure_mgmt_mysql/models/tags_object.rb +54 -0
  26. data/lib/2018-06-01/generated/azure_mgmt_mysql/models/tracked_resource.rb +92 -0
  27. data/lib/2018-06-01/generated/azure_mgmt_mysql/module_definition.rb +9 -0
  28. data/lib/2018-06-01/generated/azure_mgmt_mysql/my_sqlmanagement_client.rb +351 -0
  29. data/lib/2018-06-01/generated/azure_mgmt_mysql/private_endpoint_connections.rb +832 -0
  30. data/lib/2018-06-01/generated/azure_mgmt_mysql/private_link_resources.rb +349 -0
  31. data/lib/2018-06-01/generated/azure_mgmt_mysql/recommended_actions.rb +362 -0
  32. data/lib/2020-01-01/generated/azure_mgmt_mysql.rb +38 -0
  33. data/lib/2020-01-01/generated/azure_mgmt_mysql/models/azure_entity_resource.rb +75 -0
  34. data/lib/2020-01-01/generated/azure_mgmt_mysql/models/error_additional_info.rb +59 -0
  35. data/lib/2020-01-01/generated/azure_mgmt_mysql/models/error_response.rb +113 -0
  36. data/lib/2020-01-01/generated/azure_mgmt_mysql/models/proxy_resource.rb +63 -0
  37. data/lib/2020-01-01/generated/azure_mgmt_mysql/models/resource.rb +83 -0
  38. data/lib/2020-01-01/generated/azure_mgmt_mysql/models/server_key.rb +111 -0
  39. data/lib/2020-01-01/generated/azure_mgmt_mysql/models/server_key_list_result.rb +100 -0
  40. data/lib/2020-01-01/generated/azure_mgmt_mysql/models/server_upgrade_parameters.rb +47 -0
  41. data/lib/2020-01-01/generated/azure_mgmt_mysql/models/tracked_resource.rb +92 -0
  42. data/lib/2020-01-01/generated/azure_mgmt_mysql/module_definition.rb +9 -0
  43. data/lib/2020-01-01/generated/azure_mgmt_mysql/my_sqlmanagement_client.rb +135 -0
  44. data/lib/2020-01-01/generated/azure_mgmt_mysql/server_keys.rb +666 -0
  45. data/lib/2020-01-01/generated/azure_mgmt_mysql/servers.rb +439 -0
  46. data/lib/azure_mgmt_mysql.rb +3 -1
  47. data/lib/profiles/latest/modules/mysql_profile_module.rb +122 -12
  48. data/lib/version.rb +1 -1
  49. metadata +44 -2
@@ -0,0 +1,256 @@
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::Mysql::Mgmt::V2018_06_01
7
+ #
8
+ # The Microsoft Azure management API provides create, read, update, and
9
+ # delete functionality for Azure MySQL resources including servers,
10
+ # databases, firewall rules, VNET rules, security alert policies, log files
11
+ # and configurations with new business model.
12
+ #
13
+ class LocationBasedRecommendedActionSessionsResult
14
+ include MsRestAzure
15
+
16
+ #
17
+ # Creates and initializes a new instance of the LocationBasedRecommendedActionSessionsResult class.
18
+ # @param client service class for accessing basic functionality.
19
+ #
20
+ def initialize(client)
21
+ @client = client
22
+ end
23
+
24
+ # @return [MySQLManagementClient] reference to the MySQLManagementClient
25
+ attr_reader :client
26
+
27
+ #
28
+ # Recommendation action session operation result.
29
+ #
30
+ # @param location_name [String] The name of the location.
31
+ # @param operation_id [String] The operation identifier.
32
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
33
+ # will be added to the HTTP request.
34
+ #
35
+ # @return [Array<RecommendationAction>] operation results.
36
+ #
37
+ def list(location_name, operation_id, custom_headers:nil)
38
+ first_page = list_as_lazy(location_name, operation_id, custom_headers:custom_headers)
39
+ first_page.get_all_items
40
+ end
41
+
42
+ #
43
+ # Recommendation action session operation result.
44
+ #
45
+ # @param location_name [String] The name of the location.
46
+ # @param operation_id [String] The operation identifier.
47
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
48
+ # will be added to the HTTP request.
49
+ #
50
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
51
+ #
52
+ def list_with_http_info(location_name, operation_id, custom_headers:nil)
53
+ list_async(location_name, operation_id, custom_headers:custom_headers).value!
54
+ end
55
+
56
+ #
57
+ # Recommendation action session operation result.
58
+ #
59
+ # @param location_name [String] The name of the location.
60
+ # @param operation_id [String] The operation identifier.
61
+ # @param [Hash{String => String}] A hash of custom headers that will be added
62
+ # to the HTTP request.
63
+ #
64
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
65
+ #
66
+ def list_async(location_name, operation_id, custom_headers:nil)
67
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
68
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
69
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
70
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
71
+ fail ArgumentError, 'location_name is nil' if location_name.nil?
72
+ fail ArgumentError, 'operation_id is nil' if operation_id.nil?
73
+
74
+
75
+ request_headers = {}
76
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
77
+
78
+ # Set Headers
79
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
80
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
81
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/recommendedActionSessionsOperationResults/{operationId}'
82
+
83
+ request_url = @base_url || @client.base_url
84
+
85
+ options = {
86
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
87
+ path_params: {'subscriptionId' => @client.subscription_id,'locationName' => location_name,'operationId' => operation_id},
88
+ query_params: {'api-version' => @client.api_version},
89
+ headers: request_headers.merge(custom_headers || {}),
90
+ base_url: request_url
91
+ }
92
+ promise = @client.make_request_async(:get, path_template, options)
93
+
94
+ promise = promise.then do |result|
95
+ http_response = result.response
96
+ status_code = http_response.status
97
+ response_content = http_response.body
98
+ unless status_code == 200 || status_code == 201
99
+ error_model = JSON.load(response_content)
100
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
101
+ end
102
+
103
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
104
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
105
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
106
+ # Deserialize Response
107
+ if status_code == 200
108
+ begin
109
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
110
+ result_mapper = Azure::Mysql::Mgmt::V2018_06_01::Models::RecommendationActionsResultList.mapper()
111
+ result.body = @client.deserialize(result_mapper, parsed_response)
112
+ rescue Exception => e
113
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
114
+ end
115
+ end
116
+ # Deserialize Response
117
+ if status_code == 201
118
+ begin
119
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
120
+ result_mapper = Azure::Mysql::Mgmt::V2018_06_01::Models::RecommendationActionsResultList.mapper()
121
+ result.body = @client.deserialize(result_mapper, parsed_response)
122
+ rescue Exception => e
123
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
124
+ end
125
+ end
126
+
127
+ result
128
+ end
129
+
130
+ promise.execute
131
+ end
132
+
133
+ #
134
+ # Recommendation action session operation result.
135
+ #
136
+ # @param next_page_link [String] The NextLink from the previous successful call
137
+ # to List operation.
138
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
139
+ # will be added to the HTTP request.
140
+ #
141
+ # @return [RecommendationActionsResultList] operation results.
142
+ #
143
+ def list_next(next_page_link, custom_headers:nil)
144
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
145
+ response.body unless response.nil?
146
+ end
147
+
148
+ #
149
+ # Recommendation action session operation result.
150
+ #
151
+ # @param next_page_link [String] The NextLink from the previous successful call
152
+ # to List operation.
153
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
154
+ # will be added to the HTTP request.
155
+ #
156
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
157
+ #
158
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
159
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
160
+ end
161
+
162
+ #
163
+ # Recommendation action session operation result.
164
+ #
165
+ # @param next_page_link [String] The NextLink from the previous successful call
166
+ # to List operation.
167
+ # @param [Hash{String => String}] A hash of custom headers that will be added
168
+ # to the HTTP request.
169
+ #
170
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
171
+ #
172
+ def list_next_async(next_page_link, custom_headers:nil)
173
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
174
+
175
+
176
+ request_headers = {}
177
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
178
+
179
+ # Set Headers
180
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
181
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
182
+ path_template = '{nextLink}'
183
+
184
+ request_url = @base_url || @client.base_url
185
+
186
+ options = {
187
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
188
+ skip_encoding_path_params: {'nextLink' => next_page_link},
189
+ headers: request_headers.merge(custom_headers || {}),
190
+ base_url: request_url
191
+ }
192
+ promise = @client.make_request_async(:get, path_template, options)
193
+
194
+ promise = promise.then do |result|
195
+ http_response = result.response
196
+ status_code = http_response.status
197
+ response_content = http_response.body
198
+ unless status_code == 200 || status_code == 201
199
+ error_model = JSON.load(response_content)
200
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
201
+ end
202
+
203
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
204
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
205
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
206
+ # Deserialize Response
207
+ if status_code == 200
208
+ begin
209
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
210
+ result_mapper = Azure::Mysql::Mgmt::V2018_06_01::Models::RecommendationActionsResultList.mapper()
211
+ result.body = @client.deserialize(result_mapper, parsed_response)
212
+ rescue Exception => e
213
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
214
+ end
215
+ end
216
+ # Deserialize Response
217
+ if status_code == 201
218
+ begin
219
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
220
+ result_mapper = Azure::Mysql::Mgmt::V2018_06_01::Models::RecommendationActionsResultList.mapper()
221
+ result.body = @client.deserialize(result_mapper, parsed_response)
222
+ rescue Exception => e
223
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
224
+ end
225
+ end
226
+
227
+ result
228
+ end
229
+
230
+ promise.execute
231
+ end
232
+
233
+ #
234
+ # Recommendation action session operation result.
235
+ #
236
+ # @param location_name [String] The name of the location.
237
+ # @param operation_id [String] The operation identifier.
238
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
239
+ # will be added to the HTTP request.
240
+ #
241
+ # @return [RecommendationActionsResultList] which provide lazy access to pages
242
+ # of the response.
243
+ #
244
+ def list_as_lazy(location_name, operation_id, custom_headers:nil)
245
+ response = list_async(location_name, operation_id, custom_headers:custom_headers).value!
246
+ unless response.nil?
247
+ page = response.body
248
+ page.next_method = Proc.new do |next_page_link|
249
+ list_next_async(next_page_link, custom_headers:custom_headers)
250
+ end
251
+ page
252
+ end
253
+ end
254
+
255
+ end
256
+ end
@@ -0,0 +1,73 @@
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::Mysql::Mgmt::V2018_06_01
7
+ module Models
8
+ #
9
+ # Represents a recommendation action advisor.
10
+ #
11
+ class Advisor < ProxyResource
12
+
13
+ include MsRestAzure
14
+
15
+ # @return The properties of a recommendation action advisor.
16
+ attr_accessor :properties
17
+
18
+
19
+ #
20
+ # Mapper for Advisor class as Ruby Hash.
21
+ # This will be used for serialization/deserialization.
22
+ #
23
+ def self.mapper()
24
+ {
25
+ client_side_validation: true,
26
+ required: false,
27
+ serialized_name: 'Advisor',
28
+ type: {
29
+ name: 'Composite',
30
+ class_name: 'Advisor',
31
+ model_properties: {
32
+ id: {
33
+ client_side_validation: true,
34
+ required: false,
35
+ read_only: true,
36
+ serialized_name: 'id',
37
+ type: {
38
+ name: 'String'
39
+ }
40
+ },
41
+ name: {
42
+ client_side_validation: true,
43
+ required: false,
44
+ read_only: true,
45
+ serialized_name: 'name',
46
+ type: {
47
+ name: 'String'
48
+ }
49
+ },
50
+ type: {
51
+ client_side_validation: true,
52
+ required: false,
53
+ read_only: true,
54
+ serialized_name: 'type',
55
+ type: {
56
+ name: 'String'
57
+ }
58
+ },
59
+ properties: {
60
+ client_side_validation: true,
61
+ required: false,
62
+ serialized_name: 'properties',
63
+ type: {
64
+ name: 'Object'
65
+ }
66
+ }
67
+ }
68
+ }
69
+ }
70
+ end
71
+ end
72
+ end
73
+ end
@@ -0,0 +1,100 @@
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::Mysql::Mgmt::V2018_06_01
7
+ module Models
8
+ #
9
+ # A list of query statistics.
10
+ #
11
+ class AdvisorsResultList
12
+
13
+ include MsRestAzure
14
+
15
+ include MsRest::JSONable
16
+ # @return [Array<Advisor>] The list of recommendation action advisors.
17
+ attr_accessor :value
18
+
19
+ # @return [String] Link to retrieve next page of results.
20
+ attr_accessor :next_link
21
+
22
+ # return [Proc] with next page method call.
23
+ attr_accessor :next_method
24
+
25
+ #
26
+ # Gets the rest of the items for the request, enabling auto-pagination.
27
+ #
28
+ # @return [Array<Advisor>] operation results.
29
+ #
30
+ def get_all_items
31
+ items = @value
32
+ page = self
33
+ while page.next_link != nil && !page.next_link.strip.empty? do
34
+ page = page.get_next_page
35
+ items.concat(page.value)
36
+ end
37
+ items
38
+ end
39
+
40
+ #
41
+ # Gets the next page of results.
42
+ #
43
+ # @return [AdvisorsResultList] with next page content.
44
+ #
45
+ def get_next_page
46
+ response = @next_method.call(@next_link).value! unless @next_method.nil?
47
+ unless response.nil?
48
+ @next_link = response.body.next_link
49
+ @value = response.body.value
50
+ self
51
+ end
52
+ end
53
+
54
+ #
55
+ # Mapper for AdvisorsResultList class as Ruby Hash.
56
+ # This will be used for serialization/deserialization.
57
+ #
58
+ def self.mapper()
59
+ {
60
+ client_side_validation: true,
61
+ required: false,
62
+ serialized_name: 'AdvisorsResultList',
63
+ type: {
64
+ name: 'Composite',
65
+ class_name: 'AdvisorsResultList',
66
+ model_properties: {
67
+ value: {
68
+ client_side_validation: true,
69
+ required: false,
70
+ read_only: true,
71
+ serialized_name: 'value',
72
+ type: {
73
+ name: 'Sequence',
74
+ element: {
75
+ client_side_validation: true,
76
+ required: false,
77
+ serialized_name: 'AdvisorElementType',
78
+ type: {
79
+ name: 'Composite',
80
+ class_name: 'Advisor'
81
+ }
82
+ }
83
+ }
84
+ },
85
+ next_link: {
86
+ client_side_validation: true,
87
+ required: false,
88
+ read_only: true,
89
+ serialized_name: 'nextLink',
90
+ type: {
91
+ name: 'String'
92
+ }
93
+ }
94
+ }
95
+ }
96
+ }
97
+ end
98
+ end
99
+ end
100
+ 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::Mysql::Mgmt::V2018_06_01
7
+ module Models
8
+ #
9
+ # The resource model definition for a Azure Resource Manager resource with
10
+ # an etag.
11
+ #
12
+ class AzureEntityResource < Resource
13
+
14
+ include MsRestAzure
15
+
16
+ # @return [String] Resource Etag.
17
+ attr_accessor :etag
18
+
19
+
20
+ #
21
+ # Mapper for AzureEntityResource class as Ruby Hash.
22
+ # This will be used for serialization/deserialization.
23
+ #
24
+ def self.mapper()
25
+ {
26
+ client_side_validation: true,
27
+ required: false,
28
+ serialized_name: 'AzureEntityResource',
29
+ type: {
30
+ name: 'Composite',
31
+ class_name: 'AzureEntityResource',
32
+ model_properties: {
33
+ id: {
34
+ client_side_validation: true,
35
+ required: false,
36
+ read_only: true,
37
+ serialized_name: 'id',
38
+ type: {
39
+ name: 'String'
40
+ }
41
+ },
42
+ name: {
43
+ client_side_validation: true,
44
+ required: false,
45
+ read_only: true,
46
+ serialized_name: 'name',
47
+ type: {
48
+ name: 'String'
49
+ }
50
+ },
51
+ type: {
52
+ client_side_validation: true,
53
+ required: false,
54
+ read_only: true,
55
+ serialized_name: 'type',
56
+ type: {
57
+ name: 'String'
58
+ }
59
+ },
60
+ etag: {
61
+ client_side_validation: true,
62
+ required: false,
63
+ read_only: true,
64
+ serialized_name: 'etag',
65
+ type: {
66
+ name: 'String'
67
+ }
68
+ }
69
+ }
70
+ }
71
+ }
72
+ end
73
+ end
74
+ end
75
+ end