ibm_vpc 0.1.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.bumpversion.cfg +3 -7
- data/.releaserc +22 -0
- data/.travis.yml +30 -28
- data/CHANGELOG.md +23 -0
- data/README.md +2 -1
- data/ibm_vpc.gemspec +2 -3
- data/lib/ibm_vpc/version.rb +1 -1
- data/lib/ibm_vpc/vpc_v1.rb +1846 -564
- metadata +12 -25
data/lib/ibm_vpc/vpc_v1.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# (C) Copyright IBM Corp.
|
3
|
+
# (C) Copyright IBM Corp. 2021.
|
4
4
|
#
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
6
|
# you may not use this file except in compliance with the License.
|
@@ -14,11 +14,11 @@
|
|
14
14
|
# See the License for the specific language governing permissions and
|
15
15
|
# limitations under the License.
|
16
16
|
#
|
17
|
-
# IBM OpenAPI SDK Code Generator Version: 3.
|
17
|
+
# IBM OpenAPI SDK Code Generator Version: 3.43.0-49eab5c7-20211117-152138
|
18
18
|
#
|
19
19
|
# The IBM Cloud Virtual Private Cloud (VPC) API can be used to programmatically
|
20
|
-
# provision and manage
|
21
|
-
#
|
20
|
+
# provision and manage virtual server instances, along with subnets, volumes, load
|
21
|
+
# balancers, and more.
|
22
22
|
|
23
23
|
require "concurrent"
|
24
24
|
require "erb"
|
@@ -26,7 +26,6 @@ require "json"
|
|
26
26
|
require "ibm_cloud_sdk_core"
|
27
27
|
require_relative "./common.rb"
|
28
28
|
|
29
|
-
# Module for the IBM Cloud VPC APIs
|
30
29
|
module IbmVpc
|
31
30
|
##
|
32
31
|
# The vpc V1 service.
|
@@ -34,7 +33,7 @@ module IbmVpc
|
|
34
33
|
include Concurrent::Async
|
35
34
|
DEFAULT_SERVICE_NAME = "vpc"
|
36
35
|
DEFAULT_SERVICE_URL = "https://us-south.iaas.cloud.ibm.com/v1"
|
37
|
-
DEFAULT_SERVICE_VERSION = "
|
36
|
+
DEFAULT_SERVICE_VERSION = "2021-12-07"
|
38
37
|
attr_accessor :version
|
39
38
|
attr_accessor :generation
|
40
39
|
##
|
@@ -42,9 +41,9 @@ module IbmVpc
|
|
42
41
|
# Construct a new client for the vpc service.
|
43
42
|
#
|
44
43
|
# @param args [Hash] The args to initialize with
|
45
|
-
# @option args version [String] Requests the version
|
46
|
-
#
|
47
|
-
# latest version.
|
44
|
+
# @option args version [String] Requests the API version as of a date, in format `YYYY-MM-DD`. Any date between
|
45
|
+
# `2019-01-01` and the current date may be specified. Specify the current date to
|
46
|
+
# request the latest version.
|
48
47
|
# @option args service_url [String] The base service URL to use when contacting the service.
|
49
48
|
# The base service_url may differ between IBM Cloud regions.
|
50
49
|
# @option args authenticator [Object] The Authenticator instance to be configured for this service.
|
@@ -76,18 +75,15 @@ module IbmVpc
|
|
76
75
|
##
|
77
76
|
# @!method list_vpcs(start: nil, limit: nil, resource_group_id: nil, classic_access: nil)
|
78
77
|
# List all VPCs.
|
79
|
-
# This request lists all VPCs. A VPC is a virtual network that belongs
|
80
|
-
# and provides logical isolation from other networks. A VPC is made up
|
81
|
-
# in one or more zones. VPCs are regional, and each VPC can contain
|
82
|
-
# multiple zones in a region.
|
83
|
-
# @param start [String] A server-
|
78
|
+
# This request lists all VPCs in the region. A VPC is a virtual network that belongs
|
79
|
+
# to an account and provides logical isolation from other networks. A VPC is made up
|
80
|
+
# of resources in one or more zones. VPCs are regional, and each VPC can contain
|
81
|
+
# resources in multiple zones in a region.
|
82
|
+
# @param start [String] A server-provided token determining what resource to start the page on.
|
84
83
|
# @param limit [Fixnum] The number of resources to return on a page.
|
85
|
-
# @param resource_group_id [String] Filters the collection to resources
|
86
|
-
#
|
87
|
-
# @param classic_access [Boolean]
|
88
|
-
# field. If the supplied field is `true`, only Classic Access VPCs will be returned.
|
89
|
-
# If the supplied field is `false`, only VPCs without Classic Access will be
|
90
|
-
# returned.
|
84
|
+
# @param resource_group_id [String] Filters the collection to resources in the resource group with the specified
|
85
|
+
# identifier.
|
86
|
+
# @param classic_access [Boolean] Filters the collection to VPCs with the specified `classic_access` value.
|
91
87
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
92
88
|
def list_vpcs(start: nil, limit: nil, resource_group_id: nil, classic_access: nil)
|
93
89
|
raise ArgumentError.new("version must be provided") if version.nil?
|
@@ -129,6 +125,10 @@ module IbmVpc
|
|
129
125
|
# @param address_prefix_management [String] Indicates whether a default address prefix should be automatically created for
|
130
126
|
# each zone in this VPC. If `manual`, this VPC will be created with no default
|
131
127
|
# address prefixes.
|
128
|
+
#
|
129
|
+
# This property's value is used only when creating the VPC. Since address prefixes
|
130
|
+
# are managed identically regardless of whether they were automatically created, the
|
131
|
+
# value is not preserved as a VPC property.
|
132
132
|
# @param classic_access [Boolean] Indicates whether this VPC should be connected to Classic Infrastructure. If true,
|
133
133
|
# this VPC's resources will have private network connectivity to the account's
|
134
134
|
# Classic Infrastructure resources. Only one VPC, per region, may be connected in
|
@@ -175,7 +175,7 @@ module IbmVpc
|
|
175
175
|
|
176
176
|
##
|
177
177
|
# @!method delete_vpc(id:)
|
178
|
-
# Delete
|
178
|
+
# Delete a VPC.
|
179
179
|
# This request deletes a VPC. This operation cannot be reversed. For this request to
|
180
180
|
# succeed, the VPC must not contain any instances, subnets, or public gateways. All
|
181
181
|
# security groups and network ACLs associated with the VPC are automatically
|
@@ -184,12 +184,12 @@ module IbmVpc
|
|
184
184
|
# @param id [String] The VPC identifier.
|
185
185
|
# @return [nil]
|
186
186
|
def delete_vpc(id:)
|
187
|
+
raise ArgumentError.new("id must be provided") if id.nil?
|
188
|
+
|
187
189
|
raise ArgumentError.new("version must be provided") if version.nil?
|
188
190
|
|
189
191
|
raise ArgumentError.new("generation must be provided") if generation.nil?
|
190
192
|
|
191
|
-
raise ArgumentError.new("id must be provided") if id.nil?
|
192
|
-
|
193
193
|
headers = {
|
194
194
|
}
|
195
195
|
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_vpc")
|
@@ -214,17 +214,17 @@ module IbmVpc
|
|
214
214
|
|
215
215
|
##
|
216
216
|
# @!method get_vpc(id:)
|
217
|
-
# Retrieve
|
217
|
+
# Retrieve a VPC.
|
218
218
|
# This request retrieves a single VPC specified by the identifier in the URL.
|
219
219
|
# @param id [String] The VPC identifier.
|
220
220
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
221
221
|
def get_vpc(id:)
|
222
|
+
raise ArgumentError.new("id must be provided") if id.nil?
|
223
|
+
|
222
224
|
raise ArgumentError.new("version must be provided") if version.nil?
|
223
225
|
|
224
226
|
raise ArgumentError.new("generation must be provided") if generation.nil?
|
225
227
|
|
226
|
-
raise ArgumentError.new("id must be provided") if id.nil?
|
227
|
-
|
228
228
|
headers = {
|
229
229
|
}
|
230
230
|
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_vpc")
|
@@ -249,18 +249,18 @@ module IbmVpc
|
|
249
249
|
|
250
250
|
##
|
251
251
|
# @!method update_vpc(id:, vpc_patch:)
|
252
|
-
# Update
|
252
|
+
# Update a VPC.
|
253
253
|
# This request updates a VPC's name.
|
254
254
|
# @param id [String] The VPC identifier.
|
255
255
|
# @param vpc_patch [Hash] The VPC patch.
|
256
256
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
257
257
|
def update_vpc(id:, vpc_patch:)
|
258
|
+
raise ArgumentError.new("id must be provided") if id.nil?
|
259
|
+
|
258
260
|
raise ArgumentError.new("version must be provided") if version.nil?
|
259
261
|
|
260
262
|
raise ArgumentError.new("generation must be provided") if generation.nil?
|
261
263
|
|
262
|
-
raise ArgumentError.new("id must be provided") if id.nil?
|
263
|
-
|
264
264
|
raise ArgumentError.new("vpc_patch must be provided") if vpc_patch.nil?
|
265
265
|
|
266
266
|
headers = {
|
@@ -368,8 +368,9 @@ module IbmVpc
|
|
368
368
|
# @!method get_vpc_default_security_group(id:)
|
369
369
|
# Retrieve a VPC's default security group.
|
370
370
|
# This request retrieves the default security group for the VPC specified by the
|
371
|
-
# identifier in the URL.
|
372
|
-
#
|
371
|
+
# identifier in the URL. Resources that optionally allow a security group to be
|
372
|
+
# specified upon creation will be attached to this security group if a security
|
373
|
+
# group is not specified.
|
373
374
|
# @param id [String] The VPC identifier.
|
374
375
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
375
376
|
def get_vpc_default_security_group(id:)
|
@@ -403,10 +404,10 @@ module IbmVpc
|
|
403
404
|
|
404
405
|
##
|
405
406
|
# @!method list_vpc_address_prefixes(vpc_id:, start: nil, limit: nil)
|
406
|
-
# List all address
|
407
|
+
# List all address prefixes for a VPC.
|
407
408
|
# This request lists all address pool prefixes for a VPC.
|
408
409
|
# @param vpc_id [String] The VPC identifier.
|
409
|
-
# @param start [String] A server-
|
410
|
+
# @param start [String] A server-provided token determining what resource to start the page on.
|
410
411
|
# @param limit [Fixnum] The number of resources to return on a page.
|
411
412
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
412
413
|
def list_vpc_address_prefixes(vpc_id:, start: nil, limit: nil)
|
@@ -442,20 +443,25 @@ module IbmVpc
|
|
442
443
|
|
443
444
|
##
|
444
445
|
# @!method create_vpc_address_prefix(vpc_id:, cidr:, zone:, is_default: nil, name: nil)
|
445
|
-
# Create an address
|
446
|
+
# Create an address prefix for a VPC.
|
446
447
|
# This request creates a new prefix from a prefix prototype object. The prototype
|
447
448
|
# object is structured in the same way as a retrieved prefix, and contains the
|
448
449
|
# information necessary to create the new prefix.
|
449
450
|
# @param vpc_id [String] The VPC identifier.
|
450
451
|
# @param cidr [String] The IPv4 range of the address prefix, expressed in CIDR format. The request must
|
451
|
-
# not overlap with any existing address prefixes in the VPC
|
452
|
-
#
|
453
|
-
#
|
454
|
-
#
|
455
|
-
#
|
456
|
-
#
|
457
|
-
#
|
458
|
-
#
|
452
|
+
# not overlap with any existing address prefixes in the VPC or any of the following
|
453
|
+
# reserved address ranges:
|
454
|
+
# - `127.0.0.0/8` (IPv4 loopback addresses)
|
455
|
+
# - `161.26.0.0/16` (IBM services)
|
456
|
+
# - `166.8.0.0/14` (Cloud Service Endpoints)
|
457
|
+
# - `169.254.0.0/16` (IPv4 link-local addresses)
|
458
|
+
# - `224.0.0.0/4` (IPv4 multicast addresses)
|
459
|
+
#
|
460
|
+
# The prefix length of the address prefix's CIDR must be between `/9` (8,388,608
|
461
|
+
# addresses) and `/29` (8 addresses).
|
462
|
+
# @param zone [ZoneIdentity] The zone this address prefix will reside in.
|
463
|
+
# @param is_default [Boolean] Indicates whether this will be the default address prefix for this zone in this
|
464
|
+
# VPC. If `true`, the VPC must not have a default address prefix for this zone.
|
459
465
|
# @param name [String] The user-defined name for this address prefix. Names must be unique within the VPC
|
460
466
|
# the address prefix resides in. If unspecified, the name will be a hyphenated list
|
461
467
|
# of randomly-selected words.
|
@@ -503,7 +509,7 @@ module IbmVpc
|
|
503
509
|
|
504
510
|
##
|
505
511
|
# @!method delete_vpc_address_prefix(vpc_id:, id:)
|
506
|
-
# Delete
|
512
|
+
# Delete an address prefix.
|
507
513
|
# This request deletes a prefix. This operation cannot be reversed. The request will
|
508
514
|
# fail if any subnets use addresses from this prefix.
|
509
515
|
# @param vpc_id [String] The VPC identifier.
|
@@ -542,7 +548,7 @@ module IbmVpc
|
|
542
548
|
|
543
549
|
##
|
544
550
|
# @!method get_vpc_address_prefix(vpc_id:, id:)
|
545
|
-
# Retrieve
|
551
|
+
# Retrieve an address prefix.
|
546
552
|
# This request retrieves a single prefix specified by the identifier in the URL.
|
547
553
|
# @param vpc_id [String] The VPC identifier.
|
548
554
|
# @param id [String] The prefix identifier.
|
@@ -580,7 +586,7 @@ module IbmVpc
|
|
580
586
|
|
581
587
|
##
|
582
588
|
# @!method update_vpc_address_prefix(vpc_id:, id:, address_prefix_patch:)
|
583
|
-
# Update an address
|
589
|
+
# Update an address prefix.
|
584
590
|
# This request updates a prefix with the information in a provided prefix patch. The
|
585
591
|
# prefix patch object is structured in the same way as a retrieved prefix and
|
586
592
|
# contains only the information to be updated.
|
@@ -627,15 +633,15 @@ module IbmVpc
|
|
627
633
|
|
628
634
|
##
|
629
635
|
# @!method list_vpc_routes(vpc_id:, zone_name: nil, start: nil, limit: nil)
|
630
|
-
# List all routes in
|
631
|
-
# This request
|
636
|
+
# List all routes in a VPC's default routing table.
|
637
|
+
# This request lists all routes in the VPC's default routing table. Each route is
|
632
638
|
# zone-specific and directs any packets matching its destination CIDR block to a
|
633
639
|
# `next_hop` IP address. The most specific route matching a packet's destination
|
634
640
|
# will be used. If multiple equally-specific routes exist, traffic will be
|
635
641
|
# distributed across them.
|
636
642
|
# @param vpc_id [String] The VPC identifier.
|
637
643
|
# @param zone_name [String] Filters the collection to resources in the zone with the exact specified name.
|
638
|
-
# @param start [String] A server-
|
644
|
+
# @param start [String] A server-provided token determining what resource to start the page on.
|
639
645
|
# @param limit [Fixnum] The number of resources to return on a page.
|
640
646
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
641
647
|
def list_vpc_routes(vpc_id:, zone_name: nil, start: nil, limit: nil)
|
@@ -671,8 +677,8 @@ module IbmVpc
|
|
671
677
|
end
|
672
678
|
|
673
679
|
##
|
674
|
-
# @!method create_vpc_route(vpc_id:, destination:,
|
675
|
-
# Create a route in
|
680
|
+
# @!method create_vpc_route(vpc_id:, destination:, zone:, action: nil, name: nil, next_hop: nil)
|
681
|
+
# Create a route in a VPC's default routing table.
|
676
682
|
# This request creates a new route in the VPC's default routing table. The route
|
677
683
|
# prototype object is structured in the same way as a retrieved route, and contains
|
678
684
|
# the information necessary to create the new route. The request will fail if the
|
@@ -682,19 +688,22 @@ module IbmVpc
|
|
682
688
|
# the same destination, and only if both routes have an `action` of `deliver` and
|
683
689
|
# the
|
684
690
|
# `next_hop` is an IP address.
|
685
|
-
# @param next_hop [RouteNextHopPrototype] If `action` is `deliver`, the next hop that packets will be delivered to. For
|
686
|
-
# other `action` values, its `address` will be `0.0.0.0`.
|
687
691
|
# @param zone [ZoneIdentity] The zone to apply the route to. (Traffic from subnets in this zone will be
|
688
692
|
# subject to this route.).
|
689
693
|
# @param action [String] The action to perform with a packet matching the route:
|
690
694
|
# - `delegate`: delegate to the system's built-in routes
|
695
|
+
# - `delegate_vpc`: delegate to the system's built-in routes, ignoring
|
696
|
+
# Internet-bound
|
697
|
+
# routes
|
691
698
|
# - `deliver`: deliver the packet to the specified `next_hop`
|
692
699
|
# - `drop`: drop the packet.
|
693
700
|
# @param name [String] The user-defined name for this route. If unspecified, the name will be a
|
694
701
|
# hyphenated list of randomly-selected words. Names must be unique within the VPC
|
695
702
|
# routing table the route resides in.
|
703
|
+
# @param next_hop [RouteNextHopPrototype] If `action` is `deliver`, the next hop that packets will be delivered to. For
|
704
|
+
# other `action` values, it must be omitted or specified as `0.0.0.0`.
|
696
705
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
697
|
-
def create_vpc_route(vpc_id:, destination:,
|
706
|
+
def create_vpc_route(vpc_id:, destination:, zone:, action: nil, name: nil, next_hop: nil)
|
698
707
|
raise ArgumentError.new("version must be provided") if version.nil?
|
699
708
|
|
700
709
|
raise ArgumentError.new("generation must be provided") if generation.nil?
|
@@ -703,8 +712,6 @@ module IbmVpc
|
|
703
712
|
|
704
713
|
raise ArgumentError.new("destination must be provided") if destination.nil?
|
705
714
|
|
706
|
-
raise ArgumentError.new("next_hop must be provided") if next_hop.nil?
|
707
|
-
|
708
715
|
raise ArgumentError.new("zone must be provided") if zone.nil?
|
709
716
|
|
710
717
|
headers = {
|
@@ -719,10 +726,10 @@ module IbmVpc
|
|
719
726
|
|
720
727
|
data = {
|
721
728
|
"destination" => destination,
|
722
|
-
"next_hop" => next_hop,
|
723
729
|
"zone" => zone,
|
724
730
|
"action" => action,
|
725
|
-
"name" => name
|
731
|
+
"name" => name,
|
732
|
+
"next_hop" => next_hop
|
726
733
|
}
|
727
734
|
|
728
735
|
method_url = "/vpcs/%s/routes" % [ERB::Util.url_encode(vpc_id)]
|
@@ -740,7 +747,7 @@ module IbmVpc
|
|
740
747
|
|
741
748
|
##
|
742
749
|
# @!method delete_vpc_route(vpc_id:, id:)
|
743
|
-
# Delete
|
750
|
+
# Delete a VPC route.
|
744
751
|
# This request deletes a route. This operation cannot be reversed.
|
745
752
|
# @param vpc_id [String] The VPC identifier.
|
746
753
|
# @param id [String] The route identifier.
|
@@ -778,7 +785,7 @@ module IbmVpc
|
|
778
785
|
|
779
786
|
##
|
780
787
|
# @!method get_vpc_route(vpc_id:, id:)
|
781
|
-
# Retrieve
|
788
|
+
# Retrieve a VPC route.
|
782
789
|
# This request retrieves a single route specified by the identifier in the URL.
|
783
790
|
# @param vpc_id [String] The VPC identifier.
|
784
791
|
# @param id [String] The route identifier.
|
@@ -816,7 +823,7 @@ module IbmVpc
|
|
816
823
|
|
817
824
|
##
|
818
825
|
# @!method update_vpc_route(vpc_id:, id:, route_patch:)
|
819
|
-
# Update
|
826
|
+
# Update a VPC route.
|
820
827
|
# This request updates a route with the information in a provided route patch. The
|
821
828
|
# route patch object is structured in the same way as a retrieved route and contains
|
822
829
|
# only the information to be updated.
|
@@ -868,14 +875,12 @@ module IbmVpc
|
|
868
875
|
# VPC is associated with a routing table, which controls delivery of packets sent on
|
869
876
|
# that subnet according to the action of the most specific matching route in the
|
870
877
|
# table. If multiple equally-specific routes exist, traffic will be distributed
|
871
|
-
# across them.
|
878
|
+
# across them. If no routes match, delivery will be controlled by the system's
|
872
879
|
# built-in routes.
|
873
880
|
# @param vpc_id [String] The VPC identifier.
|
874
|
-
# @param start [String] A server-
|
881
|
+
# @param start [String] A server-provided token determining what resource to start the page on.
|
875
882
|
# @param limit [Fixnum] The number of resources to return on a page.
|
876
|
-
# @param is_default [Boolean]
|
877
|
-
# default routing table. If the supplied value is `false`, filters the routing table
|
878
|
-
# collection to exclude the default routing table.
|
883
|
+
# @param is_default [Boolean] Filters the collection to routing tables with the specified `is_default` value.
|
879
884
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
880
885
|
def list_vpc_routing_tables(vpc_id:, start: nil, limit: nil, is_default: nil)
|
881
886
|
raise ArgumentError.new("version must be provided") if version.nil?
|
@@ -911,7 +916,7 @@ module IbmVpc
|
|
911
916
|
|
912
917
|
##
|
913
918
|
# @!method create_vpc_routing_table(vpc_id:, name: nil, route_direct_link_ingress: nil, route_transit_gateway_ingress: nil, route_vpc_zone_ingress: nil, routes: nil)
|
914
|
-
# Create a
|
919
|
+
# Create a routing table for a VPC.
|
915
920
|
# This request creates a user-defined routing table from a routing table prototype
|
916
921
|
# object. The prototype object is structured in the same way as a retrieved routing
|
917
922
|
# table, and contains the information necessary to create the new routing table.
|
@@ -953,8 +958,8 @@ module IbmVpc
|
|
953
958
|
# is an IP address within the VPC's address prefix ranges. Therefore, if an incoming
|
954
959
|
# packet matches a route with a `next_hop` of an internet-bound IP address or a VPN
|
955
960
|
# gateway connection, the packet will be dropped.
|
956
|
-
# @param routes [Array[RoutePrototype]]
|
957
|
-
#
|
961
|
+
# @param routes [Array[RoutePrototype]] The prototype objects for routes to create for this routing table. If unspecified,
|
962
|
+
# the routing table will be created with no routes.
|
958
963
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
959
964
|
def create_vpc_routing_table(vpc_id:, name: nil, route_direct_link_ingress: nil, route_transit_gateway_ingress: nil, route_vpc_zone_ingress: nil, routes: nil)
|
960
965
|
raise ArgumentError.new("version must be provided") if version.nil?
|
@@ -996,7 +1001,7 @@ module IbmVpc
|
|
996
1001
|
|
997
1002
|
##
|
998
1003
|
# @!method delete_vpc_routing_table(vpc_id:, id:)
|
999
|
-
# Delete
|
1004
|
+
# Delete a VPC routing table.
|
1000
1005
|
# This request deletes a routing table. A routing table cannot be deleted if it is
|
1001
1006
|
# associated with any subnets in the VPC. Additionally, a VPC's default routing
|
1002
1007
|
# table cannot be deleted. This operation cannot be reversed.
|
@@ -1036,7 +1041,7 @@ module IbmVpc
|
|
1036
1041
|
|
1037
1042
|
##
|
1038
1043
|
# @!method get_vpc_routing_table(vpc_id:, id:)
|
1039
|
-
# Retrieve
|
1044
|
+
# Retrieve a VPC routing table.
|
1040
1045
|
# This request retrieves a single routing table specified by the identifier in the
|
1041
1046
|
# URL.
|
1042
1047
|
# @param vpc_id [String] The VPC identifier.
|
@@ -1075,7 +1080,7 @@ module IbmVpc
|
|
1075
1080
|
|
1076
1081
|
##
|
1077
1082
|
# @!method update_vpc_routing_table(vpc_id:, id:, routing_table_patch:)
|
1078
|
-
# Update
|
1083
|
+
# Update a VPC routing table.
|
1079
1084
|
# This request updates a routing table with the information in a provided routing
|
1080
1085
|
# table patch. The patch object is structured in the same way as a retrieved table
|
1081
1086
|
# and contains only the information to be updated.
|
@@ -1122,16 +1127,16 @@ module IbmVpc
|
|
1122
1127
|
|
1123
1128
|
##
|
1124
1129
|
# @!method list_vpc_routing_table_routes(vpc_id:, routing_table_id:, start: nil, limit: nil)
|
1125
|
-
# List all
|
1126
|
-
# This request lists all
|
1127
|
-
#
|
1128
|
-
#
|
1129
|
-
#
|
1130
|
-
#
|
1131
|
-
#
|
1130
|
+
# List all routes in a VPC routing table.
|
1131
|
+
# This request lists all routes in a VPC routing table. If a subnet has been
|
1132
|
+
# associated with this routing table, delivery of packets sent on a subnet is
|
1133
|
+
# performed according to the action of the most specific matching route in the table
|
1134
|
+
# (provided the subnet and route are in the same zone). If multiple equally-specific
|
1135
|
+
# routes exist, traffic will be distributed across them. If no routes match,
|
1136
|
+
# delivery will be controlled by the system's built-in routes.
|
1132
1137
|
# @param vpc_id [String] The VPC identifier.
|
1133
1138
|
# @param routing_table_id [String] The routing table identifier.
|
1134
|
-
# @param start [String] A server-
|
1139
|
+
# @param start [String] A server-provided token determining what resource to start the page on.
|
1135
1140
|
# @param limit [Fixnum] The number of resources to return on a page.
|
1136
1141
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
1137
1142
|
def list_vpc_routing_table_routes(vpc_id:, routing_table_id:, start: nil, limit: nil)
|
@@ -1168,8 +1173,8 @@ module IbmVpc
|
|
1168
1173
|
end
|
1169
1174
|
|
1170
1175
|
##
|
1171
|
-
# @!method create_vpc_routing_table_route(vpc_id:, routing_table_id:, destination:,
|
1172
|
-
# Create a VPC
|
1176
|
+
# @!method create_vpc_routing_table_route(vpc_id:, routing_table_id:, destination:, zone:, action: nil, name: nil, next_hop: nil)
|
1177
|
+
# Create a route in a VPC routing table.
|
1173
1178
|
# This request creates a new VPC route from a VPC route prototype object. The
|
1174
1179
|
# prototype object is structured in the same way as a retrieved VPC route and
|
1175
1180
|
# contains the information necessary to create the route.
|
@@ -1179,19 +1184,22 @@ module IbmVpc
|
|
1179
1184
|
# the same destination, and only if both routes have an `action` of `deliver` and
|
1180
1185
|
# the
|
1181
1186
|
# `next_hop` is an IP address.
|
1182
|
-
# @param next_hop [RouteNextHopPrototype] If `action` is `deliver`, the next hop that packets will be delivered to. For
|
1183
|
-
# other `action` values, its `address` will be `0.0.0.0`.
|
1184
1187
|
# @param zone [ZoneIdentity] The zone to apply the route to. (Traffic from subnets in this zone will be
|
1185
1188
|
# subject to this route.).
|
1186
1189
|
# @param action [String] The action to perform with a packet matching the route:
|
1187
1190
|
# - `delegate`: delegate to the system's built-in routes
|
1191
|
+
# - `delegate_vpc`: delegate to the system's built-in routes, ignoring
|
1192
|
+
# Internet-bound
|
1193
|
+
# routes
|
1188
1194
|
# - `deliver`: deliver the packet to the specified `next_hop`
|
1189
1195
|
# - `drop`: drop the packet.
|
1190
1196
|
# @param name [String] The user-defined name for this route. If unspecified, the name will be a
|
1191
1197
|
# hyphenated list of randomly-selected words. Names must be unique within the VPC
|
1192
1198
|
# routing table the route resides in.
|
1199
|
+
# @param next_hop [RouteNextHopPrototype] If `action` is `deliver`, the next hop that packets will be delivered to. For
|
1200
|
+
# other `action` values, it must be omitted or specified as `0.0.0.0`.
|
1193
1201
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
1194
|
-
def create_vpc_routing_table_route(vpc_id:, routing_table_id:, destination:,
|
1202
|
+
def create_vpc_routing_table_route(vpc_id:, routing_table_id:, destination:, zone:, action: nil, name: nil, next_hop: nil)
|
1195
1203
|
raise ArgumentError.new("version must be provided") if version.nil?
|
1196
1204
|
|
1197
1205
|
raise ArgumentError.new("generation must be provided") if generation.nil?
|
@@ -1202,8 +1210,6 @@ module IbmVpc
|
|
1202
1210
|
|
1203
1211
|
raise ArgumentError.new("destination must be provided") if destination.nil?
|
1204
1212
|
|
1205
|
-
raise ArgumentError.new("next_hop must be provided") if next_hop.nil?
|
1206
|
-
|
1207
1213
|
raise ArgumentError.new("zone must be provided") if zone.nil?
|
1208
1214
|
|
1209
1215
|
headers = {
|
@@ -1218,10 +1224,10 @@ module IbmVpc
|
|
1218
1224
|
|
1219
1225
|
data = {
|
1220
1226
|
"destination" => destination,
|
1221
|
-
"next_hop" => next_hop,
|
1222
1227
|
"zone" => zone,
|
1223
1228
|
"action" => action,
|
1224
|
-
"name" => name
|
1229
|
+
"name" => name,
|
1230
|
+
"next_hop" => next_hop
|
1225
1231
|
}
|
1226
1232
|
|
1227
1233
|
method_url = "/vpcs/%s/routing_tables/%s/routes" % [ERB::Util.url_encode(vpc_id), ERB::Util.url_encode(routing_table_id)]
|
@@ -1239,7 +1245,7 @@ module IbmVpc
|
|
1239
1245
|
|
1240
1246
|
##
|
1241
1247
|
# @!method delete_vpc_routing_table_route(vpc_id:, routing_table_id:, id:)
|
1242
|
-
# Delete
|
1248
|
+
# Delete a VPC routing table route.
|
1243
1249
|
# This request deletes a VPC route. This operation cannot be reversed.
|
1244
1250
|
# @param vpc_id [String] The VPC identifier.
|
1245
1251
|
# @param routing_table_id [String] The routing table identifier.
|
@@ -1280,7 +1286,7 @@ module IbmVpc
|
|
1280
1286
|
|
1281
1287
|
##
|
1282
1288
|
# @!method get_vpc_routing_table_route(vpc_id:, routing_table_id:, id:)
|
1283
|
-
# Retrieve
|
1289
|
+
# Retrieve a VPC routing table route.
|
1284
1290
|
# This request retrieves a single VPC route specified by the identifier in the URL
|
1285
1291
|
# path.
|
1286
1292
|
# @param vpc_id [String] The VPC identifier.
|
@@ -1322,7 +1328,7 @@ module IbmVpc
|
|
1322
1328
|
|
1323
1329
|
##
|
1324
1330
|
# @!method update_vpc_routing_table_route(vpc_id:, routing_table_id:, id:, route_patch:)
|
1325
|
-
# Update
|
1331
|
+
# Update a VPC routing table route.
|
1326
1332
|
# This request updates a VPC route with the information provided in a route patch
|
1327
1333
|
# object. The patch object is structured in the same way as a retrieved VPC route
|
1328
1334
|
# and needs to contain only the information to be updated.
|
@@ -1379,13 +1385,14 @@ module IbmVpc
|
|
1379
1385
|
# This request lists all subnets in the region. Subnets are contiguous ranges of IP
|
1380
1386
|
# addresses specified in CIDR block notation. Each subnet is within a particular
|
1381
1387
|
# zone and cannot span multiple zones or regions.
|
1382
|
-
# @param start [String] A server-
|
1388
|
+
# @param start [String] A server-provided token determining what resource to start the page on.
|
1383
1389
|
# @param limit [Fixnum] The number of resources to return on a page.
|
1384
|
-
# @param resource_group_id [String] Filters the collection to resources
|
1385
|
-
#
|
1386
|
-
# @param routing_table_id [String] Filters the collection to subnets
|
1390
|
+
# @param resource_group_id [String] Filters the collection to resources in the resource group with the specified
|
1391
|
+
# identifier.
|
1392
|
+
# @param routing_table_id [String] Filters the collection to subnets attached to the routing table with the specified
|
1387
1393
|
# identifier.
|
1388
|
-
# @param routing_table_name [String] Filters the collection to subnets
|
1394
|
+
# @param routing_table_name [String] Filters the collection to subnets attached to the routing table with the specified
|
1395
|
+
# name.
|
1389
1396
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
1390
1397
|
def list_subnets(start: nil, limit: nil, resource_group_id: nil, routing_table_id: nil, routing_table_name: nil)
|
1391
1398
|
raise ArgumentError.new("version must be provided") if version.nil?
|
@@ -1463,7 +1470,7 @@ module IbmVpc
|
|
1463
1470
|
|
1464
1471
|
##
|
1465
1472
|
# @!method delete_subnet(id:)
|
1466
|
-
# Delete
|
1473
|
+
# Delete a subnet.
|
1467
1474
|
# This request deletes a subnet. This operation cannot be reversed. For this request
|
1468
1475
|
# to succeed, the subnet must not be referenced by any network interfaces, VPN
|
1469
1476
|
# gateways, or load balancers. A delete operation automatically detaches the subnet
|
@@ -1503,7 +1510,7 @@ module IbmVpc
|
|
1503
1510
|
|
1504
1511
|
##
|
1505
1512
|
# @!method get_subnet(id:)
|
1506
|
-
# Retrieve
|
1513
|
+
# Retrieve a subnet.
|
1507
1514
|
# This request retrieves a single subnet specified by the identifier in the URL.
|
1508
1515
|
# @param id [String] The subnet identifier.
|
1509
1516
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
@@ -1538,7 +1545,7 @@ module IbmVpc
|
|
1538
1545
|
|
1539
1546
|
##
|
1540
1547
|
# @!method update_subnet(id:, subnet_patch:)
|
1541
|
-
# Update
|
1548
|
+
# Update a subnet.
|
1542
1549
|
# This request updates a subnet with the information in a provided subnet patch. The
|
1543
1550
|
# subnet patch object is structured in the same way as a retrieved subnet and
|
1544
1551
|
# contains only the information to be updated.
|
@@ -1863,16 +1870,16 @@ module IbmVpc
|
|
1863
1870
|
##
|
1864
1871
|
# @!method list_subnet_reserved_ips(subnet_id:, start: nil, limit: nil, sort: nil)
|
1865
1872
|
# List all reserved IPs in a subnet.
|
1866
|
-
# This request lists reserved IPs in
|
1873
|
+
# This request lists reserved IPs in a subnet that are unbound or bound to an
|
1867
1874
|
# endpoint gateway.
|
1868
1875
|
# @param subnet_id [String] The subnet identifier.
|
1869
|
-
# @param start [String] A server-
|
1876
|
+
# @param start [String] A server-provided token determining what resource to start the page on.
|
1870
1877
|
# @param limit [Fixnum] The number of resources to return on a page.
|
1871
|
-
# @param sort [String] Sorts the returned collection by the specified
|
1872
|
-
# `-` may be prepended to the
|
1873
|
-
# the
|
1874
|
-
#
|
1875
|
-
#
|
1878
|
+
# @param sort [String] Sorts the returned collection by the specified property name in ascending order. A
|
1879
|
+
# `-` may be prepended to the name to sort in descending order. For example, the
|
1880
|
+
# value `-created_at` sorts the collection by the `created_at` property in
|
1881
|
+
# descending order, and the value `name` sorts it by the `name` property in
|
1882
|
+
# ascending order.
|
1876
1883
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
1877
1884
|
def list_subnet_reserved_ips(subnet_id:, start: nil, limit: nil, sort: nil)
|
1878
1885
|
raise ArgumentError.new("version must be provided") if version.nil?
|
@@ -1911,10 +1918,11 @@ module IbmVpc
|
|
1911
1918
|
# Reserve an IP in a subnet.
|
1912
1919
|
# This request reserves a system-selected IP address in a subnet.
|
1913
1920
|
# @param subnet_id [String] The subnet identifier.
|
1914
|
-
# @param auto_delete [Boolean]
|
1915
|
-
#
|
1916
|
-
#
|
1917
|
-
#
|
1921
|
+
# @param auto_delete [Boolean] Indicates whether this reserved IP member will be automatically deleted when
|
1922
|
+
# either
|
1923
|
+
# `target` is deleted, or the reserved IP is unbound. Must be `false` if the
|
1924
|
+
# reserved IP is unbound.
|
1925
|
+
# @param name [String] The user-defined name for this reserved IP. If unspecified, the name will be a
|
1918
1926
|
# hyphenated list of randomly-selected words. Names must be unique within the subnet
|
1919
1927
|
# the reserved IP resides in. Names beginning with `ibm-` are reserved for
|
1920
1928
|
# provider-owned resources.
|
@@ -1958,7 +1966,7 @@ module IbmVpc
|
|
1958
1966
|
|
1959
1967
|
##
|
1960
1968
|
# @!method delete_subnet_reserved_ip(subnet_id:, id:)
|
1961
|
-
# Release
|
1969
|
+
# Release a reserved IP.
|
1962
1970
|
# This request releases a reserved IP. This operation cannot be reversed.
|
1963
1971
|
# @param subnet_id [String] The subnet identifier.
|
1964
1972
|
# @param id [String] The reserved IP identifier.
|
@@ -1996,7 +2004,7 @@ module IbmVpc
|
|
1996
2004
|
|
1997
2005
|
##
|
1998
2006
|
# @!method get_subnet_reserved_ip(subnet_id:, id:)
|
1999
|
-
# Retrieve
|
2007
|
+
# Retrieve a reserved IP.
|
2000
2008
|
# This request retrieves a single reserved IP specified by the identifier in the
|
2001
2009
|
# URL.
|
2002
2010
|
# @param subnet_id [String] The subnet identifier.
|
@@ -2035,7 +2043,7 @@ module IbmVpc
|
|
2035
2043
|
|
2036
2044
|
##
|
2037
2045
|
# @!method update_subnet_reserved_ip(subnet_id:, id:, reserved_ip_patch:)
|
2038
|
-
# Update
|
2046
|
+
# Update a reserved IP.
|
2039
2047
|
# This request updates a reserved IP with the information in a provided reserved IP
|
2040
2048
|
# patch. The reserved IP patch object is structured in the same way as a retrieved
|
2041
2049
|
# reserved IP and contains only the information to be updated.
|
@@ -2086,17 +2094,17 @@ module IbmVpc
|
|
2086
2094
|
##
|
2087
2095
|
# @!method list_images(start: nil, limit: nil, resource_group_id: nil, name: nil, visibility: nil)
|
2088
2096
|
# List all images.
|
2089
|
-
# This request lists all
|
2090
|
-
#
|
2091
|
-
#
|
2097
|
+
# This request lists all images available in the region. An image provides source
|
2098
|
+
# data for a volume. Images are either system-provided, or created from another
|
2099
|
+
# source, such as importing from object storage.
|
2092
2100
|
#
|
2093
2101
|
# The images will be sorted by their `created_at` property values, with the newest
|
2094
2102
|
# first. Images with identical `created_at` values will be secondarily sorted by
|
2095
2103
|
# ascending `id` property values.
|
2096
|
-
# @param start [String] A server-
|
2104
|
+
# @param start [String] A server-provided token determining what resource to start the page on.
|
2097
2105
|
# @param limit [Fixnum] The number of resources to return on a page.
|
2098
|
-
# @param resource_group_id [String] Filters the collection to resources
|
2099
|
-
#
|
2106
|
+
# @param resource_group_id [String] Filters the collection to resources in the resource group with the specified
|
2107
|
+
# identifier.
|
2100
2108
|
# @param name [String] Filters the collection to resources with the exact specified name.
|
2101
2109
|
# @param visibility [String] Filters the collection to images with the specified `visibility`.
|
2102
2110
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
@@ -2137,8 +2145,9 @@ module IbmVpc
|
|
2137
2145
|
# Create an image.
|
2138
2146
|
# This request creates a new image from an image prototype object. The prototype
|
2139
2147
|
# object is structured in the same way as a retrieved image, and contains the
|
2140
|
-
# information necessary to create the new image.
|
2141
|
-
# storage must be
|
2148
|
+
# information necessary to create the new image. If an image is being imported, a
|
2149
|
+
# URL to the image file on object storage must be specified. If an image is being
|
2150
|
+
# created from an existing volume, that volume must be specified.
|
2142
2151
|
# @param image_prototype [ImagePrototype] The image prototype object.
|
2143
2152
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
2144
2153
|
def create_image(image_prototype:)
|
@@ -2176,10 +2185,11 @@ module IbmVpc
|
|
2176
2185
|
|
2177
2186
|
##
|
2178
2187
|
# @!method delete_image(id:)
|
2179
|
-
# Delete
|
2180
|
-
# This request deletes an image. This operation cannot be reversed.
|
2181
|
-
#
|
2182
|
-
#
|
2188
|
+
# Delete an image.
|
2189
|
+
# This request deletes an image. This operation cannot be reversed. A
|
2190
|
+
# system-provided image is not allowed to be deleted. Additionally, an image cannot
|
2191
|
+
# be deleted if it has a
|
2192
|
+
# `status` of `pending`, `tentative`, or `deleting`.
|
2183
2193
|
# @param id [String] The image identifier.
|
2184
2194
|
# @return [nil]
|
2185
2195
|
def delete_image(id:)
|
@@ -2213,7 +2223,7 @@ module IbmVpc
|
|
2213
2223
|
|
2214
2224
|
##
|
2215
2225
|
# @!method get_image(id:)
|
2216
|
-
# Retrieve
|
2226
|
+
# Retrieve an image.
|
2217
2227
|
# This request retrieves a single image specified by the identifier in the URL.
|
2218
2228
|
# @param id [String] The image identifier.
|
2219
2229
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
@@ -2248,10 +2258,10 @@ module IbmVpc
|
|
2248
2258
|
|
2249
2259
|
##
|
2250
2260
|
# @!method update_image(id:, image_patch:)
|
2251
|
-
# Update
|
2261
|
+
# Update an image.
|
2252
2262
|
# This request updates an image with the information in a provided image patch. The
|
2253
2263
|
# image patch object is structured in the same way as a retrieved image and contains
|
2254
|
-
# only the information to be updated.
|
2264
|
+
# only the information to be updated. A system-provided image is not allowed to be
|
2255
2265
|
# updated. An image with a `status` of `deleting` cannot be updated.
|
2256
2266
|
# @param id [String] The image identifier.
|
2257
2267
|
# @param image_patch [Hash] The image patch.
|
@@ -2293,9 +2303,9 @@ module IbmVpc
|
|
2293
2303
|
|
2294
2304
|
##
|
2295
2305
|
# @!method list_operating_systems(start: nil, limit: nil)
|
2296
|
-
#
|
2297
|
-
# This request
|
2298
|
-
# @param start [String] A server-
|
2306
|
+
# List all operating systems.
|
2307
|
+
# This request lists all operating systems in the region.
|
2308
|
+
# @param start [String] A server-provided token determining what resource to start the page on.
|
2299
2309
|
# @param limit [Fixnum] The number of resources to return on a page.
|
2300
2310
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
2301
2311
|
def list_operating_systems(start: nil, limit: nil)
|
@@ -2329,7 +2339,7 @@ module IbmVpc
|
|
2329
2339
|
|
2330
2340
|
##
|
2331
2341
|
# @!method get_operating_system(name:)
|
2332
|
-
#
|
2342
|
+
# Retrieve an operating system.
|
2333
2343
|
# This request retrieves a single operating system specified by the name in the URL.
|
2334
2344
|
# @param name [String] The operating system name.
|
2335
2345
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
@@ -2366,14 +2376,14 @@ module IbmVpc
|
|
2366
2376
|
#########################
|
2367
2377
|
|
2368
2378
|
##
|
2369
|
-
# @!method list_keys(
|
2379
|
+
# @!method list_keys(start: nil, limit: nil)
|
2370
2380
|
# List all keys.
|
2371
|
-
# This request lists all keys. A key contains a public SSH key which
|
2372
|
-
# installed on instances when they are created. Private keys are not stored.
|
2373
|
-
# @param
|
2374
|
-
#
|
2381
|
+
# This request lists all keys in the region. A key contains a public SSH key which
|
2382
|
+
# may be installed on instances when they are created. Private keys are not stored.
|
2383
|
+
# @param start [String] A server-provided token determining what resource to start the page on.
|
2384
|
+
# @param limit [Fixnum] The number of resources to return on a page.
|
2375
2385
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
2376
|
-
def list_keys(
|
2386
|
+
def list_keys(start: nil, limit: nil)
|
2377
2387
|
raise ArgumentError.new("version must be provided") if version.nil?
|
2378
2388
|
|
2379
2389
|
raise ArgumentError.new("generation must be provided") if generation.nil?
|
@@ -2386,7 +2396,8 @@ module IbmVpc
|
|
2386
2396
|
params = {
|
2387
2397
|
"version" => @version,
|
2388
2398
|
"generation" => @generation,
|
2389
|
-
"
|
2399
|
+
"start" => start,
|
2400
|
+
"limit" => limit
|
2390
2401
|
}
|
2391
2402
|
|
2392
2403
|
method_url = "/keys"
|
@@ -2408,8 +2419,10 @@ module IbmVpc
|
|
2408
2419
|
# object is structured in the same way as a retrieved key, and contains the
|
2409
2420
|
# information necessary to create the new key. The public key value must be
|
2410
2421
|
# provided.
|
2411
|
-
# @param public_key [String] A unique public SSH key to import,
|
2412
|
-
#
|
2422
|
+
# @param public_key [String] A unique public SSH key to import, in OpenSSH format (consisting of three
|
2423
|
+
# space-separated fields: the algorithm name, base64-encoded key, and a comment).
|
2424
|
+
# The algorithm and comment fields may be omitted, as only the key field is
|
2425
|
+
# imported.
|
2413
2426
|
# @param name [String] The unique user-defined name for this key. If unspecified, the name will be a
|
2414
2427
|
# hyphenated list of randomly-selected words.
|
2415
2428
|
# @param resource_group [ResourceGroupIdentity] The resource group to use. If unspecified, the account's [default resource
|
@@ -2455,7 +2468,7 @@ module IbmVpc
|
|
2455
2468
|
|
2456
2469
|
##
|
2457
2470
|
# @!method delete_key(id:)
|
2458
|
-
# Delete
|
2471
|
+
# Delete a key.
|
2459
2472
|
# This request deletes a key. This operation cannot be reversed.
|
2460
2473
|
# @param id [String] The key identifier.
|
2461
2474
|
# @return [nil]
|
@@ -2490,7 +2503,7 @@ module IbmVpc
|
|
2490
2503
|
|
2491
2504
|
##
|
2492
2505
|
# @!method get_key(id:)
|
2493
|
-
# Retrieve
|
2506
|
+
# Retrieve a key.
|
2494
2507
|
# This request retrieves a single key specified by the identifier in the URL.
|
2495
2508
|
# @param id [String] The key identifier.
|
2496
2509
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
@@ -2525,7 +2538,7 @@ module IbmVpc
|
|
2525
2538
|
|
2526
2539
|
##
|
2527
2540
|
# @!method update_key(id:, key_patch:)
|
2528
|
-
# Update
|
2541
|
+
# Update a key.
|
2529
2542
|
# This request updates a key's name.
|
2530
2543
|
# @param id [String] The key identifier.
|
2531
2544
|
# @param key_patch [Hash] The key patch.
|
@@ -2604,7 +2617,7 @@ module IbmVpc
|
|
2604
2617
|
|
2605
2618
|
##
|
2606
2619
|
# @!method get_instance_profile(name:)
|
2607
|
-
# Retrieve
|
2620
|
+
# Retrieve an instance profile.
|
2608
2621
|
# This request retrieves a single instance profile specified by the name in the URL.
|
2609
2622
|
# @param name [String] The instance profile name.
|
2610
2623
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
@@ -2639,7 +2652,7 @@ module IbmVpc
|
|
2639
2652
|
|
2640
2653
|
##
|
2641
2654
|
# @!method list_instance_templates
|
2642
|
-
#
|
2655
|
+
# List all instance templates.
|
2643
2656
|
# This request lists all instance templates in the region.
|
2644
2657
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
2645
2658
|
def list_instance_templates
|
@@ -2672,7 +2685,13 @@ module IbmVpc
|
|
2672
2685
|
##
|
2673
2686
|
# @!method create_instance_template(instance_template_prototype:)
|
2674
2687
|
# Create an instance template.
|
2675
|
-
# This request creates a new instance template.
|
2688
|
+
# This request creates a new instance template. The prototype object is structured
|
2689
|
+
# in the same way as a retrieved instance template, and contains the information
|
2690
|
+
# necessary to provision a new instance from the template.
|
2691
|
+
#
|
2692
|
+
# If a `source_template` is specified in the prototype object, its contents are
|
2693
|
+
# copied into the new template prior to copying any other properties provided in the
|
2694
|
+
# prototype object.
|
2676
2695
|
# @param instance_template_prototype [InstanceTemplatePrototype] The instance template prototype object.
|
2677
2696
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
2678
2697
|
def create_instance_template(instance_template_prototype:)
|
@@ -2710,7 +2729,7 @@ module IbmVpc
|
|
2710
2729
|
|
2711
2730
|
##
|
2712
2731
|
# @!method delete_instance_template(id:)
|
2713
|
-
# Delete
|
2732
|
+
# Delete an instance template.
|
2714
2733
|
# This request deletes the instance template. This operation cannot be reversed.
|
2715
2734
|
# @param id [String] The instance template identifier.
|
2716
2735
|
# @return [nil]
|
@@ -2745,7 +2764,7 @@ module IbmVpc
|
|
2745
2764
|
|
2746
2765
|
##
|
2747
2766
|
# @!method get_instance_template(id:)
|
2748
|
-
# Retrieve
|
2767
|
+
# Retrieve an instance template.
|
2749
2768
|
# This request retrieves a single instance template specified by the identifier in
|
2750
2769
|
# the URL.
|
2751
2770
|
# @param id [String] The instance template identifier.
|
@@ -2781,7 +2800,7 @@ module IbmVpc
|
|
2781
2800
|
|
2782
2801
|
##
|
2783
2802
|
# @!method update_instance_template(id:, instance_template_patch:)
|
2784
|
-
# Update
|
2803
|
+
# Update an instance template.
|
2785
2804
|
# This request updates an instance template with the information provided in the
|
2786
2805
|
# instance template patch. The instance template patch object is structured in the
|
2787
2806
|
# same way as a retrieved instance template and contains only the information to be
|
@@ -2825,19 +2844,28 @@ module IbmVpc
|
|
2825
2844
|
end
|
2826
2845
|
|
2827
2846
|
##
|
2828
|
-
# @!method list_instances(start: nil, limit: nil, resource_group_id: nil, name: nil, vpc_id: nil, vpc_crn: nil, vpc_name: nil)
|
2847
|
+
# @!method list_instances(start: nil, limit: nil, resource_group_id: nil, name: nil, vpc_id: nil, vpc_crn: nil, vpc_name: nil, dedicated_host_id: nil, dedicated_host_crn: nil, dedicated_host_name: nil, placement_group_id: nil, placement_group_crn: nil, placement_group_name: nil)
|
2829
2848
|
# List all instances.
|
2830
2849
|
# This request lists all instances in the region.
|
2831
|
-
# @param start [String] A server-
|
2850
|
+
# @param start [String] A server-provided token determining what resource to start the page on.
|
2832
2851
|
# @param limit [Fixnum] The number of resources to return on a page.
|
2833
|
-
# @param resource_group_id [String] Filters the collection to resources
|
2834
|
-
#
|
2852
|
+
# @param resource_group_id [String] Filters the collection to resources in the resource group with the specified
|
2853
|
+
# identifier.
|
2835
2854
|
# @param name [String] Filters the collection to resources with the exact specified name.
|
2836
2855
|
# @param vpc_id [String] Filters the collection to resources in the VPC with the specified identifier.
|
2837
2856
|
# @param vpc_crn [String] Filters the collection to resources in the VPC with the specified CRN.
|
2838
2857
|
# @param vpc_name [String] Filters the collection to resources in the VPC with the exact specified name.
|
2858
|
+
# @param dedicated_host_id [String] Filters the collection to instances on the dedicated host with the specified
|
2859
|
+
# identifier.
|
2860
|
+
# @param dedicated_host_crn [String] Filters the collection to instances on the dedicated host with the specified CRN.
|
2861
|
+
# @param dedicated_host_name [String] Filters the collection to instances on the dedicated host with the specified name.
|
2862
|
+
# @param placement_group_id [String] Filters the collection to instances in the placement group with the specified
|
2863
|
+
# identifier.
|
2864
|
+
# @param placement_group_crn [String] Filters the collection to instances in the placement group with the specified CRN.
|
2865
|
+
# @param placement_group_name [String] Filters the collection to instances in the placement group with the specified
|
2866
|
+
# name.
|
2839
2867
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
2840
|
-
def list_instances(start: nil, limit: nil, resource_group_id: nil, name: nil, vpc_id: nil, vpc_crn: nil, vpc_name: nil)
|
2868
|
+
def list_instances(start: nil, limit: nil, resource_group_id: nil, name: nil, vpc_id: nil, vpc_crn: nil, vpc_name: nil, dedicated_host_id: nil, dedicated_host_crn: nil, dedicated_host_name: nil, placement_group_id: nil, placement_group_crn: nil, placement_group_name: nil)
|
2841
2869
|
raise ArgumentError.new("version must be provided") if version.nil?
|
2842
2870
|
|
2843
2871
|
raise ArgumentError.new("generation must be provided") if generation.nil?
|
@@ -2856,7 +2884,13 @@ module IbmVpc
|
|
2856
2884
|
"name" => name,
|
2857
2885
|
"vpc.id" => vpc_id,
|
2858
2886
|
"vpc.crn" => vpc_crn,
|
2859
|
-
"vpc.name" => vpc_name
|
2887
|
+
"vpc.name" => vpc_name,
|
2888
|
+
"dedicated_host.id" => dedicated_host_id,
|
2889
|
+
"dedicated_host.crn" => dedicated_host_crn,
|
2890
|
+
"dedicated_host.name" => dedicated_host_name,
|
2891
|
+
"placement_group.id" => placement_group_id,
|
2892
|
+
"placement_group.crn" => placement_group_crn,
|
2893
|
+
"placement_group.name" => placement_group_name
|
2860
2894
|
}
|
2861
2895
|
|
2862
2896
|
method_url = "/instances"
|
@@ -2915,7 +2949,7 @@ module IbmVpc
|
|
2915
2949
|
|
2916
2950
|
##
|
2917
2951
|
# @!method delete_instance(id:)
|
2918
|
-
# Delete
|
2952
|
+
# Delete an instance.
|
2919
2953
|
# This request deletes an instance. This operation cannot be reversed. Any floating
|
2920
2954
|
# IPs associated with the instance's network interfaces are implicitly
|
2921
2955
|
# disassociated. All flow log collectors with `auto_delete` set to `true` targeting
|
@@ -2988,7 +3022,7 @@ module IbmVpc
|
|
2988
3022
|
|
2989
3023
|
##
|
2990
3024
|
# @!method update_instance(id:, instance_patch:)
|
2991
|
-
# Update
|
3025
|
+
# Update an instance.
|
2992
3026
|
# This request updates an instance with the information in a provided instance
|
2993
3027
|
# patch. The instance patch object is structured in the same way as a retrieved
|
2994
3028
|
# instance and contains only the information to be updated.
|
@@ -3032,7 +3066,7 @@ module IbmVpc
|
|
3032
3066
|
|
3033
3067
|
##
|
3034
3068
|
# @!method get_instance_initialization(id:)
|
3035
|
-
# Retrieve configuration
|
3069
|
+
# Retrieve initialization configuration for an instance.
|
3036
3070
|
# This request retrieves configuration variables used to initialize the instance,
|
3037
3071
|
# such as SSH keys and the Windows administrator password.
|
3038
3072
|
# @param id [String] The instance identifier.
|
@@ -3113,6 +3147,178 @@ module IbmVpc
|
|
3113
3147
|
response
|
3114
3148
|
end
|
3115
3149
|
|
3150
|
+
##
|
3151
|
+
# @!method create_instance_console_access_token(instance_id:, console_type:, force: nil)
|
3152
|
+
# Create a console access token for an instance.
|
3153
|
+
# This request creates a new single-use console access token for an instance. All
|
3154
|
+
# console configuration is provided at token create time, and the token is
|
3155
|
+
# subsequently used in the `access_token` query parameter for the WebSocket request.
|
3156
|
+
# The access token is only valid for a short period of time, and a maximum of one
|
3157
|
+
# token is valid for a given instance at a time.
|
3158
|
+
# @param instance_id [String] The instance identifier.
|
3159
|
+
# @param console_type [String] The instance console type for which this token may be used.
|
3160
|
+
# @param force [Boolean] Indicates whether to disconnect an existing serial console session as the serial
|
3161
|
+
# console cannot be shared. This has no effect on VNC consoles.
|
3162
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
3163
|
+
def create_instance_console_access_token(instance_id:, console_type:, force: nil)
|
3164
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
3165
|
+
|
3166
|
+
raise ArgumentError.new("generation must be provided") if generation.nil?
|
3167
|
+
|
3168
|
+
raise ArgumentError.new("instance_id must be provided") if instance_id.nil?
|
3169
|
+
|
3170
|
+
raise ArgumentError.new("console_type must be provided") if console_type.nil?
|
3171
|
+
|
3172
|
+
headers = {
|
3173
|
+
}
|
3174
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_instance_console_access_token")
|
3175
|
+
headers.merge!(sdk_headers)
|
3176
|
+
|
3177
|
+
params = {
|
3178
|
+
"version" => @version,
|
3179
|
+
"generation" => @generation
|
3180
|
+
}
|
3181
|
+
|
3182
|
+
data = {
|
3183
|
+
"console_type" => console_type,
|
3184
|
+
"force" => force
|
3185
|
+
}
|
3186
|
+
|
3187
|
+
method_url = "/instances/%s/console_access_token" % [ERB::Util.url_encode(instance_id)]
|
3188
|
+
|
3189
|
+
response = request(
|
3190
|
+
method: "POST",
|
3191
|
+
url: method_url,
|
3192
|
+
headers: headers,
|
3193
|
+
params: params,
|
3194
|
+
json: data,
|
3195
|
+
accept_json: true
|
3196
|
+
)
|
3197
|
+
response
|
3198
|
+
end
|
3199
|
+
|
3200
|
+
##
|
3201
|
+
# @!method list_instance_disks(instance_id:)
|
3202
|
+
# List all disks on an instance.
|
3203
|
+
# This request lists all disks on an instance. A disk is a block device that is
|
3204
|
+
# locally attached to the instance's physical host and is also referred to as
|
3205
|
+
# instance storage. By default, the listed disks are sorted by their `created_at`
|
3206
|
+
# property values, with the newest disk first.
|
3207
|
+
# @param instance_id [String] The instance identifier.
|
3208
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
3209
|
+
def list_instance_disks(instance_id:)
|
3210
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
3211
|
+
|
3212
|
+
raise ArgumentError.new("generation must be provided") if generation.nil?
|
3213
|
+
|
3214
|
+
raise ArgumentError.new("instance_id must be provided") if instance_id.nil?
|
3215
|
+
|
3216
|
+
headers = {
|
3217
|
+
}
|
3218
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_instance_disks")
|
3219
|
+
headers.merge!(sdk_headers)
|
3220
|
+
|
3221
|
+
params = {
|
3222
|
+
"version" => @version,
|
3223
|
+
"generation" => @generation
|
3224
|
+
}
|
3225
|
+
|
3226
|
+
method_url = "/instances/%s/disks" % [ERB::Util.url_encode(instance_id)]
|
3227
|
+
|
3228
|
+
response = request(
|
3229
|
+
method: "GET",
|
3230
|
+
url: method_url,
|
3231
|
+
headers: headers,
|
3232
|
+
params: params,
|
3233
|
+
accept_json: true
|
3234
|
+
)
|
3235
|
+
response
|
3236
|
+
end
|
3237
|
+
|
3238
|
+
##
|
3239
|
+
# @!method get_instance_disk(instance_id:, id:)
|
3240
|
+
# Retrieve an instance disk.
|
3241
|
+
# This request retrieves a single instance disk specified by the identifier in the
|
3242
|
+
# URL.
|
3243
|
+
# @param instance_id [String] The instance identifier.
|
3244
|
+
# @param id [String] The instance disk identifier.
|
3245
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
3246
|
+
def get_instance_disk(instance_id:, id:)
|
3247
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
3248
|
+
|
3249
|
+
raise ArgumentError.new("generation must be provided") if generation.nil?
|
3250
|
+
|
3251
|
+
raise ArgumentError.new("instance_id must be provided") if instance_id.nil?
|
3252
|
+
|
3253
|
+
raise ArgumentError.new("id must be provided") if id.nil?
|
3254
|
+
|
3255
|
+
headers = {
|
3256
|
+
}
|
3257
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_instance_disk")
|
3258
|
+
headers.merge!(sdk_headers)
|
3259
|
+
|
3260
|
+
params = {
|
3261
|
+
"version" => @version,
|
3262
|
+
"generation" => @generation
|
3263
|
+
}
|
3264
|
+
|
3265
|
+
method_url = "/instances/%s/disks/%s" % [ERB::Util.url_encode(instance_id), ERB::Util.url_encode(id)]
|
3266
|
+
|
3267
|
+
response = request(
|
3268
|
+
method: "GET",
|
3269
|
+
url: method_url,
|
3270
|
+
headers: headers,
|
3271
|
+
params: params,
|
3272
|
+
accept_json: true
|
3273
|
+
)
|
3274
|
+
response
|
3275
|
+
end
|
3276
|
+
|
3277
|
+
##
|
3278
|
+
# @!method update_instance_disk(instance_id:, id:, instance_disk_patch:)
|
3279
|
+
# Update an instance disk.
|
3280
|
+
# This request updates the instance disk with the information in a provided patch.
|
3281
|
+
# @param instance_id [String] The instance identifier.
|
3282
|
+
# @param id [String] The instance disk identifier.
|
3283
|
+
# @param instance_disk_patch [Hash] The instance disk patch.
|
3284
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
3285
|
+
def update_instance_disk(instance_id:, id:, instance_disk_patch:)
|
3286
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
3287
|
+
|
3288
|
+
raise ArgumentError.new("generation must be provided") if generation.nil?
|
3289
|
+
|
3290
|
+
raise ArgumentError.new("instance_id must be provided") if instance_id.nil?
|
3291
|
+
|
3292
|
+
raise ArgumentError.new("id must be provided") if id.nil?
|
3293
|
+
|
3294
|
+
raise ArgumentError.new("instance_disk_patch must be provided") if instance_disk_patch.nil?
|
3295
|
+
|
3296
|
+
headers = {
|
3297
|
+
}
|
3298
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_instance_disk")
|
3299
|
+
headers.merge!(sdk_headers)
|
3300
|
+
|
3301
|
+
params = {
|
3302
|
+
"version" => @version,
|
3303
|
+
"generation" => @generation
|
3304
|
+
}
|
3305
|
+
|
3306
|
+
data = instance_disk_patch
|
3307
|
+
headers["Content-Type"] = "application/merge-patch+json"
|
3308
|
+
|
3309
|
+
method_url = "/instances/%s/disks/%s" % [ERB::Util.url_encode(instance_id), ERB::Util.url_encode(id)]
|
3310
|
+
|
3311
|
+
response = request(
|
3312
|
+
method: "PATCH",
|
3313
|
+
url: method_url,
|
3314
|
+
headers: headers,
|
3315
|
+
params: params,
|
3316
|
+
data: data,
|
3317
|
+
accept_json: true
|
3318
|
+
)
|
3319
|
+
response
|
3320
|
+
end
|
3321
|
+
|
3116
3322
|
##
|
3117
3323
|
# @!method list_instance_network_interfaces(instance_id:)
|
3118
3324
|
# List all network interfaces on an instance.
|
@@ -3154,7 +3360,7 @@ module IbmVpc
|
|
3154
3360
|
|
3155
3361
|
##
|
3156
3362
|
# @!method create_instance_network_interface(instance_id:, subnet:, allow_ip_spoofing: nil, name: nil, primary_ipv4_address: nil, security_groups: nil)
|
3157
|
-
# Create a network interface.
|
3363
|
+
# Create a network interface on an instance.
|
3158
3364
|
# This request creates a new network interface from a network interface prototype
|
3159
3365
|
# object. The prototype object is structured in the same way as a retrieved network
|
3160
3366
|
# interface, and contains the information necessary to create the new network
|
@@ -3166,8 +3372,9 @@ module IbmVpc
|
|
3166
3372
|
# @param allow_ip_spoofing [Boolean] Indicates whether source IP spoofing is allowed on this interface. If false,
|
3167
3373
|
# source IP spoofing is prevented on this interface. If true, source IP spoofing is
|
3168
3374
|
# allowed on this interface.
|
3169
|
-
# @param name [String] The user-defined name for
|
3170
|
-
#
|
3375
|
+
# @param name [String] The user-defined name for network interface. Names must be unique within the
|
3376
|
+
# instance the network interface resides in. If unspecified, the name will be a
|
3377
|
+
# hyphenated list of randomly-selected words.
|
3171
3378
|
# @param primary_ipv4_address [String] The primary IPv4 address. If specified, it must be an available address on the
|
3172
3379
|
# network interface's subnet. If unspecified, an available address on the subnet
|
3173
3380
|
# will be automatically selected.
|
@@ -3215,7 +3422,7 @@ module IbmVpc
|
|
3215
3422
|
|
3216
3423
|
##
|
3217
3424
|
# @!method delete_instance_network_interface(instance_id:, id:)
|
3218
|
-
# Delete
|
3425
|
+
# Delete a network interface.
|
3219
3426
|
# This request deletes a network interface. This operation cannot be reversed. Any
|
3220
3427
|
# floating IPs associated with the network interface are implicitly disassociated.
|
3221
3428
|
# All flow log collectors with `auto_delete` set to `true` targeting the network
|
@@ -3257,7 +3464,7 @@ module IbmVpc
|
|
3257
3464
|
|
3258
3465
|
##
|
3259
3466
|
# @!method get_instance_network_interface(instance_id:, id:)
|
3260
|
-
# Retrieve
|
3467
|
+
# Retrieve a network interface.
|
3261
3468
|
# This request retrieves a single network interface specified by the identifier in
|
3262
3469
|
# the URL.
|
3263
3470
|
# @param instance_id [String] The instance identifier.
|
@@ -3297,10 +3504,10 @@ module IbmVpc
|
|
3297
3504
|
##
|
3298
3505
|
# @!method update_instance_network_interface(instance_id:, id:, network_interface_patch:)
|
3299
3506
|
# Update a network interface.
|
3300
|
-
# This request updates a network interface with the information in a
|
3301
|
-
# network interface patch. The network interface patch object is structured
|
3302
|
-
# same way as a retrieved network interface and
|
3303
|
-
#
|
3507
|
+
# This request updates a network interface with the information provided in a
|
3508
|
+
# network interface patch object. The network interface patch object is structured
|
3509
|
+
# in the same way as a retrieved network interface and needs to contain only the
|
3510
|
+
# information to be updated.
|
3304
3511
|
# @param instance_id [String] The instance identifier.
|
3305
3512
|
# @param id [String] The network interface identifier.
|
3306
3513
|
# @param network_interface_patch [Hash] The network interface patch.
|
@@ -3382,7 +3589,7 @@ module IbmVpc
|
|
3382
3589
|
|
3383
3590
|
##
|
3384
3591
|
# @!method remove_instance_network_interface_floating_ip(instance_id:, network_interface_id:, id:)
|
3385
|
-
# Disassociate
|
3592
|
+
# Disassociate a floating IP from a network interface.
|
3386
3593
|
# This request disassociates the specified floating IP from the specified network
|
3387
3594
|
# interface.
|
3388
3595
|
# @param instance_id [String] The instance identifier.
|
@@ -3470,7 +3677,7 @@ module IbmVpc
|
|
3470
3677
|
# This request associates the specified floating IP with the specified network
|
3471
3678
|
# interface, replacing any existing association. For this request to succeed, the
|
3472
3679
|
# existing floating IP must not be required by another resource, such as a public
|
3473
|
-
# gateway. A request body is not required, and if
|
3680
|
+
# gateway. A request body is not required, and if provided, is ignored.
|
3474
3681
|
# @param instance_id [String] The instance identifier.
|
3475
3682
|
# @param network_interface_id [String] The network interface identifier.
|
3476
3683
|
# @param id [String] The floating IP identifier.
|
@@ -3510,8 +3717,8 @@ module IbmVpc
|
|
3510
3717
|
|
3511
3718
|
##
|
3512
3719
|
# @!method list_instance_volume_attachments(instance_id:)
|
3513
|
-
# List all volumes
|
3514
|
-
# This request lists all volume attachments
|
3720
|
+
# List all volumes attachments on an instance.
|
3721
|
+
# This request lists all volume attachments on an instance. A volume attachment
|
3515
3722
|
# connects a volume to an instance. Each instance may have many volume attachments
|
3516
3723
|
# but each volume attachment connects exactly one instance to exactly one volume.
|
3517
3724
|
# @param instance_id [String] The instance identifier.
|
@@ -3547,17 +3754,19 @@ module IbmVpc
|
|
3547
3754
|
|
3548
3755
|
##
|
3549
3756
|
# @!method create_instance_volume_attachment(instance_id:, volume:, delete_volume_on_instance_delete: nil, name: nil)
|
3550
|
-
# Create a volume attachment
|
3757
|
+
# Create a volume attachment on an instance.
|
3551
3758
|
# This request creates a new volume attachment from a volume attachment prototype
|
3552
|
-
# object
|
3553
|
-
#
|
3554
|
-
#
|
3555
|
-
#
|
3759
|
+
# object, connecting a volume to an instance. For this request to succeed, the
|
3760
|
+
# specified volume must not be busy. The prototype object is structured in the same
|
3761
|
+
# way as a retrieved volume attachment, and contains the information necessary to
|
3762
|
+
# create the new volume attachment.
|
3556
3763
|
# @param instance_id [String] The instance identifier.
|
3557
|
-
# @param volume [
|
3764
|
+
# @param volume [VolumeAttachmentPrototypeVolume] An existing volume to attach to the instance, or a prototype object for a new
|
3765
|
+
# volume.
|
3558
3766
|
# @param delete_volume_on_instance_delete [Boolean] If set to true, when deleting the instance the volume will also be deleted.
|
3559
|
-
# @param name [String] The user-defined name for this volume attachment.
|
3560
|
-
#
|
3767
|
+
# @param name [String] The user-defined name for this volume attachment. Names must be unique within the
|
3768
|
+
# instance the volume attachment resides in. If unspecified, the name will be a
|
3769
|
+
# hyphenated list of randomly-selected words.
|
3561
3770
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
3562
3771
|
def create_instance_volume_attachment(instance_id:, volume:, delete_volume_on_instance_delete: nil, name: nil)
|
3563
3772
|
raise ArgumentError.new("version must be provided") if version.nil?
|
@@ -3599,9 +3808,10 @@ module IbmVpc
|
|
3599
3808
|
|
3600
3809
|
##
|
3601
3810
|
# @!method delete_instance_volume_attachment(instance_id:, id:)
|
3602
|
-
# Delete a volume attachment
|
3603
|
-
# This request deletes a volume attachment.
|
3604
|
-
#
|
3811
|
+
# Delete a volume attachment.
|
3812
|
+
# This request deletes a volume attachment. This operation cannot be reversed, but a
|
3813
|
+
# new volume attachment may subsequently be created for the volume. For this
|
3814
|
+
# request to succeed, the volume must not be busy.
|
3605
3815
|
# @param instance_id [String] The instance identifier.
|
3606
3816
|
# @param id [String] The volume attachment identifier.
|
3607
3817
|
# @return [nil]
|
@@ -3638,7 +3848,7 @@ module IbmVpc
|
|
3638
3848
|
|
3639
3849
|
##
|
3640
3850
|
# @!method get_instance_volume_attachment(instance_id:, id:)
|
3641
|
-
# Retrieve
|
3851
|
+
# Retrieve a volume attachment.
|
3642
3852
|
# This request retrieves a single volume attachment specified by the identifier in
|
3643
3853
|
# the URL.
|
3644
3854
|
# @param instance_id [String] The instance identifier.
|
@@ -3678,9 +3888,10 @@ module IbmVpc
|
|
3678
3888
|
##
|
3679
3889
|
# @!method update_instance_volume_attachment(instance_id:, id:, volume_attachment_patch:)
|
3680
3890
|
# Update a volume attachment.
|
3681
|
-
# This request updates a volume attachment with the information in a
|
3682
|
-
# attachment patch. The volume attachment patch object is structured in the
|
3683
|
-
# as a retrieved volume attachment and
|
3891
|
+
# This request updates a volume attachment with the information provided in a volume
|
3892
|
+
# attachment patch object. The volume attachment patch object is structured in the
|
3893
|
+
# same way as a retrieved volume attachment and needs to contain only the
|
3894
|
+
# information to be updated.
|
3684
3895
|
# @param instance_id [String] The instance identifier.
|
3685
3896
|
# @param id [String] The volume attachment identifier.
|
3686
3897
|
# @param volume_attachment_patch [Hash] The volume attachment patch.
|
@@ -3729,7 +3940,7 @@ module IbmVpc
|
|
3729
3940
|
# @!method list_instance_groups(start: nil, limit: nil)
|
3730
3941
|
# List all instance groups.
|
3731
3942
|
# This request lists all instance groups in the region.
|
3732
|
-
# @param start [String] A server-
|
3943
|
+
# @param start [String] A server-provided token determining what resource to start the page on.
|
3733
3944
|
# @param limit [Fixnum] The number of resources to return on a page.
|
3734
3945
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
3735
3946
|
def list_instance_groups(start: nil, limit: nil)
|
@@ -3765,13 +3976,13 @@ module IbmVpc
|
|
3765
3976
|
# @!method create_instance_group(instance_template:, subnets:, application_port: nil, load_balancer: nil, load_balancer_pool: nil, membership_count: nil, name: nil, resource_group: nil)
|
3766
3977
|
# Create an instance group.
|
3767
3978
|
# This request creates a new instance group.
|
3768
|
-
# @param instance_template [InstanceTemplateIdentity]
|
3769
|
-
# @param subnets [Array[SubnetIdentity]]
|
3979
|
+
# @param instance_template [InstanceTemplateIdentity] Identifies an instance template by a unique property.
|
3980
|
+
# @param subnets [Array[SubnetIdentity]] The subnets to use when creating new instances.
|
3770
3981
|
# @param application_port [Fixnum] Required if specifying a load balancer pool only. Used by the instance group when
|
3771
3982
|
# scaling up instances to supply the port for the load balancer pool member.
|
3772
3983
|
# @param load_balancer [LoadBalancerIdentity] The load balancer that the load balancer pool used by this group
|
3773
|
-
# is in.
|
3774
|
-
# @param load_balancer_pool [LoadBalancerPoolIdentity]
|
3984
|
+
# is in. Required when using a load balancer pool.
|
3985
|
+
# @param load_balancer_pool [LoadBalancerPoolIdentity] If specified, the load balancer pool will be managed by this
|
3775
3986
|
# group. Instances created by this group will have a new load
|
3776
3987
|
# balancer pool member in that pool created. Must be used with
|
3777
3988
|
# `application_port`.
|
@@ -3825,7 +4036,7 @@ module IbmVpc
|
|
3825
4036
|
|
3826
4037
|
##
|
3827
4038
|
# @!method delete_instance_group(id:)
|
3828
|
-
# Delete
|
4039
|
+
# Delete an instance group.
|
3829
4040
|
# This request deletes an instance group. This operation cannot be reversed. Any
|
3830
4041
|
# instances associated with the group will be deleted.
|
3831
4042
|
# @param id [String] The instance group identifier.
|
@@ -3861,7 +4072,7 @@ module IbmVpc
|
|
3861
4072
|
|
3862
4073
|
##
|
3863
4074
|
# @!method get_instance_group(id:)
|
3864
|
-
# Retrieve
|
4075
|
+
# Retrieve an instance group.
|
3865
4076
|
# This request retrieves a single instance group specified by identifier in the URL.
|
3866
4077
|
# @param id [String] The instance group identifier.
|
3867
4078
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
@@ -3896,7 +4107,7 @@ module IbmVpc
|
|
3896
4107
|
|
3897
4108
|
##
|
3898
4109
|
# @!method update_instance_group(id:, instance_group_patch:)
|
3899
|
-
# Update
|
4110
|
+
# Update an instance group.
|
3900
4111
|
# This request updates an instance group with the information provided instance
|
3901
4112
|
# group patch. The instance group patch object is structured in the same way as a
|
3902
4113
|
# retrieved instance group and contains only the information to be updated.
|
@@ -3940,7 +4151,7 @@ module IbmVpc
|
|
3940
4151
|
|
3941
4152
|
##
|
3942
4153
|
# @!method delete_instance_group_load_balancer(instance_group_id:)
|
3943
|
-
# Delete
|
4154
|
+
# Delete an instance group load balancer.
|
3944
4155
|
# This request unbinds the instance group from the load balancer pool, and deletes
|
3945
4156
|
# the load balancer pool members.
|
3946
4157
|
# @param instance_group_id [String] The instance group identifier.
|
@@ -3975,12 +4186,14 @@ module IbmVpc
|
|
3975
4186
|
end
|
3976
4187
|
|
3977
4188
|
##
|
3978
|
-
# @!method list_instance_group_managers(instance_group_id:)
|
4189
|
+
# @!method list_instance_group_managers(instance_group_id:, start: nil, limit: nil)
|
3979
4190
|
# List all managers for an instance group.
|
3980
|
-
# This request
|
4191
|
+
# This request lists all managers for an instance group.
|
3981
4192
|
# @param instance_group_id [String] The instance group identifier.
|
4193
|
+
# @param start [String] A server-provided token determining what resource to start the page on.
|
4194
|
+
# @param limit [Fixnum] The number of resources to return on a page.
|
3982
4195
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
3983
|
-
def list_instance_group_managers(instance_group_id:)
|
4196
|
+
def list_instance_group_managers(instance_group_id:, start: nil, limit: nil)
|
3984
4197
|
raise ArgumentError.new("version must be provided") if version.nil?
|
3985
4198
|
|
3986
4199
|
raise ArgumentError.new("generation must be provided") if generation.nil?
|
@@ -3994,7 +4207,9 @@ module IbmVpc
|
|
3994
4207
|
|
3995
4208
|
params = {
|
3996
4209
|
"version" => @version,
|
3997
|
-
"generation" => @generation
|
4210
|
+
"generation" => @generation,
|
4211
|
+
"start" => start,
|
4212
|
+
"limit" => limit
|
3998
4213
|
}
|
3999
4214
|
|
4000
4215
|
method_url = "/instance_groups/%s/managers" % [ERB::Util.url_encode(instance_group_id)]
|
@@ -4011,7 +4226,7 @@ module IbmVpc
|
|
4011
4226
|
|
4012
4227
|
##
|
4013
4228
|
# @!method create_instance_group_manager(instance_group_id:, instance_group_manager_prototype:)
|
4014
|
-
# Create an instance group
|
4229
|
+
# Create a manager for an instance group.
|
4015
4230
|
# This request creates a new instance group manager.
|
4016
4231
|
# @param instance_group_id [String] The instance group identifier.
|
4017
4232
|
# @param instance_group_manager_prototype [InstanceGroupManagerPrototype] The instance group manager prototype object.
|
@@ -4053,7 +4268,7 @@ module IbmVpc
|
|
4053
4268
|
|
4054
4269
|
##
|
4055
4270
|
# @!method delete_instance_group_manager(instance_group_id:, id:)
|
4056
|
-
# Delete
|
4271
|
+
# Delete an instance group manager.
|
4057
4272
|
# This request deletes an instance group manager. This operation cannot be reversed.
|
4058
4273
|
# @param instance_group_id [String] The instance group identifier.
|
4059
4274
|
# @param id [String] The instance group manager identifier.
|
@@ -4091,7 +4306,7 @@ module IbmVpc
|
|
4091
4306
|
|
4092
4307
|
##
|
4093
4308
|
# @!method get_instance_group_manager(instance_group_id:, id:)
|
4094
|
-
# Retrieve
|
4309
|
+
# Retrieve an instance group manager.
|
4095
4310
|
# This request retrieves a single instance group manager specified by identifier in
|
4096
4311
|
# the URL.
|
4097
4312
|
# @param instance_group_id [String] The instance group identifier.
|
@@ -4130,7 +4345,7 @@ module IbmVpc
|
|
4130
4345
|
|
4131
4346
|
##
|
4132
4347
|
# @!method update_instance_group_manager(instance_group_id:, id:, instance_group_manager_patch:)
|
4133
|
-
# Update
|
4348
|
+
# Update an instance group manager.
|
4134
4349
|
# This request updates an instance group manager with the information provided
|
4135
4350
|
# instance group manager patch.
|
4136
4351
|
# @param instance_group_id [String] The instance group identifier.
|
@@ -4175,13 +4390,15 @@ module IbmVpc
|
|
4175
4390
|
end
|
4176
4391
|
|
4177
4392
|
##
|
4178
|
-
# @!method
|
4179
|
-
# List all
|
4180
|
-
# This request lists all instance group
|
4393
|
+
# @!method list_instance_group_manager_actions(instance_group_id:, instance_group_manager_id:, start: nil, limit: nil)
|
4394
|
+
# List all actions for an instance group manager.
|
4395
|
+
# This request lists all instance group actions for an instance group manager.
|
4181
4396
|
# @param instance_group_id [String] The instance group identifier.
|
4182
4397
|
# @param instance_group_manager_id [String] The instance group manager identifier.
|
4398
|
+
# @param start [String] A server-provided token determining what resource to start the page on.
|
4399
|
+
# @param limit [Fixnum] The number of resources to return on a page.
|
4183
4400
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
4184
|
-
def
|
4401
|
+
def list_instance_group_manager_actions(instance_group_id:, instance_group_manager_id:, start: nil, limit: nil)
|
4185
4402
|
raise ArgumentError.new("version must be provided") if version.nil?
|
4186
4403
|
|
4187
4404
|
raise ArgumentError.new("generation must be provided") if generation.nil?
|
@@ -4192,15 +4409,17 @@ module IbmVpc
|
|
4192
4409
|
|
4193
4410
|
headers = {
|
4194
4411
|
}
|
4195
|
-
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "
|
4412
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_instance_group_manager_actions")
|
4196
4413
|
headers.merge!(sdk_headers)
|
4197
4414
|
|
4198
4415
|
params = {
|
4199
4416
|
"version" => @version,
|
4200
|
-
"generation" => @generation
|
4417
|
+
"generation" => @generation,
|
4418
|
+
"start" => start,
|
4419
|
+
"limit" => limit
|
4201
4420
|
}
|
4202
4421
|
|
4203
|
-
method_url = "/instance_groups/%s/managers/%s/
|
4422
|
+
method_url = "/instance_groups/%s/managers/%s/actions" % [ERB::Util.url_encode(instance_group_id), ERB::Util.url_encode(instance_group_manager_id)]
|
4204
4423
|
|
4205
4424
|
response = request(
|
4206
4425
|
method: "GET",
|
@@ -4213,14 +4432,14 @@ module IbmVpc
|
|
4213
4432
|
end
|
4214
4433
|
|
4215
4434
|
##
|
4216
|
-
# @!method
|
4217
|
-
# Create an instance group manager
|
4218
|
-
# This request creates a new instance group manager
|
4435
|
+
# @!method create_instance_group_manager_action(instance_group_id:, instance_group_manager_id:, instance_group_manager_action_prototype:)
|
4436
|
+
# Create an instance group manager action.
|
4437
|
+
# This request creates a new instance group manager action.
|
4219
4438
|
# @param instance_group_id [String] The instance group identifier.
|
4220
4439
|
# @param instance_group_manager_id [String] The instance group manager identifier.
|
4221
|
-
# @param
|
4440
|
+
# @param instance_group_manager_action_prototype [InstanceGroupManagerActionPrototype] The instance group manager action prototype object.
|
4222
4441
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
4223
|
-
def
|
4442
|
+
def create_instance_group_manager_action(instance_group_id:, instance_group_manager_id:, instance_group_manager_action_prototype:)
|
4224
4443
|
raise ArgumentError.new("version must be provided") if version.nil?
|
4225
4444
|
|
4226
4445
|
raise ArgumentError.new("generation must be provided") if generation.nil?
|
@@ -4229,11 +4448,11 @@ module IbmVpc
|
|
4229
4448
|
|
4230
4449
|
raise ArgumentError.new("instance_group_manager_id must be provided") if instance_group_manager_id.nil?
|
4231
4450
|
|
4232
|
-
raise ArgumentError.new("
|
4451
|
+
raise ArgumentError.new("instance_group_manager_action_prototype must be provided") if instance_group_manager_action_prototype.nil?
|
4233
4452
|
|
4234
4453
|
headers = {
|
4235
4454
|
}
|
4236
|
-
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "
|
4455
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_instance_group_manager_action")
|
4237
4456
|
headers.merge!(sdk_headers)
|
4238
4457
|
|
4239
4458
|
params = {
|
@@ -4241,10 +4460,10 @@ module IbmVpc
|
|
4241
4460
|
"generation" => @generation
|
4242
4461
|
}
|
4243
4462
|
|
4244
|
-
data =
|
4463
|
+
data = instance_group_manager_action_prototype
|
4245
4464
|
headers["Content-Type"] = "application/json"
|
4246
4465
|
|
4247
|
-
method_url = "/instance_groups/%s/managers/%s/
|
4466
|
+
method_url = "/instance_groups/%s/managers/%s/actions" % [ERB::Util.url_encode(instance_group_id), ERB::Util.url_encode(instance_group_manager_id)]
|
4248
4467
|
|
4249
4468
|
response = request(
|
4250
4469
|
method: "POST",
|
@@ -4258,15 +4477,15 @@ module IbmVpc
|
|
4258
4477
|
end
|
4259
4478
|
|
4260
4479
|
##
|
4261
|
-
# @!method
|
4262
|
-
# Delete specified instance group manager
|
4263
|
-
# This request deletes an instance group manager
|
4480
|
+
# @!method delete_instance_group_manager_action(instance_group_id:, instance_group_manager_id:, id:)
|
4481
|
+
# Delete specified instance group manager action.
|
4482
|
+
# This request deletes an instance group manager action. This operation cannot be
|
4264
4483
|
# reversed.
|
4265
4484
|
# @param instance_group_id [String] The instance group identifier.
|
4266
4485
|
# @param instance_group_manager_id [String] The instance group manager identifier.
|
4267
|
-
# @param id [String] The instance group manager
|
4486
|
+
# @param id [String] The instance group manager action identifier.
|
4268
4487
|
# @return [nil]
|
4269
|
-
def
|
4488
|
+
def delete_instance_group_manager_action(instance_group_id:, instance_group_manager_id:, id:)
|
4270
4489
|
raise ArgumentError.new("version must be provided") if version.nil?
|
4271
4490
|
|
4272
4491
|
raise ArgumentError.new("generation must be provided") if generation.nil?
|
@@ -4279,7 +4498,7 @@ module IbmVpc
|
|
4279
4498
|
|
4280
4499
|
headers = {
|
4281
4500
|
}
|
4282
|
-
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "
|
4501
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_instance_group_manager_action")
|
4283
4502
|
headers.merge!(sdk_headers)
|
4284
4503
|
|
4285
4504
|
params = {
|
@@ -4287,7 +4506,7 @@ module IbmVpc
|
|
4287
4506
|
"generation" => @generation
|
4288
4507
|
}
|
4289
4508
|
|
4290
|
-
method_url = "/instance_groups/%s/managers/%s/
|
4509
|
+
method_url = "/instance_groups/%s/managers/%s/actions/%s" % [ERB::Util.url_encode(instance_group_id), ERB::Util.url_encode(instance_group_manager_id), ERB::Util.url_encode(id)]
|
4291
4510
|
|
4292
4511
|
request(
|
4293
4512
|
method: "DELETE",
|
@@ -4300,15 +4519,15 @@ module IbmVpc
|
|
4300
4519
|
end
|
4301
4520
|
|
4302
4521
|
##
|
4303
|
-
# @!method
|
4304
|
-
# Retrieve specified instance group manager
|
4305
|
-
# This request retrieves a single instance group manager
|
4522
|
+
# @!method get_instance_group_manager_action(instance_group_id:, instance_group_manager_id:, id:)
|
4523
|
+
# Retrieve specified instance group manager action.
|
4524
|
+
# This request retrieves a single instance group manager action specified by
|
4306
4525
|
# identifier in the URL.
|
4307
4526
|
# @param instance_group_id [String] The instance group identifier.
|
4308
4527
|
# @param instance_group_manager_id [String] The instance group manager identifier.
|
4309
|
-
# @param id [String] The instance group manager
|
4528
|
+
# @param id [String] The instance group manager action identifier.
|
4310
4529
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
4311
|
-
def
|
4530
|
+
def get_instance_group_manager_action(instance_group_id:, instance_group_manager_id:, id:)
|
4312
4531
|
raise ArgumentError.new("version must be provided") if version.nil?
|
4313
4532
|
|
4314
4533
|
raise ArgumentError.new("generation must be provided") if generation.nil?
|
@@ -4321,7 +4540,7 @@ module IbmVpc
|
|
4321
4540
|
|
4322
4541
|
headers = {
|
4323
4542
|
}
|
4324
|
-
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "
|
4543
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_instance_group_manager_action")
|
4325
4544
|
headers.merge!(sdk_headers)
|
4326
4545
|
|
4327
4546
|
params = {
|
@@ -4329,7 +4548,7 @@ module IbmVpc
|
|
4329
4548
|
"generation" => @generation
|
4330
4549
|
}
|
4331
4550
|
|
4332
|
-
method_url = "/instance_groups/%s/managers/%s/
|
4551
|
+
method_url = "/instance_groups/%s/managers/%s/actions/%s" % [ERB::Util.url_encode(instance_group_id), ERB::Util.url_encode(instance_group_manager_id), ERB::Util.url_encode(id)]
|
4333
4552
|
|
4334
4553
|
response = request(
|
4335
4554
|
method: "GET",
|
@@ -4342,15 +4561,15 @@ module IbmVpc
|
|
4342
4561
|
end
|
4343
4562
|
|
4344
4563
|
##
|
4345
|
-
# @!method
|
4346
|
-
# Update specified instance group manager
|
4347
|
-
# This request updates an instance group manager
|
4564
|
+
# @!method update_instance_group_manager_action(instance_group_id:, instance_group_manager_id:, id:, instance_group_manager_action_patch:)
|
4565
|
+
# Update specified instance group manager action.
|
4566
|
+
# This request updates an instance group manager action.
|
4348
4567
|
# @param instance_group_id [String] The instance group identifier.
|
4349
4568
|
# @param instance_group_manager_id [String] The instance group manager identifier.
|
4350
|
-
# @param id [String] The instance group manager
|
4351
|
-
# @param
|
4569
|
+
# @param id [String] The instance group manager action identifier.
|
4570
|
+
# @param instance_group_manager_action_patch [Hash] The instance group manager action patch.
|
4352
4571
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
4353
|
-
def
|
4572
|
+
def update_instance_group_manager_action(instance_group_id:, instance_group_manager_id:, id:, instance_group_manager_action_patch:)
|
4354
4573
|
raise ArgumentError.new("version must be provided") if version.nil?
|
4355
4574
|
|
4356
4575
|
raise ArgumentError.new("generation must be provided") if generation.nil?
|
@@ -4361,11 +4580,11 @@ module IbmVpc
|
|
4361
4580
|
|
4362
4581
|
raise ArgumentError.new("id must be provided") if id.nil?
|
4363
4582
|
|
4364
|
-
raise ArgumentError.new("
|
4583
|
+
raise ArgumentError.new("instance_group_manager_action_patch must be provided") if instance_group_manager_action_patch.nil?
|
4365
4584
|
|
4366
4585
|
headers = {
|
4367
4586
|
}
|
4368
|
-
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "
|
4587
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_instance_group_manager_action")
|
4369
4588
|
headers.merge!(sdk_headers)
|
4370
4589
|
|
4371
4590
|
params = {
|
@@ -4373,10 +4592,10 @@ module IbmVpc
|
|
4373
4592
|
"generation" => @generation
|
4374
4593
|
}
|
4375
4594
|
|
4376
|
-
data =
|
4595
|
+
data = instance_group_manager_action_patch
|
4377
4596
|
headers["Content-Type"] = "application/merge-patch+json"
|
4378
4597
|
|
4379
|
-
method_url = "/instance_groups/%s/managers/%s/
|
4598
|
+
method_url = "/instance_groups/%s/managers/%s/actions/%s" % [ERB::Util.url_encode(instance_group_id), ERB::Util.url_encode(instance_group_manager_id), ERB::Util.url_encode(id)]
|
4380
4599
|
|
4381
4600
|
response = request(
|
4382
4601
|
method: "PATCH",
|
@@ -4390,59 +4609,69 @@ module IbmVpc
|
|
4390
4609
|
end
|
4391
4610
|
|
4392
4611
|
##
|
4393
|
-
# @!method
|
4394
|
-
#
|
4395
|
-
# This request
|
4396
|
-
# be reversed. reversed. Any memberships that have
|
4397
|
-
# `delete_instance_on_membership_delete` set to `true` will also have their
|
4398
|
-
# instances deleted.
|
4612
|
+
# @!method list_instance_group_manager_policies(instance_group_id:, instance_group_manager_id:, start: nil, limit: nil)
|
4613
|
+
# List all policies for an instance group manager.
|
4614
|
+
# This request lists all policies for an instance group manager.
|
4399
4615
|
# @param instance_group_id [String] The instance group identifier.
|
4400
|
-
# @
|
4401
|
-
|
4616
|
+
# @param instance_group_manager_id [String] The instance group manager identifier.
|
4617
|
+
# @param start [String] A server-provided token determining what resource to start the page on.
|
4618
|
+
# @param limit [Fixnum] The number of resources to return on a page.
|
4619
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
4620
|
+
def list_instance_group_manager_policies(instance_group_id:, instance_group_manager_id:, start: nil, limit: nil)
|
4402
4621
|
raise ArgumentError.new("version must be provided") if version.nil?
|
4403
4622
|
|
4404
4623
|
raise ArgumentError.new("generation must be provided") if generation.nil?
|
4405
4624
|
|
4406
4625
|
raise ArgumentError.new("instance_group_id must be provided") if instance_group_id.nil?
|
4407
4626
|
|
4627
|
+
raise ArgumentError.new("instance_group_manager_id must be provided") if instance_group_manager_id.nil?
|
4628
|
+
|
4408
4629
|
headers = {
|
4409
4630
|
}
|
4410
|
-
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "
|
4631
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_instance_group_manager_policies")
|
4411
4632
|
headers.merge!(sdk_headers)
|
4412
4633
|
|
4413
4634
|
params = {
|
4414
4635
|
"version" => @version,
|
4415
|
-
"generation" => @generation
|
4636
|
+
"generation" => @generation,
|
4637
|
+
"start" => start,
|
4638
|
+
"limit" => limit
|
4416
4639
|
}
|
4417
4640
|
|
4418
|
-
method_url = "/instance_groups/%s/
|
4641
|
+
method_url = "/instance_groups/%s/managers/%s/policies" % [ERB::Util.url_encode(instance_group_id), ERB::Util.url_encode(instance_group_manager_id)]
|
4419
4642
|
|
4420
|
-
request(
|
4421
|
-
method: "
|
4643
|
+
response = request(
|
4644
|
+
method: "GET",
|
4422
4645
|
url: method_url,
|
4423
4646
|
headers: headers,
|
4424
4647
|
params: params,
|
4425
|
-
accept_json:
|
4648
|
+
accept_json: true
|
4426
4649
|
)
|
4427
|
-
|
4650
|
+
response
|
4428
4651
|
end
|
4429
4652
|
|
4430
4653
|
##
|
4431
|
-
# @!method
|
4432
|
-
#
|
4433
|
-
# This request
|
4654
|
+
# @!method create_instance_group_manager_policy(instance_group_id:, instance_group_manager_id:, instance_group_manager_policy_prototype:)
|
4655
|
+
# Create a policy for an instance group manager.
|
4656
|
+
# This request creates a new instance group manager policy.
|
4434
4657
|
# @param instance_group_id [String] The instance group identifier.
|
4658
|
+
# @param instance_group_manager_id [String] The instance group manager identifier.
|
4659
|
+
# @param instance_group_manager_policy_prototype [InstanceGroupManagerPolicyPrototype] The instance group manager policy prototype object.
|
4435
4660
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
4436
|
-
def
|
4661
|
+
def create_instance_group_manager_policy(instance_group_id:, instance_group_manager_id:, instance_group_manager_policy_prototype:)
|
4437
4662
|
raise ArgumentError.new("version must be provided") if version.nil?
|
4438
4663
|
|
4439
4664
|
raise ArgumentError.new("generation must be provided") if generation.nil?
|
4440
4665
|
|
4441
4666
|
raise ArgumentError.new("instance_group_id must be provided") if instance_group_id.nil?
|
4442
4667
|
|
4668
|
+
raise ArgumentError.new("instance_group_manager_id must be provided") if instance_group_manager_id.nil?
|
4669
|
+
|
4670
|
+
raise ArgumentError.new("instance_group_manager_policy_prototype must be provided") if instance_group_manager_policy_prototype.nil?
|
4671
|
+
|
4443
4672
|
headers = {
|
4444
4673
|
}
|
4445
|
-
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "
|
4674
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_instance_group_manager_policy")
|
4446
4675
|
headers.merge!(sdk_headers)
|
4447
4676
|
|
4448
4677
|
params = {
|
@@ -4450,8 +4679,221 @@ module IbmVpc
|
|
4450
4679
|
"generation" => @generation
|
4451
4680
|
}
|
4452
4681
|
|
4453
|
-
|
4454
|
-
|
4682
|
+
data = instance_group_manager_policy_prototype
|
4683
|
+
headers["Content-Type"] = "application/json"
|
4684
|
+
|
4685
|
+
method_url = "/instance_groups/%s/managers/%s/policies" % [ERB::Util.url_encode(instance_group_id), ERB::Util.url_encode(instance_group_manager_id)]
|
4686
|
+
|
4687
|
+
response = request(
|
4688
|
+
method: "POST",
|
4689
|
+
url: method_url,
|
4690
|
+
headers: headers,
|
4691
|
+
params: params,
|
4692
|
+
data: data,
|
4693
|
+
accept_json: true
|
4694
|
+
)
|
4695
|
+
response
|
4696
|
+
end
|
4697
|
+
|
4698
|
+
##
|
4699
|
+
# @!method delete_instance_group_manager_policy(instance_group_id:, instance_group_manager_id:, id:)
|
4700
|
+
# Delete an instance group manager policy.
|
4701
|
+
# This request deletes an instance group manager policy. This operation cannot be
|
4702
|
+
# reversed.
|
4703
|
+
# @param instance_group_id [String] The instance group identifier.
|
4704
|
+
# @param instance_group_manager_id [String] The instance group manager identifier.
|
4705
|
+
# @param id [String] The instance group manager policy identifier.
|
4706
|
+
# @return [nil]
|
4707
|
+
def delete_instance_group_manager_policy(instance_group_id:, instance_group_manager_id:, id:)
|
4708
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
4709
|
+
|
4710
|
+
raise ArgumentError.new("generation must be provided") if generation.nil?
|
4711
|
+
|
4712
|
+
raise ArgumentError.new("instance_group_id must be provided") if instance_group_id.nil?
|
4713
|
+
|
4714
|
+
raise ArgumentError.new("instance_group_manager_id must be provided") if instance_group_manager_id.nil?
|
4715
|
+
|
4716
|
+
raise ArgumentError.new("id must be provided") if id.nil?
|
4717
|
+
|
4718
|
+
headers = {
|
4719
|
+
}
|
4720
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_instance_group_manager_policy")
|
4721
|
+
headers.merge!(sdk_headers)
|
4722
|
+
|
4723
|
+
params = {
|
4724
|
+
"version" => @version,
|
4725
|
+
"generation" => @generation
|
4726
|
+
}
|
4727
|
+
|
4728
|
+
method_url = "/instance_groups/%s/managers/%s/policies/%s" % [ERB::Util.url_encode(instance_group_id), ERB::Util.url_encode(instance_group_manager_id), ERB::Util.url_encode(id)]
|
4729
|
+
|
4730
|
+
request(
|
4731
|
+
method: "DELETE",
|
4732
|
+
url: method_url,
|
4733
|
+
headers: headers,
|
4734
|
+
params: params,
|
4735
|
+
accept_json: false
|
4736
|
+
)
|
4737
|
+
nil
|
4738
|
+
end
|
4739
|
+
|
4740
|
+
##
|
4741
|
+
# @!method get_instance_group_manager_policy(instance_group_id:, instance_group_manager_id:, id:)
|
4742
|
+
# Retrieve an instance group manager policy.
|
4743
|
+
# This request retrieves a single instance group manager policy specified by
|
4744
|
+
# identifier in the URL.
|
4745
|
+
# @param instance_group_id [String] The instance group identifier.
|
4746
|
+
# @param instance_group_manager_id [String] The instance group manager identifier.
|
4747
|
+
# @param id [String] The instance group manager policy identifier.
|
4748
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
4749
|
+
def get_instance_group_manager_policy(instance_group_id:, instance_group_manager_id:, id:)
|
4750
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
4751
|
+
|
4752
|
+
raise ArgumentError.new("generation must be provided") if generation.nil?
|
4753
|
+
|
4754
|
+
raise ArgumentError.new("instance_group_id must be provided") if instance_group_id.nil?
|
4755
|
+
|
4756
|
+
raise ArgumentError.new("instance_group_manager_id must be provided") if instance_group_manager_id.nil?
|
4757
|
+
|
4758
|
+
raise ArgumentError.new("id must be provided") if id.nil?
|
4759
|
+
|
4760
|
+
headers = {
|
4761
|
+
}
|
4762
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_instance_group_manager_policy")
|
4763
|
+
headers.merge!(sdk_headers)
|
4764
|
+
|
4765
|
+
params = {
|
4766
|
+
"version" => @version,
|
4767
|
+
"generation" => @generation
|
4768
|
+
}
|
4769
|
+
|
4770
|
+
method_url = "/instance_groups/%s/managers/%s/policies/%s" % [ERB::Util.url_encode(instance_group_id), ERB::Util.url_encode(instance_group_manager_id), ERB::Util.url_encode(id)]
|
4771
|
+
|
4772
|
+
response = request(
|
4773
|
+
method: "GET",
|
4774
|
+
url: method_url,
|
4775
|
+
headers: headers,
|
4776
|
+
params: params,
|
4777
|
+
accept_json: true
|
4778
|
+
)
|
4779
|
+
response
|
4780
|
+
end
|
4781
|
+
|
4782
|
+
##
|
4783
|
+
# @!method update_instance_group_manager_policy(instance_group_id:, instance_group_manager_id:, id:, instance_group_manager_policy_patch:)
|
4784
|
+
# Update an instance group manager policy.
|
4785
|
+
# This request updates an instance group manager policy.
|
4786
|
+
# @param instance_group_id [String] The instance group identifier.
|
4787
|
+
# @param instance_group_manager_id [String] The instance group manager identifier.
|
4788
|
+
# @param id [String] The instance group manager policy identifier.
|
4789
|
+
# @param instance_group_manager_policy_patch [Hash] The instance group manager policy patch.
|
4790
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
4791
|
+
def update_instance_group_manager_policy(instance_group_id:, instance_group_manager_id:, id:, instance_group_manager_policy_patch:)
|
4792
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
4793
|
+
|
4794
|
+
raise ArgumentError.new("generation must be provided") if generation.nil?
|
4795
|
+
|
4796
|
+
raise ArgumentError.new("instance_group_id must be provided") if instance_group_id.nil?
|
4797
|
+
|
4798
|
+
raise ArgumentError.new("instance_group_manager_id must be provided") if instance_group_manager_id.nil?
|
4799
|
+
|
4800
|
+
raise ArgumentError.new("id must be provided") if id.nil?
|
4801
|
+
|
4802
|
+
raise ArgumentError.new("instance_group_manager_policy_patch must be provided") if instance_group_manager_policy_patch.nil?
|
4803
|
+
|
4804
|
+
headers = {
|
4805
|
+
}
|
4806
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_instance_group_manager_policy")
|
4807
|
+
headers.merge!(sdk_headers)
|
4808
|
+
|
4809
|
+
params = {
|
4810
|
+
"version" => @version,
|
4811
|
+
"generation" => @generation
|
4812
|
+
}
|
4813
|
+
|
4814
|
+
data = instance_group_manager_policy_patch
|
4815
|
+
headers["Content-Type"] = "application/merge-patch+json"
|
4816
|
+
|
4817
|
+
method_url = "/instance_groups/%s/managers/%s/policies/%s" % [ERB::Util.url_encode(instance_group_id), ERB::Util.url_encode(instance_group_manager_id), ERB::Util.url_encode(id)]
|
4818
|
+
|
4819
|
+
response = request(
|
4820
|
+
method: "PATCH",
|
4821
|
+
url: method_url,
|
4822
|
+
headers: headers,
|
4823
|
+
params: params,
|
4824
|
+
data: data,
|
4825
|
+
accept_json: true
|
4826
|
+
)
|
4827
|
+
response
|
4828
|
+
end
|
4829
|
+
|
4830
|
+
##
|
4831
|
+
# @!method delete_instance_group_memberships(instance_group_id:)
|
4832
|
+
# Delete all memberships from an instance group.
|
4833
|
+
# This request deletes all memberships of an instance group. This operation cannot
|
4834
|
+
# be reversed. reversed. Any memberships that have
|
4835
|
+
# `delete_instance_on_membership_delete` set to `true` will also have their
|
4836
|
+
# instances deleted.
|
4837
|
+
# @param instance_group_id [String] The instance group identifier.
|
4838
|
+
# @return [nil]
|
4839
|
+
def delete_instance_group_memberships(instance_group_id:)
|
4840
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
4841
|
+
|
4842
|
+
raise ArgumentError.new("generation must be provided") if generation.nil?
|
4843
|
+
|
4844
|
+
raise ArgumentError.new("instance_group_id must be provided") if instance_group_id.nil?
|
4845
|
+
|
4846
|
+
headers = {
|
4847
|
+
}
|
4848
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_instance_group_memberships")
|
4849
|
+
headers.merge!(sdk_headers)
|
4850
|
+
|
4851
|
+
params = {
|
4852
|
+
"version" => @version,
|
4853
|
+
"generation" => @generation
|
4854
|
+
}
|
4855
|
+
|
4856
|
+
method_url = "/instance_groups/%s/memberships" % [ERB::Util.url_encode(instance_group_id)]
|
4857
|
+
|
4858
|
+
request(
|
4859
|
+
method: "DELETE",
|
4860
|
+
url: method_url,
|
4861
|
+
headers: headers,
|
4862
|
+
params: params,
|
4863
|
+
accept_json: false
|
4864
|
+
)
|
4865
|
+
nil
|
4866
|
+
end
|
4867
|
+
|
4868
|
+
##
|
4869
|
+
# @!method list_instance_group_memberships(instance_group_id:, start: nil, limit: nil)
|
4870
|
+
# List all memberships for an instance group.
|
4871
|
+
# This request lists all instance group memberships for an instance group.
|
4872
|
+
# @param instance_group_id [String] The instance group identifier.
|
4873
|
+
# @param start [String] A server-provided token determining what resource to start the page on.
|
4874
|
+
# @param limit [Fixnum] The number of resources to return on a page.
|
4875
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
4876
|
+
def list_instance_group_memberships(instance_group_id:, start: nil, limit: nil)
|
4877
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
4878
|
+
|
4879
|
+
raise ArgumentError.new("generation must be provided") if generation.nil?
|
4880
|
+
|
4881
|
+
raise ArgumentError.new("instance_group_id must be provided") if instance_group_id.nil?
|
4882
|
+
|
4883
|
+
headers = {
|
4884
|
+
}
|
4885
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_instance_group_memberships")
|
4886
|
+
headers.merge!(sdk_headers)
|
4887
|
+
|
4888
|
+
params = {
|
4889
|
+
"version" => @version,
|
4890
|
+
"generation" => @generation,
|
4891
|
+
"start" => start,
|
4892
|
+
"limit" => limit
|
4893
|
+
}
|
4894
|
+
|
4895
|
+
method_url = "/instance_groups/%s/memberships" % [ERB::Util.url_encode(instance_group_id)]
|
4896
|
+
|
4455
4897
|
response = request(
|
4456
4898
|
method: "GET",
|
4457
4899
|
url: method_url,
|
@@ -4464,7 +4906,7 @@ module IbmVpc
|
|
4464
4906
|
|
4465
4907
|
##
|
4466
4908
|
# @!method delete_instance_group_membership(instance_group_id:, id:)
|
4467
|
-
# Delete
|
4909
|
+
# Delete an instance group membership.
|
4468
4910
|
# This request deletes a memberships of an instance group. This operation cannot be
|
4469
4911
|
# reversed. reversed. If the membership has `delete_instance_on_membership_delete`
|
4470
4912
|
# set to `true`, the instance will also be deleted.
|
@@ -4504,7 +4946,7 @@ module IbmVpc
|
|
4504
4946
|
|
4505
4947
|
##
|
4506
4948
|
# @!method get_instance_group_membership(instance_group_id:, id:)
|
4507
|
-
# Retrieve
|
4949
|
+
# Retrieve an instance group membership.
|
4508
4950
|
# This request retrieves a single instance group membership specified by identifier
|
4509
4951
|
# in the URL.
|
4510
4952
|
# @param instance_group_id [String] The instance group identifier.
|
@@ -4543,7 +4985,7 @@ module IbmVpc
|
|
4543
4985
|
|
4544
4986
|
##
|
4545
4987
|
# @!method update_instance_group_membership(instance_group_id:, id:, instance_group_membership_patch:)
|
4546
|
-
# Update
|
4988
|
+
# Update an instance group membership.
|
4547
4989
|
# This request updates an instance group membership with the information provided
|
4548
4990
|
# instance group membership patch.
|
4549
4991
|
# @param instance_group_id [String] The instance group identifier.
|
@@ -4591,18 +5033,19 @@ module IbmVpc
|
|
4591
5033
|
#########################
|
4592
5034
|
|
4593
5035
|
##
|
4594
|
-
# @!method list_dedicated_host_groups(start: nil, limit: nil, resource_group_id: nil, zone_name: nil)
|
5036
|
+
# @!method list_dedicated_host_groups(start: nil, limit: nil, resource_group_id: nil, zone_name: nil, name: nil)
|
4595
5037
|
# List all dedicated host groups.
|
4596
5038
|
# This request lists all dedicated host groups in the region. Host groups are a
|
4597
5039
|
# collection of dedicated hosts for placement of instances. Each dedicated host must
|
4598
5040
|
# belong to one and only one group. Host groups do not span zones.
|
4599
|
-
# @param start [String] A server-
|
5041
|
+
# @param start [String] A server-provided token determining what resource to start the page on.
|
4600
5042
|
# @param limit [Fixnum] The number of resources to return on a page.
|
4601
|
-
# @param resource_group_id [String] Filters the collection to resources
|
4602
|
-
#
|
5043
|
+
# @param resource_group_id [String] Filters the collection to resources in the resource group with the specified
|
5044
|
+
# identifier.
|
4603
5045
|
# @param zone_name [String] Filters the collection to resources in the zone with the exact specified name.
|
5046
|
+
# @param name [String] Filters the collection to resources with the exact specified name.
|
4604
5047
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
4605
|
-
def list_dedicated_host_groups(start: nil, limit: nil, resource_group_id: nil, zone_name: nil)
|
5048
|
+
def list_dedicated_host_groups(start: nil, limit: nil, resource_group_id: nil, zone_name: nil, name: nil)
|
4606
5049
|
raise ArgumentError.new("version must be provided") if version.nil?
|
4607
5050
|
|
4608
5051
|
raise ArgumentError.new("generation must be provided") if generation.nil?
|
@@ -4618,7 +5061,8 @@ module IbmVpc
|
|
4618
5061
|
"start" => start,
|
4619
5062
|
"limit" => limit,
|
4620
5063
|
"resource_group.id" => resource_group_id,
|
4621
|
-
"zone.name" => zone_name
|
5064
|
+
"zone.name" => zone_name,
|
5065
|
+
"name" => name
|
4622
5066
|
}
|
4623
5067
|
|
4624
5068
|
method_url = "/dedicated_host/groups"
|
@@ -4639,7 +5083,7 @@ module IbmVpc
|
|
4639
5083
|
# This request creates a new dedicated host group.
|
4640
5084
|
# @param _class [String] The dedicated host profile class for hosts in this group.
|
4641
5085
|
# @param family [String] The dedicated host profile family for hosts in this group.
|
4642
|
-
# @param zone [ZoneIdentity] The zone
|
5086
|
+
# @param zone [ZoneIdentity] The zone this dedicated host group will reside in.
|
4643
5087
|
# @param name [String] The unique user-defined name for this dedicated host group. If unspecified, the
|
4644
5088
|
# name will be a hyphenated list of randomly-selected words.
|
4645
5089
|
# @param resource_group [ResourceGroupIdentity] The resource group to use. If unspecified, the account's [default resource
|
@@ -4683,7 +5127,7 @@ module IbmVpc
|
|
4683
5127
|
|
4684
5128
|
##
|
4685
5129
|
# @!method delete_dedicated_host_group(id:)
|
4686
|
-
# Delete
|
5130
|
+
# Delete a dedicated host group.
|
4687
5131
|
# This request deletes a dedicated host group.
|
4688
5132
|
# @param id [String] The dedicated host group identifier.
|
4689
5133
|
# @return [nil]
|
@@ -4754,7 +5198,7 @@ module IbmVpc
|
|
4754
5198
|
|
4755
5199
|
##
|
4756
5200
|
# @!method update_dedicated_host_group(id:, dedicated_host_group_patch:)
|
4757
|
-
# Update
|
5201
|
+
# Update a dedicated host group.
|
4758
5202
|
# This request updates a dedicated host group with the information in a provided
|
4759
5203
|
# dedicated host group patch. The dedicated host group patch object is structured in
|
4760
5204
|
# the same way as a retrieved dedicated host group and contains only the information
|
@@ -4800,10 +5244,10 @@ module IbmVpc
|
|
4800
5244
|
##
|
4801
5245
|
# @!method list_dedicated_host_profiles(start: nil, limit: nil)
|
4802
5246
|
# List all dedicated host profiles.
|
4803
|
-
# This request lists provisionable dedicated host profiles in the region. A
|
5247
|
+
# This request lists all provisionable dedicated host profiles in the region. A
|
4804
5248
|
# dedicated host profile specifies the hardware characteristics for a dedicated
|
4805
5249
|
# host.
|
4806
|
-
# @param start [String] A server-
|
5250
|
+
# @param start [String] A server-provided token determining what resource to start the page on.
|
4807
5251
|
# @param limit [Fixnum] The number of resources to return on a page.
|
4808
5252
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
4809
5253
|
def list_dedicated_host_profiles(start: nil, limit: nil)
|
@@ -4837,7 +5281,7 @@ module IbmVpc
|
|
4837
5281
|
|
4838
5282
|
##
|
4839
5283
|
# @!method get_dedicated_host_profile(name:)
|
4840
|
-
# Retrieve
|
5284
|
+
# Retrieve a dedicated host profile.
|
4841
5285
|
# This request retrieves a single dedicated host profile specified by the name in
|
4842
5286
|
# the URL.
|
4843
5287
|
# @param name [String] The dedicated host profile name.
|
@@ -4872,17 +5316,18 @@ module IbmVpc
|
|
4872
5316
|
end
|
4873
5317
|
|
4874
5318
|
##
|
4875
|
-
# @!method list_dedicated_hosts(dedicated_host_group_id: nil, start: nil, limit: nil, resource_group_id: nil, zone_name: nil)
|
5319
|
+
# @!method list_dedicated_hosts(dedicated_host_group_id: nil, start: nil, limit: nil, resource_group_id: nil, zone_name: nil, name: nil)
|
4876
5320
|
# List all dedicated hosts.
|
4877
|
-
# This request lists all dedicated hosts.
|
4878
|
-
# @param dedicated_host_group_id [String] Filters the collection to dedicated host groups with specified identifier.
|
4879
|
-
# @param start [String] A server-
|
5321
|
+
# This request lists all dedicated hosts in the region.
|
5322
|
+
# @param dedicated_host_group_id [String] Filters the collection to dedicated host groups with the specified identifier.
|
5323
|
+
# @param start [String] A server-provided token determining what resource to start the page on.
|
4880
5324
|
# @param limit [Fixnum] The number of resources to return on a page.
|
4881
|
-
# @param resource_group_id [String] Filters the collection to resources
|
4882
|
-
#
|
5325
|
+
# @param resource_group_id [String] Filters the collection to resources in the resource group with the specified
|
5326
|
+
# identifier.
|
4883
5327
|
# @param zone_name [String] Filters the collection to resources in the zone with the exact specified name.
|
5328
|
+
# @param name [String] Filters the collection to resources with the exact specified name.
|
4884
5329
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
4885
|
-
def list_dedicated_hosts(dedicated_host_group_id: nil, start: nil, limit: nil, resource_group_id: nil, zone_name: nil)
|
5330
|
+
def list_dedicated_hosts(dedicated_host_group_id: nil, start: nil, limit: nil, resource_group_id: nil, zone_name: nil, name: nil)
|
4886
5331
|
raise ArgumentError.new("version must be provided") if version.nil?
|
4887
5332
|
|
4888
5333
|
raise ArgumentError.new("generation must be provided") if generation.nil?
|
@@ -4899,7 +5344,8 @@ module IbmVpc
|
|
4899
5344
|
"start" => start,
|
4900
5345
|
"limit" => limit,
|
4901
5346
|
"resource_group.id" => resource_group_id,
|
4902
|
-
"zone.name" => zone_name
|
5347
|
+
"zone.name" => zone_name,
|
5348
|
+
"name" => name
|
4903
5349
|
}
|
4904
5350
|
|
4905
5351
|
method_url = "/dedicated_hosts"
|
@@ -4954,21 +5400,24 @@ module IbmVpc
|
|
4954
5400
|
end
|
4955
5401
|
|
4956
5402
|
##
|
4957
|
-
# @!method
|
4958
|
-
#
|
4959
|
-
# This request
|
4960
|
-
#
|
4961
|
-
#
|
4962
|
-
|
5403
|
+
# @!method list_dedicated_host_disks(dedicated_host_id:)
|
5404
|
+
# List all disks on a dedicated host.
|
5405
|
+
# This request lists all disks on a dedicated host. A disk is a physical device
|
5406
|
+
# that is locally attached to the compute node. By default, the listed disks are
|
5407
|
+
# sorted by their
|
5408
|
+
# `created_at` property values, with the newest disk first.
|
5409
|
+
# @param dedicated_host_id [String] The dedicated host identifier.
|
5410
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
5411
|
+
def list_dedicated_host_disks(dedicated_host_id:)
|
4963
5412
|
raise ArgumentError.new("version must be provided") if version.nil?
|
4964
5413
|
|
4965
5414
|
raise ArgumentError.new("generation must be provided") if generation.nil?
|
4966
5415
|
|
4967
|
-
raise ArgumentError.new("
|
5416
|
+
raise ArgumentError.new("dedicated_host_id must be provided") if dedicated_host_id.nil?
|
4968
5417
|
|
4969
5418
|
headers = {
|
4970
5419
|
}
|
4971
|
-
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "
|
5420
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_dedicated_host_disks")
|
4972
5421
|
headers.merge!(sdk_headers)
|
4973
5422
|
|
4974
5423
|
params = {
|
@@ -4976,35 +5425,38 @@ module IbmVpc
|
|
4976
5425
|
"generation" => @generation
|
4977
5426
|
}
|
4978
5427
|
|
4979
|
-
method_url = "/dedicated_hosts/%s" % [ERB::Util.url_encode(
|
5428
|
+
method_url = "/dedicated_hosts/%s/disks" % [ERB::Util.url_encode(dedicated_host_id)]
|
4980
5429
|
|
4981
|
-
request(
|
4982
|
-
method: "
|
5430
|
+
response = request(
|
5431
|
+
method: "GET",
|
4983
5432
|
url: method_url,
|
4984
5433
|
headers: headers,
|
4985
5434
|
params: params,
|
4986
|
-
accept_json:
|
5435
|
+
accept_json: true
|
4987
5436
|
)
|
4988
|
-
|
5437
|
+
response
|
4989
5438
|
end
|
4990
5439
|
|
4991
5440
|
##
|
4992
|
-
# @!method
|
4993
|
-
# Retrieve a dedicated host.
|
4994
|
-
# This request retrieves a single dedicated host specified by the
|
4995
|
-
# URL.
|
4996
|
-
# @param
|
5441
|
+
# @!method get_dedicated_host_disk(dedicated_host_id:, id:)
|
5442
|
+
# Retrieve a dedicated host disk.
|
5443
|
+
# This request retrieves a single dedicated host disk specified by the identifier in
|
5444
|
+
# the URL.
|
5445
|
+
# @param dedicated_host_id [String] The dedicated host identifier.
|
5446
|
+
# @param id [String] The dedicated host disk identifier.
|
4997
5447
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
4998
|
-
def
|
5448
|
+
def get_dedicated_host_disk(dedicated_host_id:, id:)
|
4999
5449
|
raise ArgumentError.new("version must be provided") if version.nil?
|
5000
5450
|
|
5001
5451
|
raise ArgumentError.new("generation must be provided") if generation.nil?
|
5002
5452
|
|
5453
|
+
raise ArgumentError.new("dedicated_host_id must be provided") if dedicated_host_id.nil?
|
5454
|
+
|
5003
5455
|
raise ArgumentError.new("id must be provided") if id.nil?
|
5004
5456
|
|
5005
5457
|
headers = {
|
5006
5458
|
}
|
5007
|
-
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "
|
5459
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_dedicated_host_disk")
|
5008
5460
|
headers.merge!(sdk_headers)
|
5009
5461
|
|
5010
5462
|
params = {
|
@@ -5012,7 +5464,7 @@ module IbmVpc
|
|
5012
5464
|
"generation" => @generation
|
5013
5465
|
}
|
5014
5466
|
|
5015
|
-
method_url = "/dedicated_hosts/%s" % [ERB::Util.url_encode(id)]
|
5467
|
+
method_url = "/dedicated_hosts/%s/disks/%s" % [ERB::Util.url_encode(dedicated_host_id), ERB::Util.url_encode(id)]
|
5016
5468
|
|
5017
5469
|
response = request(
|
5018
5470
|
method: "GET",
|
@@ -5025,26 +5477,28 @@ module IbmVpc
|
|
5025
5477
|
end
|
5026
5478
|
|
5027
5479
|
##
|
5028
|
-
# @!method
|
5029
|
-
# Update
|
5030
|
-
# This request updates
|
5031
|
-
#
|
5032
|
-
#
|
5033
|
-
# @param id [String] The dedicated host identifier.
|
5034
|
-
# @param
|
5480
|
+
# @!method update_dedicated_host_disk(dedicated_host_id:, id:, dedicated_host_disk_patch:)
|
5481
|
+
# Update a dedicated host disk.
|
5482
|
+
# This request updates the dedicated host disk with the information in a provided
|
5483
|
+
# patch.
|
5484
|
+
# @param dedicated_host_id [String] The dedicated host identifier.
|
5485
|
+
# @param id [String] The dedicated host disk identifier.
|
5486
|
+
# @param dedicated_host_disk_patch [Hash] The dedicated host disk patch.
|
5035
5487
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
5036
|
-
def
|
5488
|
+
def update_dedicated_host_disk(dedicated_host_id:, id:, dedicated_host_disk_patch:)
|
5037
5489
|
raise ArgumentError.new("version must be provided") if version.nil?
|
5038
5490
|
|
5039
5491
|
raise ArgumentError.new("generation must be provided") if generation.nil?
|
5040
5492
|
|
5493
|
+
raise ArgumentError.new("dedicated_host_id must be provided") if dedicated_host_id.nil?
|
5494
|
+
|
5041
5495
|
raise ArgumentError.new("id must be provided") if id.nil?
|
5042
5496
|
|
5043
|
-
raise ArgumentError.new("
|
5497
|
+
raise ArgumentError.new("dedicated_host_disk_patch must be provided") if dedicated_host_disk_patch.nil?
|
5044
5498
|
|
5045
5499
|
headers = {
|
5046
5500
|
}
|
5047
|
-
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "
|
5501
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_dedicated_host_disk")
|
5048
5502
|
headers.merge!(sdk_headers)
|
5049
5503
|
|
5050
5504
|
params = {
|
@@ -5052,10 +5506,334 @@ module IbmVpc
|
|
5052
5506
|
"generation" => @generation
|
5053
5507
|
}
|
5054
5508
|
|
5055
|
-
data =
|
5509
|
+
data = dedicated_host_disk_patch
|
5056
5510
|
headers["Content-Type"] = "application/merge-patch+json"
|
5057
5511
|
|
5058
|
-
method_url = "/dedicated_hosts/%s" % [ERB::Util.url_encode(id)]
|
5512
|
+
method_url = "/dedicated_hosts/%s/disks/%s" % [ERB::Util.url_encode(dedicated_host_id), ERB::Util.url_encode(id)]
|
5513
|
+
|
5514
|
+
response = request(
|
5515
|
+
method: "PATCH",
|
5516
|
+
url: method_url,
|
5517
|
+
headers: headers,
|
5518
|
+
params: params,
|
5519
|
+
data: data,
|
5520
|
+
accept_json: true
|
5521
|
+
)
|
5522
|
+
response
|
5523
|
+
end
|
5524
|
+
|
5525
|
+
##
|
5526
|
+
# @!method delete_dedicated_host(id:)
|
5527
|
+
# Delete a dedicated host.
|
5528
|
+
# This request deletes a dedicated host.
|
5529
|
+
# @param id [String] The dedicated host identifier.
|
5530
|
+
# @return [nil]
|
5531
|
+
def delete_dedicated_host(id:)
|
5532
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
5533
|
+
|
5534
|
+
raise ArgumentError.new("generation must be provided") if generation.nil?
|
5535
|
+
|
5536
|
+
raise ArgumentError.new("id must be provided") if id.nil?
|
5537
|
+
|
5538
|
+
headers = {
|
5539
|
+
}
|
5540
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_dedicated_host")
|
5541
|
+
headers.merge!(sdk_headers)
|
5542
|
+
|
5543
|
+
params = {
|
5544
|
+
"version" => @version,
|
5545
|
+
"generation" => @generation
|
5546
|
+
}
|
5547
|
+
|
5548
|
+
method_url = "/dedicated_hosts/%s" % [ERB::Util.url_encode(id)]
|
5549
|
+
|
5550
|
+
request(
|
5551
|
+
method: "DELETE",
|
5552
|
+
url: method_url,
|
5553
|
+
headers: headers,
|
5554
|
+
params: params,
|
5555
|
+
accept_json: false
|
5556
|
+
)
|
5557
|
+
nil
|
5558
|
+
end
|
5559
|
+
|
5560
|
+
##
|
5561
|
+
# @!method get_dedicated_host(id:)
|
5562
|
+
# Retrieve a dedicated host.
|
5563
|
+
# This request retrieves a single dedicated host specified by the identifiers in the
|
5564
|
+
# URL.
|
5565
|
+
# @param id [String] The dedicated host identifier.
|
5566
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
5567
|
+
def get_dedicated_host(id:)
|
5568
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
5569
|
+
|
5570
|
+
raise ArgumentError.new("generation must be provided") if generation.nil?
|
5571
|
+
|
5572
|
+
raise ArgumentError.new("id must be provided") if id.nil?
|
5573
|
+
|
5574
|
+
headers = {
|
5575
|
+
}
|
5576
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_dedicated_host")
|
5577
|
+
headers.merge!(sdk_headers)
|
5578
|
+
|
5579
|
+
params = {
|
5580
|
+
"version" => @version,
|
5581
|
+
"generation" => @generation
|
5582
|
+
}
|
5583
|
+
|
5584
|
+
method_url = "/dedicated_hosts/%s" % [ERB::Util.url_encode(id)]
|
5585
|
+
|
5586
|
+
response = request(
|
5587
|
+
method: "GET",
|
5588
|
+
url: method_url,
|
5589
|
+
headers: headers,
|
5590
|
+
params: params,
|
5591
|
+
accept_json: true
|
5592
|
+
)
|
5593
|
+
response
|
5594
|
+
end
|
5595
|
+
|
5596
|
+
##
|
5597
|
+
# @!method update_dedicated_host(id:, dedicated_host_patch:)
|
5598
|
+
# Update a dedicated host.
|
5599
|
+
# This request updates a dedicated host with the information in a provided dedicated
|
5600
|
+
# host patch. The dedicated host patch object is structured in the same way as a
|
5601
|
+
# retrieved dedicated host and contains only the information to be updated.
|
5602
|
+
# @param id [String] The dedicated host identifier.
|
5603
|
+
# @param dedicated_host_patch [Hash] The dedicated host patch.
|
5604
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
5605
|
+
def update_dedicated_host(id:, dedicated_host_patch:)
|
5606
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
5607
|
+
|
5608
|
+
raise ArgumentError.new("generation must be provided") if generation.nil?
|
5609
|
+
|
5610
|
+
raise ArgumentError.new("id must be provided") if id.nil?
|
5611
|
+
|
5612
|
+
raise ArgumentError.new("dedicated_host_patch must be provided") if dedicated_host_patch.nil?
|
5613
|
+
|
5614
|
+
headers = {
|
5615
|
+
}
|
5616
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_dedicated_host")
|
5617
|
+
headers.merge!(sdk_headers)
|
5618
|
+
|
5619
|
+
params = {
|
5620
|
+
"version" => @version,
|
5621
|
+
"generation" => @generation
|
5622
|
+
}
|
5623
|
+
|
5624
|
+
data = dedicated_host_patch
|
5625
|
+
headers["Content-Type"] = "application/merge-patch+json"
|
5626
|
+
|
5627
|
+
method_url = "/dedicated_hosts/%s" % [ERB::Util.url_encode(id)]
|
5628
|
+
|
5629
|
+
response = request(
|
5630
|
+
method: "PATCH",
|
5631
|
+
url: method_url,
|
5632
|
+
headers: headers,
|
5633
|
+
params: params,
|
5634
|
+
data: data,
|
5635
|
+
accept_json: true
|
5636
|
+
)
|
5637
|
+
response
|
5638
|
+
end
|
5639
|
+
#########################
|
5640
|
+
# Placement groups
|
5641
|
+
#########################
|
5642
|
+
|
5643
|
+
##
|
5644
|
+
# @!method list_placement_groups(start: nil, limit: nil)
|
5645
|
+
# List all placement groups.
|
5646
|
+
# This request lists all placement groups in the region.
|
5647
|
+
# @param start [String] A server-provided token determining what resource to start the page on.
|
5648
|
+
# @param limit [Fixnum] The number of resources to return on a page.
|
5649
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
5650
|
+
def list_placement_groups(start: nil, limit: nil)
|
5651
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
5652
|
+
|
5653
|
+
raise ArgumentError.new("generation must be provided") if generation.nil?
|
5654
|
+
|
5655
|
+
headers = {
|
5656
|
+
}
|
5657
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_placement_groups")
|
5658
|
+
headers.merge!(sdk_headers)
|
5659
|
+
|
5660
|
+
params = {
|
5661
|
+
"version" => @version,
|
5662
|
+
"generation" => @generation,
|
5663
|
+
"start" => start,
|
5664
|
+
"limit" => limit
|
5665
|
+
}
|
5666
|
+
|
5667
|
+
method_url = "/placement_groups"
|
5668
|
+
|
5669
|
+
response = request(
|
5670
|
+
method: "GET",
|
5671
|
+
url: method_url,
|
5672
|
+
headers: headers,
|
5673
|
+
params: params,
|
5674
|
+
accept_json: true
|
5675
|
+
)
|
5676
|
+
response
|
5677
|
+
end
|
5678
|
+
|
5679
|
+
##
|
5680
|
+
# @!method create_placement_group(strategy:, name: nil, resource_group: nil)
|
5681
|
+
# Create a placement group.
|
5682
|
+
# This request creates a new placement group.
|
5683
|
+
# @param strategy [String] The strategy for this placement group
|
5684
|
+
# - `host_spread`: place on different compute hosts
|
5685
|
+
# - `power_spread`: place on compute hosts that use different power sources
|
5686
|
+
#
|
5687
|
+
# The enumerated values for this property may expand in the future. When processing
|
5688
|
+
# this property, check for and log unknown values. Optionally halt processing and
|
5689
|
+
# surface the error, or bypass the placement group on which the unexpected strategy
|
5690
|
+
# was encountered.
|
5691
|
+
# @param name [String] The unique user-defined name for this placement group. If unspecified, the name
|
5692
|
+
# will be a hyphenated list of randomly-selected words.
|
5693
|
+
# @param resource_group [ResourceGroupIdentity] The resource group to use. If unspecified, the account's [default resource
|
5694
|
+
# group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
|
5695
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
5696
|
+
def create_placement_group(strategy:, name: nil, resource_group: nil)
|
5697
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
5698
|
+
|
5699
|
+
raise ArgumentError.new("generation must be provided") if generation.nil?
|
5700
|
+
|
5701
|
+
raise ArgumentError.new("strategy must be provided") if strategy.nil?
|
5702
|
+
|
5703
|
+
headers = {
|
5704
|
+
}
|
5705
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_placement_group")
|
5706
|
+
headers.merge!(sdk_headers)
|
5707
|
+
|
5708
|
+
params = {
|
5709
|
+
"version" => @version,
|
5710
|
+
"generation" => @generation
|
5711
|
+
}
|
5712
|
+
|
5713
|
+
data = {
|
5714
|
+
"strategy" => strategy,
|
5715
|
+
"name" => name,
|
5716
|
+
"resource_group" => resource_group
|
5717
|
+
}
|
5718
|
+
|
5719
|
+
method_url = "/placement_groups"
|
5720
|
+
|
5721
|
+
response = request(
|
5722
|
+
method: "POST",
|
5723
|
+
url: method_url,
|
5724
|
+
headers: headers,
|
5725
|
+
params: params,
|
5726
|
+
json: data,
|
5727
|
+
accept_json: true
|
5728
|
+
)
|
5729
|
+
response
|
5730
|
+
end
|
5731
|
+
|
5732
|
+
##
|
5733
|
+
# @!method delete_placement_group(id:)
|
5734
|
+
# Delete a placement group.
|
5735
|
+
# This request deletes a placement group. This operation cannot be reversed. For
|
5736
|
+
# this request to succeed, the placement group must not be associated with an
|
5737
|
+
# instance.
|
5738
|
+
# @param id [String] The placement group identifier.
|
5739
|
+
# @return [nil]
|
5740
|
+
def delete_placement_group(id:)
|
5741
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
5742
|
+
|
5743
|
+
raise ArgumentError.new("generation must be provided") if generation.nil?
|
5744
|
+
|
5745
|
+
raise ArgumentError.new("id must be provided") if id.nil?
|
5746
|
+
|
5747
|
+
headers = {
|
5748
|
+
}
|
5749
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_placement_group")
|
5750
|
+
headers.merge!(sdk_headers)
|
5751
|
+
|
5752
|
+
params = {
|
5753
|
+
"version" => @version,
|
5754
|
+
"generation" => @generation
|
5755
|
+
}
|
5756
|
+
|
5757
|
+
method_url = "/placement_groups/%s" % [ERB::Util.url_encode(id)]
|
5758
|
+
|
5759
|
+
request(
|
5760
|
+
method: "DELETE",
|
5761
|
+
url: method_url,
|
5762
|
+
headers: headers,
|
5763
|
+
params: params,
|
5764
|
+
accept_json: false
|
5765
|
+
)
|
5766
|
+
nil
|
5767
|
+
end
|
5768
|
+
|
5769
|
+
##
|
5770
|
+
# @!method get_placement_group(id:)
|
5771
|
+
# Retrieve a placement group.
|
5772
|
+
# This request retrieves a single placement group specified by identifier in the
|
5773
|
+
# URL.
|
5774
|
+
# @param id [String] The placement group identifier.
|
5775
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
5776
|
+
def get_placement_group(id:)
|
5777
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
5778
|
+
|
5779
|
+
raise ArgumentError.new("generation must be provided") if generation.nil?
|
5780
|
+
|
5781
|
+
raise ArgumentError.new("id must be provided") if id.nil?
|
5782
|
+
|
5783
|
+
headers = {
|
5784
|
+
}
|
5785
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_placement_group")
|
5786
|
+
headers.merge!(sdk_headers)
|
5787
|
+
|
5788
|
+
params = {
|
5789
|
+
"version" => @version,
|
5790
|
+
"generation" => @generation
|
5791
|
+
}
|
5792
|
+
|
5793
|
+
method_url = "/placement_groups/%s" % [ERB::Util.url_encode(id)]
|
5794
|
+
|
5795
|
+
response = request(
|
5796
|
+
method: "GET",
|
5797
|
+
url: method_url,
|
5798
|
+
headers: headers,
|
5799
|
+
params: params,
|
5800
|
+
accept_json: true
|
5801
|
+
)
|
5802
|
+
response
|
5803
|
+
end
|
5804
|
+
|
5805
|
+
##
|
5806
|
+
# @!method update_placement_group(id:, placement_group_patch:)
|
5807
|
+
# Update a placement group.
|
5808
|
+
# This request updates a placement group with the information provided placement
|
5809
|
+
# group patch. The placement group patch object is structured in the same way as a
|
5810
|
+
# retrieved placement group and contains only the information to be updated.
|
5811
|
+
# @param id [String] The placement group identifier.
|
5812
|
+
# @param placement_group_patch [Hash] The placement group patch.
|
5813
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
5814
|
+
def update_placement_group(id:, placement_group_patch:)
|
5815
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
5816
|
+
|
5817
|
+
raise ArgumentError.new("generation must be provided") if generation.nil?
|
5818
|
+
|
5819
|
+
raise ArgumentError.new("id must be provided") if id.nil?
|
5820
|
+
|
5821
|
+
raise ArgumentError.new("placement_group_patch must be provided") if placement_group_patch.nil?
|
5822
|
+
|
5823
|
+
headers = {
|
5824
|
+
}
|
5825
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_placement_group")
|
5826
|
+
headers.merge!(sdk_headers)
|
5827
|
+
|
5828
|
+
params = {
|
5829
|
+
"version" => @version,
|
5830
|
+
"generation" => @generation
|
5831
|
+
}
|
5832
|
+
|
5833
|
+
data = placement_group_patch
|
5834
|
+
headers["Content-Type"] = "application/merge-patch+json"
|
5835
|
+
|
5836
|
+
method_url = "/placement_groups/%s" % [ERB::Util.url_encode(id)]
|
5059
5837
|
|
5060
5838
|
response = request(
|
5061
5839
|
method: "PATCH",
|
@@ -5076,7 +5854,7 @@ module IbmVpc
|
|
5076
5854
|
# List all volume profiles.
|
5077
5855
|
# This request lists all volume profiles available in the region. A volume profile
|
5078
5856
|
# specifies the performance characteristics and pricing model for a volume.
|
5079
|
-
# @param start [String] A server-
|
5857
|
+
# @param start [String] A server-provided token determining what resource to start the page on.
|
5080
5858
|
# @param limit [Fixnum] The number of resources to return on a page.
|
5081
5859
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
5082
5860
|
def list_volume_profiles(start: nil, limit: nil)
|
@@ -5109,58 +5887,315 @@ module IbmVpc
|
|
5109
5887
|
end
|
5110
5888
|
|
5111
5889
|
##
|
5112
|
-
# @!method get_volume_profile(name:)
|
5113
|
-
# Retrieve
|
5114
|
-
# This request retrieves a single volume profile specified by the name in the URL.
|
5115
|
-
# @param name [String] The volume profile name.
|
5116
|
-
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
5117
|
-
def get_volume_profile(name:)
|
5890
|
+
# @!method get_volume_profile(name:)
|
5891
|
+
# Retrieve a volume profile.
|
5892
|
+
# This request retrieves a single volume profile specified by the name in the URL.
|
5893
|
+
# @param name [String] The volume profile name.
|
5894
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
5895
|
+
def get_volume_profile(name:)
|
5896
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
5897
|
+
|
5898
|
+
raise ArgumentError.new("generation must be provided") if generation.nil?
|
5899
|
+
|
5900
|
+
raise ArgumentError.new("name must be provided") if name.nil?
|
5901
|
+
|
5902
|
+
headers = {
|
5903
|
+
}
|
5904
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_volume_profile")
|
5905
|
+
headers.merge!(sdk_headers)
|
5906
|
+
|
5907
|
+
params = {
|
5908
|
+
"version" => @version,
|
5909
|
+
"generation" => @generation
|
5910
|
+
}
|
5911
|
+
|
5912
|
+
method_url = "/volume/profiles/%s" % [ERB::Util.url_encode(name)]
|
5913
|
+
|
5914
|
+
response = request(
|
5915
|
+
method: "GET",
|
5916
|
+
url: method_url,
|
5917
|
+
headers: headers,
|
5918
|
+
params: params,
|
5919
|
+
accept_json: true
|
5920
|
+
)
|
5921
|
+
response
|
5922
|
+
end
|
5923
|
+
|
5924
|
+
##
|
5925
|
+
# @!method list_volumes(start: nil, limit: nil, name: nil, zone_name: nil)
|
5926
|
+
# List all volumes.
|
5927
|
+
# This request lists all volumes in the region. Volumes are network-connected block
|
5928
|
+
# storage devices that may be attached to one or more instances in the same region.
|
5929
|
+
# @param start [String] A server-provided token determining what resource to start the page on.
|
5930
|
+
# @param limit [Fixnum] The number of resources to return on a page.
|
5931
|
+
# @param name [String] Filters the collection to resources with the exact specified name.
|
5932
|
+
# @param zone_name [String] Filters the collection to resources in the zone with the exact specified name.
|
5933
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
5934
|
+
def list_volumes(start: nil, limit: nil, name: nil, zone_name: nil)
|
5935
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
5936
|
+
|
5937
|
+
raise ArgumentError.new("generation must be provided") if generation.nil?
|
5938
|
+
|
5939
|
+
headers = {
|
5940
|
+
}
|
5941
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_volumes")
|
5942
|
+
headers.merge!(sdk_headers)
|
5943
|
+
|
5944
|
+
params = {
|
5945
|
+
"version" => @version,
|
5946
|
+
"generation" => @generation,
|
5947
|
+
"start" => start,
|
5948
|
+
"limit" => limit,
|
5949
|
+
"name" => name,
|
5950
|
+
"zone.name" => zone_name
|
5951
|
+
}
|
5952
|
+
|
5953
|
+
method_url = "/volumes"
|
5954
|
+
|
5955
|
+
response = request(
|
5956
|
+
method: "GET",
|
5957
|
+
url: method_url,
|
5958
|
+
headers: headers,
|
5959
|
+
params: params,
|
5960
|
+
accept_json: true
|
5961
|
+
)
|
5962
|
+
response
|
5963
|
+
end
|
5964
|
+
|
5965
|
+
##
|
5966
|
+
# @!method create_volume(volume_prototype:)
|
5967
|
+
# Create a volume.
|
5968
|
+
# This request creates a new volume from a volume prototype object. The prototype
|
5969
|
+
# object is structured in the same way as a retrieved volume, and contains the
|
5970
|
+
# information necessary to create the new volume.
|
5971
|
+
# @param volume_prototype [VolumePrototype] The volume prototype object.
|
5972
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
5973
|
+
def create_volume(volume_prototype:)
|
5974
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
5975
|
+
|
5976
|
+
raise ArgumentError.new("generation must be provided") if generation.nil?
|
5977
|
+
|
5978
|
+
raise ArgumentError.new("volume_prototype must be provided") if volume_prototype.nil?
|
5979
|
+
|
5980
|
+
headers = {
|
5981
|
+
}
|
5982
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_volume")
|
5983
|
+
headers.merge!(sdk_headers)
|
5984
|
+
|
5985
|
+
params = {
|
5986
|
+
"version" => @version,
|
5987
|
+
"generation" => @generation
|
5988
|
+
}
|
5989
|
+
|
5990
|
+
data = volume_prototype
|
5991
|
+
headers["Content-Type"] = "application/json"
|
5992
|
+
|
5993
|
+
method_url = "/volumes"
|
5994
|
+
|
5995
|
+
response = request(
|
5996
|
+
method: "POST",
|
5997
|
+
url: method_url,
|
5998
|
+
headers: headers,
|
5999
|
+
params: params,
|
6000
|
+
data: data,
|
6001
|
+
accept_json: true
|
6002
|
+
)
|
6003
|
+
response
|
6004
|
+
end
|
6005
|
+
|
6006
|
+
##
|
6007
|
+
# @!method delete_volume(id:)
|
6008
|
+
# Delete a volume.
|
6009
|
+
# This request deletes a volume. This operation cannot be reversed. For this request
|
6010
|
+
# to succeed, the volume must not be attached to any instances.
|
6011
|
+
# @param id [String] The volume identifier.
|
6012
|
+
# @return [nil]
|
6013
|
+
def delete_volume(id:)
|
6014
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
6015
|
+
|
6016
|
+
raise ArgumentError.new("generation must be provided") if generation.nil?
|
6017
|
+
|
6018
|
+
raise ArgumentError.new("id must be provided") if id.nil?
|
6019
|
+
|
6020
|
+
headers = {
|
6021
|
+
}
|
6022
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_volume")
|
6023
|
+
headers.merge!(sdk_headers)
|
6024
|
+
|
6025
|
+
params = {
|
6026
|
+
"version" => @version,
|
6027
|
+
"generation" => @generation
|
6028
|
+
}
|
6029
|
+
|
6030
|
+
method_url = "/volumes/%s" % [ERB::Util.url_encode(id)]
|
6031
|
+
|
6032
|
+
request(
|
6033
|
+
method: "DELETE",
|
6034
|
+
url: method_url,
|
6035
|
+
headers: headers,
|
6036
|
+
params: params,
|
6037
|
+
accept_json: false
|
6038
|
+
)
|
6039
|
+
nil
|
6040
|
+
end
|
6041
|
+
|
6042
|
+
##
|
6043
|
+
# @!method get_volume(id:)
|
6044
|
+
# Retrieve a volume.
|
6045
|
+
# This request retrieves a single volume specified by the identifier in the URL.
|
6046
|
+
# @param id [String] The volume identifier.
|
6047
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
6048
|
+
def get_volume(id:)
|
6049
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
6050
|
+
|
6051
|
+
raise ArgumentError.new("generation must be provided") if generation.nil?
|
6052
|
+
|
6053
|
+
raise ArgumentError.new("id must be provided") if id.nil?
|
6054
|
+
|
6055
|
+
headers = {
|
6056
|
+
}
|
6057
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_volume")
|
6058
|
+
headers.merge!(sdk_headers)
|
6059
|
+
|
6060
|
+
params = {
|
6061
|
+
"version" => @version,
|
6062
|
+
"generation" => @generation
|
6063
|
+
}
|
6064
|
+
|
6065
|
+
method_url = "/volumes/%s" % [ERB::Util.url_encode(id)]
|
6066
|
+
|
6067
|
+
response = request(
|
6068
|
+
method: "GET",
|
6069
|
+
url: method_url,
|
6070
|
+
headers: headers,
|
6071
|
+
params: params,
|
6072
|
+
accept_json: true
|
6073
|
+
)
|
6074
|
+
response
|
6075
|
+
end
|
6076
|
+
|
6077
|
+
##
|
6078
|
+
# @!method update_volume(id:, volume_patch:)
|
6079
|
+
# Update a volume.
|
6080
|
+
# This request updates a volume with the information in a provided volume patch. The
|
6081
|
+
# volume patch object is structured in the same way as a retrieved volume and
|
6082
|
+
# contains only the information to be updated.
|
6083
|
+
# @param id [String] The volume identifier.
|
6084
|
+
# @param volume_patch [Hash] The volume patch.
|
6085
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
6086
|
+
def update_volume(id:, volume_patch:)
|
6087
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
6088
|
+
|
6089
|
+
raise ArgumentError.new("generation must be provided") if generation.nil?
|
6090
|
+
|
6091
|
+
raise ArgumentError.new("id must be provided") if id.nil?
|
6092
|
+
|
6093
|
+
raise ArgumentError.new("volume_patch must be provided") if volume_patch.nil?
|
6094
|
+
|
6095
|
+
headers = {
|
6096
|
+
}
|
6097
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_volume")
|
6098
|
+
headers.merge!(sdk_headers)
|
6099
|
+
|
6100
|
+
params = {
|
6101
|
+
"version" => @version,
|
6102
|
+
"generation" => @generation
|
6103
|
+
}
|
6104
|
+
|
6105
|
+
data = volume_patch
|
6106
|
+
headers["Content-Type"] = "application/merge-patch+json"
|
6107
|
+
|
6108
|
+
method_url = "/volumes/%s" % [ERB::Util.url_encode(id)]
|
6109
|
+
|
6110
|
+
response = request(
|
6111
|
+
method: "PATCH",
|
6112
|
+
url: method_url,
|
6113
|
+
headers: headers,
|
6114
|
+
params: params,
|
6115
|
+
data: data,
|
6116
|
+
accept_json: true
|
6117
|
+
)
|
6118
|
+
response
|
6119
|
+
end
|
6120
|
+
#########################
|
6121
|
+
# Snapshots
|
6122
|
+
#########################
|
6123
|
+
|
6124
|
+
##
|
6125
|
+
# @!method delete_snapshots(source_volume_id:)
|
6126
|
+
# Delete a filtered collection of snapshots.
|
6127
|
+
# This request deletes all snapshots created from a specific source volume.
|
6128
|
+
# @param source_volume_id [String] Filters the collection to resources with the source volume with the specified
|
6129
|
+
# identifier.
|
6130
|
+
# @return [nil]
|
6131
|
+
def delete_snapshots(source_volume_id:)
|
5118
6132
|
raise ArgumentError.new("version must be provided") if version.nil?
|
5119
6133
|
|
5120
6134
|
raise ArgumentError.new("generation must be provided") if generation.nil?
|
5121
6135
|
|
5122
|
-
raise ArgumentError.new("
|
6136
|
+
raise ArgumentError.new("source_volume_id must be provided") if source_volume_id.nil?
|
5123
6137
|
|
5124
6138
|
headers = {
|
5125
6139
|
}
|
5126
|
-
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "
|
6140
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_snapshots")
|
5127
6141
|
headers.merge!(sdk_headers)
|
5128
6142
|
|
5129
6143
|
params = {
|
5130
6144
|
"version" => @version,
|
5131
|
-
"generation" => @generation
|
6145
|
+
"generation" => @generation,
|
6146
|
+
"source_volume.id" => source_volume_id
|
5132
6147
|
}
|
5133
6148
|
|
5134
|
-
method_url = "/
|
6149
|
+
method_url = "/snapshots"
|
5135
6150
|
|
5136
|
-
|
5137
|
-
method: "
|
6151
|
+
request(
|
6152
|
+
method: "DELETE",
|
5138
6153
|
url: method_url,
|
5139
6154
|
headers: headers,
|
5140
6155
|
params: params,
|
5141
|
-
accept_json:
|
6156
|
+
accept_json: false
|
5142
6157
|
)
|
5143
|
-
|
6158
|
+
nil
|
5144
6159
|
end
|
5145
6160
|
|
5146
6161
|
##
|
5147
|
-
# @!method
|
5148
|
-
# List all
|
5149
|
-
# This request lists all
|
5150
|
-
#
|
5151
|
-
# @param start [String] A server-
|
6162
|
+
# @!method list_snapshots(start: nil, limit: nil, resource_group_id: nil, name: nil, source_volume_id: nil, source_volume_crn: nil, source_image_id: nil, source_image_crn: nil, sort: nil)
|
6163
|
+
# List all snapshots.
|
6164
|
+
# This request lists all snapshots in the region. A snapshot preserves the data of a
|
6165
|
+
# volume at the time the snapshot is created.
|
6166
|
+
# @param start [String] A server-provided token determining what resource to start the page on.
|
5152
6167
|
# @param limit [Fixnum] The number of resources to return on a page.
|
6168
|
+
# @param resource_group_id [String] Filters the collection to resources in the resource group with the specified
|
6169
|
+
# identifier.
|
5153
6170
|
# @param name [String] Filters the collection to resources with the exact specified name.
|
5154
|
-
# @param
|
6171
|
+
# @param source_volume_id [String] Filters the collection to resources with the source volume with the specified
|
6172
|
+
# identifier.
|
6173
|
+
# @param source_volume_crn [String] Filters the collection to resources with the source volume with the specified CRN.
|
6174
|
+
# @param source_image_id [String] Filters the collection to resources with the source image with the specified
|
6175
|
+
# identifier.
|
6176
|
+
#
|
6177
|
+
# This parameter also supports the values `null` and `not:null` which filter the
|
6178
|
+
# collection to resources which have no source image or any existent source image,
|
6179
|
+
# respectively.
|
6180
|
+
# @param source_image_crn [String] Filters the collection to resources with the source volume with the specified CRN.
|
6181
|
+
#
|
6182
|
+
# This parameter also supports the values `null` and `not:null` which filter the
|
6183
|
+
# collection to resources which have no source image or any existent source image,
|
6184
|
+
# respectively.
|
6185
|
+
# @param sort [String] Sorts the returned collection by the specified property name in ascending order. A
|
6186
|
+
# `-` may be prepended to the name to sort in descending order. For example, the
|
6187
|
+
# value `-created_at` sorts the collection by the `created_at` property in
|
6188
|
+
# descending order, and the value `name` sorts it by the `name` property in
|
6189
|
+
# ascending order.
|
5155
6190
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
5156
|
-
def
|
6191
|
+
def list_snapshots(start: nil, limit: nil, resource_group_id: nil, name: nil, source_volume_id: nil, source_volume_crn: nil, source_image_id: nil, source_image_crn: nil, sort: nil)
|
5157
6192
|
raise ArgumentError.new("version must be provided") if version.nil?
|
5158
6193
|
|
5159
6194
|
raise ArgumentError.new("generation must be provided") if generation.nil?
|
5160
6195
|
|
5161
6196
|
headers = {
|
5162
6197
|
}
|
5163
|
-
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "
|
6198
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_snapshots")
|
5164
6199
|
headers.merge!(sdk_headers)
|
5165
6200
|
|
5166
6201
|
params = {
|
@@ -5168,11 +6203,16 @@ module IbmVpc
|
|
5168
6203
|
"generation" => @generation,
|
5169
6204
|
"start" => start,
|
5170
6205
|
"limit" => limit,
|
6206
|
+
"resource_group.id" => resource_group_id,
|
5171
6207
|
"name" => name,
|
5172
|
-
"
|
6208
|
+
"source_volume.id" => source_volume_id,
|
6209
|
+
"source_volume.crn" => source_volume_crn,
|
6210
|
+
"source_image.id" => source_image_id,
|
6211
|
+
"source_image.crn" => source_image_crn,
|
6212
|
+
"sort" => sort
|
5173
6213
|
}
|
5174
6214
|
|
5175
|
-
method_url = "/
|
6215
|
+
method_url = "/snapshots"
|
5176
6216
|
|
5177
6217
|
response = request(
|
5178
6218
|
method: "GET",
|
@@ -5185,23 +6225,27 @@ module IbmVpc
|
|
5185
6225
|
end
|
5186
6226
|
|
5187
6227
|
##
|
5188
|
-
# @!method
|
5189
|
-
# Create a
|
5190
|
-
# This request creates a new
|
5191
|
-
# object is structured in the same way as a retrieved
|
5192
|
-
# information necessary to
|
5193
|
-
# @param
|
6228
|
+
# @!method create_snapshot(source_volume:, name: nil, resource_group: nil)
|
6229
|
+
# Create a snapshot.
|
6230
|
+
# This request creates a new snapshot from a snapshot prototype object. The
|
6231
|
+
# prototype object is structured in the same way as a retrieved snapshot, and
|
6232
|
+
# contains the information necessary to provision the new snapshot.
|
6233
|
+
# @param source_volume [VolumeIdentity] The volume to snapshot.
|
6234
|
+
# @param name [String] The unique user-defined name for this snapshot. If unspecified, the name will be a
|
6235
|
+
# hyphenated list of randomly-selected words.
|
6236
|
+
# @param resource_group [ResourceGroupIdentity] The resource group to use. If unspecified, the account's [default resource
|
6237
|
+
# group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
|
5194
6238
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
5195
|
-
def
|
6239
|
+
def create_snapshot(source_volume:, name: nil, resource_group: nil)
|
5196
6240
|
raise ArgumentError.new("version must be provided") if version.nil?
|
5197
6241
|
|
5198
6242
|
raise ArgumentError.new("generation must be provided") if generation.nil?
|
5199
6243
|
|
5200
|
-
raise ArgumentError.new("
|
6244
|
+
raise ArgumentError.new("source_volume must be provided") if source_volume.nil?
|
5201
6245
|
|
5202
6246
|
headers = {
|
5203
6247
|
}
|
5204
|
-
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "
|
6248
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_snapshot")
|
5205
6249
|
headers.merge!(sdk_headers)
|
5206
6250
|
|
5207
6251
|
params = {
|
@@ -5209,30 +6253,32 @@ module IbmVpc
|
|
5209
6253
|
"generation" => @generation
|
5210
6254
|
}
|
5211
6255
|
|
5212
|
-
data =
|
5213
|
-
|
6256
|
+
data = {
|
6257
|
+
"source_volume" => source_volume,
|
6258
|
+
"name" => name,
|
6259
|
+
"resource_group" => resource_group
|
6260
|
+
}
|
5214
6261
|
|
5215
|
-
method_url = "/
|
6262
|
+
method_url = "/snapshots"
|
5216
6263
|
|
5217
6264
|
response = request(
|
5218
6265
|
method: "POST",
|
5219
6266
|
url: method_url,
|
5220
6267
|
headers: headers,
|
5221
6268
|
params: params,
|
5222
|
-
|
6269
|
+
json: data,
|
5223
6270
|
accept_json: true
|
5224
6271
|
)
|
5225
6272
|
response
|
5226
6273
|
end
|
5227
6274
|
|
5228
6275
|
##
|
5229
|
-
# @!method
|
5230
|
-
# Delete
|
5231
|
-
# This request deletes a
|
5232
|
-
#
|
5233
|
-
# @param id [String] The volume identifier.
|
6276
|
+
# @!method delete_snapshot(id:)
|
6277
|
+
# Delete a snapshot.
|
6278
|
+
# This request deletes a snapshot. This operation cannot be reversed.
|
6279
|
+
# @param id [String] The snapshot identifier.
|
5234
6280
|
# @return [nil]
|
5235
|
-
def
|
6281
|
+
def delete_snapshot(id:)
|
5236
6282
|
raise ArgumentError.new("version must be provided") if version.nil?
|
5237
6283
|
|
5238
6284
|
raise ArgumentError.new("generation must be provided") if generation.nil?
|
@@ -5241,7 +6287,7 @@ module IbmVpc
|
|
5241
6287
|
|
5242
6288
|
headers = {
|
5243
6289
|
}
|
5244
|
-
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "
|
6290
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_snapshot")
|
5245
6291
|
headers.merge!(sdk_headers)
|
5246
6292
|
|
5247
6293
|
params = {
|
@@ -5249,7 +6295,7 @@ module IbmVpc
|
|
5249
6295
|
"generation" => @generation
|
5250
6296
|
}
|
5251
6297
|
|
5252
|
-
method_url = "/
|
6298
|
+
method_url = "/snapshots/%s" % [ERB::Util.url_encode(id)]
|
5253
6299
|
|
5254
6300
|
request(
|
5255
6301
|
method: "DELETE",
|
@@ -5262,12 +6308,12 @@ module IbmVpc
|
|
5262
6308
|
end
|
5263
6309
|
|
5264
6310
|
##
|
5265
|
-
# @!method
|
5266
|
-
# Retrieve
|
5267
|
-
# This request retrieves a single
|
5268
|
-
# @param id [String] The
|
6311
|
+
# @!method get_snapshot(id:)
|
6312
|
+
# Retrieve a snapshot.
|
6313
|
+
# This request retrieves a single snapshot specified by the identifier in the URL.
|
6314
|
+
# @param id [String] The snapshot identifier.
|
5269
6315
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
5270
|
-
def
|
6316
|
+
def get_snapshot(id:)
|
5271
6317
|
raise ArgumentError.new("version must be provided") if version.nil?
|
5272
6318
|
|
5273
6319
|
raise ArgumentError.new("generation must be provided") if generation.nil?
|
@@ -5276,7 +6322,7 @@ module IbmVpc
|
|
5276
6322
|
|
5277
6323
|
headers = {
|
5278
6324
|
}
|
5279
|
-
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "
|
6325
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_snapshot")
|
5280
6326
|
headers.merge!(sdk_headers)
|
5281
6327
|
|
5282
6328
|
params = {
|
@@ -5284,7 +6330,7 @@ module IbmVpc
|
|
5284
6330
|
"generation" => @generation
|
5285
6331
|
}
|
5286
6332
|
|
5287
|
-
method_url = "/
|
6333
|
+
method_url = "/snapshots/%s" % [ERB::Util.url_encode(id)]
|
5288
6334
|
|
5289
6335
|
response = request(
|
5290
6336
|
method: "GET",
|
@@ -5297,26 +6343,24 @@ module IbmVpc
|
|
5297
6343
|
end
|
5298
6344
|
|
5299
6345
|
##
|
5300
|
-
# @!method
|
5301
|
-
# Update
|
5302
|
-
# This request updates a
|
5303
|
-
#
|
5304
|
-
#
|
5305
|
-
# @param id [String] The volume identifier.
|
5306
|
-
# @param volume_patch [Hash] The volume patch.
|
6346
|
+
# @!method update_snapshot(id:, snapshot_patch:)
|
6347
|
+
# Update a snapshot.
|
6348
|
+
# This request updates a snapshot's name.
|
6349
|
+
# @param id [String] The snapshot identifier.
|
6350
|
+
# @param snapshot_patch [Hash] The snapshot patch.
|
5307
6351
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
5308
|
-
def
|
6352
|
+
def update_snapshot(id:, snapshot_patch:)
|
5309
6353
|
raise ArgumentError.new("version must be provided") if version.nil?
|
5310
6354
|
|
5311
6355
|
raise ArgumentError.new("generation must be provided") if generation.nil?
|
5312
6356
|
|
5313
6357
|
raise ArgumentError.new("id must be provided") if id.nil?
|
5314
6358
|
|
5315
|
-
raise ArgumentError.new("
|
6359
|
+
raise ArgumentError.new("snapshot_patch must be provided") if snapshot_patch.nil?
|
5316
6360
|
|
5317
6361
|
headers = {
|
5318
6362
|
}
|
5319
|
-
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "
|
6363
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_snapshot")
|
5320
6364
|
headers.merge!(sdk_headers)
|
5321
6365
|
|
5322
6366
|
params = {
|
@@ -5324,10 +6368,10 @@ module IbmVpc
|
|
5324
6368
|
"generation" => @generation
|
5325
6369
|
}
|
5326
6370
|
|
5327
|
-
data =
|
6371
|
+
data = snapshot_patch
|
5328
6372
|
headers["Content-Type"] = "application/merge-patch+json"
|
5329
6373
|
|
5330
|
-
method_url = "/
|
6374
|
+
method_url = "/snapshots/%s" % [ERB::Util.url_encode(id)]
|
5331
6375
|
|
5332
6376
|
response = request(
|
5333
6377
|
method: "PATCH",
|
@@ -5497,13 +6541,14 @@ module IbmVpc
|
|
5497
6541
|
##
|
5498
6542
|
# @!method list_public_gateways(start: nil, limit: nil, resource_group_id: nil)
|
5499
6543
|
# List all public gateways.
|
5500
|
-
# This request lists all public gateways. A public gateway is a
|
5501
|
-
# device associated with a VPC, which allows access to the Internet.
|
5502
|
-
# gateway resides in a zone and can be connected to subnets in the same
|
5503
|
-
#
|
6544
|
+
# This request lists all public gateways in the region. A public gateway is a
|
6545
|
+
# virtual network device associated with a VPC, which allows access to the Internet.
|
6546
|
+
# A public gateway resides in a zone and can be connected to subnets in the same
|
6547
|
+
# zone only.
|
6548
|
+
# @param start [String] A server-provided token determining what resource to start the page on.
|
5504
6549
|
# @param limit [Fixnum] The number of resources to return on a page.
|
5505
|
-
# @param resource_group_id [String] Filters the collection to resources
|
5506
|
-
#
|
6550
|
+
# @param resource_group_id [String] Filters the collection to resources in the resource group with the specified
|
6551
|
+
# identifier.
|
5507
6552
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
5508
6553
|
def list_public_gateways(start: nil, limit: nil, resource_group_id: nil)
|
5509
6554
|
raise ArgumentError.new("version must be provided") if version.nil?
|
@@ -5547,7 +6592,7 @@ module IbmVpc
|
|
5547
6592
|
# gateway has been created, its floating IP cannot be unbound. A public gateway must
|
5548
6593
|
# be explicitly attached to each subnet it will provide connectivity for.
|
5549
6594
|
# @param vpc [VPCIdentity] The VPC this public gateway will serve.
|
5550
|
-
# @param zone [ZoneIdentity] The zone
|
6595
|
+
# @param zone [ZoneIdentity] The zone this public gateway will reside in.
|
5551
6596
|
# @param floating_ip [PublicGatewayFloatingIPPrototype]
|
5552
6597
|
# @param name [String] The user-defined name for this public gateway. Names must be unique within the VPC
|
5553
6598
|
# the public gateway resides in. If unspecified, the name will be a hyphenated list
|
@@ -5597,7 +6642,7 @@ module IbmVpc
|
|
5597
6642
|
|
5598
6643
|
##
|
5599
6644
|
# @!method delete_public_gateway(id:)
|
5600
|
-
# Delete
|
6645
|
+
# Delete a public gateway.
|
5601
6646
|
# This request deletes a public gateway. This operation cannot be reversed. For this
|
5602
6647
|
# request to succeed, the public gateway must not be attached to any subnets. The
|
5603
6648
|
# public gateway's floating IP will be automatically unbound. If the floating IP was
|
@@ -5635,7 +6680,7 @@ module IbmVpc
|
|
5635
6680
|
|
5636
6681
|
##
|
5637
6682
|
# @!method get_public_gateway(id:)
|
5638
|
-
# Retrieve
|
6683
|
+
# Retrieve a public gateway.
|
5639
6684
|
# This request retrieves a single public gateway specified by the identifier in the
|
5640
6685
|
# URL.
|
5641
6686
|
# @param id [String] The public gateway identifier.
|
@@ -5671,7 +6716,7 @@ module IbmVpc
|
|
5671
6716
|
|
5672
6717
|
##
|
5673
6718
|
# @!method update_public_gateway(id:, public_gateway_patch:)
|
5674
|
-
# Update a public gateway
|
6719
|
+
# Update a public gateway.
|
5675
6720
|
# This request updates a public gateway's name.
|
5676
6721
|
# @param id [String] The public gateway identifier.
|
5677
6722
|
# @param public_gateway_patch [Hash] The public gateway patch.
|
@@ -5717,12 +6762,12 @@ module IbmVpc
|
|
5717
6762
|
##
|
5718
6763
|
# @!method list_floating_ips(start: nil, limit: nil, resource_group_id: nil)
|
5719
6764
|
# List all floating IPs.
|
5720
|
-
# This request
|
5721
|
-
#
|
5722
|
-
# @param start [String] A server-
|
6765
|
+
# This request lists all floating IPs in the region. Floating IPs allow inbound and
|
6766
|
+
# outbound traffic from the Internet to an instance.
|
6767
|
+
# @param start [String] A server-provided token determining what resource to start the page on.
|
5723
6768
|
# @param limit [Fixnum] The number of resources to return on a page.
|
5724
|
-
# @param resource_group_id [String] Filters the collection to resources
|
5725
|
-
#
|
6769
|
+
# @param resource_group_id [String] Filters the collection to resources in the resource group with the specified
|
6770
|
+
# identifier.
|
5726
6771
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
5727
6772
|
def list_floating_ips(start: nil, limit: nil, resource_group_id: nil)
|
5728
6773
|
raise ArgumentError.new("version must be provided") if version.nil?
|
@@ -5795,7 +6840,7 @@ module IbmVpc
|
|
5795
6840
|
|
5796
6841
|
##
|
5797
6842
|
# @!method delete_floating_ip(id:)
|
5798
|
-
# Release
|
6843
|
+
# Release a floating IP.
|
5799
6844
|
# This request disassociates (if associated) and releases a floating IP. This
|
5800
6845
|
# operation cannot be reversed. For this request to succeed, the floating IP must
|
5801
6846
|
# not be required by another resource, such as a public gateway.
|
@@ -5832,7 +6877,7 @@ module IbmVpc
|
|
5832
6877
|
|
5833
6878
|
##
|
5834
6879
|
# @!method get_floating_ip(id:)
|
5835
|
-
# Retrieve
|
6880
|
+
# Retrieve a floating IP.
|
5836
6881
|
# This request retrieves a single floating IP specified by the identifier in the
|
5837
6882
|
# URL.
|
5838
6883
|
# @param id [String] The floating IP identifier.
|
@@ -5868,7 +6913,7 @@ module IbmVpc
|
|
5868
6913
|
|
5869
6914
|
##
|
5870
6915
|
# @!method update_floating_ip(id:, floating_ip_patch:)
|
5871
|
-
# Update
|
6916
|
+
# Update a floating IP.
|
5872
6917
|
# This request updates a floating IP's name and/or target.
|
5873
6918
|
# @param id [String] The floating IP identifier.
|
5874
6919
|
# @param floating_ip_patch [Hash] The floating IP patch.
|
@@ -5918,10 +6963,10 @@ module IbmVpc
|
|
5918
6963
|
# packet filtering (5-tuple) rules for all traffic in and out of a subnet. Both
|
5919
6964
|
# allow and deny rules can be defined, and rules are stateless such that reverse
|
5920
6965
|
# traffic in response to allowed traffic is not automatically permitted.
|
5921
|
-
# @param start [String] A server-
|
6966
|
+
# @param start [String] A server-provided token determining what resource to start the page on.
|
5922
6967
|
# @param limit [Fixnum] The number of resources to return on a page.
|
5923
|
-
# @param resource_group_id [String] Filters the collection to resources
|
5924
|
-
#
|
6968
|
+
# @param resource_group_id [String] Filters the collection to resources in the resource group with the specified
|
6969
|
+
# identifier.
|
5925
6970
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
5926
6971
|
def list_network_acls(start: nil, limit: nil, resource_group_id: nil)
|
5927
6972
|
raise ArgumentError.new("version must be provided") if version.nil?
|
@@ -5994,7 +7039,7 @@ module IbmVpc
|
|
5994
7039
|
|
5995
7040
|
##
|
5996
7041
|
# @!method delete_network_acl(id:)
|
5997
|
-
# Delete
|
7042
|
+
# Delete a network ACL.
|
5998
7043
|
# This request deletes a network ACL. This operation cannot be reversed. For this
|
5999
7044
|
# request to succeed, the network ACL must not be the default network ACL for any
|
6000
7045
|
# VPCs, and the network ACL must not be attached to any subnets.
|
@@ -6031,7 +7076,7 @@ module IbmVpc
|
|
6031
7076
|
|
6032
7077
|
##
|
6033
7078
|
# @!method get_network_acl(id:)
|
6034
|
-
# Retrieve
|
7079
|
+
# Retrieve a network ACL.
|
6035
7080
|
# This request retrieves a single network ACL specified by the identifier in the
|
6036
7081
|
# URL.
|
6037
7082
|
# @param id [String] The network ACL identifier.
|
@@ -6114,7 +7159,7 @@ module IbmVpc
|
|
6114
7159
|
# traffic between a source CIDR block and a destination CIDR block over a particular
|
6115
7160
|
# protocol and port range.
|
6116
7161
|
# @param network_acl_id [String] The network ACL identifier.
|
6117
|
-
# @param start [String] A server-
|
7162
|
+
# @param start [String] A server-provided token determining what resource to start the page on.
|
6118
7163
|
# @param limit [Fixnum] The number of resources to return on a page.
|
6119
7164
|
# @param direction [String] Filters the collection to rules with the specified direction.
|
6120
7165
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
@@ -6152,7 +7197,7 @@ module IbmVpc
|
|
6152
7197
|
|
6153
7198
|
##
|
6154
7199
|
# @!method create_network_acl_rule(network_acl_id:, network_acl_rule_prototype:)
|
6155
|
-
# Create a rule.
|
7200
|
+
# Create a rule for a network ACL.
|
6156
7201
|
# This request creates a new rule from a network ACL rule prototype object. The
|
6157
7202
|
# prototype object is structured in the same way as a retrieved rule, and contains
|
6158
7203
|
# the information necessary to create the new rule.
|
@@ -6196,7 +7241,7 @@ module IbmVpc
|
|
6196
7241
|
|
6197
7242
|
##
|
6198
7243
|
# @!method delete_network_acl_rule(network_acl_id:, id:)
|
6199
|
-
# Delete
|
7244
|
+
# Delete a network ACL rule.
|
6200
7245
|
# This request deletes a rule. This operation cannot be reversed.
|
6201
7246
|
# @param network_acl_id [String] The network ACL identifier.
|
6202
7247
|
# @param id [String] The rule identifier.
|
@@ -6234,7 +7279,7 @@ module IbmVpc
|
|
6234
7279
|
|
6235
7280
|
##
|
6236
7281
|
# @!method get_network_acl_rule(network_acl_id:, id:)
|
6237
|
-
# Retrieve
|
7282
|
+
# Retrieve a network ACL rule.
|
6238
7283
|
# This request retrieves a single rule specified by the identifier in the URL.
|
6239
7284
|
# @param network_acl_id [String] The network ACL identifier.
|
6240
7285
|
# @param id [String] The rule identifier.
|
@@ -6272,7 +7317,7 @@ module IbmVpc
|
|
6272
7317
|
|
6273
7318
|
##
|
6274
7319
|
# @!method update_network_acl_rule(network_acl_id:, id:, network_acl_rule_patch:)
|
6275
|
-
# Update a rule.
|
7320
|
+
# Update a network ACL rule.
|
6276
7321
|
# This request updates a rule with the information in a provided rule patch. The
|
6277
7322
|
# rule patch object contains only the information to be updated. The request will
|
6278
7323
|
# fail if the information is not applicable to the rule's protocol.
|
@@ -6323,16 +7368,16 @@ module IbmVpc
|
|
6323
7368
|
##
|
6324
7369
|
# @!method list_security_groups(start: nil, limit: nil, resource_group_id: nil, vpc_id: nil, vpc_crn: nil, vpc_name: nil)
|
6325
7370
|
# List all security groups.
|
6326
|
-
# This request lists all
|
6327
|
-
#
|
6328
|
-
#
|
6329
|
-
#
|
6330
|
-
#
|
6331
|
-
#
|
6332
|
-
# @param start [String] A server-
|
7371
|
+
# This request lists all security groups in the region. Security groups provide a
|
7372
|
+
# way to apply IP filtering rules to instances in the associated VPC. With security
|
7373
|
+
# groups, all traffic is denied by default, and rules added to security groups
|
7374
|
+
# define which traffic the security group permits. Security group rules are stateful
|
7375
|
+
# such that reverse traffic in response to allowed traffic is automatically
|
7376
|
+
# permitted.
|
7377
|
+
# @param start [String] A server-provided token determining what resource to start the page on.
|
6333
7378
|
# @param limit [Fixnum] The number of resources to return on a page.
|
6334
|
-
# @param resource_group_id [String] Filters the collection to resources
|
6335
|
-
#
|
7379
|
+
# @param resource_group_id [String] Filters the collection to resources in the resource group with the specified
|
7380
|
+
# identifier.
|
6336
7381
|
# @param vpc_id [String] Filters the collection to resources in the VPC with the specified identifier.
|
6337
7382
|
# @param vpc_crn [String] Filters the collection to resources in the VPC with the specified CRN.
|
6338
7383
|
# @param vpc_name [String] Filters the collection to resources in the VPC with the exact specified name.
|
@@ -6385,8 +7430,8 @@ module IbmVpc
|
|
6385
7430
|
# the security group resides in.
|
6386
7431
|
# @param resource_group [ResourceGroupIdentity] The resource group to use. If unspecified, the account's [default resource
|
6387
7432
|
# group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
|
6388
|
-
# @param rules [Array[SecurityGroupRulePrototype]]
|
6389
|
-
#
|
7433
|
+
# @param rules [Array[SecurityGroupRulePrototype]] The prototype objects for rules to be created for this security group. If
|
7434
|
+
# unspecified, no rules will be created, resulting in all traffic being denied.
|
6390
7435
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
6391
7436
|
def create_security_group(vpc:, name: nil, resource_group: nil, rules: nil)
|
6392
7437
|
raise ArgumentError.new("version must be provided") if version.nil?
|
@@ -6545,11 +7590,11 @@ module IbmVpc
|
|
6545
7590
|
|
6546
7591
|
##
|
6547
7592
|
# @!method list_security_group_network_interfaces(security_group_id:, start: nil, limit: nil)
|
6548
|
-
# List a security group
|
6549
|
-
# This request lists all network interfaces associated with
|
7593
|
+
# List all network interfaces associated with a security group.
|
7594
|
+
# This request lists all network interfaces associated with a security group, to
|
6550
7595
|
# which the rules in the security group are applied.
|
6551
7596
|
# @param security_group_id [String] The security group identifier.
|
6552
|
-
# @param start [String] A server-
|
7597
|
+
# @param start [String] A server-provided token determining what resource to start the page on.
|
6553
7598
|
# @param limit [Fixnum] The number of resources to return on a page.
|
6554
7599
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
6555
7600
|
def list_security_group_network_interfaces(security_group_id:, start: nil, limit: nil)
|
@@ -6671,7 +7716,7 @@ module IbmVpc
|
|
6671
7716
|
# This request adds an existing network interface to an existing security group.
|
6672
7717
|
# When a network interface is added to a security group, the security group rules
|
6673
7718
|
# are applied to the network interface. A request body is not required, and if
|
6674
|
-
#
|
7719
|
+
# provided, is ignored.
|
6675
7720
|
# @param security_group_id [String] The security group identifier.
|
6676
7721
|
# @param id [String] The network interface identifier.
|
6677
7722
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
@@ -6708,11 +7753,10 @@ module IbmVpc
|
|
6708
7753
|
|
6709
7754
|
##
|
6710
7755
|
# @!method list_security_group_rules(security_group_id:)
|
6711
|
-
# List all
|
6712
|
-
# This request lists all
|
6713
|
-
#
|
6714
|
-
#
|
6715
|
-
# automatically permitted.
|
7756
|
+
# List all rules in a security group.
|
7757
|
+
# This request lists all rules in a security group. These rules define what traffic
|
7758
|
+
# the security group permits. Security group rules are stateful, such that reverse
|
7759
|
+
# traffic in response to allowed traffic is automatically permitted.
|
6716
7760
|
# @param security_group_id [String] The security group identifier.
|
6717
7761
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
6718
7762
|
def list_security_group_rules(security_group_id:)
|
@@ -6746,7 +7790,7 @@ module IbmVpc
|
|
6746
7790
|
|
6747
7791
|
##
|
6748
7792
|
# @!method create_security_group_rule(security_group_id:, security_group_rule_prototype:)
|
6749
|
-
# Create a security group
|
7793
|
+
# Create a rule for a security group.
|
6750
7794
|
# This request creates a new security group rule from a security group rule
|
6751
7795
|
# prototype object. The prototype object is structured in the same way as a
|
6752
7796
|
# retrieved security group rule and contains the information necessary to create the
|
@@ -6919,6 +7963,176 @@ module IbmVpc
|
|
6919
7963
|
)
|
6920
7964
|
response
|
6921
7965
|
end
|
7966
|
+
|
7967
|
+
##
|
7968
|
+
# @!method list_security_group_targets(security_group_id:, start: nil, limit: nil)
|
7969
|
+
# List all targets associated with a security group.
|
7970
|
+
# This request lists all targets associated with a security group, to which the
|
7971
|
+
# rules in the security group are applied.
|
7972
|
+
# @param security_group_id [String] The security group identifier.
|
7973
|
+
# @param start [String] A server-provided token determining what resource to start the page on.
|
7974
|
+
# @param limit [Fixnum] The number of resources to return on a page.
|
7975
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
7976
|
+
def list_security_group_targets(security_group_id:, start: nil, limit: nil)
|
7977
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
7978
|
+
|
7979
|
+
raise ArgumentError.new("generation must be provided") if generation.nil?
|
7980
|
+
|
7981
|
+
raise ArgumentError.new("security_group_id must be provided") if security_group_id.nil?
|
7982
|
+
|
7983
|
+
headers = {
|
7984
|
+
}
|
7985
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_security_group_targets")
|
7986
|
+
headers.merge!(sdk_headers)
|
7987
|
+
|
7988
|
+
params = {
|
7989
|
+
"version" => @version,
|
7990
|
+
"generation" => @generation,
|
7991
|
+
"start" => start,
|
7992
|
+
"limit" => limit
|
7993
|
+
}
|
7994
|
+
|
7995
|
+
method_url = "/security_groups/%s/targets" % [ERB::Util.url_encode(security_group_id)]
|
7996
|
+
|
7997
|
+
response = request(
|
7998
|
+
method: "GET",
|
7999
|
+
url: method_url,
|
8000
|
+
headers: headers,
|
8001
|
+
params: params,
|
8002
|
+
accept_json: true
|
8003
|
+
)
|
8004
|
+
response
|
8005
|
+
end
|
8006
|
+
|
8007
|
+
##
|
8008
|
+
# @!method delete_security_group_target_binding(security_group_id:, id:)
|
8009
|
+
# Remove a target from a security group.
|
8010
|
+
# This request removes a target from a security group. For this request to succeed,
|
8011
|
+
# the target must be attached to at least one other security group. The specified
|
8012
|
+
# target identifier can be:
|
8013
|
+
#
|
8014
|
+
# - A network interface identifier
|
8015
|
+
# - An application load balancer identifier
|
8016
|
+
#
|
8017
|
+
# Security groups are stateful, so any changes to a target's security groups are
|
8018
|
+
# applied to new connections. Existing connections are not affected.
|
8019
|
+
# @param security_group_id [String] The security group identifier.
|
8020
|
+
# @param id [String] The security group target identifier.
|
8021
|
+
# @return [nil]
|
8022
|
+
def delete_security_group_target_binding(security_group_id:, id:)
|
8023
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
8024
|
+
|
8025
|
+
raise ArgumentError.new("generation must be provided") if generation.nil?
|
8026
|
+
|
8027
|
+
raise ArgumentError.new("security_group_id must be provided") if security_group_id.nil?
|
8028
|
+
|
8029
|
+
raise ArgumentError.new("id must be provided") if id.nil?
|
8030
|
+
|
8031
|
+
headers = {
|
8032
|
+
}
|
8033
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_security_group_target_binding")
|
8034
|
+
headers.merge!(sdk_headers)
|
8035
|
+
|
8036
|
+
params = {
|
8037
|
+
"version" => @version,
|
8038
|
+
"generation" => @generation
|
8039
|
+
}
|
8040
|
+
|
8041
|
+
method_url = "/security_groups/%s/targets/%s" % [ERB::Util.url_encode(security_group_id), ERB::Util.url_encode(id)]
|
8042
|
+
|
8043
|
+
request(
|
8044
|
+
method: "DELETE",
|
8045
|
+
url: method_url,
|
8046
|
+
headers: headers,
|
8047
|
+
params: params,
|
8048
|
+
accept_json: false
|
8049
|
+
)
|
8050
|
+
nil
|
8051
|
+
end
|
8052
|
+
|
8053
|
+
##
|
8054
|
+
# @!method get_security_group_target(security_group_id:, id:)
|
8055
|
+
# Retrieve a security group target.
|
8056
|
+
# This request retrieves a single target specified by the identifier in the URL
|
8057
|
+
# path. The target must be an existing target of the security group.
|
8058
|
+
# @param security_group_id [String] The security group identifier.
|
8059
|
+
# @param id [String] The security group target identifier.
|
8060
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
8061
|
+
def get_security_group_target(security_group_id:, id:)
|
8062
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
8063
|
+
|
8064
|
+
raise ArgumentError.new("generation must be provided") if generation.nil?
|
8065
|
+
|
8066
|
+
raise ArgumentError.new("security_group_id must be provided") if security_group_id.nil?
|
8067
|
+
|
8068
|
+
raise ArgumentError.new("id must be provided") if id.nil?
|
8069
|
+
|
8070
|
+
headers = {
|
8071
|
+
}
|
8072
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_security_group_target")
|
8073
|
+
headers.merge!(sdk_headers)
|
8074
|
+
|
8075
|
+
params = {
|
8076
|
+
"version" => @version,
|
8077
|
+
"generation" => @generation
|
8078
|
+
}
|
8079
|
+
|
8080
|
+
method_url = "/security_groups/%s/targets/%s" % [ERB::Util.url_encode(security_group_id), ERB::Util.url_encode(id)]
|
8081
|
+
|
8082
|
+
response = request(
|
8083
|
+
method: "GET",
|
8084
|
+
url: method_url,
|
8085
|
+
headers: headers,
|
8086
|
+
params: params,
|
8087
|
+
accept_json: true
|
8088
|
+
)
|
8089
|
+
response
|
8090
|
+
end
|
8091
|
+
|
8092
|
+
##
|
8093
|
+
# @!method create_security_group_target_binding(security_group_id:, id:)
|
8094
|
+
# Add a target to a security group.
|
8095
|
+
# This request adds a resource to an existing security group. The specified target
|
8096
|
+
# identifier can be:
|
8097
|
+
#
|
8098
|
+
# - A network interface identifier
|
8099
|
+
# - An application load balancer identifier
|
8100
|
+
#
|
8101
|
+
# When a target is added to a security group, the security group rules are applied
|
8102
|
+
# to the target. A request body is not required, and if provided, is ignored.
|
8103
|
+
# @param security_group_id [String] The security group identifier.
|
8104
|
+
# @param id [String] The security group target identifier.
|
8105
|
+
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
8106
|
+
def create_security_group_target_binding(security_group_id:, id:)
|
8107
|
+
raise ArgumentError.new("version must be provided") if version.nil?
|
8108
|
+
|
8109
|
+
raise ArgumentError.new("generation must be provided") if generation.nil?
|
8110
|
+
|
8111
|
+
raise ArgumentError.new("security_group_id must be provided") if security_group_id.nil?
|
8112
|
+
|
8113
|
+
raise ArgumentError.new("id must be provided") if id.nil?
|
8114
|
+
|
8115
|
+
headers = {
|
8116
|
+
}
|
8117
|
+
sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_security_group_target_binding")
|
8118
|
+
headers.merge!(sdk_headers)
|
8119
|
+
|
8120
|
+
params = {
|
8121
|
+
"version" => @version,
|
8122
|
+
"generation" => @generation
|
8123
|
+
}
|
8124
|
+
|
8125
|
+
method_url = "/security_groups/%s/targets/%s" % [ERB::Util.url_encode(security_group_id), ERB::Util.url_encode(id)]
|
8126
|
+
|
8127
|
+
response = request(
|
8128
|
+
method: "PUT",
|
8129
|
+
url: method_url,
|
8130
|
+
headers: headers,
|
8131
|
+
params: params,
|
8132
|
+
accept_json: true
|
8133
|
+
)
|
8134
|
+
response
|
8135
|
+
end
|
6922
8136
|
#########################
|
6923
8137
|
# VPN gateways
|
6924
8138
|
#########################
|
@@ -6926,9 +8140,8 @@ module IbmVpc
|
|
6926
8140
|
##
|
6927
8141
|
# @!method list_ike_policies(start: nil, limit: nil)
|
6928
8142
|
# List all IKE policies.
|
6929
|
-
# This request
|
6930
|
-
#
|
6931
|
-
# @param start [String] A server-supplied token determining what resource to start the page on.
|
8143
|
+
# This request lists all IKE policies in the region.
|
8144
|
+
# @param start [String] A server-provided token determining what resource to start the page on.
|
6932
8145
|
# @param limit [Fixnum] The number of resources to return on a page.
|
6933
8146
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
6934
8147
|
def list_ike_policies(start: nil, limit: nil)
|
@@ -7022,7 +8235,9 @@ module IbmVpc
|
|
7022
8235
|
##
|
7023
8236
|
# @!method delete_ike_policy(id:)
|
7024
8237
|
# Delete an IKE policy.
|
7025
|
-
# This request deletes an IKE policy. This operation cannot be reversed.
|
8238
|
+
# This request deletes an IKE policy. This operation cannot be reversed. For this
|
8239
|
+
# request to succeed, there must not be any VPN gateway connections using this
|
8240
|
+
# policy.
|
7026
8241
|
# @param id [String] The IKE policy identifier.
|
7027
8242
|
# @return [nil]
|
7028
8243
|
def delete_ike_policy(id:)
|
@@ -7056,7 +8271,7 @@ module IbmVpc
|
|
7056
8271
|
|
7057
8272
|
##
|
7058
8273
|
# @!method get_ike_policy(id:)
|
7059
|
-
# Retrieve
|
8274
|
+
# Retrieve an IKE policy.
|
7060
8275
|
# This request retrieves a single IKE policy specified by the identifier in the URL.
|
7061
8276
|
# @param id [String] The IKE policy identifier.
|
7062
8277
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
@@ -7133,8 +8348,8 @@ module IbmVpc
|
|
7133
8348
|
|
7134
8349
|
##
|
7135
8350
|
# @!method list_ike_policy_connections(id:)
|
7136
|
-
# List all connections that use
|
7137
|
-
# This request lists all
|
8351
|
+
# List all VPN gateway connections that use a specified IKE policy.
|
8352
|
+
# This request lists all VPN gateway connections that use a policy.
|
7138
8353
|
# @param id [String] The IKE policy identifier.
|
7139
8354
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
7140
8355
|
def list_ike_policy_connections(id:)
|
@@ -7169,9 +8384,8 @@ module IbmVpc
|
|
7169
8384
|
##
|
7170
8385
|
# @!method list_ipsec_policies(start: nil, limit: nil)
|
7171
8386
|
# List all IPsec policies.
|
7172
|
-
# This request
|
7173
|
-
#
|
7174
|
-
# @param start [String] A server-supplied token determining what resource to start the page on.
|
8387
|
+
# This request lists all IPsec policies in the region.
|
8388
|
+
# @param start [String] A server-provided token determining what resource to start the page on.
|
7175
8389
|
# @param limit [Fixnum] The number of resources to return on a page.
|
7176
8390
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
7177
8391
|
def list_ipsec_policies(start: nil, limit: nil)
|
@@ -7261,7 +8475,9 @@ module IbmVpc
|
|
7261
8475
|
##
|
7262
8476
|
# @!method delete_ipsec_policy(id:)
|
7263
8477
|
# Delete an IPsec policy.
|
7264
|
-
# This request deletes an IPsec policy. This operation cannot be reversed.
|
8478
|
+
# This request deletes an IPsec policy. This operation cannot be reversed. For this
|
8479
|
+
# request to succeed, there must not be any VPN gateway connections using this
|
8480
|
+
# policy.
|
7265
8481
|
# @param id [String] The IPsec policy identifier.
|
7266
8482
|
# @return [nil]
|
7267
8483
|
def delete_ipsec_policy(id:)
|
@@ -7295,7 +8511,7 @@ module IbmVpc
|
|
7295
8511
|
|
7296
8512
|
##
|
7297
8513
|
# @!method get_ipsec_policy(id:)
|
7298
|
-
# Retrieve
|
8514
|
+
# Retrieve an IPsec policy.
|
7299
8515
|
# This request retrieves a single IPsec policy specified by the identifier in the
|
7300
8516
|
# URL.
|
7301
8517
|
# @param id [String] The IPsec policy identifier.
|
@@ -7373,8 +8589,8 @@ module IbmVpc
|
|
7373
8589
|
|
7374
8590
|
##
|
7375
8591
|
# @!method list_ipsec_policy_connections(id:)
|
7376
|
-
# List all connections that use
|
7377
|
-
# This request lists all
|
8592
|
+
# List all VPN gateway connections that use a specified IPsec policy.
|
8593
|
+
# This request lists all VPN gateway connections that use a policy.
|
7378
8594
|
# @param id [String] The IPsec policy identifier.
|
7379
8595
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
7380
8596
|
def list_ipsec_policy_connections(id:)
|
@@ -7409,12 +8625,11 @@ module IbmVpc
|
|
7409
8625
|
##
|
7410
8626
|
# @!method list_vpn_gateways(start: nil, limit: nil, resource_group_id: nil, mode: nil)
|
7411
8627
|
# List all VPN gateways.
|
7412
|
-
# This request
|
7413
|
-
#
|
7414
|
-
# @param start [String] A server-supplied token determining what resource to start the page on.
|
8628
|
+
# This request lists all VPN gateways in the region.
|
8629
|
+
# @param start [String] A server-provided token determining what resource to start the page on.
|
7415
8630
|
# @param limit [Fixnum] The number of resources to return on a page.
|
7416
|
-
# @param resource_group_id [String] Filters the collection to resources
|
7417
|
-
#
|
8631
|
+
# @param resource_group_id [String] Filters the collection to resources in the resource group with the specified
|
8632
|
+
# identifier.
|
7418
8633
|
# @param mode [String] Filters the collection to VPN gateways with the specified mode.
|
7419
8634
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
7420
8635
|
def list_vpn_gateways(start: nil, limit: nil, resource_group_id: nil, mode: nil)
|
@@ -7490,9 +8705,10 @@ module IbmVpc
|
|
7490
8705
|
##
|
7491
8706
|
# @!method delete_vpn_gateway(id:)
|
7492
8707
|
# Delete a VPN gateway.
|
7493
|
-
# This request deletes a VPN gateway.
|
7494
|
-
#
|
7495
|
-
#
|
8708
|
+
# This request deletes a VPN gateway. This operation cannot be reversed. For this
|
8709
|
+
# request to succeed, the VPN gateway must not have a `status` of `pending`, and
|
8710
|
+
# there must not be any VPC routes using the VPN gateway's connections as a next
|
8711
|
+
# hop.
|
7496
8712
|
# @param id [String] The VPN gateway identifier.
|
7497
8713
|
# @return [nil]
|
7498
8714
|
def delete_vpn_gateway(id:)
|
@@ -7526,7 +8742,7 @@ module IbmVpc
|
|
7526
8742
|
|
7527
8743
|
##
|
7528
8744
|
# @!method get_vpn_gateway(id:)
|
7529
|
-
# Retrieve
|
8745
|
+
# Retrieve a VPN gateway.
|
7530
8746
|
# This request retrieves a single VPN gateway specified by the identifier in the
|
7531
8747
|
# URL.
|
7532
8748
|
# @param id [String] The VPN gateway identifier.
|
@@ -7605,7 +8821,7 @@ module IbmVpc
|
|
7605
8821
|
##
|
7606
8822
|
# @!method list_vpn_gateway_connections(vpn_gateway_id:, status: nil)
|
7607
8823
|
# List all connections of a VPN gateway.
|
7608
|
-
# This request lists all
|
8824
|
+
# This request lists all connections of a VPN gateway.
|
7609
8825
|
# @param vpn_gateway_id [String] The VPN gateway identifier.
|
7610
8826
|
# @param status [String] Filters the collection to VPN gateway connections with the specified status.
|
7611
8827
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
@@ -7641,7 +8857,7 @@ module IbmVpc
|
|
7641
8857
|
|
7642
8858
|
##
|
7643
8859
|
# @!method create_vpn_gateway_connection(vpn_gateway_id:, vpn_gateway_connection_prototype:)
|
7644
|
-
# Create a VPN gateway
|
8860
|
+
# Create a connection for a VPN gateway.
|
7645
8861
|
# This request creates a new VPN gateway connection.
|
7646
8862
|
# @param vpn_gateway_id [String] The VPN gateway identifier.
|
7647
8863
|
# @param vpn_gateway_connection_prototype [VPNGatewayConnectionPrototype] The VPN gateway connection prototype object.
|
@@ -7685,6 +8901,8 @@ module IbmVpc
|
|
7685
8901
|
# @!method delete_vpn_gateway_connection(vpn_gateway_id:, id:)
|
7686
8902
|
# Delete a VPN gateway connection.
|
7687
8903
|
# This request deletes a VPN gateway connection. This operation cannot be reversed.
|
8904
|
+
# For this request to succeed, there must not be VPC routes using this VPN
|
8905
|
+
# connection as a next hop.
|
7688
8906
|
# @param vpn_gateway_id [String] The VPN gateway identifier.
|
7689
8907
|
# @param id [String] The VPN gateway connection identifier.
|
7690
8908
|
# @return [nil]
|
@@ -7721,7 +8939,7 @@ module IbmVpc
|
|
7721
8939
|
|
7722
8940
|
##
|
7723
8941
|
# @!method get_vpn_gateway_connection(vpn_gateway_id:, id:)
|
7724
|
-
# Retrieve
|
8942
|
+
# Retrieve a VPN gateway connection.
|
7725
8943
|
# This request retrieves a single VPN gateway connection specified by the identifier
|
7726
8944
|
# in the URL.
|
7727
8945
|
# @param vpn_gateway_id [String] The VPN gateway identifier.
|
@@ -7806,8 +9024,7 @@ module IbmVpc
|
|
7806
9024
|
##
|
7807
9025
|
# @!method list_vpn_gateway_connection_local_cidrs(vpn_gateway_id:, id:)
|
7808
9026
|
# List all local CIDRs for a VPN gateway connection.
|
7809
|
-
# This request lists all local CIDRs for a VPN gateway connection
|
7810
|
-
# identifier in the URL.
|
9027
|
+
# This request lists all local CIDRs for a VPN gateway connection.
|
7811
9028
|
# @param vpn_gateway_id [String] The VPN gateway identifier.
|
7812
9029
|
# @param id [String] The VPN gateway connection identifier.
|
7813
9030
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
@@ -7935,7 +9152,7 @@ module IbmVpc
|
|
7935
9152
|
# @!method add_vpn_gateway_connection_local_cidr(vpn_gateway_id:, id:, cidr_prefix:, prefix_length:)
|
7936
9153
|
# Set a local CIDR on a VPN gateway connection.
|
7937
9154
|
# This request adds the specified CIDR to the specified VPN gateway connection. A
|
7938
|
-
# request body is not required, and if
|
9155
|
+
# request body is not required, and if provided, is ignored. This request succeeds
|
7939
9156
|
# if the CIDR already exists on the specified VPN gateway connection.
|
7940
9157
|
# @param vpn_gateway_id [String] The VPN gateway identifier.
|
7941
9158
|
# @param id [String] The VPN gateway connection identifier.
|
@@ -7980,8 +9197,7 @@ module IbmVpc
|
|
7980
9197
|
##
|
7981
9198
|
# @!method list_vpn_gateway_connection_peer_cidrs(vpn_gateway_id:, id:)
|
7982
9199
|
# List all peer CIDRs for a VPN gateway connection.
|
7983
|
-
# This request lists all peer CIDRs for a VPN gateway connection
|
7984
|
-
# identifier in the URL.
|
9200
|
+
# This request lists all peer CIDRs for a VPN gateway connection.
|
7985
9201
|
# @param vpn_gateway_id [String] The VPN gateway identifier.
|
7986
9202
|
# @param id [String] The VPN gateway connection identifier.
|
7987
9203
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
@@ -8109,7 +9325,7 @@ module IbmVpc
|
|
8109
9325
|
# @!method add_vpn_gateway_connection_peer_cidr(vpn_gateway_id:, id:, cidr_prefix:, prefix_length:)
|
8110
9326
|
# Set a peer CIDR on a VPN gateway connection.
|
8111
9327
|
# This request adds the specified CIDR to the specified VPN gateway connection. A
|
8112
|
-
# request body is not required, and if
|
9328
|
+
# request body is not required, and if provided, is ignored. This request succeeds
|
8113
9329
|
# if the CIDR already exists on the specified VPN gateway connection.
|
8114
9330
|
# @param vpn_gateway_id [String] The VPN gateway identifier.
|
8115
9331
|
# @param id [String] The VPN gateway connection identifier.
|
@@ -8160,7 +9376,7 @@ module IbmVpc
|
|
8160
9376
|
# This request lists all load balancer profiles available in the region. A load
|
8161
9377
|
# balancer profile specifies the performance characteristics and pricing model for a
|
8162
9378
|
# load balancer.
|
8163
|
-
# @param start [String] A server-
|
9379
|
+
# @param start [String] A server-provided token determining what resource to start the page on.
|
8164
9380
|
# @param limit [Fixnum] The number of resources to return on a page.
|
8165
9381
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
8166
9382
|
def list_load_balancer_profiles(start: nil, limit: nil)
|
@@ -8194,7 +9410,7 @@ module IbmVpc
|
|
8194
9410
|
|
8195
9411
|
##
|
8196
9412
|
# @!method get_load_balancer_profile(name:)
|
8197
|
-
# Retrieve
|
9413
|
+
# Retrieve a load balancer profile.
|
8198
9414
|
# This request retrieves a load balancer profile specified by the name in the URL.
|
8199
9415
|
# @param name [String] The load balancer profile name.
|
8200
9416
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
@@ -8228,12 +9444,13 @@ module IbmVpc
|
|
8228
9444
|
end
|
8229
9445
|
|
8230
9446
|
##
|
8231
|
-
# @!method list_load_balancers
|
9447
|
+
# @!method list_load_balancers(start: nil, limit: nil)
|
8232
9448
|
# List all load balancers.
|
8233
|
-
# This request
|
8234
|
-
#
|
9449
|
+
# This request lists all load balancers in the region.
|
9450
|
+
# @param start [String] A server-provided token determining what resource to start the page on.
|
9451
|
+
# @param limit [Fixnum] The number of resources to return on a page.
|
8235
9452
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
8236
|
-
def list_load_balancers
|
9453
|
+
def list_load_balancers(start: nil, limit: nil)
|
8237
9454
|
raise ArgumentError.new("version must be provided") if version.nil?
|
8238
9455
|
|
8239
9456
|
raise ArgumentError.new("generation must be provided") if generation.nil?
|
@@ -8245,7 +9462,9 @@ module IbmVpc
|
|
8245
9462
|
|
8246
9463
|
params = {
|
8247
9464
|
"version" => @version,
|
8248
|
-
"generation" => @generation
|
9465
|
+
"generation" => @generation,
|
9466
|
+
"start" => start,
|
9467
|
+
"limit" => limit
|
8249
9468
|
}
|
8250
9469
|
|
8251
9470
|
method_url = "/load_balancers"
|
@@ -8261,10 +9480,12 @@ module IbmVpc
|
|
8261
9480
|
end
|
8262
9481
|
|
8263
9482
|
##
|
8264
|
-
# @!method create_load_balancer(is_public:, subnets:, listeners: nil, logging: nil, name: nil, pools: nil, profile: nil, resource_group: nil)
|
8265
|
-
# Create
|
9483
|
+
# @!method create_load_balancer(is_public:, subnets:, listeners: nil, logging: nil, name: nil, pools: nil, profile: nil, resource_group: nil, route_mode: nil, security_groups: nil)
|
9484
|
+
# Create a load balancer.
|
8266
9485
|
# This request creates and provisions a new load balancer.
|
8267
9486
|
# @param is_public [Boolean] Indicates whether this load balancer is public or private.
|
9487
|
+
#
|
9488
|
+
# At present, if route mode is enabled, the load balancer must be private.
|
8268
9489
|
# @param subnets [Array[SubnetIdentity]] The subnets to provision this load balancer.
|
8269
9490
|
# @param listeners [Array[LoadBalancerListenerPrototypeLoadBalancerContext]] The listeners of this load balancer.
|
8270
9491
|
# @param logging [LoadBalancerLogging] The logging configuration to use for this load balancer. See [VPC Datapath
|
@@ -8279,8 +9500,14 @@ module IbmVpc
|
|
8279
9500
|
# @param profile [LoadBalancerProfileIdentity] The profile to use for this load balancer.
|
8280
9501
|
# @param resource_group [ResourceGroupIdentity] The resource group to use. If unspecified, the account's [default resource
|
8281
9502
|
# group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
|
9503
|
+
# @param route_mode [Boolean] Indicates whether route mode is enabled for this load balancer.
|
9504
|
+
#
|
9505
|
+
# At present, public load balancers are not supported with route mode enabled.
|
9506
|
+
# @param security_groups [Array[SecurityGroupIdentity]] The security groups to use for this load balancer.
|
9507
|
+
#
|
9508
|
+
# The load balancer profile must support security groups.
|
8282
9509
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
8283
|
-
def create_load_balancer(is_public:, subnets:, listeners: nil, logging: nil, name: nil, pools: nil, profile: nil, resource_group: nil)
|
9510
|
+
def create_load_balancer(is_public:, subnets:, listeners: nil, logging: nil, name: nil, pools: nil, profile: nil, resource_group: nil, route_mode: nil, security_groups: nil)
|
8284
9511
|
raise ArgumentError.new("version must be provided") if version.nil?
|
8285
9512
|
|
8286
9513
|
raise ArgumentError.new("generation must be provided") if generation.nil?
|
@@ -8307,7 +9534,9 @@ module IbmVpc
|
|
8307
9534
|
"name" => name,
|
8308
9535
|
"pools" => pools,
|
8309
9536
|
"profile" => profile,
|
8310
|
-
"resource_group" => resource_group
|
9537
|
+
"resource_group" => resource_group,
|
9538
|
+
"route_mode" => route_mode,
|
9539
|
+
"security_groups" => security_groups
|
8311
9540
|
}
|
8312
9541
|
|
8313
9542
|
method_url = "/load_balancers"
|
@@ -8438,9 +9667,8 @@ module IbmVpc
|
|
8438
9667
|
|
8439
9668
|
##
|
8440
9669
|
# @!method get_load_balancer_statistics(id:)
|
8441
|
-
# List statistics of a load balancer.
|
8442
|
-
# This request lists statistics of a load balancer
|
8443
|
-
# the URL path.
|
9670
|
+
# List all statistics of a load balancer.
|
9671
|
+
# This request lists statistics of a load balancer.
|
8444
9672
|
# @param id [String] The load balancer identifier.
|
8445
9673
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
8446
9674
|
def get_load_balancer_statistics(id:)
|
@@ -8474,8 +9702,8 @@ module IbmVpc
|
|
8474
9702
|
|
8475
9703
|
##
|
8476
9704
|
# @!method list_load_balancer_listeners(load_balancer_id:)
|
8477
|
-
# List all listeners
|
8478
|
-
# This request
|
9705
|
+
# List all listeners for a load balancer.
|
9706
|
+
# This request lists all listeners for a load balancer.
|
8479
9707
|
# @param load_balancer_id [String] The load balancer identifier.
|
8480
9708
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
8481
9709
|
def list_load_balancer_listeners(load_balancer_id:)
|
@@ -8508,19 +9736,25 @@ module IbmVpc
|
|
8508
9736
|
end
|
8509
9737
|
|
8510
9738
|
##
|
8511
|
-
# @!method create_load_balancer_listener(load_balancer_id:,
|
8512
|
-
# Create a listener.
|
8513
|
-
# This request creates a new listener
|
9739
|
+
# @!method create_load_balancer_listener(load_balancer_id:, protocol:, accept_proxy_protocol: nil, certificate_instance: nil, connection_limit: nil, default_pool: nil, https_redirect: nil, policies: nil, port: nil, port_max: nil, port_min: nil)
|
9740
|
+
# Create a listener for a load balancer.
|
9741
|
+
# This request creates a new listener for a load balancer.
|
8514
9742
|
# @param load_balancer_id [String] The load balancer identifier.
|
8515
|
-
# @param
|
8516
|
-
# `port` and `protocol` combination.
|
8517
|
-
#
|
8518
|
-
#
|
8519
|
-
#
|
8520
|
-
#
|
9743
|
+
# @param protocol [String] The listener protocol. Each listener in the load balancer must have a unique
|
9744
|
+
# `port` and `protocol` combination. Additional restrictions:
|
9745
|
+
# - If this load balancer is in the `network` family, the protocol must be `tcp`.
|
9746
|
+
# - If this listener has `https_redirect` specified, the protocol must be `http`.
|
9747
|
+
# - If this listener is a listener's `https_redirect` target, the protocol must be
|
9748
|
+
# `https`.
|
8521
9749
|
# @param accept_proxy_protocol [Boolean] If set to `true`, this listener will accept and forward PROXY protocol
|
8522
9750
|
# information. Supported by load balancers in the `application` family (otherwise
|
8523
|
-
# always `false`).
|
9751
|
+
# always `false`). Additional restrictions:
|
9752
|
+
# - If this listener has `https_redirect` specified, its `accept_proxy_protocol`
|
9753
|
+
# value must
|
9754
|
+
# match the `accept_proxy_protocol` value of the `https_redirect` listener.
|
9755
|
+
# - If this listener is the target of another listener's `https_redirect`, its
|
9756
|
+
# `accept_proxy_protocol` value must match that listener's `accept_proxy_protocol`
|
9757
|
+
# value.
|
8524
9758
|
# @param certificate_instance [CertificateInstanceIdentity] The certificate instance used for SSL termination. It is applicable only to
|
8525
9759
|
# `https`
|
8526
9760
|
# protocol.
|
@@ -8530,17 +9764,36 @@ module IbmVpc
|
|
8530
9764
|
# - Belong to this load balancer
|
8531
9765
|
# - Have the same `protocol` as this listener
|
8532
9766
|
# - Not already be the default pool for another listener.
|
8533
|
-
# @param
|
9767
|
+
# @param https_redirect [LoadBalancerListenerHTTPSRedirectPrototype] The target listener that requests will be redirected to. This listener must have a
|
9768
|
+
# `protocol` of `http`, and the target listener must have a `protocol` of `https`.
|
9769
|
+
# @param policies [Array[LoadBalancerListenerPolicyPrototype]] The policy prototype objects for this listener.
|
9770
|
+
# @param port [Fixnum] The listener port number, or the inclusive lower bound of the port range. Each
|
9771
|
+
# listener in the load balancer must have a unique `port` and `protocol`
|
9772
|
+
# combination.
|
9773
|
+
#
|
9774
|
+
# Not supported for load balancers operating with route mode enabled.
|
9775
|
+
# @param port_max [Fixnum] The inclusive upper bound of the range of ports used by this listener. Must not be
|
9776
|
+
# less than `port_min`.
|
9777
|
+
#
|
9778
|
+
# At present, only load balancers operating with route mode enabled support
|
9779
|
+
# different values for `port_min` and `port_max`. When route mode is enabled, only
|
9780
|
+
# a value of
|
9781
|
+
# `65535` is supported for `port_max`.
|
9782
|
+
# @param port_min [Fixnum] The inclusive lower bound of the range of ports used by this listener. Must not be
|
9783
|
+
# greater than `port_max`.
|
9784
|
+
#
|
9785
|
+
# At present, only load balancers operating with route mode enabled support
|
9786
|
+
# different values for `port_min` and `port_max`. When route mode is enabled, only
|
9787
|
+
# a value of
|
9788
|
+
# `1` is supported for `port_min`.
|
8534
9789
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
8535
|
-
def create_load_balancer_listener(load_balancer_id:,
|
9790
|
+
def create_load_balancer_listener(load_balancer_id:, protocol:, accept_proxy_protocol: nil, certificate_instance: nil, connection_limit: nil, default_pool: nil, https_redirect: nil, policies: nil, port: nil, port_max: nil, port_min: nil)
|
8536
9791
|
raise ArgumentError.new("version must be provided") if version.nil?
|
8537
9792
|
|
8538
9793
|
raise ArgumentError.new("generation must be provided") if generation.nil?
|
8539
9794
|
|
8540
9795
|
raise ArgumentError.new("load_balancer_id must be provided") if load_balancer_id.nil?
|
8541
9796
|
|
8542
|
-
raise ArgumentError.new("port must be provided") if port.nil?
|
8543
|
-
|
8544
9797
|
raise ArgumentError.new("protocol must be provided") if protocol.nil?
|
8545
9798
|
|
8546
9799
|
headers = {
|
@@ -8554,13 +9807,16 @@ module IbmVpc
|
|
8554
9807
|
}
|
8555
9808
|
|
8556
9809
|
data = {
|
8557
|
-
"port" => port,
|
8558
9810
|
"protocol" => protocol,
|
8559
9811
|
"accept_proxy_protocol" => accept_proxy_protocol,
|
8560
9812
|
"certificate_instance" => certificate_instance,
|
8561
9813
|
"connection_limit" => connection_limit,
|
8562
9814
|
"default_pool" => default_pool,
|
8563
|
-
"
|
9815
|
+
"https_redirect" => https_redirect,
|
9816
|
+
"policies" => policies,
|
9817
|
+
"port" => port,
|
9818
|
+
"port_max" => port_max,
|
9819
|
+
"port_min" => port_min
|
8564
9820
|
}
|
8565
9821
|
|
8566
9822
|
method_url = "/load_balancers/%s/listeners" % [ERB::Util.url_encode(load_balancer_id)]
|
@@ -8578,8 +9834,10 @@ module IbmVpc
|
|
8578
9834
|
|
8579
9835
|
##
|
8580
9836
|
# @!method delete_load_balancer_listener(load_balancer_id:, id:)
|
8581
|
-
# Delete a listener.
|
9837
|
+
# Delete a load balancer listener.
|
8582
9838
|
# This request deletes a load balancer listener. This operation cannot be reversed.
|
9839
|
+
# For this operation to succeed, the listener must not be the target of another load
|
9840
|
+
# balancer listener.
|
8583
9841
|
# @param load_balancer_id [String] The load balancer identifier.
|
8584
9842
|
# @param id [String] The listener identifier.
|
8585
9843
|
# @return [nil]
|
@@ -8616,7 +9874,7 @@ module IbmVpc
|
|
8616
9874
|
|
8617
9875
|
##
|
8618
9876
|
# @!method get_load_balancer_listener(load_balancer_id:, id:)
|
8619
|
-
# Retrieve a listener.
|
9877
|
+
# Retrieve a load balancer listener.
|
8620
9878
|
# This request retrieves a single listener specified by the identifier in the URL
|
8621
9879
|
# path.
|
8622
9880
|
# @param load_balancer_id [String] The load balancer identifier.
|
@@ -8655,7 +9913,7 @@ module IbmVpc
|
|
8655
9913
|
|
8656
9914
|
##
|
8657
9915
|
# @!method update_load_balancer_listener(load_balancer_id:, id:, load_balancer_listener_patch:)
|
8658
|
-
# Update a listener.
|
9916
|
+
# Update a load balancer listener.
|
8659
9917
|
# This request updates a load balancer listener from a listener patch.
|
8660
9918
|
# @param load_balancer_id [String] The load balancer identifier.
|
8661
9919
|
# @param id [String] The listener identifier.
|
@@ -8700,8 +9958,8 @@ module IbmVpc
|
|
8700
9958
|
|
8701
9959
|
##
|
8702
9960
|
# @!method list_load_balancer_listener_policies(load_balancer_id:, listener_id:)
|
8703
|
-
# List all policies
|
8704
|
-
#
|
9961
|
+
# List all policies for a load balancer listener.
|
9962
|
+
# This request lists all policies for a load balancer listener.
|
8705
9963
|
# @param load_balancer_id [String] The load balancer identifier.
|
8706
9964
|
# @param listener_id [String] The listener identifier.
|
8707
9965
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
@@ -8738,21 +9996,25 @@ module IbmVpc
|
|
8738
9996
|
|
8739
9997
|
##
|
8740
9998
|
# @!method create_load_balancer_listener_policy(load_balancer_id:, listener_id:, action:, priority:, name: nil, rules: nil, target: nil)
|
8741
|
-
# Create a policy for
|
8742
|
-
# Creates a new policy
|
9999
|
+
# Create a policy for a load balancer listener.
|
10000
|
+
# Creates a new policy for a load balancer listener.
|
8743
10001
|
# @param load_balancer_id [String] The load balancer identifier.
|
8744
10002
|
# @param listener_id [String] The listener identifier.
|
8745
10003
|
# @param action [String] The policy action.
|
10004
|
+
#
|
10005
|
+
# The enumerated values for this property are expected to expand in the future. When
|
10006
|
+
# processing this property, check for and log unknown values. Optionally halt
|
10007
|
+
# processing and surface the error, or bypass the policy on which the unexpected
|
10008
|
+
# property value was encountered.
|
8746
10009
|
# @param priority [Fixnum] Priority of the policy. Lower value indicates higher priority.
|
8747
10010
|
# @param name [String] The user-defined name for this policy. Names must be unique within the load
|
8748
10011
|
# balancer listener the policy resides in.
|
8749
|
-
# @param rules [Array[LoadBalancerListenerPolicyRulePrototype]] The
|
8750
|
-
# @param target [LoadBalancerListenerPolicyTargetPrototype]
|
8751
|
-
#
|
8752
|
-
#
|
8753
|
-
# `
|
8754
|
-
#
|
8755
|
-
# http status code used in the redirect response.
|
10012
|
+
# @param rules [Array[LoadBalancerListenerPolicyRulePrototype]] The rule prototype objects for this policy.
|
10013
|
+
# @param target [LoadBalancerListenerPolicyTargetPrototype] - If `action` is `forward`, specify a `LoadBalancerPoolIdentity`.
|
10014
|
+
# - If `action` is `redirect`, specify a
|
10015
|
+
# `LoadBalancerListenerPolicyRedirectURLPrototype`.
|
10016
|
+
# - If `action` is `https_redirect`, specify a
|
10017
|
+
# `LoadBalancerListenerPolicyHTTPSRedirectPrototype`.
|
8756
10018
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
8757
10019
|
def create_load_balancer_listener_policy(load_balancer_id:, listener_id:, action:, priority:, name: nil, rules: nil, target: nil)
|
8758
10020
|
raise ArgumentError.new("version must be provided") if version.nil?
|
@@ -8800,7 +10062,7 @@ module IbmVpc
|
|
8800
10062
|
|
8801
10063
|
##
|
8802
10064
|
# @!method delete_load_balancer_listener_policy(load_balancer_id:, listener_id:, id:)
|
8803
|
-
# Delete a
|
10065
|
+
# Delete a load balancer listener policy.
|
8804
10066
|
# Deletes a policy of the load balancer listener. This operation cannot be reversed.
|
8805
10067
|
# @param load_balancer_id [String] The load balancer identifier.
|
8806
10068
|
# @param listener_id [String] The listener identifier.
|
@@ -8841,7 +10103,7 @@ module IbmVpc
|
|
8841
10103
|
|
8842
10104
|
##
|
8843
10105
|
# @!method get_load_balancer_listener_policy(load_balancer_id:, listener_id:, id:)
|
8844
|
-
# Retrieve a
|
10106
|
+
# Retrieve a load balancer listener policy.
|
8845
10107
|
# Retrieve a single policy specified by the identifier in the URL path.
|
8846
10108
|
# @param load_balancer_id [String] The load balancer identifier.
|
8847
10109
|
# @param listener_id [String] The listener identifier.
|
@@ -8882,7 +10144,7 @@ module IbmVpc
|
|
8882
10144
|
|
8883
10145
|
##
|
8884
10146
|
# @!method update_load_balancer_listener_policy(load_balancer_id:, listener_id:, id:, load_balancer_listener_policy_patch:)
|
8885
|
-
# Update a
|
10147
|
+
# Update a load balancer listener policy.
|
8886
10148
|
# Updates a policy from a policy patch.
|
8887
10149
|
# @param load_balancer_id [String] The load balancer identifier.
|
8888
10150
|
# @param listener_id [String] The listener identifier.
|
@@ -8930,8 +10192,8 @@ module IbmVpc
|
|
8930
10192
|
|
8931
10193
|
##
|
8932
10194
|
# @!method list_load_balancer_listener_policy_rules(load_balancer_id:, listener_id:, policy_id:)
|
8933
|
-
# List all rules of
|
8934
|
-
#
|
10195
|
+
# List all rules of a load balancer listener policy.
|
10196
|
+
# This request lists all rules of a load balancer listener policy.
|
8935
10197
|
# @param load_balancer_id [String] The load balancer identifier.
|
8936
10198
|
# @param listener_id [String] The listener identifier.
|
8937
10199
|
# @param policy_id [String] The policy identifier.
|
@@ -8971,15 +10233,29 @@ module IbmVpc
|
|
8971
10233
|
|
8972
10234
|
##
|
8973
10235
|
# @!method create_load_balancer_listener_policy_rule(load_balancer_id:, listener_id:, policy_id:, condition:, type:, value:, field: nil)
|
8974
|
-
# Create a rule for
|
10236
|
+
# Create a rule for a load balancer listener policy.
|
8975
10237
|
# Creates a new rule for the load balancer listener policy.
|
8976
10238
|
# @param load_balancer_id [String] The load balancer identifier.
|
8977
10239
|
# @param listener_id [String] The listener identifier.
|
8978
10240
|
# @param policy_id [String] The policy identifier.
|
8979
10241
|
# @param condition [String] The condition of the rule.
|
8980
10242
|
# @param type [String] The type of the rule.
|
10243
|
+
#
|
10244
|
+
# Body rules are applied to form-encoded request bodies using the `UTF-8` character
|
10245
|
+
# set.
|
8981
10246
|
# @param value [String] Value to be matched for rule condition.
|
8982
|
-
#
|
10247
|
+
#
|
10248
|
+
# If the rule type is `query` and the rule condition is not `matches_regex`, the
|
10249
|
+
# value must be percent-encoded.
|
10250
|
+
# @param field [String] The field. This is applicable to `header`, `query`, and `body` rule types.
|
10251
|
+
#
|
10252
|
+
# If the rule type is `header`, this property is required.
|
10253
|
+
#
|
10254
|
+
# If the rule type is `query`, this is optional. If specified and the rule condition
|
10255
|
+
# is not
|
10256
|
+
# `matches_regex`, the value must be percent-encoded.
|
10257
|
+
#
|
10258
|
+
# If the rule type is `body`, this is optional.
|
8983
10259
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
8984
10260
|
def create_load_balancer_listener_policy_rule(load_balancer_id:, listener_id:, policy_id:, condition:, type:, value:, field: nil)
|
8985
10261
|
raise ArgumentError.new("version must be provided") if version.nil?
|
@@ -9030,7 +10306,7 @@ module IbmVpc
|
|
9030
10306
|
|
9031
10307
|
##
|
9032
10308
|
# @!method delete_load_balancer_listener_policy_rule(load_balancer_id:, listener_id:, policy_id:, id:)
|
9033
|
-
# Delete a
|
10309
|
+
# Delete a load balancer listener policy rule.
|
9034
10310
|
# Deletes a rule from the load balancer listener policy. This operation cannot be
|
9035
10311
|
# reversed.
|
9036
10312
|
# @param load_balancer_id [String] The load balancer identifier.
|
@@ -9075,7 +10351,7 @@ module IbmVpc
|
|
9075
10351
|
|
9076
10352
|
##
|
9077
10353
|
# @!method get_load_balancer_listener_policy_rule(load_balancer_id:, listener_id:, policy_id:, id:)
|
9078
|
-
# Retrieve a
|
10354
|
+
# Retrieve a load balancer listener policy rule.
|
9079
10355
|
# Retrieves a single rule specified by the identifier in the URL path.
|
9080
10356
|
# @param load_balancer_id [String] The load balancer identifier.
|
9081
10357
|
# @param listener_id [String] The listener identifier.
|
@@ -9119,7 +10395,7 @@ module IbmVpc
|
|
9119
10395
|
|
9120
10396
|
##
|
9121
10397
|
# @!method update_load_balancer_listener_policy_rule(load_balancer_id:, listener_id:, policy_id:, id:, load_balancer_listener_policy_rule_patch:)
|
9122
|
-
# Update a
|
10398
|
+
# Update a load balancer listener policy rule.
|
9123
10399
|
# Updates a rule of the load balancer listener policy.
|
9124
10400
|
# @param load_balancer_id [String] The load balancer identifier.
|
9125
10401
|
# @param listener_id [String] The listener identifier.
|
@@ -9170,8 +10446,8 @@ module IbmVpc
|
|
9170
10446
|
|
9171
10447
|
##
|
9172
10448
|
# @!method list_load_balancer_pools(load_balancer_id:)
|
9173
|
-
# List all pools of
|
9174
|
-
# This request lists all pools
|
10449
|
+
# List all pools of a load balancer.
|
10450
|
+
# This request lists all pools of a load balancer.
|
9175
10451
|
# @param load_balancer_id [String] The load balancer identifier.
|
9176
10452
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
9177
10453
|
def list_load_balancer_pools(load_balancer_id:)
|
@@ -9276,7 +10552,7 @@ module IbmVpc
|
|
9276
10552
|
|
9277
10553
|
##
|
9278
10554
|
# @!method delete_load_balancer_pool(load_balancer_id:, id:)
|
9279
|
-
# Delete a pool.
|
10555
|
+
# Delete a load balancer pool.
|
9280
10556
|
# This request deletes a load balancer pool. This operation cannot be reversed. The
|
9281
10557
|
# pool must not currently be the default pool for any listener in the load balancer.
|
9282
10558
|
# @param load_balancer_id [String] The load balancer identifier.
|
@@ -9398,8 +10674,8 @@ module IbmVpc
|
|
9398
10674
|
|
9399
10675
|
##
|
9400
10676
|
# @!method list_load_balancer_pool_members(load_balancer_id:, pool_id:)
|
9401
|
-
# List all members of
|
9402
|
-
# This request
|
10677
|
+
# List all members of a load balancer pool.
|
10678
|
+
# This request lists all members of a load balancer pool.
|
9403
10679
|
# @param load_balancer_id [String] The load balancer identifier.
|
9404
10680
|
# @param pool_id [String] The pool identifier.
|
9405
10681
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
@@ -9436,7 +10712,7 @@ module IbmVpc
|
|
9436
10712
|
|
9437
10713
|
##
|
9438
10714
|
# @!method create_load_balancer_pool_member(load_balancer_id:, pool_id:, port:, target:, weight: nil)
|
9439
|
-
# Create a member in
|
10715
|
+
# Create a member in a load balancer pool.
|
9440
10716
|
# This request creates a new member and adds the member to the pool.
|
9441
10717
|
# @param load_balancer_id [String] The load balancer identifier.
|
9442
10718
|
# @param pool_id [String] The pool identifier.
|
@@ -9491,12 +10767,12 @@ module IbmVpc
|
|
9491
10767
|
|
9492
10768
|
##
|
9493
10769
|
# @!method replace_load_balancer_pool_members(load_balancer_id:, pool_id:, members:)
|
9494
|
-
#
|
9495
|
-
# This request
|
9496
|
-
# prototype objects.
|
10770
|
+
# Replace load balancer pool members.
|
10771
|
+
# This request replaces the existing members of the load balancer pool with new
|
10772
|
+
# members created from the collection of member prototype objects.
|
9497
10773
|
# @param load_balancer_id [String] The load balancer identifier.
|
9498
10774
|
# @param pool_id [String] The pool identifier.
|
9499
|
-
# @param members [Array[LoadBalancerPoolMemberPrototype]]
|
10775
|
+
# @param members [Array[LoadBalancerPoolMemberPrototype]] The member prototype objects for this pool.
|
9500
10776
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
9501
10777
|
def replace_load_balancer_pool_members(load_balancer_id:, pool_id:, members:)
|
9502
10778
|
raise ArgumentError.new("version must be provided") if version.nil?
|
@@ -9538,7 +10814,7 @@ module IbmVpc
|
|
9538
10814
|
|
9539
10815
|
##
|
9540
10816
|
# @!method delete_load_balancer_pool_member(load_balancer_id:, pool_id:, id:)
|
9541
|
-
# Delete a
|
10817
|
+
# Delete a load balancer pool member.
|
9542
10818
|
# This request deletes a member from the pool. This operation cannot be reversed.
|
9543
10819
|
# @param load_balancer_id [String] The load balancer identifier.
|
9544
10820
|
# @param pool_id [String] The pool identifier.
|
@@ -9579,7 +10855,7 @@ module IbmVpc
|
|
9579
10855
|
|
9580
10856
|
##
|
9581
10857
|
# @!method get_load_balancer_pool_member(load_balancer_id:, pool_id:, id:)
|
9582
|
-
# Retrieve a
|
10858
|
+
# Retrieve a load balancer pool member.
|
9583
10859
|
# This request retrieves a single member specified by the identifier in the URL
|
9584
10860
|
# path.
|
9585
10861
|
# @param load_balancer_id [String] The load balancer identifier.
|
@@ -9621,7 +10897,7 @@ module IbmVpc
|
|
9621
10897
|
|
9622
10898
|
##
|
9623
10899
|
# @!method update_load_balancer_pool_member(load_balancer_id:, pool_id:, id:, load_balancer_pool_member_patch:)
|
9624
|
-
# Update a
|
10900
|
+
# Update a load balancer pool member.
|
9625
10901
|
# This request updates an existing member from a member patch.
|
9626
10902
|
# @param load_balancer_id [String] The load balancer identifier.
|
9627
10903
|
# @param pool_id [String] The pool identifier.
|
@@ -9673,13 +10949,13 @@ module IbmVpc
|
|
9673
10949
|
##
|
9674
10950
|
# @!method list_endpoint_gateways(name: nil, start: nil, limit: nil, resource_group_id: nil)
|
9675
10951
|
# List all endpoint gateways.
|
9676
|
-
# This request lists all endpoint gateways. An endpoint gateway maps
|
9677
|
-
# reserved IPs in a VPC to a target outside the VPC.
|
10952
|
+
# This request lists all endpoint gateways in the region. An endpoint gateway maps
|
10953
|
+
# one or more reserved IPs in a VPC to a target outside the VPC.
|
9678
10954
|
# @param name [String] Filters the collection to resources with the exact specified name.
|
9679
|
-
# @param start [String] A server-
|
10955
|
+
# @param start [String] A server-provided token determining what resource to start the page on.
|
9680
10956
|
# @param limit [Fixnum] The number of resources to return on a page.
|
9681
|
-
# @param resource_group_id [String] Filters the collection to resources
|
9682
|
-
#
|
10957
|
+
# @param resource_group_id [String] Filters the collection to resources in the resource group with the specified
|
10958
|
+
# identifier.
|
9683
10959
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
9684
10960
|
def list_endpoint_gateways(name: nil, start: nil, limit: nil, resource_group_id: nil)
|
9685
10961
|
raise ArgumentError.new("version must be provided") if version.nil?
|
@@ -9719,7 +10995,8 @@ module IbmVpc
|
|
9719
10995
|
# reserved IPs in a VPC to a target outside the VPC.
|
9720
10996
|
# @param target [EndpointGatewayTargetPrototype] The target for this endpoint gateway.
|
9721
10997
|
# @param vpc [VPCIdentity] The VPC this endpoint gateway will serve.
|
9722
|
-
# @param ips [Array[EndpointGatewayReservedIP]]
|
10998
|
+
# @param ips [Array[EndpointGatewayReservedIP]] The reserved IPs to bind to this endpoint gateway. At most one reserved IP per
|
10999
|
+
# zone is allowed.
|
9723
11000
|
# @param name [String] The user-defined name for this endpoint gateway. If unspecified, the name will be
|
9724
11001
|
# a hyphenated list of randomly-selected words. Names must be unique within the VPC
|
9725
11002
|
# this endpoint gateway is serving.
|
@@ -9769,15 +11046,15 @@ module IbmVpc
|
|
9769
11046
|
##
|
9770
11047
|
# @!method list_endpoint_gateway_ips(endpoint_gateway_id:, start: nil, limit: nil, sort: nil)
|
9771
11048
|
# List all reserved IPs bound to an endpoint gateway.
|
9772
|
-
# This request
|
11049
|
+
# This request lists all reserved IPs bound to an endpoint gateway.
|
9773
11050
|
# @param endpoint_gateway_id [String] The endpoint gateway identifier.
|
9774
|
-
# @param start [String] A server-
|
11051
|
+
# @param start [String] A server-provided token determining what resource to start the page on.
|
9775
11052
|
# @param limit [Fixnum] The number of resources to return on a page.
|
9776
|
-
# @param sort [String] Sorts the returned collection by the specified
|
9777
|
-
# `-` may be prepended to the
|
9778
|
-
# the
|
9779
|
-
#
|
9780
|
-
#
|
11053
|
+
# @param sort [String] Sorts the returned collection by the specified property name in ascending order. A
|
11054
|
+
# `-` may be prepended to the name to sort in descending order. For example, the
|
11055
|
+
# value `-created_at` sorts the collection by the `created_at` property in
|
11056
|
+
# descending order, and the value `name` sorts it by the `name` property in
|
11057
|
+
# ascending order.
|
9781
11058
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
9782
11059
|
def list_endpoint_gateway_ips(endpoint_gateway_id:, start: nil, limit: nil, sort: nil)
|
9783
11060
|
raise ArgumentError.new("version must be provided") if version.nil?
|
@@ -9894,8 +11171,11 @@ module IbmVpc
|
|
9894
11171
|
# @!method add_endpoint_gateway_ip(endpoint_gateway_id:, id:)
|
9895
11172
|
# Bind a reserved IP to an endpoint gateway.
|
9896
11173
|
# This request binds the specified reserved IP to the specified endpoint gateway.
|
9897
|
-
#
|
9898
|
-
#
|
11174
|
+
# The reserved IP:
|
11175
|
+
#
|
11176
|
+
# - must currently be unbound
|
11177
|
+
# - must not be in the same zone as any other reserved IP bound to the endpoint
|
11178
|
+
# gateway.
|
9899
11179
|
# @param endpoint_gateway_id [String] The endpoint gateway identifier.
|
9900
11180
|
# @param id [String] The reserved IP identifier.
|
9901
11181
|
# @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
|
@@ -10052,13 +11332,13 @@ module IbmVpc
|
|
10052
11332
|
##
|
10053
11333
|
# @!method list_flow_log_collectors(start: nil, limit: nil, resource_group_id: nil, name: nil, vpc_id: nil, vpc_crn: nil, vpc_name: nil, target_id: nil, target_resource_type: nil)
|
10054
11334
|
# List all flow log collectors.
|
10055
|
-
# This request
|
11335
|
+
# This request lists all flow log collectors in the region. A flow log collector
|
10056
11336
|
# summarizes data sent over one or more network interfaces within a VPC, depending
|
10057
11337
|
# on the chosen target.
|
10058
|
-
# @param start [String] A server-
|
11338
|
+
# @param start [String] A server-provided token determining what resource to start the page on.
|
10059
11339
|
# @param limit [Fixnum] The number of resources to return on a page.
|
10060
|
-
# @param resource_group_id [String] Filters the collection to resources
|
10061
|
-
#
|
11340
|
+
# @param resource_group_id [String] Filters the collection to resources in the resource group with the specified
|
11341
|
+
# identifier.
|
10062
11342
|
# @param name [String] Filters the collection to resources with the exact specified name.
|
10063
11343
|
# @param vpc_id [String] Filters the collection to resources in the VPC with the specified identifier.
|
10064
11344
|
# @param vpc_crn [String] Filters the collection to resources in the VPC with the specified CRN.
|
@@ -10114,13 +11394,12 @@ module IbmVpc
|
|
10114
11394
|
# The bucket must exist and an IAM service authorization must grant
|
10115
11395
|
# `IBM Cloud Flow Logs` resources of `VPC Infrastructure Services` writer
|
10116
11396
|
# access to the bucket.
|
10117
|
-
# @param target [FlowLogCollectorTargetPrototype] The target this collector
|
11397
|
+
# @param target [FlowLogCollectorTargetPrototype] The target this collector will collect flow logs for. If the target is an
|
10118
11398
|
# instance,
|
10119
11399
|
# subnet, or VPC, flow logs will not be collected for any network interfaces within
|
10120
11400
|
# the
|
10121
11401
|
# target that are themselves the target of a more specific flow log collector.
|
10122
|
-
# @param active [Boolean] Indicates whether this collector
|
10123
|
-
# inactive mode.
|
11402
|
+
# @param active [Boolean] Indicates whether this collector will be active upon creation.
|
10124
11403
|
# @param name [String] The unique user-defined name for this flow log collector. If unspecified, the name
|
10125
11404
|
# will be a hyphenated list of randomly-selected words.
|
10126
11405
|
# @param resource_group [ResourceGroupIdentity] The resource group to use. If unspecified, the account's [default resource
|
@@ -10168,9 +11447,12 @@ module IbmVpc
|
|
10168
11447
|
|
10169
11448
|
##
|
10170
11449
|
# @!method delete_flow_log_collector(id:)
|
10171
|
-
# Delete
|
10172
|
-
# This request stops and deletes a flow log collector.
|
10173
|
-
#
|
11450
|
+
# Delete a flow log collector.
|
11451
|
+
# This request stops and deletes a flow log collector. This operation cannot be
|
11452
|
+
# reversed.
|
11453
|
+
#
|
11454
|
+
# Collected flow logs remain available within the flow log collector's Cloud Object
|
11455
|
+
# Storage bucket.
|
10174
11456
|
# @param id [String] The flow log collector identifier.
|
10175
11457
|
# @return [nil]
|
10176
11458
|
def delete_flow_log_collector(id:)
|
@@ -10204,7 +11486,7 @@ module IbmVpc
|
|
10204
11486
|
|
10205
11487
|
##
|
10206
11488
|
# @!method get_flow_log_collector(id:)
|
10207
|
-
# Retrieve
|
11489
|
+
# Retrieve a flow log collector.
|
10208
11490
|
# This request retrieves a single flow log collector specified by the identifier in
|
10209
11491
|
# the URL.
|
10210
11492
|
# @param id [String] The flow log collector identifier.
|
@@ -10240,7 +11522,7 @@ module IbmVpc
|
|
10240
11522
|
|
10241
11523
|
##
|
10242
11524
|
# @!method update_flow_log_collector(id:, flow_log_collector_patch:)
|
10243
|
-
# Update
|
11525
|
+
# Update a flow log collector.
|
10244
11526
|
# This request updates a flow log collector with the information in a provided flow
|
10245
11527
|
# log collector patch. The flow log collector patch object is structured in the same
|
10246
11528
|
# way as a retrieved flow log collector and contains only the information to be
|