Java client library to interact with the Code Engine API.
- Overview
- Prerequisites
- Installation
- Using the SDK
- Breaking Changes (March 2026)
- Questions
- Issues
- Open source @ IBM
- Contributing
- License
The IBM Cloud Code Engine Java SDK allows developers to programmatically interact with the following IBM Cloud services:
| Service Name | Artifact Coordinates |
|---|---|
| Code Engine | com.ibm.cloud.code-engine:5.0.0 |
- An IBM Cloud account.
- An IAM API key to allow the SDK to access your account. Create one here.
- Java 8 or above.
The current version of this SDK is: 5.0.0
Each service's artifact coordinates are listed in the table above.
The project artifacts are published on the public Maven Central artifact repository. This is the default public repository used by maven when searching for dependencies. To use this repository within a gradle build, please see this link.
To use a particular service, define a dependency that contains the artifact coordinates (group id, artifact id and version) for the service. Here are examples for maven and gradle:
<dependency>
<groupId>com.ibm.cloud</groupId>
<artifactId>code-engine</artifactId>
<version>5.0.0</version>
</dependency>compile 'com.ibm.cloud:code-engine:5.0.0'Examples and a demo are available in the module examples folder.
For general SDK usage information, please see this link
-
Method renames (pluralization) in
CodeEngineservice Update list calls and their option types:// before ServiceCall<AllowedOutboundDestinationList> call = codeEngine.listAllowedOutboundDestination(new ListAllowedOutboundDestinationOptions.Builder(projectId).build()); // after ServiceCall<AllowedOutboundDestinationList> call = codeEngine.listAllowedOutboundDestinations(new ListAllowedOutboundDestinationsOptions.Builder(projectId).build());
// before ServiceCall<PersistentDataStoreList> call = codeEngine.listPersistentDataStore(new ListPersistentDataStoreOptions.Builder(projectId).build()); // after ServiceCall<PersistentDataStoreList> call = codeEngine.listPersistentDataStores(new ListPersistentDataStoresOptions.Builder(projectId).build());
-
Options classes renamed Replace imports and usage:
// before import com.ibm.cloud.code_engine.code_engine.v2.model.ListAllowedOutboundDestinationOptions; ListAllowedOutboundDestinationOptions opts = new ListAllowedOutboundDestinationOptions.Builder(projectId) .limit(100) .start("token") .build(); // after import com.ibm.cloud.code_engine.code_engine.v2.model.ListAllowedOutboundDestinationsOptions; ListAllowedOutboundDestinationsOptions opts = new ListAllowedOutboundDestinationsOptions.Builder(projectId) .limit(100) .start("token") .build();
// before import com.ibm.cloud.code_engine.code_engine.v2.model.ListPersistentDataStoreOptions; ListPersistentDataStoreOptions opts = new ListPersistentDataStoreOptions.Builder(projectId) .limit(100) .start("token") .build(); // after import com.ibm.cloud.code_engine.code_engine.v2.model.ListPersistentDataStoresOptions; ListPersistentDataStoresOptions opts = new ListPersistentDataStoresOptions.Builder(projectId) .limit(100) .start("token") .build();
-
Pager classes renamed Switch to the new pager types and constructors:
// before import com.ibm.cloud.code_engine.code_engine.v2.model.AllowedOutboundDestinationPager; AllowedOutboundDestinationPager pager = new AllowedOutboundDestinationPager(codeEngine, oldOpts); // after import com.ibm.cloud.code_engine.code_engine.v2.model.AllowedOutboundDestinationsPager; AllowedOutboundDestinationsPager pager = new AllowedOutboundDestinationsPager(codeEngine, newOpts);
// before import com.ibm.cloud.code_engine.code_engine.v2.model.PersistentDataStorePager; PersistentDataStorePager pager = new PersistentDataStorePager(codeEngine, oldOpts); // after import com.ibm.cloud.code_engine.code_engine.v2.model.PersistentDataStoresPager; PersistentDataStoresPager pager = new PersistentDataStoresPager(codeEngine, newOpts);
-
Builder parameter order changed for CIDR prototype
AllowedOutboundDestinationPrototypeCidrBlockDataPrototype.Builderrequired-args constructor signature changed:// before: Builder(String type, String cidrBlock, String name) var proto = new AllowedOutboundDestinationPrototypeCidrBlockDataPrototype.Builder( "cidr_block", "10.0.0.0/24", "allow-egress" ).build(); // after: Builder(String type, String name, String cidrBlock) var proto = new AllowedOutboundDestinationPrototypeCidrBlockDataPrototype.Builder( "cidr_block", "allow-egress", "10.0.0.0/24" ).build();
Also note:
nameis now treated as required at the base prototype level and is explicitly present on the CIDR builder. -
Patch model changes (remove
type, new patch for Private Path) Do not settypein patch payloads; the field and its builder setter were removed from CIDR patch:// CIDR patch var patch = new AllowedOutboundDestinationPatchCidrBlockDataPatch.Builder() .cidrBlock("10.0.1.0/24") .build();
New patch class for Private Path properties:
var ppPatch = new AllowedOutboundDestinationPatchPrivatePathServiceGatewayDataPatch.Builder() .isolationPolicy(AllowedOutboundDestinationPatchPrivatePathServiceGatewayDataPatch.IsolationPolicy.DEDICATED) .build();
-
New prototype to create Private Path destinations Use the new prototype when creating an allowed outbound destination that connects to a VPC Private Path service:
var ppProto = new AllowedOutboundDestinationPrototypePrivatePathServiceGatewayDataPrototype.Builder( AllowedOutboundDestinationPrototype.Type.PRIVATE_PATH_SERVICE_GATEWAY, "pps-to-service-x", "<private-path-service-gateway-crn>" ) .isolationPolicy(AllowedOutboundDestinationPrototypePrivatePathServiceGatewayDataPrototype.IsolationPolicy.SHARED) .build();
Ensure your code handles both types:
"cidr_block"and"private_path_service_gateway". -
Model/enums additions affecting branching/validation If your client code switches on type/status/isolation policy strings, update cases to include the new values:
// AllowedOutboundDestination.Type CIDR_BLOCK PRIVATE_PATH_SERVICE_GATEWAY // AllowedOutboundDestination.Status READY FAILED DEPLOYING // AllowedOutboundDestination.IsolationPolicy SHARED DEDICATED
New fields were added to
AllowedOutboundDestination:-
name -
status -
statusDetails(with typesAllowedOutboundStatusDetails,AllowedOutboundStatusDetailsPrivatePathServiceGatewayStatusDetails) -
privatePathServiceGatewayCrn -
isolationPolicyAnd new helper models:
-
EndpointGatewayDetails -
PrivatePathServiceGatewayDetails
-
-
Examples updated (if you copy/paste from
CodeEngineExamples)- Method usage and region tags renamed:
listAllowedOutboundDestination→listAllowedOutboundDestinations(andbegin/endtags)listPersistentDataStore→listPersistentDataStores(andbegin/endtags)
- Pager classes updated to plural forms.
- CIDR prototype builder now sets
.name(..)before.cidrBlock(..)and matches the new constructor order.
- Method usage and region tags renamed:
Action checklist:
- Rename service methods:
listAllowedOutboundDestinations,listPersistentDataStores.- Replace options classes and imports with pluralized names.
- Replace pager classes with pluralized versions and update example region tags if referenced.
- Adjust CIDR prototype builder constructor order to
(type, name, cidrBlock).- Remove any
typeusage from patch builders; use CIDR or Private Path patch models as appropriate.- Use the new Private Path prototype for creating Private Path destinations; add handling for new enums (
PRIVATE_PATH_SERVICE_GATEWAY, status, isolation policy).
If you are having difficulties using this SDK or have a question about the IBM Cloud services, please ask a question at Stack Overflow.
If you encounter an issue with the project, you are welcome to submit a bug report. Before that, please search for similar issues. It's possible that someone has already reported the problem.
Find more open source projects on the IBM Github Page
See CONTRIBUTING.
The IBM Cloud Code Engine Java SDK is released under the Apache 2.0 license. The license's full text can be found in LICENSE.