Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"files": "^.secrets.baseline$",
"lines": null
},
"generated_at": "2025-07-23T10:15:23Z",
"generated_at": "2025-07-31T17:37:03Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
Expand Down Expand Up @@ -136,7 +136,7 @@
"hashed_secret": "9bf92274d58c3655b80055ad2ab17540f71d3058",
"is_secret": false,
"is_verified": false,
"line_number": 3280,
"line_number": 3285,
"type": "Secret Keyword",
"verified_result": null
}
Expand Down
80 changes: 80 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,44 @@ Response<TemplateResponse> eventStreamsTemplateResponse = eventNotificationsServ

For EventStreams template supported template type value: event_streams.notification

#### Code Engine Application Template

```java
TemplateConfigOneOfCodeEngineApplicationTemplateConfig codeEngineApplicationTemplateConfig = new TemplateConfigOneOfCodeEngineApplicationTemplateConfig.Builder()
.body("base 64 encoded json content")
.build();

CreateTemplateOptions ceAppTemplateNotificationOptions = new CreateTemplateOptions.Builder()
.instanceId(<instanceId>)
.name(<name>)
.description(<description>)
.type(<template-type>)
.params(codeEngineApplicationTemplateConfig)
.build();

Response<TemplateResponse> ceAppTemplateResponse = eventNotificationsService.createTemplate(ceAppTemplateNotificationOptions).execute();
```

#### Code Engine Job Template

```java
TemplateConfigOneOfCodeEngineJobTemplateConfig codeEngineJobTemplateConfig = new TemplateConfigOneOfCodeEngineJobTemplateConfig.Builder()
.body("base 64 encoded json content")
.build();

CreateTemplateOptions ceJobTemplateNotificationOptions = new CreateTemplateOptions.Builder()
.instanceId(<instanceId>)
.name(<name>)
.description(<description>)
.type(<template-type>)
.params(codeEngineJobTemplateConfig)
.build();

Response<TemplateResponse> ceAppTemplateResponse = eventNotificationsService.createTemplate(ceJobTemplateNotificationOptions).execute();
```

For Code Engine template supported template type values: ibmenapp.notification and ibmenjob.notification

### List Templates

```java
Expand Down Expand Up @@ -768,6 +806,46 @@ Response<Template> eventStreamsTemplateResponse = service.replaceTemplate(update

For EventStreams supported template type values: event_streams.notification

#### Code Engine Application Template

```java
TemplateConfigOneOfCodeEngineApplicationTemplateConfig codeEngineApplicationTemplateConfig = new TemplateConfigOneOfCodeEngineApplicationTemplateConfig.Builder()
.body("base 64 encoded json content")
.build();

ReplaceTemplateOptions ceAppTemplateNotificationOptions = new ReplaceTemplateOptions.Builder()
.instanceId(<instanceId>)
.id(<codeEngineApplicationTemplateID>)
.name(<name>)
.description(<description>)
.type(<template-type>)
.params(codeEngineApplicationTemplateConfig)
.build();

Response<Template> ceAppTemplateResponse = eventNotificationsService.replaceTemplate(ceAppTemplateNotificationOptions).execute();
```

#### Code Engine Job Template

```java
TemplateConfigOneOfCodeEngineJobTemplateConfig codeEngineJobTemplateConfig = new TemplateConfigOneOfCodeEngineJobTemplateConfig.Builder()
.body("base 64 encoded json content")
.build();

ReplaceTemplateOptions ceJobTemplateNotificationOptions = new ReplaceTemplateOptions.Builder()
.instanceId(<instanceId>)
.id(<codeEngineJobTemplateID>)
.name(<name>)
.description(<description>)
.type(<template-type>)
.params(codeEngineJobTemplateConfig)
.build();

