Skip to content

Commit 963fa65

Browse files
Add customer-facing logging for the EventBridge Event Bus, enabling customers to better observe their events and extract insights about their EventBridge usage.
1 parent 76d743f commit 963fa65

17 files changed

+628
-6
lines changed

generator/ServiceModels/eventbridge/eventbridge-2015-10-07.api.json

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1417,6 +1417,7 @@
14171417
"Description":{"shape":"EventBusDescription"},
14181418
"KmsKeyIdentifier":{"shape":"KmsKeyIdentifier"},
14191419
"DeadLetterConfig":{"shape":"DeadLetterConfig"},
1420+
"LogConfig":{"shape":"LogConfig"},
14201421
"Tags":{"shape":"TagList"}
14211422
}
14221423
},
@@ -1426,7 +1427,8 @@
14261427
"EventBusArn":{"shape":"String"},
14271428
"Description":{"shape":"EventBusDescription"},
14281429
"KmsKeyIdentifier":{"shape":"KmsKeyIdentifier"},
1429-
"DeadLetterConfig":{"shape":"DeadLetterConfig"}
1430+
"DeadLetterConfig":{"shape":"DeadLetterConfig"},
1431+
"LogConfig":{"shape":"LogConfig"}
14301432
}
14311433
},
14321434
"CreatePartnerEventSourceRequest":{
@@ -1698,6 +1700,7 @@
16981700
"KmsKeyIdentifier":{"shape":"KmsKeyIdentifier"},
16991701
"DeadLetterConfig":{"shape":"DeadLetterConfig"},
17001702
"Policy":{"shape":"String"},
1703+
"LogConfig":{"shape":"LogConfig"},
17011704
"CreationTime":{"shape":"Timestamp"},
17021705
"LastModifiedTime":{"shape":"Timestamp"}
17031706
}
@@ -2065,6 +2068,13 @@
20652068
"members":{},
20662069
"exception":true
20672070
},
2071+
"IncludeDetail":{
2072+
"type":"string",
2073+
"enum":[
2074+
"NONE",
2075+
"FULL"
2076+
]
2077+
},
20682078
"InputTransformer":{
20692079
"type":"structure",
20702080
"required":["InputTemplate"],
@@ -2116,6 +2126,15 @@
21162126
"EXTERNAL"
21172127
]
21182128
},
2129+
"Level":{
2130+
"type":"string",
2131+
"enum":[
2132+
"OFF",
2133+
"ERROR",
2134+
"INFO",
2135+
"TRACE"
2136+
]
2137+
},
21192138
"LimitExceededException":{
21202139
"type":"structure",
21212140
"members":{},
@@ -2337,6 +2356,13 @@
23372356
"NextToken":{"shape":"NextToken"}
23382357
}
23392358
},
2359+
"LogConfig":{
2360+
"type":"structure",
2361+
"members":{
2362+
"IncludeDetail":{"shape":"IncludeDetail"},
2363+
"Level":{"shape":"Level"}
2364+
}
2365+
},
23402366
"Long":{"type":"long"},
23412367
"ManagedBy":{
23422368
"type":"string",
@@ -3367,7 +3393,8 @@
33673393
"Name":{"shape":"EventBusName"},
33683394
"KmsKeyIdentifier":{"shape":"KmsKeyIdentifier"},
33693395
"Description":{"shape":"EventBusDescription"},
3370-
"DeadLetterConfig":{"shape":"DeadLetterConfig"}
3396+
"DeadLetterConfig":{"shape":"DeadLetterConfig"},
3397+
"LogConfig":{"shape":"LogConfig"}
33713398
}
33723399
},
33733400
"UpdateEventBusResponse":{
@@ -3377,7 +3404,8 @@
33773404
"Name":{"shape":"EventBusName"},
33783405
"KmsKeyIdentifier":{"shape":"KmsKeyIdentifier"},
33793406
"Description":{"shape":"EventBusDescription"},
3380-
"DeadLetterConfig":{"shape":"DeadLetterConfig"}
3407+
"DeadLetterConfig":{"shape":"DeadLetterConfig"},
3408+
"LogConfig":{"shape":"LogConfig"}
33813409
}
33823410
}
33833411
}

