azure_mgmt_mariadb 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb.rb +76 -0
  4. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/check_name_availability.rb +123 -0
  5. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/configurations.rb +393 -0
  6. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/databases.rb +538 -0
  7. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/firewall_rules.rb +538 -0
  8. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/location_based_performance_tier.rb +113 -0
  9. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/log_files.rb +123 -0
  10. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/maria_dbmanagement_client.rb +168 -0
  11. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/configuration.rb +132 -0
  12. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/configuration_list_result.rb +55 -0
  13. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/database.rb +84 -0
  14. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/database_list_result.rb +55 -0
  15. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/firewall_rule.rb +92 -0
  16. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/firewall_rule_list_result.rb +55 -0
  17. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/geo_redundant_backup.rb +16 -0
  18. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/log_file.rb +120 -0
  19. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/log_file_list_result.rb +55 -0
  20. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/name_availability.rb +68 -0
  21. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/name_availability_request.rb +57 -0
  22. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/operation.rb +95 -0
  23. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/operation_display.rb +83 -0
  24. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/operation_list_result.rb +55 -0
  25. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/operation_origin.rb +17 -0
  26. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/performance_tier_list_result.rb +56 -0
  27. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/performance_tier_properties.rb +67 -0
  28. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/performance_tier_service_level_objectives.rb +126 -0
  29. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/proxy_resource.rb +71 -0
  30. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/server.rb +183 -0
  31. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/server_for_create.rb +92 -0
  32. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/server_list_result.rb +55 -0
  33. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/server_properties_for_create.rb +85 -0
  34. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/server_properties_for_default_create.rb +100 -0
  35. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/server_properties_for_geo_restore.rb +88 -0
  36. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/server_properties_for_restore.rb +99 -0
  37. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/server_security_alert_policy.rb +166 -0
  38. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/server_security_alert_policy_state.rb +16 -0
  39. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/server_state.rb +17 -0
  40. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/server_update_parameters.rb +115 -0
  41. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/server_version.rb +16 -0
  42. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/sku.rb +97 -0
  43. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/sku_tier.rb +17 -0
  44. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/ssl_enforcement_enum.rb +16 -0
  45. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/storage_profile.rb +69 -0
  46. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/tracked_resource.rb +93 -0
  47. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/virtual_network_rule.rb +99 -0
  48. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/virtual_network_rule_list_result.rb +100 -0
  49. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/virtual_network_rule_state.rb +19 -0
  50. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/module_definition.rb +9 -0
  51. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/operations.rb +107 -0
  52. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/server_security_alert_policies.rb +287 -0
  53. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/servers.rb +772 -0
  54. data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/virtual_network_rules.rb +663 -0
  55. data/lib/2018-06-01/generated/azure_mgmt_mariadb.rb +78 -0
  56. data/lib/2018-06-01/generated/azure_mgmt_mariadb/check_name_availability.rb +123 -0
  57. data/lib/2018-06-01/generated/azure_mgmt_mariadb/configurations.rb +393 -0
  58. data/lib/2018-06-01/generated/azure_mgmt_mariadb/databases.rb +538 -0
  59. data/lib/2018-06-01/generated/azure_mgmt_mariadb/firewall_rules.rb +538 -0
  60. data/lib/2018-06-01/generated/azure_mgmt_mariadb/location_based_performance_tier.rb +113 -0
  61. data/lib/2018-06-01/generated/azure_mgmt_mariadb/log_files.rb +123 -0
  62. data/lib/2018-06-01/generated/azure_mgmt_mariadb/maria_dbmanagement_client.rb +172 -0
  63. data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/configuration.rb +132 -0
  64. data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/configuration_list_result.rb +55 -0
  65. data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/database.rb +84 -0
  66. data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/database_list_result.rb +55 -0
  67. data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/firewall_rule.rb +92 -0
  68. data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/firewall_rule_list_result.rb +55 -0
  69. data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/geo_redundant_backup.rb +16 -0
  70. data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/log_file.rb +120 -0
  71. data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/log_file_list_result.rb +55 -0
  72. data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/name_availability.rb +68 -0
  73. data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/name_availability_request.rb +57 -0
  74. data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/operation.rb +95 -0
  75. data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/operation_display.rb +83 -0
  76. data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/operation_list_result.rb +55 -0
  77. data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/operation_origin.rb +17 -0
  78. data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/performance_tier_list_result.rb +56 -0
  79. data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/performance_tier_properties.rb +67 -0
  80. data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/performance_tier_service_level_objectives.rb +126 -0
  81. data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/proxy_resource.rb +71 -0
  82. data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/server.rb +220 -0
  83. data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/server_for_create.rb +92 -0
  84. data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/server_list_result.rb +55 -0
  85. data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/server_properties_for_create.rb +86 -0
  86. data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/server_properties_for_default_create.rb +100 -0
  87. data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/server_properties_for_geo_restore.rb +88 -0
  88. data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/server_properties_for_replica.rb +87 -0
  89. data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/server_properties_for_restore.rb +99 -0
  90. data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/server_security_alert_policy.rb +166 -0
  91. data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/server_security_alert_policy_state.rb +16 -0
  92. data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/server_state.rb +17 -0
  93. data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/server_update_parameters.rb +126 -0
  94. data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/server_version.rb +16 -0
  95. data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/sku.rb +97 -0
  96. data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/sku_tier.rb +17 -0
  97. data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/ssl_enforcement_enum.rb +16 -0
  98. data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/storage_profile.rb +69 -0
  99. data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/tracked_resource.rb +93 -0
  100. data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/virtual_network_rule.rb +99 -0
  101. data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/virtual_network_rule_list_result.rb +100 -0
  102. data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/virtual_network_rule_state.rb +19 -0
  103. data/lib/2018-06-01/generated/azure_mgmt_mariadb/module_definition.rb +9 -0
  104. data/lib/2018-06-01/generated/azure_mgmt_mariadb/operations.rb +107 -0
  105. data/lib/2018-06-01/generated/azure_mgmt_mariadb/replicas.rb +123 -0
  106. data/lib/2018-06-01/generated/azure_mgmt_mariadb/server_security_alert_policies.rb +287 -0
  107. data/lib/2018-06-01/generated/azure_mgmt_mariadb/servers.rb +901 -0
  108. data/lib/2018-06-01/generated/azure_mgmt_mariadb/virtual_network_rules.rb +663 -0
  109. data/lib/azure_mgmt_mariadb.rb +7 -0
  110. data/lib/module_definition.rb +9 -0
  111. data/lib/profiles/latest/mariadb_latest_profile_client.rb +40 -0
  112. data/lib/profiles/latest/mariadb_module_definition.rb +8 -0
  113. data/lib/profiles/latest/modules/mariadb_profile_module.rb +241 -0
  114. data/lib/version.rb +7 -0
  115. metadata +231 -0
