Skip to content

Commit 529b5fb

Browse files
author
awstools
committed
feat(client-eventbridge): Amazon EventBridge introduces KMS customer-managed key (CMK) encryption support for custom and partner events published on EventBridge Event Bus (including default bus) and UpdateEventBus API.
1 parent 1f62640 commit 529b5fb

38 files changed

+1311
-488
lines changed

clients/client-eventbridge/README.md

+17-9
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@
66

77
AWS SDK for JavaScript EventBridge Client for Node.js, Browser and React Native.
88

9-
<p>Amazon EventBridge helps you to respond to state changes in your Amazon Web Services resources. When your
10-
resources change state, they automatically send events to an event stream. You can create
11-
rules that match selected events in the stream and route them to targets to take action. You
12-
can also use rules to take action on a predetermined schedule. For example, you can configure
13-
rules to:</p>
9+
<p>Amazon EventBridge helps you to respond to state changes in your Amazon Web Services
10+
resources. When your resources change state, they automatically send events to an event
11+
stream. You can create rules that match selected events in the stream and route them to
12+
targets to take action. You can also use rules to take action on a predetermined schedule. For
13+
example, you can configure rules to:</p>
1414
<ul>
1515
<li>
16-
<p>Automatically invoke an Lambda function to update DNS entries when an event
17-
notifies you that Amazon EC2 instance enters the running state.</p>
16+
<p>Automatically invoke an Lambda function to update DNS entries when an
17+
event notifies you that Amazon EC2 instance enters the running state.</p>
1818
</li>
1919
<li>
20-
<p>Direct specific API records from CloudTrail to an Amazon Kinesis data stream for
21-
detailed analysis of potential security or availability risks.</p>
20+
<p>Direct specific API records from CloudTrail to an Amazon Kinesis
21+
data stream for detailed analysis of potential security or availability risks.</p>
2222
</li>
2323
<li>
2424
<p>Periodically invoke a built-in target to create a snapshot of an Amazon EBS
@@ -671,3 +671,11 @@ UpdateEndpoint
671671
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/eventbridge/command/UpdateEndpointCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-eventbridge/Interface/UpdateEndpointCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-eventbridge/Interface/UpdateEndpointCommandOutput/)
672672

673673
</details>
674+
<details>
675+
<summary>
676+
UpdateEventBus
677+
</summary>
678+
679+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/eventbridge/command/UpdateEventBusCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-eventbridge/Interface/UpdateEventBusCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-eventbridge/Interface/UpdateEventBusCommandOutput/)
680+
681+
</details>

clients/client-eventbridge/src/EventBridge.ts

+30-9
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,11 @@ import {
242242
UpdateEndpointCommandInput,
243243
UpdateEndpointCommandOutput,
244244
} from "./commands/UpdateEndpointCommand";
245+
import {
246+
UpdateEventBusCommand,
247+
UpdateEventBusCommandInput,
248+
UpdateEventBusCommandOutput,
249+
} from "./commands/UpdateEventBusCommand";
245250
import { EventBridgeClient, EventBridgeClientConfig } from "./EventBridgeClient";
246251