generator/ServiceModels/eventbridge/eventbridge-2015-10-07.docs.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,6 +1122,12 @@
11221122
"base": "<p>An error occurred because a replay can be canceled only when the state is Running or Starting.</p>",
11231123
"refs": {}
11241124
},
1125+
"IncludeDetail": {
1126+
"base": null,
1127+
"refs": {
1128+
"LogConfig$IncludeDetail": "<p>Whether EventBridge include detailed event information in the records it generates. Detailed data can be useful for troubleshooting and debugging. This information includes details of the event itself, as well as target details.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-bus-logs.html#eb-event-logs-data\">Including detail data in event bus logs</a> in the <i>EventBridge User Guide</i>.</p>"
1129+
}
1130+
},
11251131
"InputTransformer": {
11261132
"base": "<p>Contains the parameters needed for you to provide custom input to a target based on one or more pieces of data extracted from the event.</p>",
11271133
"refs": {
@@ -1185,6 +1191,12 @@
11851191
"EcsParameters$LaunchType": "<p>Specifies the launch type on which your task is running. The launch type that you specify here must match one of the launch type (compatibilities) of the target task. The <code>FARGATE</code> value is supported only in the Regions where Fargate with Amazon ECS is supported. For more information, see <a href=\"https://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS-Fargate.html\">Fargate on Amazon ECS</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>"
11861192
}
11871193
},
1194+
"Level": {
1195+
"base": null,
1196+
"refs": {
1197+
"LogConfig$Level": "<p>The level of logging detail to include. This applies to all log destinations for the event bus.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-bus-logs.html#eb-event-bus-logs-level\">Specifying event bus log level</a> in the <i>EventBridge User Guide</i>.</p>"
1198+
}
1199+
},
11881200
"LimitExceededException": {
11891201
"base": "<p>The request failed because it attempted to create resource beyond the allowed service quota.</p>",
11901202
"refs": {}
@@ -1316,6 +1328,16 @@
13161328
"base": null,
13171329
"refs": {}
13181330
},
1331+
"LogConfig": {
1332+
"base": "<p>The logging configuration settings for the event bus.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/eb-event-bus-logs.html\">Configuring logs for event buses</a> in the <i>EventBridge User Guide</i>.</p>",
1333+
"refs": {
1334+
"CreateEventBusRequest$LogConfig": "<p>The logging configuration settings for the event bus.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/eb-event-bus-logs.html\">Configuring logs for event buses</a> in the <i>EventBridge User Guide</i>.</p>",
1335+
"CreateEventBusResponse$LogConfig": "<p>The logging configuration settings for the event bus.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/eb-event-bus-logs.html\">Configuring logs for event buses</a> in the <i>EventBridge User Guide</i>.</p>",
1336+
"DescribeEventBusResponse$LogConfig": "<p>The logging configuration settings for the event bus.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/eb-event-bus-logs.html\">Configuring logs for event buses</a> in the <i>EventBridge User Guide</i>.</p>",
1337+
"UpdateEventBusRequest$LogConfig": "<p>The logging configuration settings for the event bus.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/eb-event-bus-logs.html\">Configuring logs for event buses</a> in the <i>EventBridge User Guide</i>.</p>",
1338+
"UpdateEventBusResponse$LogConfig": "<p>The logging configuration settings for the event bus.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/eb-event-bus-logs.html\">Configuring logs for event buses</a> in the <i>EventBridge User Guide</i>.</p>"
1339+
}
1340+
},
13191341
"Long": {
13201342
"base": null,
13211343
"refs": {

generator/ServiceModels/eventbridge/eventbridge-2015-10-07.normal.json

Lines changed: 53 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1904,6 +1904,10 @@
19041904
"documentation":"<p>The identifier of the KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt events on this event bus. The identifier can be the key Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN.</p> <p>If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt events on the event bus.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/kms/latest/developerguide/viewing-keys.html\">Identify and view keys</a> in the <i>Key Management Service Developer Guide</i>. </p> <note> <p>Schema discovery is not supported for event buses encrypted using a customer managed key. EventBridge returns an error if: </p> <ul> <li> <p>You call <code> <a href=\"https://docs.aws.amazon.com/eventbridge/latest/schema-reference/v1-discoverers.html#CreateDiscoverer\">CreateDiscoverer</a> </code> on an event bus set to use a customer managed key for encryption.</p> </li> <li> <p>You call <code> <a href=\"https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_UpdatedEventBus.html\">UpdatedEventBus</a> </code> to set a customer managed key on an event bus with schema discovery enabled.</p> </li> </ul> <p>To enable schema discovery on an event bus, choose to use an Amazon Web Services owned key. For more information, see <a href=\"https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-encryption-event-bus-cmkey.html\">Encrypting events</a> in the <i>Amazon EventBridge User Guide</i>.</p> </note> <important> <p>If you have specified that EventBridge use a customer managed key for encrypting the source event bus, we strongly recommend you also specify a customer managed key for any archives for the event bus as well. </p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/eventbridge/latest/userguide/encryption-archives.html\">Encrypting archives</a> in the <i>Amazon EventBridge User Guide</i>.</p> </important>"
19051905
},
19061906
"DeadLetterConfig":{"shape":"DeadLetterConfig"},
1907+
"LogConfig":{
1908+
"shape":"LogConfig",
1909+
"documentation":"<p>The logging configuration settings for the event bus.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/eb-event-bus-logs.html\">Configuring logs for event buses</a> in the <i>EventBridge User Guide</i>.</p>"
1910+
},
19071911
"Tags":{
19081912
"shape":"TagList",
19091913
"documentation":"<p>Tags to associate with the event bus.</p>"
@@ -1925,7 +1929,11 @@
19251929
"shape":"KmsKeyIdentifier",
19261930
"documentation":"<p>The identifier of the KMS customer managed key for EventBridge to use to encrypt events on this event bus, if one has been specified.</p> <p>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>"
19271931
},
1928-
"DeadLetterConfig":{"shape":"DeadLetterConfig"}
1932+
"DeadLetterConfig":{"shape":"DeadLetterConfig"},
1933+
"LogConfig":{
1934+
"shape":"LogConfig",
1935+
"documentation":"<p>The logging configuration settings for the event bus.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/eb-event-bus-logs.html\">Configuring logs for event buses</a> in the <i>EventBridge User Guide</i>.</p>"
1936+
}
19291937
}
19301938
},
19311939
"CreatePartnerEventSourceRequest":{
@@ -2466,6 +2474,10 @@
24662474
"shape":"String",
24672475
"documentation":"<p>The policy that enables the external account to send events to your account.</p>"
24682476
},
2477+
"LogConfig":{
2478+
"shape":"LogConfig",
2479+
"documentation":"<p>The logging configuration settings for the event bus.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/eb-event-bus-logs.html\">Configuring logs for event buses</a> in the <i>EventBridge User Guide</i>.</p>"
2480+
},
24692481
"CreationTime":{
24702482
"shape":"Timestamp",
24712483
"documentation":"<p>The time the event bus was created.</p>"
@@ -3099,6 +3111,13 @@
30993111
"documentation":"<p>An error occurred because a replay can be canceled only when the state is Running or Starting.</p>",
31003112
"exception":true
31013113
},
3114+
"IncludeDetail":{
3115+
"type":"string",
3116+
"enum":[
3117+
"NONE",
3118+
"FULL"
3119+
]
3120+
},
31023121
"InputTransformer":{
31033122
"type":"structure",
31043123
"required":["InputTemplate"],
@@ -3164,6 +3183,15 @@
31643183
"EXTERNAL"
31653184
]
31663185
},
3186+
"Level":{
3187+
"type":"string",
3188+
"enum":[
3189+
"OFF",
3190+
"ERROR",
3191+
"INFO",
3192+
"TRACE"
3193+
]
3194+
},
31673195
"LimitExceededException":{
31683196
"type":"structure",
31693197
"members":{},
@@ -3602,6 +3630,20 @@
36023630
}
36033631
}
36043632
},
3633+
"LogConfig":{
3634+
"type":"structure",
3635+
"members":{
3636+
"IncludeDetail":{
3637+
"shape":"IncludeDetail",
3638+
"documentation":"<p>Whether EventBridge include detailed event information in the records it generates. Detailed data can be useful for troubleshooting and debugging. This information includes details of the event itself, as well as target details.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-bus-logs.html#eb-event-logs-data\">Including detail data in event bus logs</a> in the <i>EventBridge User Guide</i>.</p>"
3639+
},
3640+
"Level":{
3641+
"shape":"Level",
3642+
"documentation":"<p>The level of logging detail to include. This applies to all log destinations for the event bus.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-bus-logs.html#eb-event-bus-logs-level\">Specifying event bus log level</a> in the <i>EventBridge User Guide</i>.</p>"
3643+
}
3644+
},
3645+
"documentation":"<p>The logging configuration settings for the event bus.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/eb-event-bus-logs.html\">Configuring logs for event buses</a> in the <i>EventBridge User Guide</i>.</p>"
3646+
},
36053647
"Long":{"type":"long"},
36063648
"ManagedBy":{
36073649
"type":"string",
@@ -5302,7 +5344,11 @@
53025344
"shape":"EventBusDescription",
53035345
"documentation":"<p>The event bus description.</p>"
53045346
},
5305-
"DeadLetterConfig":{"shape":"DeadLetterConfig"}
5347+
"DeadLetterConfig":{"shape":"DeadLetterConfig"},
5348+
"LogConfig":{
5349+
"shape":"LogConfig",
5350+
"documentation":"<p>The logging configuration settings for the event bus.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/eb-event-bus-logs.html\">Configuring logs for event buses</a> in the <i>EventBridge User Guide</i>.</p>"
5351+
}
53065352
}
53075353
},
53085354
"UpdateEventBusResponse":{
@@ -5324,7 +5370,11 @@
53245370
"shape":"EventBusDescription",
53255371
"documentation":"<p>The event bus description.</p>"
53265372
},
5327-
"DeadLetterConfig":{"shape":"DeadLetterConfig"}
5373+
"DeadLetterConfig":{"shape":"DeadLetterConfig"},
5374+
"LogConfig":{
5375+
"shape":"LogConfig",
5376+
"documentation":"<p>The logging configuration settings for the event bus.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/eb-event-bus-logs.html\">Configuring logs for event buses</a> in the <i>EventBridge User Guide</i>.</p>"
5377+
}
53285378
}
53295379
}
53305380
},

sdk/src/Services/EventBridge/Generated/Model/CreateEventBusRequest.cs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public partial class CreateEventBusRequest : AmazonEventBridgeRequest
4141
private string _description;
4242
private string _eventSourceName;
4343
private string _kmsKeyIdentifier;
44+
private LogConfig _logConfig;
4445
private string _name;
4546
private List<Tag> _tags = AWSConfigs.InitializeCollections ? new List<Tag>() : null;
4647

@@ -162,6 +163,29 @@ internal bool IsSetKmsKeyIdentifier()
162163
return this._kmsKeyIdentifier != null;
163164
}
164165

166+
/// <summary>
167+
/// Gets and sets the property LogConfig.
168+
/// <para>
169+
/// The logging configuration settings for the event bus.
170+
/// </para>
171+
///
172+
/// <para>
173+
/// For more information, see <a href="https://docs.aws.amazon.com/eb-event-bus-logs.html">Configuring
174+
/// logs for event buses</a> in the <i>EventBridge User Guide</i>.
175+
/// </para>
176+
/// </summary>
177+
public LogConfig LogConfig
178+
{
179+
get { return this._logConfig; }
180+
set { this._logConfig = value; }
181+
}
182+
183+
// Check to see if LogConfig property is set
184+
internal bool IsSetLogConfig()
185+
{
186+
return this._logConfig != null;
187+
}
188+
165189
/// <summary>
166190
/// Gets and sets the property Name.
167191
/// <para>

sdk/src/Services/EventBridge/Generated/Model/CreateEventBusResponse.cs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public partial class CreateEventBusResponse : AmazonWebServiceResponse
3838
private string _description;
3939
private string _eventBusArn;
4040
private string _kmsKeyIdentifier;
41+
private LogConfig _logConfig;
4142

4243
/// <summary>
4344
/// Gets and sets the property DeadLetterConfig.
@@ -116,5 +117,28 @@ internal bool IsSetKmsKeyIdentifier()
116117
return this._kmsKeyIdentifier != null;
117118
}
118119

120+
/// <summary>
121+
/// Gets and sets the property LogConfig.
122+
/// <para>
123+
/// The logging configuration settings for the event bus.
124+
/// </para>
125+
///
126+
/// <para>
127+
/// For more information, see <a href="https://docs.aws.amazon.com/eb-event-bus-logs.html">Configuring
128+
/// logs for event buses</a> in the <i>EventBridge User Guide</i>.
129+
/// </para>
130+
/// </summary>
131+
public LogConfig LogConfig
132+
{
133+
get { return this._logConfig; }
134+
set { this._logConfig = value; }
135+
}
136+
137+
// Check to see if LogConfig property is set
138+
internal bool IsSetLogConfig()
139+
{
140+
return this._logConfig != null;
141+
}
142+
119143
}
120144
}

sdk/src/Services/EventBridge/Generated/Model/DescribeEventBusResponse.cs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public partial class DescribeEventBusResponse : AmazonWebServiceResponse
4040
private string _description;
4141
private string _kmsKeyIdentifier;
4242
private DateTime? _lastModifiedTime;
43+
private LogConfig _logConfig;
4344
private string _name;
4445
private string _policy;
4546

@@ -157,6 +158,29 @@ internal bool IsSetLastModifiedTime()
157158
return this._lastModifiedTime.HasValue;
158159
}
159160

161+
/// <summary>
162+
/// Gets and sets the property LogConfig.
163+
/// <para>
164+
/// The logging configuration settings for the event bus.
165+
/// </para>
166+
///
167+
/// <para>
168+
/// For more information, see <a href="https://docs.aws.amazon.com/eb-event-bus-logs.html">Configuring
169+
/// logs for event buses</a> in the <i>EventBridge User Guide</i>.
170+
/// </para>
171+
/// </summary>
172+
public LogConfig LogConfig
173+
{
174+
get { return this._logConfig; }
175+
set { this._logConfig = value; }
176+
}
177+
178+
// Check to see if LogConfig property is set
179+
internal bool IsSetLogConfig()
180+
{
181+
return this._logConfig != null;
182+
}
183+
160184
/// <summary>
161185
/// Gets and sets the property Name.
162186
/// <para>

sdk/src/Services/EventBridge/Generated/Model/Internal/MarshallTransformations/CreateEventBusRequestMarshaller.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,17 @@ public IRequest Marshall(CreateEventBusRequest publicRequest)
104104
context.Writer.WriteStringValue(publicRequest.KmsKeyIdentifier);
105105
}
106106

107+
if(publicRequest.IsSetLogConfig())
108+
{
109+
context.Writer.WritePropertyName("LogConfig");
110+
context.Writer.WriteStartObject();
111+
112+
var marshaller = LogConfigMarshaller.Instance;
113+
marshaller.Marshall(publicRequest.LogConfig, context);
114+
115+
context.Writer.WriteEndObject();
116+
}
117+
107118
if(publicRequest.IsSetName())
108119
{
109120
context.Writer.WritePropertyName("Name");

sdk/src/Services/EventBridge/Generated/Model/Internal/MarshallTransformations/CreateEventBusResponseUnmarshaller.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@ public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext cont
7676
response.KmsKeyIdentifier = unmarshaller.Unmarshall(context, ref reader);
7777
continue;
7878
}
79+
if (context.TestExpression("LogConfig", targetDepth))
80+
{
81+
var unmarshaller = LogConfigUnmarshaller.Instance;
82+
response.LogConfig = unmarshaller.Unmarshall(context, ref reader);
83+
continue;
84+
}
7985
}
8086

8187
return response;

0 commit comments

Comments
 (0)