azure_mgmt_mariadb 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb.rb +76 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/check_name_availability.rb +123 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/configurations.rb +393 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/databases.rb +538 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/firewall_rules.rb +538 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/location_based_performance_tier.rb +113 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/log_files.rb +123 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/maria_dbmanagement_client.rb +168 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/configuration.rb +132 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/configuration_list_result.rb +55 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/database.rb +84 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/database_list_result.rb +55 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/firewall_rule.rb +92 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/firewall_rule_list_result.rb +55 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/geo_redundant_backup.rb +16 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/log_file.rb +120 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/log_file_list_result.rb +55 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/name_availability.rb +68 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/name_availability_request.rb +57 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/operation.rb +95 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/operation_display.rb +83 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/operation_list_result.rb +55 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/operation_origin.rb +17 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/performance_tier_list_result.rb +56 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/performance_tier_properties.rb +67 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/performance_tier_service_level_objectives.rb +126 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/proxy_resource.rb +71 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/server.rb +183 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/server_for_create.rb +92 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/server_list_result.rb +55 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/server_properties_for_create.rb +85 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/server_properties_for_default_create.rb +100 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/server_properties_for_geo_restore.rb +88 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/server_properties_for_restore.rb +99 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/server_security_alert_policy.rb +166 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/server_security_alert_policy_state.rb +16 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/server_state.rb +17 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/server_update_parameters.rb +115 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/server_version.rb +16 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/sku.rb +97 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/sku_tier.rb +17 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/ssl_enforcement_enum.rb +16 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/storage_profile.rb +69 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/tracked_resource.rb +93 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/virtual_network_rule.rb +99 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/virtual_network_rule_list_result.rb +100 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/models/virtual_network_rule_state.rb +19 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/module_definition.rb +9 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/operations.rb +107 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/server_security_alert_policies.rb +287 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/servers.rb +772 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_mariadb/virtual_network_rules.rb +663 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb.rb +78 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/check_name_availability.rb +123 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/configurations.rb +393 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/databases.rb +538 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/firewall_rules.rb +538 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/location_based_performance_tier.rb +113 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/log_files.rb +123 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/maria_dbmanagement_client.rb +172 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/configuration.rb +132 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/configuration_list_result.rb +55 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/database.rb +84 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/database_list_result.rb +55 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/firewall_rule.rb +92 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/firewall_rule_list_result.rb +55 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/geo_redundant_backup.rb +16 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/log_file.rb +120 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/log_file_list_result.rb +55 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/name_availability.rb +68 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/name_availability_request.rb +57 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/operation.rb +95 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/operation_display.rb +83 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/operation_list_result.rb +55 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/operation_origin.rb +17 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/performance_tier_list_result.rb +56 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/performance_tier_properties.rb +67 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/performance_tier_service_level_objectives.rb +126 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/proxy_resource.rb +71 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/server.rb +220 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/server_for_create.rb +92 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/server_list_result.rb +55 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/server_properties_for_create.rb +86 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/server_properties_for_default_create.rb +100 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/server_properties_for_geo_restore.rb +88 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/server_properties_for_replica.rb +87 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/server_properties_for_restore.rb +99 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/server_security_alert_policy.rb +166 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/server_security_alert_policy_state.rb +16 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/server_state.rb +17 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/server_update_parameters.rb +126 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/server_version.rb +16 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/sku.rb +97 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/sku_tier.rb +17 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/ssl_enforcement_enum.rb +16 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/storage_profile.rb +69 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/tracked_resource.rb +93 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/virtual_network_rule.rb +99 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/virtual_network_rule_list_result.rb +100 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/models/virtual_network_rule_state.rb +19 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/module_definition.rb +9 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/operations.rb +107 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/replicas.rb +123 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/server_security_alert_policies.rb +287 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/servers.rb +901 -0
- data/lib/2018-06-01/generated/azure_mgmt_mariadb/virtual_network_rules.rb +663 -0
- data/lib/azure_mgmt_mariadb.rb +7 -0
- data/lib/module_definition.rb +9 -0
- data/lib/profiles/latest/mariadb_latest_profile_client.rb +40 -0
- data/lib/profiles/latest/mariadb_module_definition.rb +8 -0
- data/lib/profiles/latest/modules/mariadb_profile_module.rb +241 -0
- data/lib/version.rb +7 -0
- metadata +231 -0
@@ -0,0 +1,78 @@
|
|
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/generated/azure_mgmt_mariadb/module_definition'
|
20
|
+
require 'ms_rest_azure'
|
21
|
+
|
22
|
+
module Azure::MariaDB::Mgmt::V2018_06_01
|
23
|
+
autoload :Servers, '2018-06-01/generated/azure_mgmt_mariadb/servers.rb'
|
24
|
+
autoload :Replicas, '2018-06-01/generated/azure_mgmt_mariadb/replicas.rb'
|
25
|
+
autoload :FirewallRules, '2018-06-01/generated/azure_mgmt_mariadb/firewall_rules.rb'
|
26
|
+
autoload :VirtualNetworkRules, '2018-06-01/generated/azure_mgmt_mariadb/virtual_network_rules.rb'
|
27
|
+
autoload :Databases, '2018-06-01/generated/azure_mgmt_mariadb/databases.rb'
|
28
|
+
autoload :Configurations, '2018-06-01/generated/azure_mgmt_mariadb/configurations.rb'
|
29
|
+
autoload :LogFiles, '2018-06-01/generated/azure_mgmt_mariadb/log_files.rb'
|
30
|
+
autoload :LocationBasedPerformanceTier, '2018-06-01/generated/azure_mgmt_mariadb/location_based_performance_tier.rb'
|
31
|
+
autoload :CheckNameAvailability, '2018-06-01/generated/azure_mgmt_mariadb/check_name_availability.rb'
|
32
|
+
autoload :ServerSecurityAlertPolicies, '2018-06-01/generated/azure_mgmt_mariadb/server_security_alert_policies.rb'
|
33
|
+
autoload :Operations, '2018-06-01/generated/azure_mgmt_mariadb/operations.rb'
|
34
|
+
autoload :MariaDBManagementClient, '2018-06-01/generated/azure_mgmt_mariadb/maria_dbmanagement_client.rb'
|
35
|
+
|
36
|
+
module Models
|
37
|
+
autoload :VirtualNetworkRuleListResult, '2018-06-01/generated/azure_mgmt_mariadb/models/virtual_network_rule_list_result.rb'
|
38
|
+
autoload :FirewallRuleListResult, '2018-06-01/generated/azure_mgmt_mariadb/models/firewall_rule_list_result.rb'
|
39
|
+
autoload :NameAvailabilityRequest, '2018-06-01/generated/azure_mgmt_mariadb/models/name_availability_request.rb'
|
40
|
+
autoload :StorageProfile, '2018-06-01/generated/azure_mgmt_mariadb/models/storage_profile.rb'
|
41
|
+
autoload :ProxyResource, '2018-06-01/generated/azure_mgmt_mariadb/models/proxy_resource.rb'
|
42
|
+
autoload :NameAvailability, '2018-06-01/generated/azure_mgmt_mariadb/models/name_availability.rb'
|
43
|
+
autoload :PerformanceTierListResult, '2018-06-01/generated/azure_mgmt_mariadb/models/performance_tier_list_result.rb'
|
44
|
+
autoload :Operation, '2018-06-01/generated/azure_mgmt_mariadb/models/operation.rb'
|
45
|
+
autoload :PerformanceTierServiceLevelObjectives, '2018-06-01/generated/azure_mgmt_mariadb/models/performance_tier_service_level_objectives.rb'
|
46
|
+
autoload :ServerPropertiesForCreate, '2018-06-01/generated/azure_mgmt_mariadb/models/server_properties_for_create.rb'
|
47
|
+
autoload :LogFileListResult, '2018-06-01/generated/azure_mgmt_mariadb/models/log_file_list_result.rb'
|
48
|
+
autoload :OperationListResult, '2018-06-01/generated/azure_mgmt_mariadb/models/operation_list_result.rb'
|
49
|
+
autoload :ServerUpdateParameters, '2018-06-01/generated/azure_mgmt_mariadb/models/server_update_parameters.rb'
|
50
|
+
autoload :PerformanceTierProperties, '2018-06-01/generated/azure_mgmt_mariadb/models/performance_tier_properties.rb'
|
51
|
+
autoload :DatabaseListResult, '2018-06-01/generated/azure_mgmt_mariadb/models/database_list_result.rb'
|
52
|
+
autoload :ServerForCreate, '2018-06-01/generated/azure_mgmt_mariadb/models/server_for_create.rb'
|
53
|
+
autoload :Sku, '2018-06-01/generated/azure_mgmt_mariadb/models/sku.rb'
|
54
|
+
autoload :ConfigurationListResult, '2018-06-01/generated/azure_mgmt_mariadb/models/configuration_list_result.rb'
|
55
|
+
autoload :ServerListResult, '2018-06-01/generated/azure_mgmt_mariadb/models/server_list_result.rb'
|
56
|
+
autoload :OperationDisplay, '2018-06-01/generated/azure_mgmt_mariadb/models/operation_display.rb'
|
57
|
+
autoload :TrackedResource, '2018-06-01/generated/azure_mgmt_mariadb/models/tracked_resource.rb'
|
58
|
+
autoload :ServerPropertiesForDefaultCreate, '2018-06-01/generated/azure_mgmt_mariadb/models/server_properties_for_default_create.rb'
|
59
|
+
autoload :ServerPropertiesForRestore, '2018-06-01/generated/azure_mgmt_mariadb/models/server_properties_for_restore.rb'
|
60
|
+
autoload :ServerPropertiesForGeoRestore, '2018-06-01/generated/azure_mgmt_mariadb/models/server_properties_for_geo_restore.rb'
|
61
|
+
autoload :ServerPropertiesForReplica, '2018-06-01/generated/azure_mgmt_mariadb/models/server_properties_for_replica.rb'
|
62
|
+
autoload :Server, '2018-06-01/generated/azure_mgmt_mariadb/models/server.rb'
|
63
|
+
autoload :FirewallRule, '2018-06-01/generated/azure_mgmt_mariadb/models/firewall_rule.rb'
|
64
|
+
autoload :VirtualNetworkRule, '2018-06-01/generated/azure_mgmt_mariadb/models/virtual_network_rule.rb'
|
65
|
+
autoload :Database, '2018-06-01/generated/azure_mgmt_mariadb/models/database.rb'
|
66
|
+
autoload :Configuration, '2018-06-01/generated/azure_mgmt_mariadb/models/configuration.rb'
|
67
|
+
autoload :LogFile, '2018-06-01/generated/azure_mgmt_mariadb/models/log_file.rb'
|
68
|
+
autoload :ServerSecurityAlertPolicy, '2018-06-01/generated/azure_mgmt_mariadb/models/server_security_alert_policy.rb'
|
69
|
+
autoload :ServerVersion, '2018-06-01/generated/azure_mgmt_mariadb/models/server_version.rb'
|
70
|
+
autoload :SslEnforcementEnum, '2018-06-01/generated/azure_mgmt_mariadb/models/ssl_enforcement_enum.rb'
|
71
|
+
autoload :ServerState, '2018-06-01/generated/azure_mgmt_mariadb/models/server_state.rb'
|
72
|
+
autoload :GeoRedundantBackup, '2018-06-01/generated/azure_mgmt_mariadb/models/geo_redundant_backup.rb'
|
73
|
+
autoload :SkuTier, '2018-06-01/generated/azure_mgmt_mariadb/models/sku_tier.rb'
|
74
|
+
autoload :VirtualNetworkRuleState, '2018-06-01/generated/azure_mgmt_mariadb/models/virtual_network_rule_state.rb'
|
75
|
+
autoload :OperationOrigin, '2018-06-01/generated/azure_mgmt_mariadb/models/operation_origin.rb'
|
76
|
+
autoload :ServerSecurityAlertPolicyState, '2018-06-01/generated/azure_mgmt_mariadb/models/server_security_alert_policy_state.rb'
|
77
|
+
end
|
78
|
+
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
|
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::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::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
|
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::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::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::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::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::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
|