@@ -0,0 +1,113 @@
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::MariaDB::Mgmt::V2018_06_01_preview
7
+ #
8
+ # MariaDB Client
9
+ #
10
+ class LocationBasedPerformanceTier
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the LocationBasedPerformanceTier class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [MariaDBManagementClient] reference to the MariaDBManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # List all the performance tiers at specified location in a given subscription.
26
+ #
27
+ # @param location_name [String] The name of the location.
28
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
29
+ # will be added to the HTTP request.
30
+ #
31
+ # @return [PerformanceTierListResult] operation results.
32
+ #
33
+ def list(location_name, custom_headers:nil)
34
+ response = list_async(location_name, custom_headers:custom_headers).value!
35
+ response.body unless response.nil?
36
+ end
37
+
38
+ #
39
+ # List all the performance tiers at specified location in a given subscription.
40
+ #
41
+ # @param location_name [String] The name of the location.
42
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
43
+ # will be added to the HTTP request.
44
+ #
45
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
46
+ #
47
+ def list_with_http_info(location_name, custom_headers:nil)
48
+ list_async(location_name, custom_headers:custom_headers).value!
49
+ end
50
+
51
+ #
52
+ # List all the performance tiers at specified location in a given subscription.
53
+ #
54
+ # @param location_name [String] The name of the location.
55
+ # @param [Hash{String => String}] A hash of custom headers that will be added
56
+ # to the HTTP request.
57
+ #
58
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
59
+ #
60
+ def list_async(location_name, custom_headers:nil)
61
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
62
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
63
+ fail ArgumentError, 'location_name is nil' if location_name.nil?
64
+
65
+
66
+ request_headers = {}
67
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
68
+
69
+ # Set Headers
70
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
71
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
72
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.DBforMariaDB/locations/{locationName}/performanceTiers'
73
+
74
+ request_url = @base_url || @client.base_url
75
+
76
+ options = {
77
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
78
+ path_params: {'subscriptionId' => @client.subscription_id,'locationName' => location_name},
79
+ query_params: {'api-version' => @client.api_version},
80
+ headers: request_headers.merge(custom_headers || {}),
81
+ base_url: request_url
82
+ }
83
+ promise = @client.make_request_async(:get, path_template, options)
84
+
85
+ promise = promise.then do |result|
86
+ http_response = result.response
87
+ status_code = http_response.status
88
+ response_content = http_response.body
89
+ unless status_code == 200
90
+ error_model = JSON.load(response_content)
91
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
92
+ end
93
+
94
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
95
+ # Deserialize Response
96
+ if status_code == 200
97
+ begin
98
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
99
+ result_mapper = Azure::MariaDB::Mgmt::V2018_06_01_preview::Models::PerformanceTierListResult.mapper()
100
+ result.body = @client.deserialize(result_mapper, parsed_response)
101
+ rescue Exception => e
102
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
103
+ end
104
+ end
105
+
106
+ result
107
+ end
108
+
109
+ promise.execute
110
+ end
111
+
112
+ end
113
+ 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::MariaDB::Mgmt::V2018_06_01_preview
7
+ #
8
+ # MariaDB Client
9
+ #
10
+ class LogFiles
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the LogFiles class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [MariaDBManagementClient] reference to the MariaDBManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # List all the log files in a given server.
26
+ #
27
+ # @param resource_group_name [String] The name of the resource group that
28
+ # contains the resource. You can obtain this value from the Azure Resource
29
+ # Manager API or the portal.
30
+ # @param server_name [String] The name of the server.
31
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
32
+ # will be added to the HTTP request.
33
+ #
34
+ # @return [LogFileListResult] operation results.
35
+ #
36
+ def list_by_server(resource_group_name, server_name, custom_headers:nil)
37
+ response = list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value!
38
+ response.body unless response.nil?
39
+ end
40
+
41
+ #
42
+ # List all the log files in a given server.
43
+ #
44
+ # @param resource_group_name [String] The name of the resource group that
45
+ # contains the resource. You can obtain this value from the Azure Resource
46
+ # Manager API or the portal.
47
+ # @param server_name [String] The name of the server.
48
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
49
+ # will be added to the HTTP request.
50
+ #
51
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
52
+ #
53
+ def list_by_server_with_http_info(resource_group_name, server_name, custom_headers:nil)
54
+ list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value!
55
+ end
56
+
57
+ #
58
+ # List all the log files in a given server.
59
+ #
60
+ # @param resource_group_name [String] The name of the resource group that
61
+ # contains the resource. You can obtain this value from the Azure Resource
62
+ # Manager API or the portal.
63
+ # @param server_name [String] The name of the server.
64
+ # @param [Hash{String => String}] A hash of custom headers that will be added
65
+ # to the HTTP request.
66
+ #
67
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
68
+ #
69
+ def list_by_server_async(resource_group_name, server_name, custom_headers:nil)
70
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
71
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
72
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
73
+ fail ArgumentError, 'server_name is nil' if server_name.nil?
74
+
75
+
76
+ request_headers = {}
77
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
78
+
79
+ # Set Headers
80
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
81
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
82
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/logFiles'
83
+
84
+ request_url = @base_url || @client.base_url
85
+
86
+ options = {
87
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
88
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'serverName' => server_name},
89
+ query_params: {'api-version' => @client.api_version},
90
+ headers: request_headers.merge(custom_headers || {}),
91
+ base_url: request_url
92
+ }
93
+ promise = @client.make_request_async(:get, path_template, options)
94
+
95
+ promise = promise.then do |result|
96
+ http_response = result.response
97
+ status_code = http_response.status
98
+ response_content = http_response.body
99
+ unless status_code == 200
100
+ error_model = JSON.load(response_content)
101
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
102
+ end
103
+
104
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
105
+ # Deserialize Response
106
+ if status_code == 200
107
+ begin
108
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
109
+ result_mapper = Azure::MariaDB::Mgmt::V2018_06_01_preview::Models::LogFileListResult.mapper()
110
+ result.body = @client.deserialize(result_mapper, parsed_response)
111
+ rescue Exception => e
112
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
113
+ end
114
+ end
115
+
116
+ result
117
+ end
118
+
119
+ promise.execute
120
+ end
121
+
122
+ end
123
+ end
@@ -0,0 +1,168 @@
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::MariaDB::Mgmt::V2018_06_01_preview
7
+ #
8
+ # A service client - single point of access to the REST API.
9
+ #
10
+ class MariaDBManagementClient < MsRestAzure::AzureServiceClient
11
+ include MsRestAzure
12
+ include MsRestAzure::Serialization
13
+
14
+ # @return [String] the base URI of the service.
15
+ attr_accessor :base_url
16
+
17
+ # @return Credentials needed for the client to connect to Azure.
18
+ attr_reader :credentials
19
+
20
+ # @return [String] The subscription ID that identifies an Azure
21
+ # subscription.
22
+ attr_accessor :subscription_id
23
+
24
+ # @return [String] The API version to use for the request.
25
+ attr_reader :api_version
26
+
27
+ # @return [String] The preferred language for the response.
28
+ attr_accessor :accept_language
29
+
30
+ # @return [Integer] The retry timeout in seconds for Long Running
31
+ # Operations. Default value is 30.
32
+ attr_accessor :long_running_operation_retry_timeout
33
+
34
+ # @return [Boolean] Whether a unique x-ms-client-request-id should be
35
+ # generated. When set to true a unique x-ms-client-request-id value is
36
+ # generated and included in each request. Default is true.
37
+ attr_accessor :generate_client_request_id
38
+
39
+ # @return [Servers] servers
40
+ attr_reader :servers
41
+
42
+ # @return [FirewallRules] firewall_rules
43
+ attr_reader :firewall_rules
44
+
45
+ # @return [VirtualNetworkRules] virtual_network_rules
46
+ attr_reader :virtual_network_rules
47
+
48
+ # @return [Databases] databases
49
+ attr_reader :databases
50
+
51
+ # @return [Configurations] configurations
52
+ attr_reader :configurations
53
+
54
+ # @return [LogFiles] log_files
55
+ attr_reader :log_files
56
+
57
+ # @return [LocationBasedPerformanceTier] location_based_performance_tier
58
+ attr_reader :location_based_performance_tier
59
+
60
+ # @return [CheckNameAvailability] check_name_availability
61
+ attr_reader :check_name_availability
62
+
63
+ # @return [ServerSecurityAlertPolicies] server_security_alert_policies
64
+ attr_reader :server_security_alert_policies
65
+
66
+ # @return [Operations] operations
67
+ attr_reader :operations
68
+
69
+ #
70
+ # Creates initializes a new instance of the MariaDBManagementClient class.
71
+ # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
72
+ # @param base_url [String] the base URI of the service.
73
+ # @param options [Array] filters to be applied to the HTTP requests.
74
+ #
75
+ def initialize(credentials = nil, base_url = nil, options = nil)
76
+ super(credentials, options)
77
+ @base_url = base_url || 'https://management.azure.com'
78
+
79
+ fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
80
+ @credentials = credentials
81
+
82
+ @servers = Servers.new(self)
83
+ @firewall_rules = FirewallRules.new(self)
84
+ @virtual_network_rules = VirtualNetworkRules.new(self)
85
+ @databases = Databases.new(self)
86
+ @configurations = Configurations.new(self)
87
+ @log_files = LogFiles.new(self)
88
+ @location_based_performance_tier = LocationBasedPerformanceTier.new(self)
89
+ @check_name_availability = CheckNameAvailability.new(self)
90
+ @server_security_alert_policies = ServerSecurityAlertPolicies.new(self)
91
+ @operations = Operations.new(self)
92
+ @api_version = '2018-06-01-preview'
93
+ @accept_language = 'en-US'
94
+ @long_running_operation_retry_timeout = 30
95
+ @generate_client_request_id = true
96
+ add_telemetry
97
+ end
98
+
99
+ #
100
+ # Makes a request and returns the body of the response.
101
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
102
+ # @param path [String] the path, relative to {base_url}.
103
+ # @param options [Hash{String=>String}] specifying any request options like :body.
104
+ # @return [Hash{String=>String}] containing the body of the response.
105
+ # Example:
106
+ #
107
+ # request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
108
+ # path = "/path"
109
+ # options = {
110
+ # body: request_content,
111
+ # query_params: {'api-version' => '2016-02-01'}
112
+ # }
113
+ # result = @client.make_request(:put, path, options)
114
+ #
115
+ def make_request(method, path, options = {})
116
+ result = make_request_with_http_info(method, path, options)
117
+ result.body unless result.nil?
118
+ end
119
+
120
+ #
121
+ # Makes a request and returns the operation response.
122
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
123
+ # @param path [String] the path, relative to {base_url}.
124
+ # @param options [Hash{String=>String}] specifying any request options like :body.
125
+ # @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
126
+ #
127
+ def make_request_with_http_info(method, path, options = {})
128
+ result = make_request_async(method, path, options).value!
129
+ result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
130
+ result
131
+ end
132
+
133
+ #
134
+ # Makes a request asynchronously.
135
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
136
+ # @param path [String] the path, relative to {base_url}.
137
+ # @param options [Hash{String=>String}] specifying any request options like :body.
138
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
139
+ #
140
+ def make_request_async(method, path, options = {})
141
+ fail ArgumentError, 'method is nil' if method.nil?
142
+ fail ArgumentError, 'path is nil' if path.nil?
143
+
144
+ request_url = options[:base_url] || @base_url
145
+ if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
146
+ @request_headers['Content-Type'] = options[:headers]['Content-Type']
147
+ end
148
+
149
+ request_headers = @request_headers
150
+ request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
151
+ options.merge!({headers: request_headers.merge(options[:headers] || {})})
152
+ options.merge!({credentials: @credentials}) unless @credentials.nil?
153
+
154
+ super(request_url, method, path, options)
155
+ end
156
+
157
+
158
+ private
159
+ #
160
+ # Adds telemetry information.
161
+ #
162
+ def add_telemetry
163
+ sdk_information = 'azure_mgmt_mariadb'
164
+ sdk_information = "#{sdk_information}/0.17.0"
165
+ add_user_agent_information(sdk_information)
166
+ end
167
+ end
168
+ end
@@ -0,0 +1,132 @@
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::MariaDB::Mgmt::V2018_06_01_preview
7
+ module Models
8
+ #
9
+ # Represents a Configuration.
10
+ #
11
+ class Configuration < ProxyResource
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Value of the configuration.
16
+ attr_accessor :value
17
+
18
+ # @return [String] Description of the configuration.
19
+ attr_accessor :description
20
+
21
+ # @return [String] Default value of the configuration.
22
+ attr_accessor :default_value
23
+
24
+ # @return [String] Data type of the configuration.
25
+ attr_accessor :data_type
26
+
27
+ # @return [String] Allowed values of the configuration.
28
+ attr_accessor :allowed_values
29
+
30
+ # @return [String] Source of the configuration.
31
+ attr_accessor :source
32
+
33
+
34
+ #
35
+ # Mapper for Configuration class as Ruby Hash.
36
+ # This will be used for serialization/deserialization.
37
+ #
38
+ def self.mapper()
39
+ {
40
+ client_side_validation: true,
41
+ required: false,
42
+ serialized_name: 'Configuration',
43
+ type: {
44
+ name: 'Composite',
45
+ class_name: 'Configuration',
46
+ model_properties: {
47
+ id: {
48
+ client_side_validation: true,
49
+ required: false,
50
+ read_only: true,
51
+ serialized_name: 'id',
52
+ type: {
53
+ name: 'String'
54
+ }
55
+ },
56
+ name: {
57
+ client_side_validation: true,
58
+ required: false,
59
+ read_only: true,
60
+ serialized_name: 'name',
61
+ type: {
62
+ name: 'String'
63
+ }
64
+ },
65
+ type: {
66
+ client_side_validation: true,
67
+ required: false,
68
+ read_only: true,
69
+ serialized_name: 'type',
70
+ type: {
71
+ name: 'String'
72
+ }
73
+ },
74
+ value: {
75
+ client_side_validation: true,
76
+ required: false,
77
+ serialized_name: 'properties.value',
78
+ type: {
79
+ name: 'String'
80
+ }
81
+ },
82
+ description: {
83
+ client_side_validation: true,
84
+ required: false,
85
+ read_only: true,
86
+ serialized_name: 'properties.description',
87
+ type: {
88
+ name: 'String'
89
+ }
90
+ },
91
+ default_value: {
92
+ client_side_validation: true,
93
+ required: false,
94
+ read_only: true,
95
+ serialized_name: 'properties.defaultValue',
96
+ type: {
97
+ name: 'String'
98
+ }
99
+ },
100
+ data_type: {
101
+ client_side_validation: true,
102
+ required: false,
103
+ read_only: true,
104
+ serialized_name: 'properties.dataType',
105
+ type: {
106
+ name: 'String'
107
+ }
108
+ },
109
+ allowed_values: {
110
+ client_side_validation: true,
111
+ required: false,
112
+ read_only: true,
113
+ serialized_name: 'properties.allowedValues',
114
+ type: {
115
+ name: 'String'
116
+ }
117
+ },
118
+ source: {
119
+ client_side_validation: true,
120
+ required: false,
121
+ serialized_name: 'properties.source',
122
+ type: {
123
+ name: 'String'
124
+ }
125
+ }
126
+ }
127
+ }
128
+ }
129
+ end
130
+ end
131
+ end
132
+ end