247252
const commands = {
@@ -301,6 +306,7 @@ const commands = {
301306
UpdateArchiveCommand,
302307
UpdateConnectionCommand,
303308
UpdateEndpointCommand,
309+
UpdateEventBusCommand,
304310
};
305311

306312
export interface EventBridge {
@@ -1119,22 +1125,37 @@ export interface EventBridge {
11191125
options: __HttpHandlerOptions,
11201126
cb: (err: any, data?: UpdateEndpointCommandOutput) => void
11211127
): void;
1128+
1129+
/**
1130+
* @see {@link UpdateEventBusCommand}
1131+
*/
1132+
updateEventBus(): Promise<UpdateEventBusCommandOutput>;
1133+
updateEventBus(
1134+
args: UpdateEventBusCommandInput,
1135+
options?: __HttpHandlerOptions
1136+
): Promise<UpdateEventBusCommandOutput>;
1137+
updateEventBus(args: UpdateEventBusCommandInput, cb: (err: any, data?: UpdateEventBusCommandOutput) => void): void;
1138+
updateEventBus(
1139+
args: UpdateEventBusCommandInput,
1140+
options: __HttpHandlerOptions,
1141+
cb: (err: any, data?: UpdateEventBusCommandOutput) => void
1142+
): void;
11221143
}
11231144

11241145
/**
1125-
* <p>Amazon EventBridge helps you to respond to state changes in your Amazon Web Services resources. When your
1126-
* resources change state, they automatically send events to an event stream. You can create
1127-
* rules that match selected events in the stream and route them to targets to take action. You
1128-
* can also use rules to take action on a predetermined schedule. For example, you can configure
1129-
* rules to:</p>
1146+
* <p>Amazon EventBridge helps you to respond to state changes in your Amazon Web Services
1147+
* resources. When your resources change state, they automatically send events to an event
1148+
* stream. You can create rules that match selected events in the stream and route them to
1149+
* targets to take action. You can also use rules to take action on a predetermined schedule. For
1150+
* example, you can configure rules to:</p>
11301151
* <ul>
11311152
* <li>
1132-
* <p>Automatically invoke an Lambda function to update DNS entries when an event
1133-
* notifies you that Amazon EC2 instance enters the running state.</p>
1153+
* <p>Automatically invoke an Lambda function to update DNS entries when an
1154+
* event notifies you that Amazon EC2 instance enters the running state.</p>
11341155
* </li>
11351156
* <li>
1136-
* <p>Direct specific API records from CloudTrail to an Amazon Kinesis data stream for
1137-
* detailed analysis of potential security or availability risks.</p>
1157+
* <p>Direct specific API records from CloudTrail to an Amazon Kinesis
1158+
* data stream for detailed analysis of potential security or availability risks.</p>
11381159
* </li>
11391160
* <li>
11401161
* <p>Periodically invoke a built-in target to create a snapshot of an Amazon EBS

clients/client-eventbridge/src/EventBridgeClient.ts

+14-11
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ import {
152152
import { UpdateArchiveCommandInput, UpdateArchiveCommandOutput } from "./commands/UpdateArchiveCommand";
153153
import { UpdateConnectionCommandInput, UpdateConnectionCommandOutput } from "./commands/UpdateConnectionCommand";
154154
import { UpdateEndpointCommandInput, UpdateEndpointCommandOutput } from "./commands/UpdateEndpointCommand";
155+
import { UpdateEventBusCommandInput, UpdateEventBusCommandOutput } from "./commands/UpdateEventBusCommand";
155156
import {
156157
ClientInputEndpointParameters,
157158
ClientResolvedEndpointParameters,
@@ -222,7 +223,8 @@ export type ServiceInputTypes =
222223
| UpdateApiDestinationCommandInput
223224
| UpdateArchiveCommandInput
224225
| UpdateConnectionCommandInput
225-
| UpdateEndpointCommandInput;
226+
| UpdateEndpointCommandInput
227+
| UpdateEventBusCommandInput;
226228

227229
/**
228230
* @public
@@ -283,7 +285,8 @@ export type ServiceOutputTypes =
283285
| UpdateApiDestinationCommandOutput
284286
| UpdateArchiveCommandOutput
285287
| UpdateConnectionCommandOutput
286-
| UpdateEndpointCommandOutput;
288+
| UpdateEndpointCommandOutput
289+
| UpdateEventBusCommandOutput;
287290

288291
/**
289292
* @public
@@ -456,19 +459,19 @@ export type EventBridgeClientResolvedConfigType = __SmithyResolvedConfiguration<
456459
export interface EventBridgeClientResolvedConfig extends EventBridgeClientResolvedConfigType {}
457460

458461
/**
459-
* <p>Amazon EventBridge helps you to respond to state changes in your Amazon Web Services resources. When your
460-
* resources change state, they automatically send events to an event stream. You can create
461-
* rules that match selected events in the stream and route them to targets to take action. You
462-
* can also use rules to take action on a predetermined schedule. For example, you can configure
463-
* rules to:</p>
462+
* <p>Amazon EventBridge helps you to respond to state changes in your Amazon Web Services
463+
* resources. When your resources change state, they automatically send events to an event
464+
* stream. You can create rules that match selected events in the stream and route them to
465+
* targets to take action. You can also use rules to take action on a predetermined schedule. For
466+
* example, you can configure rules to:</p>
464467
* <ul>
465468
* <li>
466-
* <p>Automatically invoke an Lambda function to update DNS entries when an event
467-
* notifies you that Amazon EC2 instance enters the running state.</p>
469+
* <p>Automatically invoke an Lambda function to update DNS entries when an
470+
* event notifies you that Amazon EC2 instance enters the running state.</p>
468471
* </li>
469472
* <li>
470-
* <p>Direct specific API records from CloudTrail to an Amazon Kinesis data stream for
471-
* detailed analysis of potential security or availability risks.</p>
473+
* <p>Direct specific API records from CloudTrail to an Amazon Kinesis
474+
* data stream for detailed analysis of potential security or availability risks.</p>
472475
* </li>
473476
* <li>
474477
* <p>Periodically invoke a built-in target to create a snapshot of an Amazon EBS

clients/client-eventbridge/src/commands/CreateApiDestinationCommand.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ export interface CreateApiDestinationCommandOutput extends CreateApiDestinationR
2929
/**
3030
* <p>Creates an API destination, which is an HTTP invocation endpoint configured as a target
3131
* for events.</p>
32-
* <p>API destinations do not support private destinations, such as interface VPC endpoints.</p>
33-
* <p>For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-api-destinations.html">API destinations</a> in the <i>EventBridge User Guide</i>.</p>
32+
* <p>API destinations do not support private destinations, such as interface VPC
33+
* endpoints.</p>
34+
* <p>For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-api-destinations.html">API destinations</a> in the
35+
* <i>EventBridge User Guide</i>.</p>
3436
* @example
3537
* Use a bare-bones client and the command you need to make an API call.
3638
* ```javascript

clients/client-eventbridge/src/commands/CreateArchiveCommand.ts

+23
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,29 @@ export interface CreateArchiveCommandOutput extends CreateArchiveResponse, __Met
3232
* time for changes to take effect. If you do not specify a pattern to filter events sent to the
3333
* archive, all events are sent to the archive except replayed events. Replayed events are not
3434
* sent to an archive.</p>
35+
* <note>
36+
* <p>Archives and schema discovery are not supported for event buses encrypted using a
37+
* customer managed key. EventBridge returns an error if:</p>
38+
* <ul>
39+
* <li>
40+
* <p>You call <code>
41+
* <a href="https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_CreateArchive.html">CreateArchive</a>
42+
* </code> on an event bus set to use a customer managed key for encryption.</p>
43+
* </li>
44+
* <li>
45+
* <p>You call <code>
46+
* <a href="https://docs.aws.amazon.com/eventbridge/latest/schema-reference/v1-discoverers.html#CreateDiscoverer">CreateDiscoverer</a>
47+
* </code> on an event bus set to use a customer managed key for encryption.</p>
48+
* </li>
49+
* <li>
50+
* <p>You call <code>
51+
* <a href="https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_UpdatedEventBus.html">UpdatedEventBus</a>
52+
* </code> to set a customer managed key on an event bus with an archives or schema discovery enabled.</p>
53+
* </li>
54+
* </ul>
55+
* <p>To enable archives or schema discovery on an event bus, choose to
56+
* use an Amazon Web Services owned key. For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-encryption.html">Data encryption in EventBridge</a> in the <i>Amazon EventBridge User Guide</i>.</p>
57+
* </note>
3558
* @example
3659
* Use a bare-bones client and the command you need to make an API call.
3760
* ```javascript

clients/client-eventbridge/src/commands/CreateEndpointCommand.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,12 @@ export interface CreateEndpointCommandInput extends CreateEndpointRequest {}
2727
export interface CreateEndpointCommandOutput extends CreateEndpointResponse, __MetadataBearer {}
2828

2929
/**
30-
* <p>Creates a global endpoint. Global endpoints improve your application's availability by making it regional-fault tolerant. To do this, you define a primary and secondary Region
31-
* with event buses in each Region. You also create a Amazon Route 53 health check that will tell EventBridge to route events to the secondary Region when an "unhealthy" state
32-
* is encountered and events will be routed back to the primary Region when the health check reports a "healthy" state.</p>
30+
* <p>Creates a global endpoint. Global endpoints improve your application's availability by
31+
* making it regional-fault tolerant. To do this, you define a primary and secondary Region with
32+
* event buses in each Region. You also create a Amazon Route 53 health check that will
33+
* tell EventBridge to route events to the secondary Region when an "unhealthy" state is
34+
* encountered and events will be routed back to the primary Region when the health check reports
35+
* a "healthy" state.</p>
3336
* @example
3437
* Use a bare-bones client and the command you need to make an API call.
3538
* ```javascript

clients/client-eventbridge/src/commands/CreateEventBusCommand.ts

+10
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ export interface CreateEventBusCommandOutput extends CreateEventBusResponse, __M
3939
* const input = { // CreateEventBusRequest
4040
* Name: "STRING_VALUE", // required
4141
* EventSourceName: "STRING_VALUE",
42+
* Description: "STRING_VALUE",
43+
* KmsKeyIdentifier: "STRING_VALUE",
44+
* DeadLetterConfig: { // DeadLetterConfig
45+
* Arn: "STRING_VALUE",
46+
* },
4247
* Tags: [ // TagList
4348
* { // Tag
4449
* Key: "STRING_VALUE", // required
@@ -50,6 +55,11 @@ export interface CreateEventBusCommandOutput extends CreateEventBusResponse, __M
5055
* const response = await client.send(command);
5156
* // { // CreateEventBusResponse
5257
* // EventBusArn: "STRING_VALUE",
58+
* // Description: "STRING_VALUE",
59+
* // KmsKeyIdentifier: "STRING_VALUE",
60+
* // DeadLetterConfig: { // DeadLetterConfig
61+
* // Arn: "STRING_VALUE",
62+
* // },
5363
* // };
5464
*
5565
* ```

clients/client-eventbridge/src/commands/CreatePartnerEventSourceCommand.ts

+16-14
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,16 @@ export interface CreatePartnerEventSourceCommandOutput extends CreatePartnerEven
2828

2929
/**
3030
* <p>Called by an SaaS partner to create a partner event source. This operation is not used by
31-
* Amazon Web Services customers.</p>
32-
* <p>Each partner event source can be used by one Amazon Web Services account to create a matching partner
33-
* event bus in that Amazon Web Services account. A SaaS partner must create one partner event source for each
34-
* Amazon Web Services account that wants to receive those event types. </p>
31+
* Amazon Web Services customers.</p>
32+
* <p>Each partner event source can be used by one Amazon Web Services account to create a
33+
* matching partner event bus in that Amazon Web Services account. A SaaS partner must create one
34+
* partner event source for each Amazon Web Services account that wants to receive those event
35+
* types. </p>
3536
* <p>A partner event source creates events based on resources within the SaaS partner's service
3637
* or application.</p>
37-
* <p>An Amazon Web Services account that creates a partner event bus that matches the partner event source can
38-
* use that event bus to receive events from the partner, and then process them using Amazon Web Services Events
39-
* rules and targets.</p>
38+
* <p>An Amazon Web Services account that creates a partner event bus that matches the partner
39+
* event source can use that event bus to receive events from the partner, and then process them
40+
* using Amazon Web Services Events rules and targets.</p>
4041
* <p>Partner event source names follow this format:</p>
4142
* <p>
4243
* <code>
@@ -56,15 +57,16 @@ export interface CreatePartnerEventSourceCommandOutput extends CreatePartnerEven
5657
* </li>
5758
* <li>
5859
* <p>
59-
* <i>event_name</i> is determined by the partner, and should uniquely identify
60-
* an event-generating resource within the partner system. </p>
61-
* <p>The <i>event_name</i> must be unique across all Amazon Web Services customers. This is because the event source is a shared resource
62-
* between the partner and customer accounts, and each partner event source unique in the partner account.</p>
60+
* <i>event_name</i> is determined by the partner, and should uniquely
61+
* identify an event-generating resource within the partner system. </p>
62+
* <p>The <i>event_name</i> must be unique across all Amazon Web Services
63+
* customers. This is because the event source is a shared resource between the partner and
64+
* customer accounts, and each partner event source unique in the partner account.</p>
6365
* </li>
6466
* </ul>
65-
* <p>The combination of
66-
* <i>event_namespace</i> and <i>event_name</i> should help Amazon Web Services
67-
* customers decide whether to create an event bus to receive these events.</p>
67+
* <p>The combination of <i>event_namespace</i> and
68+
* <i>event_name</i> should help Amazon Web Services customers decide whether to
69+
* create an event bus to receive these events.</p>
6870
* @example
6971
* Use a bare-bones client and the command you need to make an API call.
7072
* ```javascript

clients/client-eventbridge/src/commands/DeleteEndpointCommand.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ export interface DeleteEndpointCommandInput extends DeleteEndpointRequest {}
2727
export interface DeleteEndpointCommandOutput extends DeleteEndpointResponse, __MetadataBearer {}
2828

2929
/**
30-
* <p>Delete an existing global endpoint. For more information about global endpoints, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-global-endpoints.html">Making applications Regional-fault tolerant with global endpoints and event replication</a> in the <i>Amazon EventBridge User Guide</i>.</p>
30+
* <p>Delete an existing global endpoint. For more information about global endpoints, see
31+
* <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-global-endpoints.html">Making applications Regional-fault tolerant with global endpoints and event
32+
* replication</a> in the <i>
33+
* <i>Amazon EventBridge User Guide</i>
34+
* </i>.</p>
3135
* @example
3236
* Use a bare-bones client and the command you need to make an API call.
3337
* ```javascript

clients/client-eventbridge/src/commands/DeletePartnerEventSourceCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export interface DeletePartnerEventSourceCommandOutput extends __MetadataBearer
3030
* <p>This operation is used by SaaS partners to delete a partner event source. This operation
3131
* is not used by Amazon Web Services customers.</p>
3232
* <p>When you delete an event source, the status of the corresponding partner event bus in the
33-
* Amazon Web Services customer account becomes DELETED.</p>
33+
* Amazon Web Services customer account becomes DELETED.</p>
3434
* <p></p>
3535
* @example
3636
* Use a bare-bones client and the command you need to make an API call.

0 commit comments

Comments
 (0)