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,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 162770d4433c7a4e8437c27be587d57b28414e66
4
+ data.tar.gz: 2ce6bea6953004a5ca100325fb0463a506591da1
5
+ SHA512:
6
+ metadata.gz: e8bf2bb4a790097470649ab19e0d3792dde46607193e9de12f344591d37b8d7cf61a7422d2722883bb8ec30bfe9626ac63958b2d0e7cfa9846ae79845e496e3b
7
+ data.tar.gz: b499f3943a4da62a88f6f94ce8d2972c9cc8e772c354113572817c3a08030767ddd1f83185f04df3a3f8cd7bcafb496976fde5093bfc8b4c47631f56dbd28721
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Microsoft Corporation
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,76 @@
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
+ require 'uri'
7
+ require 'cgi'
8
+ require 'date'
9
+ require 'json'
10
+ require 'base64'
11
+ require 'erb'
12
+ require 'securerandom'
13
+ require 'time'
14
+ require 'timeliness'
15
+ require 'faraday'
16
+ require 'faraday-cookie_jar'
17
+ require 'concurrent'
18
+ require 'ms_rest'
19
+ require '2018-06-01-preview/generated/azure_mgmt_mariadb/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::MariaDB::Mgmt::V2018_06_01_preview
23
+ autoload :Servers, '2018-06-01-preview/generated/azure_mgmt_mariadb/servers.rb'
24
+ autoload :FirewallRules, '2018-06-01-preview/generated/azure_mgmt_mariadb/firewall_rules.rb'
25
+ autoload :VirtualNetworkRules, '2018-06-01-preview/generated/azure_mgmt_mariadb/virtual_network_rules.rb'
26
+ autoload :Databases, '2018-06-01-preview/generated/azure_mgmt_mariadb/databases.rb'
27
+ autoload :Configurations, '2018-06-01-preview/generated/azure_mgmt_mariadb/configurations.rb'
28
+ autoload :LogFiles, '2018-06-01-preview/generated/azure_mgmt_mariadb/log_files.rb'
29
+ autoload :LocationBasedPerformanceTier, '2018-06-01-preview/generated/azure_mgmt_mariadb/location_based_performance_tier.rb'
30
+ autoload :CheckNameAvailability, '2018-06-01-preview/generated/azure_mgmt_mariadb/check_name_availability.rb'
31
+ autoload :ServerSecurityAlertPolicies, '2018-06-01-preview/generated/azure_mgmt_mariadb/server_security_alert_policies.rb'
32
+ autoload :Operations, '2018-06-01-preview/generated/azure_mgmt_mariadb/operations.rb'
33
+ autoload :MariaDBManagementClient, '2018-06-01-preview/generated/azure_mgmt_mariadb/maria_dbmanagement_client.rb'
34
+
35
+ module Models
36
+ autoload :VirtualNetworkRuleListResult, '2018-06-01-preview/generated/azure_mgmt_mariadb/models/virtual_network_rule_list_result.rb'
37
+ autoload :FirewallRuleListResult, '2018-06-01-preview/generated/azure_mgmt_mariadb/models/firewall_rule_list_result.rb'
38
+ autoload :PerformanceTierListResult, '2018-06-01-preview/generated/azure_mgmt_mariadb/models/performance_tier_list_result.rb'
39
+ autoload :StorageProfile, '2018-06-01-preview/generated/azure_mgmt_mariadb/models/storage_profile.rb'
40
+ autoload :ProxyResource, '2018-06-01-preview/generated/azure_mgmt_mariadb/models/proxy_resource.rb'
41
+ autoload :NameAvailabilityRequest, '2018-06-01-preview/generated/azure_mgmt_mariadb/models/name_availability_request.rb'
42
+ autoload :Operation, '2018-06-01-preview/generated/azure_mgmt_mariadb/models/operation.rb'
43
+ autoload :PerformanceTierServiceLevelObjectives, '2018-06-01-preview/generated/azure_mgmt_mariadb/models/performance_tier_service_level_objectives.rb'
44
+ autoload :ServerPropertiesForCreate, '2018-06-01-preview/generated/azure_mgmt_mariadb/models/server_properties_for_create.rb'
45
+ autoload :LogFileListResult, '2018-06-01-preview/generated/azure_mgmt_mariadb/models/log_file_list_result.rb'
46
+ autoload :OperationListResult, '2018-06-01-preview/generated/azure_mgmt_mariadb/models/operation_list_result.rb'
47
+ autoload :ServerUpdateParameters, '2018-06-01-preview/generated/azure_mgmt_mariadb/models/server_update_parameters.rb'
48
+ autoload :PerformanceTierProperties, '2018-06-01-preview/generated/azure_mgmt_mariadb/models/performance_tier_properties.rb'
49
+ autoload :DatabaseListResult, '2018-06-01-preview/generated/azure_mgmt_mariadb/models/database_list_result.rb'
50
+ autoload :ServerForCreate, '2018-06-01-preview/generated/azure_mgmt_mariadb/models/server_for_create.rb'
51
+ autoload :NameAvailability, '2018-06-01-preview/generated/azure_mgmt_mariadb/models/name_availability.rb'
52
+ autoload :Sku, '2018-06-01-preview/generated/azure_mgmt_mariadb/models/sku.rb'
53
+ autoload :ConfigurationListResult, '2018-06-01-preview/generated/azure_mgmt_mariadb/models/configuration_list_result.rb'
54
+ autoload :ServerListResult, '2018-06-01-preview/generated/azure_mgmt_mariadb/models/server_list_result.rb'
55
+ autoload :OperationDisplay, '2018-06-01-preview/generated/azure_mgmt_mariadb/models/operation_display.rb'
56
+ autoload :TrackedResource, '2018-06-01-preview/generated/azure_mgmt_mariadb/models/tracked_resource.rb'
57
+ autoload :ServerPropertiesForDefaultCreate, '2018-06-01-preview/generated/azure_mgmt_mariadb/models/server_properties_for_default_create.rb'
58
+ autoload :ServerPropertiesForRestore, '2018-06-01-preview/generated/azure_mgmt_mariadb/models/server_properties_for_restore.rb'
59
+ autoload :ServerPropertiesForGeoRestore, '2018-06-01-preview/generated/azure_mgmt_mariadb/models/server_properties_for_geo_restore.rb'
60
+ autoload :Server, '2018-06-01-preview/generated/azure_mgmt_mariadb/models/server.rb'
61
+ autoload :FirewallRule, '2018-06-01-preview/generated/azure_mgmt_mariadb/models/firewall_rule.rb'
62
+ autoload :VirtualNetworkRule, '2018-06-01-preview/generated/azure_mgmt_mariadb/models/virtual_network_rule.rb'
63
+ autoload :Database, '2018-06-01-preview/generated/azure_mgmt_mariadb/models/database.rb'
64
+ autoload :Configuration, '2018-06-01-preview/generated/azure_mgmt_mariadb/models/configuration.rb'
65
+ autoload :LogFile, '2018-06-01-preview/generated/azure_mgmt_mariadb/models/log_file.rb'
66
+ autoload :ServerSecurityAlertPolicy, '2018-06-01-preview/generated/azure_mgmt_mariadb/models/server_security_alert_policy.rb'
67
+ autoload :ServerVersion, '2018-06-01-preview/generated/azure_mgmt_mariadb/models/server_version.rb'
68
+ autoload :SslEnforcementEnum, '2018-06-01-preview/generated/azure_mgmt_mariadb/models/ssl_enforcement_enum.rb'
69
+ autoload :ServerState, '2018-06-01-preview/generated/azure_mgmt_mariadb/models/server_state.rb'
70
+ autoload :GeoRedundantBackup, '2018-06-01-preview/generated/azure_mgmt_mariadb/models/geo_redundant_backup.rb'
71
+ autoload :SkuTier, '2018-06-01-preview/generated/azure_mgmt_mariadb/models/sku_tier.rb'
72
+ autoload :VirtualNetworkRuleState, '2018-06-01-preview/generated/azure_mgmt_mariadb/models/virtual_network_rule_state.rb'
73
+ autoload :OperationOrigin, '2018-06-01-preview/generated/azure_mgmt_mariadb/models/operation_origin.rb'
74
+ autoload :ServerSecurityAlertPolicyState, '2018-06-01-preview/generated/azure_mgmt_mariadb/models/server_security_alert_policy_state.rb'
75
+ end
76
+ 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 CheckNameAvailability
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the CheckNameAvailability 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
+ # Check the availability of name for resource
26
+ #
27
+ # @param name_availability_request [NameAvailabilityRequest] The required
28
+ # parameters for checking if resource name is available.
29
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
30
+ # will be added to the HTTP request.
31
+ #
32
+ # @return [NameAvailability] operation results.
33
+ #
34
+ def execute(name_availability_request, custom_headers:nil)
35
+ response = execute_async(name_availability_request, custom_headers:custom_headers).value!
36
+ response.body unless response.nil?
37
+ end
38
+
39
+ #
40
+ # Check the availability of name for resource
41
+ #
42
+ # @param name_availability_request [NameAvailabilityRequest] The required
43
+ # parameters for checking if resource name is available.
44
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
45
+ # will be added to the HTTP request.
46
+ #
47
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
48
+ #
49
+ def execute_with_http_info(name_availability_request, custom_headers:nil)
50
+ execute_async(name_availability_request, custom_headers:custom_headers).value!
51
+ end
52
+
53
+ #
54
+ # Check the availability of name for resource
55
+ #
56
+ # @param name_availability_request [NameAvailabilityRequest] The required
57
+ # parameters for checking if resource name is available.
58
+ # @param [Hash{String => String}] A hash of custom headers that will be added
59
+ # to the HTTP request.
60
+ #
61
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
62
+ #
63
+ def execute_async(name_availability_request, custom_headers:nil)
64
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
65
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
66
+ fail ArgumentError, 'name_availability_request is nil' if name_availability_request.nil?
67
+
68
+
69
+ request_headers = {}
70
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
71
+
72
+ # Set Headers
73
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
74
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
75
+
76
+ # Serialize Request
77
+ request_mapper = Azure::MariaDB::Mgmt::V2018_06_01_preview::Models::NameAvailabilityRequest.mapper()
78
+ request_content = @client.serialize(request_mapper, name_availability_request)
79
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
80
+
81
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.DBforMariaDB/checkNameAvailability'
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},
88
+ query_params: {'api-version' => @client.api_version},
89
+ body: request_content,
90
+ headers: request_headers.merge(custom_headers || {}),
91
+ base_url: request_url
92
+ }
93
+ promise = @client.make_request_async(:post, 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::NameAvailability.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,393 @@
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 Configurations
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Configurations 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
+ # Updates a configuration of a 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 configuration_name [String] The name of the server configuration.
32
+ # @param parameters [Configuration] The required parameters for updating a
33
+ # server configuration.
34
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
35
+ # will be added to the HTTP request.
36
+ #
37
+ # @return [Configuration] operation results.
38
+ #
39
+ def create_or_update(resource_group_name, server_name, configuration_name, parameters, custom_headers:nil)
40
+ response = create_or_update_async(resource_group_name, server_name, configuration_name, parameters, custom_headers:custom_headers).value!
41
+ response.body unless response.nil?
42
+ end
43
+
44
+ #
45
+ # @param resource_group_name [String] The name of the resource group that
46
+ # contains the resource. You can obtain this value from the Azure Resource
47
+ # Manager API or the portal.
48
+ # @param server_name [String] The name of the server.
49
+ # @param configuration_name [String] The name of the server configuration.
50
+ # @param parameters [Configuration] The required parameters for updating a
51
+ # server configuration.
52
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
53
+ # will be added to the HTTP request.
54
+ #
55
+ # @return [Concurrent::Promise] promise which provides async access to http
56
+ # response.
57
+ #
58
+ def create_or_update_async(resource_group_name, server_name, configuration_name, parameters, custom_headers:nil)
59
+ # Send request
60
+ promise = begin_create_or_update_async(resource_group_name, server_name, configuration_name, parameters, custom_headers:custom_headers)
61
+
62
+ promise = promise.then do |response|
63
+ # Defining deserialization method.
64
+ deserialize_method = lambda do |parsed_response|
65
+ result_mapper = Azure::MariaDB::Mgmt::V2018_06_01_preview::Models::Configuration.mapper()
66
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
67
+ end
68
+
69
+ # Waiting for response.
70
+ @client.get_long_running_operation_result(response, deserialize_method)
71
+ end
72
+
73
+ promise
74
+ end
75
+
76
+ #
77
+ # Gets information about a configuration of server.
78
+ #
79
+ # @param resource_group_name [String] The name of the resource group that
80
+ # contains the resource. You can obtain this value from the Azure Resource
81
+ # Manager API or the portal.
82
+ # @param server_name [String] The name of the server.
83
+ # @param configuration_name [String] The name of the server configuration.
84
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
85
+ # will be added to the HTTP request.
86
+ #
87
+ # @return [Configuration] operation results.
88
+ #
89
+ def get(resource_group_name, server_name, configuration_name, custom_headers:nil)
90
+ response = get_async(resource_group_name, server_name, configuration_name, custom_headers:custom_headers).value!
91
+ response.body unless response.nil?
92
+ end
93
+
94
+ #
95
+ # Gets information about a configuration of server.
96
+ #
97
+ # @param resource_group_name [String] The name of the resource group that
98
+ # contains the resource. You can obtain this value from the Azure Resource
99
+ # Manager API or the portal.
100
+ # @param server_name [String] The name of the server.
101
+ # @param configuration_name [String] The name of the server configuration.
102
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
103
+ # will be added to the HTTP request.
104
+ #
105
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
106
+ #
107
+ def get_with_http_info(resource_group_name, server_name, configuration_name, custom_headers:nil)
108
+ get_async(resource_group_name, server_name, configuration_name, custom_headers:custom_headers).value!
109
+ end
110
+
111
+ #
112
+ # Gets information about a configuration of server.
113
+ #
114
+ # @param resource_group_name [String] The name of the resource group that
115
+ # contains the resource. You can obtain this value from the Azure Resource
116
+ # Manager API or the portal.
117
+ # @param server_name [String] The name of the server.
118
+ # @param configuration_name [String] The name of the server configuration.
119
+ # @param [Hash{String => String}] A hash of custom headers that will be added
120
+ # to the HTTP request.
121
+ #
122
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
123
+ #
124
+ def get_async(resource_group_name, server_name, configuration_name, custom_headers:nil)
125
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
126
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
127
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
128
+ fail ArgumentError, 'server_name is nil' if server_name.nil?
129
+ fail ArgumentError, 'configuration_name is nil' if configuration_name.nil?
130
+
131
+
132
+ request_headers = {}
133
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
134
+
135
+ # Set Headers
136
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
137
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
138
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/configurations/{configurationName}'
139
+
140
+ request_url = @base_url || @client.base_url
141
+
142
+ options = {
143
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
144
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'serverName' => server_name,'configurationName' => configuration_name},
145
+ query_params: {'api-version' => @client.api_version},
146
+ headers: request_headers.merge(custom_headers || {}),
147
+ base_url: request_url
148
+ }
149
+ promise = @client.make_request_async(:get, path_template, options)
150
+
151
+ promise = promise.then do |result|
152
+ http_response = result.response
153
+ status_code = http_response.status
154
+ response_content = http_response.body
155
+ unless status_code == 200
156
+ error_model = JSON.load(response_content)
157
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
158
+ end
159
+
160
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
161
+ # Deserialize Response
162
+ if status_code == 200
163
+ begin
164
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
165
+ result_mapper = Azure::MariaDB::Mgmt::V2018_06_01_preview::Models::Configuration.mapper()
166
+ result.body = @client.deserialize(result_mapper, parsed_response)
167
+ rescue Exception => e
168
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
169
+ end
170
+ end
171
+
172
+ result
173
+ end
174
+
175
+ promise.execute
176
+ end
177
+
178
+ #
179
+ # List all the configurations in a given server.
180
+ #
181
+ # @param resource_group_name [String] The name of the resource group that
182
+ # contains the resource. You can obtain this value from the Azure Resource
183
+ # Manager API or the portal.
184
+ # @param server_name [String] The name of the server.
185
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
186
+ # will be added to the HTTP request.
187
+ #
188
+ # @return [ConfigurationListResult] operation results.
189
+ #
190
+ def list_by_server(resource_group_name, server_name, custom_headers:nil)
191
+ response = list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value!
192
+ response.body unless response.nil?
193
+ end
194
+
195
+ #
196
+ # List all the configurations in a given server.
197
+ #
198
+ # @param resource_group_name [String] The name of the resource group that
199
+ # contains the resource. You can obtain this value from the Azure Resource
200
+ # Manager API or the portal.
201
+ # @param server_name [String] The name of the server.
202
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
203
+ # will be added to the HTTP request.
204
+ #
205
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
206
+ #
207
+ def list_by_server_with_http_info(resource_group_name, server_name, custom_headers:nil)
208
+ list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value!
209
+ end
210
+
211
+ #
212
+ # List all the configurations in a given server.
213
+ #
214
+ # @param resource_group_name [String] The name of the resource group that
215
+ # contains the resource. You can obtain this value from the Azure Resource
216
+ # Manager API or the portal.
217
+ # @param server_name [String] The name of the server.
218
+ # @param [Hash{String => String}] A hash of custom headers that will be added
219
+ # to the HTTP request.
220
+ #
221
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
222
+ #
223
+ def list_by_server_async(resource_group_name, server_name, custom_headers:nil)
224
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
225
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
226
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
227
+ fail ArgumentError, 'server_name is nil' if server_name.nil?
228
+
229
+
230
+ request_headers = {}
231
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
232
+
233
+ # Set Headers
234
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
235
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
236
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/configurations'
237
+
238
+ request_url = @base_url || @client.base_url
239
+
240
+ options = {
241
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
242
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'serverName' => server_name},
243
+ query_params: {'api-version' => @client.api_version},
244
+ headers: request_headers.merge(custom_headers || {}),
245
+ base_url: request_url
246
+ }
247
+ promise = @client.make_request_async(:get, path_template, options)
248
+
249
+ promise = promise.then do |result|
250
+ http_response = result.response
251
+ status_code = http_response.status
252
+ response_content = http_response.body
253
+ unless status_code == 200
254
+ error_model = JSON.load(response_content)
255
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
256
+ end
257
+
258
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
259
+ # Deserialize Response
260
+ if status_code == 200
261
+ begin
262
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
263
+ result_mapper = Azure::MariaDB::Mgmt::V2018_06_01_preview::Models::ConfigurationListResult.mapper()
264
+ result.body = @client.deserialize(result_mapper, parsed_response)
265
+ rescue Exception => e
266
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
267
+ end
268
+ end
269
+
270
+ result
271
+ end
272
+
273
+ promise.execute
274
+ end
275
+
276
+ #
277
+ # Updates a configuration of a server.
278
+ #
279
+ # @param resource_group_name [String] The name of the resource group that
280
+ # contains the resource. You can obtain this value from the Azure Resource
281
+ # Manager API or the portal.
282
+ # @param server_name [String] The name of the server.
283
+ # @param configuration_name [String] The name of the server configuration.
284
+ # @param parameters [Configuration] The required parameters for updating a
285
+ # server configuration.
286
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
287
+ # will be added to the HTTP request.
288
+ #
289
+ # @return [Configuration] operation results.
290
+ #
291
+ def begin_create_or_update(resource_group_name, server_name, configuration_name, parameters, custom_headers:nil)
292
+ response = begin_create_or_update_async(resource_group_name, server_name, configuration_name, parameters, custom_headers:custom_headers).value!
293
+ response.body unless response.nil?
294
+ end
295
+
296
+ #
297
+ # Updates a configuration of a server.
298
+ #
299
+ # @param resource_group_name [String] The name of the resource group that
300
+ # contains the resource. You can obtain this value from the Azure Resource
301
+ # Manager API or the portal.
302
+ # @param server_name [String] The name of the server.
303
+ # @param configuration_name [String] The name of the server configuration.
304
+ # @param parameters [Configuration] The required parameters for updating a
305
+ # server configuration.
306
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
307
+ # will be added to the HTTP request.
308
+ #
309
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
310
+ #
311
+ def begin_create_or_update_with_http_info(resource_group_name, server_name, configuration_name, parameters, custom_headers:nil)
312
+ begin_create_or_update_async(resource_group_name, server_name, configuration_name, parameters, custom_headers:custom_headers).value!
313
+ end
314
+
315
+ #
316
+ # Updates a configuration of a server.
317
+ #
318
+ # @param resource_group_name [String] The name of the resource group that
319
+ # contains the resource. You can obtain this value from the Azure Resource
320
+ # Manager API or the portal.
321
+ # @param server_name [String] The name of the server.
322
+ # @param configuration_name [String] The name of the server configuration.
323
+ # @param parameters [Configuration] The required parameters for updating a
324
+ # server configuration.
325
+ # @param [Hash{String => String}] A hash of custom headers that will be added
326
+ # to the HTTP request.
327
+ #
328
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
329
+ #
330
+ def begin_create_or_update_async(resource_group_name, server_name, configuration_name, parameters, custom_headers:nil)
331
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
332
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
333
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
334
+ fail ArgumentError, 'server_name is nil' if server_name.nil?
335
+ fail ArgumentError, 'configuration_name is nil' if configuration_name.nil?
336
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
337
+
338
+
339
+ request_headers = {}
340
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
341
+
342
+ # Set Headers
343
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
344
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
345
+
346
+ # Serialize Request
347
+ request_mapper = Azure::MariaDB::Mgmt::V2018_06_01_preview::Models::Configuration.mapper()
348
+ request_content = @client.serialize(request_mapper, parameters)
349
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
350
+
351
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/configurations/{configurationName}'
352
+
353
+ request_url = @base_url || @client.base_url
354
+
355
+ options = {
356
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
357
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'serverName' => server_name,'configurationName' => configuration_name},
358
+ query_params: {'api-version' => @client.api_version},
359
+ body: request_content,
360
+ headers: request_headers.merge(custom_headers || {}),
361
+ base_url: request_url
362
+ }
363
+ promise = @client.make_request_async(:put, path_template, options)
364
+
365
+ promise = promise.then do |result|
366
+ http_response = result.response
367
+ status_code = http_response.status
368
+ response_content = http_response.body
369
+ unless status_code == 200 || status_code == 202
370
+ error_model = JSON.load(response_content)
371
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
372
+ end
373
+
374
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
375
+ # Deserialize Response
376
+ if status_code == 200
377
+ begin
378
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
379
+ result_mapper = Azure::MariaDB::Mgmt::V2018_06_01_preview::Models::Configuration.mapper()
380
+ result.body = @client.deserialize(result_mapper, parsed_response)
381
+ rescue Exception => e
382
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
383
+ end
384
+ end
385
+
386
+ result
387
+ end
388
+
389
+ promise.execute
390
+ end
391
+
392
+ end
393
+ end