Response<Template> ceAppTemplateResponse = eventNotificationsService.replaceTemplate(ceJobTemplateNotificationOptions).execute();
```

For Code Engine template supported template type values: ibmenapp.notification and ibmenjob.notification

### Delete Template

```java
Expand Down Expand Up @@ -1341,6 +1419,8 @@ Find `event_notifications.env.hide` in the repo and rename it to `event_notifica
- `EVENT_NOTIFICATIONS_EVENT_STREAMS_CRN` - Event Streams instance CRN
- `EVENT_NOTIFICATIONS_EVENT_STREAMS_TOPIC` - Event Streams instance Topic name
- `EVENT_NOTIFICATIONS_EVENT_STREAMS_ENDPOINT` - Event streams end point
- `EVENT_NOTIFICATIONS_CODE_ENGINE_APP_TEMPLATE_BODY` - base 64 encoded json body for Code Engine Application
- `EVENT_NOTIFICATIONS_CODE_ENGINE_JOB_TEMPLATE_BODY` - base 64 encoded json body for Code Engine Job

## Questions

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
* - SubscriptionAttributesSlackDirectMessageAttributesResponse
* - SubscriptionAttributesServiceNowAttributesResponse
* - SubscriptionAttributesEventStreamsAttributesResponse
* - SubscriptionAttributesCodeEngineAttributesResponse
*/
public class SubscriptionAttributes extends DynamicModel<Object> {

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* (C) Copyright IBM Corp. 2025.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package com.ibm.cloud.eventnotifications.event_notifications.v1.model;

/**
* The attributes for a Code Engine response.
*/
public class SubscriptionAttributesCodeEngineAttributesResponse extends SubscriptionAttributes {


public SubscriptionAttributesCodeEngineAttributesResponse() {
super();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
* - SubscriptionCreateAttributesSlackDirectMessageAttributes
* - SubscriptionCreateAttributesServiceNowAttributes
* - SubscriptionCreateAttributesEventstreamsAttributes
* - SubscriptionCreateAttributesCodeEngineAttributes
*/
public class SubscriptionCreateAttributes extends GenericModel {

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
/*
* (C) Copyright IBM Corp. 2025.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package com.ibm.cloud.eventnotifications.event_notifications.v1.model;

/**
* The attributes for a Code Engine subscription.
*/
public class SubscriptionCreateAttributesCodeEngineAttributes extends SubscriptionCreateAttributes {


/**
* Builder.
*/
public static class Builder {
private String templateIdNotification;

/**
* Instantiates a new Builder from an existing SubscriptionCreateAttributesCodeEngineAttributes instance.
*
* @param subscriptionCreateAttributesCodeEngineAttributes the instance to initialize the Builder with
*/
public Builder(SubscriptionCreateAttributes subscriptionCreateAttributesCodeEngineAttributes) {
this.templateIdNotification = subscriptionCreateAttributesCodeEngineAttributes.templateIdNotification;
}

/**
* Instantiates a new builder.
*/
public Builder() {
}

/**
* Builds a SubscriptionCreateAttributesCodeEngineAttributes.
*
* @return the new SubscriptionCreateAttributesCodeEngineAttributes instance
*/
public SubscriptionCreateAttributesCodeEngineAttributes build() {
return new SubscriptionCreateAttributesCodeEngineAttributes(this);
}

/**
* Set the templateIdNotification.
*
* @param templateIdNotification the templateIdNotification
* @return the SubscriptionCreateAttributesCodeEngineAttributes builder
*/
public Builder templateIdNotification(String templateIdNotification) {
this.templateIdNotification = templateIdNotification;
return this;
}
}

protected SubscriptionCreateAttributesCodeEngineAttributes() { }

protected SubscriptionCreateAttributesCodeEngineAttributes(Builder builder) {
templateIdNotification = builder.templateIdNotification;
}

/**
* New builder.
*
* @return a SubscriptionCreateAttributesCodeEngineAttributes builder
*/
public Builder newBuilder() {
return new Builder(this);
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
* - SubscriptionUpdateAttributesSlackDirectMessageUpdateAttributes
* - SubscriptionUpdateAttributesServiceNowAttributes
* - SubscriptionUpdateAttributesEventstreamsAttributes
* - SubscriptionUpdateAttributesCodeEngineAttributes
*/
public class SubscriptionUpdateAttributes extends GenericModel {

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
/*
* (C) Copyright IBM Corp. 2025.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package com.ibm.cloud.eventnotifications.event_notifications.v1.model;

/**
* The attributes for a Code Engine subscription.
*/
public class SubscriptionUpdateAttributesCodeEngineAttributes extends SubscriptionUpdateAttributes {


/**
* Builder.
*/
public static class Builder {
private String templateIdNotification;

/**
* Instantiates a new Builder from an existing SubscriptionUpdateAttributesCodeEngineAttributes instance.
*
* @param subscriptionUpdateAttributesCodeEngineAttributes the instance to initialize the Builder with
*/
public Builder(SubscriptionUpdateAttributes subscriptionUpdateAttributesCodeEngineAttributes) {
this.templateIdNotification = subscriptionUpdateAttributesCodeEngineAttributes.templateIdNotification;
}

/**
* Instantiates a new builder.
*/
public Builder() {
}

/**
* Builds a SubscriptionUpdateAttributesCodeEngineAttributes.
*
* @return the new SubscriptionUpdateAttributesCodeEngineAttributes instance
*/
public SubscriptionUpdateAttributesCodeEngineAttributes build() {
return new SubscriptionUpdateAttributesCodeEngineAttributes(this);
}

/**
* Set the templateIdNotification.
*
* @param templateIdNotification the templateIdNotification
* @return the SubscriptionUpdateAttributesCodeEngineAttributes builder
*/
public Builder templateIdNotification(String templateIdNotification) {
this.templateIdNotification = templateIdNotification;
return this;
}
}

protected SubscriptionUpdateAttributesCodeEngineAttributes() { }

protected SubscriptionUpdateAttributesCodeEngineAttributes(Builder builder) {
templateIdNotification = builder.templateIdNotification;
}

/**
* New builder.
*
* @return a SubscriptionUpdateAttributesCodeEngineAttributes builder
*/
public Builder newBuilder() {
return new Builder(this);
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
* - TemplateConfigOneOfWebhookTemplateConfig
* - TemplateConfigOneOfPagerdutyTemplateConfig
* - TemplateConfigOneOfEventStreamsTemplateConfig
* - TemplateConfigOneOfCodeEngineApplicationTemplateConfig
* - TemplateConfigOneOfCodeEngineJobTemplateConfig
*/
public class TemplateConfigOneOf extends GenericModel {

Expand Down
Loading