Class: Azure::SQL::Mgmt::V2015_05_01_preview::SyncGroups
- Inherits:
-
Object
- Object
- Azure::SQL::Mgmt::V2015_05_01_preview::SyncGroups
- Includes:
- MsRestAzure
- Defined in:
- lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb
Overview
The Azure SQL Database management API provides a RESTful set of web services that interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, and delete databases.
Instance Attribute Summary collapse
-
#client ⇒ SqlManagementClient
readonly
Reference to the SqlManagementClient.
Instance Method Summary collapse
-
#begin_create_or_update(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers: nil) ⇒ SyncGroup
Creates or updates a sync group.
-
#begin_create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Creates or updates a sync group.
-
#begin_create_or_update_with_http_info(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Creates or updates a sync group.
-
#begin_delete(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ Object
Deletes a sync group.
-
#begin_delete_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes a sync group.
-
#begin_delete_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes a sync group.
-
#begin_refresh_hub_schema(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ Object
Refreshes a hub database schema.
-
#begin_refresh_hub_schema_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Refreshes a hub database schema.
-
#begin_refresh_hub_schema_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Refreshes a hub database schema.
-
#begin_update(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers: nil) ⇒ SyncGroup
Updates a sync group.
-
#begin_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Updates a sync group.
-
#begin_update_with_http_info(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Updates a sync group.
-
#cancel_sync(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ Object
Cancels a sync group synchronization.
-
#cancel_sync_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Cancels a sync group synchronization.
-
#cancel_sync_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Cancels a sync group synchronization.
-
#create_or_update(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers: nil) ⇒ SyncGroup
Creates or updates a sync group.
-
#create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
contains the resource.
-
#delete(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ Object
Deletes a sync group.
-
#delete_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ Concurrent::Promise
contains the resource.
-
#get(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ SyncGroup
Gets a sync group.
-
#get_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets a sync group.
-
#get_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a sync group.
-
#initialize(client) ⇒ SyncGroups
constructor
Creates and initializes a new instance of the SyncGroups class.
-
#list_by_database(resource_group_name, server_name, database_name, custom_headers: nil) ⇒ Array<SyncGroup>
Lists sync groups under a hub database.
-
#list_by_database_as_lazy(resource_group_name, server_name, database_name, custom_headers: nil) ⇒ SyncGroupListResult
Lists sync groups under a hub database.
-
#list_by_database_async(resource_group_name, server_name, database_name, custom_headers: nil) ⇒ Concurrent::Promise
Lists sync groups under a hub database.
-
#list_by_database_next(next_page_link, custom_headers: nil) ⇒ SyncGroupListResult
Lists sync groups under a hub database.
-
#list_by_database_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Lists sync groups under a hub database.
-
#list_by_database_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists sync groups under a hub database.
-
#list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists sync groups under a hub database.
-
#list_hub_schemas(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ Array<SyncFullSchemaProperties>
Gets a collection of hub database schemas.
-
#list_hub_schemas_as_lazy(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ SyncFullSchemaPropertiesListResult
Gets a collection of hub database schemas.
-
#list_hub_schemas_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets a collection of hub database schemas.
-
#list_hub_schemas_next(next_page_link, custom_headers: nil) ⇒ SyncFullSchemaPropertiesListResult
Gets a collection of hub database schemas.
-
#list_hub_schemas_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets a collection of hub database schemas.
-
#list_hub_schemas_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a collection of hub database schemas.
-
#list_hub_schemas_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a collection of hub database schemas.
-
#list_logs(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token: nil, custom_headers: nil) ⇒ Array<SyncGroupLogProperties>
Gets a collection of sync group logs.
-
#list_logs_as_lazy(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token: nil, custom_headers: nil) ⇒ SyncGroupLogListResult
Gets a collection of sync group logs.
-
#list_logs_async(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token: nil, custom_headers: nil) ⇒ Concurrent::Promise
Gets a collection of sync group logs.
-
#list_logs_next(next_page_link, custom_headers: nil) ⇒ SyncGroupLogListResult
Gets a collection of sync group logs.
-
#list_logs_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets a collection of sync group logs.
-
#list_logs_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a collection of sync group logs.
-
#list_logs_with_http_info(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a collection of sync group logs.
-
#list_sync_database_ids(location_name, custom_headers: nil) ⇒ Array<SyncDatabaseIdProperties>
Gets a collection of sync database ids.
-
#list_sync_database_ids_as_lazy(location_name, custom_headers: nil) ⇒ SyncDatabaseIdListResult
Gets a collection of sync database ids.
-
#list_sync_database_ids_async(location_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets a collection of sync database ids.
-
#list_sync_database_ids_next(next_page_link, custom_headers: nil) ⇒ SyncDatabaseIdListResult
Gets a collection of sync database ids.
-
#list_sync_database_ids_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets a collection of sync database ids.
-
#list_sync_database_ids_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a collection of sync database ids.
-
#list_sync_database_ids_with_http_info(location_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a collection of sync database ids.
-
#refresh_hub_schema(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ Object
Refreshes a hub database schema.
-
#refresh_hub_schema_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ Concurrent::Promise
contains the resource.
-
#trigger_sync(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ Object
Triggers a sync group synchronization.
-
#trigger_sync_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Triggers a sync group synchronization.
-
#trigger_sync_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Triggers a sync group synchronization.
-
#update(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers: nil) ⇒ SyncGroup
Updates a sync group.
-
#update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
contains the resource.
Constructor Details
#initialize(client) ⇒ SyncGroups
Creates and initializes a new instance of the SyncGroups class.
20 21 22 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 20 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ SqlManagementClient (readonly)
Returns reference to the SqlManagementClient.
25 26 27 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 25 def client @client end |
Instance Method Details
#begin_create_or_update(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers: nil) ⇒ SyncGroup
Creates or updates a sync group.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. will be added to the HTTP request.
1098 1099 1100 1101 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 1098 def begin_create_or_update(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers:nil) response = begin_create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Creates or updates a sync group.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. to the HTTP request.
1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 1139 def begin_create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? fail ArgumentError, 'sync_group_name is nil' if sync_group_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroup.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'syncGroupName' => sync_group_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 || status_code == 201 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroup.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end # Deserialize Response if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroup.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#begin_create_or_update_with_http_info(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Creates or updates a sync group.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. will be added to the HTTP request.
1119 1120 1121 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 1119 def begin_create_or_update_with_http_info(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers:nil) begin_create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers:custom_headers).value! end |
#begin_delete(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ Object
Deletes a sync group.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. will be added to the HTTP request.
1228 1229 1230 1231 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 1228 def begin_delete(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) response = begin_delete_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers).value! nil end |
#begin_delete_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes a sync group.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. to the HTTP request.
1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 1267 def begin_delete_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? fail ArgumentError, 'sync_group_name is nil' if sync_group_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'syncGroupName' => sync_group_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 || status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end |
#begin_delete_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes a sync group.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. will be added to the HTTP request.
1248 1249 1250 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 1248 def begin_delete_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) begin_delete_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers).value! end |
#begin_refresh_hub_schema(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ Object
Refreshes a hub database schema.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. will be added to the HTTP request.
996 997 998 999 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 996 def begin_refresh_hub_schema(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) response = begin_refresh_hub_schema_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers).value! nil end |
#begin_refresh_hub_schema_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Refreshes a hub database schema.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. to the HTTP request.
1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 1035 def begin_refresh_hub_schema_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? fail ArgumentError, 'sync_group_name is nil' if sync_group_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/refreshHubSchema' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'syncGroupName' => sync_group_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end |
#begin_refresh_hub_schema_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Refreshes a hub database schema.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. will be added to the HTTP request.
1016 1017 1018 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 1016 def begin_refresh_hub_schema_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) begin_refresh_hub_schema_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers).value! end |
#begin_update(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers: nil) ⇒ SyncGroup
Updates a sync group.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. will be added to the HTTP request.
1330 1331 1332 1333 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 1330 def begin_update(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers:nil) response = begin_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Updates a sync group.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. to the HTTP request.
1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 1371 def begin_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? fail ArgumentError, 'sync_group_name is nil' if sync_group_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroup.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'syncGroupName' => sync_group_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:patch, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroup.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#begin_update_with_http_info(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Updates a sync group.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. will be added to the HTTP request.
1351 1352 1353 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 1351 def begin_update_with_http_info(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers:nil) begin_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers:custom_headers).value! end |
#cancel_sync(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ Object
Cancels a sync group synchronization.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. will be added to the HTTP request.
422 423 424 425 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 422 def cancel_sync(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) response = cancel_sync_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers).value! nil end |
#cancel_sync_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Cancels a sync group synchronization.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. to the HTTP request.
461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 461 def cancel_sync_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? fail ArgumentError, 'sync_group_name is nil' if sync_group_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/cancelSync' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'syncGroupName' => sync_group_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end |
#cancel_sync_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Cancels a sync group synchronization.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. will be added to the HTTP request.
442 443 444 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 442 def cancel_sync_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) cancel_sync_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers).value! end |
#create_or_update(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers: nil) ⇒ SyncGroup
Creates or updates a sync group.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. will be added to the HTTP request.
735 736 737 738 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 735 def create_or_update(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers:nil) response = create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. will be added to the HTTP request.
response.
755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 755 def create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers:nil) # Send request promise = begin_create_or_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroup.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#delete(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ Object
Deletes a sync group.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. will be added to the HTTP request.
786 787 788 789 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 786 def delete(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) response = delete_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers).value! nil end |
#delete_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ Concurrent::Promise
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. will be added to the HTTP request.
response.
805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 805 def delete_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) # Send request promise = begin_delete_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#get(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ SyncGroup
Gets a sync group.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. will be added to the HTTP request.
623 624 625 626 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 623 def get(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) response = get_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets a sync group.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. to the HTTP request.
662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 662 def get_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? fail ArgumentError, 'sync_group_name is nil' if sync_group_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'syncGroupName' => sync_group_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroup.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a sync group.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. will be added to the HTTP request.
643 644 645 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 643 def get_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) get_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers).value! end |
#list_by_database(resource_group_name, server_name, database_name, custom_headers: nil) ⇒ Array<SyncGroup>
Lists sync groups under a hub database.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. will be added to the HTTP request.
889 890 891 892 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 889 def list_by_database(resource_group_name, server_name, database_name, custom_headers:nil) first_page = list_by_database_as_lazy(resource_group_name, server_name, database_name, custom_headers:custom_headers) first_page.get_all_items end |
#list_by_database_as_lazy(resource_group_name, server_name, database_name, custom_headers: nil) ⇒ SyncGroupListResult
Lists sync groups under a hub database.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. will be added to the HTTP request.
response.
1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 1892 def list_by_database_as_lazy(resource_group_name, server_name, database_name, custom_headers:nil) response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_by_database_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_by_database_async(resource_group_name, server_name, database_name, custom_headers: nil) ⇒ Concurrent::Promise
Lists sync groups under a hub database.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. to the HTTP request.
926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 926 def list_by_database_async(resource_group_name, server_name, database_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_by_database_next(next_page_link, custom_headers: nil) ⇒ SyncGroupListResult
Lists sync groups under a hub database.
to List operation. will be added to the HTTP request.
1716 1717 1718 1719 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 1716 def list_by_database_next(next_page_link, custom_headers:nil) response = list_by_database_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_by_database_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Lists sync groups under a hub database.
to List operation. to the HTTP request.
1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 1745 def list_by_database_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_by_database_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists sync groups under a hub database.
to List operation. will be added to the HTTP request.
1731 1732 1733 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 1731 def list_by_database_next_with_http_info(next_page_link, custom_headers:nil) list_by_database_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists sync groups under a hub database.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. will be added to the HTTP request.
908 909 910 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 908 def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil) list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value! end |
#list_hub_schemas(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ Array<SyncFullSchemaProperties>
Gets a collection of hub database schemas.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. will be added to the HTTP request.
183 184 185 186 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 183 def list_hub_schemas(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) first_page = list_hub_schemas_as_lazy(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers) first_page.get_all_items end |
#list_hub_schemas_as_lazy(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ SyncFullSchemaPropertiesListResult
Gets a collection of hub database schemas.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. will be added to the HTTP request.
pages of the response.
1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 1834 def list_hub_schemas_as_lazy(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) response = list_hub_schemas_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_hub_schemas_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_hub_schemas_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets a collection of hub database schemas.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. to the HTTP request.
222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 222 def list_hub_schemas_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? fail ArgumentError, 'sync_group_name is nil' if sync_group_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/hubSchemas' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'syncGroupName' => sync_group_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncFullSchemaPropertiesListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_hub_schemas_next(next_page_link, custom_headers: nil) ⇒ SyncFullSchemaPropertiesListResult
Gets a collection of hub database schemas.
to List operation. will be added to the HTTP request.
1536 1537 1538 1539 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 1536 def list_hub_schemas_next(next_page_link, custom_headers:nil) response = list_hub_schemas_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_hub_schemas_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets a collection of hub database schemas.
to List operation. to the HTTP request.
1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 1565 def list_hub_schemas_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncFullSchemaPropertiesListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_hub_schemas_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a collection of hub database schemas.
to List operation. will be added to the HTTP request.
1551 1552 1553 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 1551 def list_hub_schemas_next_with_http_info(next_page_link, custom_headers:nil) list_hub_schemas_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_hub_schemas_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a collection of hub database schemas.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. will be added to the HTTP request.
203 204 205 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 203 def list_hub_schemas_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) list_hub_schemas_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers).value! end |
#list_logs(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token: nil, custom_headers: nil) ⇒ Array<SyncGroupLogProperties>
Gets a collection of sync group logs.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. ‘All’, ‘Error’, ‘Warning’, ‘Success’ will be added to the HTTP request.
299 300 301 302 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 299 def list_logs(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token:nil, custom_headers:nil) first_page = list_logs_as_lazy(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token:continuation_token, custom_headers:custom_headers) first_page.get_all_items end |
#list_logs_as_lazy(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token: nil, custom_headers: nil) ⇒ SyncGroupLogListResult
Gets a collection of sync group logs.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. ‘All’, ‘Error’, ‘Warning’, ‘Success’ will be added to the HTTP request.
response.
1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 1866 def list_logs_as_lazy(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token:nil, custom_headers:nil) response = list_logs_async(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token:continuation_token, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_logs_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_logs_async(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token: nil, custom_headers: nil) ⇒ Concurrent::Promise
Gets a collection of sync group logs.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. ‘All’, ‘Error’, ‘Warning’, ‘Success’ to the HTTP request.
348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 348 def list_logs_async(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? fail ArgumentError, 'sync_group_name is nil' if sync_group_name.nil? fail ArgumentError, 'start_time is nil' if start_time.nil? fail ArgumentError, 'end_time is nil' if end_time.nil? fail ArgumentError, 'type is nil' if type.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/logs' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'syncGroupName' => sync_group_name,'subscriptionId' => @client.subscription_id}, query_params: {'startTime' => start_time,'endTime' => end_time,'type' => type,'continuationToken' => continuation_token,'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupLogListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_logs_next(next_page_link, custom_headers: nil) ⇒ SyncGroupLogListResult
Gets a collection of sync group logs.
to List operation. will be added to the HTTP request.
1626 1627 1628 1629 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 1626 def list_logs_next(next_page_link, custom_headers:nil) response = list_logs_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_logs_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets a collection of sync group logs.
to List operation. to the HTTP request.
1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 1655 def list_logs_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroupLogListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_logs_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a collection of sync group logs.
to List operation. will be added to the HTTP request.
1641 1642 1643 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 1641 def list_logs_next_with_http_info(next_page_link, custom_headers:nil) list_logs_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_logs_with_http_info(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a collection of sync group logs.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. ‘All’, ‘Error’, ‘Warning’, ‘Success’ will be added to the HTTP request.
324 325 326 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 324 def list_logs_with_http_info(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token:nil, custom_headers:nil) list_logs_async(resource_group_name, server_name, database_name, sync_group_name, start_time, end_time, type, continuation_token:continuation_token, custom_headers:custom_headers).value! end |
#list_sync_database_ids(location_name, custom_headers: nil) ⇒ Array<SyncDatabaseIdProperties>
Gets a collection of sync database ids.
located. will be added to the HTTP request.
37 38 39 40 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 37 def list_sync_database_ids(location_name, custom_headers:nil) first_page = list_sync_database_ids_as_lazy(location_name, custom_headers:custom_headers) first_page.get_all_items end |
#list_sync_database_ids_as_lazy(location_name, custom_headers: nil) ⇒ SyncDatabaseIdListResult
Gets a collection of sync database ids.
located. will be added to the HTTP request.
response.
1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 1807 def list_sync_database_ids_as_lazy(location_name, custom_headers:nil) response = list_sync_database_ids_async(location_name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_sync_database_ids_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_sync_database_ids_async(location_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets a collection of sync database ids.
located. to the HTTP request.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 66 def list_sync_database_ids_async(location_name, custom_headers:nil) fail ArgumentError, 'location_name is nil' if location_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/syncDatabaseIds' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'locationName' => location_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncDatabaseIdListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_sync_database_ids_next(next_page_link, custom_headers: nil) ⇒ SyncDatabaseIdListResult
Gets a collection of sync database ids.
to List operation. will be added to the HTTP request.
1446 1447 1448 1449 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 1446 def list_sync_database_ids_next(next_page_link, custom_headers:nil) response = list_sync_database_ids_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_sync_database_ids_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets a collection of sync database ids.
to List operation. to the HTTP request.
1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 1475 def list_sync_database_ids_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncDatabaseIdListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_sync_database_ids_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a collection of sync database ids.
to List operation. will be added to the HTTP request.
1461 1462 1463 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 1461 def list_sync_database_ids_next_with_http_info(next_page_link, custom_headers:nil) list_sync_database_ids_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_sync_database_ids_with_http_info(location_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a collection of sync database ids.
located. will be added to the HTTP request.
52 53 54 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 52 def list_sync_database_ids_with_http_info(location_name, custom_headers:nil) list_sync_database_ids_async(location_name, custom_headers:custom_headers).value! end |
#refresh_hub_schema(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ Object
Refreshes a hub database schema.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. will be added to the HTTP request.
133 134 135 136 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 133 def refresh_hub_schema(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) response = refresh_hub_schema_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers).value! nil end |
#refresh_hub_schema_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ Concurrent::Promise
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. will be added to the HTTP request.
response.
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 152 def refresh_hub_schema_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) # Send request promise = begin_refresh_hub_schema_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#trigger_sync(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ Object
Triggers a sync group synchronization.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. will be added to the HTTP request.
522 523 524 525 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 522 def trigger_sync(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) response = trigger_sync_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers).value! nil end |
#trigger_sync_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Triggers a sync group synchronization.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. to the HTTP request.
561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 561 def trigger_sync_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'server_name is nil' if server_name.nil? fail ArgumentError, 'database_name is nil' if database_name.nil? fail ArgumentError, 'sync_group_name is nil' if sync_group_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/triggerSync' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'syncGroupName' => sync_group_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end |
#trigger_sync_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Triggers a sync group synchronization.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. will be added to the HTTP request.
542 543 544 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 542 def trigger_sync_with_http_info(resource_group_name, server_name, database_name, sync_group_name, custom_headers:nil) trigger_sync_async(resource_group_name, server_name, database_name, sync_group_name, custom_headers:custom_headers).value! end |
#update(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers: nil) ⇒ SyncGroup
Updates a sync group.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. will be added to the HTTP request.
837 838 839 840 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 837 def update(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers:nil) response = update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. group is hosted. will be added to the HTTP request.
response.
857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 |
# File 'lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb', line 857 def update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers:nil) # Send request promise = begin_update_async(resource_group_name, server_name, database_name, sync_group_name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::SQL::Mgmt::V2015_05_01_preview::Models::SyncGroup.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |