Class: QingCloud::SDK::RouterService

Inherits:
Object
  • Object
show all
Defined in:
lib/qingcloud/sdk/service/router.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config, properties) ⇒ RouterService

Returns a new instance of RouterService.



24
25
26
27
# File 'lib/qingcloud/sdk/service/router.rb', line 24

def initialize(config, properties)
  self.config     = config
  self.properties = properties.deep_symbolize_keys
end

Instance Attribute Details

#configObject

Returns the value of attribute config.



22
23
24
# File 'lib/qingcloud/sdk/service/router.rb', line 22

def config
  @config
end

#propertiesObject

Returns the value of attribute properties.



22
23
24
# File 'lib/qingcloud/sdk/service/router.rb', line 22

def properties
  @properties
end

Instance Method Details

#add_router_static_entries(entries: [], router_static: '') ⇒ Object



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/qingcloud/sdk/service/router.rb', line 30

def add_router_static_entries(entries: [], router_static: '')
  input = {
    config:         config,
    properties:     properties,
    api_name:       'AddRouterStaticEntries',
    request_method: 'GET',
    request_params: {
      'entries'       => entries,
      'router_static' => router_static,
    },
  }

  add_router_static_entries_input_validate input

  request = Request.new input
  request.send
end

#add_router_statics(router: '', statics: [], vxnet: '') ⇒ Object



64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/qingcloud/sdk/service/router.rb', line 64

def add_router_statics(router: '', statics: [], vxnet: '')
  input = {
    config:         config,
    properties:     properties,
    api_name:       'AddRouterStatics',
    request_method: 'GET',
    request_params: {
      'router'  => router,
      'statics' => statics,
      'vxnet'   => vxnet,
    },
  }

  add_router_statics_input_validate input

  request = Request.new input
  request.send
end

#create_routers(count: nil, router_name: '', router_type: nil, security_group: '', vpc_network: '') ⇒ Object



111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# File 'lib/qingcloud/sdk/service/router.rb', line 111

def create_routers(count: nil, router_name: '', router_type: nil, security_group: '', vpc_network: '')
  input = {
    config:         config,
    properties:     properties,
    api_name:       'CreateRouters',
    request_method: 'GET',
    request_params: {
      'count'          => count,
      'router_name'    => router_name,
      'router_type'    => router_type, # router_type's available values: 0, 1, 2, 3
      'security_group' => security_group,
      'vpc_network'    => vpc_network,
    },
  }

  create_routers_input_validate input

  request = Request.new input
  request.send
end

#delete_router_static_entries(router_static_entries: []) ⇒ Object



152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
# File 'lib/qingcloud/sdk/service/router.rb', line 152

def delete_router_static_entries(router_static_entries: [])
  input = {
    config:         config,
    properties:     properties,
    api_name:       'DeleteRouterStaticEntries',
    request_method: 'GET',
    request_params: {
      'router_static_entries' => router_static_entries,
    },
  }

  delete_router_static_entries_input_validate input

  request = Request.new input
  request.send
end

#delete_router_statics(router_statics: []) ⇒ Object



182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
# File 'lib/qingcloud/sdk/service/router.rb', line 182

def delete_router_statics(router_statics: [])
  input = {
    config:         config,
    properties:     properties,
    api_name:       'DeleteRouterStatics',
    request_method: 'GET',
    request_params: {
      'router_statics' => router_statics,
    },
  }

  delete_router_statics_input_validate input

  request = Request.new input
  request.send
end

#delete_routers(routers: []) ⇒ Object



212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
# File 'lib/qingcloud/sdk/service/router.rb', line 212

def delete_routers(routers: [])
  input = {
    config:         config,
    properties:     properties,
    api_name:       'DeleteRouters',
    request_method: 'GET',
    request_params: {
      'routers' => routers,
    },
  }

  delete_routers_input_validate input

  request = Request.new input
  request.send
end

#describe_router_static_entries(limit: nil, offset: nil, router_static: '', router_static_entry_id: '') ⇒ Object



242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
# File 'lib/qingcloud/sdk/service/router.rb', line 242

def describe_router_static_entries(limit: nil, offset: nil, router_static: '', router_static_entry_id: '')
  input = {
    config:         config,
    properties:     properties,
    api_name:       'DescribeRouterStaticEntries',
    request_method: 'GET',
    request_params: {
      'limit'                  => limit,
      'offset'                 => offset,
      'router_static'          => router_static,
      'router_static_entry_id' => router_static_entry_id,
    },
  }

  describe_router_static_entries_input_validate input

  request = Request.new input
  request.send
end

#describe_router_statics(limit: nil, offset: nil, router: '', router_statics: [], static_type: nil, verbose: nil, vxnet: '') ⇒ Object



271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
# File 'lib/qingcloud/sdk/service/router.rb', line 271

def describe_router_statics(limit: nil, offset: nil, router: '', router_statics: [], static_type: nil, verbose: nil, vxnet: '')
  input = {
    config:         config,
    properties:     properties,
    api_name:       'DescribeRouterStatics',
    request_method: 'GET',
    request_params: {
      'limit'          => limit,
      'offset'         => offset,
      'router'         => router,
      'router_statics' => router_statics,
      'static_type'    => static_type, # static_type's available values: 1, 2, 3, 4, 5, 6, 7, 8
      'verbose'        => verbose, # verbose's available values: 0, 1
      'vxnet'          => vxnet,
    },
  }

  describe_router_statics_input_validate input

  request = Request.new input
  request.send
end

#describe_router_vxnets(limit: nil, offset: nil, router: '', verbose: nil, vxnet: '') ⇒ Object



329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
# File 'lib/qingcloud/sdk/service/router.rb', line 329

def describe_router_vxnets(limit: nil, offset: nil, router: '', verbose: nil, vxnet: '')
  input = {
    config:         config,
    properties:     properties,
    api_name:       'DescribeRouterVxnets',
    request_method: 'GET',
    request_params: {
      'limit'   => limit,
      'offset'  => offset,
      'router'  => router,
      'verbose' => verbose, # verbose's available values: 0, 1
      'vxnet'   => vxnet,
    },
  }

  describe_router_vxnets_input_validate input

  request = Request.new input
  request.send
end

#describe_routers(limit: nil, offset: nil, routers: [], search_word: '', status: [], tags: [], verbose: nil, vxnet: '') ⇒ Object



374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
# File 'lib/qingcloud/sdk/service/router.rb', line 374

def describe_routers(limit: nil, offset: nil, routers: [], search_word: '', status: [], tags: [], verbose: nil, vxnet: '')
  input = {
    config:         config,
    properties:     properties,
    api_name:       'DescribeRouters',
    request_method: 'GET',
    request_params: {
      'limit'       => limit,
      'offset'      => offset,
      'routers'     => routers,
      'search_word' => search_word,
      'status'      => status,
      'tags'        => tags,
      'verbose'     => verbose, # verbose's available values: 0, 1
      'vxnet'       => vxnet,
    },
  }

  describe_routers_input_validate input

  request = Request.new input
  request.send
end

#get_router_monitor(end_time: '', meters: [], resource: '', start_time: '', step: '') ⇒ Object



418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
# File 'lib/qingcloud/sdk/service/router.rb', line 418

def get_router_monitor(end_time: '', meters: [], resource: '', start_time: '', step: '')
  input = {
    config:         config,
    properties:     properties,
    api_name:       'GetMonitor',
    request_method: 'GET',
    request_params: {
      'end_time'   => end_time,
      'meters'     => meters,
      'resource'   => resource,
      'start_time' => start_time,
      'step'       => step, # step's available values: 5m, 15m, 2h, 1d
    },
  }

  get_router_monitor_input_validate input

  request = Request.new input
  request.send
end

#join_router(dyn_ip_end: '', dyn_ip_start: '', features: nil, ip_network: '', manager_ip: '', router: '', vxnet: '') ⇒ Object



479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
# File 'lib/qingcloud/sdk/service/router.rb', line 479

def join_router(dyn_ip_end: '', dyn_ip_start: '', features: nil, ip_network: '', manager_ip: '', router: '', vxnet: '')
  input = {
    config:         config,
    properties:     properties,
    api_name:       'JoinRouter',
    request_method: 'GET',
    request_params: {
      'dyn_ip_end'   => dyn_ip_end,
      'dyn_ip_start' => dyn_ip_start,
      'features'     => features, # features's available values: 1
      'ip_network'   => ip_network,
      'manager_ip'   => manager_ip,
      'router'       => router,
      'vxnet'        => vxnet,
    },
  }

  join_router_input_validate input

  request = Request.new input
  request.send
end

