azure_mgmt_sql 0.11.0 → 0.12.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 +95 -46
- data/lib/generated/azure_mgmt_sql/backup_long_term_retention_policies.rb +310 -0
- data/lib/generated/azure_mgmt_sql/backup_long_term_retention_vaults.rb +300 -0
- data/lib/generated/azure_mgmt_sql/data_masking_policies.rb +248 -0
- data/lib/generated/azure_mgmt_sql/data_masking_rules.rb +262 -0
- data/lib/generated/azure_mgmt_sql/database_blob_auditing_policies.rb +264 -0
- data/lib/generated/azure_mgmt_sql/database_threat_detection_policies.rb +264 -0
- data/lib/generated/azure_mgmt_sql/database_usages.rb +129 -0
- data/lib/generated/azure_mgmt_sql/databases.rb +357 -2825
- data/lib/generated/azure_mgmt_sql/elastic_pool_activities.rb +132 -0
- data/lib/generated/azure_mgmt_sql/elastic_pool_database_activities.rb +129 -0
- data/lib/generated/azure_mgmt_sql/elastic_pools.rb +0 -417
- data/lib/generated/azure_mgmt_sql/encryption_protectors.rb +498 -0
- data/lib/generated/azure_mgmt_sql/failover_groups.rb +6 -6
- data/lib/generated/azure_mgmt_sql/geo_backup_policies.rb +359 -0
- data/lib/generated/azure_mgmt_sql/models/database_usage.rb +4 -9
- data/lib/generated/azure_mgmt_sql/models/encryption_protector.rb +3 -4
- data/lib/generated/azure_mgmt_sql/models/failover_group.rb +2 -2
- data/lib/generated/azure_mgmt_sql/models/failover_group_read_write_endpoint.rb +6 -4
- data/lib/generated/azure_mgmt_sql/models/failover_group_update.rb +93 -0
- data/lib/generated/azure_mgmt_sql/models/firewall_rule.rb +11 -14
- data/lib/generated/azure_mgmt_sql/models/metric_value.rb +1 -17
- data/lib/generated/azure_mgmt_sql/models/operation.rb +36 -3
- data/lib/generated/azure_mgmt_sql/models/operation_display.rb +20 -5
- data/lib/generated/azure_mgmt_sql/models/operation_list_result.rb +36 -6
- data/lib/generated/azure_mgmt_sql/models/operation_origin.rb +16 -0
- data/lib/generated/azure_mgmt_sql/models/partner_info.rb +1 -1
- data/lib/generated/azure_mgmt_sql/models/replication_link.rb +9 -12
- data/lib/generated/azure_mgmt_sql/models/server_azure_adadministrator.rb +11 -3
- data/lib/generated/azure_mgmt_sql/models/server_key.rb +3 -4
- data/lib/generated/azure_mgmt_sql/models/service_objective.rb +11 -3
- data/lib/generated/azure_mgmt_sql/models/service_tier_advisor.rb +11 -3
- data/lib/generated/azure_mgmt_sql/models/sync_agent.rb +137 -0
- data/lib/generated/azure_mgmt_sql/models/{sql_sub_resource.rb → sync_agent_key_properties.rb} +9 -20
- data/lib/generated/azure_mgmt_sql/models/sync_agent_linked_database.rb +126 -0
- data/lib/generated/azure_mgmt_sql/models/sync_agent_linked_database_list_result.rb +96 -0
- data/lib/generated/azure_mgmt_sql/models/sync_agent_list_result.rb +96 -0
- data/lib/generated/azure_mgmt_sql/models/sync_agent_state.rb +17 -0
- data/lib/generated/azure_mgmt_sql/models/sync_conflict_resolution_policy.rb +16 -0
- data/lib/generated/azure_mgmt_sql/models/sync_database_id_list_result.rb +96 -0
- data/lib/generated/azure_mgmt_sql/models/{sub_resource.rb → sync_database_id_properties.rb} +7 -15
- data/lib/generated/azure_mgmt_sql/models/sync_direction.rb +17 -0
- data/lib/generated/azure_mgmt_sql/models/sync_full_schema_properties.rb +66 -0
- data/lib/generated/azure_mgmt_sql/models/sync_full_schema_properties_list_result.rb +96 -0
- data/lib/generated/azure_mgmt_sql/models/sync_full_schema_table.rb +99 -0
- data/lib/generated/azure_mgmt_sql/models/sync_full_schema_table_column.rb +112 -0
- data/lib/generated/azure_mgmt_sql/models/sync_group.rb +145 -0
- data/lib/generated/azure_mgmt_sql/models/sync_group_list_result.rb +96 -0
- data/lib/generated/azure_mgmt_sql/models/sync_group_log_list_result.rb +96 -0
- data/lib/generated/azure_mgmt_sql/models/sync_group_log_properties.rb +102 -0
- data/lib/generated/azure_mgmt_sql/models/sync_group_log_type.rb +18 -0
- data/lib/generated/azure_mgmt_sql/models/sync_group_schema.rb +64 -0
- data/lib/generated/azure_mgmt_sql/models/sync_group_schema_table.rb +64 -0
- data/lib/generated/azure_mgmt_sql/models/sync_group_schema_table_column.rb +65 -0
- data/lib/generated/azure_mgmt_sql/models/sync_group_state.rb +19 -0
- data/lib/generated/azure_mgmt_sql/models/sync_member.rb +160 -0
- data/lib/generated/azure_mgmt_sql/models/sync_member_db_type.rb +16 -0
- data/lib/generated/azure_mgmt_sql/models/sync_member_list_result.rb +96 -0
- data/lib/generated/azure_mgmt_sql/models/sync_member_state.rb +32 -0
- data/lib/generated/azure_mgmt_sql/models/transparent_data_encryption.rb +22 -3
- data/lib/generated/azure_mgmt_sql/models/transparent_data_encryption_activity.rb +22 -3
- data/lib/generated/azure_mgmt_sql/models/virtual_network_rule.rb +2 -2
- data/lib/generated/azure_mgmt_sql/operations.rb +111 -4
- data/lib/generated/azure_mgmt_sql/recommended_elastic_pools.rb +3 -215
- data/lib/generated/azure_mgmt_sql/replication_links.rb +629 -0
- data/lib/generated/azure_mgmt_sql/restore_points.rb +132 -0
- data/lib/generated/azure_mgmt_sql/server_azure_adadministrators.rb +5 -5
- data/lib/generated/azure_mgmt_sql/server_connection_policies.rb +250 -0
- data/lib/generated/azure_mgmt_sql/server_keys.rb +10 -10
- data/lib/generated/azure_mgmt_sql/server_usages.rb +125 -0
- data/lib/generated/azure_mgmt_sql/servers.rb +161 -1423
- data/lib/generated/azure_mgmt_sql/service_objectives.rb +229 -0
- data/lib/generated/azure_mgmt_sql/service_tier_advisors.rb +234 -0
- data/lib/generated/azure_mgmt_sql/sql_management_client.rb +100 -9
- data/lib/generated/azure_mgmt_sql/sync_agents.rb +983 -0
- data/lib/generated/azure_mgmt_sql/sync_groups.rb +1863 -0
- data/lib/generated/azure_mgmt_sql/sync_members.rb +1290 -0
- data/lib/generated/azure_mgmt_sql/transparent_data_encryption_activities.rb +133 -0
- data/lib/generated/azure_mgmt_sql/transparent_data_encryptions.rb +264 -0
- data/lib/generated/azure_mgmt_sql/version.rb +1 -1
- metadata +55 -6
|
@@ -8,11 +8,14 @@ module Azure::ARM::SQL
|
|
|
8
8
|
#
|
|
9
9
|
# Represents a database transparent data encryption Scan.
|
|
10
10
|
#
|
|
11
|
-
class TransparentDataEncryptionActivity <
|
|
11
|
+
class TransparentDataEncryptionActivity < ProxyResource
|
|
12
12
|
|
|
13
13
|
include MsRestAzure
|
|
14
14
|
|
|
15
15
|
include MsRest::JSONable
|
|
16
|
+
# @return [String] Resource location.
|
|
17
|
+
attr_accessor :location
|
|
18
|
+
|
|
16
19
|
# @return [TransparentDataEncryptionActivityStatus] The status of the
|
|
17
20
|
# database. Possible values include: 'Encrypting', 'Decrypting'
|
|
18
21
|
attr_accessor :status
|
|
@@ -34,6 +37,14 @@ module Azure::ARM::SQL
|
|
|
34
37
|
name: 'Composite',
|
|
35
38
|
class_name: 'TransparentDataEncryptionActivity',
|
|
36
39
|
model_properties: {
|
|
40
|
+
id: {
|
|
41
|
+
required: false,
|
|
42
|
+
read_only: true,
|
|
43
|
+
serialized_name: 'id',
|
|
44
|
+
type: {
|
|
45
|
+
name: 'String'
|
|
46
|
+
}
|
|
47
|
+
},
|
|
37
48
|
name: {
|
|
38
49
|
required: false,
|
|
39
50
|
read_only: true,
|
|
@@ -42,10 +53,18 @@ module Azure::ARM::SQL
|
|
|
42
53
|
name: 'String'
|
|
43
54
|
}
|
|
44
55
|
},
|
|
45
|
-
|
|
56
|
+
type: {
|
|
46
57
|
required: false,
|
|
47
58
|
read_only: true,
|
|
48
|
-
serialized_name: '
|
|
59
|
+
serialized_name: 'type',
|
|
60
|
+
type: {
|
|
61
|
+
name: 'String'
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
location: {
|
|
65
|
+
required: false,
|
|
66
|
+
read_only: true,
|
|
67
|
+
serialized_name: 'location',
|
|
49
68
|
type: {
|
|
50
69
|
name: 'String'
|
|
51
70
|
}
|
|
@@ -13,7 +13,7 @@ module Azure::ARM::SQL
|
|
|
13
13
|
include MsRestAzure
|
|
14
14
|
|
|
15
15
|
include MsRest::JSONable
|
|
16
|
-
# @return [String] The resource
|
|
16
|
+
# @return [String] The ARM resource id of the virtual network subnet.
|
|
17
17
|
attr_accessor :virtual_network_subnet_id
|
|
18
18
|
|
|
19
19
|
|
|
@@ -54,7 +54,7 @@ module Azure::ARM::SQL
|
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
virtual_network_subnet_id: {
|
|
57
|
-
required:
|
|
57
|
+
required: true,
|
|
58
58
|
serialized_name: 'properties.virtualNetworkSubnetId',
|
|
59
59
|
type: {
|
|
60
60
|
name: 'String'
|
|
@@ -30,11 +30,11 @@ module Azure::ARM::SQL
|
|
|
30
30
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
31
31
|
# will be added to the HTTP request.
|
|
32
32
|
#
|
|
33
|
-
# @return [
|
|
33
|
+
# @return [Array<Operation>] operation results.
|
|
34
34
|
#
|
|
35
35
|
def list(custom_headers = nil)
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
first_page = list_as_lazy(custom_headers)
|
|
37
|
+
first_page.get_all_items
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
#
|
|
@@ -58,7 +58,7 @@ module Azure::ARM::SQL
|
|
|
58
58
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
59
59
|
#
|
|
60
60
|
def list_async(custom_headers = nil)
|
|
61
|
-
api_version = '
|
|
61
|
+
api_version = '2015-05-01-preview'
|
|
62
62
|
|
|
63
63
|
|
|
64
64
|
request_headers = {}
|
|
@@ -105,5 +105,112 @@ module Azure::ARM::SQL
|
|
|
105
105
|
promise.execute
|
|
106
106
|
end
|
|
107
107
|
|
|
108
|
+
#
|
|
109
|
+
# Lists all of the available SQL Rest API operations.
|
|
110
|
+
#
|
|
111
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
|
112
|
+
# to List operation.
|
|
113
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
114
|
+
# will be added to the HTTP request.
|
|
115
|
+
#
|
|
116
|
+
# @return [OperationListResult] operation results.
|
|
117
|
+
#
|
|
118
|
+
def list_next(next_page_link, custom_headers = nil)
|
|
119
|
+
response = list_next_async(next_page_link, custom_headers).value!
|
|
120
|
+
response.body unless response.nil?
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
#
|
|
124
|
+
# Lists all of the available SQL Rest API operations.
|
|
125
|
+
#
|
|
126
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
|
127
|
+
# to List operation.
|
|
128
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
129
|
+
# will be added to the HTTP request.
|
|
130
|
+
#
|
|
131
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
132
|
+
#
|
|
133
|
+
def list_next_with_http_info(next_page_link, custom_headers = nil)
|
|
134
|
+
list_next_async(next_page_link, custom_headers).value!
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
#
|
|
138
|
+
# Lists all of the available SQL Rest API operations.
|
|
139
|
+
#
|
|
140
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
|
141
|
+
# to List operation.
|
|
142
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
143
|
+
# to the HTTP request.
|
|
144
|
+
#
|
|
145
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
146
|
+
#
|
|
147
|
+
def list_next_async(next_page_link, custom_headers = nil)
|
|
148
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
request_headers = {}
|
|
152
|
+
|
|
153
|
+
# Set Headers
|
|
154
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
155
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
156
|
+
path_template = '{nextLink}'
|
|
157
|
+
|
|
158
|
+
request_url = @base_url || @client.base_url
|
|
159
|
+
|
|
160
|
+
options = {
|
|
161
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
162
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
|
163
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
164
|
+
base_url: request_url
|
|
165
|
+
}
|
|
166
|
+
promise = @client.make_request_async(:get, path_template, options)
|
|
167
|
+
|
|
168
|
+
promise = promise.then do |result|
|
|
169
|
+
http_response = result.response
|
|
170
|
+
status_code = http_response.status
|
|
171
|
+
response_content = http_response.body
|
|
172
|
+
unless status_code == 200
|
|
173
|
+
error_model = JSON.load(response_content)
|
|
174
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
178
|
+
# Deserialize Response
|
|
179
|
+
if status_code == 200
|
|
180
|
+
begin
|
|
181
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
182
|
+
result_mapper = Azure::ARM::SQL::Models::OperationListResult.mapper()
|
|
183
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
|
184
|
+
rescue Exception => e
|
|
185
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
186
|
+
end
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
result
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
promise.execute
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
#
|
|
196
|
+
# Lists all of the available SQL Rest API operations.
|
|
197
|
+
#
|
|
198
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
199
|
+
# will be added to the HTTP request.
|
|
200
|
+
#
|
|
201
|
+
# @return [OperationListResult] which provide lazy access to pages of the
|
|
202
|
+
# response.
|
|
203
|
+
#
|
|
204
|
+
def list_as_lazy(custom_headers = nil)
|
|
205
|
+
response = list_async(custom_headers).value!
|
|
206
|
+
unless response.nil?
|
|
207
|
+
page = response.body
|
|
208
|
+
page.next_method = Proc.new do |next_page_link|
|
|
209
|
+
list_next_async(next_page_link, custom_headers)
|
|
210
|
+
end
|
|
211
|
+
page
|
|
212
|
+
end
|
|
213
|
+
end
|
|
214
|
+
|
|
108
215
|
end
|
|
109
216
|
end
|
|
@@ -128,114 +128,6 @@ module Azure::ARM::SQL
|
|
|
128
128
|
promise.execute
|
|
129
129
|
end
|
|
130
130
|
|
|
131
|
-
#
|
|
132
|
-
# Gets a database inside of a recommented elastic pool.
|
|
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 recommended_elastic_pool_name [String] The name of the elastic pool to
|
|
139
|
-
# be retrieved.
|
|
140
|
-
# @param database_name [String] The name of the database to be retrieved.
|
|
141
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
142
|
-
# will be added to the HTTP request.
|
|
143
|
-
#
|
|
144
|
-
# @return [Database] operation results.
|
|
145
|
-
#
|
|
146
|
-
def get_databases(resource_group_name, server_name, recommended_elastic_pool_name, database_name, custom_headers = nil)
|
|
147
|
-
response = get_databases_async(resource_group_name, server_name, recommended_elastic_pool_name, database_name, custom_headers).value!
|
|
148
|
-
response.body unless response.nil?
|
|
149
|
-
end
|
|
150
|
-
|
|
151
|
-
#
|
|
152
|
-
# Gets a database inside of a recommented elastic pool.
|
|
153
|
-
#
|
|
154
|
-
# @param resource_group_name [String] The name of the resource group that
|
|
155
|
-
# contains the resource. You can obtain this value from the Azure Resource
|
|
156
|
-
# Manager API or the portal.
|
|
157
|
-
# @param server_name [String] The name of the server.
|
|
158
|
-
# @param recommended_elastic_pool_name [String] The name of the elastic pool to
|
|
159
|
-
# be retrieved.
|
|
160
|
-
# @param database_name [String] The name of the database to be retrieved.
|
|
161
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
162
|
-
# will be added to the HTTP request.
|
|
163
|
-
#
|
|
164
|
-
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
165
|
-
#
|
|
166
|
-
def get_databases_with_http_info(resource_group_name, server_name, recommended_elastic_pool_name, database_name, custom_headers = nil)
|
|
167
|
-
get_databases_async(resource_group_name, server_name, recommended_elastic_pool_name, database_name, custom_headers).value!
|
|
168
|
-
end
|
|
169
|
-
|
|
170
|
-
#
|
|
171
|
-
# Gets a database inside of a recommented elastic pool.
|
|
172
|
-
#
|
|
173
|
-
# @param resource_group_name [String] The name of the resource group that
|
|
174
|
-
# contains the resource. You can obtain this value from the Azure Resource
|
|
175
|
-
# Manager API or the portal.
|
|
176
|
-
# @param server_name [String] The name of the server.
|
|
177
|
-
# @param recommended_elastic_pool_name [String] The name of the elastic pool to
|
|
178
|
-
# be retrieved.
|
|
179
|
-
# @param database_name [String] The name of the database to be retrieved.
|
|
180
|
-
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
181
|
-
# to the HTTP request.
|
|
182
|
-
#
|
|
183
|
-
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
184
|
-
#
|
|
185
|
-
def get_databases_async(resource_group_name, server_name, recommended_elastic_pool_name, database_name, custom_headers = nil)
|
|
186
|
-
api_version = '2014-04-01'
|
|
187
|
-
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
|
188
|
-
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
|
189
|
-
fail ArgumentError, 'server_name is nil' if server_name.nil?
|
|
190
|
-
fail ArgumentError, 'recommended_elastic_pool_name is nil' if recommended_elastic_pool_name.nil?
|
|
191
|
-
fail ArgumentError, 'database_name is nil' if database_name.nil?
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
request_headers = {}
|
|
195
|
-
|
|
196
|
-
# Set Headers
|
|
197
|
-
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
198
|
-
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
199
|
-
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recommendedElasticPools/{recommendedElasticPoolName}/databases/{databaseName}'
|
|
200
|
-
|
|
201
|
-
request_url = @base_url || @client.base_url
|
|
202
|
-
|
|
203
|
-
options = {
|
|
204
|
-
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
205
|
-
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'serverName' => server_name,'recommendedElasticPoolName' => recommended_elastic_pool_name,'databaseName' => database_name},
|
|
206
|
-
query_params: {'api-version' => api_version},
|
|
207
|
-
headers: request_headers.merge(custom_headers || {}),
|
|
208
|
-
base_url: request_url
|
|
209
|
-
}
|
|
210
|
-
promise = @client.make_request_async(:get, path_template, options)
|
|
211
|
-
|
|
212
|
-
promise = promise.then do |result|
|
|
213
|
-
http_response = result.response
|
|
214
|
-
status_code = http_response.status
|
|
215
|
-
response_content = http_response.body
|
|
216
|
-
unless status_code == 200
|
|
217
|
-
error_model = JSON.load(response_content)
|
|
218
|
-
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
|
219
|
-
end
|
|
220
|
-
|
|
221
|
-
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
222
|
-
# Deserialize Response
|
|
223
|
-
if status_code == 200
|
|
224
|
-
begin
|
|
225
|
-
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
226
|
-
result_mapper = Azure::ARM::SQL::Models::Database.mapper()
|
|
227
|
-
result.body = @client.deserialize(result_mapper, parsed_response)
|
|
228
|
-
rescue Exception => e
|
|
229
|
-
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
230
|
-
end
|
|
231
|
-
end
|
|
232
|
-
|
|
233
|
-
result
|
|
234
|
-
end
|
|
235
|
-
|
|
236
|
-
promise.execute
|
|
237
|
-
end
|
|
238
|
-
|
|
239
131
|
#
|
|
240
132
|
# Returns recommended elastic pools.
|
|
241
133
|
#
|
|
@@ -334,111 +226,7 @@ module Azure::ARM::SQL
|
|
|
334
226
|
end
|
|
335
227
|
|
|
336
228
|
#
|
|
337
|
-
# Returns
|
|
338
|
-
#
|
|
339
|
-
# @param resource_group_name [String] The name of the resource group that
|
|
340
|
-
# contains the resource. You can obtain this value from the Azure Resource
|
|
341
|
-
# Manager API or the portal.
|
|
342
|
-
# @param server_name [String] The name of the server.
|
|
343
|
-
# @param recommended_elastic_pool_name [String] The name of the recommended
|
|
344
|
-
# elastic pool to be retrieved.
|
|
345
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
346
|
-
# will be added to the HTTP request.
|
|
347
|
-
#
|
|
348
|
-
# @return [DatabaseListResult] operation results.
|
|
349
|
-
#
|
|
350
|
-
def list_databases(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers = nil)
|
|
351
|
-
response = list_databases_async(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers).value!
|
|
352
|
-
response.body unless response.nil?
|
|
353
|
-
end
|
|
354
|
-
|
|
355
|
-
#
|
|
356
|
-
# Returns a list of databases inside a recommented elastic pool.
|
|
357
|
-
#
|
|
358
|
-
# @param resource_group_name [String] The name of the resource group that
|
|
359
|
-
# contains the resource. You can obtain this value from the Azure Resource
|
|
360
|
-
# Manager API or the portal.
|
|
361
|
-
# @param server_name [String] The name of the server.
|
|
362
|
-
# @param recommended_elastic_pool_name [String] The name of the recommended
|
|
363
|
-
# elastic pool to be retrieved.
|
|
364
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
365
|
-
# will be added to the HTTP request.
|
|
366
|
-
#
|
|
367
|
-
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
368
|
-
#
|
|
369
|
-
def list_databases_with_http_info(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers = nil)
|
|
370
|
-
list_databases_async(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers).value!
|
|
371
|
-
end
|
|
372
|
-
|
|
373
|
-
#
|
|
374
|
-
# Returns a list of databases inside a recommented elastic pool.
|
|
375
|
-
#
|
|
376
|
-
# @param resource_group_name [String] The name of the resource group that
|
|
377
|
-
# contains the resource. You can obtain this value from the Azure Resource
|
|
378
|
-
# Manager API or the portal.
|
|
379
|
-
# @param server_name [String] The name of the server.
|
|
380
|
-
# @param recommended_elastic_pool_name [String] The name of the recommended
|
|
381
|
-
# elastic pool to be retrieved.
|
|
382
|
-
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
383
|
-
# to the HTTP request.
|
|
384
|
-
#
|
|
385
|
-
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
386
|
-
#
|
|
387
|
-
def list_databases_async(resource_group_name, server_name, recommended_elastic_pool_name, custom_headers = nil)
|
|
388
|
-
api_version = '2014-04-01'
|
|
389
|
-
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
|
390
|
-
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
|
391
|
-
fail ArgumentError, 'server_name is nil' if server_name.nil?
|
|
392
|
-
fail ArgumentError, 'recommended_elastic_pool_name is nil' if recommended_elastic_pool_name.nil?
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
request_headers = {}
|
|
396
|
-
|
|
397
|
-
# Set Headers
|
|
398
|
-
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
399
|
-
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
400
|
-
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recommendedElasticPools/{recommendedElasticPoolName}/databases'
|
|
401
|
-
|
|
402
|
-
request_url = @base_url || @client.base_url
|
|
403
|
-
|
|
404
|
-
options = {
|
|
405
|
-
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
406
|
-
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'serverName' => server_name,'recommendedElasticPoolName' => recommended_elastic_pool_name},
|
|
407
|
-
query_params: {'api-version' => api_version},
|
|
408
|
-
headers: request_headers.merge(custom_headers || {}),
|
|
409
|
-
base_url: request_url
|
|
410
|
-
}
|
|
411
|
-
promise = @client.make_request_async(:get, path_template, options)
|
|
412
|
-
|
|
413
|
-
promise = promise.then do |result|
|
|
414
|
-
http_response = result.response
|
|
415
|
-
status_code = http_response.status
|
|
416
|
-
response_content = http_response.body
|
|
417
|
-
unless status_code == 200
|
|
418
|
-
error_model = JSON.load(response_content)
|
|
419
|
-
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
|
420
|
-
end
|
|
421
|
-
|
|
422
|
-
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
423
|
-
# Deserialize Response
|
|
424
|
-
if status_code == 200
|
|
425
|
-
begin
|
|
426
|
-
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
427
|
-
result_mapper = Azure::ARM::SQL::Models::DatabaseListResult.mapper()
|
|
428
|
-
result.body = @client.deserialize(result_mapper, parsed_response)
|
|
429
|
-
rescue Exception => e
|
|
430
|
-
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
431
|
-
end
|
|
432
|
-
end
|
|
433
|
-
|
|
434
|
-
result
|
|
435
|
-
end
|
|
436
|
-
|
|
437
|
-
promise.execute
|
|
438
|
-
end
|
|
439
|
-
|
|
440
|
-
#
|
|
441
|
-
# Returns a recommented elastic pool metrics.
|
|
229
|
+
# Returns recommented elastic pool metrics.
|
|
442
230
|
#
|
|
443
231
|
# @param resource_group_name [String] The name of the resource group that
|
|
444
232
|
# contains the resource. You can obtain this value from the Azure Resource
|
|
@@ -457,7 +245,7 @@ module Azure::ARM::SQL
|
|
|
457
245
|
end
|
|
458
246
|
|
|
459
247
|
#
|
|
460
|
-
# Returns
|
|
248
|
+
# Returns recommented elastic pool metrics.
|
|
461
249
|
#
|
|
462
250
|
# @param resource_group_name [String] The name of the resource group that
|
|
463
251
|
# contains the resource. You can obtain this value from the Azure Resource
|
|
@@ -475,7 +263,7 @@ module Azure::ARM::SQL
|
|
|
475
263
|
end
|
|
476
264
|
|
|
477
265
|
#
|
|
478
|
-
# Returns
|
|
266
|
+
# Returns recommented elastic pool metrics.
|
|
479
267
|
#
|
|
480
268
|
# @param resource_group_name [String] The name of the resource group that
|
|
481
269
|
# contains the resource. You can obtain this value from the Azure Resource
|