azure_mgmt_sqlvirtualmachine 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine.rb +71 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/availability_group_listeners.rb +684 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/additional_features_server_configurations.rb +57 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/auto_backup_settings.rb +173 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/auto_patching_settings.rb +85 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/availability_group_listener.rb +130 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/availability_group_listener_list_result.rb +100 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/backup_schedule_type.rb +16 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/cluster_configuration.rb +15 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/cluster_manager_type.rb +15 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/connectivity_type.rb +17 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/day_of_week.rb +21 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/disk_configuration_type.rb +17 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/full_backup_frequency_type.rb +16 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/identity_type.rb +15 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/key_vault_credential_settings.rb +91 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/load_balancer_configuration.rb +100 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/operation.rb +95 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/operation_display.rb +85 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/operation_list_result.rb +100 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/operation_origin.rb +16 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/private_ipaddress.rb +58 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/proxy_resource.rb +62 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/resource.rb +80 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/resource_identity.rb +72 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/scale_type.rb +15 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/server_configurations_management_settings.rb +84 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/sql_connectivity_update_settings.rb +80 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/sql_image_sku.rb +19 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/sql_server_license_type.rb +16 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/sql_storage_update_settings.rb +58 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/sql_virtual_machine.rb +237 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/sql_virtual_machine_group.rb +174 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/sql_virtual_machine_group_list_result.rb +100 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/sql_virtual_machine_group_update.rb +54 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/sql_virtual_machine_list_result.rb +100 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/sql_virtual_machine_update.rb +54 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/sql_workload_type.rb +17 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/sql_workload_type_update_settings.rb +47 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/tracked_resource.rb +92 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/wsfc_domain_credentials.rb +69 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/wsfc_domain_profile.rb +130 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/module_definition.rb +9 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/operations.rb +219 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/sql_virtual_machine_groups.rb +1000 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/sql_virtual_machine_management_client.rb +143 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/sql_virtual_machines.rb +980 -0
- data/lib/azure_mgmt_sqlvirtualmachine.rb +6 -0
- data/lib/module_definition.rb +8 -0
- data/lib/profiles/latest/modules/sqlvirtualmachine_profile_module.rb +227 -0
- data/lib/profiles/latest/sqlvirtualmachine_latest_profile_client.rb +40 -0
- data/lib/profiles/latest/sqlvirtualmachine_module_definition.rb +8 -0
- data/lib/version.rb +7 -0
- metadata +173 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: db2bf3b309e16a9b8da624ca28d5b321fc874127
|
4
|
+
data.tar.gz: 7e4d723c24d70421ac97ff38e8007430cdfcbc47
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 8de347296ffb3131dffb206bd404d4b4bab0b4f08fe749b27473c7b2ea904a5b7ef3782fb3a3a7db534b69a3a7791f7dc7a53e513f997e458cbab234ebe656a5
|
7
|
+
data.tar.gz: eea2b0d34c2935db52b28bbd8ee630feb2663e9e4ca420854647f35a8c3fb032862bb65ccf1f8cecdc2a9922a4df575174f8ee70b022eff9bd541199ded6295e
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Microsoft Corporation
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
@@ -0,0 +1,71 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
require 'uri'
|
7
|
+
require 'cgi'
|
8
|
+
require 'date'
|
9
|
+
require 'json'
|
10
|
+
require 'base64'
|
11
|
+
require 'erb'
|
12
|
+
require 'securerandom'
|
13
|
+
require 'time'
|
14
|
+
require 'timeliness'
|
15
|
+
require 'faraday'
|
16
|
+
require 'faraday-cookie_jar'
|
17
|
+
require 'concurrent'
|
18
|
+
require 'ms_rest'
|
19
|
+
require '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/module_definition'
|
20
|
+
require 'ms_rest_azure'
|
21
|
+
|
22
|
+
module Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview
|
23
|
+
autoload :AvailabilityGroupListeners, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/availability_group_listeners.rb'
|
24
|
+
autoload :Operations, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/operations.rb'
|
25
|
+
autoload :SqlVirtualMachineGroups, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/sql_virtual_machine_groups.rb'
|
26
|
+
autoload :SqlVirtualMachines, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/sql_virtual_machines.rb'
|
27
|
+
autoload :SqlVirtualMachineManagementClient, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/sql_virtual_machine_management_client.rb'
|
28
|
+
|
29
|
+
module Models
|
30
|
+
autoload :SqlVirtualMachineGroupListResult, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/sql_virtual_machine_group_list_result.rb'
|
31
|
+
autoload :ResourceIdentity, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/resource_identity.rb'
|
32
|
+
autoload :LoadBalancerConfiguration, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/load_balancer_configuration.rb'
|
33
|
+
autoload :WsfcDomainCredentials, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/wsfc_domain_credentials.rb'
|
34
|
+
autoload :PrivateIPAddress, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/private_ipaddress.rb'
|
35
|
+
autoload :Resource, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/resource.rb'
|
36
|
+
autoload :OperationDisplay, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/operation_display.rb'
|
37
|
+
autoload :ServerConfigurationsManagementSettings, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/server_configurations_management_settings.rb'
|
38
|
+
autoload :OperationListResult, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/operation_list_result.rb'
|
39
|
+
autoload :AutoPatchingSettings, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/auto_patching_settings.rb'
|
40
|
+
autoload :SqlVirtualMachineListResult, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/sql_virtual_machine_list_result.rb'
|
41
|
+
autoload :AutoBackupSettings, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/auto_backup_settings.rb'
|
42
|
+
autoload :SqlVirtualMachineGroupUpdate, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/sql_virtual_machine_group_update.rb'
|
43
|
+
autoload :KeyVaultCredentialSettings, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/key_vault_credential_settings.rb'
|
44
|
+
autoload :Operation, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/operation.rb'
|
45
|
+
autoload :SqlConnectivityUpdateSettings, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/sql_connectivity_update_settings.rb'
|
46
|
+
autoload :SqlVirtualMachineUpdate, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/sql_virtual_machine_update.rb'
|
47
|
+
autoload :SqlWorkloadTypeUpdateSettings, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/sql_workload_type_update_settings.rb'
|
48
|
+
autoload :WsfcDomainProfile, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/wsfc_domain_profile.rb'
|
49
|
+
autoload :SqlStorageUpdateSettings, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/sql_storage_update_settings.rb'
|
50
|
+
autoload :AvailabilityGroupListenerListResult, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/availability_group_listener_list_result.rb'
|
51
|
+
autoload :AdditionalFeaturesServerConfigurations, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/additional_features_server_configurations.rb'
|
52
|
+
autoload :ProxyResource, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/proxy_resource.rb'
|
53
|
+
autoload :AvailabilityGroupListener, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/availability_group_listener.rb'
|
54
|
+
autoload :TrackedResource, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/tracked_resource.rb'
|
55
|
+
autoload :SqlVirtualMachineGroup, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/sql_virtual_machine_group.rb'
|
56
|
+
autoload :SqlVirtualMachine, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/sql_virtual_machine.rb'
|
57
|
+
autoload :OperationOrigin, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/operation_origin.rb'
|
58
|
+
autoload :SqlImageSku, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/sql_image_sku.rb'
|
59
|
+
autoload :ScaleType, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/scale_type.rb'
|
60
|
+
autoload :ClusterManagerType, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/cluster_manager_type.rb'
|
61
|
+
autoload :ClusterConfiguration, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/cluster_configuration.rb'
|
62
|
+
autoload :IdentityType, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/identity_type.rb'
|
63
|
+
autoload :SqlServerLicenseType, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/sql_server_license_type.rb'
|
64
|
+
autoload :DayOfWeek, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/day_of_week.rb'
|
65
|
+
autoload :BackupScheduleType, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/backup_schedule_type.rb'
|
66
|
+
autoload :FullBackupFrequencyType, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/full_backup_frequency_type.rb'
|
67
|
+
autoload :ConnectivityType, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/connectivity_type.rb'
|
68
|
+
autoload :SqlWorkloadType, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/sql_workload_type.rb'
|
69
|
+
autoload :DiskConfigurationType, '2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/disk_configuration_type.rb'
|
70
|
+
end
|
71
|
+
end
|
data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/availability_group_listeners.rb
ADDED
@@ -0,0 +1,684 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview
|
7
|
+
#
|
8
|
+
# The SQL virtual machine management API provides a RESTful set of web APIs
|
9
|
+
# that interact with Azure Compute, Network & Storage services to manage your
|
10
|
+
# SQL Server virtual machine. The API enables users to create, delete and
|
11
|
+
# retrieve a SQL virtual machine, SQL virtual machine group or availability
|
12
|
+
# group listener.
|
13
|
+
#
|
14
|
+
class AvailabilityGroupListeners
|
15
|
+
include MsRestAzure
|
16
|
+
|
17
|
+
#
|
18
|
+
# Creates and initializes a new instance of the AvailabilityGroupListeners class.
|
19
|
+
# @param client service class for accessing basic functionality.
|
20
|
+
#
|
21
|
+
def initialize(client)
|
22
|
+
@client = client
|
23
|
+
end
|
24
|
+
|
25
|
+
# @return [SqlVirtualMachineManagementClient] reference to the SqlVirtualMachineManagementClient
|
26
|
+
attr_reader :client
|
27
|
+
|
28
|
+
#
|
29
|
+
# Gets an availability group listener.
|
30
|
+
#
|
31
|
+
# @param resource_group_name [String] Name of the resource group that contains
|
32
|
+
# the resource. You can obtain this value from the Azure Resource Manager API
|
33
|
+
# or the portal.
|
34
|
+
# @param sql_virtual_machine_group_name [String] Name of the SQL virtual
|
35
|
+
# machine group.
|
36
|
+
# @param availability_group_listener_name [String] Name of the availability
|
37
|
+
# group listener.
|
38
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
39
|
+
# will be added to the HTTP request.
|
40
|
+
#
|
41
|
+
# @return [AvailabilityGroupListener] operation results.
|
42
|
+
#
|
43
|
+
def get(resource_group_name, sql_virtual_machine_group_name, availability_group_listener_name, custom_headers:nil)
|
44
|
+
response = get_async(resource_group_name, sql_virtual_machine_group_name, availability_group_listener_name, custom_headers:custom_headers).value!
|
45
|
+
response.body unless response.nil?
|
46
|
+
end
|
47
|
+
|
48
|
+
#
|
49
|
+
# Gets an availability group listener.
|
50
|
+
#
|
51
|
+
# @param resource_group_name [String] Name of the resource group that contains
|
52
|
+
# the resource. You can obtain this value from the Azure Resource Manager API
|
53
|
+
# or the portal.
|
54
|
+
# @param sql_virtual_machine_group_name [String] Name of the SQL virtual
|
55
|
+
# machine group.
|
56
|
+
# @param availability_group_listener_name [String] Name of the availability
|
57
|
+
# group listener.
|
58
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
59
|
+
# will be added to the HTTP request.
|
60
|
+
#
|
61
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
62
|
+
#
|
63
|
+
def get_with_http_info(resource_group_name, sql_virtual_machine_group_name, availability_group_listener_name, custom_headers:nil)
|
64
|
+
get_async(resource_group_name, sql_virtual_machine_group_name, availability_group_listener_name, custom_headers:custom_headers).value!
|
65
|
+
end
|
66
|
+
|
67
|
+
#
|
68
|
+
# Gets an availability group listener.
|
69
|
+
#
|
70
|
+
# @param resource_group_name [String] Name of the resource group that contains
|
71
|
+
# the resource. You can obtain this value from the Azure Resource Manager API
|
72
|
+
# or the portal.
|
73
|
+
# @param sql_virtual_machine_group_name [String] Name of the SQL virtual
|
74
|
+
# machine group.
|
75
|
+
# @param availability_group_listener_name [String] Name of the availability
|
76
|
+
# group listener.
|
77
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
78
|
+
# to the HTTP request.
|
79
|
+
#
|
80
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
81
|
+
#
|
82
|
+
def get_async(resource_group_name, sql_virtual_machine_group_name, availability_group_listener_name, custom_headers:nil)
|
83
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
84
|
+
fail ArgumentError, 'sql_virtual_machine_group_name is nil' if sql_virtual_machine_group_name.nil?
|
85
|
+
fail ArgumentError, 'availability_group_listener_name is nil' if availability_group_listener_name.nil?
|
86
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
87
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
88
|
+
|
89
|
+
|
90
|
+
request_headers = {}
|
91
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
92
|
+
|
93
|
+
# Set Headers
|
94
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
95
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
96
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}'
|
97
|
+
|
98
|
+
request_url = @base_url || @client.base_url
|
99
|
+
|
100
|
+
options = {
|
101
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
102
|
+
path_params: {'resourceGroupName' => resource_group_name,'sqlVirtualMachineGroupName' => sql_virtual_machine_group_name,'availabilityGroupListenerName' => availability_group_listener_name,'subscriptionId' => @client.subscription_id},
|
103
|
+
query_params: {'api-version' => @client.api_version},
|
104
|
+
headers: request_headers.merge(custom_headers || {}),
|
105
|
+
base_url: request_url
|
106
|
+
}
|
107
|
+
promise = @client.make_request_async(:get, path_template, options)
|
108
|
+
|
109
|
+
promise = promise.then do |result|
|
110
|
+
http_response = result.response
|
111
|
+
status_code = http_response.status
|
112
|
+
response_content = http_response.body
|
113
|
+
unless status_code == 200
|
114
|
+
error_model = JSON.load(response_content)
|
115
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
116
|
+
end
|
117
|
+
|
118
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
119
|
+
# Deserialize Response
|
120
|
+
if status_code == 200
|
121
|
+
begin
|
122
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
123
|
+
result_mapper = Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview::Models::AvailabilityGroupListener.mapper()
|
124
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
125
|
+
rescue Exception => e
|
126
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
result
|
131
|
+
end
|
132
|
+
|
133
|
+
promise.execute
|
134
|
+
end
|
135
|
+
|
136
|
+
#
|
137
|
+
# Creates or updates an availability group listener.
|
138
|
+
#
|
139
|
+
# @param resource_group_name [String] Name of the resource group that contains
|
140
|
+
# the resource. You can obtain this value from the Azure Resource Manager API
|
141
|
+
# or the portal.
|
142
|
+
# @param sql_virtual_machine_group_name [String] Name of the SQL virtual
|
143
|
+
# machine group.
|
144
|
+
# @param availability_group_listener_name [String] Name of the availability
|
145
|
+
# group listener.
|
146
|
+
# @param parameters [AvailabilityGroupListener] The availability group
|
147
|
+
# listener.
|
148
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
149
|
+
# will be added to the HTTP request.
|
150
|
+
#
|
151
|
+
# @return [AvailabilityGroupListener] operation results.
|
152
|
+
#
|
153
|
+
def create_or_update(resource_group_name, sql_virtual_machine_group_name, availability_group_listener_name, parameters, custom_headers:nil)
|
154
|
+
response = create_or_update_async(resource_group_name, sql_virtual_machine_group_name, availability_group_listener_name, parameters, custom_headers:custom_headers).value!
|
155
|
+
response.body unless response.nil?
|
156
|
+
end
|
157
|
+
|
158
|
+
#
|
159
|
+
# @param resource_group_name [String] Name of the resource group that contains
|
160
|
+
# the resource. You can obtain this value from the Azure Resource Manager API
|
161
|
+
# or the portal.
|
162
|
+
# @param sql_virtual_machine_group_name [String] Name of the SQL virtual
|
163
|
+
# machine group.
|
164
|
+
# @param availability_group_listener_name [String] Name of the availability
|
165
|
+
# group listener.
|
166
|
+
# @param parameters [AvailabilityGroupListener] The availability group
|
167
|
+
# listener.
|
168
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
169
|
+
# will be added to the HTTP request.
|
170
|
+
#
|
171
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
172
|
+
# response.
|
173
|
+
#
|
174
|
+
def create_or_update_async(resource_group_name, sql_virtual_machine_group_name, availability_group_listener_name, parameters, custom_headers:nil)
|
175
|
+
# Send request
|
176
|
+
promise = begin_create_or_update_async(resource_group_name, sql_virtual_machine_group_name, availability_group_listener_name, parameters, custom_headers:custom_headers)
|
177
|
+
|
178
|
+
promise = promise.then do |response|
|
179
|
+
# Defining deserialization method.
|
180
|
+
deserialize_method = lambda do |parsed_response|
|
181
|
+
result_mapper = Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview::Models::AvailabilityGroupListener.mapper()
|
182
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
183
|
+
end
|
184
|
+
|
185
|
+
# Waiting for response.
|
186
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
187
|
+
end
|
188
|
+
|
189
|
+
promise
|
190
|
+
end
|
191
|
+
|
192
|
+
#
|
193
|
+
# Deletes an availability group listener.
|
194
|
+
#
|
195
|
+
# @param resource_group_name [String] Name of the resource group that contains
|
196
|
+
# the resource. You can obtain this value from the Azure Resource Manager API
|
197
|
+
# or the portal.
|
198
|
+
# @param sql_virtual_machine_group_name [String] Name of the SQL virtual
|
199
|
+
# machine group.
|
200
|
+
# @param availability_group_listener_name [String] Name of the availability
|
201
|
+
# group listener.
|
202
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
203
|
+
# will be added to the HTTP request.
|
204
|
+
#
|
205
|
+
def delete(resource_group_name, sql_virtual_machine_group_name, availability_group_listener_name, custom_headers:nil)
|
206
|
+
response = delete_async(resource_group_name, sql_virtual_machine_group_name, availability_group_listener_name, custom_headers:custom_headers).value!
|
207
|
+
nil
|
208
|
+
end
|
209
|
+
|
210
|
+
#
|
211
|
+
# @param resource_group_name [String] Name of the resource group that contains
|
212
|
+
# the resource. You can obtain this value from the Azure Resource Manager API
|
213
|
+
# or the portal.
|
214
|
+
# @param sql_virtual_machine_group_name [String] Name of the SQL virtual
|
215
|
+
# machine group.
|
216
|
+
# @param availability_group_listener_name [String] Name of the availability
|
217
|
+
# group listener.
|
218
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
219
|
+
# will be added to the HTTP request.
|
220
|
+
#
|
221
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
222
|
+
# response.
|
223
|
+
#
|
224
|
+
def delete_async(resource_group_name, sql_virtual_machine_group_name, availability_group_listener_name, custom_headers:nil)
|
225
|
+
# Send request
|
226
|
+
promise = begin_delete_async(resource_group_name, sql_virtual_machine_group_name, availability_group_listener_name, custom_headers:custom_headers)
|
227
|
+
|
228
|
+
promise = promise.then do |response|
|
229
|
+
# Defining deserialization method.
|
230
|
+
deserialize_method = lambda do |parsed_response|
|
231
|
+
end
|
232
|
+
|
233
|
+
# Waiting for response.
|
234
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
235
|
+
end
|
236
|
+
|
237
|
+
promise
|
238
|
+
end
|
239
|
+
|
240
|
+
#
|
241
|
+
# Lists all availability group listeners in a SQL virtual machine group.
|
242
|
+
#
|
243
|
+
# @param resource_group_name [String] Name of the resource group that contains
|
244
|
+
# the resource. You can obtain this value from the Azure Resource Manager API
|
245
|
+
# or the portal.
|
246
|
+
# @param sql_virtual_machine_group_name [String] Name of the SQL virtual
|
247
|
+
# machine group.
|
248
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
249
|
+
# will be added to the HTTP request.
|
250
|
+
#
|
251
|
+
# @return [Array<AvailabilityGroupListener>] operation results.
|
252
|
+
#
|
253
|
+
def list_by_group(resource_group_name, sql_virtual_machine_group_name, custom_headers:nil)
|
254
|
+
first_page = list_by_group_as_lazy(resource_group_name, sql_virtual_machine_group_name, custom_headers:custom_headers)
|
255
|
+
first_page.get_all_items
|
256
|
+
end
|
257
|
+
|
258
|
+
#
|
259
|
+
# Lists all availability group listeners in a SQL virtual machine group.
|
260
|
+
#
|
261
|
+
# @param resource_group_name [String] Name of the resource group that contains
|
262
|
+
# the resource. You can obtain this value from the Azure Resource Manager API
|
263
|
+
# or the portal.
|
264
|
+
# @param sql_virtual_machine_group_name [String] Name of the SQL virtual
|
265
|
+
# machine group.
|
266
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
267
|
+
# will be added to the HTTP request.
|
268
|
+
#
|
269
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
270
|
+
#
|
271
|
+
def list_by_group_with_http_info(resource_group_name, sql_virtual_machine_group_name, custom_headers:nil)
|
272
|
+
list_by_group_async(resource_group_name, sql_virtual_machine_group_name, custom_headers:custom_headers).value!
|
273
|
+
end
|
274
|
+
|
275
|
+
#
|
276
|
+
# Lists all availability group listeners in a SQL virtual machine group.
|
277
|
+
#
|
278
|
+
# @param resource_group_name [String] Name of the resource group that contains
|
279
|
+
# the resource. You can obtain this value from the Azure Resource Manager API
|
280
|
+
# or the portal.
|
281
|
+
# @param sql_virtual_machine_group_name [String] Name of the SQL virtual
|
282
|
+
# machine group.
|
283
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
284
|
+
# to the HTTP request.
|
285
|
+
#
|
286
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
287
|
+
#
|
288
|
+
def list_by_group_async(resource_group_name, sql_virtual_machine_group_name, custom_headers:nil)
|
289
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
290
|
+
fail ArgumentError, 'sql_virtual_machine_group_name is nil' if sql_virtual_machine_group_name.nil?
|
291
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
292
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
293
|
+
|
294
|
+
|
295
|
+
request_headers = {}
|
296
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
297
|
+
|
298
|
+
# Set Headers
|
299
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
300
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
301
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners'
|
302
|
+
|
303
|
+
request_url = @base_url || @client.base_url
|
304
|
+
|
305
|
+
options = {
|
306
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
307
|
+
path_params: {'resourceGroupName' => resource_group_name,'sqlVirtualMachineGroupName' => sql_virtual_machine_group_name,'subscriptionId' => @client.subscription_id},
|
308
|
+
query_params: {'api-version' => @client.api_version},
|
309
|
+
headers: request_headers.merge(custom_headers || {}),
|
310
|
+
base_url: request_url
|
311
|
+
}
|
312
|
+
promise = @client.make_request_async(:get, path_template, options)
|
313
|
+
|
314
|
+
promise = promise.then do |result|
|
315
|
+
http_response = result.response
|
316
|
+
status_code = http_response.status
|
317
|
+
response_content = http_response.body
|
318
|
+
unless status_code == 200
|
319
|
+
error_model = JSON.load(response_content)
|
320
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
321
|
+
end
|
322
|
+
|
323
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
324
|
+
# Deserialize Response
|
325
|
+
if status_code == 200
|
326
|
+
begin
|
327
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
328
|
+
result_mapper = Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview::Models::AvailabilityGroupListenerListResult.mapper()
|
329
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
330
|
+
rescue Exception => e
|
331
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
332
|
+
end
|
333
|
+
end
|
334
|
+
|
335
|
+
result
|
336
|
+
end
|
337
|
+
|
338
|
+
promise.execute
|
339
|
+
end
|
340
|
+
|
341
|
+
#
|
342
|
+
# Creates or updates an availability group listener.
|
343
|
+
#
|
344
|
+
# @param resource_group_name [String] Name of the resource group that contains
|
345
|
+
# the resource. You can obtain this value from the Azure Resource Manager API
|
346
|
+
# or the portal.
|
347
|
+
# @param sql_virtual_machine_group_name [String] Name of the SQL virtual
|
348
|
+
# machine group.
|
349
|
+
# @param availability_group_listener_name [String] Name of the availability
|
350
|
+
# group listener.
|
351
|
+
# @param parameters [AvailabilityGroupListener] The availability group
|
352
|
+
# listener.
|
353
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
354
|
+
# will be added to the HTTP request.
|
355
|
+
#
|
356
|
+
# @return [AvailabilityGroupListener] operation results.
|
357
|
+
#
|
358
|
+
def begin_create_or_update(resource_group_name, sql_virtual_machine_group_name, availability_group_listener_name, parameters, custom_headers:nil)
|
359
|
+
response = begin_create_or_update_async(resource_group_name, sql_virtual_machine_group_name, availability_group_listener_name, parameters, custom_headers:custom_headers).value!
|
360
|
+
response.body unless response.nil?
|
361
|
+
end
|
362
|
+
|
363
|
+
#
|
364
|
+
# Creates or updates an availability group listener.
|
365
|
+
#
|
366
|
+
# @param resource_group_name [String] Name of the resource group that contains
|
367
|
+
# the resource. You can obtain this value from the Azure Resource Manager API
|
368
|
+
# or the portal.
|
369
|
+
# @param sql_virtual_machine_group_name [String] Name of the SQL virtual
|
370
|
+
# machine group.
|
371
|
+
# @param availability_group_listener_name [String] Name of the availability
|
372
|
+
# group listener.
|
373
|
+
# @param parameters [AvailabilityGroupListener] The availability group
|
374
|
+
# listener.
|
375
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
376
|
+
# will be added to the HTTP request.
|
377
|
+
#
|
378
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
379
|
+
#
|
380
|
+
def begin_create_or_update_with_http_info(resource_group_name, sql_virtual_machine_group_name, availability_group_listener_name, parameters, custom_headers:nil)
|
381
|
+
begin_create_or_update_async(resource_group_name, sql_virtual_machine_group_name, availability_group_listener_name, parameters, custom_headers:custom_headers).value!
|
382
|
+
end
|
383
|
+
|
384
|
+
#
|
385
|
+
# Creates or updates an availability group listener.
|
386
|
+
#
|
387
|
+
# @param resource_group_name [String] Name of the resource group that contains
|
388
|
+
# the resource. You can obtain this value from the Azure Resource Manager API
|
389
|
+
# or the portal.
|
390
|
+
# @param sql_virtual_machine_group_name [String] Name of the SQL virtual
|
391
|
+
# machine group.
|
392
|
+
# @param availability_group_listener_name [String] Name of the availability
|
393
|
+
# group listener.
|
394
|
+
# @param parameters [AvailabilityGroupListener] The availability group
|
395
|
+
# listener.
|
396
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
397
|
+
# to the HTTP request.
|
398
|
+
#
|
399
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
400
|
+
#
|
401
|
+
def begin_create_or_update_async(resource_group_name, sql_virtual_machine_group_name, availability_group_listener_name, parameters, custom_headers:nil)
|
402
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
403
|
+
fail ArgumentError, 'sql_virtual_machine_group_name is nil' if sql_virtual_machine_group_name.nil?
|
404
|
+
fail ArgumentError, 'availability_group_listener_name is nil' if availability_group_listener_name.nil?
|
405
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
406
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
407
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
408
|
+
|
409
|
+
|
410
|
+
request_headers = {}
|
411
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
412
|
+
|
413
|
+
# Set Headers
|
414
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
415
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
416
|
+
|
417
|
+
# Serialize Request
|
418
|
+
request_mapper = Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview::Models::AvailabilityGroupListener.mapper()
|
419
|
+
request_content = @client.serialize(request_mapper, parameters)
|
420
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
421
|
+
|
422
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}'
|
423
|
+
|
424
|
+
request_url = @base_url || @client.base_url
|
425
|
+
|
426
|
+
options = {
|
427
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
428
|
+
path_params: {'resourceGroupName' => resource_group_name,'sqlVirtualMachineGroupName' => sql_virtual_machine_group_name,'availabilityGroupListenerName' => availability_group_listener_name,'subscriptionId' => @client.subscription_id},
|
429
|
+
query_params: {'api-version' => @client.api_version},
|
430
|
+
body: request_content,
|
431
|
+
headers: request_headers.merge(custom_headers || {}),
|
432
|
+
base_url: request_url
|
433
|
+
}
|
434
|
+
promise = @client.make_request_async(:put, path_template, options)
|
435
|
+
|
436
|
+
promise = promise.then do |result|
|
437
|
+
http_response = result.response
|
438
|
+
status_code = http_response.status
|
439
|
+
response_content = http_response.body
|
440
|
+
unless status_code == 200 || status_code == 201
|
441
|
+
error_model = JSON.load(response_content)
|
442
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
443
|
+
end
|
444
|
+
|
445
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
446
|
+
# Deserialize Response
|
447
|
+
if status_code == 200
|
448
|
+
begin
|
449
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
450
|
+
result_mapper = Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview::Models::AvailabilityGroupListener.mapper()
|
451
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
452
|
+
rescue Exception => e
|
453
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
454
|
+
end
|
455
|
+
end
|
456
|
+
# Deserialize Response
|
457
|
+
if status_code == 201
|
458
|
+
begin
|
459
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
460
|
+
result_mapper = Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview::Models::AvailabilityGroupListener.mapper()
|
461
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
462
|
+
rescue Exception => e
|
463
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
464
|
+
end
|
465
|
+
end
|
466
|
+
|
467
|
+
result
|
468
|
+
end
|
469
|
+
|
470
|
+
promise.execute
|
471
|
+
end
|
472
|
+
|
473
|
+
#
|
474
|
+
# Deletes an availability group listener.
|
475
|
+
#
|
476
|
+
# @param resource_group_name [String] Name of the resource group that contains
|
477
|
+
# the resource. You can obtain this value from the Azure Resource Manager API
|
478
|
+
# or the portal.
|
479
|
+
# @param sql_virtual_machine_group_name [String] Name of the SQL virtual
|
480
|
+
# machine group.
|
481
|
+
# @param availability_group_listener_name [String] Name of the availability
|
482
|
+
# group listener.
|
483
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
484
|
+
# will be added to the HTTP request.
|
485
|
+
#
|
486
|
+
#
|
487
|
+
def begin_delete(resource_group_name, sql_virtual_machine_group_name, availability_group_listener_name, custom_headers:nil)
|
488
|
+
response = begin_delete_async(resource_group_name, sql_virtual_machine_group_name, availability_group_listener_name, custom_headers:custom_headers).value!
|
489
|
+
nil
|
490
|
+
end
|
491
|
+
|
492
|
+
#
|
493
|
+
# Deletes an availability group listener.
|
494
|
+
#
|
495
|
+
# @param resource_group_name [String] Name of the resource group that contains
|
496
|
+
# the resource. You can obtain this value from the Azure Resource Manager API
|
497
|
+
# or the portal.
|
498
|
+
# @param sql_virtual_machine_group_name [String] Name of the SQL virtual
|
499
|
+
# machine group.
|
500
|
+
# @param availability_group_listener_name [String] Name of the availability
|
501
|
+
# group listener.
|
502
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
503
|
+
# will be added to the HTTP request.
|
504
|
+
#
|
505
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
506
|
+
#
|
507
|
+
def begin_delete_with_http_info(resource_group_name, sql_virtual_machine_group_name, availability_group_listener_name, custom_headers:nil)
|
508
|
+
begin_delete_async(resource_group_name, sql_virtual_machine_group_name, availability_group_listener_name, custom_headers:custom_headers).value!
|
509
|
+
end
|
510
|
+
|
511
|
+
#
|
512
|
+
# Deletes an availability group listener.
|
513
|
+
#
|
514
|
+
# @param resource_group_name [String] Name of the resource group that contains
|
515
|
+
# the resource. You can obtain this value from the Azure Resource Manager API
|
516
|
+
# or the portal.
|
517
|
+
# @param sql_virtual_machine_group_name [String] Name of the SQL virtual
|
518
|
+
# machine group.
|
519
|
+
# @param availability_group_listener_name [String] Name of the availability
|
520
|
+
# group listener.
|
521
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
522
|
+
# to the HTTP request.
|
523
|
+
#
|
524
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
525
|
+
#
|
526
|
+
def begin_delete_async(resource_group_name, sql_virtual_machine_group_name, availability_group_listener_name, custom_headers:nil)
|
527
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
528
|
+
fail ArgumentError, 'sql_virtual_machine_group_name is nil' if sql_virtual_machine_group_name.nil?
|
529
|
+
fail ArgumentError, 'availability_group_listener_name is nil' if availability_group_listener_name.nil?
|
530
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
531
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
532
|
+
|
533
|
+
|
534
|
+
request_headers = {}
|
535
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
536
|
+
|
537
|
+
# Set Headers
|
538
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
539
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
540
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}'
|
541
|
+
|
542
|
+
request_url = @base_url || @client.base_url
|
543
|
+
|
544
|
+
options = {
|
545
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
546
|
+
path_params: {'resourceGroupName' => resource_group_name,'sqlVirtualMachineGroupName' => sql_virtual_machine_group_name,'availabilityGroupListenerName' => availability_group_listener_name,'subscriptionId' => @client.subscription_id},
|
547
|
+
query_params: {'api-version' => @client.api_version},
|
548
|
+
headers: request_headers.merge(custom_headers || {}),
|
549
|
+
base_url: request_url
|
550
|
+
}
|
551
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
552
|
+
|
553
|
+
promise = promise.then do |result|
|
554
|
+
http_response = result.response
|
555
|
+
status_code = http_response.status
|
556
|
+
response_content = http_response.body
|
557
|
+
unless status_code == 200 || status_code == 202 || status_code == 204
|
558
|
+
error_model = JSON.load(response_content)
|
559
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
560
|
+
end
|
561
|
+
|
562
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
563
|
+
|
564
|
+
result
|
565
|
+
end
|
566
|
+
|
567
|
+
promise.execute
|
568
|
+
end
|
569
|
+
|
570
|
+
#
|
571
|
+
# Lists all availability group listeners in a SQL virtual machine group.
|
572
|
+
#
|
573
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
574
|
+
# to List operation.
|
575
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
576
|
+
# will be added to the HTTP request.
|
577
|
+
#
|
578
|
+
# @return [AvailabilityGroupListenerListResult] operation results.
|
579
|
+
#
|
580
|
+
def list_by_group_next(next_page_link, custom_headers:nil)
|
581
|
+
response = list_by_group_next_async(next_page_link, custom_headers:custom_headers).value!
|
582
|
+
response.body unless response.nil?
|
583
|
+
end
|
584
|
+
|
585
|
+
#
|
586
|
+
# Lists all availability group listeners in a SQL virtual machine group.
|
587
|
+
#
|
588
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
589
|
+
# to List operation.
|
590
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
591
|
+
# will be added to the HTTP request.
|
592
|
+
#
|
593
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
594
|
+
#
|
595
|
+
def list_by_group_next_with_http_info(next_page_link, custom_headers:nil)
|
596
|
+
list_by_group_next_async(next_page_link, custom_headers:custom_headers).value!
|
597
|
+
end
|
598
|
+
|
599
|
+
#
|
600
|
+
# Lists all availability group listeners in a SQL virtual machine group.
|
601
|
+
#
|
602
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
603
|
+
# to List operation.
|
604
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
605
|
+
# to the HTTP request.
|
606
|
+
#
|
607
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
608
|
+
#
|
609
|
+
def list_by_group_next_async(next_page_link, custom_headers:nil)
|
610
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
611
|
+
|
612
|
+
|
613
|
+
request_headers = {}
|
614
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
615
|
+
|
616
|
+
# Set Headers
|
617
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
618
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
619
|
+
path_template = '{nextLink}'
|
620
|
+
|
621
|
+
request_url = @base_url || @client.base_url
|
622
|
+
|
623
|
+
options = {
|
624
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
625
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
626
|
+
headers: request_headers.merge(custom_headers || {}),
|
627
|
+
base_url: request_url
|
628
|
+
}
|
629
|
+
promise = @client.make_request_async(:get, path_template, options)
|
630
|
+
|
631
|
+
promise = promise.then do |result|
|
632
|
+
http_response = result.response
|
633
|
+
status_code = http_response.status
|
634
|
+
response_content = http_response.body
|
635
|
+
unless status_code == 200
|
636
|
+
error_model = JSON.load(response_content)
|
637
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
638
|
+
end
|
639
|
+
|
640
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
641
|
+
# Deserialize Response
|
642
|
+
if status_code == 200
|
643
|
+
begin
|
644
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
645
|
+
result_mapper = Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview::Models::AvailabilityGroupListenerListResult.mapper()
|
646
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
647
|
+
rescue Exception => e
|
648
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
649
|
+
end
|
650
|
+
end
|
651
|
+
|
652
|
+
result
|
653
|
+
end
|
654
|
+
|
655
|
+
promise.execute
|
656
|
+
end
|
657
|
+
|
658
|
+
#
|
659
|
+
# Lists all availability group listeners in a SQL virtual machine group.
|
660
|
+
#
|
661
|
+
# @param resource_group_name [String] Name of the resource group that contains
|
662
|
+
# the resource. You can obtain this value from the Azure Resource Manager API
|
663
|
+
# or the portal.
|
664
|
+
# @param sql_virtual_machine_group_name [String] Name of the SQL virtual
|
665
|
+
# machine group.
|
666
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
667
|
+
# will be added to the HTTP request.
|
668
|
+
#
|
669
|
+
# @return [AvailabilityGroupListenerListResult] which provide lazy access to
|
670
|
+
# pages of the response.
|
671
|
+
#
|
672
|
+
def list_by_group_as_lazy(resource_group_name, sql_virtual_machine_group_name, custom_headers:nil)
|
673
|
+
response = list_by_group_async(resource_group_name, sql_virtual_machine_group_name, custom_headers:custom_headers).value!
|
674
|
+
unless response.nil?
|
675
|
+
page = response.body
|
676
|
+
page.next_method = Proc.new do |next_page_link|
|
677
|
+
list_by_group_next_async(next_page_link, custom_headers:custom_headers)
|
678
|
+
end
|
679
|
+
page
|
680
|
+
end
|
681
|
+
end
|
682
|
+
|
683
|
+
end
|
684
|
+
end
|