azure_mgmt_sql 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/generated/azure_mgmt_sql.rb +124 -41
- data/lib/generated/azure_mgmt_sql/capabilities.rb +115 -0
- data/lib/generated/azure_mgmt_sql/databases.rb +2877 -443
- data/lib/generated/azure_mgmt_sql/elastic_pools.rb +407 -30
- data/lib/generated/azure_mgmt_sql/failover_groups.rb +1143 -0
- data/lib/generated/azure_mgmt_sql/firewall_rules.rb +443 -0
- data/lib/generated/azure_mgmt_sql/models/authentication_type.rb +16 -0
- data/lib/generated/azure_mgmt_sql/models/backup_long_term_retention_policy.rb +94 -0
- data/lib/generated/azure_mgmt_sql/models/backup_long_term_retention_policy_state.rb +16 -0
- data/lib/generated/azure_mgmt_sql/models/backup_long_term_retention_vault.rb +80 -0
- data/lib/generated/azure_mgmt_sql/models/{transparent_data_encryption_states.rb → blob_auditing_policy_state.rb} +3 -3
- data/lib/generated/azure_mgmt_sql/models/capability_status.rb +18 -0
- data/lib/generated/azure_mgmt_sql/models/check_name_availability_reason.rb +16 -0
- data/lib/generated/azure_mgmt_sql/models/check_name_availability_request.rb +59 -0
- data/lib/generated/azure_mgmt_sql/models/check_name_availability_response.rb +84 -0
- data/lib/generated/azure_mgmt_sql/models/create_mode.rb +2 -1
- data/lib/generated/azure_mgmt_sql/models/data_masking_function.rb +20 -0
- data/lib/generated/azure_mgmt_sql/models/data_masking_policy.rb +131 -0
- data/lib/generated/azure_mgmt_sql/models/data_masking_rule.rb +226 -0
- data/lib/generated/azure_mgmt_sql/models/data_masking_rule_list_result.rb +54 -0
- data/lib/generated/azure_mgmt_sql/models/data_masking_rule_state.rb +16 -0
- data/lib/generated/azure_mgmt_sql/models/{server_state.rb → data_masking_state.rb} +4 -4
- data/lib/generated/azure_mgmt_sql/models/database.rb +115 -63
- data/lib/generated/azure_mgmt_sql/models/database_blob_auditing_policy.rb +156 -0
- data/lib/generated/azure_mgmt_sql/models/{database_editions.rb → database_edition.rb} +4 -3
- data/lib/generated/azure_mgmt_sql/models/database_list_result.rb +2 -1
- data/lib/generated/azure_mgmt_sql/models/database_security_alert_policy.rb +179 -0
- data/lib/generated/azure_mgmt_sql/models/database_update.rb +464 -0
- data/lib/generated/azure_mgmt_sql/models/{database_metric.rb → database_usage.rb} +13 -11
- data/lib/generated/azure_mgmt_sql/models/{database_metric_list_result.rb → database_usage_list_result.rb} +10 -9
- data/lib/generated/azure_mgmt_sql/models/edition_capability.rb +79 -0
- data/lib/generated/azure_mgmt_sql/models/elastic_pool.rb +15 -14
- data/lib/generated/azure_mgmt_sql/models/elastic_pool_activity.rb +12 -22
- data/lib/generated/azure_mgmt_sql/models/elastic_pool_activity_list_result.rb +2 -1
- data/lib/generated/azure_mgmt_sql/models/elastic_pool_database_activity.rb +12 -22
- data/lib/generated/azure_mgmt_sql/models/elastic_pool_database_activity_list_result.rb +2 -1
- data/lib/generated/azure_mgmt_sql/models/elastic_pool_dtu_capability.rb +143 -0
- data/lib/generated/azure_mgmt_sql/models/{elastic_pool_editions.rb → elastic_pool_edition.rb} +3 -3
- data/lib/generated/azure_mgmt_sql/models/elastic_pool_edition_capability.rb +79 -0
- data/lib/generated/azure_mgmt_sql/models/elastic_pool_list_result.rb +2 -1
- data/lib/generated/azure_mgmt_sql/models/elastic_pool_per_database_max_dtu_capability.rb +79 -0
- data/lib/generated/azure_mgmt_sql/models/elastic_pool_per_database_min_dtu_capability.rb +59 -0
- data/lib/generated/azure_mgmt_sql/models/elastic_pool_state.rb +1 -1
- data/lib/generated/azure_mgmt_sql/models/elastic_pool_update.rb +152 -0
- data/lib/generated/azure_mgmt_sql/models/encryption_protector.rb +137 -0
- data/lib/generated/azure_mgmt_sql/models/encryption_protector_list_result.rb +96 -0
- data/lib/generated/azure_mgmt_sql/models/export_request.rb +101 -0
- data/lib/generated/azure_mgmt_sql/models/failover_group.rb +171 -0
- data/lib/generated/azure_mgmt_sql/models/failover_group_list_result.rb +96 -0
- data/lib/generated/azure_mgmt_sql/models/failover_group_read_only_endpoint.rb +47 -0
- data/lib/generated/azure_mgmt_sql/models/failover_group_read_write_endpoint.rb +58 -0
- data/lib/generated/azure_mgmt_sql/models/failover_group_replication_role.rb +16 -0
- data/lib/generated/azure_mgmt_sql/models/{server_firewall_rule.rb → firewall_rule.rb} +6 -5
- data/lib/generated/azure_mgmt_sql/models/{server_firewall_rule_list_result.rb → firewall_rule_list_result.rb} +9 -8
- data/lib/generated/azure_mgmt_sql/models/geo_backup_policy.rb +105 -0
- data/lib/generated/azure_mgmt_sql/models/geo_backup_policy_list_result.rb +53 -0
- data/lib/generated/azure_mgmt_sql/models/geo_backup_policy_state.rb +16 -0
- data/lib/generated/azure_mgmt_sql/models/{table_type.rb → identity_type.rb} +4 -5
- data/lib/generated/azure_mgmt_sql/models/import_export_response.rb +158 -0
- data/lib/generated/azure_mgmt_sql/models/import_extension_request.rb +134 -0
- data/lib/generated/azure_mgmt_sql/models/import_request.rb +125 -0
- data/lib/generated/azure_mgmt_sql/models/location_capabilities.rb +80 -0
- data/lib/generated/azure_mgmt_sql/models/max_size_capability.rb +74 -0
- data/lib/generated/azure_mgmt_sql/models/max_size_units.rb +18 -0
- data/lib/generated/azure_mgmt_sql/models/metric.rb +114 -0
- data/lib/generated/azure_mgmt_sql/models/metric_availability.rb +57 -0
- data/lib/generated/azure_mgmt_sql/models/metric_definition.rb +104 -0
- data/lib/generated/azure_mgmt_sql/models/metric_definition_list_result.rb +54 -0
- data/lib/generated/azure_mgmt_sql/models/metric_list_result.rb +53 -0
- data/lib/generated/azure_mgmt_sql/models/metric_name.rb +57 -0
- data/lib/generated/azure_mgmt_sql/models/metric_value.rb +117 -0
- data/lib/generated/azure_mgmt_sql/models/operation.rb +2 -1
- data/lib/generated/azure_mgmt_sql/models/operation_display.rb +2 -1
- data/lib/generated/azure_mgmt_sql/models/operation_impact.rb +3 -2
- data/lib/generated/azure_mgmt_sql/models/operation_list_result.rb +2 -1
- data/lib/generated/azure_mgmt_sql/models/partner_info.rb +68 -0
- data/lib/generated/azure_mgmt_sql/models/performance_level_unit.rb +15 -0
- data/lib/generated/azure_mgmt_sql/models/primary_aggregation_type.rb +20 -0
- data/lib/generated/azure_mgmt_sql/models/proxy_resource.rb +59 -0
- data/lib/generated/azure_mgmt_sql/models/read_only_endpoint_failover_policy.rb +16 -0
- data/lib/generated/azure_mgmt_sql/models/read_scale.rb +1 -1
- data/lib/generated/azure_mgmt_sql/models/read_write_endpoint_failover_policy.rb +16 -0
- data/lib/generated/azure_mgmt_sql/models/recommended_elastic_pool.rb +9 -29
- data/lib/generated/azure_mgmt_sql/models/recommended_elastic_pool_list_metrics_result.rb +2 -1
- data/lib/generated/azure_mgmt_sql/models/recommended_elastic_pool_list_result.rb +2 -1
- data/lib/generated/azure_mgmt_sql/models/recommended_elastic_pool_metric.rb +2 -1
- data/lib/generated/azure_mgmt_sql/models/recommended_index.rb +13 -33
- data/lib/generated/azure_mgmt_sql/models/{recommended_index_actions.rb → recommended_index_action.rb} +3 -3
- data/lib/generated/azure_mgmt_sql/models/{recommended_index_states.rb → recommended_index_state.rb} +3 -3
- data/lib/generated/azure_mgmt_sql/models/{recommended_index_types.rb → recommended_index_type.rb} +3 -3
- data/lib/generated/azure_mgmt_sql/models/recoverable_database.rb +104 -0
- data/lib/generated/azure_mgmt_sql/models/recoverable_database_list_result.rb +53 -0
- data/lib/generated/azure_mgmt_sql/models/replication_link.rb +3 -2
- data/lib/generated/azure_mgmt_sql/models/replication_link_list_result.rb +2 -1
- data/lib/generated/azure_mgmt_sql/models/replication_role.rb +1 -1
- data/lib/generated/azure_mgmt_sql/models/replication_state.rb +1 -1
- data/lib/generated/azure_mgmt_sql/models/resource_identity.rb +69 -0
- data/lib/generated/azure_mgmt_sql/models/restorable_dropped_database.rb +159 -0
- data/lib/generated/azure_mgmt_sql/models/restorable_dropped_database_list_result.rb +54 -0
- data/lib/generated/azure_mgmt_sql/models/restore_point.rb +10 -30
- data/lib/generated/azure_mgmt_sql/models/restore_point_list_result.rb +4 -4
- data/lib/generated/azure_mgmt_sql/models/{restore_point_types.rb → restore_point_type.rb} +3 -3
- data/lib/generated/azure_mgmt_sql/models/sample_name.rb +1 -1
- data/lib/generated/azure_mgmt_sql/models/security_alert_policy_email_account_admins.rb +16 -0
- data/lib/generated/azure_mgmt_sql/models/security_alert_policy_state.rb +17 -0
- data/lib/generated/azure_mgmt_sql/models/security_alert_policy_use_server_default.rb +16 -0
- data/lib/generated/azure_mgmt_sql/models/server.rb +38 -56
- data/lib/generated/azure_mgmt_sql/models/server_administrator_list_result.rb +54 -0
- data/lib/generated/azure_mgmt_sql/models/server_azure_adadministrator.rb +94 -0
- data/lib/generated/azure_mgmt_sql/models/server_communication_link.rb +103 -0
- data/lib/generated/azure_mgmt_sql/models/server_communication_link_list_result.rb +54 -0
- data/lib/generated/azure_mgmt_sql/models/{schema.rb → server_connection_policy.rb} +33 -38
- data/lib/generated/azure_mgmt_sql/models/server_connection_type.rb +17 -0
- data/lib/generated/azure_mgmt_sql/models/server_key.rb +135 -0
- data/lib/generated/azure_mgmt_sql/models/server_key_list_result.rb +96 -0
- data/lib/generated/azure_mgmt_sql/models/server_key_type.rb +16 -0
- data/lib/generated/azure_mgmt_sql/models/server_list_result.rb +48 -4
- data/lib/generated/azure_mgmt_sql/models/server_update.rb +106 -0
- data/lib/generated/azure_mgmt_sql/models/{server_metric.rb → server_usage.rb} +6 -5
- data/lib/generated/azure_mgmt_sql/models/{server_metric_list_result.rb → server_usage_list_result.rb} +9 -9
- data/lib/generated/azure_mgmt_sql/models/server_version_capability.rb +99 -0
- data/lib/generated/azure_mgmt_sql/models/service_objective.rb +3 -2
- data/lib/generated/azure_mgmt_sql/models/service_objective_capability.rb +127 -0
- data/lib/generated/azure_mgmt_sql/models/service_objective_list_result.rb +2 -1
- data/lib/generated/azure_mgmt_sql/models/service_objective_name.rb +2 -1
- data/lib/generated/azure_mgmt_sql/models/service_tier_advisor.rb +3 -2
- data/lib/generated/azure_mgmt_sql/models/service_tier_advisor_list_result.rb +2 -1
- data/lib/generated/azure_mgmt_sql/models/slo_usage_metric.rb +8 -3
- data/lib/generated/azure_mgmt_sql/models/sql_sub_resource.rb +3 -2
- data/lib/generated/azure_mgmt_sql/models/storage_key_type.rb +16 -0
- data/lib/generated/azure_mgmt_sql/models/sub_resource.rb +54 -0
- data/lib/generated/azure_mgmt_sql/models/{column.rb → tracked_resource.rb} +19 -23
- data/lib/generated/azure_mgmt_sql/models/transparent_data_encryption.rb +6 -5
- data/lib/generated/azure_mgmt_sql/models/transparent_data_encryption_activity.rb +4 -3
- data/lib/generated/azure_mgmt_sql/models/transparent_data_encryption_activity_list_result.rb +2 -1
- data/lib/generated/azure_mgmt_sql/models/{transparent_data_encryption_activity_states.rb → transparent_data_encryption_activity_status.rb} +3 -3
- data/lib/generated/azure_mgmt_sql/models/transparent_data_encryption_status.rb +16 -0
- data/lib/generated/azure_mgmt_sql/models/unit_definition_type.rb +20 -0
- data/lib/generated/azure_mgmt_sql/models/unit_type.rb +20 -0
- data/lib/generated/azure_mgmt_sql/models/virtual_network_rule.rb +69 -0
- data/lib/generated/azure_mgmt_sql/models/virtual_network_rule_list_result.rb +96 -0
- data/lib/generated/azure_mgmt_sql/module_definition.rb +1 -1
- data/lib/generated/azure_mgmt_sql/operations.rb +109 -0
- data/lib/generated/azure_mgmt_sql/recommended_elastic_pools.rb +21 -22
- data/lib/generated/azure_mgmt_sql/recoverable_databases.rb +229 -0
- data/lib/generated/azure_mgmt_sql/restorable_dropped_databases.rb +229 -0
- data/lib/generated/azure_mgmt_sql/server_azure_adadministrators.rb +575 -0
- data/lib/generated/azure_mgmt_sql/server_communication_links.rb +496 -0
- data/lib/generated/azure_mgmt_sql/server_keys.rb +670 -0
- data/lib/generated/azure_mgmt_sql/servers.rb +1366 -257
- data/lib/generated/azure_mgmt_sql/sql_management_client.rb +44 -85
- data/lib/generated/azure_mgmt_sql/version.rb +2 -2
- data/lib/generated/azure_mgmt_sql/virtual_network_rules.rb +663 -0
- metadata +110 -27
- data/lib/generated/azure_mgmt_sql/models/server_version.rb +0 -16
- data/lib/generated/azure_mgmt_sql/models/table.rb +0 -131
- data/lib/generated/azure_mgmt_sql/models/target_elastic_pool_editions.rb +0 -17
- data/lib/generated/azure_mgmt_sql/models/upgrade_hint.rb +0 -54
- data/lib/generated/azure_mgmt_sql/models/upgrade_recommended_elastic_pool_properties.rb +0 -131
@@ -0,0 +1,96 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::SQL
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# A list of virtual network rules.
|
10
|
+
#
|
11
|
+
class VirtualNetworkRuleListResult
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
include MsRest::JSONable
|
16
|
+
# @return [Array<VirtualNetworkRule>] Array of results.
|
17
|
+
attr_accessor :value
|
18
|
+
|
19
|
+
# @return [String] Link to retrieve next page of results.
|
20
|
+
attr_accessor :next_link
|
21
|
+
|
22
|
+
# return [Proc] with next page method call.
|
23
|
+
attr_accessor :next_method
|
24
|
+
|
25
|
+
#
|
26
|
+
# Gets the rest of the items for the request, enabling auto-pagination.
|
27
|
+
#
|
28
|
+
# @return [Array<VirtualNetworkRule>] operation results.
|
29
|
+
#
|
30
|
+
def get_all_items
|
31
|
+
items = @value
|
32
|
+
page = self
|
33
|
+
while page.next_link != nil do
|
34
|
+
page = page.get_next_page
|
35
|
+
items.concat(page.value)
|
36
|
+
end
|
37
|
+
items
|
38
|
+
end
|
39
|
+
|
40
|
+
#
|
41
|
+
# Gets the next page of results.
|
42
|
+
#
|
43
|
+
# @return [VirtualNetworkRuleListResult] with next page content.
|
44
|
+
#
|
45
|
+
def get_next_page
|
46
|
+
response = @next_method.call(@next_link).value! unless @next_method.nil?
|
47
|
+
unless response.nil?
|
48
|
+
@next_link = response.body.next_link
|
49
|
+
@value = response.body.value
|
50
|
+
self
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
#
|
55
|
+
# Mapper for VirtualNetworkRuleListResult class as Ruby Hash.
|
56
|
+
# This will be used for serialization/deserialization.
|
57
|
+
#
|
58
|
+
def self.mapper()
|
59
|
+
{
|
60
|
+
required: false,
|
61
|
+
serialized_name: 'VirtualNetworkRuleListResult',
|
62
|
+
type: {
|
63
|
+
name: 'Composite',
|
64
|
+
class_name: 'VirtualNetworkRuleListResult',
|
65
|
+
model_properties: {
|
66
|
+
value: {
|
67
|
+
required: false,
|
68
|
+
read_only: true,
|
69
|
+
serialized_name: 'value',
|
70
|
+
type: {
|
71
|
+
name: 'Sequence',
|
72
|
+
element: {
|
73
|
+
required: false,
|
74
|
+
serialized_name: 'VirtualNetworkRuleElementType',
|
75
|
+
type: {
|
76
|
+
name: 'Composite',
|
77
|
+
class_name: 'VirtualNetworkRule'
|
78
|
+
}
|
79
|
+
}
|
80
|
+
}
|
81
|
+
},
|
82
|
+
next_link: {
|
83
|
+
required: false,
|
84
|
+
read_only: true,
|
85
|
+
serialized_name: 'nextLink',
|
86
|
+
type: {
|
87
|
+
name: 'String'
|
88
|
+
}
|
89
|
+
}
|
90
|
+
}
|
91
|
+
}
|
92
|
+
}
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
@@ -0,0 +1,109 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::SQL
|
7
|
+
#
|
8
|
+
# The Azure SQL Database management API provides a RESTful set of web
|
9
|
+
# services that interact with Azure SQL Database services to manage your
|
10
|
+
# databases. The API enables you to create, retrieve, update, and delete
|
11
|
+
# databases.
|
12
|
+
#
|
13
|
+
class Operations
|
14
|
+
include MsRestAzure
|
15
|
+
|
16
|
+
#
|
17
|
+
# Creates and initializes a new instance of the Operations class.
|
18
|
+
# @param client service class for accessing basic functionality.
|
19
|
+
#
|
20
|
+
def initialize(client)
|
21
|
+
@client = client
|
22
|
+
end
|
23
|
+
|
24
|
+
# @return [SqlManagementClient] reference to the SqlManagementClient
|
25
|
+
attr_reader :client
|
26
|
+
|
27
|
+
#
|
28
|
+
# Lists all of the available SQL Rest API operations.
|
29
|
+
#
|
30
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
31
|
+
# will be added to the HTTP request.
|
32
|
+
#
|
33
|
+
# @return [OperationListResult] operation results.
|
34
|
+
#
|
35
|
+
def list(custom_headers = nil)
|
36
|
+
response = list_async(custom_headers).value!
|
37
|
+
response.body unless response.nil?
|
38
|
+
end
|
39
|
+
|
40
|
+
#
|
41
|
+
# Lists all of the available SQL Rest API operations.
|
42
|
+
#
|
43
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
44
|
+
# will be added to the HTTP request.
|
45
|
+
#
|
46
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
47
|
+
#
|
48
|
+
def list_with_http_info(custom_headers = nil)
|
49
|
+
list_async(custom_headers).value!
|
50
|
+
end
|
51
|
+
|
52
|
+
#
|
53
|
+
# Lists all of the available SQL Rest API operations.
|
54
|
+
#
|
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(custom_headers = nil)
|
61
|
+
api_version = '2014-04-01'
|
62
|
+
|
63
|
+
|
64
|
+
request_headers = {}
|
65
|
+
|
66
|
+
# Set Headers
|
67
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
68
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
69
|
+
path_template = 'providers/Microsoft.Sql/operations'
|
70
|
+
|
71
|
+
request_url = @base_url || @client.base_url
|
72
|
+
|
73
|
+
options = {
|
74
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
75
|
+
query_params: {'api-version' => api_version},
|
76
|
+
headers: request_headers.merge(custom_headers || {}),
|
77
|
+
base_url: request_url
|
78
|
+
}
|
79
|
+
promise = @client.make_request_async(:get, path_template, options)
|
80
|
+
|
81
|
+
promise = promise.then do |result|
|
82
|
+
http_response = result.response
|
83
|
+
status_code = http_response.status
|
84
|
+
response_content = http_response.body
|
85
|
+
unless status_code == 200
|
86
|
+
error_model = JSON.load(response_content)
|
87
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
88
|
+
end
|
89
|
+
|
90
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
91
|
+
# Deserialize Response
|
92
|
+
if status_code == 200
|
93
|
+
begin
|
94
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
95
|
+
result_mapper = Azure::ARM::SQL::Models::OperationListResult.mapper()
|
96
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
97
|
+
rescue Exception => e
|
98
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
result
|
103
|
+
end
|
104
|
+
|
105
|
+
promise.execute
|
106
|
+
end
|
107
|
+
|
108
|
+
end
|
109
|
+
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 1.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
@@ -11,7 +11,6 @@ module Azure::ARM::SQL
|
|
11
11
|
# databases.
|
12
12
|
#
|
13
13
|
class RecommendedElasticPools
|
14
|
-
include Azure::ARM::SQL::Models
|
15
14
|
include MsRestAzure
|
16
15
|
|
17
16
|
#
|
@@ -89,7 +88,7 @@ module Azure::ARM::SQL
|
|
89
88
|
# Set Headers
|
90
89
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
91
90
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
92
|
-
path_template = '
|
91
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recommendedElasticPools/{recommendedElasticPoolName}'
|
93
92
|
|
94
93
|
request_url = @base_url || @client.base_url
|
95
94
|
|
@@ -116,8 +115,8 @@ module Azure::ARM::SQL
|
|
116
115
|
if status_code == 200
|
117
116
|
begin
|
118
117
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
119
|
-
result_mapper = RecommendedElasticPool.mapper()
|
120
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
118
|
+
result_mapper = Azure::ARM::SQL::Models::RecommendedElasticPool.mapper()
|
119
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
121
120
|
rescue Exception => e
|
122
121
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
123
122
|
end
|
@@ -197,7 +196,7 @@ module Azure::ARM::SQL
|
|
197
196
|
# Set Headers
|
198
197
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
199
198
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
200
|
-
path_template = '
|
199
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recommendedElasticPools/{recommendedElasticPoolName}/databases/{databaseName}'
|
201
200
|
|
202
201
|
request_url = @base_url || @client.base_url
|
203
202
|
|
@@ -224,8 +223,8 @@ module Azure::ARM::SQL
|
|
224
223
|
if status_code == 200
|
225
224
|
begin
|
226
225
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
227
|
-
result_mapper = Database.mapper()
|
228
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
226
|
+
result_mapper = Azure::ARM::SQL::Models::Database.mapper()
|
227
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
229
228
|
rescue Exception => e
|
230
229
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
231
230
|
end
|
@@ -249,8 +248,8 @@ module Azure::ARM::SQL
|
|
249
248
|
#
|
250
249
|
# @return [RecommendedElasticPoolListResult] operation results.
|
251
250
|
#
|
252
|
-
def
|
253
|
-
response =
|
251
|
+
def list_by_server(resource_group_name, server_name, custom_headers = nil)
|
252
|
+
response = list_by_server_async(resource_group_name, server_name, custom_headers).value!
|
254
253
|
response.body unless response.nil?
|
255
254
|
end
|
256
255
|
|
@@ -266,8 +265,8 @@ module Azure::ARM::SQL
|
|
266
265
|
#
|
267
266
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
268
267
|
#
|
269
|
-
def
|
270
|
-
|
268
|
+
def list_by_server_with_http_info(resource_group_name, server_name, custom_headers = nil)
|
269
|
+
list_by_server_async(resource_group_name, server_name, custom_headers).value!
|
271
270
|
end
|
272
271
|
|
273
272
|
#
|
@@ -282,7 +281,7 @@ module Azure::ARM::SQL
|
|
282
281
|
#
|
283
282
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
284
283
|
#
|
285
|
-
def
|
284
|
+
def list_by_server_async(resource_group_name, server_name, custom_headers = nil)
|
286
285
|
api_version = '2014-04-01'
|
287
286
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
288
287
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
@@ -294,7 +293,7 @@ module Azure::ARM::SQL
|
|
294
293
|
# Set Headers
|
295
294
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
296
295
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
297
|
-
path_template = '
|
296
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recommendedElasticPools'
|
298
297
|
|
299
298
|
request_url = @base_url || @client.base_url
|
300
299
|
|
@@ -321,8 +320,8 @@ module Azure::ARM::SQL
|
|
321
320
|
if status_code == 200
|
322
321
|
begin
|
323
322
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
324
|
-
result_mapper = RecommendedElasticPoolListResult.mapper()
|
325
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
323
|
+
result_mapper = Azure::ARM::SQL::Models::RecommendedElasticPoolListResult.mapper()
|
324
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
326
325
|
rescue Exception => e
|
327
326
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
328
327
|
end
|
@@ -398,7 +397,7 @@ module Azure::ARM::SQL
|
|
398
397
|
# Set Headers
|
399
398
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
400
399
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
401
|
-
path_template = '
|
400
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recommendedElasticPools/{recommendedElasticPoolName}/databases'
|
402
401
|
|
403
402
|
request_url = @base_url || @client.base_url
|
404
403
|
|
@@ -425,8 +424,8 @@ module Azure::ARM::SQL
|
|
425
424
|
if status_code == 200
|
426
425
|
begin
|
427
426
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
428
|
-
result_mapper = DatabaseListResult.mapper()
|
429
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
427
|
+
result_mapper = Azure::ARM::SQL::Models::DatabaseListResult.mapper()
|
428
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
430
429
|
rescue Exception => e
|
431
430
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
432
431
|
end
|
@@ -502,7 +501,7 @@ module Azure::ARM::SQL
|
|
502
501
|
# Set Headers
|
503
502
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
504
503
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
505
|
-
path_template = '
|
504
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recommendedElasticPools/{recommendedElasticPoolName}/metrics'
|
506
505
|
|
507
506
|
request_url = @base_url || @client.base_url
|
508
507
|
|
@@ -529,8 +528,8 @@ module Azure::ARM::SQL
|
|
529
528
|
if status_code == 200
|
530
529
|
begin
|
531
530
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
532
|
-
result_mapper = RecommendedElasticPoolListMetricsResult.mapper()
|
533
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
531
|
+
result_mapper = Azure::ARM::SQL::Models::RecommendedElasticPoolListMetricsResult.mapper()
|
532
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
534
533
|
rescue Exception => e
|
535
534
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
536
535
|
end
|
@@ -0,0 +1,229 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::SQL
|
7
|
+
#
|
8
|
+
# The Azure SQL Database management API provides a RESTful set of web
|
9
|
+
# services that interact with Azure SQL Database services to manage your
|
10
|
+
# databases. The API enables you to create, retrieve, update, and delete
|
11
|
+
# databases.
|
12
|
+
#
|
13
|
+
class RecoverableDatabases
|
14
|
+
include MsRestAzure
|
15
|
+
|
16
|
+
#
|
17
|
+
# Creates and initializes a new instance of the RecoverableDatabases class.
|
18
|
+
# @param client service class for accessing basic functionality.
|
19
|
+
#
|
20
|
+
def initialize(client)
|
21
|
+
@client = client
|
22
|
+
end
|
23
|
+
|
24
|
+
# @return [SqlManagementClient] reference to the SqlManagementClient
|
25
|
+
attr_reader :client
|
26
|
+
|
27
|
+
#
|
28
|
+
# Gets a recoverable database, which is a resource representing a database's
|
29
|
+
# geo backup
|
30
|
+
#
|
31
|
+
# @param resource_group_name [String] The name of the resource group that
|
32
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
33
|
+
# Manager API or the portal.
|
34
|
+
# @param server_name [String] The name of the server.
|
35
|
+
# @param database_name [String] The name of the database
|
36
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
37
|
+
# will be added to the HTTP request.
|
38
|
+
#
|
39
|
+
# @return [RecoverableDatabase] operation results.
|
40
|
+
#
|
41
|
+
def get(resource_group_name, server_name, database_name, custom_headers = nil)
|
42
|
+
response = get_async(resource_group_name, server_name, database_name, custom_headers).value!
|
43
|
+
response.body unless response.nil?
|
44
|
+
end
|
45
|
+
|
46
|
+
#
|
47
|
+
# Gets a recoverable database, which is a resource representing a database's
|
48
|
+
# geo backup
|
49
|
+
#
|
50
|
+
# @param resource_group_name [String] The name of the resource group that
|
51
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
52
|
+
# Manager API or the portal.
|
53
|
+
# @param server_name [String] The name of the server.
|
54
|
+
# @param database_name [String] The name of the database
|
55
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
56
|
+
# will be added to the HTTP request.
|
57
|
+
#
|
58
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
59
|
+
#
|
60
|
+
def get_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil)
|
61
|
+
get_async(resource_group_name, server_name, database_name, custom_headers).value!
|
62
|
+
end
|
63
|
+
|
64
|
+
#
|
65
|
+
# Gets a recoverable database, which is a resource representing a database's
|
66
|
+
# geo backup
|
67
|
+
#
|
68
|
+
# @param resource_group_name [String] The name of the resource group that
|
69
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
70
|
+
# Manager API or the portal.
|
71
|
+
# @param server_name [String] The name of the server.
|
72
|
+
# @param database_name [String] The name of the database
|
73
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
74
|
+
# to the HTTP request.
|
75
|
+
#
|
76
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
77
|
+
#
|
78
|
+
def get_async(resource_group_name, server_name, database_name, custom_headers = nil)
|
79
|
+
api_version = '2014-04-01'
|
80
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
81
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
82
|
+
fail ArgumentError, 'server_name is nil' if server_name.nil?
|
83
|
+
fail ArgumentError, 'database_name is nil' if database_name.nil?
|
84
|
+
|
85
|
+
|
86
|
+
request_headers = {}
|
87
|
+
|
88
|
+
# Set Headers
|
89
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
90
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
91
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases/{databaseName}'
|
92
|
+
|
93
|
+
request_url = @base_url || @client.base_url
|
94
|
+
|
95
|
+
options = {
|
96
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
97
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name},
|
98
|
+
query_params: {'api-version' => api_version},
|
99
|
+
headers: request_headers.merge(custom_headers || {}),
|
100
|
+
base_url: request_url
|
101
|
+
}
|
102
|
+
promise = @client.make_request_async(:get, path_template, options)
|
103
|
+
|
104
|
+
promise = promise.then do |result|
|
105
|
+
http_response = result.response
|
106
|
+
status_code = http_response.status
|
107
|
+
response_content = http_response.body
|
108
|
+
unless status_code == 200
|
109
|
+
error_model = JSON.load(response_content)
|
110
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
111
|
+
end
|
112
|
+
|
113
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
114
|
+
# Deserialize Response
|
115
|
+
if status_code == 200
|
116
|
+
begin
|
117
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
118
|
+
result_mapper = Azure::ARM::SQL::Models::RecoverableDatabase.mapper()
|
119
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
120
|
+
rescue Exception => e
|
121
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
result
|
126
|
+
end
|
127
|
+
|
128
|
+
promise.execute
|
129
|
+
end
|
130
|
+
|
131
|
+
#
|
132
|
+
# Gets a list of recoverable databases
|
133
|
+
#
|
134
|
+
# @param resource_group_name [String] The name of the resource group that
|
135
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
136
|
+
# Manager API or the portal.
|
137
|
+
# @param server_name [String] The name of the server.
|
138
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
139
|
+
# will be added to the HTTP request.
|
140
|
+
#
|
141
|
+
# @return [RecoverableDatabaseListResult] operation results.
|
142
|
+
#
|
143
|
+
def list_by_server(resource_group_name, server_name, custom_headers = nil)
|
144
|
+
response = list_by_server_async(resource_group_name, server_name, custom_headers).value!
|
145
|
+
response.body unless response.nil?
|
146
|
+
end
|
147
|
+
|
148
|
+
#
|
149
|
+
# Gets a list of recoverable databases
|
150
|
+
#
|
151
|
+
# @param resource_group_name [String] The name of the resource group that
|
152
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
153
|
+
# Manager API or the portal.
|
154
|
+
# @param server_name [String] The name of the server.
|
155
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
156
|
+
# will be added to the HTTP request.
|
157
|
+
#
|
158
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
159
|
+
#
|
160
|
+
def list_by_server_with_http_info(resource_group_name, server_name, custom_headers = nil)
|
161
|
+
list_by_server_async(resource_group_name, server_name, custom_headers).value!
|
162
|
+
end
|
163
|
+
|
164
|
+
#
|
165
|
+
# Gets a list of recoverable databases
|
166
|
+
#
|
167
|
+
# @param resource_group_name [String] The name of the resource group that
|
168
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
169
|
+
# Manager API or the portal.
|
170
|
+
# @param server_name [String] The name of the server.
|
171
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
172
|
+
# to the HTTP request.
|
173
|
+
#
|
174
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
175
|
+
#
|
176
|
+
def list_by_server_async(resource_group_name, server_name, custom_headers = nil)
|
177
|
+
api_version = '2014-04-01'
|
178
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
179
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
180
|
+
fail ArgumentError, 'server_name is nil' if server_name.nil?
|
181
|
+
|
182
|
+
|
183
|
+
request_headers = {}
|
184
|
+
|
185
|
+
# Set Headers
|
186
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
187
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
188
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases'
|
189
|
+
|
190
|
+
request_url = @base_url || @client.base_url
|
191
|
+
|
192
|
+
options = {
|
193
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
194
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'serverName' => server_name},
|
195
|
+
query_params: {'api-version' => api_version},
|
196
|
+
headers: request_headers.merge(custom_headers || {}),
|
197
|
+
base_url: request_url
|
198
|
+
}
|
199
|
+
promise = @client.make_request_async(:get, path_template, options)
|
200
|
+
|
201
|
+
promise = promise.then do |result|
|
202
|
+
http_response = result.response
|
203
|
+
status_code = http_response.status
|
204
|
+
response_content = http_response.body
|
205
|
+
unless status_code == 200
|
206
|
+
error_model = JSON.load(response_content)
|
207
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
208
|
+
end
|
209
|
+
|
210
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
211
|
+
# Deserialize Response
|
212
|
+
if status_code == 200
|
213
|
+
begin
|
214
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
215
|
+
result_mapper = Azure::ARM::SQL::Models::RecoverableDatabaseListResult.mapper()
|
216
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
217
|
+
rescue Exception => e
|
218
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
219
|
+
end
|
220
|
+
end
|
221
|
+
|
222
|
+
result
|
223
|
+
end
|
224
|
+
|
225
|
+
promise.execute
|
226
|
+
end
|
227
|
+
|
228
|
+
end
|
229
|
+
end
|