#leave_router(router: '', vxnets: []) ⇒ Object



534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
# File 'lib/qingcloud/sdk/service/router.rb', line 534

def leave_router(router: '', vxnets: [])
  input = {
    config:         config,
    properties:     properties,
    api_name:       'LeaveRouter',
    request_method: 'GET',
    request_params: {
      'router' => router,
      'vxnets' => vxnets,
    },
  }

  leave_router_input_validate input

  request = Request.new input
  request.send
end

#modify_router_attributes(description: '', dyn_ip_end: '', dyn_ip_start: '', eip: '', features: nil, router: '', router_name: '', security_group: '', vxnet: '') ⇒ Object



569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
# File 'lib/qingcloud/sdk/service/router.rb', line 569

def modify_router_attributes(description: '', dyn_ip_end: '', dyn_ip_start: '', eip: '', features: nil, router: '', router_name: '', security_group: '', vxnet: '')
  input = {
    config:         config,
    properties:     properties,
    api_name:       'ModifyRouterAttributes',
    request_method: 'GET',
    request_params: {
      'description'    => description,
      'dyn_ip_end'     => dyn_ip_end,
      'dyn_ip_start'   => dyn_ip_start,
      'eip'            => eip,
      'features'       => features, # features's available values: 1, 2
      'router'         => router,
      'router_name'    => router_name,
      'security_group' => security_group,
      'vxnet'          => vxnet,
    },
  }

  modify_router_attributes_input_validate input

  request = Request.new input
  request.send
end

#modify_router_static_attributes(router_static: '', router_static_name: '', val1: '', val2: '', val3: '', val4: '', val5: '', val6: '') ⇒ Object



618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
# File 'lib/qingcloud/sdk/service/router.rb', line 618

def modify_router_static_attributes(router_static: '', router_static_name: '', val1: '', val2: '', val3: '', val4: '', val5: '', val6: '')
  input = {
    config:         config,
    properties:     properties,
    api_name:       'ModifyRouterStaticAttributes',
    request_method: 'GET',
    request_params: {
      'router_static'      => router_static,
      'router_static_name' => router_static_name,
      'val1'               => val1,
      'val2'               => val2,
      'val3'               => val3,
      'val4'               => val4,
      'val5'               => val5,
      'val6'               => val6,
    },
  }

  modify_router_static_attributes_input_validate input

  request = Request.new input
  request.send
end

#modify_router_static_entry_attributes(router_static_entry: '', router_static_entry_name: '', val1: '', val2: '') ⇒ Object



655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
# File 'lib/qingcloud/sdk/service/router.rb', line 655

def modify_router_static_entry_attributes(router_static_entry: '', router_static_entry_name: '', val1: '', val2: '')
  input = {
    config:         config,
    properties:     properties,
    api_name:       'ModifyRouterStaticEntryAttributes',
    request_method: 'GET',
    request_params: {
      'router_static_entry'      => router_static_entry,
      'router_static_entry_name' => router_static_entry_name,
      'val1'                     => val1,
      'val2'                     => val2,
    },
  }

  modify_router_static_entry_attributes_input_validate input

  request = Request.new input
  request.send
end

#power_off_routers(routers: []) ⇒ Object



688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
# File 'lib/qingcloud/sdk/service/router.rb', line 688

def power_off_routers(routers: [])
  input = {
    config:         config,
    properties:     properties,
    api_name:       'PowerOffRouters',
    request_method: 'GET',
    request_params: {
      'routers' => routers,
    },
  }

  power_off_routers_input_validate input

  request = Request.new input
  request.send
end

#power_on_routers(routers: []) ⇒ Object



718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
# File 'lib/qingcloud/sdk/service/router.rb', line 718

def power_on_routers(routers: [])
  input = {
    config:         config,
    properties:     properties,
    api_name:       'PowerOnRouters',
    request_method: 'GET',
    request_params: {
      'routers' => routers,
    },
  }

  power_on_routers_input_validate input

  request = Request.new input
  request.send
end

#update_routers(routers: []) ⇒ Object



748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
# File 'lib/qingcloud/sdk/service/router.rb', line 748

def update_routers(routers: [])
  input = {
    config:         config,
    properties:     properties,
    api_name:       'UpdateRouters',
    request_method: 'GET',
    request_params: {
      'routers' => routers,
    },
  }

  update_routers_input_validate input

  request = Request.new input
  request.send
end