Class: IbmCloudPower::NetworkSecurityGroupsApi
- Inherits:
-
Object
- Object
- IbmCloudPower::NetworkSecurityGroupsApi
- Defined in:
- lib/ibm_cloud_power/api/network_security_groups_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ NetworkSecurityGroupsApi
constructor
A new instance of NetworkSecurityGroupsApi.
-
#v1_network_security_groups_action_post(body, opts = {}) ⇒ Object
Perform a Network Security Groups action (enable, disable) on a workspace.
-
#v1_network_security_groups_action_post_with_http_info(body, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Perform a Network Security Groups action (enable, disable) on a workspace.
-
#v1_network_security_groups_id_delete(network_security_group_id, opts = {}) ⇒ Object
Delete a Network Security Group from a workspace.
-
#v1_network_security_groups_id_delete_with_http_info(network_security_group_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Delete a Network Security Group from a workspace.
-
#v1_network_security_groups_id_get(network_security_group_id, opts = {}) ⇒ NetworkSecurityGroup
Get the detail of a Network Security Group.
-
#v1_network_security_groups_id_get_with_http_info(network_security_group_id, opts = {}) ⇒ Array<(NetworkSecurityGroup, Integer, Hash)>
Get the detail of a Network Security Group.
-
#v1_network_security_groups_id_post(network_security_group_id, body, opts = {}) ⇒ NetworkSecurityGroup
Clone a Network Security Group.
-
#v1_network_security_groups_id_post_with_http_info(network_security_group_id, body, opts = {}) ⇒ Array<(NetworkSecurityGroup, Integer, Hash)>
Clone a Network Security Group.
-
#v1_network_security_groups_id_put(network_security_group_id, body, opts = {}) ⇒ NetworkSecurityGroup
Update a Network Security Group.
-
#v1_network_security_groups_id_put_with_http_info(network_security_group_id, body, opts = {}) ⇒ Array<(NetworkSecurityGroup, Integer, Hash)>
Update a Network Security Group.
-
#v1_network_security_groups_list(opts = {}) ⇒ NetworkSecurityGroups
Get the list of Network Security Groups for a workspace.
-
#v1_network_security_groups_list_with_http_info(opts = {}) ⇒ Array<(NetworkSecurityGroups, Integer, Hash)>
Get the list of Network Security Groups for a workspace.
-
#v1_network_security_groups_members_delete(network_security_group_id, network_security_group_member_id, opts = {}) ⇒ Object
Delete the member from a Network Security Group.
-
#v1_network_security_groups_members_delete_with_http_info(network_security_group_id, network_security_group_member_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Delete the member from a Network Security Group.
-
#v1_network_security_groups_members_post(network_security_group_id, body, opts = {}) ⇒ NetworkSecurityGroupMember
Add a member to a Network Security Group.
-
#v1_network_security_groups_members_post_with_http_info(network_security_group_id, body, opts = {}) ⇒ Array<(NetworkSecurityGroupMember, Integer, Hash)>
Add a member to a Network Security Group.
-
#v1_network_security_groups_move_member_post(network_security_group_id, body, opts = {}) ⇒ NetworkSecurityGroupMember
Move a Network Security Group member to another Network Security Group.
-
#v1_network_security_groups_move_member_post_with_http_info(network_security_group_id, body, opts = {}) ⇒ Array<(NetworkSecurityGroupMember, Integer, Hash)>
Move a Network Security Group member to another Network Security Group.
-
#v1_network_security_groups_post(body, opts = {}) ⇒ NetworkSecurityGroup
Create a new Network Security Group.
-
#v1_network_security_groups_post_with_http_info(body, opts = {}) ⇒ Array<(NetworkSecurityGroup, Integer, Hash)>
Create a new Network Security Group.
-
#v1_network_security_groups_rules_delete(network_security_group_id, network_security_group_rule_id, opts = {}) ⇒ Object
Delete the rule from a Network Security Group.
-
#v1_network_security_groups_rules_delete_with_http_info(network_security_group_id, network_security_group_rule_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Delete the rule from a Network Security Group.
-
#v1_network_security_groups_rules_post(network_security_group_id, body, opts = {}) ⇒ NetworkSecurityGroupRule
Add a rule to a Network Security Group.
-
#v1_network_security_groups_rules_post_with_http_info(network_security_group_id, body, opts = {}) ⇒ Array<(NetworkSecurityGroupRule, Integer, Hash)>
Add a rule to a Network Security Group.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ NetworkSecurityGroupsApi
Returns a new instance of NetworkSecurityGroupsApi.
19 20 21 |
# File 'lib/ibm_cloud_power/api/network_security_groups_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/ibm_cloud_power/api/network_security_groups_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#v1_network_security_groups_action_post(body, opts = {}) ⇒ Object
Perform a Network Security Groups action (enable, disable) on a workspace. On enablement, a default Network Security Group is created to allow all traffic for all active network iterfaces
26 27 28 29 |
# File 'lib/ibm_cloud_power/api/network_security_groups_api.rb', line 26 def v1_network_security_groups_action_post(body, opts = {}) data, _status_code, _headers = v1_network_security_groups_action_post_with_http_info(body, opts) data end |
#v1_network_security_groups_action_post_with_http_info(body, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Perform a Network Security Groups action (enable, disable) on a workspace. On enablement, a default Network Security Group is created to allow all traffic for all active network iterfaces
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/ibm_cloud_power/api/network_security_groups_api.rb', line 35 def v1_network_security_groups_action_post_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NetworkSecurityGroupsApi.v1_network_security_groups_action_post ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling NetworkSecurityGroupsApi.v1_network_security_groups_action_post" end # resource path local_var_path = '/v1/network-security-groups/action' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"NetworkSecurityGroupsApi.v1_network_security_groups_action_post", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NetworkSecurityGroupsApi#v1_network_security_groups_action_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#v1_network_security_groups_id_delete(network_security_group_id, opts = {}) ⇒ Object
Delete a Network Security Group from a workspace
92 93 94 95 |
# File 'lib/ibm_cloud_power/api/network_security_groups_api.rb', line 92 def v1_network_security_groups_id_delete(network_security_group_id, opts = {}) data, _status_code, _headers = v1_network_security_groups_id_delete_with_http_info(network_security_group_id, opts) data end |
#v1_network_security_groups_id_delete_with_http_info(network_security_group_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Delete a Network Security Group from a workspace
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
# File 'lib/ibm_cloud_power/api/network_security_groups_api.rb', line 101 def v1_network_security_groups_id_delete_with_http_info(network_security_group_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NetworkSecurityGroupsApi.v1_network_security_groups_id_delete ...' end # verify the required parameter 'network_security_group_id' is set if @api_client.config.client_side_validation && network_security_group_id.nil? fail ArgumentError, "Missing the required parameter 'network_security_group_id' when calling NetworkSecurityGroupsApi.v1_network_security_groups_id_delete" end # resource path local_var_path = '/v1/network-security-groups/{network_security_group_id}'.sub('{network_security_group_id}', CGI.escape(network_security_group_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"NetworkSecurityGroupsApi.v1_network_security_groups_id_delete", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NetworkSecurityGroupsApi#v1_network_security_groups_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#v1_network_security_groups_id_get(network_security_group_id, opts = {}) ⇒ NetworkSecurityGroup
Get the detail of a Network Security Group
153 154 155 156 |
# File 'lib/ibm_cloud_power/api/network_security_groups_api.rb', line 153 def v1_network_security_groups_id_get(network_security_group_id, opts = {}) data, _status_code, _headers = v1_network_security_groups_id_get_with_http_info(network_security_group_id, opts) data end |
#v1_network_security_groups_id_get_with_http_info(network_security_group_id, opts = {}) ⇒ Array<(NetworkSecurityGroup, Integer, Hash)>
Get the detail of a Network Security Group
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 |
# File 'lib/ibm_cloud_power/api/network_security_groups_api.rb', line 162 def v1_network_security_groups_id_get_with_http_info(network_security_group_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NetworkSecurityGroupsApi.v1_network_security_groups_id_get ...' end # verify the required parameter 'network_security_group_id' is set if @api_client.config.client_side_validation && network_security_group_id.nil? fail ArgumentError, "Missing the required parameter 'network_security_group_id' when calling NetworkSecurityGroupsApi.v1_network_security_groups_id_get" end # resource path local_var_path = '/v1/network-security-groups/{network_security_group_id}'.sub('{network_security_group_id}', CGI.escape(network_security_group_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'NetworkSecurityGroup' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"NetworkSecurityGroupsApi.v1_network_security_groups_id_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NetworkSecurityGroupsApi#v1_network_security_groups_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#v1_network_security_groups_id_post(network_security_group_id, body, opts = {}) ⇒ NetworkSecurityGroup
Clone a Network Security Group
215 216 217 218 |
# File 'lib/ibm_cloud_power/api/network_security_groups_api.rb', line 215 def v1_network_security_groups_id_post(network_security_group_id, body, opts = {}) data, _status_code, _headers = v1_network_security_groups_id_post_with_http_info(network_security_group_id, body, opts) data end |
#v1_network_security_groups_id_post_with_http_info(network_security_group_id, body, opts = {}) ⇒ Array<(NetworkSecurityGroup, Integer, Hash)>
Clone a Network Security Group
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 |
# File 'lib/ibm_cloud_power/api/network_security_groups_api.rb', line 225 def v1_network_security_groups_id_post_with_http_info(network_security_group_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NetworkSecurityGroupsApi.v1_network_security_groups_id_post ...' end # verify the required parameter 'network_security_group_id' is set if @api_client.config.client_side_validation && network_security_group_id.nil? fail ArgumentError, "Missing the required parameter 'network_security_group_id' when calling NetworkSecurityGroupsApi.v1_network_security_groups_id_post" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling NetworkSecurityGroupsApi.v1_network_security_groups_id_post" end # resource path local_var_path = '/v1/network-security-groups/{network_security_group_id}'.sub('{network_security_group_id}', CGI.escape(network_security_group_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'NetworkSecurityGroup' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"NetworkSecurityGroupsApi.v1_network_security_groups_id_post", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NetworkSecurityGroupsApi#v1_network_security_groups_id_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#v1_network_security_groups_id_put(network_security_group_id, body, opts = {}) ⇒ NetworkSecurityGroup
Update a Network Security Group
287 288 289 290 |
# File 'lib/ibm_cloud_power/api/network_security_groups_api.rb', line 287 def v1_network_security_groups_id_put(network_security_group_id, body, opts = {}) data, _status_code, _headers = v1_network_security_groups_id_put_with_http_info(network_security_group_id, body, opts) data end |
#v1_network_security_groups_id_put_with_http_info(network_security_group_id, body, opts = {}) ⇒ Array<(NetworkSecurityGroup, Integer, Hash)>
Update a Network Security Group
297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 |
# File 'lib/ibm_cloud_power/api/network_security_groups_api.rb', line 297 def v1_network_security_groups_id_put_with_http_info(network_security_group_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NetworkSecurityGroupsApi.v1_network_security_groups_id_put ...' end # verify the required parameter 'network_security_group_id' is set if @api_client.config.client_side_validation && network_security_group_id.nil? fail ArgumentError, "Missing the required parameter 'network_security_group_id' when calling NetworkSecurityGroupsApi.v1_network_security_groups_id_put" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling NetworkSecurityGroupsApi.v1_network_security_groups_id_put" end # resource path local_var_path = '/v1/network-security-groups/{network_security_group_id}'.sub('{network_security_group_id}', CGI.escape(network_security_group_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'NetworkSecurityGroup' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"NetworkSecurityGroupsApi.v1_network_security_groups_id_put", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NetworkSecurityGroupsApi#v1_network_security_groups_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#v1_network_security_groups_list(opts = {}) ⇒ NetworkSecurityGroups
Get the list of Network Security Groups for a workspace
358 359 360 361 |
# File 'lib/ibm_cloud_power/api/network_security_groups_api.rb', line 358 def v1_network_security_groups_list(opts = {}) data, _status_code, _headers = v1_network_security_groups_list_with_http_info(opts) data end |
#v1_network_security_groups_list_with_http_info(opts = {}) ⇒ Array<(NetworkSecurityGroups, Integer, Hash)>
Get the list of Network Security Groups for a workspace
367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 |
# File 'lib/ibm_cloud_power/api/network_security_groups_api.rb', line 367 def v1_network_security_groups_list_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NetworkSecurityGroupsApi.v1_network_security_groups_list ...' end # resource path local_var_path = '/v1/network-security-groups' # query parameters query_params = opts[:query_params] || {} query_params[:'default_nsg'] = opts[:'default_nsg'] if !opts[:'default_nsg'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'NetworkSecurityGroups' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"NetworkSecurityGroupsApi.v1_network_security_groups_list", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NetworkSecurityGroupsApi#v1_network_security_groups_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#v1_network_security_groups_members_delete(network_security_group_id, network_security_group_member_id, opts = {}) ⇒ Object
Delete the member from a Network Security Group
417 418 419 420 |
# File 'lib/ibm_cloud_power/api/network_security_groups_api.rb', line 417 def v1_network_security_groups_members_delete(network_security_group_id, network_security_group_member_id, opts = {}) data, _status_code, _headers = v1_network_security_groups_members_delete_with_http_info(network_security_group_id, network_security_group_member_id, opts) data end |
#v1_network_security_groups_members_delete_with_http_info(network_security_group_id, network_security_group_member_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Delete the member from a Network Security Group
427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 |
# File 'lib/ibm_cloud_power/api/network_security_groups_api.rb', line 427 def v1_network_security_groups_members_delete_with_http_info(network_security_group_id, network_security_group_member_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NetworkSecurityGroupsApi.v1_network_security_groups_members_delete ...' end # verify the required parameter 'network_security_group_id' is set if @api_client.config.client_side_validation && network_security_group_id.nil? fail ArgumentError, "Missing the required parameter 'network_security_group_id' when calling NetworkSecurityGroupsApi.v1_network_security_groups_members_delete" end # verify the required parameter 'network_security_group_member_id' is set if @api_client.config.client_side_validation && network_security_group_member_id.nil? fail ArgumentError, "Missing the required parameter 'network_security_group_member_id' when calling NetworkSecurityGroupsApi.v1_network_security_groups_members_delete" end # resource path local_var_path = '/v1/network-security-groups/{network_security_group_id}/members/{network_security_group_member_id}'.sub('{network_security_group_id}', CGI.escape(network_security_group_id.to_s)).sub('{network_security_group_member_id}', CGI.escape(network_security_group_member_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"NetworkSecurityGroupsApi.v1_network_security_groups_members_delete", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NetworkSecurityGroupsApi#v1_network_security_groups_members_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#v1_network_security_groups_members_post(network_security_group_id, body, opts = {}) ⇒ NetworkSecurityGroupMember
Add a member to a Network Security Group
484 485 486 487 |
# File 'lib/ibm_cloud_power/api/network_security_groups_api.rb', line 484 def v1_network_security_groups_members_post(network_security_group_id, body, opts = {}) data, _status_code, _headers = v1_network_security_groups_members_post_with_http_info(network_security_group_id, body, opts) data end |
#v1_network_security_groups_members_post_with_http_info(network_security_group_id, body, opts = {}) ⇒ Array<(NetworkSecurityGroupMember, Integer, Hash)>
Add a member to a Network Security Group
494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 |
# File 'lib/ibm_cloud_power/api/network_security_groups_api.rb', line 494 def v1_network_security_groups_members_post_with_http_info(network_security_group_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NetworkSecurityGroupsApi.v1_network_security_groups_members_post ...' end # verify the required parameter 'network_security_group_id' is set if @api_client.config.client_side_validation && network_security_group_id.nil? fail ArgumentError, "Missing the required parameter 'network_security_group_id' when calling NetworkSecurityGroupsApi.v1_network_security_groups_members_post" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling NetworkSecurityGroupsApi.v1_network_security_groups_members_post" end # resource path local_var_path = '/v1/network-security-groups/{network_security_group_id}/members'.sub('{network_security_group_id}', CGI.escape(network_security_group_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'NetworkSecurityGroupMember' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"NetworkSecurityGroupsApi.v1_network_security_groups_members_post", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NetworkSecurityGroupsApi#v1_network_security_groups_members_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#v1_network_security_groups_move_member_post(network_security_group_id, body, opts = {}) ⇒ NetworkSecurityGroupMember
Move a Network Security Group member to another Network Security Group
556 557 558 559 |
# File 'lib/ibm_cloud_power/api/network_security_groups_api.rb', line 556 def v1_network_security_groups_move_member_post(network_security_group_id, body, opts = {}) data, _status_code, _headers = v1_network_security_groups_move_member_post_with_http_info(network_security_group_id, body, opts) data end |
#v1_network_security_groups_move_member_post_with_http_info(network_security_group_id, body, opts = {}) ⇒ Array<(NetworkSecurityGroupMember, Integer, Hash)>
Move a Network Security Group member to another Network Security Group
566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 |
# File 'lib/ibm_cloud_power/api/network_security_groups_api.rb', line 566 def v1_network_security_groups_move_member_post_with_http_info(network_security_group_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NetworkSecurityGroupsApi.v1_network_security_groups_move_member_post ...' end # verify the required parameter 'network_security_group_id' is set if @api_client.config.client_side_validation && network_security_group_id.nil? fail ArgumentError, "Missing the required parameter 'network_security_group_id' when calling NetworkSecurityGroupsApi.v1_network_security_groups_move_member_post" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling NetworkSecurityGroupsApi.v1_network_security_groups_move_member_post" end # resource path local_var_path = '/v1/network-security-groups/{network_security_group_id}/move_member'.sub('{network_security_group_id}', CGI.escape(network_security_group_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'NetworkSecurityGroupMember' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"NetworkSecurityGroupsApi.v1_network_security_groups_move_member_post", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NetworkSecurityGroupsApi#v1_network_security_groups_move_member_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#v1_network_security_groups_post(body, opts = {}) ⇒ NetworkSecurityGroup
Create a new Network Security Group
627 628 629 630 |
# File 'lib/ibm_cloud_power/api/network_security_groups_api.rb', line 627 def v1_network_security_groups_post(body, opts = {}) data, _status_code, _headers = v1_network_security_groups_post_with_http_info(body, opts) data end |
#v1_network_security_groups_post_with_http_info(body, opts = {}) ⇒ Array<(NetworkSecurityGroup, Integer, Hash)>
Create a new Network Security Group
636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 |
# File 'lib/ibm_cloud_power/api/network_security_groups_api.rb', line 636 def v1_network_security_groups_post_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NetworkSecurityGroupsApi.v1_network_security_groups_post ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling NetworkSecurityGroupsApi.v1_network_security_groups_post" end # resource path local_var_path = '/v1/network-security-groups' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'NetworkSecurityGroup' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"NetworkSecurityGroupsApi.v1_network_security_groups_post", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NetworkSecurityGroupsApi#v1_network_security_groups_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#v1_network_security_groups_rules_delete(network_security_group_id, network_security_group_rule_id, opts = {}) ⇒ Object
Delete the rule from a Network Security Group
694 695 696 697 |
# File 'lib/ibm_cloud_power/api/network_security_groups_api.rb', line 694 def v1_network_security_groups_rules_delete(network_security_group_id, network_security_group_rule_id, opts = {}) data, _status_code, _headers = v1_network_security_groups_rules_delete_with_http_info(network_security_group_id, network_security_group_rule_id, opts) data end |
#v1_network_security_groups_rules_delete_with_http_info(network_security_group_id, network_security_group_rule_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Delete the rule from a Network Security Group
704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 |
# File 'lib/ibm_cloud_power/api/network_security_groups_api.rb', line 704 def v1_network_security_groups_rules_delete_with_http_info(network_security_group_id, network_security_group_rule_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NetworkSecurityGroupsApi.v1_network_security_groups_rules_delete ...' end # verify the required parameter 'network_security_group_id' is set if @api_client.config.client_side_validation && network_security_group_id.nil? fail ArgumentError, "Missing the required parameter 'network_security_group_id' when calling NetworkSecurityGroupsApi.v1_network_security_groups_rules_delete" end # verify the required parameter 'network_security_group_rule_id' is set if @api_client.config.client_side_validation && network_security_group_rule_id.nil? fail ArgumentError, "Missing the required parameter 'network_security_group_rule_id' when calling NetworkSecurityGroupsApi.v1_network_security_groups_rules_delete" end # resource path local_var_path = '/v1/network-security-groups/{network_security_group_id}/rules/{network_security_group_rule_id}'.sub('{network_security_group_id}', CGI.escape(network_security_group_id.to_s)).sub('{network_security_group_rule_id}', CGI.escape(network_security_group_rule_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"NetworkSecurityGroupsApi.v1_network_security_groups_rules_delete", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NetworkSecurityGroupsApi#v1_network_security_groups_rules_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#v1_network_security_groups_rules_post(network_security_group_id, body, opts = {}) ⇒ NetworkSecurityGroupRule
Add a rule to a Network Security Group
761 762 763 764 |
# File 'lib/ibm_cloud_power/api/network_security_groups_api.rb', line 761 def v1_network_security_groups_rules_post(network_security_group_id, body, opts = {}) data, _status_code, _headers = v1_network_security_groups_rules_post_with_http_info(network_security_group_id, body, opts) data end |
#v1_network_security_groups_rules_post_with_http_info(network_security_group_id, body, opts = {}) ⇒ Array<(NetworkSecurityGroupRule, Integer, Hash)>
Add a rule to a Network Security Group
771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 |
# File 'lib/ibm_cloud_power/api/network_security_groups_api.rb', line 771 def v1_network_security_groups_rules_post_with_http_info(network_security_group_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NetworkSecurityGroupsApi.v1_network_security_groups_rules_post ...' end # verify the required parameter 'network_security_group_id' is set if @api_client.config.client_side_validation && network_security_group_id.nil? fail ArgumentError, "Missing the required parameter 'network_security_group_id' when calling NetworkSecurityGroupsApi.v1_network_security_groups_rules_post" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling NetworkSecurityGroupsApi.v1_network_security_groups_rules_post" end # resource path local_var_path = '/v1/network-security-groups/{network_security_group_id}/rules'.sub('{network_security_group_id}', CGI.escape(network_security_group_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'NetworkSecurityGroupRule' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"NetworkSecurityGroupsApi.v1_network_security_groups_rules_post", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NetworkSecurityGroupsApi#v1_network_security_groups_rules_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |