azure_mgmt_server_management 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generated/azure_mgmt_server_management.rb +14 -11
- data/lib/generated/azure_mgmt_server_management/gateway.rb +444 -441
- data/lib/generated/azure_mgmt_server_management/models/{auto_upgrade.rb → credential_data_format.rb} +4 -5
- data/lib/generated/azure_mgmt_server_management/models/encryption_jwk_resource.rb +74 -0
- data/lib/generated/azure_mgmt_server_management/models/error.rb +2 -2
- data/lib/generated/azure_mgmt_server_management/models/gateway_expand_option.rb +2 -1
- data/lib/generated/azure_mgmt_server_management/models/gateway_parameters.rb +12 -11
- data/lib/generated/azure_mgmt_server_management/models/gateway_profile.rb +12 -12
- data/lib/generated/azure_mgmt_server_management/models/gateway_resource.rb +39 -15
- data/lib/generated/azure_mgmt_server_management/models/gateway_resources.rb +4 -4
- data/lib/generated/azure_mgmt_server_management/models/gateway_status.rb +108 -5
- data/lib/generated/azure_mgmt_server_management/models/node_parameters.rb +7 -7
- data/lib/generated/azure_mgmt_server_management/models/node_resource.rb +4 -4
- data/lib/generated/azure_mgmt_server_management/models/node_resources.rb +4 -4
- data/lib/generated/azure_mgmt_server_management/models/power_shell_command_parameters.rb +3 -3
- data/lib/generated/azure_mgmt_server_management/models/power_shell_command_result.rb +14 -14
- data/lib/generated/azure_mgmt_server_management/models/power_shell_command_results.rb +2 -2
- data/lib/generated/azure_mgmt_server_management/models/power_shell_command_status.rb +2 -2
- data/lib/generated/azure_mgmt_server_management/models/power_shell_expand_option.rb +1 -1
- data/lib/generated/azure_mgmt_server_management/models/power_shell_session_resource.rb +7 -7
- data/lib/generated/azure_mgmt_server_management/models/power_shell_session_resources.rb +5 -5
- data/lib/generated/azure_mgmt_server_management/models/power_shell_tab_completion_parameters.rb +2 -2
- data/lib/generated/azure_mgmt_server_management/models/power_shell_tab_completion_results.rb +3 -3
- data/lib/generated/azure_mgmt_server_management/models/prompt_field_description.rb +6 -6
- data/lib/generated/azure_mgmt_server_management/models/prompt_field_type.rb +1 -1
- data/lib/generated/azure_mgmt_server_management/models/prompt_message_response.rb +3 -3
- data/lib/generated/azure_mgmt_server_management/models/retention_period.rb +16 -0
- data/lib/generated/azure_mgmt_server_management/models/session_parameters.rb +38 -4
- data/lib/generated/azure_mgmt_server_management/models/session_resource.rb +4 -4
- data/lib/generated/azure_mgmt_server_management/models/upgrade_mode.rb +16 -0
- data/lib/generated/azure_mgmt_server_management/models/version.rb +8 -8
- data/lib/generated/azure_mgmt_server_management/module_definition.rb +1 -1
- data/lib/generated/azure_mgmt_server_management/node.rb +309 -309
- data/lib/generated/azure_mgmt_server_management/power_shell.rb +280 -280
- data/lib/generated/azure_mgmt_server_management/server_management.rb +16 -3
- data/lib/generated/azure_mgmt_server_management/session.rb +128 -95
- data/lib/generated/azure_mgmt_server_management/version.rb +2 -2
- metadata +8 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a454a4d2e7a4976c68077a1923bb8588f623450
|
4
|
+
data.tar.gz: 1ac2da8107e531e843f39c05ca29f8a668122165
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de68b5f916bc5d17ec6009fe173f6ec00c965a48824741b8d9a64d6eb8b68c51b77cf3ec82e8c8f2326e64c6cdbbe6991c4d6ee41cd35524110e6285a0bce1fc
|
7
|
+
data.tar.gz: cbd378c709ecb27852322de66833bb01939d565711b2730b3373f739c93f9a5f771983c5124cbb4df13fb8577a3e314ae217a6e7ecb72c96f561c70341306c19
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 0.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
@@ -27,29 +27,32 @@ module Azure::ARM::ServerManagement
|
|
27
27
|
autoload :ServerManagement, 'generated/azure_mgmt_server_management/server_management.rb'
|
28
28
|
|
29
29
|
module Models
|
30
|
+
autoload :SessionParameters, 'generated/azure_mgmt_server_management/models/session_parameters.rb'
|
30
31
|
autoload :GatewayStatus, 'generated/azure_mgmt_server_management/models/gateway_status.rb'
|
32
|
+
autoload :Version, 'generated/azure_mgmt_server_management/models/version.rb'
|
31
33
|
autoload :GatewayResources, 'generated/azure_mgmt_server_management/models/gateway_resources.rb'
|
32
|
-
autoload :
|
34
|
+
autoload :Error, 'generated/azure_mgmt_server_management/models/error.rb'
|
33
35
|
autoload :GatewayParameters, 'generated/azure_mgmt_server_management/models/gateway_parameters.rb'
|
34
|
-
autoload :NodeResources, 'generated/azure_mgmt_server_management/models/node_resources.rb'
|
35
|
-
autoload :NodeParameters, 'generated/azure_mgmt_server_management/models/node_parameters.rb'
|
36
|
-
autoload :SessionParameters, 'generated/azure_mgmt_server_management/models/session_parameters.rb'
|
37
|
-
autoload :Version, 'generated/azure_mgmt_server_management/models/version.rb'
|
38
36
|
autoload :PowerShellCommandResults, 'generated/azure_mgmt_server_management/models/power_shell_command_results.rb'
|
37
|
+
autoload :NodeResources, 'generated/azure_mgmt_server_management/models/node_resources.rb'
|
39
38
|
autoload :PowerShellCommandResult, 'generated/azure_mgmt_server_management/models/power_shell_command_result.rb'
|
39
|
+
autoload :PowerShellTabCompletionResults, 'generated/azure_mgmt_server_management/models/power_shell_tab_completion_results.rb'
|
40
|
+
autoload :NodeParameters, 'generated/azure_mgmt_server_management/models/node_parameters.rb'
|
41
|
+
autoload :PromptMessageResponse, 'generated/azure_mgmt_server_management/models/prompt_message_response.rb'
|
42
|
+
autoload :GatewayProfile, 'generated/azure_mgmt_server_management/models/gateway_profile.rb'
|
40
43
|
autoload :PromptFieldDescription, 'generated/azure_mgmt_server_management/models/prompt_field_description.rb'
|
44
|
+
autoload :EncryptionJwkResource, 'generated/azure_mgmt_server_management/models/encryption_jwk_resource.rb'
|
41
45
|
autoload :PowerShellSessionResources, 'generated/azure_mgmt_server_management/models/power_shell_session_resources.rb'
|
42
|
-
autoload :PowerShellCommandParameters, 'generated/azure_mgmt_server_management/models/power_shell_command_parameters.rb'
|
43
|
-
autoload :PromptMessageResponse, 'generated/azure_mgmt_server_management/models/prompt_message_response.rb'
|
44
46
|
autoload :PowerShellTabCompletionParameters, 'generated/azure_mgmt_server_management/models/power_shell_tab_completion_parameters.rb'
|
45
|
-
autoload :
|
46
|
-
autoload :Error, 'generated/azure_mgmt_server_management/models/error.rb'
|
47
|
+
autoload :PowerShellCommandParameters, 'generated/azure_mgmt_server_management/models/power_shell_command_parameters.rb'
|
47
48
|
autoload :GatewayResource, 'generated/azure_mgmt_server_management/models/gateway_resource.rb'
|
48
49
|
autoload :NodeResource, 'generated/azure_mgmt_server_management/models/node_resource.rb'
|
49
50
|
autoload :SessionResource, 'generated/azure_mgmt_server_management/models/session_resource.rb'
|
50
51
|
autoload :PowerShellSessionResource, 'generated/azure_mgmt_server_management/models/power_shell_session_resource.rb'
|
51
52
|
autoload :PowerShellCommandStatus, 'generated/azure_mgmt_server_management/models/power_shell_command_status.rb'
|
52
|
-
autoload :
|
53
|
+
autoload :UpgradeMode, 'generated/azure_mgmt_server_management/models/upgrade_mode.rb'
|
54
|
+
autoload :RetentionPeriod, 'generated/azure_mgmt_server_management/models/retention_period.rb'
|
55
|
+
autoload :CredentialDataFormat, 'generated/azure_mgmt_server_management/models/credential_data_format.rb'
|
53
56
|
autoload :PromptFieldType, 'generated/azure_mgmt_server_management/models/prompt_field_type.rb'
|
54
57
|
autoload :GatewayExpandOption, 'generated/azure_mgmt_server_management/models/gateway_expand_option.rb'
|
55
58
|
autoload :PowerShellExpandOption, 'generated/azure_mgmt_server_management/models/power_shell_expand_option.rb'
|
@@ -1,11 +1,11 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 0.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
6
6
|
module Azure::ARM::ServerManagement
|
7
7
|
#
|
8
|
-
# REST API for Azure Server Management Service
|
8
|
+
# REST API for Azure Server Management Service.
|
9
9
|
#
|
10
10
|
class Gateway
|
11
11
|
include Azure::ARM::ServerManagement::Models
|
@@ -28,19 +28,19 @@ module Azure::ARM::ServerManagement
|
|
28
28
|
# @param resource_group_name [String] The resource group name uniquely
|
29
29
|
# identifies the resource group within the user subscriptionId.
|
30
30
|
# @param gateway_name [String] The gateway name (256 characters maximum).
|
31
|
-
# @param location [String]
|
32
|
-
# @param tags
|
33
|
-
# @param
|
31
|
+
# @param location [String] Location of the resource.
|
32
|
+
# @param tags Resource tags.
|
33
|
+
# @param upgrade_mode [UpgradeMode] The upgradeMode property gives the
|
34
34
|
# flexibility to gateway to auto upgrade itself. If properties value not
|
35
|
-
# specified, then we assume
|
36
|
-
# '
|
35
|
+
# specified, then we assume upgradeMode = Automatic. Possible values include:
|
36
|
+
# 'Manual', 'Automatic'
|
37
37
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
38
38
|
# will be added to the HTTP request.
|
39
39
|
#
|
40
40
|
# @return [GatewayResource] operation results.
|
41
41
|
#
|
42
|
-
def create(resource_group_name, gateway_name, location = nil, tags = nil,
|
43
|
-
response = create_async(resource_group_name, gateway_name, location, tags,
|
42
|
+
def create(resource_group_name, gateway_name, location = nil, tags = nil, upgrade_mode = nil, custom_headers = nil)
|
43
|
+
response = create_async(resource_group_name, gateway_name, location, tags, upgrade_mode, custom_headers).value!
|
44
44
|
response.body unless response.nil?
|
45
45
|
end
|
46
46
|
|
@@ -48,21 +48,21 @@ module Azure::ARM::ServerManagement
|
|
48
48
|
# @param resource_group_name [String] The resource group name uniquely
|
49
49
|
# identifies the resource group within the user subscriptionId.
|
50
50
|
# @param gateway_name [String] The gateway name (256 characters maximum).
|
51
|
-
# @param location [String]
|
52
|
-
# @param tags
|
53
|
-
# @param
|
51
|
+
# @param location [String] Location of the resource.
|
52
|
+
# @param tags Resource tags.
|
53
|
+
# @param upgrade_mode [UpgradeMode] The upgradeMode property gives the
|
54
54
|
# flexibility to gateway to auto upgrade itself. If properties value not
|
55
|
-
# specified, then we assume
|
56
|
-
# '
|
55
|
+
# specified, then we assume upgradeMode = Automatic. Possible values include:
|
56
|
+
# 'Manual', 'Automatic'
|
57
57
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
58
58
|
# will be added to the HTTP request.
|
59
59
|
#
|
60
60
|
# @return [Concurrent::Promise] promise which provides async access to http
|
61
61
|
# response.
|
62
62
|
#
|
63
|
-
def create_async(resource_group_name, gateway_name, location = nil, tags = nil,
|
63
|
+
def create_async(resource_group_name, gateway_name, location = nil, tags = nil, upgrade_mode = nil, custom_headers = nil)
|
64
64
|
# Send request
|
65
|
-
promise = begin_create_async(resource_group_name, gateway_name, location, tags,
|
65
|
+
promise = begin_create_async(resource_group_name, gateway_name, location, tags, upgrade_mode, custom_headers)
|
66
66
|
|
67
67
|
promise = promise.then do |response|
|
68
68
|
# Defining deserialization method.
|
@@ -79,91 +79,114 @@ module Azure::ARM::ServerManagement
|
|
79
79
|
end
|
80
80
|
|
81
81
|
#
|
82
|
-
#
|
82
|
+
# Updates a gateway belonging to a resource group.
|
83
83
|
#
|
84
84
|
# @param resource_group_name [String] The resource group name uniquely
|
85
85
|
# identifies the resource group within the user subscriptionId.
|
86
86
|
# @param gateway_name [String] The gateway name (256 characters maximum).
|
87
|
-
# @param location [String]
|
88
|
-
# @param tags
|
89
|
-
# @param
|
87
|
+
# @param location [String] Location of the resource.
|
88
|
+
# @param tags Resource tags.
|
89
|
+
# @param upgrade_mode [UpgradeMode] The upgradeMode property gives the
|
90
90
|
# flexibility to gateway to auto upgrade itself. If properties value not
|
91
|
-
# specified, then we assume
|
92
|
-
# '
|
91
|
+
# specified, then we assume upgradeMode = Automatic. Possible values include:
|
92
|
+
# 'Manual', 'Automatic'
|
93
93
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
94
94
|
# will be added to the HTTP request.
|
95
95
|
#
|
96
96
|
# @return [GatewayResource] operation results.
|
97
97
|
#
|
98
|
-
def
|
99
|
-
response =
|
98
|
+
def update(resource_group_name, gateway_name, location = nil, tags = nil, upgrade_mode = nil, custom_headers = nil)
|
99
|
+
response = update_async(resource_group_name, gateway_name, location, tags, upgrade_mode, custom_headers).value!
|
100
100
|
response.body unless response.nil?
|
101
101
|
end
|
102
102
|
|
103
|
-
#
|
104
|
-
# Creates or updates a ManagementService gateway.
|
105
103
|
#
|
106
104
|
# @param resource_group_name [String] The resource group name uniquely
|
107
105
|
# identifies the resource group within the user subscriptionId.
|
108
106
|
# @param gateway_name [String] The gateway name (256 characters maximum).
|
109
|
-
# @param location [String]
|
110
|
-
# @param tags
|
111
|
-
# @param
|
107
|
+
# @param location [String] Location of the resource.
|
108
|
+
# @param tags Resource tags.
|
109
|
+
# @param upgrade_mode [UpgradeMode] The upgradeMode property gives the
|
112
110
|
# flexibility to gateway to auto upgrade itself. If properties value not
|
113
|
-
# specified, then we assume
|
114
|
-
# '
|
111
|
+
# specified, then we assume upgradeMode = Automatic. Possible values include:
|
112
|
+
# 'Manual', 'Automatic'
|
113
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
114
|
+
# will be added to the HTTP request.
|
115
|
+
#
|
116
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
117
|
+
# response.
|
118
|
+
#
|
119
|
+
def update_async(resource_group_name, gateway_name, location = nil, tags = nil, upgrade_mode = nil, custom_headers = nil)
|
120
|
+
# Send request
|
121
|
+
promise = begin_update_async(resource_group_name, gateway_name, location, tags, upgrade_mode, custom_headers)
|
122
|
+
|
123
|
+
promise = promise.then do |response|
|
124
|
+
# Defining deserialization method.
|
125
|
+
deserialize_method = lambda do |parsed_response|
|
126
|
+
result_mapper = GatewayResource.mapper()
|
127
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
|
128
|
+
end
|
129
|
+
|
130
|
+
# Waiting for response.
|
131
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
132
|
+
end
|
133
|
+
|
134
|
+
promise
|
135
|
+
end
|
136
|
+
|
137
|
+
#
|
138
|
+
# Deletes a gateway from a resource group.
|
139
|
+
#
|
140
|
+
# @param resource_group_name [String] The resource group name uniquely
|
141
|
+
# identifies the resource group within the user subscriptionId.
|
142
|
+
# @param gateway_name [String] The gateway name (256 characters maximum).
|
143
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
144
|
+
# will be added to the HTTP request.
|
145
|
+
#
|
146
|
+
#
|
147
|
+
def delete(resource_group_name, gateway_name, custom_headers = nil)
|
148
|
+
response = delete_async(resource_group_name, gateway_name, custom_headers).value!
|
149
|
+
nil
|
150
|
+
end
|
151
|
+
|
152
|
+
#
|
153
|
+
# Deletes a gateway from a resource group.
|
154
|
+
#
|
155
|
+
# @param resource_group_name [String] The resource group name uniquely
|
156
|
+
# identifies the resource group within the user subscriptionId.
|
157
|
+
# @param gateway_name [String] The gateway name (256 characters maximum).
|
115
158
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
116
159
|
# will be added to the HTTP request.
|
117
160
|
#
|
118
161
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
119
162
|
#
|
120
|
-
def
|
121
|
-
|
163
|
+
def delete_with_http_info(resource_group_name, gateway_name, custom_headers = nil)
|
164
|
+
delete_async(resource_group_name, gateway_name, custom_headers).value!
|
122
165
|
end
|
123
166
|
|
124
167
|
#
|
125
|
-
#
|
168
|
+
# Deletes a gateway from a resource group.
|
126
169
|
#
|
127
170
|
# @param resource_group_name [String] The resource group name uniquely
|
128
171
|
# identifies the resource group within the user subscriptionId.
|
129
172
|
# @param gateway_name [String] The gateway name (256 characters maximum).
|
130
|
-
# @param location [String] location of the resource
|
131
|
-
# @param tags resource tags
|
132
|
-
# @param auto_upgrade [AutoUpgrade] The autoUpgrade property gives the
|
133
|
-
# flexibility to gateway to auto upgrade itself. If properties value not
|
134
|
-
# specified, then we assume autoUpgrade = Off. Possible values include: 'On',
|
135
|
-
# 'Off'
|
136
173
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
137
174
|
# to the HTTP request.
|
138
175
|
#
|
139
176
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
140
177
|
#
|
141
|
-
def
|
178
|
+
def delete_async(resource_group_name, gateway_name, custom_headers = nil)
|
142
179
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
143
180
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
144
181
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
145
182
|
fail ArgumentError, 'gateway_name is nil' if gateway_name.nil?
|
146
183
|
|
147
|
-
gateway_parameters = GatewayParameters.new
|
148
|
-
unless location.nil? && tags.nil? && auto_upgrade.nil?
|
149
|
-
gateway_parameters.location = location
|
150
|
-
gateway_parameters.tags = tags
|
151
|
-
gateway_parameters.auto_upgrade = auto_upgrade
|
152
|
-
end
|
153
184
|
|
154
185
|
request_headers = {}
|
155
186
|
|
156
187
|
# Set Headers
|
157
188
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
158
189
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
159
|
-
|
160
|
-
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
161
|
-
|
162
|
-
# Serialize Request
|
163
|
-
request_mapper = GatewayParameters.mapper()
|
164
|
-
request_content = @client.serialize(request_mapper, gateway_parameters, 'gateway_parameters')
|
165
|
-
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
166
|
-
|
167
190
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/gateways/{gatewayName}'
|
168
191
|
|
169
192
|
request_url = @base_url || @client.base_url
|
@@ -172,42 +195,21 @@ module Azure::ARM::ServerManagement
|
|
172
195
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
173
196
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'gatewayName' => gateway_name},
|
174
197
|
query_params: {'api-version' => @client.api_version},
|
175
|
-
body: request_content,
|
176
198
|
headers: request_headers.merge(custom_headers || {}),
|
177
199
|
base_url: request_url
|
178
200
|
}
|
179
|
-
promise = @client.make_request_async(:
|
201
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
180
202
|
|
181
203
|
promise = promise.then do |result|
|
182
204
|
http_response = result.response
|
183
205
|
status_code = http_response.status
|
184
206
|
response_content = http_response.body
|
185
|
-
unless status_code == 200 || status_code ==
|
207
|
+
unless status_code == 200 || status_code == 204
|
186
208
|
error_model = JSON.load(response_content)
|
187
209
|
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
188
210
|
end
|
189
211
|
|
190
212
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
191
|
-
# Deserialize Response
|
192
|
-
if status_code == 200
|
193
|
-
begin
|
194
|
-
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
195
|
-
result_mapper = GatewayResource.mapper()
|
196
|
-
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
197
|
-
rescue Exception => e
|
198
|
-
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
199
|
-
end
|
200
|
-
end
|
201
|
-
# Deserialize Response
|
202
|
-
if status_code == 201
|
203
|
-
begin
|
204
|
-
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
205
|
-
result_mapper = GatewayResource.mapper()
|
206
|
-
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
207
|
-
rescue Exception => e
|
208
|
-
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
209
|
-
end
|
210
|
-
end
|
211
213
|
|
212
214
|
result
|
213
215
|
end
|
@@ -216,147 +218,71 @@ module Azure::ARM::ServerManagement
|
|
216
218
|
end
|
217
219
|
|
218
220
|
#
|
219
|
-
#
|
221
|
+
# Gets a gateway.
|
220
222
|
#
|
221
223
|
# @param resource_group_name [String] The resource group name uniquely
|
222
224
|
# identifies the resource group within the user subscriptionId.
|
223
|
-
# @param gateway_name [String] The gateway name (256 characters maximum)
|
224
|
-
# @param
|
225
|
-
#
|
226
|
-
#
|
227
|
-
#
|
228
|
-
# specified, then we assume autoUpgrade = Off. Possible values include: 'On',
|
229
|
-
# 'Off'
|
230
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
231
|
-
# will be added to the HTTP request.
|
232
|
-
#
|
233
|
-
# @return [GatewayResource] operation results.
|
234
|
-
#
|
235
|
-
def update(resource_group_name, gateway_name, location = nil, tags = nil, auto_upgrade = nil, custom_headers = nil)
|
236
|
-
response = update_async(resource_group_name, gateway_name, location, tags, auto_upgrade, custom_headers).value!
|
237
|
-
response.body unless response.nil?
|
238
|
-
end
|
239
|
-
|
240
|
-
#
|
241
|
-
# @param resource_group_name [String] The resource group name uniquely
|
242
|
-
# identifies the resource group within the user subscriptionId.
|
243
|
-
# @param gateway_name [String] The gateway name (256 characters maximum).
|
244
|
-
# @param location [String] location of the resource
|
245
|
-
# @param tags resource tags
|
246
|
-
# @param auto_upgrade [AutoUpgrade] The autoUpgrade property gives the
|
247
|
-
# flexibility to gateway to auto upgrade itself. If properties value not
|
248
|
-
# specified, then we assume autoUpgrade = Off. Possible values include: 'On',
|
249
|
-
# 'Off'
|
250
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
251
|
-
# will be added to the HTTP request.
|
252
|
-
#
|
253
|
-
# @return [Concurrent::Promise] promise which provides async access to http
|
254
|
-
# response.
|
255
|
-
#
|
256
|
-
def update_async(resource_group_name, gateway_name, location = nil, tags = nil, auto_upgrade = nil, custom_headers = nil)
|
257
|
-
# Send request
|
258
|
-
promise = begin_update_async(resource_group_name, gateway_name, location, tags, auto_upgrade, custom_headers)
|
259
|
-
|
260
|
-
promise = promise.then do |response|
|
261
|
-
# Defining deserialization method.
|
262
|
-
deserialize_method = lambda do |parsed_response|
|
263
|
-
result_mapper = GatewayResource.mapper()
|
264
|
-
parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
|
265
|
-
end
|
266
|
-
|
267
|
-
# Waiting for response.
|
268
|
-
@client.get_long_running_operation_result(response, deserialize_method)
|
269
|
-
end
|
270
|
-
|
271
|
-
promise
|
272
|
-
end
|
273
|
-
|
274
|
-
#
|
275
|
-
# Updates a gateway belonging to a resource group.
|
276
|
-
#
|
277
|
-
# @param resource_group_name [String] The resource group name uniquely
|
278
|
-
# identifies the resource group within the user subscriptionId.
|
279
|
-
# @param gateway_name [String] The gateway name (256 characters maximum).
|
280
|
-
# @param location [String] location of the resource
|
281
|
-
# @param tags resource tags
|
282
|
-
# @param auto_upgrade [AutoUpgrade] The autoUpgrade property gives the
|
283
|
-
# flexibility to gateway to auto upgrade itself. If properties value not
|
284
|
-
# specified, then we assume autoUpgrade = Off. Possible values include: 'On',
|
285
|
-
# 'Off'
|
225
|
+
# @param gateway_name [String] The gateway name (256 characters maximum)
|
226
|
+
# @param expand [GatewayExpandOption] Gets subscription credentials which
|
227
|
+
# uniquely identify Microsoft Azure subscription. The subscription ID forms
|
228
|
+
# part of the URI for every service call. Possible values include: 'status',
|
229
|
+
# 'download'
|
286
230
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
287
231
|
# will be added to the HTTP request.
|
288
232
|
#
|
289
233
|
# @return [GatewayResource] operation results.
|
290
234
|
#
|
291
|
-
def
|
292
|
-
response =
|
235
|
+
def get(resource_group_name, gateway_name, expand = nil, custom_headers = nil)
|
236
|
+
response = get_async(resource_group_name, gateway_name, expand, custom_headers).value!
|
293
237
|
response.body unless response.nil?
|
294
238
|
end
|
295
239
|
|
296
240
|
#
|
297
|
-
#
|
241
|
+
# Gets a gateway.
|
298
242
|
#
|
299
243
|
# @param resource_group_name [String] The resource group name uniquely
|
300
244
|
# identifies the resource group within the user subscriptionId.
|
301
|
-
# @param gateway_name [String] The gateway name (256 characters maximum)
|
302
|
-
# @param
|
303
|
-
#
|
304
|
-
#
|
305
|
-
#
|
306
|
-
# specified, then we assume autoUpgrade = Off. Possible values include: 'On',
|
307
|
-
# 'Off'
|
245
|
+
# @param gateway_name [String] The gateway name (256 characters maximum)
|
246
|
+
# @param expand [GatewayExpandOption] Gets subscription credentials which
|
247
|
+
# uniquely identify Microsoft Azure subscription. The subscription ID forms
|
248
|
+
# part of the URI for every service call. Possible values include: 'status',
|
249
|
+
# 'download'
|
308
250
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
309
251
|
# will be added to the HTTP request.
|
310
252
|
#
|
311
253
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
312
254
|
#
|
313
|
-
def
|
314
|
-
|
255
|
+
def get_with_http_info(resource_group_name, gateway_name, expand = nil, custom_headers = nil)
|
256
|
+
get_async(resource_group_name, gateway_name, expand, custom_headers).value!
|
315
257
|
end
|
316
258
|
|
317
259
|
#
|
318
|
-
#
|
260
|
+
# Gets a gateway.
|
319
261
|
#
|
320
262
|
# @param resource_group_name [String] The resource group name uniquely
|
321
263
|
# identifies the resource group within the user subscriptionId.
|
322
|
-
# @param gateway_name [String] The gateway name (256 characters maximum)
|
323
|
-
# @param
|
324
|
-
#
|
325
|
-
#
|
326
|
-
#
|
327
|
-
# specified, then we assume autoUpgrade = Off. Possible values include: 'On',
|
328
|
-
# 'Off'
|
264
|
+
# @param gateway_name [String] The gateway name (256 characters maximum)
|
265
|
+
# @param expand [GatewayExpandOption] Gets subscription credentials which
|
266
|
+
# uniquely identify Microsoft Azure subscription. The subscription ID forms
|
267
|
+
# part of the URI for every service call. Possible values include: 'status',
|
268
|
+
# 'download'
|
329
269
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
330
270
|
# to the HTTP request.
|
331
271
|
#
|
332
272
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
333
273
|
#
|
334
|
-
def
|
274
|
+
def get_async(resource_group_name, gateway_name, expand = nil, custom_headers = nil)
|
335
275
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
336
276
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
337
277
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
338
278
|
fail ArgumentError, 'gateway_name is nil' if gateway_name.nil?
|
339
279
|
|
340
|
-
gateway_parameters = GatewayParameters.new
|
341
|
-
unless location.nil? && tags.nil? && auto_upgrade.nil?
|
342
|
-
gateway_parameters.location = location
|
343
|
-
gateway_parameters.tags = tags
|
344
|
-
gateway_parameters.auto_upgrade = auto_upgrade
|
345
|
-
end
|
346
280
|
|
347
281
|
request_headers = {}
|
348
282
|
|
349
283
|
# Set Headers
|
350
284
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
351
285
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
352
|
-
|
353
|
-
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
354
|
-
|
355
|
-
# Serialize Request
|
356
|
-
request_mapper = GatewayParameters.mapper()
|
357
|
-
request_content = @client.serialize(request_mapper, gateway_parameters, 'gateway_parameters')
|
358
|
-
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
359
|
-
|
360
286
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/gateways/{gatewayName}'
|
361
287
|
|
362
288
|
request_url = @base_url || @client.base_url
|
@@ -364,18 +290,17 @@ module Azure::ARM::ServerManagement
|
|
364
290
|
options = {
|
365
291
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
366
292
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'gatewayName' => gateway_name},
|
367
|
-
query_params: {'api-version' => @client.api_version},
|
368
|
-
body: request_content,
|
293
|
+
query_params: {'api-version' => @client.api_version,'$expand' => expand},
|
369
294
|
headers: request_headers.merge(custom_headers || {}),
|
370
295
|
base_url: request_url
|
371
296
|
}
|
372
|
-
promise = @client.make_request_async(:
|
297
|
+
promise = @client.make_request_async(:get, path_template, options)
|
373
298
|
|
374
299
|
promise = promise.then do |result|
|
375
300
|
http_response = result.response
|
376
301
|
status_code = http_response.status
|
377
302
|
response_content = http_response.body
|
378
|
-
unless status_code == 200
|
303
|
+
unless status_code == 200
|
379
304
|
error_model = JSON.load(response_content)
|
380
305
|
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
381
306
|
end
|
@@ -399,51 +324,41 @@ module Azure::ARM::ServerManagement
|
|
399
324
|
end
|
400
325
|
|
401
326
|
#
|
402
|
-
#
|
327
|
+
# Returns gateways in a subscription.
|
403
328
|
#
|
404
|
-
# @param resource_group_name [String] The resource group name uniquely
|
405
|
-
# identifies the resource group within the user subscriptionId.
|
406
|
-
# @param gateway_name [String] The gateway name (256 characters maximum).
|
407
329
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
408
330
|
# will be added to the HTTP request.
|
409
331
|
#
|
332
|
+
# @return [Array<GatewayResource>] operation results.
|
410
333
|
#
|
411
|
-
def
|
412
|
-
|
413
|
-
|
334
|
+
def list(custom_headers = nil)
|
335
|
+
first_page = list_as_lazy(custom_headers)
|
336
|
+
first_page.get_all_items
|
414
337
|
end
|
415
338
|
|
416
339
|
#
|
417
|
-
#
|
340
|
+
# Returns gateways in a subscription.
|
418
341
|
#
|
419
|
-
# @param resource_group_name [String] The resource group name uniquely
|
420
|
-
# identifies the resource group within the user subscriptionId.
|
421
|
-
# @param gateway_name [String] The gateway name (256 characters maximum).
|
422
342
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
423
343
|
# will be added to the HTTP request.
|
424
344
|
#
|
425
345
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
426
346
|
#
|
427
|
-
def
|
428
|
-
|
347
|
+
def list_with_http_info(custom_headers = nil)
|
348
|
+
list_async(custom_headers).value!
|
429
349
|
end
|
430
350
|
|
431
351
|
#
|
432
|
-
#
|
352
|
+
# Returns gateways in a subscription.
|
433
353
|
#
|
434
|
-
# @param resource_group_name [String] The resource group name uniquely
|
435
|
-
# identifies the resource group within the user subscriptionId.
|
436
|
-
# @param gateway_name [String] The gateway name (256 characters maximum).
|
437
354
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
438
355
|
# to the HTTP request.
|
439
356
|
#
|
440
357
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
441
358
|
#
|
442
|
-
def
|
359
|
+
def list_async(custom_headers = nil)
|
443
360
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
444
361
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
445
|
-
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
446
|
-
fail ArgumentError, 'gateway_name is nil' if gateway_name.nil?
|
447
362
|
|
448
363
|
|
449
364
|
request_headers = {}
|
@@ -451,29 +366,39 @@ module Azure::ARM::ServerManagement
|
|
451
366
|
# Set Headers
|
452
367
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
453
368
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
454
|
-
path_template = '/subscriptions/{subscriptionId}/
|
369
|
+
path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.ServerManagement/gateways'
|
455
370
|
|
456
371
|
request_url = @base_url || @client.base_url
|
457
372
|
|
458
373
|
options = {
|
459
374
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
460
|
-
path_params: {'subscriptionId' => @client.subscription_id
|
375
|
+
path_params: {'subscriptionId' => @client.subscription_id},
|
461
376
|
query_params: {'api-version' => @client.api_version},
|
462
377
|
headers: request_headers.merge(custom_headers || {}),
|
463
378
|
base_url: request_url
|
464
379
|
}
|
465
|
-
promise = @client.make_request_async(:
|
380
|
+
promise = @client.make_request_async(:get, path_template, options)
|
466
381
|
|
467
382
|
promise = promise.then do |result|
|
468
383
|
http_response = result.response
|
469
384
|
status_code = http_response.status
|
470
385
|
response_content = http_response.body
|
471
|
-
unless status_code == 200
|
386
|
+
unless status_code == 200
|
472
387
|
error_model = JSON.load(response_content)
|
473
388
|
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
474
389
|
end
|
475
390
|
|
476
391
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
392
|
+
# Deserialize Response
|
393
|
+
if status_code == 200
|
394
|
+
begin
|
395
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
396
|
+
result_mapper = GatewayResources.mapper()
|
397
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
398
|
+
rescue Exception => e
|
399
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
400
|
+
end
|
401
|
+
end
|
477
402
|
|
478
403
|
result
|
479
404
|
end
|
@@ -482,61 +407,48 @@ module Azure::ARM::ServerManagement
|
|
482
407
|
end
|
483
408
|
|
484
409
|
#
|
485
|
-
# Returns a
|
410
|
+
# Returns gateways in a resource group.
|
486
411
|
#
|
487
412
|
# @param resource_group_name [String] The resource group name uniquely
|
488
413
|
# identifies the resource group within the user subscriptionId.
|
489
|
-
# @param gateway_name [String] The gateway name (256 characters maximum)
|
490
|
-
# @param expand [GatewayExpandOption] Gets subscription credentials which
|
491
|
-
# uniquely identify Microsoft Azure subscription. The subscription ID forms
|
492
|
-
# part of the URI for every service call. Possible values include: 'status'
|
493
414
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
494
415
|
# will be added to the HTTP request.
|
495
416
|
#
|
496
|
-
# @return [GatewayResource] operation results.
|
417
|
+
# @return [Array<GatewayResource>] operation results.
|
497
418
|
#
|
498
|
-
def
|
499
|
-
|
500
|
-
|
419
|
+
def list_for_resource_group(resource_group_name, custom_headers = nil)
|
420
|
+
first_page = list_for_resource_group_as_lazy(resource_group_name, custom_headers)
|
421
|
+
first_page.get_all_items
|
501
422
|
end
|
502
423
|
|
503
424
|
#
|
504
|
-
# Returns a
|
425
|
+
# Returns gateways in a resource group.
|
505
426
|
#
|
506
427
|
# @param resource_group_name [String] The resource group name uniquely
|
507
428
|
# identifies the resource group within the user subscriptionId.
|
508
|
-
# @param gateway_name [String] The gateway name (256 characters maximum)
|
509
|
-
# @param expand [GatewayExpandOption] Gets subscription credentials which
|
510
|
-
# uniquely identify Microsoft Azure subscription. The subscription ID forms
|
511
|
-
# part of the URI for every service call. Possible values include: 'status'
|
512
429
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
513
430
|
# will be added to the HTTP request.
|
514
431
|
#
|
515
432
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
516
433
|
#
|
517
|
-
def
|
518
|
-
|
434
|
+
def list_for_resource_group_with_http_info(resource_group_name, custom_headers = nil)
|
435
|
+
list_for_resource_group_async(resource_group_name, custom_headers).value!
|
519
436
|
end
|
520
437
|
|
521
438
|
#
|
522
|
-
# Returns a
|
439
|
+
# Returns gateways in a resource group.
|
523
440
|
#
|
524
441
|
# @param resource_group_name [String] The resource group name uniquely
|
525
442
|
# identifies the resource group within the user subscriptionId.
|
526
|
-
# @param gateway_name [String] The gateway name (256 characters maximum)
|
527
|
-
# @param expand [GatewayExpandOption] Gets subscription credentials which
|
528
|
-
# uniquely identify Microsoft Azure subscription. The subscription ID forms
|
529
|
-
# part of the URI for every service call. Possible values include: 'status'
|
530
443
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
531
444
|
# to the HTTP request.
|
532
445
|
#
|
533
446
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
534
447
|
#
|
535
|
-
def
|
448
|
+
def list_for_resource_group_async(resource_group_name, custom_headers = nil)
|
536
449
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
537
450
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
538
451
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
539
|
-
fail ArgumentError, 'gateway_name is nil' if gateway_name.nil?
|
540
452
|
|
541
453
|
|
542
454
|
request_headers = {}
|
@@ -544,14 +456,14 @@ module Azure::ARM::ServerManagement
|
|
544
456
|
# Set Headers
|
545
457
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
546
458
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
547
|
-
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/gateways
|
459
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/gateways'
|
548
460
|
|
549
461
|
request_url = @base_url || @client.base_url
|
550
462
|
|
551
463
|
options = {
|
552
464
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
553
|
-
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name
|
554
|
-
query_params: {'api-version' => @client.api_version
|
465
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
|
466
|
+
query_params: {'api-version' => @client.api_version},
|
555
467
|
headers: request_headers.merge(custom_headers || {}),
|
556
468
|
base_url: request_url
|
557
469
|
}
|
@@ -571,7 +483,7 @@ module Azure::ARM::ServerManagement
|
|
571
483
|
if status_code == 200
|
572
484
|
begin
|
573
485
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
574
|
-
result_mapper =
|
486
|
+
result_mapper = GatewayResources.mapper()
|
575
487
|
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
576
488
|
rescue Exception => e
|
577
489
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
@@ -585,86 +497,234 @@ module Azure::ARM::ServerManagement
|
|
585
497
|
end
|
586
498
|
|
587
499
|
#
|
588
|
-
#
|
500
|
+
# Upgrades a gateway.
|
589
501
|
#
|
502
|
+
# @param resource_group_name [String] The resource group name uniquely
|
503
|
+
# identifies the resource group within the user subscriptionId.
|
504
|
+
# @param gateway_name [String] The gateway name (256 characters maximum).
|
590
505
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
591
506
|
# will be added to the HTTP request.
|
592
507
|
#
|
593
|
-
|
508
|
+
def upgrade(resource_group_name, gateway_name, custom_headers = nil)
|
509
|
+
response = upgrade_async(resource_group_name, gateway_name, custom_headers).value!
|
510
|
+
nil
|
511
|
+
end
|
512
|
+
|
513
|
+
#
|
514
|
+
# @param resource_group_name [String] The resource group name uniquely
|
515
|
+
# identifies the resource group within the user subscriptionId.
|
516
|
+
# @param gateway_name [String] The gateway name (256 characters maximum).
|
517
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
518
|
+
# will be added to the HTTP request.
|
519
|
+
#
|
520
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
594
521
|
# response.
|
595
522
|
#
|
596
|
-
def
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
523
|
+
def upgrade_async(resource_group_name, gateway_name, custom_headers = nil)
|
524
|
+
# Send request
|
525
|
+
promise = begin_upgrade_async(resource_group_name, gateway_name, custom_headers)
|
526
|
+
|
527
|
+
promise = promise.then do |response|
|
528
|
+
# Defining deserialization method.
|
529
|
+
deserialize_method = lambda do |parsed_response|
|
602
530
|
end
|
603
|
-
|
531
|
+
|
532
|
+
# Waiting for response.
|
533
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
604
534
|
end
|
535
|
+
|
536
|
+
promise
|
605
537
|
end
|
606
538
|
|
607
539
|
#
|
608
|
-
#
|
540
|
+
# Regenerate a gateway's profile
|
609
541
|
#
|
542
|
+
# @param resource_group_name [String] The resource group name uniquely
|
543
|
+
# identifies the resource group within the user subscriptionId.
|
544
|
+
# @param gateway_name [String] The gateway name (256 characters maximum).
|
610
545
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
611
546
|
# will be added to the HTTP request.
|
612
547
|
#
|
613
|
-
|
548
|
+
def regenerate_profile(resource_group_name, gateway_name, custom_headers = nil)
|
549
|
+
response = regenerate_profile_async(resource_group_name, gateway_name, custom_headers).value!
|
550
|
+
nil
|
551
|
+
end
|
552
|
+
|
614
553
|
#
|
615
|
-
|
616
|
-
|
617
|
-
|
554
|
+
# @param resource_group_name [String] The resource group name uniquely
|
555
|
+
# identifies the resource group within the user subscriptionId.
|
556
|
+
# @param gateway_name [String] The gateway name (256 characters maximum).
|
557
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
558
|
+
# will be added to the HTTP request.
|
559
|
+
#
|
560
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
561
|
+
# response.
|
562
|
+
#
|
563
|
+
def regenerate_profile_async(resource_group_name, gateway_name, custom_headers = nil)
|
564
|
+
# Send request
|
565
|
+
promise = begin_regenerate_profile_async(resource_group_name, gateway_name, custom_headers)
|
566
|
+
|
567
|
+
promise = promise.then do |response|
|
568
|
+
# Defining deserialization method.
|
569
|
+
deserialize_method = lambda do |parsed_response|
|
570
|
+
end
|
571
|
+
|
572
|
+
# Waiting for response.
|
573
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
574
|
+
end
|
575
|
+
|
576
|
+
promise
|
618
577
|
end
|
619
578
|
|
620
579
|
#
|
621
|
-
#
|
580
|
+
# Gets a gateway profile.
|
581
|
+
#
|
582
|
+
# @param resource_group_name [String] The resource group name uniquely
|
583
|
+
# identifies the resource group within the user subscriptionId.
|
584
|
+
# @param gateway_name [String] The gateway name (256 characters maximum).
|
585
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
586
|
+
# will be added to the HTTP request.
|
587
|
+
#
|
588
|
+
# @return [GatewayProfile] operation results.
|
589
|
+
#
|
590
|
+
def get_profile(resource_group_name, gateway_name, custom_headers = nil)
|
591
|
+
response = get_profile_async(resource_group_name, gateway_name, custom_headers).value!
|
592
|
+
response.body unless response.nil?
|
593
|
+
end
|
594
|
+
|
622
595
|
#
|
596
|
+
# @param resource_group_name [String] The resource group name uniquely
|
597
|
+
# identifies the resource group within the user subscriptionId.
|
598
|
+
# @param gateway_name [String] The gateway name (256 characters maximum).
|
599
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
600
|
+
# will be added to the HTTP request.
|
601
|
+
#
|
602
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
603
|
+
# response.
|
604
|
+
#
|
605
|
+
def get_profile_async(resource_group_name, gateway_name, custom_headers = nil)
|
606
|
+
# Send request
|
607
|
+
promise = begin_get_profile_async(resource_group_name, gateway_name, custom_headers)
|
608
|
+
|
609
|
+
promise = promise.then do |response|
|
610
|
+
# Defining deserialization method.
|
611
|
+
deserialize_method = lambda do |parsed_response|
|
612
|
+
result_mapper = GatewayProfile.mapper()
|
613
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
|
614
|
+
end
|
615
|
+
|
616
|
+
# Waiting for response.
|
617
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
618
|
+
end
|
619
|
+
|
620
|
+
promise
|
621
|
+
end
|
622
|
+
|
623
|
+
#
|
624
|
+
# Creates or updates a ManagementService gateway.
|
625
|
+
#
|
626
|
+
# @param resource_group_name [String] The resource group name uniquely
|
627
|
+
# identifies the resource group within the user subscriptionId.
|
628
|
+
# @param gateway_name [String] The gateway name (256 characters maximum).
|
629
|
+
# @param location [String] Location of the resource.
|
630
|
+
# @param tags Resource tags.
|
631
|
+
# @param upgrade_mode [UpgradeMode] The upgradeMode property gives the
|
632
|
+
# flexibility to gateway to auto upgrade itself. If properties value not
|
633
|
+
# specified, then we assume upgradeMode = Automatic. Possible values include:
|
634
|
+
# 'Manual', 'Automatic'
|
635
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
636
|
+
# will be added to the HTTP request.
|
637
|
+
#
|
638
|
+
# @return [GatewayResource] operation results.
|
639
|
+
#
|
640
|
+
def begin_create(resource_group_name, gateway_name, location = nil, tags = nil, upgrade_mode = nil, custom_headers = nil)
|
641
|
+
response = begin_create_async(resource_group_name, gateway_name, location, tags, upgrade_mode, custom_headers).value!
|
642
|
+
response.body unless response.nil?
|
643
|
+
end
|
644
|
+
|
645
|
+
#
|
646
|
+
# Creates or updates a ManagementService gateway.
|
647
|
+
#
|
648
|
+
# @param resource_group_name [String] The resource group name uniquely
|
649
|
+
# identifies the resource group within the user subscriptionId.
|
650
|
+
# @param gateway_name [String] The gateway name (256 characters maximum).
|
651
|
+
# @param location [String] Location of the resource.
|
652
|
+
# @param tags Resource tags.
|
653
|
+
# @param upgrade_mode [UpgradeMode] The upgradeMode property gives the
|
654
|
+
# flexibility to gateway to auto upgrade itself. If properties value not
|
655
|
+
# specified, then we assume upgradeMode = Automatic. Possible values include:
|
656
|
+
# 'Manual', 'Automatic'
|
623
657
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
624
658
|
# will be added to the HTTP request.
|
625
659
|
#
|
626
660
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
627
661
|
#
|
628
|
-
def
|
629
|
-
|
662
|
+
def begin_create_with_http_info(resource_group_name, gateway_name, location = nil, tags = nil, upgrade_mode = nil, custom_headers = nil)
|
663
|
+
begin_create_async(resource_group_name, gateway_name, location, tags, upgrade_mode, custom_headers).value!
|
630
664
|
end
|
631
665
|
|
632
666
|
#
|
633
|
-
#
|
667
|
+
# Creates or updates a ManagementService gateway.
|
634
668
|
#
|
669
|
+
# @param resource_group_name [String] The resource group name uniquely
|
670
|
+
# identifies the resource group within the user subscriptionId.
|
671
|
+
# @param gateway_name [String] The gateway name (256 characters maximum).
|
672
|
+
# @param location [String] Location of the resource.
|
673
|
+
# @param tags Resource tags.
|
674
|
+
# @param upgrade_mode [UpgradeMode] The upgradeMode property gives the
|
675
|
+
# flexibility to gateway to auto upgrade itself. If properties value not
|
676
|
+
# specified, then we assume upgradeMode = Automatic. Possible values include:
|
677
|
+
# 'Manual', 'Automatic'
|
635
678
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
636
679
|
# to the HTTP request.
|
637
680
|
#
|
638
681
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
639
682
|
#
|
640
|
-
def
|
683
|
+
def begin_create_async(resource_group_name, gateway_name, location = nil, tags = nil, upgrade_mode = nil, custom_headers = nil)
|
641
684
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
642
685
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
686
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
687
|
+
fail ArgumentError, 'gateway_name is nil' if gateway_name.nil?
|
643
688
|
|
689
|
+
gateway_parameters = GatewayParameters.new
|
690
|
+
unless location.nil? && tags.nil? && upgrade_mode.nil?
|
691
|
+
gateway_parameters.location = location
|
692
|
+
gateway_parameters.tags = tags
|
693
|
+
gateway_parameters.upgrade_mode = upgrade_mode
|
694
|
+
end
|
644
695
|
|
645
696
|
request_headers = {}
|
646
697
|
|
647
698
|
# Set Headers
|
648
699
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
649
700
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
650
|
-
|
701
|
+
|
702
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
703
|
+
|
704
|
+
# Serialize Request
|
705
|
+
request_mapper = GatewayParameters.mapper()
|
706
|
+
request_content = @client.serialize(request_mapper, gateway_parameters, 'gateway_parameters')
|
707
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
708
|
+
|
709
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/gateways/{gatewayName}'
|
651
710
|
|
652
711
|
request_url = @base_url || @client.base_url
|
653
712
|
|
654
713
|
options = {
|
655
714
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
656
|
-
path_params: {'subscriptionId' => @client.subscription_id},
|
715
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'gatewayName' => gateway_name},
|
657
716
|
query_params: {'api-version' => @client.api_version},
|
717
|
+
body: request_content,
|
658
718
|
headers: request_headers.merge(custom_headers || {}),
|
659
719
|
base_url: request_url
|
660
720
|
}
|
661
|
-
promise = @client.make_request_async(:
|
721
|
+
promise = @client.make_request_async(:put, path_template, options)
|
662
722
|
|
663
723
|
promise = promise.then do |result|
|
664
724
|
http_response = result.response
|
665
725
|
status_code = http_response.status
|
666
726
|
response_content = http_response.body
|
667
|
-
unless status_code == 200
|
727
|
+
unless status_code == 200 || status_code == 201
|
668
728
|
error_model = JSON.load(response_content)
|
669
729
|
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
670
730
|
end
|
@@ -674,7 +734,17 @@ module Azure::ARM::ServerManagement
|
|
674
734
|
if status_code == 200
|
675
735
|
begin
|
676
736
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
677
|
-
result_mapper =
|
737
|
+
result_mapper = GatewayResource.mapper()
|
738
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
739
|
+
rescue Exception => e
|
740
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
741
|
+
end
|
742
|
+
end
|
743
|
+
# Deserialize Response
|
744
|
+
if status_code == 201
|
745
|
+
begin
|
746
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
747
|
+
result_mapper = GatewayResource.mapper()
|
678
748
|
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
679
749
|
rescue Exception => e
|
680
750
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
@@ -688,95 +758,110 @@ module Azure::ARM::ServerManagement
|
|
688
758
|
end
|
689
759
|
|
690
760
|
#
|
691
|
-
#
|
692
|
-
#
|
693
|
-
# @param resource_group_name [String] The resource group name uniquely
|
694
|
-
# identifies the resource group within the user subscriptionId.
|
695
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
696
|
-
# will be added to the HTTP request.
|
697
|
-
#
|
698
|
-
# @return [GatewayResources] which provide lazy access to pages of the
|
699
|
-
# response.
|
700
|
-
#
|
701
|
-
def list_for_resource_group_as_lazy(resource_group_name, custom_headers = nil)
|
702
|
-
response = list_for_resource_group_async(resource_group_name, custom_headers).value!
|
703
|
-
unless response.nil?
|
704
|
-
page = response.body
|
705
|
-
page.next_method = Proc.new do |next_page_link|
|
706
|
-
list_for_resource_group_next_async(next_page_link, custom_headers)
|
707
|
-
end
|
708
|
-
page
|
709
|
-
end
|
710
|
-
end
|
711
|
-
|
712
|
-
#
|
713
|
-
# Returns gateways in a resource group
|
761
|
+
# Updates a gateway belonging to a resource group.
|
714
762
|
#
|
715
763
|
# @param resource_group_name [String] The resource group name uniquely
|
716
764
|
# identifies the resource group within the user subscriptionId.
|
765
|
+
# @param gateway_name [String] The gateway name (256 characters maximum).
|
766
|
+
# @param location [String] Location of the resource.
|
767
|
+
# @param tags Resource tags.
|
768
|
+
# @param upgrade_mode [UpgradeMode] The upgradeMode property gives the
|
769
|
+
# flexibility to gateway to auto upgrade itself. If properties value not
|
770
|
+
# specified, then we assume upgradeMode = Automatic. Possible values include:
|
771
|
+
# 'Manual', 'Automatic'
|
717
772
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
718
773
|
# will be added to the HTTP request.
|
719
774
|
#
|
720
|
-
# @return [
|
775
|
+
# @return [GatewayResource] operation results.
|
721
776
|
#
|
722
|
-
def
|
723
|
-
|
724
|
-
|
777
|
+
def begin_update(resource_group_name, gateway_name, location = nil, tags = nil, upgrade_mode = nil, custom_headers = nil)
|
778
|
+
response = begin_update_async(resource_group_name, gateway_name, location, tags, upgrade_mode, custom_headers).value!
|
779
|
+
response.body unless response.nil?
|
725
780
|
end
|
726
781
|
|
727
782
|
#
|
728
|
-
#
|
783
|
+
# Updates a gateway belonging to a resource group.
|
729
784
|
#
|
730
785
|
# @param resource_group_name [String] The resource group name uniquely
|
731
786
|
# identifies the resource group within the user subscriptionId.
|
787
|
+
# @param gateway_name [String] The gateway name (256 characters maximum).
|
788
|
+
# @param location [String] Location of the resource.
|
789
|
+
# @param tags Resource tags.
|
790
|
+
# @param upgrade_mode [UpgradeMode] The upgradeMode property gives the
|
791
|
+
# flexibility to gateway to auto upgrade itself. If properties value not
|
792
|
+
# specified, then we assume upgradeMode = Automatic. Possible values include:
|
793
|
+
# 'Manual', 'Automatic'
|
732
794
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
733
795
|
# will be added to the HTTP request.
|
734
796
|
#
|
735
797
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
736
798
|
#
|
737
|
-
def
|
738
|
-
|
799
|
+
def begin_update_with_http_info(resource_group_name, gateway_name, location = nil, tags = nil, upgrade_mode = nil, custom_headers = nil)
|
800
|
+
begin_update_async(resource_group_name, gateway_name, location, tags, upgrade_mode, custom_headers).value!
|
739
801
|
end
|
740
802
|
|
741
803
|
#
|
742
|
-
#
|
804
|
+
# Updates a gateway belonging to a resource group.
|
743
805
|
#
|
744
806
|
# @param resource_group_name [String] The resource group name uniquely
|
745
807
|
# identifies the resource group within the user subscriptionId.
|
808
|
+
# @param gateway_name [String] The gateway name (256 characters maximum).
|
809
|
+
# @param location [String] Location of the resource.
|
810
|
+
# @param tags Resource tags.
|
811
|
+
# @param upgrade_mode [UpgradeMode] The upgradeMode property gives the
|
812
|
+
# flexibility to gateway to auto upgrade itself. If properties value not
|
813
|
+
# specified, then we assume upgradeMode = Automatic. Possible values include:
|
814
|
+
# 'Manual', 'Automatic'
|
746
815
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
747
816
|
# to the HTTP request.
|
748
817
|
#
|
749
818
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
750
819
|
#
|
751
|
-
def
|
820
|
+
def begin_update_async(resource_group_name, gateway_name, location = nil, tags = nil, upgrade_mode = nil, custom_headers = nil)
|
752
821
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
753
822
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
754
823
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
824
|
+
fail ArgumentError, 'gateway_name is nil' if gateway_name.nil?
|
755
825
|
|
826
|
+
gateway_parameters = GatewayParameters.new
|
827
|
+
unless location.nil? && tags.nil? && upgrade_mode.nil?
|
828
|
+
gateway_parameters.location = location
|
829
|
+
gateway_parameters.tags = tags
|
830
|
+
gateway_parameters.upgrade_mode = upgrade_mode
|
831
|
+
end
|
756
832
|
|
757
833
|
request_headers = {}
|
758
834
|
|
759
835
|
# Set Headers
|
760
836
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
761
837
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
762
|
-
|
838
|
+
|
839
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
840
|
+
|
841
|
+
# Serialize Request
|
842
|
+
request_mapper = GatewayParameters.mapper()
|
843
|
+
request_content = @client.serialize(request_mapper, gateway_parameters, 'gateway_parameters')
|
844
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
845
|
+
|
846
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/gateways/{gatewayName}'
|
763
847
|
|
764
848
|
request_url = @base_url || @client.base_url
|
765
849
|
|
766
850
|
options = {
|
767
851
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
768
|
-
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
|
852
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'gatewayName' => gateway_name},
|
769
853
|
query_params: {'api-version' => @client.api_version},
|
854
|
+
body: request_content,
|
770
855
|
headers: request_headers.merge(custom_headers || {}),
|
771
856
|
base_url: request_url
|
772
857
|
}
|
773
|
-
promise = @client.make_request_async(:
|
858
|
+
promise = @client.make_request_async(:patch, path_template, options)
|
774
859
|
|
775
860
|
promise = promise.then do |result|
|
776
861
|
http_response = result.response
|
777
862
|
status_code = http_response.status
|
778
863
|
response_content = http_response.body
|
779
|
-
unless status_code == 200
|
864
|
+
unless status_code == 200 || status_code == 202
|
780
865
|
error_model = JSON.load(response_content)
|
781
866
|
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
782
867
|
end
|
@@ -786,7 +871,7 @@ module Azure::ARM::ServerManagement
|
|
786
871
|
if status_code == 200
|
787
872
|
begin
|
788
873
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
789
|
-
result_mapper =
|
874
|
+
result_mapper = GatewayResource.mapper()
|
790
875
|
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
791
876
|
rescue Exception => e
|
792
877
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
@@ -800,47 +885,7 @@ module Azure::ARM::ServerManagement
|
|
800
885
|
end
|
801
886
|
|
802
887
|
#
|
803
|
-
#
|
804
|
-
#
|
805
|
-
# @param resource_group_name [String] The resource group name uniquely
|
806
|
-
# identifies the resource group within the user subscriptionId.
|
807
|
-
# @param gateway_name [String] The gateway name (256 characters maximum).
|
808
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
809
|
-
# will be added to the HTTP request.
|
810
|
-
#
|
811
|
-
def upgrade(resource_group_name, gateway_name, custom_headers = nil)
|
812
|
-
response = upgrade_async(resource_group_name, gateway_name, custom_headers).value!
|
813
|
-
nil
|
814
|
-
end
|
815
|
-
|
816
|
-
#
|
817
|
-
# @param resource_group_name [String] The resource group name uniquely
|
818
|
-
# identifies the resource group within the user subscriptionId.
|
819
|
-
# @param gateway_name [String] The gateway name (256 characters maximum).
|
820
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
821
|
-
# will be added to the HTTP request.
|
822
|
-
#
|
823
|
-
# @return [Concurrent::Promise] promise which provides async access to http
|
824
|
-
# response.
|
825
|
-
#
|
826
|
-
def upgrade_async(resource_group_name, gateway_name, custom_headers = nil)
|
827
|
-
# Send request
|
828
|
-
promise = begin_upgrade_async(resource_group_name, gateway_name, custom_headers)
|
829
|
-
|
830
|
-
promise = promise.then do |response|
|
831
|
-
# Defining deserialization method.
|
832
|
-
deserialize_method = lambda do |parsed_response|
|
833
|
-
end
|
834
|
-
|
835
|
-
# Waiting for response.
|
836
|
-
@client.get_long_running_operation_result(response, deserialize_method)
|
837
|
-
end
|
838
|
-
|
839
|
-
promise
|
840
|
-
end
|
841
|
-
|
842
|
-
#
|
843
|
-
# Upgrade a gateway
|
888
|
+
# Upgrades a gateway.
|
844
889
|
#
|
845
890
|
# @param resource_group_name [String] The resource group name uniquely
|
846
891
|
# identifies the resource group within the user subscriptionId.
|
@@ -855,7 +900,7 @@ module Azure::ARM::ServerManagement
|
|
855
900
|
end
|
856
901
|
|
857
902
|
#
|
858
|
-
#
|
903
|
+
# Upgrades a gateway.
|
859
904
|
#
|
860
905
|
# @param resource_group_name [String] The resource group name uniquely
|
861
906
|
# identifies the resource group within the user subscriptionId.
|
@@ -870,7 +915,7 @@ module Azure::ARM::ServerManagement
|
|
870
915
|
end
|
871
916
|
|
872
917
|
#
|
873
|
-
#
|
918
|
+
# Upgrades a gateway.
|
874
919
|
#
|
875
920
|
# @param resource_group_name [String] The resource group name uniquely
|
876
921
|
# identifies the resource group within the user subscriptionId.
|
@@ -922,46 +967,6 @@ module Azure::ARM::ServerManagement
|
|
922
967
|
promise.execute
|
923
968
|
end
|
924
969
|
|
925
|
-
#
|
926
|
-
# Regenerate a gateway's profile
|
927
|
-
#
|
928
|
-
# @param resource_group_name [String] The resource group name uniquely
|
929
|
-
# identifies the resource group within the user subscriptionId.
|
930
|
-
# @param gateway_name [String] The gateway name (256 characters maximum).
|
931
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
932
|
-
# will be added to the HTTP request.
|
933
|
-
#
|
934
|
-
def regenerate_profile(resource_group_name, gateway_name, custom_headers = nil)
|
935
|
-
response = regenerate_profile_async(resource_group_name, gateway_name, custom_headers).value!
|
936
|
-
nil
|
937
|
-
end
|
938
|
-
|
939
|
-
#
|
940
|
-
# @param resource_group_name [String] The resource group name uniquely
|
941
|
-
# identifies the resource group within the user subscriptionId.
|
942
|
-
# @param gateway_name [String] The gateway name (256 characters maximum).
|
943
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
944
|
-
# will be added to the HTTP request.
|
945
|
-
#
|
946
|
-
# @return [Concurrent::Promise] promise which provides async access to http
|
947
|
-
# response.
|
948
|
-
#
|
949
|
-
def regenerate_profile_async(resource_group_name, gateway_name, custom_headers = nil)
|
950
|
-
# Send request
|
951
|
-
promise = begin_regenerate_profile_async(resource_group_name, gateway_name, custom_headers)
|
952
|
-
|
953
|
-
promise = promise.then do |response|
|
954
|
-
# Defining deserialization method.
|
955
|
-
deserialize_method = lambda do |parsed_response|
|
956
|
-
end
|
957
|
-
|
958
|
-
# Waiting for response.
|
959
|
-
@client.get_long_running_operation_result(response, deserialize_method)
|
960
|
-
end
|
961
|
-
|
962
|
-
promise
|
963
|
-
end
|
964
|
-
|
965
970
|
#
|
966
971
|
# Regenerate a gateway's profile
|
967
972
|
#
|
@@ -1046,51 +1051,7 @@ module Azure::ARM::ServerManagement
|
|
1046
1051
|
end
|
1047
1052
|
|
1048
1053
|
#
|
1049
|
-
# Gets a gateway profile
|
1050
|
-
#
|
1051
|
-
# @param resource_group_name [String] The resource group name uniquely
|
1052
|
-
# identifies the resource group within the user subscriptionId.
|
1053
|
-
# @param gateway_name [String] The gateway name (256 characters maximum).
|
1054
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1055
|
-
# will be added to the HTTP request.
|
1056
|
-
#
|
1057
|
-
# @return [GatewayProfile] operation results.
|
1058
|
-
#
|
1059
|
-
def get_profile(resource_group_name, gateway_name, custom_headers = nil)
|
1060
|
-
response = get_profile_async(resource_group_name, gateway_name, custom_headers).value!
|
1061
|
-
response.body unless response.nil?
|
1062
|
-
end
|
1063
|
-
|
1064
|
-
#
|
1065
|
-
# @param resource_group_name [String] The resource group name uniquely
|
1066
|
-
# identifies the resource group within the user subscriptionId.
|
1067
|
-
# @param gateway_name [String] The gateway name (256 characters maximum).
|
1068
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1069
|
-
# will be added to the HTTP request.
|
1070
|
-
#
|
1071
|
-
# @return [Concurrent::Promise] promise which provides async access to http
|
1072
|
-
# response.
|
1073
|
-
#
|
1074
|
-
def get_profile_async(resource_group_name, gateway_name, custom_headers = nil)
|
1075
|
-
# Send request
|
1076
|
-
promise = begin_get_profile_async(resource_group_name, gateway_name, custom_headers)
|
1077
|
-
|
1078
|
-
promise = promise.then do |response|
|
1079
|
-
# Defining deserialization method.
|
1080
|
-
deserialize_method = lambda do |parsed_response|
|
1081
|
-
result_mapper = GatewayProfile.mapper()
|
1082
|
-
parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
|
1083
|
-
end
|
1084
|
-
|
1085
|
-
# Waiting for response.
|
1086
|
-
@client.get_long_running_operation_result(response, deserialize_method)
|
1087
|
-
end
|
1088
|
-
|
1089
|
-
promise
|
1090
|
-
end
|
1091
|
-
|
1092
|
-
#
|
1093
|
-
# Gets a gateway profile
|
1054
|
+
# Gets a gateway profile.
|
1094
1055
|
#
|
1095
1056
|
# @param resource_group_name [String] The resource group name uniquely
|
1096
1057
|
# identifies the resource group within the user subscriptionId.
|
@@ -1106,7 +1067,7 @@ module Azure::ARM::ServerManagement
|
|
1106
1067
|
end
|
1107
1068
|
|
1108
1069
|
#
|
1109
|
-
# Gets a gateway profile
|
1070
|
+
# Gets a gateway profile.
|
1110
1071
|
#
|
1111
1072
|
# @param resource_group_name [String] The resource group name uniquely
|
1112
1073
|
# identifies the resource group within the user subscriptionId.
|
@@ -1121,7 +1082,7 @@ module Azure::ARM::ServerManagement
|
|
1121
1082
|
end
|
1122
1083
|
|
1123
1084
|
#
|
1124
|
-
# Gets a gateway profile
|
1085
|
+
# Gets a gateway profile.
|
1125
1086
|
#
|
1126
1087
|
# @param resource_group_name [String] The resource group name uniquely
|
1127
1088
|
# identifies the resource group within the user subscriptionId.
|
@@ -1184,10 +1145,10 @@ module Azure::ARM::ServerManagement
|
|
1184
1145
|
end
|
1185
1146
|
|
1186
1147
|
#
|
1187
|
-
# Returns gateways in a subscription
|
1148
|
+
# Returns gateways in a subscription.
|
1188
1149
|
#
|
1189
|
-
# @param next_page_link [String] The NextLink from the previous successful
|
1190
|
-
#
|
1150
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1151
|
+
# to List operation.
|
1191
1152
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1192
1153
|
# will be added to the HTTP request.
|
1193
1154
|
#
|
@@ -1199,10 +1160,10 @@ module Azure::ARM::ServerManagement
|
|
1199
1160
|
end
|
1200
1161
|
|
1201
1162
|
#
|
1202
|
-
# Returns gateways in a subscription
|
1163
|
+
# Returns gateways in a subscription.
|
1203
1164
|
#
|
1204
|
-
# @param next_page_link [String] The NextLink from the previous successful
|
1205
|
-
#
|
1165
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1166
|
+
# to List operation.
|
1206
1167
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1207
1168
|
# will be added to the HTTP request.
|
1208
1169
|
#
|
@@ -1213,10 +1174,10 @@ module Azure::ARM::ServerManagement
|
|
1213
1174
|
end
|
1214
1175
|
|
1215
1176
|
#
|
1216
|
-
# Returns gateways in a subscription
|
1177
|
+
# Returns gateways in a subscription.
|
1217
1178
|
#
|
1218
|
-
# @param next_page_link [String] The NextLink from the previous successful
|
1219
|
-
#
|
1179
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1180
|
+
# to List operation.
|
1220
1181
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1221
1182
|
# to the HTTP request.
|
1222
1183
|
#
|
@@ -1271,10 +1232,10 @@ module Azure::ARM::ServerManagement
|
|
1271
1232
|
end
|
1272
1233
|
|
1273
1234
|
#
|
1274
|
-
# Returns gateways in a resource group
|
1235
|
+
# Returns gateways in a resource group.
|
1275
1236
|
#
|
1276
|
-
# @param next_page_link [String] The NextLink from the previous successful
|
1277
|
-
#
|
1237
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1238
|
+
# to List operation.
|
1278
1239
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1279
1240
|
# will be added to the HTTP request.
|
1280
1241
|
#
|
@@ -1286,10 +1247,10 @@ module Azure::ARM::ServerManagement
|
|
1286
1247
|
end
|
1287
1248
|
|
1288
1249
|
#
|
1289
|
-
# Returns gateways in a resource group
|
1250
|
+
# Returns gateways in a resource group.
|
1290
1251
|
#
|
1291
|
-
# @param next_page_link [String] The NextLink from the previous successful
|
1292
|
-
#
|
1252
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1253
|
+
# to List operation.
|
1293
1254
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1294
1255
|
# will be added to the HTTP request.
|
1295
1256
|
#
|
@@ -1300,10 +1261,10 @@ module Azure::ARM::ServerManagement
|
|
1300
1261
|
end
|
1301
1262
|
|
1302
1263
|
#
|
1303
|
-
# Returns gateways in a resource group
|
1264
|
+
# Returns gateways in a resource group.
|
1304
1265
|
#
|
1305
|
-
# @param next_page_link [String] The NextLink from the previous successful
|
1306
|
-
#
|
1266
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1267
|
+
# to List operation.
|
1307
1268
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1308
1269
|
# to the HTTP request.
|
1309
1270
|
#
|
@@ -1357,5 +1318,47 @@ module Azure::ARM::ServerManagement
|
|
1357
1318
|
promise.execute
|
1358
1319
|
end
|
1359
1320
|
|
1321
|
+
#
|
1322
|
+
# Returns gateways in a subscription.
|
1323
|
+
#
|
1324
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1325
|
+
# will be added to the HTTP request.
|
1326
|
+
#
|
1327
|
+
# @return [GatewayResources] which provide lazy access to pages of the
|
1328
|
+
# response.
|
1329
|
+
#
|
1330
|
+
def list_as_lazy(custom_headers = nil)
|
1331
|
+
response = list_async(custom_headers).value!
|
1332
|
+
unless response.nil?
|
1333
|
+
page = response.body
|
1334
|
+
page.next_method = Proc.new do |next_page_link|
|
1335
|
+
list_next_async(next_page_link, custom_headers)
|
1336
|
+
end
|
1337
|
+
page
|
1338
|
+
end
|
1339
|
+
end
|
1340
|
+
|
1341
|
+
#
|
1342
|
+
# Returns gateways in a resource group.
|
1343
|
+
#
|
1344
|
+
# @param resource_group_name [String] The resource group name uniquely
|
1345
|
+
# identifies the resource group within the user subscriptionId.
|
1346
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1347
|
+
# will be added to the HTTP request.
|
1348
|
+
#
|
1349
|
+
# @return [GatewayResources] which provide lazy access to pages of the
|
1350
|
+
# response.
|
1351
|
+
#
|
1352
|
+
def list_for_resource_group_as_lazy(resource_group_name, custom_headers = nil)
|
1353
|
+
response = list_for_resource_group_async(resource_group_name, custom_headers).value!
|
1354
|
+
unless response.nil?
|
1355
|
+
page = response.body
|
1356
|
+
page.next_method = Proc.new do |next_page_link|
|
1357
|
+
list_for_resource_group_next_async(next_page_link, custom_headers)
|
1358
|
+
end
|
1359
|
+
page
|
1360
|
+
end
|
1361
|
+
end
|
1362
|
+
|
1360
1363
|
end
|
1361
1364
|
end
|