ionoscloud 6.0.2 → 6.1.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/Gemfile.lock +2 -2
- data/docs/CHANGELOG.md +8 -0
- data/docs/api/ApplicationLoadBalancersApi.md +1586 -0
- data/docs/api/TargetGroupsApi.md +516 -0
- data/docs/models/ApplicationLoadBalancer.md +28 -0
- data/docs/models/ApplicationLoadBalancerEntities.md +18 -0
- data/docs/models/ApplicationLoadBalancerForwardingRule.md +26 -0
- data/docs/models/ApplicationLoadBalancerForwardingRuleProperties.md +30 -0
- data/docs/models/ApplicationLoadBalancerForwardingRulePut.md +24 -0
- data/docs/models/ApplicationLoadBalancerForwardingRules.md +30 -0
- data/docs/models/ApplicationLoadBalancerHttpRule.md +34 -0
- data/docs/models/ApplicationLoadBalancerHttpRuleCondition.md +26 -0
- data/docs/models/ApplicationLoadBalancerProperties.md +26 -0
- data/docs/models/ApplicationLoadBalancerPut.md +24 -0
- data/docs/models/ApplicationLoadBalancers.md +30 -0
- data/docs/models/TargetGroup.md +26 -0
- data/docs/models/TargetGroupHealthCheck.md +22 -0
- data/docs/models/TargetGroupHttpHealthCheck.md +28 -0
- data/docs/models/TargetGroupProperties.md +28 -0
- data/docs/models/TargetGroupPut.md +24 -0
- data/docs/models/TargetGroupTarget.md +26 -0
- data/docs/models/TargetGroups.md +30 -0
- data/lib/ionoscloud/api/application_load_balancers_api.rb +1690 -0
- data/lib/ionoscloud/api/target_groups_api.rb +530 -0
- data/lib/ionoscloud/api_client.rb +1 -1
- data/lib/ionoscloud/models/application_load_balancer.rb +319 -0
- data/lib/ionoscloud/models/application_load_balancer_entities.rb +226 -0
- data/lib/ionoscloud/models/application_load_balancer_forwarding_rule.rb +302 -0
- data/lib/ionoscloud/models/application_load_balancer_forwarding_rule_properties.rb +389 -0
- data/lib/ionoscloud/models/application_load_balancer_forwarding_rule_put.rb +285 -0
- data/lib/ionoscloud/models/application_load_balancer_forwarding_rules.rb +334 -0
- data/lib/ionoscloud/models/application_load_balancer_http_rule.rb +427 -0
- data/lib/ionoscloud/models/application_load_balancer_http_rule_condition.rb +355 -0
- data/lib/ionoscloud/models/application_load_balancer_properties.rb +314 -0
- data/lib/ionoscloud/models/application_load_balancer_put.rb +285 -0
- data/lib/ionoscloud/models/application_load_balancers.rb +334 -0
- data/lib/ionoscloud/models/target_group.rb +302 -0
- data/lib/ionoscloud/models/target_group_health_check.rb +263 -0
- data/lib/ionoscloud/models/target_group_http_health_check.rb +373 -0
- data/lib/ionoscloud/models/target_group_properties.rb +376 -0
- data/lib/ionoscloud/models/target_group_put.rb +285 -0
- data/lib/ionoscloud/models/target_group_target.rb +314 -0
- data/lib/ionoscloud/models/target_groups.rb +334 -0
- data/lib/ionoscloud/version.rb +1 -1
- data/lib/ionoscloud.rb +20 -0
- metadata +42 -2
@@ -0,0 +1,530 @@
|
|
1
|
+
=begin
|
2
|
+
#CLOUD API
|
3
|
+
|
4
|
+
#IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 6.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.2.1-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module Ionoscloud
|
16
|
+
class TargetGroupsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Remove target groups
|
23
|
+
# Remove the specified target group.
|
24
|
+
# @param target_group_id [String] The unique ID of the target group.
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @option opts [Boolean] :pretty Controls whether the response is pretty-printed (with indentations and new lines). (default to true)
|
27
|
+
# @option opts [Integer] :depth Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (default to 0)
|
28
|
+
# @option opts [Integer] :x_contract_number Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
|
29
|
+
# @return [nil]
|
30
|
+
def target_groups_delete(target_group_id, opts = {})
|
31
|
+
target_groups_delete_with_http_info(target_group_id, opts)
|
32
|
+
nil
|
33
|
+
end
|
34
|
+
|
35
|
+
# Remove target groups
|
36
|
+
# Remove the specified target group.
|
37
|
+
# @param target_group_id [String] The unique ID of the target group.
|
38
|
+
# @param [Hash] opts the optional parameters
|
39
|
+
# @option opts [Boolean] :pretty Controls whether the response is pretty-printed (with indentations and new lines).
|
40
|
+
# @option opts [Integer] :depth Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
|
41
|
+
# @option opts [Integer] :x_contract_number Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
|
42
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
43
|
+
def target_groups_delete_with_http_info(target_group_id, opts = {})
|
44
|
+
if @api_client.config.debugging
|
45
|
+
@api_client.config.logger.debug 'Calling API: TargetGroupsApi.target_groups_delete ...'
|
46
|
+
end
|
47
|
+
# verify the required parameter 'target_group_id' is set
|
48
|
+
if @api_client.config.client_side_validation && target_group_id.nil?
|
49
|
+
fail ArgumentError, "Missing the required parameter 'target_group_id' when calling TargetGroupsApi.target_groups_delete"
|
50
|
+
end
|
51
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
52
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling TargetGroupsApi.target_groups_delete, must be smaller than or equal to 10.'
|
53
|
+
end
|
54
|
+
|
55
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
56
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling TargetGroupsApi.target_groups_delete, must be greater than or equal to 0.'
|
57
|
+
end
|
58
|
+
|
59
|
+
# resource path
|
60
|
+
local_var_path = '/targetgroups/{targetGroupId}'.sub('{' + 'targetGroupId' + '}', CGI.escape(target_group_id.to_s))
|
61
|
+
|
62
|
+
# query parameters
|
63
|
+
query_params = opts[:query_params] || {}
|
64
|
+
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
65
|
+
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
66
|
+
|
67
|
+
# header parameters
|
68
|
+
header_params = opts[:header_params] || {}
|
69
|
+
# HTTP header 'Accept' (if needed)
|
70
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
71
|
+
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
72
|
+
|
73
|
+
# form parameters
|
74
|
+
form_params = opts[:form_params] || {}
|
75
|
+
|
76
|
+
# http body (model)
|
77
|
+
post_body = opts[:debug_body]
|
78
|
+
|
79
|
+
# return_type
|
80
|
+
return_type = opts[:debug_return_type]
|
81
|
+
|
82
|
+
# auth_names
|
83
|
+
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
84
|
+
|
85
|
+
new_options = opts.merge(
|
86
|
+
:operation => :"TargetGroupsApi.target_groups_delete",
|
87
|
+
:header_params => header_params,
|
88
|
+
:query_params => query_params,
|
89
|
+
:form_params => form_params,
|
90
|
+
:body => post_body,
|
91
|
+
:auth_names => auth_names,
|
92
|
+
:return_type => return_type
|
93
|
+
)
|
94
|
+
|
95
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
96
|
+
if @api_client.config.debugging
|
97
|
+
@api_client.config.logger.debug "API called: TargetGroupsApi#target_groups_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
98
|
+
end
|
99
|
+
return data, status_code, headers
|
100
|
+
end
|
101
|
+
|
102
|
+
# Retrieve target groups
|
103
|
+
# Retrieve the properties of the specified target group.
|
104
|
+
# @param target_group_id [String] The unique ID of the target group.
|
105
|
+
# @param [Hash] opts the optional parameters
|
106
|
+
# @option opts [Boolean] :pretty Controls whether the response is pretty-printed (with indentations and new lines). (default to true)
|
107
|
+
# @option opts [Integer] :depth Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (default to 0)
|
108
|
+
# @option opts [Integer] :x_contract_number Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
|
109
|
+
# @return [TargetGroup]
|
110
|
+
def targetgroups_find_by_target_group_id(target_group_id, opts = {})
|
111
|
+
data, _status_code, _headers = targetgroups_find_by_target_group_id_with_http_info(target_group_id, opts)
|
112
|
+
data
|
113
|
+
end
|
114
|
+
|
115
|
+
# Retrieve target groups
|
116
|
+
# Retrieve the properties of the specified target group.
|
117
|
+
# @param target_group_id [String] The unique ID of the target group.
|
118
|
+
# @param [Hash] opts the optional parameters
|
119
|
+
# @option opts [Boolean] :pretty Controls whether the response is pretty-printed (with indentations and new lines).
|
120
|
+
# @option opts [Integer] :depth Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
|
121
|
+
# @option opts [Integer] :x_contract_number Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
|
122
|
+
# @return [Array<(TargetGroup, Integer, Hash)>] TargetGroup data, response status code and response headers
|
123
|
+
def targetgroups_find_by_target_group_id_with_http_info(target_group_id, opts = {})
|
124
|
+
if @api_client.config.debugging
|
125
|
+
@api_client.config.logger.debug 'Calling API: TargetGroupsApi.targetgroups_find_by_target_group_id ...'
|
126
|
+
end
|
127
|
+
# verify the required parameter 'target_group_id' is set
|
128
|
+
if @api_client.config.client_side_validation && target_group_id.nil?
|
129
|
+
fail ArgumentError, "Missing the required parameter 'target_group_id' when calling TargetGroupsApi.targetgroups_find_by_target_group_id"
|
130
|
+
end
|
131
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
132
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling TargetGroupsApi.targetgroups_find_by_target_group_id, must be smaller than or equal to 10.'
|
133
|
+
end
|
134
|
+
|
135
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
136
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling TargetGroupsApi.targetgroups_find_by_target_group_id, must be greater than or equal to 0.'
|
137
|
+
end
|
138
|
+
|
139
|
+
# resource path
|
140
|
+
local_var_path = '/targetgroups/{targetGroupId}'.sub('{' + 'targetGroupId' + '}', CGI.escape(target_group_id.to_s))
|
141
|
+
|
142
|
+
# query parameters
|
143
|
+
query_params = opts[:query_params] || {}
|
144
|
+
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
145
|
+
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
146
|
+
|
147
|
+
# header parameters
|
148
|
+
header_params = opts[:header_params] || {}
|
149
|
+
# HTTP header 'Accept' (if needed)
|
150
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
151
|
+
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
152
|
+
|
153
|
+
# form parameters
|
154
|
+
form_params = opts[:form_params] || {}
|
155
|
+
|
156
|
+
# http body (model)
|
157
|
+
post_body = opts[:debug_body]
|
158
|
+
|
159
|
+
# return_type
|
160
|
+
return_type = opts[:debug_return_type] || 'TargetGroup'
|
161
|
+
|
162
|
+
# auth_names
|
163
|
+
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
164
|
+
|
165
|
+
new_options = opts.merge(
|
166
|
+
:operation => :"TargetGroupsApi.targetgroups_find_by_target_group_id",
|
167
|
+
:header_params => header_params,
|
168
|
+
:query_params => query_params,
|
169
|
+
:form_params => form_params,
|
170
|
+
:body => post_body,
|
171
|
+
:auth_names => auth_names,
|
172
|
+
:return_type => return_type
|
173
|
+
)
|
174
|
+
|
175
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
176
|
+
if @api_client.config.debugging
|
177
|
+
@api_client.config.logger.debug "API called: TargetGroupsApi#targetgroups_find_by_target_group_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
178
|
+
end
|
179
|
+
return data, status_code, headers
|
180
|
+
end
|
181
|
+
|
182
|
+
# List target groups
|
183
|
+
# List all target groups.
|
184
|
+
# @param [Hash] opts the optional parameters
|
185
|
+
# @option opts [Boolean] :pretty Controls whether the response is pretty-printed (with indentations and new lines). (default to true)
|
186
|
+
# @option opts [Integer] :depth Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (default to 0)
|
187
|
+
# @option opts [Integer] :x_contract_number Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
|
188
|
+
# @option opts [Integer] :offset The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). (default to 0)
|
189
|
+
# @option opts [Integer] :limit The maximum number of elements to return (used together with <b><i>offset</i></b> for pagination). It must not exceed <b><i>200</i></b>. (default to 100)
|
190
|
+
# @return [TargetGroups]
|
191
|
+
def targetgroups_get(opts = {})
|
192
|
+
data, _status_code, _headers = targetgroups_get_with_http_info(opts)
|
193
|
+
data
|
194
|
+
end
|
195
|
+
|
196
|
+
# List target groups
|
197
|
+
# List all target groups.
|
198
|
+
# @param [Hash] opts the optional parameters
|
199
|
+
# @option opts [Boolean] :pretty Controls whether the response is pretty-printed (with indentations and new lines).
|
200
|
+
# @option opts [Integer] :depth Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
|
201
|
+
# @option opts [Integer] :x_contract_number Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
|
202
|
+
# @option opts [Integer] :offset The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination).
|
203
|
+
# @option opts [Integer] :limit The maximum number of elements to return (used together with <b><i>offset</i></b> for pagination). It must not exceed <b><i>200</i></b>.
|
204
|
+
# @return [Array<(TargetGroups, Integer, Hash)>] TargetGroups data, response status code and response headers
|
205
|
+
def targetgroups_get_with_http_info(opts = {})
|
206
|
+
if @api_client.config.debugging
|
207
|
+
@api_client.config.logger.debug 'Calling API: TargetGroupsApi.targetgroups_get ...'
|
208
|
+
end
|
209
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
210
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling TargetGroupsApi.targetgroups_get, must be smaller than or equal to 10.'
|
211
|
+
end
|
212
|
+
|
213
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
214
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling TargetGroupsApi.targetgroups_get, must be greater than or equal to 0.'
|
215
|
+
end
|
216
|
+
|
217
|
+
if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
|
218
|
+
fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling TargetGroupsApi.targetgroups_get, must be greater than or equal to 0.'
|
219
|
+
end
|
220
|
+
|
221
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 200
|
222
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TargetGroupsApi.targetgroups_get, must be smaller than or equal to 200.'
|
223
|
+
end
|
224
|
+
|
225
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
226
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TargetGroupsApi.targetgroups_get, must be greater than or equal to 1.'
|
227
|
+
end
|
228
|
+
|
229
|
+
# resource path
|
230
|
+
local_var_path = '/targetgroups'
|
231
|
+
|
232
|
+
# query parameters
|
233
|
+
query_params = opts[:query_params] || {}
|
234
|
+
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
235
|
+
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
236
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
237
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
238
|
+
|
239
|
+
# header parameters
|
240
|
+
header_params = opts[:header_params] || {}
|
241
|
+
# HTTP header 'Accept' (if needed)
|
242
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
243
|
+
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
244
|
+
|
245
|
+
# form parameters
|
246
|
+
form_params = opts[:form_params] || {}
|
247
|
+
|
248
|
+
# http body (model)
|
249
|
+
post_body = opts[:debug_body]
|
250
|
+
|
251
|
+
# return_type
|
252
|
+
return_type = opts[:debug_return_type] || 'TargetGroups'
|
253
|
+
|
254
|
+
# auth_names
|
255
|
+
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
256
|
+
|
257
|
+
new_options = opts.merge(
|
258
|
+
:operation => :"TargetGroupsApi.targetgroups_get",
|
259
|
+
:header_params => header_params,
|
260
|
+
:query_params => query_params,
|
261
|
+
:form_params => form_params,
|
262
|
+
:body => post_body,
|
263
|
+
:auth_names => auth_names,
|
264
|
+
:return_type => return_type
|
265
|
+
)
|
266
|
+
|
267
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
268
|
+
if @api_client.config.debugging
|
269
|
+
@api_client.config.logger.debug "API called: TargetGroupsApi#targetgroups_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
270
|
+
end
|
271
|
+
return data, status_code, headers
|
272
|
+
end
|
273
|
+
|
274
|
+
# Partially modify target groups
|
275
|
+
# Update the properties of the specified target group.
|
276
|
+
# @param target_group_id [String] The unique ID of the target group.
|
277
|
+
# @param target_group_properties [TargetGroupProperties] The target group properties to be updated.
|
278
|
+
# @param [Hash] opts the optional parameters
|
279
|
+
# @option opts [Boolean] :pretty Controls whether the response is pretty-printed (with indentations and new lines). (default to true)
|
280
|
+
# @option opts [Integer] :depth Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (default to 0)
|
281
|
+
# @option opts [Integer] :x_contract_number Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
|
282
|
+
# @return [TargetGroup]
|
283
|
+
def targetgroups_patch(target_group_id, target_group_properties, opts = {})
|
284
|
+
data, _status_code, _headers = targetgroups_patch_with_http_info(target_group_id, target_group_properties, opts)
|
285
|
+
data
|
286
|
+
end
|
287
|
+
|
288
|
+
# Partially modify target groups
|
289
|
+
# Update the properties of the specified target group.
|
290
|
+
# @param target_group_id [String] The unique ID of the target group.
|
291
|
+
# @param target_group_properties [TargetGroupProperties] The target group properties to be updated.
|
292
|
+
# @param [Hash] opts the optional parameters
|
293
|
+
# @option opts [Boolean] :pretty Controls whether the response is pretty-printed (with indentations and new lines).
|
294
|
+
# @option opts [Integer] :depth Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
|
295
|
+
# @option opts [Integer] :x_contract_number Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
|
296
|
+
# @return [Array<(TargetGroup, Integer, Hash)>] TargetGroup data, response status code and response headers
|
297
|
+
def targetgroups_patch_with_http_info(target_group_id, target_group_properties, opts = {})
|
298
|
+
if @api_client.config.debugging
|
299
|
+
@api_client.config.logger.debug 'Calling API: TargetGroupsApi.targetgroups_patch ...'
|
300
|
+
end
|
301
|
+
# verify the required parameter 'target_group_id' is set
|
302
|
+
if @api_client.config.client_side_validation && target_group_id.nil?
|
303
|
+
fail ArgumentError, "Missing the required parameter 'target_group_id' when calling TargetGroupsApi.targetgroups_patch"
|
304
|
+
end
|
305
|
+
# verify the required parameter 'target_group_properties' is set
|
306
|
+
if @api_client.config.client_side_validation && target_group_properties.nil?
|
307
|
+
fail ArgumentError, "Missing the required parameter 'target_group_properties' when calling TargetGroupsApi.targetgroups_patch"
|
308
|
+
end
|
309
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
310
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling TargetGroupsApi.targetgroups_patch, must be smaller than or equal to 10.'
|
311
|
+
end
|
312
|
+
|
313
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
314
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling TargetGroupsApi.targetgroups_patch, must be greater than or equal to 0.'
|
315
|
+
end
|
316
|
+
|
317
|
+
# resource path
|
318
|
+
local_var_path = '/targetgroups/{targetGroupId}'.sub('{' + 'targetGroupId' + '}', CGI.escape(target_group_id.to_s))
|
319
|
+
|
320
|
+
# query parameters
|
321
|
+
query_params = opts[:query_params] || {}
|
322
|
+
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
323
|
+
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
324
|
+
|
325
|
+
# header parameters
|
326
|
+
header_params = opts[:header_params] || {}
|
327
|
+
# HTTP header 'Accept' (if needed)
|
328
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
329
|
+
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
330
|
+
|
331
|
+
# form parameters
|
332
|
+
form_params = opts[:form_params] || {}
|
333
|
+
|
334
|
+
# http body (model)
|
335
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(target_group_properties)
|
336
|
+
|
337
|
+
# return_type
|
338
|
+
return_type = opts[:debug_return_type] || 'TargetGroup'
|
339
|
+
|
340
|
+
# auth_names
|
341
|
+
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
342
|
+
|
343
|
+
new_options = opts.merge(
|
344
|
+
:operation => :"TargetGroupsApi.targetgroups_patch",
|
345
|
+
:header_params => header_params,
|
346
|
+
:query_params => query_params,
|
347
|
+
:form_params => form_params,
|
348
|
+
:body => post_body,
|
349
|
+
:auth_names => auth_names,
|
350
|
+
:return_type => return_type
|
351
|
+
)
|
352
|
+
|
353
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
354
|
+
if @api_client.config.debugging
|
355
|
+
@api_client.config.logger.debug "API called: TargetGroupsApi#targetgroups_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
356
|
+
end
|
357
|
+
return data, status_code, headers
|
358
|
+
end
|
359
|
+
|
360
|
+
# Create target groups
|
361
|
+
# Create a target group.
|
362
|
+
# @param target_group [TargetGroup] The target group to create.
|
363
|
+
# @param [Hash] opts the optional parameters
|
364
|
+
# @option opts [Boolean] :pretty Controls whether the response is pretty-printed (with indentations and new lines). (default to true)
|
365
|
+
# @option opts [Integer] :depth Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (default to 0)
|
366
|
+
# @option opts [Integer] :x_contract_number Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
|
367
|
+
# @return [TargetGroup]
|
368
|
+
def targetgroups_post(target_group, opts = {})
|
369
|
+
data, _status_code, _headers = targetgroups_post_with_http_info(target_group, opts)
|
370
|
+
data
|
371
|
+
end
|
372
|
+
|
373
|
+
# Create target groups
|
374
|
+
# Create a target group.
|
375
|
+
# @param target_group [TargetGroup] The target group to create.
|
376
|
+
# @param [Hash] opts the optional parameters
|
377
|
+
# @option opts [Boolean] :pretty Controls whether the response is pretty-printed (with indentations and new lines).
|
378
|
+
# @option opts [Integer] :depth Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
|
379
|
+
# @option opts [Integer] :x_contract_number Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
|
380
|
+
# @return [Array<(TargetGroup, Integer, Hash)>] TargetGroup data, response status code and response headers
|
381
|
+
def targetgroups_post_with_http_info(target_group, opts = {})
|
382
|
+
if @api_client.config.debugging
|
383
|
+
@api_client.config.logger.debug 'Calling API: TargetGroupsApi.targetgroups_post ...'
|
384
|
+
end
|
385
|
+
# verify the required parameter 'target_group' is set
|
386
|
+
if @api_client.config.client_side_validation && target_group.nil?
|
387
|
+
fail ArgumentError, "Missing the required parameter 'target_group' when calling TargetGroupsApi.targetgroups_post"
|
388
|
+
end
|
389
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
390
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling TargetGroupsApi.targetgroups_post, must be smaller than or equal to 10.'
|
391
|
+
end
|
392
|
+
|
393
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
394
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling TargetGroupsApi.targetgroups_post, must be greater than or equal to 0.'
|
395
|
+
end
|
396
|
+
|
397
|
+
# resource path
|
398
|
+
local_var_path = '/targetgroups'
|
399
|
+
|
400
|
+
# query parameters
|
401
|
+
query_params = opts[:query_params] || {}
|
402
|
+
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
403
|
+
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
404
|
+
|
405
|
+
# header parameters
|
406
|
+
header_params = opts[:header_params] || {}
|
407
|
+
# HTTP header 'Accept' (if needed)
|
408
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
409
|
+
# HTTP header 'Content-Type'
|
410
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
411
|
+
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
412
|
+
|
413
|
+
# form parameters
|
414
|
+
form_params = opts[:form_params] || {}
|
415
|
+
|
416
|
+
# http body (model)
|
417
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(target_group)
|
418
|
+
|
419
|
+
# return_type
|
420
|
+
return_type = opts[:debug_return_type] || 'TargetGroup'
|
421
|
+
|
422
|
+
# auth_names
|
423
|
+
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
424
|
+
|
425
|
+
new_options = opts.merge(
|
426
|
+
:operation => :"TargetGroupsApi.targetgroups_post",
|
427
|
+
:header_params => header_params,
|
428
|
+
:query_params => query_params,
|
429
|
+
:form_params => form_params,
|
430
|
+
:body => post_body,
|
431
|
+
:auth_names => auth_names,
|
432
|
+
:return_type => return_type
|
433
|
+
)
|
434
|
+
|
435
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
436
|
+
if @api_client.config.debugging
|
437
|
+
@api_client.config.logger.debug "API called: TargetGroupsApi#targetgroups_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
438
|
+
end
|
439
|
+
return data, status_code, headers
|
440
|
+
end
|
441
|
+
|
442
|
+
# Modify target groups
|
443
|
+
# Modify the properties of the specified target group.
|
444
|
+
# @param target_group_id [String] The unique ID of the target group.
|
445
|
+
# @param target_group [TargetGroupPut] The modified target group.
|
446
|
+
# @param [Hash] opts the optional parameters
|
447
|
+
# @option opts [Boolean] :pretty Controls whether the response is pretty-printed (with indentations and new lines). (default to true)
|
448
|
+
# @option opts [Integer] :depth Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (default to 0)
|
449
|
+
# @option opts [Integer] :x_contract_number Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
|
450
|
+
# @return [TargetGroup]
|
451
|
+
def targetgroups_put(target_group_id, target_group, opts = {})
|
452
|
+
data, _status_code, _headers = targetgroups_put_with_http_info(target_group_id, target_group, opts)
|
453
|
+
data
|
454
|
+
end
|
455
|
+
|
456
|
+
# Modify target groups
|
457
|
+
# Modify the properties of the specified target group.
|
458
|
+
# @param target_group_id [String] The unique ID of the target group.
|
459
|
+
# @param target_group [TargetGroupPut] The modified target group.
|
460
|
+
# @param [Hash] opts the optional parameters
|
461
|
+
# @option opts [Boolean] :pretty Controls whether the response is pretty-printed (with indentations and new lines).
|
462
|
+
# @option opts [Integer] :depth Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
|
463
|
+
# @option opts [Integer] :x_contract_number Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
|
464
|
+
# @return [Array<(TargetGroup, Integer, Hash)>] TargetGroup data, response status code and response headers
|
465
|
+
def targetgroups_put_with_http_info(target_group_id, target_group, opts = {})
|
466
|
+
if @api_client.config.debugging
|
467
|
+
@api_client.config.logger.debug 'Calling API: TargetGroupsApi.targetgroups_put ...'
|
468
|
+
end
|
469
|
+
# verify the required parameter 'target_group_id' is set
|
470
|
+
if @api_client.config.client_side_validation && target_group_id.nil?
|
471
|
+
fail ArgumentError, "Missing the required parameter 'target_group_id' when calling TargetGroupsApi.targetgroups_put"
|
472
|
+
end
|
473
|
+
# verify the required parameter 'target_group' is set
|
474
|
+
if @api_client.config.client_side_validation && target_group.nil?
|
475
|
+
fail ArgumentError, "Missing the required parameter 'target_group' when calling TargetGroupsApi.targetgroups_put"
|
476
|
+
end
|
477
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
|
478
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling TargetGroupsApi.targetgroups_put, must be smaller than or equal to 10.'
|
479
|
+
end
|
480
|
+
|
481
|
+
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
|
482
|
+
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling TargetGroupsApi.targetgroups_put, must be greater than or equal to 0.'
|
483
|
+
end
|
484
|
+
|
485
|
+
# resource path
|
486
|
+
local_var_path = '/targetgroups/{targetGroupId}'.sub('{' + 'targetGroupId' + '}', CGI.escape(target_group_id.to_s))
|
487
|
+
|
488
|
+
# query parameters
|
489
|
+
query_params = opts[:query_params] || {}
|
490
|
+
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
|
491
|
+
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
|
492
|
+
|
493
|
+
# header parameters
|
494
|
+
header_params = opts[:header_params] || {}
|
495
|
+
# HTTP header 'Accept' (if needed)
|
496
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
497
|
+
# HTTP header 'Content-Type'
|
498
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
499
|
+
header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
|
500
|
+
|
501
|
+
# form parameters
|
502
|
+
form_params = opts[:form_params] || {}
|
503
|
+
|
504
|
+
# http body (model)
|
505
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(target_group)
|
506
|
+
|
507
|
+
# return_type
|
508
|
+
return_type = opts[:debug_return_type] || 'TargetGroup'
|
509
|
+
|
510
|
+
# auth_names
|
511
|
+
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
|
512
|
+
|
513
|
+
new_options = opts.merge(
|
514
|
+
:operation => :"TargetGroupsApi.targetgroups_put",
|
515
|
+
:header_params => header_params,
|
516
|
+
:query_params => query_params,
|
517
|
+
:form_params => form_params,
|
518
|
+
:body => post_body,
|
519
|
+
:auth_names => auth_names,
|
520
|
+
:return_type => return_type
|
521
|
+
)
|
522
|
+
|
523
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
524
|
+
if @api_client.config.debugging
|
525
|
+
@api_client.config.logger.debug "API called: TargetGroupsApi#targetgroups_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
526
|
+
end
|
527
|
+
return data, status_code, headers
|
528
|
+
end
|
529
|
+
end
|
530
|
+
end
|
@@ -38,7 +38,7 @@ module Ionoscloud
|
|
38
38
|
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
|
39
39
|
def initialize(config = Configuration.default)
|
40
40
|
@config = config
|
41
|
-
@user_agent = "ionos-cloud-sdk-ruby/v6.0
|
41
|
+
@user_agent = "ionos-cloud-sdk-ruby/v6.1.0"
|
42
42
|
@default_headers = {
|
43
43
|
'Content-Type' => 'application/json',
|
44
44
|
'User-Agent' => @user_agent
|