Skip to content

Commit 733a3d4

Browse files
authored
feat(2022-10-25): updated the sdk as per the api spec released on 2022-10-25 (#44)
Signed-off-by: Ujjwal Kumar <[email protected]> Signed-off-by: Ujjwal Kumar <[email protected]>
1 parent 8b47e06 commit 733a3d4

File tree

91 files changed

+727
-375
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+727
-375
lines changed

modules/examples/src/main/java/com/ibm/cloud/is/vpc/v1/VPCExamples.java

+332-147
Large diffs are not rendered by default.

modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/Vpc.java

+22-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*/
1313

1414
/*
15-
* IBM OpenAPI SDK Code Generator Version: 3.55.1-b24c7487-20220831-201343
15+
* IBM OpenAPI SDK Code Generator Version: 3.59.0-da92a51d-20221012-180509
1616
*/
1717

1818
package com.ibm.cloud.is.vpc.v1;
@@ -478,6 +478,7 @@
478478
import java.util.HashMap;
479479
import java.util.Map;
480480
import java.util.Map.Entry;
481+
import java.util.logging.Logger;
481482

482483
/**
483484
* The IBM Cloud Virtual Private Cloud (VPC) API can be used to programmatically provision and manage virtual server
@@ -486,6 +487,7 @@
486487
* API Version: 2022-09-13
487488
*/
488489
public class Vpc extends BaseService {
490+
private static final Logger LOGGER = Logger.getLogger(Vpc.class.getName());
489491

490492
/**
491493
* Default service name used when configuring the `Vpc` client.
@@ -1012,8 +1014,11 @@ public ServiceCall<AddressPrefix> updateVpcAddressPrefix(UpdateVpcAddressPrefixO
10121014
*
10131015
* @param listVpcRoutesOptions the {@link ListVpcRoutesOptions} containing the options for the call
10141016
* @return a {@link ServiceCall} with a result of type {@link RouteCollection}
1017+
* @deprecated this method is deprecated and may be removed in a future release
10151018
*/
1019+
@Deprecated
10161020
public ServiceCall<RouteCollection> listVpcRoutes(ListVpcRoutesOptions listVpcRoutesOptions) {
1021+
LOGGER.warning("A deprecated operation has been invoked: listVpcRoutes");
10171022
com.ibm.cloud.sdk.core.util.Validator.notNull(listVpcRoutesOptions,
10181023
"listVpcRoutesOptions cannot be null");
10191024
Map<String, String> pathParamsMap = new HashMap<String, String>();
@@ -1049,8 +1054,11 @@ public ServiceCall<RouteCollection> listVpcRoutes(ListVpcRoutesOptions listVpcRo
10491054
*
10501055
* @param createVpcRouteOptions the {@link CreateVpcRouteOptions} containing the options for the call
10511056
* @return a {@link ServiceCall} with a result of type {@link Route}
1057+
* @deprecated this method is deprecated and may be removed in a future release
10521058
*/
1059+
@Deprecated
10531060
public ServiceCall<Route> createVpcRoute(CreateVpcRouteOptions createVpcRouteOptions) {
1061+
LOGGER.warning("A deprecated operation has been invoked: createVpcRoute");
10541062
com.ibm.cloud.sdk.core.util.Validator.notNull(createVpcRouteOptions,
10551063
"createVpcRouteOptions cannot be null");
10561064
Map<String, String> pathParamsMap = new HashMap<String, String>();
@@ -1088,8 +1096,11 @@ public ServiceCall<Route> createVpcRoute(CreateVpcRouteOptions createVpcRouteOpt
10881096
*
10891097
* @param deleteVpcRouteOptions the {@link DeleteVpcRouteOptions} containing the options for the call
10901098
* @return a {@link ServiceCall} with a void result
1099+
* @deprecated this method is deprecated and may be removed in a future release
10911100
*/
1101+
@Deprecated
10921102
public ServiceCall<Void> deleteVpcRoute(DeleteVpcRouteOptions deleteVpcRouteOptions) {
1103+
LOGGER.warning("A deprecated operation has been invoked: deleteVpcRoute");
10931104
com.ibm.cloud.sdk.core.util.Validator.notNull(deleteVpcRouteOptions,
10941105
"deleteVpcRouteOptions cannot be null");
10951106
Map<String, String> pathParamsMap = new HashMap<String, String>();
@@ -1113,8 +1124,11 @@ public ServiceCall<Void> deleteVpcRoute(DeleteVpcRouteOptions deleteVpcRouteOpti
11131124
*
11141125
* @param getVpcRouteOptions the {@link GetVpcRouteOptions} containing the options for the call
11151126
* @return a {@link ServiceCall} with a result of type {@link Route}
1127+
* @deprecated this method is deprecated and may be removed in a future release
11161128
*/
1129+
@Deprecated
11171130
public ServiceCall<Route> getVpcRoute(GetVpcRouteOptions getVpcRouteOptions) {
1131+
LOGGER.warning("A deprecated operation has been invoked: getVpcRoute");
11181132
com.ibm.cloud.sdk.core.util.Validator.notNull(getVpcRouteOptions,
11191133
"getVpcRouteOptions cannot be null");
11201134
Map<String, String> pathParamsMap = new HashMap<String, String>();
@@ -1141,8 +1155,11 @@ public ServiceCall<Route> getVpcRoute(GetVpcRouteOptions getVpcRouteOptions) {
11411155
*
11421156
* @param updateVpcRouteOptions the {@link UpdateVpcRouteOptions} containing the options for the call
11431157
* @return a {@link ServiceCall} with a result of type {@link Route}
1158+
* @deprecated this method is deprecated and may be removed in a future release
11441159
*/
1160+
@Deprecated
11451161
public ServiceCall<Route> updateVpcRoute(UpdateVpcRouteOptions updateVpcRouteOptions) {
1162+
LOGGER.warning("A deprecated operation has been invoked: updateVpcRoute");
11461163
com.ibm.cloud.sdk.core.util.Validator.notNull(updateVpcRouteOptions,
11471164
"updateVpcRouteOptions cannot be null");
11481165
Map<String, String> pathParamsMap = new HashMap<String, String>();
@@ -1233,6 +1250,9 @@ public ServiceCall<RoutingTable> createVpcRoutingTable(CreateVpcRoutingTableOpti
12331250
if (createVpcRoutingTableOptions.routeDirectLinkIngress() != null) {
12341251
contentJson.addProperty("route_direct_link_ingress", createVpcRoutingTableOptions.routeDirectLinkIngress());
12351252
}
1253+
if (createVpcRoutingTableOptions.routeInternetIngress() != null) {
1254+
contentJson.addProperty("route_internet_ingress", createVpcRoutingTableOptions.routeInternetIngress());
1255+
}
12361256
if (createVpcRoutingTableOptions.routeTransitGatewayIngress() != null) {
12371257
contentJson.addProperty("route_transit_gateway_ingress", createVpcRoutingTableOptions.routeTransitGatewayIngress());
12381258
}
@@ -2102,7 +2122,7 @@ public ServiceCall<Image> createImage(CreateImageOptions createImageOptions) {
21022122
*
21032123
* This request deletes an image. This operation cannot be reversed. A system-provided image is not allowed to be
21042124
* deleted. Additionally, an image cannot be deleted if it:
2105-
* - has a `status` of `tentative` or `deleting`
2125+
* - has a `status` of `deleting`
21062126
* - has a `status` of `pending` with a `status_reasons` code of `image_request_in_progress`
21072127
* - has `catalog_offering.managed` set to `true`.
21082128
*

modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfile.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public String getResourceType() {
163163
/**
164164
* Gets the supportedTrustedPlatformModuleModes.
165165
*
166-
* The supported trusted platform module (TPM) modes for this bare metal server profile.
166+
* The supported trusted platform module modes for this bare metal server profile.
167167
*
168168
* @return the supportedTrustedPlatformModuleModes
169169
*/

modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerProfileSupportedTrustedPlatformModuleModes.java

+4-7
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import com.ibm.cloud.sdk.core.service.model.GenericModel;
1818

1919
/**
20-
* The supported trusted platform module (TPM) modes for this bare metal server profile.
20+
* The supported trusted platform module modes for this bare metal server profile.
2121
*/
2222
public class BareMetalServerProfileSupportedTrustedPlatformModuleModes extends GenericModel {
2323

@@ -30,9 +30,8 @@ public interface Type {
3030
}
3131

3232
/**
33-
* The mode for the trusted platform module (TPM):
34-
* - `tpm_2`: Standard TPM 2 capabilities
35-
* - `tpm_2_with_txt`: Standard TPM 2 with Intel Trusted Execution Technology (TXT)
33+
* The trusted platform module (TPM) mode:
34+
* - `tpm_2`: TPM 2.0
3635
*
3736
* The enumerated values for this property are expected to expand in the future. When processing this property, check
3837
* for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the
@@ -41,8 +40,6 @@ public interface Type {
4140
public interface Values {
4241
/** tpm_2. */
4342
String TPM_2 = "tpm_2";
44-
/** tpm_2_with_txt. */
45-
String TPM_2_WITH_TXT = "tpm_2_with_txt";
4643
}
4744

4845
protected String type;
@@ -64,7 +61,7 @@ public String getType() {
6461
/**
6562
* Gets the values.
6663
*
67-
* The supported trusted platform module (TPM) modes.
64+
* The supported trusted platform module modes.
6865
*
6966
* @return the values
7067
*/

modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/BareMetalServerTrustedPlatformModule.java

+5-9
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@
2020
public class BareMetalServerTrustedPlatformModule extends GenericModel {
2121

2222
/**
23-
* The mode for the trusted platform module (TPM):
24-
* - `tpm_2`: Standard TPM 2 capabilities
25-
* - `tpm_2_with_txt`: Standard TPM 2 with Intel Trusted Execution Technology (TXT)
23+
* The trusted platform module (TPM) mode:
24+
* - `tpm_2`: TPM 2.0
2625
*
2726
* The enumerated values for this property are expected to expand in the future. When processing this property, check
2827
* for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the
@@ -31,8 +30,6 @@ public class BareMetalServerTrustedPlatformModule extends GenericModel {
3130
public interface Mode {
3231
/** tpm_2. */
3332
String TPM_2 = "tpm_2";
34-
/** tpm_2_with_txt. */
35-
String TPM_2_WITH_TXT = "tpm_2_with_txt";
3633
}
3734

3835
protected Boolean enabled;
@@ -43,7 +40,7 @@ protected BareMetalServerTrustedPlatformModule() { }
4340
/**
4441
* Gets the enabled.
4542
*
46-
* Indicates whether the trusted platform module (TPM) is enabled. If enabled, `mode` will also be set.
43+
* Indicates whether the trusted platform module is enabled.
4744
*
4845
* @return the enabled
4946
*/
@@ -54,9 +51,8 @@ public Boolean isEnabled() {
5451
/**
5552
* Gets the mode.
5653
*
57-
* The mode for the trusted platform module (TPM):
58-
* - `tpm_2`: Standard TPM 2 capabilities
59-
* - `tpm_2_with_txt`: Standard TPM 2 with Intel Trusted Execution Technology (TXT)
54+
* The trusted platform module (TPM) mode:
55+
* - `tpm_2`: TPM 2.0
6056
*
6157
* The enumerated values for this property are expected to expand in the future. When processing this property, check
6258
* for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the

modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcAddressPrefixOptions.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,9 @@ public String vpcId() {
171171
/**
172172
* Gets the cidr.
173173
*
174-
* The IPv4 range of the address prefix, expressed in CIDR format. The request must not overlap with any existing
174+
* The IPv4 range of the address prefix, expressed in CIDR format. The range must not overlap with any existing
175175
* address prefixes in the VPC or any of the following reserved address ranges:
176+
*
176177
* - `127.0.0.0/8` (IPv4 loopback addresses)
177178
* - `161.26.0.0/16` (IBM services)
178179
* - `166.8.0.0/14` (Cloud Service Endpoints)

modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcOptions.java

+6-4
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@
2020
public class CreateVpcOptions extends GenericModel {
2121

2222
/**
23-
* Indicates whether a default address prefix will be automatically created for each zone in this VPC. If `manual`,
24-
* this VPC will be created with no default address prefixes.
23+
* Indicates whether a [default address prefix](https://cloud.ibm.com/docs/vpc?topic=vpc-configuring-address-prefixes)
24+
* will be automatically created for each zone in this VPC. If `manual`, this VPC will be created with no default
25+
* address prefixes.
2526
*
2627
* Since address prefixes are managed identically regardless of whether they were automatically created, the value is
2728
* not preserved as a VPC property.
@@ -140,8 +141,9 @@ public Builder newBuilder() {
140141
/**
141142
* Gets the addressPrefixManagement.
142143
*
143-
* Indicates whether a default address prefix will be automatically created for each zone in this VPC. If `manual`,
144-
* this VPC will be created with no default address prefixes.
144+
* Indicates whether a [default address prefix](https://cloud.ibm.com/docs/vpc?topic=vpc-configuring-address-prefixes)
145+
* will be automatically created for each zone in this VPC. If `manual`, this VPC will be created with no default
146+
* address prefixes.
145147
*
146148
* Since address prefixes are managed identically regardless of whether they were automatically created, the value is
147149
* not preserved as a VPC property.

modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcRouteOptions.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,9 @@ public String action() {
243243
/**
244244
* Gets the name.
245245
*
246-
* The user-defined name for this route. If unspecified, the name will be a hyphenated list of randomly-selected
247-
* words. Names must be unique within the VPC routing table the route resides in.
246+
* The user-defined name for this route. Names starting with `ibm-` are not allowed. If unspecified, the name will be
247+
* a hyphenated list of randomly-selected words. Names must be unique within the VPC routing table the route resides
248+
* in.
248249
*
249250
* @return the name
250251
*/

modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcRoutingTableOptions.java

+44-9
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public class CreateVpcRoutingTableOptions extends GenericModel {
2626
protected List<ResourceFilter> acceptRoutesFrom;
2727
protected String name;
2828
protected Boolean routeDirectLinkIngress;
29+
protected Boolean routeInternetIngress;
2930
protected Boolean routeTransitGatewayIngress;
3031
protected Boolean routeVpcZoneIngress;
3132
protected List<RoutePrototype> routes;
@@ -38,6 +39,7 @@ public static class Builder {
3839
private List<ResourceFilter> acceptRoutesFrom;
3940
private String name;
4041
private Boolean routeDirectLinkIngress;
42+
private Boolean routeInternetIngress;
4143
private Boolean routeTransitGatewayIngress;
4244
private Boolean routeVpcZoneIngress;
4345
private List<RoutePrototype> routes;
@@ -52,6 +54,7 @@ private Builder(CreateVpcRoutingTableOptions createVpcRoutingTableOptions) {
5254
this.acceptRoutesFrom = createVpcRoutingTableOptions.acceptRoutesFrom;
5355
this.name = createVpcRoutingTableOptions.name;
5456
this.routeDirectLinkIngress = createVpcRoutingTableOptions.routeDirectLinkIngress;
57+
this.routeInternetIngress = createVpcRoutingTableOptions.routeInternetIngress;
5558
this.routeTransitGatewayIngress = createVpcRoutingTableOptions.routeTransitGatewayIngress;
5659
this.routeVpcZoneIngress = createVpcRoutingTableOptions.routeVpcZoneIngress;
5760
this.routes = createVpcRoutingTableOptions.routes;
@@ -158,6 +161,17 @@ public Builder routeDirectLinkIngress(Boolean routeDirectLinkIngress) {
158161
return this;
159162
}
160163

164+
/**
165+
* Set the routeInternetIngress.
166+
*
167+
* @param routeInternetIngress the routeInternetIngress
168+
* @return the CreateVpcRoutingTableOptions builder
169+
*/
170+
public Builder routeInternetIngress(Boolean routeInternetIngress) {
171+
this.routeInternetIngress = routeInternetIngress;
172+
return this;
173+
}
174+
161175
/**
162176
* Set the routeTransitGatewayIngress.
163177
*
@@ -202,6 +216,7 @@ protected CreateVpcRoutingTableOptions(Builder builder) {
202216
acceptRoutesFrom = builder.acceptRoutesFrom;
203217
name = builder.name;
204218
routeDirectLinkIngress = builder.routeDirectLinkIngress;
219+
routeInternetIngress = builder.routeInternetIngress;
205220
routeTransitGatewayIngress = builder.routeTransitGatewayIngress;
206221
routeVpcZoneIngress = builder.routeVpcZoneIngress;
207222
routes = builder.routes;
@@ -257,36 +272,56 @@ public String name() {
257272
* Gets the routeDirectLinkIngress.
258273
*
259274
* If set to `true`, this routing table will be used to route traffic that originates from [Direct
260-
* Link](https://cloud.ibm.com/docs/dl/) to this VPC. For this to succeed, the VPC must not already have a routing
261-
* table with this property set to `true`.
275+
* Link](https://cloud.ibm.com/docs/dl) to this VPC. The VPC must not already have a routing table with this property
276+
* set to `true`.
262277
*
263278
* Incoming traffic will be routed according to the routing table with one exception: routes with an `action` of
264279
* `deliver` are treated as `drop` unless the `next_hop` is an IP address bound to a network interface on a subnet in
265280
* the route's `zone`. Therefore, if an incoming packet matches a route with a `next_hop` of an internet-bound IP
266281
* address or a VPN gateway connection, the packet will be dropped.
267282
*
283+
* If [Classic Access](https://cloud.ibm.com/docs/vpc?topic=vpc-setting-up-access-to-classic-infrastructure) is
284+
* enabled for this VPC, and this property is set to `true`, its incoming traffic will also be routed according to
285+
* this routing table.
286+
*
268287
* @return the routeDirectLinkIngress
269288
*/
270289
public Boolean routeDirectLinkIngress() {
271290
return routeDirectLinkIngress;
272291
}
273292

293+
/**
294+
* Gets the routeInternetIngress.
295+
*
296+
* If set to `true`, this routing table will be used to route traffic that originates from the internet. For this to
297+
* succeed, the VPC must not already have a routing table with this property set to `true`.
298+
*
299+
* Incoming traffic will be routed according to the routing table with two exceptions:
300+
* - Traffic destined for IP addresses associated with public gateways will not be
301+
* subject to routes in this routing table.
302+
* - Routes with an action of deliver are treated as drop unless the `next_hop` is an
303+
* IP address bound to a network interface on a subnet in the route's `zone`.
304+
* Therefore, if an incoming packet matches a route with a `next_hop` of an
305+
* internet-bound IP address or a VPN gateway connection, the packet will be dropped.
306+
*
307+
* @return the routeInternetIngress
308+
*/
309+
public Boolean routeInternetIngress() {
310+
return routeInternetIngress;
311+
}
312+
274313
/**
275314
* Gets the routeTransitGatewayIngress.
276315
*
277316
* If set to `true`, this routing table will be used to route traffic that originates from [Transit
278-
* Gateway](https://cloud.ibm.com/cloud/transit-gateway/) to this VPC. For this to succeed, the VPC must not already
279-
* have a routing table with this property set to `true`.
317+
* Gateway](https://cloud.ibm.com/docs/transit-gateway) to this VPC. The VPC must not already have a routing table
318+
* with this property set to `true`.
280319
*
281320
* Incoming traffic will be routed according to the routing table with one exception: routes with an `action` of
282321
* `deliver` are treated as `drop` unless the `next_hop` is an IP address bound to a network interface on a subnet in
283322
* the route's `zone`. Therefore, if an incoming packet matches a route with a `next_hop` of an internet-bound IP
284323
* address or a VPN gateway connection, the packet will be dropped.
285324
*
286-
* If [Classic Access](https://cloud.ibm.com/docs/vpc?topic=vpc-setting-up-access-to-classic-infrastructure) is
287-
* enabled for this VPC, and this property is set to `true`, its incoming traffic will also be routed according to
288-
* this routing table.
289-
*
290325
* @return the routeTransitGatewayIngress
291326
*/
292327
public Boolean routeTransitGatewayIngress() {
@@ -297,7 +332,7 @@ public Boolean routeTransitGatewayIngress() {
297332
* Gets the routeVpcZoneIngress.
298333
*
299334
* If set to `true`, this routing table will be used to route traffic that originates from subnets in other zones in
300-
* this VPC. For this to succeed, the VPC must not already have a routing table with this property set to `true`.
335+
* this VPC. The VPC must not already have a routing table with this property set to `true`.
301336
*
302337
* Incoming traffic will be routed according to the routing table with one exception: routes with an `action` of
303338
* `deliver` are treated as `drop` unless the `next_hop` is an IP address within the VPC's address prefix ranges.

modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/model/CreateVpcRoutingTableRouteOptions.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,9 @@ public String action() {
273273
/**
274274
* Gets the name.
275275
*
276-
* The user-defined name for this route. If unspecified, the name will be a hyphenated list of randomly-selected
277-
* words. Names must be unique within the VPC routing table the route resides in.
276+
* The user-defined name for this route. Names starting with `ibm-` are not allowed. If unspecified, the name will be
277+
* a hyphenated list of randomly-selected words. Names must be unique within the VPC routing table the route resides
278+
* in.
278279
*
279280
* @return the name
280281
*/

0 commit comments

Comments
 (0)