azure_mgmt_server_management 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/generated/azure_mgmt_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
@@ -1,22 +1,22 @@
|
|
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
|
module Models
|
8
8
|
#
|
9
|
-
#
|
9
|
+
# The session object.
|
10
10
|
#
|
11
11
|
class SessionResource < MsRestAzure::Resource
|
12
12
|
|
13
13
|
include MsRestAzure
|
14
14
|
|
15
|
-
# @return [String]
|
15
|
+
# @return [String] The username connecting to the session.
|
16
16
|
attr_accessor :user_name
|
17
17
|
|
18
18
|
# @return [DateTime] UTC date and time when node was first added to
|
19
|
-
# management service
|
19
|
+
# management service.
|
20
20
|
attr_accessor :created
|
21
21
|
|
22
22
|
# @return [DateTime] UTC date and time when node was last updated.
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::ServerManagement
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Defines values for UpgradeMode
|
10
|
+
#
|
11
|
+
module UpgradeMode
|
12
|
+
Manual = "Manual"
|
13
|
+
Automatic = "Automatic"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -1,33 +1,33 @@
|
|
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
|
module Models
|
8
8
|
#
|
9
|
-
# A multipart-numeric version number
|
9
|
+
# A multipart-numeric version number.
|
10
10
|
#
|
11
11
|
class Version
|
12
12
|
|
13
13
|
include MsRestAzure
|
14
14
|
|
15
|
-
# @return [Integer]
|
15
|
+
# @return [Integer] The leftmost number of the version.
|
16
16
|
attr_accessor :major
|
17
17
|
|
18
|
-
# @return [Integer]
|
18
|
+
# @return [Integer] The second leftmost number of the version.
|
19
19
|
attr_accessor :minor
|
20
20
|
|
21
|
-
# @return [Integer]
|
21
|
+
# @return [Integer] The third number of the version.
|
22
22
|
attr_accessor :build
|
23
23
|
|
24
|
-
# @return [Integer]
|
24
|
+
# @return [Integer] The fourth number of the version.
|
25
25
|
attr_accessor :revision
|
26
26
|
|
27
|
-
# @return [Integer]
|
27
|
+
# @return [Integer] The MSW of the fourth part.
|
28
28
|
attr_accessor :major_revision
|
29
29
|
|
30
|
-
# @return [Integer]
|
30
|
+
# @return [Integer] The LSW of the fourth part.
|
31
31
|
attr_accessor :minor_revision
|
32
32
|
|
33
33
|
|
@@ -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 Node
|
11
11
|
include Azure::ARM::ServerManagement::Models
|
@@ -23,17 +23,17 @@ module Azure::ARM::ServerManagement
|
|
23
23
|
attr_reader :client
|
24
24
|
|
25
25
|
#
|
26
|
-
# Creates or updates a management node
|
26
|
+
# Creates or updates a management node.
|
27
27
|
#
|
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 node_name [String] The node name (256 characters maximum).
|
31
|
-
# @param location [String]
|
32
|
-
# @param tags
|
33
|
-
# @param gateway_id [String] Gateway
|
31
|
+
# @param location [String] Location of the resource.
|
32
|
+
# @param tags Resource tags.
|
33
|
+
# @param gateway_id [String] Gateway ID which will manage this node.
|
34
34
|
# @param connection_name [String] myhost.domain.com
|
35
|
-
# @param user_name [String] User name to be used to connect to node
|
36
|
-
# @param password [String] Password associated with user name
|
35
|
+
# @param user_name [String] User name to be used to connect to node.
|
36
|
+
# @param password [String] Password associated with user name.
|
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
|
#
|
@@ -48,12 +48,12 @@ 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 node_name [String] The node name (256 characters maximum).
|
51
|
-
# @param location [String]
|
52
|
-
# @param tags
|
53
|
-
# @param gateway_id [String] Gateway
|
51
|
+
# @param location [String] Location of the resource.
|
52
|
+
# @param tags Resource tags.
|
53
|
+
# @param gateway_id [String] Gateway ID which will manage this node.
|
54
54
|
# @param connection_name [String] myhost.domain.com
|
55
|
-
# @param user_name [String] User name to be used to connect to node
|
56
|
-
# @param password [String] Password associated with user name
|
55
|
+
# @param user_name [String] User name to be used to connect to node.
|
56
|
+
# @param password [String] Password associated with user name.
|
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
|
#
|
@@ -79,94 +79,114 @@ module Azure::ARM::ServerManagement
|
|
79
79
|
end
|
80
80
|
|
81
81
|
#
|
82
|
-
#
|
82
|
+
# Updates a management node.
|
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 node_name [String] The node name (256 characters maximum).
|
87
|
-
# @param location [String]
|
88
|
-
# @param tags
|
89
|
-
# @param gateway_id [String] Gateway
|
87
|
+
# @param location [String] Location of the resource.
|
88
|
+
# @param tags Resource tags.
|
89
|
+
# @param gateway_id [String] Gateway ID which will manage this node.
|
90
90
|
# @param connection_name [String] myhost.domain.com
|
91
|
-
# @param user_name [String] User name to be used to connect to node
|
92
|
-
# @param password [String] Password associated with user name
|
91
|
+
# @param user_name [String] User name to be used to connect to node.
|
92
|
+
# @param password [String] Password associated with user name.
|
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 [NodeResource] operation results.
|
97
97
|
#
|
98
|
-
def
|
99
|
-
response =
|
98
|
+
def update(resource_group_name, node_name, location = nil, tags = nil, gateway_id = nil, connection_name = nil, user_name = nil, password = nil, custom_headers = nil)
|
99
|
+
response = update_async(resource_group_name, node_name, location, tags, gateway_id, connection_name, user_name, password, custom_headers).value!
|
100
100
|
response.body unless response.nil?
|
101
101
|
end
|
102
102
|
|
103
|
-
#
|
104
|
-
# Creates or updates a management node
|
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 node_name [String] The node name (256 characters maximum).
|
109
|
-
# @param location [String]
|
110
|
-
# @param tags
|
111
|
-
# @param gateway_id [String] Gateway
|
107
|
+
# @param location [String] Location of the resource.
|
108
|
+
# @param tags Resource tags.
|
109
|
+
# @param gateway_id [String] Gateway ID which will manage this node.
|
112
110
|
# @param connection_name [String] myhost.domain.com
|
113
|
-
# @param user_name [String] User name to be used to connect to node
|
114
|
-
# @param password [String] Password associated with user name
|
111
|
+
# @param user_name [String] User name to be used to connect to node.
|
112
|
+
# @param password [String] Password associated with user name.
|
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, node_name, location = nil, tags = nil, gateway_id = nil, connection_name = nil, user_name = nil, password = nil, custom_headers = nil)
|
120
|
+
# Send request
|
121
|
+
promise = begin_update_async(resource_group_name, node_name, location, tags, gateway_id, connection_name, user_name, password, custom_headers)
|
122
|
+
|
123
|
+
promise = promise.then do |response|
|
124
|
+
# Defining deserialization method.
|
125
|
+
deserialize_method = lambda do |parsed_response|
|
126
|
+
result_mapper = NodeResource.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 management node
|
139
|
+
#
|
140
|
+
# @param resource_group_name [String] The resource group name uniquely
|
141
|
+
# identifies the resource group within the user subscriptionId.
|
142
|
+
# @param node_name [String] The node 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, node_name, custom_headers = nil)
|
148
|
+
response = delete_async(resource_group_name, node_name, custom_headers).value!
|
149
|
+
nil
|
150
|
+
end
|
151
|
+
|
152
|
+
#
|
153
|
+
# deletes a management node
|
154
|
+
#
|
155
|
+
# @param resource_group_name [String] The resource group name uniquely
|
156
|
+
# identifies the resource group within the user subscriptionId.
|
157
|
+
# @param node_name [String] The node 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, node_name, custom_headers = nil)
|
164
|
+
delete_async(resource_group_name, node_name, custom_headers).value!
|
122
165
|
end
|
123
166
|
|
124
167
|
#
|
125
|
-
#
|
168
|
+
# deletes a management node
|
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 node_name [String] The node name (256 characters maximum).
|
130
|
-
# @param location [String] location of the resource?
|
131
|
-
# @param tags resource tags
|
132
|
-
# @param gateway_id [String] Gateway id which will manage this node
|
133
|
-
# @param connection_name [String] myhost.domain.com
|
134
|
-
# @param user_name [String] User name to be used to connect to node
|
135
|
-
# @param password [String] Password associated with user name
|
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, node_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, 'node_name is nil' if node_name.nil?
|
146
183
|
|
147
|
-
gateway_parameters = NodeParameters.new
|
148
|
-
unless location.nil? && tags.nil? && gateway_id.nil? && connection_name.nil? && user_name.nil? && password.nil?
|
149
|
-
gateway_parameters.location = location
|
150
|
-
gateway_parameters.tags = tags
|
151
|
-
gateway_parameters.gateway_id = gateway_id
|
152
|
-
gateway_parameters.connection_name = connection_name
|
153
|
-
gateway_parameters.user_name = user_name
|
154
|
-
gateway_parameters.password = password
|
155
|
-
end
|
156
184
|
|
157
185
|
request_headers = {}
|
158
186
|
|
159
187
|
# Set Headers
|
160
188
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
161
189
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
162
|
-
|
163
|
-
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
164
|
-
|
165
|
-
# Serialize Request
|
166
|
-
request_mapper = NodeParameters.mapper()
|
167
|
-
request_content = @client.serialize(request_mapper, gateway_parameters, 'gateway_parameters')
|
168
|
-
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
169
|
-
|
170
190
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}'
|
171
191
|
|
172
192
|
request_url = @base_url || @client.base_url
|
@@ -175,42 +195,21 @@ module Azure::ARM::ServerManagement
|
|
175
195
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
176
196
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'nodeName' => node_name},
|
177
197
|
query_params: {'api-version' => @client.api_version},
|
178
|
-
body: request_content,
|
179
198
|
headers: request_headers.merge(custom_headers || {}),
|
180
199
|
base_url: request_url
|
181
200
|
}
|
182
|
-
promise = @client.make_request_async(:
|
201
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
183
202
|
|
184
203
|
promise = promise.then do |result|
|
185
204
|
http_response = result.response
|
186
205
|
status_code = http_response.status
|
187
206
|
response_content = http_response.body
|
188
|
-
unless status_code == 200 || status_code ==
|
207
|
+
unless status_code == 200 || status_code == 204
|
189
208
|
error_model = JSON.load(response_content)
|
190
209
|
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
191
210
|
end
|
192
211
|
|
193
212
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
194
|
-
# Deserialize Response
|
195
|
-
if status_code == 200
|
196
|
-
begin
|
197
|
-
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
198
|
-
result_mapper = NodeResource.mapper()
|
199
|
-
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
200
|
-
rescue Exception => e
|
201
|
-
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
202
|
-
end
|
203
|
-
end
|
204
|
-
# Deserialize Response
|
205
|
-
if status_code == 201
|
206
|
-
begin
|
207
|
-
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
208
|
-
result_mapper = NodeResource.mapper()
|
209
|
-
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
210
|
-
rescue Exception => e
|
211
|
-
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
212
|
-
end
|
213
|
-
end
|
214
213
|
|
215
214
|
result
|
216
215
|
end
|
@@ -219,150 +218,59 @@ module Azure::ARM::ServerManagement
|
|
219
218
|
end
|
220
219
|
|
221
220
|
#
|
222
|
-
#
|
223
|
-
#
|
224
|
-
# @param resource_group_name [String] The resource group name uniquely
|
225
|
-
# identifies the resource group within the user subscriptionId.
|
226
|
-
# @param node_name [String] The node name (256 characters maximum).
|
227
|
-
# @param location [String] location of the resource?
|
228
|
-
# @param tags resource tags
|
229
|
-
# @param gateway_id [String] Gateway id which will manage this node
|
230
|
-
# @param connection_name [String] myhost.domain.com
|
231
|
-
# @param user_name [String] User name to be used to connect to node
|
232
|
-
# @param password [String] Password associated with user name
|
233
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
234
|
-
# will be added to the HTTP request.
|
235
|
-
#
|
236
|
-
# @return [NodeResource] operation results.
|
237
|
-
#
|
238
|
-
def update(resource_group_name, node_name, location = nil, tags = nil, gateway_id = nil, connection_name = nil, user_name = nil, password = nil, custom_headers = nil)
|
239
|
-
response = update_async(resource_group_name, node_name, location, tags, gateway_id, connection_name, user_name, password, custom_headers).value!
|
240
|
-
response.body unless response.nil?
|
241
|
-
end
|
242
|
-
|
243
|
-
#
|
244
|
-
# @param resource_group_name [String] The resource group name uniquely
|
245
|
-
# identifies the resource group within the user subscriptionId.
|
246
|
-
# @param node_name [String] The node name (256 characters maximum).
|
247
|
-
# @param location [String] location of the resource?
|
248
|
-
# @param tags resource tags
|
249
|
-
# @param gateway_id [String] Gateway id which will manage this node
|
250
|
-
# @param connection_name [String] myhost.domain.com
|
251
|
-
# @param user_name [String] User name to be used to connect to node
|
252
|
-
# @param password [String] Password associated with user name
|
253
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
254
|
-
# will be added to the HTTP request.
|
255
|
-
#
|
256
|
-
# @return [Concurrent::Promise] promise which provides async access to http
|
257
|
-
# response.
|
258
|
-
#
|
259
|
-
def update_async(resource_group_name, node_name, location = nil, tags = nil, gateway_id = nil, connection_name = nil, user_name = nil, password = nil, custom_headers = nil)
|
260
|
-
# Send request
|
261
|
-
promise = begin_update_async(resource_group_name, node_name, location, tags, gateway_id, connection_name, user_name, password, custom_headers)
|
262
|
-
|
263
|
-
promise = promise.then do |response|
|
264
|
-
# Defining deserialization method.
|
265
|
-
deserialize_method = lambda do |parsed_response|
|
266
|
-
result_mapper = NodeResource.mapper()
|
267
|
-
parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
|
268
|
-
end
|
269
|
-
|
270
|
-
# Waiting for response.
|
271
|
-
@client.get_long_running_operation_result(response, deserialize_method)
|
272
|
-
end
|
273
|
-
|
274
|
-
promise
|
275
|
-
end
|
276
|
-
|
277
|
-
#
|
278
|
-
# Updates a management node
|
221
|
+
# Gets a management node.
|
279
222
|
#
|
280
223
|
# @param resource_group_name [String] The resource group name uniquely
|
281
224
|
# identifies the resource group within the user subscriptionId.
|
282
225
|
# @param node_name [String] The node name (256 characters maximum).
|
283
|
-
# @param location [String] location of the resource?
|
284
|
-
# @param tags resource tags
|
285
|
-
# @param gateway_id [String] Gateway id which will manage this node
|
286
|
-
# @param connection_name [String] myhost.domain.com
|
287
|
-
# @param user_name [String] User name to be used to connect to node
|
288
|
-
# @param password [String] Password associated with user name
|
289
226
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
290
227
|
# will be added to the HTTP request.
|
291
228
|
#
|
292
229
|
# @return [NodeResource] operation results.
|
293
230
|
#
|
294
|
-
def
|
295
|
-
response =
|
231
|
+
def get(resource_group_name, node_name, custom_headers = nil)
|
232
|
+
response = get_async(resource_group_name, node_name, custom_headers).value!
|
296
233
|
response.body unless response.nil?
|
297
234
|
end
|
298
235
|
|
299
236
|
#
|
300
|
-
#
|
237
|
+
# Gets a management node.
|
301
238
|
#
|
302
239
|
# @param resource_group_name [String] The resource group name uniquely
|
303
240
|
# identifies the resource group within the user subscriptionId.
|
304
241
|
# @param node_name [String] The node name (256 characters maximum).
|
305
|
-
# @param location [String] location of the resource?
|
306
|
-
# @param tags resource tags
|
307
|
-
# @param gateway_id [String] Gateway id which will manage this node
|
308
|
-
# @param connection_name [String] myhost.domain.com
|
309
|
-
# @param user_name [String] User name to be used to connect to node
|
310
|
-
# @param password [String] Password associated with user name
|
311
242
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
312
243
|
# will be added to the HTTP request.
|
313
244
|
#
|
314
245
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
315
246
|
#
|
316
|
-
def
|
317
|
-
|
247
|
+
def get_with_http_info(resource_group_name, node_name, custom_headers = nil)
|
248
|
+
get_async(resource_group_name, node_name, custom_headers).value!
|
318
249
|
end
|
319
250
|
|
320
251
|
#
|
321
|
-
#
|
252
|
+
# Gets a management node.
|
322
253
|
#
|
323
254
|
# @param resource_group_name [String] The resource group name uniquely
|
324
255
|
# identifies the resource group within the user subscriptionId.
|
325
256
|
# @param node_name [String] The node name (256 characters maximum).
|
326
|
-
# @param location [String] location of the resource?
|
327
|
-
# @param tags resource tags
|
328
|
-
# @param gateway_id [String] Gateway id which will manage this node
|
329
|
-
# @param connection_name [String] myhost.domain.com
|
330
|
-
# @param user_name [String] User name to be used to connect to node
|
331
|
-
# @param password [String] Password associated with user name
|
332
257
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
333
258
|
# to the HTTP request.
|
334
259
|
#
|
335
260
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
336
261
|
#
|
337
|
-
def
|
262
|
+
def get_async(resource_group_name, node_name, custom_headers = nil)
|
338
263
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
339
264
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
340
265
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
341
266
|
fail ArgumentError, 'node_name is nil' if node_name.nil?
|
342
267
|
|
343
|
-
node_parameters = NodeParameters.new
|
344
|
-
unless location.nil? && tags.nil? && gateway_id.nil? && connection_name.nil? && user_name.nil? && password.nil?
|
345
|
-
node_parameters.location = location
|
346
|
-
node_parameters.tags = tags
|
347
|
-
node_parameters.gateway_id = gateway_id
|
348
|
-
node_parameters.connection_name = connection_name
|
349
|
-
node_parameters.user_name = user_name
|
350
|
-
node_parameters.password = password
|
351
|
-
end
|
352
268
|
|
353
269
|
request_headers = {}
|
354
270
|
|
355
271
|
# Set Headers
|
356
272
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
357
273
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
358
|
-
|
359
|
-
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
360
|
-
|
361
|
-
# Serialize Request
|
362
|
-
request_mapper = NodeParameters.mapper()
|
363
|
-
request_content = @client.serialize(request_mapper, node_parameters, 'node_parameters')
|
364
|
-
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
365
|
-
|
366
274
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}'
|
367
275
|
|
368
276
|
request_url = @base_url || @client.base_url
|
@@ -371,17 +279,16 @@ module Azure::ARM::ServerManagement
|
|
371
279
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
372
280
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'nodeName' => node_name},
|
373
281
|
query_params: {'api-version' => @client.api_version},
|
374
|
-
body: request_content,
|
375
282
|
headers: request_headers.merge(custom_headers || {}),
|
376
283
|
base_url: request_url
|
377
284
|
}
|
378
|
-
promise = @client.make_request_async(:
|
285
|
+
promise = @client.make_request_async(:get, path_template, options)
|
379
286
|
|
380
287
|
promise = promise.then do |result|
|
381
288
|
http_response = result.response
|
382
289
|
status_code = http_response.status
|
383
290
|
response_content = http_response.body
|
384
|
-
unless status_code == 200
|
291
|
+
unless status_code == 200
|
385
292
|
error_model = JSON.load(response_content)
|
386
293
|
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
387
294
|
end
|
@@ -405,51 +312,41 @@ module Azure::ARM::ServerManagement
|
|
405
312
|
end
|
406
313
|
|
407
314
|
#
|
408
|
-
#
|
315
|
+
# Lists nodes in a subscription.
|
409
316
|
#
|
410
|
-
# @param resource_group_name [String] The resource group name uniquely
|
411
|
-
# identifies the resource group within the user subscriptionId.
|
412
|
-
# @param node_name [String] The node name (256 characters maximum).
|
413
317
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
414
318
|
# will be added to the HTTP request.
|
415
319
|
#
|
320
|
+
# @return [Array<NodeResource>] operation results.
|
416
321
|
#
|
417
|
-
def
|
418
|
-
|
419
|
-
|
322
|
+
def list(custom_headers = nil)
|
323
|
+
first_page = list_as_lazy(custom_headers)
|
324
|
+
first_page.get_all_items
|
420
325
|
end
|
421
326
|
|
422
327
|
#
|
423
|
-
#
|
328
|
+
# Lists nodes in a subscription.
|
424
329
|
#
|
425
|
-
# @param resource_group_name [String] The resource group name uniquely
|
426
|
-
# identifies the resource group within the user subscriptionId.
|
427
|
-
# @param node_name [String] The node name (256 characters maximum).
|
428
330
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
429
331
|
# will be added to the HTTP request.
|
430
332
|
#
|
431
333
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
432
334
|
#
|
433
|
-
def
|
434
|
-
|
335
|
+
def list_with_http_info(custom_headers = nil)
|
336
|
+
list_async(custom_headers).value!
|
435
337
|
end
|
436
338
|
|
437
339
|
#
|
438
|
-
#
|
340
|
+
# Lists nodes in a subscription.
|
439
341
|
#
|
440
|
-
# @param resource_group_name [String] The resource group name uniquely
|
441
|
-
# identifies the resource group within the user subscriptionId.
|
442
|
-
# @param node_name [String] The node name (256 characters maximum).
|
443
342
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
444
343
|
# to the HTTP request.
|
445
344
|
#
|
446
345
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
447
346
|
#
|
448
|
-
def
|
347
|
+
def list_async(custom_headers = nil)
|
449
348
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
450
349
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
451
|
-
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
452
|
-
fail ArgumentError, 'node_name is nil' if node_name.nil?
|
453
350
|
|
454
351
|
|
455
352
|
request_headers = {}
|
@@ -457,29 +354,39 @@ module Azure::ARM::ServerManagement
|
|
457
354
|
# Set Headers
|
458
355
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
459
356
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
460
|
-
path_template = '/subscriptions/{subscriptionId}/
|
357
|
+
path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.ServerManagement/nodes'
|
461
358
|
|
462
359
|
request_url = @base_url || @client.base_url
|
463
360
|
|
464
361
|
options = {
|
465
362
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
466
|
-
path_params: {'subscriptionId' => @client.subscription_id
|
363
|
+
path_params: {'subscriptionId' => @client.subscription_id},
|
467
364
|
query_params: {'api-version' => @client.api_version},
|
468
365
|
headers: request_headers.merge(custom_headers || {}),
|
469
366
|
base_url: request_url
|
470
367
|
}
|
471
|
-
promise = @client.make_request_async(:
|
368
|
+
promise = @client.make_request_async(:get, path_template, options)
|
472
369
|
|
473
370
|
promise = promise.then do |result|
|
474
371
|
http_response = result.response
|
475
372
|
status_code = http_response.status
|
476
373
|
response_content = http_response.body
|
477
|
-
unless status_code == 200
|
374
|
+
unless status_code == 200
|
478
375
|
error_model = JSON.load(response_content)
|
479
376
|
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
480
377
|
end
|
481
378
|
|
482
379
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
380
|
+
# Deserialize Response
|
381
|
+
if status_code == 200
|
382
|
+
begin
|
383
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
384
|
+
result_mapper = NodeResources.mapper()
|
385
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
386
|
+
rescue Exception => e
|
387
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
388
|
+
end
|
389
|
+
end
|
483
390
|
|
484
391
|
result
|
485
392
|
end
|
@@ -488,52 +395,48 @@ module Azure::ARM::ServerManagement
|
|
488
395
|
end
|
489
396
|
|
490
397
|
#
|
491
|
-
#
|
398
|
+
# Lists nodes in a resource group.
|
492
399
|
#
|
493
400
|
# @param resource_group_name [String] The resource group name uniquely
|
494
401
|
# identifies the resource group within the user subscriptionId.
|
495
|
-
# @param node_name [String] The node name (256 characters maximum).
|
496
402
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
497
403
|
# will be added to the HTTP request.
|
498
404
|
#
|
499
|
-
# @return [NodeResource] operation results.
|
405
|
+
# @return [Array<NodeResource>] operation results.
|
500
406
|
#
|
501
|
-
def
|
502
|
-
|
503
|
-
|
407
|
+
def list_for_resource_group(resource_group_name, custom_headers = nil)
|
408
|
+
first_page = list_for_resource_group_as_lazy(resource_group_name, custom_headers)
|
409
|
+
first_page.get_all_items
|
504
410
|
end
|
505
411
|
|
506
412
|
#
|
507
|
-
#
|
413
|
+
# Lists nodes in a resource group.
|
508
414
|
#
|
509
415
|
# @param resource_group_name [String] The resource group name uniquely
|
510
416
|
# identifies the resource group within the user subscriptionId.
|
511
|
-
# @param node_name [String] The node name (256 characters maximum).
|
512
417
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
513
418
|
# will be added to the HTTP request.
|
514
419
|
#
|
515
420
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
516
421
|
#
|
517
|
-
def
|
518
|
-
|
422
|
+
def list_for_resource_group_with_http_info(resource_group_name, custom_headers = nil)
|
423
|
+
list_for_resource_group_async(resource_group_name, custom_headers).value!
|
519
424
|
end
|
520
425
|
|
521
426
|
#
|
522
|
-
#
|
427
|
+
# Lists nodes in a resource group.
|
523
428
|
#
|
524
429
|
# @param resource_group_name [String] The resource group name uniquely
|
525
430
|
# identifies the resource group within the user subscriptionId.
|
526
|
-
# @param node_name [String] The node name (256 characters maximum).
|
527
431
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
528
432
|
# to the HTTP request.
|
529
433
|
#
|
530
434
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
531
435
|
#
|
532
|
-
def
|
436
|
+
def list_for_resource_group_async(resource_group_name, custom_headers = nil)
|
533
437
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
534
438
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
535
439
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
536
|
-
fail ArgumentError, 'node_name is nil' if node_name.nil?
|
537
440
|
|
538
441
|
|
539
442
|
request_headers = {}
|
@@ -541,13 +444,13 @@ module Azure::ARM::ServerManagement
|
|
541
444
|
# Set Headers
|
542
445
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
543
446
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
544
|
-
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes
|
447
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes'
|
545
448
|
|
546
449
|
request_url = @base_url || @client.base_url
|
547
450
|
|
548
451
|
options = {
|
549
452
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
550
|
-
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name
|
453
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
|
551
454
|
query_params: {'api-version' => @client.api_version},
|
552
455
|
headers: request_headers.merge(custom_headers || {}),
|
553
456
|
base_url: request_url
|
@@ -568,7 +471,7 @@ module Azure::ARM::ServerManagement
|
|
568
471
|
if status_code == 200
|
569
472
|
begin
|
570
473
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
571
|
-
result_mapper =
|
474
|
+
result_mapper = NodeResources.mapper()
|
572
475
|
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
573
476
|
rescue Exception => e
|
574
477
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
@@ -582,85 +485,113 @@ module Azure::ARM::ServerManagement
|
|
582
485
|
end
|
583
486
|
|
584
487
|
#
|
585
|
-
#
|
586
|
-
#
|
587
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
588
|
-
# will be added to the HTTP request.
|
589
|
-
#
|
590
|
-
# @return [NodeResources] which provide lazy access to pages of the response.
|
591
|
-
#
|
592
|
-
def list_as_lazy(custom_headers = nil)
|
593
|
-
response = list_async(custom_headers).value!
|
594
|
-
unless response.nil?
|
595
|
-
page = response.body
|
596
|
-
page.next_method = Proc.new do |next_page_link|
|
597
|
-
list_next_async(next_page_link, custom_headers)
|
598
|
-
end
|
599
|
-
page
|
600
|
-
end
|
601
|
-
end
|
602
|
-
|
603
|
-
#
|
604
|
-
# Returns nodes in a subscription
|
488
|
+
# Creates or updates a management node.
|
605
489
|
#
|
490
|
+
# @param resource_group_name [String] The resource group name uniquely
|
491
|
+
# identifies the resource group within the user subscriptionId.
|
492
|
+
# @param node_name [String] The node name (256 characters maximum).
|
493
|
+
# @param location [String] Location of the resource.
|
494
|
+
# @param tags Resource tags.
|
495
|
+
# @param gateway_id [String] Gateway ID which will manage this node.
|
496
|
+
# @param connection_name [String] myhost.domain.com
|
497
|
+
# @param user_name [String] User name to be used to connect to node.
|
498
|
+
# @param password [String] Password associated with user name.
|
606
499
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
607
500
|
# will be added to the HTTP request.
|
608
501
|
#
|
609
|
-
# @return [
|
502
|
+
# @return [NodeResource] operation results.
|
610
503
|
#
|
611
|
-
def
|
612
|
-
|
613
|
-
|
504
|
+
def begin_create(resource_group_name, node_name, location = nil, tags = nil, gateway_id = nil, connection_name = nil, user_name = nil, password = nil, custom_headers = nil)
|
505
|
+
response = begin_create_async(resource_group_name, node_name, location, tags, gateway_id, connection_name, user_name, password, custom_headers).value!
|
506
|
+
response.body unless response.nil?
|
614
507
|
end
|
615
508
|
|
616
509
|
#
|
617
|
-
#
|
510
|
+
# Creates or updates a management node.
|
618
511
|
#
|
512
|
+
# @param resource_group_name [String] The resource group name uniquely
|
513
|
+
# identifies the resource group within the user subscriptionId.
|
514
|
+
# @param node_name [String] The node name (256 characters maximum).
|
515
|
+
# @param location [String] Location of the resource.
|
516
|
+
# @param tags Resource tags.
|
517
|
+
# @param gateway_id [String] Gateway ID which will manage this node.
|
518
|
+
# @param connection_name [String] myhost.domain.com
|
519
|
+
# @param user_name [String] User name to be used to connect to node.
|
520
|
+
# @param password [String] Password associated with user name.
|
619
521
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
620
522
|
# will be added to the HTTP request.
|
621
523
|
#
|
622
524
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
623
525
|
#
|
624
|
-
def
|
625
|
-
|
526
|
+
def begin_create_with_http_info(resource_group_name, node_name, location = nil, tags = nil, gateway_id = nil, connection_name = nil, user_name = nil, password = nil, custom_headers = nil)
|
527
|
+
begin_create_async(resource_group_name, node_name, location, tags, gateway_id, connection_name, user_name, password, custom_headers).value!
|
626
528
|
end
|
627
529
|
|
628
530
|
#
|
629
|
-
#
|
531
|
+
# Creates or updates a management node.
|
630
532
|
#
|
533
|
+
# @param resource_group_name [String] The resource group name uniquely
|
534
|
+
# identifies the resource group within the user subscriptionId.
|
535
|
+
# @param node_name [String] The node name (256 characters maximum).
|
536
|
+
# @param location [String] Location of the resource.
|
537
|
+
# @param tags Resource tags.
|
538
|
+
# @param gateway_id [String] Gateway ID which will manage this node.
|
539
|
+
# @param connection_name [String] myhost.domain.com
|
540
|
+
# @param user_name [String] User name to be used to connect to node.
|
541
|
+
# @param password [String] Password associated with user name.
|
631
542
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
632
543
|
# to the HTTP request.
|
633
544
|
#
|
634
545
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
635
546
|
#
|
636
|
-
def
|
547
|
+
def begin_create_async(resource_group_name, node_name, location = nil, tags = nil, gateway_id = nil, connection_name = nil, user_name = nil, password = nil, custom_headers = nil)
|
637
548
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
638
549
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
550
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
551
|
+
fail ArgumentError, 'node_name is nil' if node_name.nil?
|
639
552
|
|
553
|
+
gateway_parameters = NodeParameters.new
|
554
|
+
unless location.nil? && tags.nil? && gateway_id.nil? && connection_name.nil? && user_name.nil? && password.nil?
|
555
|
+
gateway_parameters.location = location
|
556
|
+
gateway_parameters.tags = tags
|
557
|
+
gateway_parameters.gateway_id = gateway_id
|
558
|
+
gateway_parameters.connection_name = connection_name
|
559
|
+
gateway_parameters.user_name = user_name
|
560
|
+
gateway_parameters.password = password
|
561
|
+
end
|
640
562
|
|
641
563
|
request_headers = {}
|
642
564
|
|
643
565
|
# Set Headers
|
644
566
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
645
567
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
646
|
-
|
568
|
+
|
569
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
570
|
+
|
571
|
+
# Serialize Request
|
572
|
+
request_mapper = NodeParameters.mapper()
|
573
|
+
request_content = @client.serialize(request_mapper, gateway_parameters, 'gateway_parameters')
|
574
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
575
|
+
|
576
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}'
|
647
577
|
|
648
578
|
request_url = @base_url || @client.base_url
|
649
579
|
|
650
580
|
options = {
|
651
581
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
652
|
-
path_params: {'subscriptionId' => @client.subscription_id},
|
582
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'nodeName' => node_name},
|
653
583
|
query_params: {'api-version' => @client.api_version},
|
584
|
+
body: request_content,
|
654
585
|
headers: request_headers.merge(custom_headers || {}),
|
655
586
|
base_url: request_url
|
656
587
|
}
|
657
|
-
promise = @client.make_request_async(:
|
588
|
+
promise = @client.make_request_async(:put, path_template, options)
|
658
589
|
|
659
590
|
promise = promise.then do |result|
|
660
591
|
http_response = result.response
|
661
592
|
status_code = http_response.status
|
662
593
|
response_content = http_response.body
|
663
|
-
unless status_code == 200
|
594
|
+
unless status_code == 200 || status_code == 201 || status_code == 202
|
664
595
|
error_model = JSON.load(response_content)
|
665
596
|
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
666
597
|
end
|
@@ -670,7 +601,17 @@ module Azure::ARM::ServerManagement
|
|
670
601
|
if status_code == 200
|
671
602
|
begin
|
672
603
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
673
|
-
result_mapper =
|
604
|
+
result_mapper = NodeResource.mapper()
|
605
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
606
|
+
rescue Exception => e
|
607
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
608
|
+
end
|
609
|
+
end
|
610
|
+
# Deserialize Response
|
611
|
+
if status_code == 201
|
612
|
+
begin
|
613
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
614
|
+
result_mapper = NodeResource.mapper()
|
674
615
|
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
675
616
|
rescue Exception => e
|
676
617
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
@@ -684,94 +625,113 @@ module Azure::ARM::ServerManagement
|
|
684
625
|
end
|
685
626
|
|
686
627
|
#
|
687
|
-
#
|
688
|
-
#
|
689
|
-
# @param resource_group_name [String] The resource group name uniquely
|
690
|
-
# identifies the resource group within the user subscriptionId.
|
691
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
692
|
-
# will be added to the HTTP request.
|
693
|
-
#
|
694
|
-
# @return [NodeResources] which provide lazy access to pages of the response.
|
695
|
-
#
|
696
|
-
def list_for_resource_group_as_lazy(resource_group_name, custom_headers = nil)
|
697
|
-
response = list_for_resource_group_async(resource_group_name, custom_headers).value!
|
698
|
-
unless response.nil?
|
699
|
-
page = response.body
|
700
|
-
page.next_method = Proc.new do |next_page_link|
|
701
|
-
list_for_resource_group_next_async(next_page_link, custom_headers)
|
702
|
-
end
|
703
|
-
page
|
704
|
-
end
|
705
|
-
end
|
706
|
-
|
707
|
-
#
|
708
|
-
# Returns nodes in a resource group
|
628
|
+
# Updates a management node.
|
709
629
|
#
|
710
630
|
# @param resource_group_name [String] The resource group name uniquely
|
711
631
|
# identifies the resource group within the user subscriptionId.
|
632
|
+
# @param node_name [String] The node name (256 characters maximum).
|
633
|
+
# @param location [String] Location of the resource.
|
634
|
+
# @param tags Resource tags.
|
635
|
+
# @param gateway_id [String] Gateway ID which will manage this node.
|
636
|
+
# @param connection_name [String] myhost.domain.com
|
637
|
+
# @param user_name [String] User name to be used to connect to node.
|
638
|
+
# @param password [String] Password associated with user name.
|
712
639
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
713
640
|
# will be added to the HTTP request.
|
714
641
|
#
|
715
|
-
# @return [
|
642
|
+
# @return [NodeResource] operation results.
|
716
643
|
#
|
717
|
-
def
|
718
|
-
|
719
|
-
|
644
|
+
def begin_update(resource_group_name, node_name, location = nil, tags = nil, gateway_id = nil, connection_name = nil, user_name = nil, password = nil, custom_headers = nil)
|
645
|
+
response = begin_update_async(resource_group_name, node_name, location, tags, gateway_id, connection_name, user_name, password, custom_headers).value!
|
646
|
+
response.body unless response.nil?
|
720
647
|
end
|
721
648
|
|
722
649
|
#
|
723
|
-
#
|
650
|
+
# Updates a management node.
|
724
651
|
#
|
725
652
|
# @param resource_group_name [String] The resource group name uniquely
|
726
653
|
# identifies the resource group within the user subscriptionId.
|
654
|
+
# @param node_name [String] The node name (256 characters maximum).
|
655
|
+
# @param location [String] Location of the resource.
|
656
|
+
# @param tags Resource tags.
|
657
|
+
# @param gateway_id [String] Gateway ID which will manage this node.
|
658
|
+
# @param connection_name [String] myhost.domain.com
|
659
|
+
# @param user_name [String] User name to be used to connect to node.
|
660
|
+
# @param password [String] Password associated with user name.
|
727
661
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
728
662
|
# will be added to the HTTP request.
|
729
663
|
#
|
730
664
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
731
665
|
#
|
732
|
-
def
|
733
|
-
|
666
|
+
def begin_update_with_http_info(resource_group_name, node_name, location = nil, tags = nil, gateway_id = nil, connection_name = nil, user_name = nil, password = nil, custom_headers = nil)
|
667
|
+
begin_update_async(resource_group_name, node_name, location, tags, gateway_id, connection_name, user_name, password, custom_headers).value!
|
734
668
|
end
|
735
669
|
|
736
670
|
#
|
737
|
-
#
|
671
|
+
# Updates a management node.
|
738
672
|
#
|
739
673
|
# @param resource_group_name [String] The resource group name uniquely
|
740
674
|
# identifies the resource group within the user subscriptionId.
|
675
|
+
# @param node_name [String] The node name (256 characters maximum).
|
676
|
+
# @param location [String] Location of the resource.
|
677
|
+
# @param tags Resource tags.
|
678
|
+
# @param gateway_id [String] Gateway ID which will manage this node.
|
679
|
+
# @param connection_name [String] myhost.domain.com
|
680
|
+
# @param user_name [String] User name to be used to connect to node.
|
681
|
+
# @param password [String] Password associated with user name.
|
741
682
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
742
683
|
# to the HTTP request.
|
743
684
|
#
|
744
685
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
745
686
|
#
|
746
|
-
def
|
687
|
+
def begin_update_async(resource_group_name, node_name, location = nil, tags = nil, gateway_id = nil, connection_name = nil, user_name = nil, password = nil, custom_headers = nil)
|
747
688
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
748
689
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
749
690
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
691
|
+
fail ArgumentError, 'node_name is nil' if node_name.nil?
|
750
692
|
|
693
|
+
node_parameters = NodeParameters.new
|
694
|
+
unless location.nil? && tags.nil? && gateway_id.nil? && connection_name.nil? && user_name.nil? && password.nil?
|
695
|
+
node_parameters.location = location
|
696
|
+
node_parameters.tags = tags
|
697
|
+
node_parameters.gateway_id = gateway_id
|
698
|
+
node_parameters.connection_name = connection_name
|
699
|
+
node_parameters.user_name = user_name
|
700
|
+
node_parameters.password = password
|
701
|
+
end
|
751
702
|
|
752
703
|
request_headers = {}
|
753
704
|
|
754
705
|
# Set Headers
|
755
706
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
756
707
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
757
|
-
|
708
|
+
|
709
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
710
|
+
|
711
|
+
# Serialize Request
|
712
|
+
request_mapper = NodeParameters.mapper()
|
713
|
+
request_content = @client.serialize(request_mapper, node_parameters, 'node_parameters')
|
714
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
715
|
+
|
716
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServerManagement/nodes/{nodeName}'
|
758
717
|
|
759
718
|
request_url = @base_url || @client.base_url
|
760
719
|
|
761
720
|
options = {
|
762
721
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
763
|
-
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
|
722
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'nodeName' => node_name},
|
764
723
|
query_params: {'api-version' => @client.api_version},
|
724
|
+
body: request_content,
|
765
725
|
headers: request_headers.merge(custom_headers || {}),
|
766
726
|
base_url: request_url
|
767
727
|
}
|
768
|
-
promise = @client.make_request_async(:
|
728
|
+
promise = @client.make_request_async(:patch, path_template, options)
|
769
729
|
|
770
730
|
promise = promise.then do |result|
|
771
731
|
http_response = result.response
|
772
732
|
status_code = http_response.status
|
773
733
|
response_content = http_response.body
|
774
|
-
unless status_code == 200
|
734
|
+
unless status_code == 200 || status_code == 202
|
775
735
|
error_model = JSON.load(response_content)
|
776
736
|
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
777
737
|
end
|
@@ -781,7 +741,7 @@ module Azure::ARM::ServerManagement
|
|
781
741
|
if status_code == 200
|
782
742
|
begin
|
783
743
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
784
|
-
result_mapper =
|
744
|
+
result_mapper = NodeResource.mapper()
|
785
745
|
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
786
746
|
rescue Exception => e
|
787
747
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
@@ -795,10 +755,10 @@ module Azure::ARM::ServerManagement
|
|
795
755
|
end
|
796
756
|
|
797
757
|
#
|
798
|
-
#
|
758
|
+
# Lists nodes in a subscription.
|
799
759
|
#
|
800
|
-
# @param next_page_link [String] The NextLink from the previous successful
|
801
|
-
#
|
760
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
761
|
+
# to List operation.
|
802
762
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
803
763
|
# will be added to the HTTP request.
|
804
764
|
#
|
@@ -810,10 +770,10 @@ module Azure::ARM::ServerManagement
|
|
810
770
|
end
|
811
771
|
|
812
772
|
#
|
813
|
-
#
|
773
|
+
# Lists nodes in a subscription.
|
814
774
|
#
|
815
|
-
# @param next_page_link [String] The NextLink from the previous successful
|
816
|
-
#
|
775
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
776
|
+
# to List operation.
|
817
777
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
818
778
|
# will be added to the HTTP request.
|
819
779
|
#
|
@@ -824,10 +784,10 @@ module Azure::ARM::ServerManagement
|
|
824
784
|
end
|
825
785
|
|
826
786
|
#
|
827
|
-
#
|
787
|
+
# Lists nodes in a subscription.
|
828
788
|
#
|
829
|
-
# @param next_page_link [String] The NextLink from the previous successful
|
830
|
-
#
|
789
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
790
|
+
# to List operation.
|
831
791
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
832
792
|
# to the HTTP request.
|
833
793
|
#
|
@@ -882,10 +842,10 @@ module Azure::ARM::ServerManagement
|
|
882
842
|
end
|
883
843
|
|
884
844
|
#
|
885
|
-
#
|
845
|
+
# Lists nodes in a resource group.
|
886
846
|
#
|
887
|
-
# @param next_page_link [String] The NextLink from the previous successful
|
888
|
-
#
|
847
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
848
|
+
# to List operation.
|
889
849
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
890
850
|
# will be added to the HTTP request.
|
891
851
|
#
|
@@ -897,10 +857,10 @@ module Azure::ARM::ServerManagement
|
|
897
857
|
end
|
898
858
|
|
899
859
|
#
|
900
|
-
#
|
860
|
+
# Lists nodes in a resource group.
|
901
861
|
#
|
902
|
-
# @param next_page_link [String] The NextLink from the previous successful
|
903
|
-
#
|
862
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
863
|
+
# to List operation.
|
904
864
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
905
865
|
# will be added to the HTTP request.
|
906
866
|
#
|
@@ -911,10 +871,10 @@ module Azure::ARM::ServerManagement
|
|
911
871
|
end
|
912
872
|
|
913
873
|
#
|
914
|
-
#
|
874
|
+
# Lists nodes in a resource group.
|
915
875
|
#
|
916
|
-
# @param next_page_link [String] The NextLink from the previous successful
|
917
|
-
#
|
876
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
877
|
+
# to List operation.
|
918
878
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
919
879
|
# to the HTTP request.
|
920
880
|
#
|
@@ -968,5 +928,45 @@ module Azure::ARM::ServerManagement
|
|
968
928
|
promise.execute
|
969
929
|
end
|
970
930
|
|
931
|
+
#
|
932
|
+
# Lists nodes in a subscription.
|
933
|
+
#
|
934
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
935
|
+
# will be added to the HTTP request.
|
936
|
+
#
|
937
|
+
# @return [NodeResources] which provide lazy access to pages of the response.
|
938
|
+
#
|
939
|
+
def list_as_lazy(custom_headers = nil)
|
940
|
+
response = list_async(custom_headers).value!
|
941
|
+
unless response.nil?
|
942
|
+
page = response.body
|
943
|
+
page.next_method = Proc.new do |next_page_link|
|
944
|
+
list_next_async(next_page_link, custom_headers)
|
945
|
+
end
|
946
|
+
page
|
947
|
+
end
|
948
|
+
end
|
949
|
+
|
950
|
+
#
|
951
|
+
# Lists nodes in a resource group.
|
952
|
+
#
|
953
|
+
# @param resource_group_name [String] The resource group name uniquely
|
954
|
+
# identifies the resource group within the user subscriptionId.
|
955
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
956
|
+
# will be added to the HTTP request.
|
957
|
+
#
|
958
|
+
# @return [NodeResources] which provide lazy access to pages of the response.
|
959
|
+
#
|
960
|
+
def list_for_resource_group_as_lazy(resource_group_name, custom_headers = nil)
|
961
|
+
response = list_for_resource_group_async(resource_group_name, custom_headers).value!
|
962
|
+
unless response.nil?
|
963
|
+
page = response.body
|
964
|
+
page.next_method = Proc.new do |next_page_link|
|
965
|
+
list_for_resource_group_next_async(next_page_link, custom_headers)
|
966
|
+
end
|
967
|
+
page
|
968
|
+
end
|
969
|
+
end
|
970
|
+
|
971
971
|
end
|
972
972
|
end
|