azure_mgmt_sql 0.11.0 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- 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 ElasticPoolActivities
|
14
|
+
include MsRestAzure
|
15
|
+
|
16
|
+
#
|
17
|
+
# Creates and initializes a new instance of the ElasticPoolActivities 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
|
+
# Returns elastic pool activities.
|
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 elastic_pool_name [String] The name of the elastic pool for which to
|
35
|
+
# get the current activity.
|
36
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
37
|
+
# will be added to the HTTP request.
|
38
|
+
#
|
39
|
+
# @return [ElasticPoolActivityListResult] operation results.
|
40
|
+
#
|
41
|
+
def list_by_elastic_pool(resource_group_name, server_name, elastic_pool_name, custom_headers = nil)
|
42
|
+
response = list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, custom_headers).value!
|
43
|
+
response.body unless response.nil?
|
44
|
+
end
|
45
|
+
|
46
|
+
#
|
47
|
+
# Returns elastic pool activities.
|
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 elastic_pool_name [String] The name of the elastic pool for which to
|
54
|
+
# get the current activity.
|
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_elastic_pool_with_http_info(resource_group_name, server_name, elastic_pool_name, custom_headers = nil)
|
61
|
+
list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, custom_headers).value!
|
62
|
+
end
|
63
|
+
|
64
|
+
#
|
65
|
+
# Returns elastic pool activities.
|
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 elastic_pool_name [String] The name of the elastic pool for which to
|
72
|
+
# get the current activity.
|
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_elastic_pool_async(resource_group_name, server_name, elastic_pool_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, 'elastic_pool_name is nil' if elastic_pool_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}/elasticPools/{elasticPoolName}/elasticPoolActivity'
|
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,'elasticPoolName' => elastic_pool_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::ElasticPoolActivityListResult.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
|
@@ -0,0 +1,129 @@
|
|
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 ElasticPoolDatabaseActivities
|
14
|
+
include MsRestAzure
|
15
|
+
|
16
|
+
#
|
17
|
+
# Creates and initializes a new instance of the ElasticPoolDatabaseActivities 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
|
+
# Returns activity on databases inside of an elastic pool.
|
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 elastic_pool_name [String] The name of the elastic pool.
|
35
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
36
|
+
# will be added to the HTTP request.
|
37
|
+
#
|
38
|
+
# @return [ElasticPoolDatabaseActivityListResult] operation results.
|
39
|
+
#
|
40
|
+
def list_by_elastic_pool(resource_group_name, server_name, elastic_pool_name, custom_headers = nil)
|
41
|
+
response = list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, custom_headers).value!
|
42
|
+
response.body unless response.nil?
|
43
|
+
end
|
44
|
+
|
45
|
+
#
|
46
|
+
# Returns activity on databases inside of an elastic pool.
|
47
|
+
#
|
48
|
+
# @param resource_group_name [String] The name of the resource group that
|
49
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
50
|
+
# Manager API or the portal.
|
51
|
+
# @param server_name [String] The name of the server.
|
52
|
+
# @param elastic_pool_name [String] The name of the elastic pool.
|
53
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
54
|
+
# will be added to the HTTP request.
|
55
|
+
#
|
56
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
57
|
+
#
|
58
|
+
def list_by_elastic_pool_with_http_info(resource_group_name, server_name, elastic_pool_name, custom_headers = nil)
|
59
|
+
list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, custom_headers).value!
|
60
|
+
end
|
61
|
+
|
62
|
+
#
|
63
|
+
# Returns activity on databases inside of an elastic pool.
|
64
|
+
#
|
65
|
+
# @param resource_group_name [String] The name of the resource group that
|
66
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
67
|
+
# Manager API or the portal.
|
68
|
+
# @param server_name [String] The name of the server.
|
69
|
+
# @param elastic_pool_name [String] The name of the elastic pool.
|
70
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
71
|
+
# to the HTTP request.
|
72
|
+
#
|
73
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
74
|
+
#
|
75
|
+
def list_by_elastic_pool_async(resource_group_name, server_name, elastic_pool_name, custom_headers = nil)
|
76
|
+
api_version = '2014-04-01'
|
77
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
78
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
79
|
+
fail ArgumentError, 'server_name is nil' if server_name.nil?
|
80
|
+
fail ArgumentError, 'elastic_pool_name is nil' if elastic_pool_name.nil?
|
81
|
+
|
82
|
+
|
83
|
+
request_headers = {}
|
84
|
+
|
85
|
+
# Set Headers
|
86
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
87
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
88
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/elasticPoolDatabaseActivity'
|
89
|
+
|
90
|
+
request_url = @base_url || @client.base_url
|
91
|
+
|
92
|
+
options = {
|
93
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
94
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'serverName' => server_name,'elasticPoolName' => elastic_pool_name},
|
95
|
+
query_params: {'api-version' => api_version},
|
96
|
+
headers: request_headers.merge(custom_headers || {}),
|
97
|
+
base_url: request_url
|
98
|
+
}
|
99
|
+
promise = @client.make_request_async(:get, path_template, options)
|
100
|
+
|
101
|
+
promise = promise.then do |result|
|
102
|
+
http_response = result.response
|
103
|
+
status_code = http_response.status
|
104
|
+
response_content = http_response.body
|
105
|
+
unless status_code == 200
|
106
|
+
error_model = JSON.load(response_content)
|
107
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
108
|
+
end
|
109
|
+
|
110
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
111
|
+
# Deserialize Response
|
112
|
+
if status_code == 200
|
113
|
+
begin
|
114
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
115
|
+
result_mapper = Azure::ARM::SQL::Models::ElasticPoolDatabaseActivityListResult.mapper()
|
116
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
117
|
+
rescue Exception => e
|
118
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
result
|
123
|
+
end
|
124
|
+
|
125
|
+
promise.execute
|
126
|
+
end
|
127
|
+
|
128
|
+
end
|
129
|
+
end
|
@@ -630,423 +630,6 @@ module Azure::ARM::SQL
|
|
630
630
|
promise.execute
|
631
631
|
end
|
632
632
|
|
633
|
-
#
|
634
|
-
# Returns elastic pool activities.
|
635
|
-
#
|
636
|
-
# @param resource_group_name [String] The name of the resource group that
|
637
|
-
# contains the resource. You can obtain this value from the Azure Resource
|
638
|
-
# Manager API or the portal.
|
639
|
-
# @param server_name [String] The name of the server.
|
640
|
-
# @param elastic_pool_name [String] The name of the elastic pool for which to
|
641
|
-
# get the current activity.
|
642
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
643
|
-
# will be added to the HTTP request.
|
644
|
-
#
|
645
|
-
# @return [ElasticPoolActivityListResult] operation results.
|
646
|
-
#
|
647
|
-
def list_activity(resource_group_name, server_name, elastic_pool_name, custom_headers = nil)
|
648
|
-
response = list_activity_async(resource_group_name, server_name, elastic_pool_name, custom_headers).value!
|
649
|
-
response.body unless response.nil?
|
650
|
-
end
|
651
|
-
|
652
|
-
#
|
653
|
-
# Returns elastic pool activities.
|
654
|
-
#
|
655
|
-
# @param resource_group_name [String] The name of the resource group that
|
656
|
-
# contains the resource. You can obtain this value from the Azure Resource
|
657
|
-
# Manager API or the portal.
|
658
|
-
# @param server_name [String] The name of the server.
|
659
|
-
# @param elastic_pool_name [String] The name of the elastic pool for which to
|
660
|
-
# get the current activity.
|
661
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
662
|
-
# will be added to the HTTP request.
|
663
|
-
#
|
664
|
-
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
665
|
-
#
|
666
|
-
def list_activity_with_http_info(resource_group_name, server_name, elastic_pool_name, custom_headers = nil)
|
667
|
-
list_activity_async(resource_group_name, server_name, elastic_pool_name, custom_headers).value!
|
668
|
-
end
|
669
|
-
|
670
|
-
#
|
671
|
-
# Returns elastic pool activities.
|
672
|
-
#
|
673
|
-
# @param resource_group_name [String] The name of the resource group that
|
674
|
-
# contains the resource. You can obtain this value from the Azure Resource
|
675
|
-
# Manager API or the portal.
|
676
|
-
# @param server_name [String] The name of the server.
|
677
|
-
# @param elastic_pool_name [String] The name of the elastic pool for which to
|
678
|
-
# get the current activity.
|
679
|
-
# @param [Hash{String => String}] A hash of custom headers that will be added
|
680
|
-
# to the HTTP request.
|
681
|
-
#
|
682
|
-
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
683
|
-
#
|
684
|
-
def list_activity_async(resource_group_name, server_name, elastic_pool_name, custom_headers = nil)
|
685
|
-
api_version = '2014-04-01'
|
686
|
-
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
687
|
-
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
688
|
-
fail ArgumentError, 'server_name is nil' if server_name.nil?
|
689
|
-
fail ArgumentError, 'elastic_pool_name is nil' if elastic_pool_name.nil?
|
690
|
-
|
691
|
-
|
692
|
-
request_headers = {}
|
693
|
-
|
694
|
-
# Set Headers
|
695
|
-
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
696
|
-
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
697
|
-
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/elasticPoolActivity'
|
698
|
-
|
699
|
-
request_url = @base_url || @client.base_url
|
700
|
-
|
701
|
-
options = {
|
702
|
-
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
703
|
-
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'serverName' => server_name,'elasticPoolName' => elastic_pool_name},
|
704
|
-
query_params: {'api-version' => api_version},
|
705
|
-
headers: request_headers.merge(custom_headers || {}),
|
706
|
-
base_url: request_url
|
707
|
-
}
|
708
|
-
promise = @client.make_request_async(:get, path_template, options)
|
709
|
-
|
710
|
-
promise = promise.then do |result|
|
711
|
-
http_response = result.response
|
712
|
-
status_code = http_response.status
|
713
|
-
response_content = http_response.body
|
714
|
-
unless status_code == 200
|
715
|
-
error_model = JSON.load(response_content)
|
716
|
-
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
717
|
-
end
|
718
|
-
|
719
|
-
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
720
|
-
# Deserialize Response
|
721
|
-
if status_code == 200
|
722
|
-
begin
|
723
|
-
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
724
|
-
result_mapper = Azure::ARM::SQL::Models::ElasticPoolActivityListResult.mapper()
|
725
|
-
result.body = @client.deserialize(result_mapper, parsed_response)
|
726
|
-
rescue Exception => e
|
727
|
-
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
728
|
-
end
|
729
|
-
end
|
730
|
-
|
731
|
-
result
|
732
|
-
end
|
733
|
-
|
734
|
-
promise.execute
|
735
|
-
end
|
736
|
-
|
737
|
-
#
|
738
|
-
# Returns activity on databases inside of an elastic pool.
|
739
|
-
#
|
740
|
-
# @param resource_group_name [String] The name of the resource group that
|
741
|
-
# contains the resource. You can obtain this value from the Azure Resource
|
742
|
-
# Manager API or the portal.
|
743
|
-
# @param server_name [String] The name of the server.
|
744
|
-
# @param elastic_pool_name [String] The name of the elastic pool.
|
745
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
746
|
-
# will be added to the HTTP request.
|
747
|
-
#
|
748
|
-
# @return [ElasticPoolDatabaseActivityListResult] operation results.
|
749
|
-
#
|
750
|
-
def list_database_activity(resource_group_name, server_name, elastic_pool_name, custom_headers = nil)
|
751
|
-
response = list_database_activity_async(resource_group_name, server_name, elastic_pool_name, custom_headers).value!
|
752
|
-
response.body unless response.nil?
|
753
|
-
end
|
754
|
-
|
755
|
-
#
|
756
|
-
# Returns activity on databases inside of an elastic pool.
|
757
|
-
#
|
758
|
-
# @param resource_group_name [String] The name of the resource group that
|
759
|
-
# contains the resource. You can obtain this value from the Azure Resource
|
760
|
-
# Manager API or the portal.
|
761
|
-
# @param server_name [String] The name of the server.
|
762
|
-
# @param elastic_pool_name [String] The name of the elastic pool.
|
763
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
764
|
-
# will be added to the HTTP request.
|
765
|
-
#
|
766
|
-
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
767
|
-
#
|
768
|
-
def list_database_activity_with_http_info(resource_group_name, server_name, elastic_pool_name, custom_headers = nil)
|
769
|
-
list_database_activity_async(resource_group_name, server_name, elastic_pool_name, custom_headers).value!
|
770
|
-
end
|
771
|
-
|
772
|
-
#
|
773
|
-
# Returns activity on databases inside of an elastic pool.
|
774
|
-
#
|
775
|
-
# @param resource_group_name [String] The name of the resource group that
|
776
|
-
# contains the resource. You can obtain this value from the Azure Resource
|
777
|
-
# Manager API or the portal.
|
778
|
-
# @param server_name [String] The name of the server.
|
779
|
-
# @param elastic_pool_name [String] The name of the elastic pool.
|
780
|
-
# @param [Hash{String => String}] A hash of custom headers that will be added
|
781
|
-
# to the HTTP request.
|
782
|
-
#
|
783
|
-
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
784
|
-
#
|
785
|
-
def list_database_activity_async(resource_group_name, server_name, elastic_pool_name, custom_headers = nil)
|
786
|
-
api_version = '2014-04-01'
|
787
|
-
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
788
|
-
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
789
|
-
fail ArgumentError, 'server_name is nil' if server_name.nil?
|
790
|
-
fail ArgumentError, 'elastic_pool_name is nil' if elastic_pool_name.nil?
|
791
|
-
|
792
|
-
|
793
|
-
request_headers = {}
|
794
|
-
|
795
|
-
# Set Headers
|
796
|
-
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
797
|
-
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
798
|
-
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/elasticPoolDatabaseActivity'
|
799
|
-
|
800
|
-
request_url = @base_url || @client.base_url
|
801
|
-
|
802
|
-
options = {
|
803
|
-
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
804
|
-
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'serverName' => server_name,'elasticPoolName' => elastic_pool_name},
|
805
|
-
query_params: {'api-version' => api_version},
|
806
|
-
headers: request_headers.merge(custom_headers || {}),
|
807
|
-
base_url: request_url
|
808
|
-
}
|
809
|
-
promise = @client.make_request_async(:get, path_template, options)
|
810
|
-
|
811
|
-
promise = promise.then do |result|
|
812
|
-
http_response = result.response
|
813
|
-
status_code = http_response.status
|
814
|
-
response_content = http_response.body
|
815
|
-
unless status_code == 200
|
816
|
-
error_model = JSON.load(response_content)
|
817
|
-
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
818
|
-
end
|
819
|
-
|
820
|
-
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
821
|
-
# Deserialize Response
|
822
|
-
if status_code == 200
|
823
|
-
begin
|
824
|
-
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
825
|
-
result_mapper = Azure::ARM::SQL::Models::ElasticPoolDatabaseActivityListResult.mapper()
|
826
|
-
result.body = @client.deserialize(result_mapper, parsed_response)
|
827
|
-
rescue Exception => e
|
828
|
-
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
829
|
-
end
|
830
|
-
end
|
831
|
-
|
832
|
-
result
|
833
|
-
end
|
834
|
-
|
835
|
-
promise.execute
|
836
|
-
end
|
837
|
-
|
838
|
-
#
|
839
|
-
# Gets a database inside of an elastic pool.
|
840
|
-
#
|
841
|
-
# @param resource_group_name [String] The name of the resource group that
|
842
|
-
# contains the resource. You can obtain this value from the Azure Resource
|
843
|
-
# Manager API or the portal.
|
844
|
-
# @param server_name [String] The name of the server.
|
845
|
-
# @param elastic_pool_name [String] The name of the elastic pool to be
|
846
|
-
# retrieved.
|
847
|
-
# @param database_name [String] The name of the database to be retrieved.
|
848
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
849
|
-
# will be added to the HTTP request.
|
850
|
-
#
|
851
|
-
# @return [Database] operation results.
|
852
|
-
#
|
853
|
-
def get_database(resource_group_name, server_name, elastic_pool_name, database_name, custom_headers = nil)
|
854
|
-
response = get_database_async(resource_group_name, server_name, elastic_pool_name, database_name, custom_headers).value!
|
855
|
-
response.body unless response.nil?
|
856
|
-
end
|
857
|
-
|
858
|
-
#
|
859
|
-
# Gets a database inside of an elastic pool.
|
860
|
-
#
|
861
|
-
# @param resource_group_name [String] The name of the resource group that
|
862
|
-
# contains the resource. You can obtain this value from the Azure Resource
|
863
|
-
# Manager API or the portal.
|
864
|
-
# @param server_name [String] The name of the server.
|
865
|
-
# @param elastic_pool_name [String] The name of the elastic pool to be
|
866
|
-
# retrieved.
|
867
|
-
# @param database_name [String] The name of the database to be retrieved.
|
868
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
869
|
-
# will be added to the HTTP request.
|
870
|
-
#
|
871
|
-
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
872
|
-
#
|
873
|
-
def get_database_with_http_info(resource_group_name, server_name, elastic_pool_name, database_name, custom_headers = nil)
|
874
|
-
get_database_async(resource_group_name, server_name, elastic_pool_name, database_name, custom_headers).value!
|
875
|
-
end
|
876
|
-
|
877
|
-
#
|
878
|
-
# Gets a database inside of an elastic pool.
|
879
|
-
#
|
880
|
-
# @param resource_group_name [String] The name of the resource group that
|
881
|
-
# contains the resource. You can obtain this value from the Azure Resource
|
882
|
-
# Manager API or the portal.
|
883
|
-
# @param server_name [String] The name of the server.
|
884
|
-
# @param elastic_pool_name [String] The name of the elastic pool to be
|
885
|
-
# retrieved.
|
886
|
-
# @param database_name [String] The name of the database to be retrieved.
|
887
|
-
# @param [Hash{String => String}] A hash of custom headers that will be added
|
888
|
-
# to the HTTP request.
|
889
|
-
#
|
890
|
-
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
891
|
-
#
|
892
|
-
def get_database_async(resource_group_name, server_name, elastic_pool_name, database_name, custom_headers = nil)
|
893
|
-
api_version = '2014-04-01'
|
894
|
-
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
895
|
-
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
896
|
-
fail ArgumentError, 'server_name is nil' if server_name.nil?
|
897
|
-
fail ArgumentError, 'elastic_pool_name is nil' if elastic_pool_name.nil?
|
898
|
-
fail ArgumentError, 'database_name is nil' if database_name.nil?
|
899
|
-
|
900
|
-
|
901
|
-
request_headers = {}
|
902
|
-
|
903
|
-
# Set Headers
|
904
|
-
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
905
|
-
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
906
|
-
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/databases/{databaseName}'
|
907
|
-
|
908
|
-
request_url = @base_url || @client.base_url
|
909
|
-
|
910
|
-
options = {
|
911
|
-
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
912
|
-
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'serverName' => server_name,'elasticPoolName' => elastic_pool_name,'databaseName' => database_name},
|
913
|
-
query_params: {'api-version' => api_version},
|
914
|
-
headers: request_headers.merge(custom_headers || {}),
|
915
|
-
base_url: request_url
|
916
|
-
}
|
917
|
-
promise = @client.make_request_async(:get, path_template, options)
|
918
|
-
|
919
|
-
promise = promise.then do |result|
|
920
|
-
http_response = result.response
|
921
|
-
status_code = http_response.status
|
922
|
-
response_content = http_response.body
|
923
|
-
unless status_code == 200
|
924
|
-
error_model = JSON.load(response_content)
|
925
|
-
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
926
|
-
end
|
927
|
-
|
928
|
-
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
929
|
-
# Deserialize Response
|
930
|
-
if status_code == 200
|
931
|
-
begin
|
932
|
-
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
933
|
-
result_mapper = Azure::ARM::SQL::Models::Database.mapper()
|
934
|
-
result.body = @client.deserialize(result_mapper, parsed_response)
|
935
|
-
rescue Exception => e
|
936
|
-
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
937
|
-
end
|
938
|
-
end
|
939
|
-
|
940
|
-
result
|
941
|
-
end
|
942
|
-
|
943
|
-
promise.execute
|
944
|
-
end
|
945
|
-
|
946
|
-
#
|
947
|
-
# Returns a list of databases in an elastic pool.
|
948
|
-
#
|
949
|
-
# @param resource_group_name [String] The name of the resource group that
|
950
|
-
# contains the resource. You can obtain this value from the Azure Resource
|
951
|
-
# Manager API or the portal.
|
952
|
-
# @param server_name [String] The name of the server.
|
953
|
-
# @param elastic_pool_name [String] The name of the elastic pool to be
|
954
|
-
# retrieved.
|
955
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
956
|
-
# will be added to the HTTP request.
|
957
|
-
#
|
958
|
-
# @return [DatabaseListResult] operation results.
|
959
|
-
#
|
960
|
-
def list_databases(resource_group_name, server_name, elastic_pool_name, custom_headers = nil)
|
961
|
-
response = list_databases_async(resource_group_name, server_name, elastic_pool_name, custom_headers).value!
|
962
|
-
response.body unless response.nil?
|
963
|
-
end
|
964
|
-
|
965
|
-
#
|
966
|
-
# Returns a list of databases in an elastic pool.
|
967
|
-
#
|
968
|
-
# @param resource_group_name [String] The name of the resource group that
|
969
|
-
# contains the resource. You can obtain this value from the Azure Resource
|
970
|
-
# Manager API or the portal.
|
971
|
-
# @param server_name [String] The name of the server.
|
972
|
-
# @param elastic_pool_name [String] The name of the elastic pool to be
|
973
|
-
# retrieved.
|
974
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
975
|
-
# will be added to the HTTP request.
|
976
|
-
#
|
977
|
-
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
978
|
-
#
|
979
|
-
def list_databases_with_http_info(resource_group_name, server_name, elastic_pool_name, custom_headers = nil)
|
980
|
-
list_databases_async(resource_group_name, server_name, elastic_pool_name, custom_headers).value!
|
981
|
-
end
|
982
|
-
|
983
|
-
#
|
984
|
-
# Returns a list of databases in an elastic pool.
|
985
|
-
#
|
986
|
-
# @param resource_group_name [String] The name of the resource group that
|
987
|
-
# contains the resource. You can obtain this value from the Azure Resource
|
988
|
-
# Manager API or the portal.
|
989
|
-
# @param server_name [String] The name of the server.
|
990
|
-
# @param elastic_pool_name [String] The name of the elastic pool to be
|
991
|
-
# retrieved.
|
992
|
-
# @param [Hash{String => String}] A hash of custom headers that will be added
|
993
|
-
# to the HTTP request.
|
994
|
-
#
|
995
|
-
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
996
|
-
#
|
997
|
-
def list_databases_async(resource_group_name, server_name, elastic_pool_name, custom_headers = nil)
|
998
|
-
api_version = '2014-04-01'
|
999
|
-
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1000
|
-
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1001
|
-
fail ArgumentError, 'server_name is nil' if server_name.nil?
|
1002
|
-
fail ArgumentError, 'elastic_pool_name is nil' if elastic_pool_name.nil?
|
1003
|
-
|
1004
|
-
|
1005
|
-
request_headers = {}
|
1006
|
-
|
1007
|
-
# Set Headers
|
1008
|
-
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1009
|
-
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1010
|
-
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/databases'
|
1011
|
-
|
1012
|
-
request_url = @base_url || @client.base_url
|
1013
|
-
|
1014
|
-
options = {
|
1015
|
-
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1016
|
-
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'serverName' => server_name,'elasticPoolName' => elastic_pool_name},
|
1017
|
-
query_params: {'api-version' => api_version},
|
1018
|
-
headers: request_headers.merge(custom_headers || {}),
|
1019
|
-
base_url: request_url
|
1020
|
-
}
|
1021
|
-
promise = @client.make_request_async(:get, path_template, options)
|
1022
|
-
|
1023
|
-
promise = promise.then do |result|
|
1024
|
-
http_response = result.response
|
1025
|
-
status_code = http_response.status
|
1026
|
-
response_content = http_response.body
|
1027
|
-
unless status_code == 200
|
1028
|
-
error_model = JSON.load(response_content)
|
1029
|
-
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1030
|
-
end
|
1031
|
-
|
1032
|
-
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1033
|
-
# Deserialize Response
|
1034
|
-
if status_code == 200
|
1035
|
-
begin
|
1036
|
-
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1037
|
-
result_mapper = Azure::ARM::SQL::Models::DatabaseListResult.mapper()
|
1038
|
-
result.body = @client.deserialize(result_mapper, parsed_response)
|
1039
|
-
rescue Exception => e
|
1040
|
-
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1041
|
-
end
|
1042
|
-
end
|
1043
|
-
|
1044
|
-
result
|
1045
|
-
end
|
1046
|
-
|
1047
|
-
promise.execute
|
1048
|
-
end
|
1049
|
-
|
1050
633
|
#
|
1051
634
|
# Creates a new elastic pool or updates an existing elastic pool.
|
1052
635
|
#
|