You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: service-bind.md
+5-2Lines changed: 5 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
copyright:
4
4
years: 2020, 2022
5
-
lastupdated: "2022-01-12"
5
+
lastupdated: "2022-01-14"
6
6
7
7
keywords: binding in code engine, service bind in code engine, integrating services in code engine, integrating service with app in code engine, integrating service with job in code engine, adding credentials for service in code engine, service bind, access, prefix, CE_SERVICES, bind, bound, unbinding, project
8
8
@@ -74,6 +74,9 @@ What policies does a user need to create a {{site.data.keyword.codeengineshort}}
74
74
75
75
Use environment variables to access your bound service credentials with one of following methods: the [`CE_SERVICES`](#ce-services) method or the [Prefix](#prefix-method) method.
76
76
77
+
If your application or job wants to talk to a bound service by using private networking and the service has both `private` and `direct` endpoints (such as {{site.data.keyword.cos_full_notm}}), then the `direct` endpoints must be used.
78
+
{: important}
79
+
77
80
### `CE_SERVICES` method
78
81
{: #ce-services}
79
82
@@ -165,7 +168,7 @@ Before you begin
165
168
### Option 1: Use the default service binding access policies
166
169
{: #service-bind-option1}
167
170
168
-
When you create a service binding in a project, {{site.data.keyword.codeengineshort}} checks to see if the project is already configured forservice binding. If a project is not configured, {{site.data.keyword.codeengineshort}} creates a Service ID for the project with Operator and Manager access for all servicesin the project resource group.
171
+
When you create a service binding in a project, {{site.data.keyword.codeengineshort}} checks to see whether the project is already configured forservice binding. If a project is not configured, {{site.data.keyword.codeengineshort}} creates a Service ID for the project with Operator and Manager access for all servicesin the project resource group.
169
172
170
173
If you have insufficient permissions to create this Service ID, then you receive an error and the service binding is not created. Talk to your account administrator about your access policies, or ask them to configure the {{site.data.keyword.codeengineshort}} project for you.
@@ -26,6 +26,9 @@ To get started, you must [create an {{site.data.keyword.cos_full_notm}} service
26
26
27
27
Your {{site.data.keyword.cos_short}} bucket must be a regional bucket that is located in the same region as your {{site.data.keyword.codeengineshort}} project. Cross-region and single-site buckets are not supported. For more information about setting up the {{site.data.keyword.cos_full_notm}} event producer, see [Getting started with {{site.data.keyword.cos_short}}](/docs/cloud-object-storage?topic=cloud-object-storage-getting-started-cloud-object-storage).
28
28
29
+
If your application or job that is receiving events wants to talk to a service by using private networking and the service has both `private` and `direct` endpoints (such as {{site.data.keyword.cos_full_notm}}), then the `direct` endpoints must be used.
30
+
{: important}
31
+
29
32
30
33
31
34
## Assigning the Notifications Manager role to {{site.data.keyword.codeengineshort}}
@@ -78,7 +81,7 @@ Complete the following steps to create and update a {{site.data.keyword.cos_full
78
81
4. From the Create an event subscription page, complete the following steps.
79
82
1. For **Event type**, select the Cloud Object Storage tile. Click **Next**.
80
83
2. For **General**, provide a name for the {{site.data.keyword.cos_short}} subscription, for example, `mycos`. You can optionally provide event attributes. Note that if the {{site.data.keyword.cos_short}} event consumer is an application, event attributes are available as HTTP headers. If the event consumer is a job, event attributes are available as environment variables. Click **Next** to proceed.
81
-
3. For **Bucket event details**, select or type the name of an existing {{site.data.keyword.cos_short}} bucket. Specify the types of changes for your object and optionally provide an object name prefix or suffix to filter objects in the bucket that will trigger events for the subscription. Click **Next** to proceed.
84
+
3. For **Bucket event details**, select or type the name of an existing {{site.data.keyword.cos_short}} bucket. Specify the types of changes for your object and optionally provide an object name prefix or suffix to filter objects in the bucket that to trigger events for the subscription. Click **Next** to proceed.
82
85
4. For **Event consumer**, specify the application to receive events. Notice that you can choose from a list of defined applications and jobs. For this example, use the `myapp` application that references the `icr.io/codeengine/cos-listen` image. If your app does not exist, you can provide the name of your application and [create your application](/docs/codeengine?topic=codeengine-deploy-app#deploy-app-console) after you create the {{site.data.keyword.cos_short}} subscription. For applications only, you can optionally specify a path. By default, events are routed to the root URL of the destination application. You can send events to a different destination within the app by specifying a path. For example, if your subscription path specifies `/events`, the events are sent to `https://<base application URL>/events`. Click **Next** to proceed.
83
86
5. For **Summary**, review the settings for your {{site.data.keyword.cos_short}} event subscription and make changes if needed. When ready, click **Create** to create the {{site.data.keyword.cos_short}} subscription.
84
87
@@ -211,7 +214,7 @@ The following table describes the headers for {{site.data.keyword.cos_short}} ev
211
214
| Header | Description |
212
215
|----------|------------------|
213
216
|`ce-id`| A unique identifier forthe event, unless an event is replayed,in which case, it is assigned the same ID. |
214
-
|`ce-source`| A URI-reference that indicates where this event originated from within the event producer. For {{site.data.keyword.cos_short}} events, this is `https://cloud.ibm.com/catalog/services/cloud-object-storage/[BUCKET_NAME]` where `[BUCKET_NAME]` is the name of the bucket that contains the object. |
217
+
|`ce-source`| A URI-reference that indicates where this event originated from within the event producer. For {{site.data.keyword.cos_short}} events, this value is `https://cloud.ibm.com/catalog/services/cloud-object-storage/[BUCKET_NAME]` where `[BUCKET_NAME]` is the name of the bucket that contains the object. |
215
218
|`ce-specversion`| The version of the `CloudEvents` spec. This value is always `1.0`. |
216
219
|`ce-subject`| Indicates the resource about which the event is related. For {{site.data.keyword.cos_short}} events, this is the name of the object (or key) that was acted upon. |
217
220
|`ce-time`| The time that the event was generated. |
@@ -301,7 +304,7 @@ Complete the following steps to create and update a {{site.data.keyword.cos_full
301
304
4. From the Create an event subscription page, complete the following steps.
2. For **General**, provide a name for the {{site.data.keyword.cos_short}} subscription, for example, `mycos-job`. You can optionally provide event attributes. When the event consumer is a job, event attributes are available as environment variables. Click **Next** to proceed.
304
-
3. For **Bucket event details**, selectortype the name of an existing {{site.data.keyword.cos_short}} bucket. Specify the types of changes foryour object and optionally provide an object name prefix or suffix to filter objectsin the bucket that will trigger events for the subscription. Click **Next** to proceed.
307
+
3. For **Bucket event details**, selectortype the name of an existing {{site.data.keyword.cos_short}} bucket. Specify the types of changes foryour object and optionally provide an object name prefix or suffix to filter objectsin the bucket to trigger events for the subscription. Click **Next** to proceed.
305
308
4. For **Event consumer**, specify the job to receive events. Notice that you can choose from a list of defined jobs. For this example, use the `myjob` job that references the `icr.io/codeengine/codeengine` image. If your job does not exist, you can specify the name of your job and [create your job](/docs/codeengine?topic=codeengine-create-job#create-job-ui) after you create the {{site.data.keyword.cos_short}} subscription. Click **Next** to proceed.
306
309
5. For **Summary**, review the settings for your {{site.data.keyword.cos_short}} event subscription and make changes if needed. When ready, click **Create** to create the {{site.data.keyword.cos_short}} subscription.
307
310
@@ -493,7 +496,7 @@ The following table describes the environment variables that are specific to {{s
493
496
|----------|------------------|
494
497
|`CE_DATA`| The data (body) for the event. See [`CE_DATA`for {{site.data.keyword.cos_short}} events](/docs/codeengine?topic=codeengine-eventing-cosevent-producer#subcos-envvar-cedata). |
495
498
|`CE_ID`| A unique identifier forthe event, unless an event is replayed,in which case, it is assigned the same ID. |
496
-
|`CE_SOURCE`| A URI-reference that indicates where this event originated from within the event producer. For {{site.data.keyword.cos_short}} events, this is `https://cloud.ibm.com/catalog/services/cloud-object-storage/[BUCKET_NAME]` where `[BUCKET_NAME]` is the name of the bucket that contains the object. |
499
+
|`CE_SOURCE`| A URI-reference that indicates where this event originated from within the event producer. For {{site.data.keyword.cos_short}} events, this value is `https://cloud.ibm.com/catalog/services/cloud-object-storage/[BUCKET_NAME]` where `[BUCKET_NAME]` is the name of the bucket that contains the object. |
497
500
|`CE_SPECVERSION`| The version of the `CloudEvents` spec. This value is always `1.0`. |
498
501
|`CE_TIME`| The time that the event was generated. |
499
502
|`CE_TYPE`| The type of the event. For {{site.data.keyword.cos_short}} events, this is `com.ibm.cloud.cos.document.[ACTION]` where `[ACTION]` is either `write` or `delete`. |
0 commit comments