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
|
@@ -0,0 +1,132 @@
|
|
|
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 RestorePoints
|
|
14
|
+
include MsRestAzure
|
|
15
|
+
|
|
16
|
+
#
|
|
17
|
+
# Creates and initializes a new instance of the RestorePoints 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 list of database restore points.
|
|
29
|
+
#
|
|
30
|
+
# @param resource_group_name [String] The name of the resource group that
|
|
31
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
|
32
|
+
# Manager API or the portal.
|
|
33
|
+
# @param server_name [String] The name of the server.
|
|
34
|
+
# @param database_name [String] The name of the database to get available
|
|
35
|
+
# restore points.
|
|
36
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
37
|
+
# will be added to the HTTP request.
|
|
38
|
+
#
|
|
39
|
+
# @return [RestorePointListResult] operation results.
|
|
40
|
+
#
|
|
41
|
+
def list_by_database(resource_group_name, server_name, database_name, custom_headers = nil)
|
|
42
|
+
response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value!
|
|
43
|
+
response.body unless response.nil?
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
#
|
|
47
|
+
# Gets a list of database restore points.
|
|
48
|
+
#
|
|
49
|
+
# @param resource_group_name [String] The name of the resource group that
|
|
50
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
|
51
|
+
# Manager API or the portal.
|
|
52
|
+
# @param server_name [String] The name of the server.
|
|
53
|
+
# @param database_name [String] The name of the database to get available
|
|
54
|
+
# restore points.
|
|
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 list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil)
|
|
61
|
+
list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value!
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
#
|
|
65
|
+
# Gets a list of database restore points.
|
|
66
|
+
#
|
|
67
|
+
# @param resource_group_name [String] The name of the resource group that
|
|
68
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
|
69
|
+
# Manager API or the portal.
|
|
70
|
+
# @param server_name [String] The name of the server.
|
|
71
|
+
# @param database_name [String] The name of the database to get available
|
|
72
|
+
# restore points.
|
|
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 list_by_database_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}/databases/{databaseName}/restorePoints'
|
|
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::RestorePointListResult.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
|
+
end
|
|
132
|
+
end
|
|
@@ -231,8 +231,8 @@ module Azure::ARM::SQL
|
|
|
231
231
|
#
|
|
232
232
|
# @return [ServerAdministratorListResult] operation results.
|
|
233
233
|
#
|
|
234
|
-
def
|
|
235
|
-
response =
|
|
234
|
+
def list_by_server(resource_group_name, server_name, custom_headers = nil)
|
|
235
|
+
response = list_by_server_async(resource_group_name, server_name, custom_headers).value!
|
|
236
236
|
response.body unless response.nil?
|
|
237
237
|
end
|
|
238
238
|
|
|
@@ -248,8 +248,8 @@ module Azure::ARM::SQL
|
|
|
248
248
|
#
|
|
249
249
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
250
250
|
#
|
|
251
|
-
def
|
|
252
|
-
|
|
251
|
+
def list_by_server_with_http_info(resource_group_name, server_name, custom_headers = nil)
|
|
252
|
+
list_by_server_async(resource_group_name, server_name, custom_headers).value!
|
|
253
253
|
end
|
|
254
254
|
|
|
255
255
|
#
|
|
@@ -264,7 +264,7 @@ module Azure::ARM::SQL
|
|
|
264
264
|
#
|
|
265
265
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
266
266
|
#
|
|
267
|
-
def
|
|
267
|
+
def list_by_server_async(resource_group_name, server_name, custom_headers = nil)
|
|
268
268
|
api_version = '2014-04-01'
|
|
269
269
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
|
270
270
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
|
@@ -0,0 +1,250 @@
|
|
|
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 ServerConnectionPolicies
|
|
14
|
+
include MsRestAzure
|
|
15
|
+
|
|
16
|
+
#
|
|
17
|
+
# Creates and initializes a new instance of the ServerConnectionPolicies 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
|
+
# Creates or updates the server's connection policy.
|
|
29
|
+
#
|
|
30
|
+
# @param resource_group_name [String] The name of the resource group that
|
|
31
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
|
32
|
+
# Manager API or the portal.
|
|
33
|
+
# @param server_name [String] The name of the server.
|
|
34
|
+
# @param parameters [ServerConnectionPolicy] The required parameters for
|
|
35
|
+
# updating a secure connection policy.
|
|
36
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
37
|
+
# will be added to the HTTP request.
|
|
38
|
+
#
|
|
39
|
+
# @return [ServerConnectionPolicy] operation results.
|
|
40
|
+
#
|
|
41
|
+
def create_or_update(resource_group_name, server_name, parameters, custom_headers = nil)
|
|
42
|
+
response = create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value!
|
|
43
|
+
response.body unless response.nil?
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
#
|
|
47
|
+
# Creates or updates the server's connection policy.
|
|
48
|
+
#
|
|
49
|
+
# @param resource_group_name [String] The name of the resource group that
|
|
50
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
|
51
|
+
# Manager API or the portal.
|
|
52
|
+
# @param server_name [String] The name of the server.
|
|
53
|
+
# @param parameters [ServerConnectionPolicy] The required parameters for
|
|
54
|
+
# updating a secure connection policy.
|
|
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 create_or_update_with_http_info(resource_group_name, server_name, parameters, custom_headers = nil)
|
|
61
|
+
create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value!
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
#
|
|
65
|
+
# Creates or updates the server's connection policy.
|
|
66
|
+
#
|
|
67
|
+
# @param resource_group_name [String] The name of the resource group that
|
|
68
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
|
69
|
+
# Manager API or the portal.
|
|
70
|
+
# @param server_name [String] The name of the server.
|
|
71
|
+
# @param parameters [ServerConnectionPolicy] The required parameters for
|
|
72
|
+
# updating a secure connection policy.
|
|
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 create_or_update_async(resource_group_name, server_name, parameters, 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
|
+
connection_policy_name = 'default'
|
|
84
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
request_headers = {}
|
|
88
|
+
|
|
89
|
+
# Set Headers
|
|
90
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
91
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
92
|
+
|
|
93
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
|
94
|
+
|
|
95
|
+
# Serialize Request
|
|
96
|
+
request_mapper = Azure::ARM::SQL::Models::ServerConnectionPolicy.mapper()
|
|
97
|
+
request_content = @client.serialize(request_mapper, parameters)
|
|
98
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
|
99
|
+
|
|
100
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/connectionPolicies/{connectionPolicyName}'
|
|
101
|
+
|
|
102
|
+
request_url = @base_url || @client.base_url
|
|
103
|
+
|
|
104
|
+
options = {
|
|
105
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
106
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'serverName' => server_name,'connectionPolicyName' => connection_policy_name},
|
|
107
|
+
query_params: {'api-version' => api_version},
|
|
108
|
+
body: request_content,
|
|
109
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
110
|
+
base_url: request_url
|
|
111
|
+
}
|
|
112
|
+
promise = @client.make_request_async(:put, path_template, options)
|
|
113
|
+
|
|
114
|
+
promise = promise.then do |result|
|
|
115
|
+
http_response = result.response
|
|
116
|
+
status_code = http_response.status
|
|
117
|
+
response_content = http_response.body
|
|
118
|
+
unless status_code == 200 || status_code == 201
|
|
119
|
+
error_model = JSON.load(response_content)
|
|
120
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
124
|
+
# Deserialize Response
|
|
125
|
+
if status_code == 200
|
|
126
|
+
begin
|
|
127
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
128
|
+
result_mapper = Azure::ARM::SQL::Models::ServerConnectionPolicy.mapper()
|
|
129
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
|
130
|
+
rescue Exception => e
|
|
131
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
# Deserialize Response
|
|
135
|
+
if status_code == 201
|
|
136
|
+
begin
|
|
137
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
138
|
+
result_mapper = Azure::ARM::SQL::Models::ServerConnectionPolicy.mapper()
|
|
139
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
|
140
|
+
rescue Exception => e
|
|
141
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
result
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
promise.execute
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
#
|
|
152
|
+
# Gets the server's secure connection policy.
|
|
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 custom_headers [Hash{String => String}] A hash of custom headers that
|
|
159
|
+
# will be added to the HTTP request.
|
|
160
|
+
#
|
|
161
|
+
# @return [ServerConnectionPolicy] operation results.
|
|
162
|
+
#
|
|
163
|
+
def get(resource_group_name, server_name, custom_headers = nil)
|
|
164
|
+
response = get_async(resource_group_name, server_name, custom_headers).value!
|
|
165
|
+
response.body unless response.nil?
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
#
|
|
169
|
+
# Gets the server's secure connection policy.
|
|
170
|
+
#
|
|
171
|
+
# @param resource_group_name [String] The name of the resource group that
|
|
172
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
|
173
|
+
# Manager API or the portal.
|
|
174
|
+
# @param server_name [String] The name of the server.
|
|
175
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
176
|
+
# will be added to the HTTP request.
|
|
177
|
+
#
|
|
178
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
179
|
+
#
|
|
180
|
+
def get_with_http_info(resource_group_name, server_name, custom_headers = nil)
|
|
181
|
+
get_async(resource_group_name, server_name, custom_headers).value!
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
#
|
|
185
|
+
# Gets the server's secure connection policy.
|
|
186
|
+
#
|
|
187
|
+
# @param resource_group_name [String] The name of the resource group that
|
|
188
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
|
189
|
+
# Manager API or the portal.
|
|
190
|
+
# @param server_name [String] The name of the server.
|
|
191
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
192
|
+
# to the HTTP request.
|
|
193
|
+
#
|
|
194
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
195
|
+
#
|
|
196
|
+
def get_async(resource_group_name, server_name, custom_headers = nil)
|
|
197
|
+
api_version = '2014-04-01'
|
|
198
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
|
199
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
|
200
|
+
fail ArgumentError, 'server_name is nil' if server_name.nil?
|
|
201
|
+
connection_policy_name = 'default'
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
request_headers = {}
|
|
205
|
+
|
|
206
|
+
# Set Headers
|
|
207
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
208
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
209
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/connectionPolicies/{connectionPolicyName}'
|
|
210
|
+
|
|
211
|
+
request_url = @base_url || @client.base_url
|
|
212
|
+
|
|
213
|
+
options = {
|
|
214
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
215
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'serverName' => server_name,'connectionPolicyName' => connection_policy_name},
|
|
216
|
+
query_params: {'api-version' => api_version},
|
|
217
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
218
|
+
base_url: request_url
|
|
219
|
+
}
|
|
220
|
+
promise = @client.make_request_async(:get, path_template, options)
|
|
221
|
+
|
|
222
|
+
promise = promise.then do |result|
|
|
223
|
+
http_response = result.response
|
|
224
|
+
status_code = http_response.status
|
|
225
|
+
response_content = http_response.body
|
|
226
|
+
unless status_code == 200
|
|
227
|
+
error_model = JSON.load(response_content)
|
|
228
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
232
|
+
# Deserialize Response
|
|
233
|
+
if status_code == 200
|
|
234
|
+
begin
|
|
235
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
236
|
+
result_mapper = Azure::ARM::SQL::Models::ServerConnectionPolicy.mapper()
|
|
237
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
|
238
|
+
rescue Exception => e
|
|
239
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
240
|
+
end
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
result
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
promise.execute
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
end
|
|
250
|
+
end
|
|
@@ -25,7 +25,7 @@ module Azure::ARM::SQL
|
|
|
25
25
|
attr_reader :client
|
|
26
26
|
|
|
27
27
|
#
|
|
28
|
-
#
|
|
28
|
+
# Gets a list of server keys.
|
|
29
29
|
#
|
|
30
30
|
# @param resource_group_name [String] The name of the resource group that
|
|
31
31
|
# contains the resource. You can obtain this value from the Azure Resource
|
|
@@ -42,7 +42,7 @@ module Azure::ARM::SQL
|
|
|
42
42
|
end
|
|
43
43
|
|
|
44
44
|
#
|
|
45
|
-
#
|
|
45
|
+
# Gets a list of server keys.
|
|
46
46
|
#
|
|
47
47
|
# @param resource_group_name [String] The name of the resource group that
|
|
48
48
|
# contains the resource. You can obtain this value from the Azure Resource
|
|
@@ -58,7 +58,7 @@ module Azure::ARM::SQL
|
|
|
58
58
|
end
|
|
59
59
|
|
|
60
60
|
#
|
|
61
|
-
#
|
|
61
|
+
# Gets a list of server keys.
|
|
62
62
|
#
|
|
63
63
|
# @param resource_group_name [String] The name of the resource group that
|
|
64
64
|
# contains the resource. You can obtain this value from the Azure Resource
|
|
@@ -122,7 +122,7 @@ module Azure::ARM::SQL
|
|
|
122
122
|
end
|
|
123
123
|
|
|
124
124
|
#
|
|
125
|
-
#
|
|
125
|
+
# Gets a server key.
|
|
126
126
|
#
|
|
127
127
|
# @param resource_group_name [String] The name of the resource group that
|
|
128
128
|
# contains the resource. You can obtain this value from the Azure Resource
|
|
@@ -140,7 +140,7 @@ module Azure::ARM::SQL
|
|
|
140
140
|
end
|
|
141
141
|
|
|
142
142
|
#
|
|
143
|
-
#
|
|
143
|
+
# Gets a server key.
|
|
144
144
|
#
|
|
145
145
|
# @param resource_group_name [String] The name of the resource group that
|
|
146
146
|
# contains the resource. You can obtain this value from the Azure Resource
|
|
@@ -157,7 +157,7 @@ module Azure::ARM::SQL
|
|
|
157
157
|
end
|
|
158
158
|
|
|
159
159
|
#
|
|
160
|
-
#
|
|
160
|
+
# Gets a server key.
|
|
161
161
|
#
|
|
162
162
|
# @param resource_group_name [String] The name of the resource group that
|
|
163
163
|
# contains the resource. You can obtain this value from the Azure Resource
|
|
@@ -556,7 +556,7 @@ module Azure::ARM::SQL
|
|
|
556
556
|
end
|
|
557
557
|
|
|
558
558
|
#
|
|
559
|
-
#
|
|
559
|
+
# Gets a list of server keys.
|
|
560
560
|
#
|
|
561
561
|
# @param next_page_link [String] The NextLink from the previous successful call
|
|
562
562
|
# to List operation.
|
|
@@ -571,7 +571,7 @@ module Azure::ARM::SQL
|
|
|
571
571
|
end
|
|
572
572
|
|
|
573
573
|
#
|
|
574
|
-
#
|
|
574
|
+
# Gets a list of server keys.
|
|
575
575
|
#
|
|
576
576
|
# @param next_page_link [String] The NextLink from the previous successful call
|
|
577
577
|
# to List operation.
|
|
@@ -585,7 +585,7 @@ module Azure::ARM::SQL
|
|
|
585
585
|
end
|
|
586
586
|
|
|
587
587
|
#
|
|
588
|
-
#
|
|
588
|
+
# Gets a list of server keys.
|
|
589
589
|
#
|
|
590
590
|
# @param next_page_link [String] The NextLink from the previous successful call
|
|
591
591
|
# to List operation.
|
|
@@ -643,7 +643,7 @@ module Azure::ARM::SQL
|
|
|
643
643
|
end
|
|
644
644
|
|
|
645
645
|
#
|
|
646
|
-
#
|
|
646
|
+
# Gets a list of server keys.
|
|
647
647
|
#
|
|
648
648
|
# @param resource_group_name [String] The name of the resource group that
|
|
649
649
|
# contains the resource. You can obtain this value from the Azure Resource
|