Skip to content

Commit 2a15be8

Browse files
author
awstools
committed
feat(client-cloudwatch-logs): Adding support for ocsf version 1.5, add optional parameter MappingVersion
1 parent e1d2d6b commit 2a15be8

File tree

8 files changed

+119
-46
lines changed

8 files changed

+119
-46
lines changed

clients/client-cloudwatch-logs/src/commands/GetTransformerCommand.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@ export interface GetTransformerCommandOutput extends GetTransformerResponse, __M
139139
* // parseToOCSF: { // ParseToOCSF
140140
* // source: "STRING_VALUE",
141141
* // eventSource: "CloudTrail" || "Route53Resolver" || "VPCFlow" || "EKSAudit" || "AWSWAF", // required
142-
* // ocsfVersion: "V1.1", // required
142+
* // ocsfVersion: "V1.1" || "V1.5", // required
143+
* // mappingVersion: "STRING_VALUE",
143144
* // },
144145
* // parsePostgres: { // ParsePostgres
145146
* // source: "STRING_VALUE",

clients/client-cloudwatch-logs/src/commands/PutResourcePolicyCommand.ts

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,32 @@ export interface PutResourcePolicyCommandInput extends PutResourcePolicyRequest
2727
export interface PutResourcePolicyCommandOutput extends PutResourcePolicyResponse, __MetadataBearer {}
2828

2929
/**
30-
* <p>Creates or updates a resource policy allowing other Amazon Web Services services to put log events to this account, such as Amazon Route 53. This API has the following restrictions:</p>
30+
* <p>Creates or updates a resource policy allowing other Amazon Web Services services to put
31+
* log events to this account, such as Amazon Route 53. This API has the following
32+
* restrictions:</p>
3133
* <ul>
3234
* <li>
3335
* <p>
34-
* <b>Supported actions</b> - Policy only supports <code>logs:PutLogEvents</code> and <code>logs:CreateLogStream </code> actions</p>
36+
* <b>Supported actions</b> - Policy only supports
37+
* <code>logs:PutLogEvents</code> and <code>logs:CreateLogStream </code> actions</p>
3538
* </li>
3639
* <li>
3740
* <p>
38-
* <b>Supported principals</b> - Policy only applies when operations are invoked by Amazon Web Services service principals (not IAM users, roles, or cross-account principals</p>
41+
* <b>Supported principals</b> - Policy only applies when
42+
* operations are invoked by Amazon Web Services service principals (not IAM
43+
* users, roles, or cross-account principals</p>
3944
* </li>
4045
* <li>
4146
* <p>
42-
* <b>Policy limits</b> - An account can have a maximum of 10 policies without resourceARN and one per LogGroup resourceARN</p>
47+
* <b>Policy limits</b> - An account can have a maximum of 10
48+
* policies without resourceARN and one per LogGroup resourceARN</p>
4349
* </li>
4450
* </ul>
4551
* <important>
46-
* <p>Resource policies with actions invoked by non-Amazon Web Services service principals (such as IAM users, roles, or other Amazon Web Services accounts) will not be enforced. For access control involving these principals, use the IAM policies.</p>
52+
* <p>Resource policies with actions invoked by non-Amazon Web Services service principals
53+
* (such as IAM users, roles, or other Amazon Web Services accounts) will not be
54+
* enforced. For access control involving these principals, use the IAM
55+
* policies.</p>
4756
* </important>
4857
* @example
4958
* Use a bare-bones client and the command you need to make an API call.

clients/client-cloudwatch-logs/src/commands/PutTransformerCommand.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,8 @@ export interface PutTransformerCommandOutput extends __MetadataBearer {}
154154
* parseToOCSF: { // ParseToOCSF
155155
* source: "STRING_VALUE",
156156
* eventSource: "CloudTrail" || "Route53Resolver" || "VPCFlow" || "EKSAudit" || "AWSWAF", // required
157-
* ocsfVersion: "V1.1", // required
157+
* ocsfVersion: "V1.1" || "V1.5", // required
158+
* mappingVersion: "STRING_VALUE",
158159
* },
159160
* parsePostgres: { // ParsePostgres
160161
* source: "STRING_VALUE",

clients/client-cloudwatch-logs/src/commands/TestTransformerCommand.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ export interface TestTransformerCommandOutput extends TestTransformerResponse, _
131131
* parseToOCSF: { // ParseToOCSF
132132
* source: "STRING_VALUE",
133133
* eventSource: "CloudTrail" || "Route53Resolver" || "VPCFlow" || "EKSAudit" || "AWSWAF", // required
134-
* ocsfVersion: "V1.1", // required
134+
* ocsfVersion: "V1.1" || "V1.5", // required
135+
* mappingVersion: "STRING_VALUE",
135136
* },
136137
* parsePostgres: { // ParsePostgres
137138
* source: "STRING_VALUE",

clients/client-cloudwatch-logs/src/models/enums.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,7 @@ export type ScheduledQueryDestinationType =
437437
*/
438438
export const OCSFVersion = {
439439
V1_1: "V1.1",
440+
V1_5: "V1.5",
440441
} as const;
441442
/**
442443
* @public

clients/client-cloudwatch-logs/src/models/models_0.ts

Lines changed: 57 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2889,13 +2889,17 @@ export interface MetricFilter {
28892889
applyOnTransformedLogs?: boolean | undefined;
28902890

28912891
/**
2892-
* <p>The filter expression that specifies which log events are processed by this metric filter based on system fields. Returns the <code>fieldSelectionCriteria</code> value if it was specified when the metric filter was created.</p>
2892+
* <p>The filter expression that specifies which log events are processed by this metric filter
2893+
* based on system fields. Returns the <code>fieldSelectionCriteria</code> value if it was
2894+
* specified when the metric filter was created.</p>
28932895
* @public
28942896
*/
28952897
fieldSelectionCriteria?: string | undefined;
28962898

28972899
/**
2898-
* <p>The list of system fields that are emitted as additional dimensions in the generated metrics. Returns the <code>emitSystemFieldDimensions</code> value if it was specified when the metric filter was created.</p>
2900+
* <p>The list of system fields that are emitted as additional dimensions in the generated
2901+
* metrics. Returns the <code>emitSystemFieldDimensions</code> value if it was specified when the
2902+
* metric filter was created.</p>
28992903
* @public
29002904
*/
29012905
emitSystemFieldDimensions?: string[] | undefined;
@@ -3310,13 +3314,17 @@ export interface SubscriptionFilter {
33103314
creationTime?: number | undefined;
33113315

33123316
/**
3313-
* <p>The filter expression that specifies which log events are processed by this subscription filter based on system fields. Returns the <code>fieldSelectionCriteria</code> value if it was specified when the subscription filter was created.</p>
3317+
* <p>The filter expression that specifies which log events are processed by this subscription
3318+
* filter based on system fields. Returns the <code>fieldSelectionCriteria</code> value if it was
3319+
* specified when the subscription filter was created.</p>
33143320
* @public
33153321
*/
33163322
fieldSelectionCriteria?: string | undefined;
33173323

33183324
/**
3319-
* <p>The list of system fields that are included in the log events sent to the subscription destination. Returns the <code>emitSystemFields</code> value if it was specified when the subscription filter was created.</p>
3325+
* <p>The list of system fields that are included in the log events sent to the subscription
3326+
* destination. Returns the <code>emitSystemFields</code> value if it was specified when the
3327+
* subscription filter was created.</p>
33203328
* @public
33213329
*/
33223330
emitSystemFields?: string[] | undefined;
@@ -4861,13 +4869,13 @@ export interface GetScheduledQueryHistoryRequest {
48614869
*/
48624870
export interface ScheduledQueryDestination {
48634871
/**
4864-
* <p>The type of destination (S3 or EVENTBRIDGE).</p>
4872+
* <p>The type of destination (S3).</p>
48654873
* @public
48664874
*/
48674875
destinationType?: ScheduledQueryDestinationType | undefined;
48684876

48694877
/**
4870-
* <p>The destination identifier (S3 URI or EventBridge ARN).</p>
4878+
* <p>The destination identifier (S3 URI).</p>
48714879
* @public
48724880
*/
48734881
destinationIdentifier?: string | undefined;
@@ -4879,7 +4887,7 @@ export interface ScheduledQueryDestination {
48794887
status?: ActionStatus | undefined;
48804888

48814889
/**
4882-
* <p>The processed identifier returned for the destination (S3 key or event ID).</p>
4890+
* <p>The processed identifier returned for the destination (S3 key).</p>
48834891
* @public
48844892
*/
48854893
processedIdentifier?: string | undefined;
@@ -4903,7 +4911,7 @@ export interface TriggerHistoryRecord {
49034911
queryId?: string | undefined;
49044912

49054913
/**
4906-
* <p>The status of the query execution (SUCCEEDED, FAILED, TIMEOUT, or INVALID_QUERY).</p>
4914+
* <p>The status of the query execution (Running, Complete, Failed, Timeout, or InvalidQuery).</p>
49074915
* @public
49084916
*/
49094917
executionStatus?: ExecutionStatus | undefined;
@@ -4921,7 +4929,7 @@ export interface TriggerHistoryRecord {
49214929
errorMessage?: string | undefined;
49224930

49234931
/**
4924-
* <p>The list of destinations where the scheduled query results were delivered for this execution. This includes S3 buckets and EventBridge targets configured for the scheduled query.</p>
4932+
* <p>The list of destinations where the scheduled query results were delivered for this execution. This includes S3 buckets configured for the scheduled query.</p>
49254933
* @public
49264934
*/
49274935
destinations?: ScheduledQueryDestination[] | undefined;
@@ -5238,7 +5246,7 @@ export interface ParseRoute53 {
52385246
/**
52395247
* <p>This processor converts logs into <a href="https://ocsf.io">Open Cybersecurity Schema
52405248
* Framework (OCSF)</a> events.</p>
5241-
* <p>For more information about this processor including examples, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-parseToOCSF"> parseToOSCF</a> in the <i>CloudWatch Logs User Guide</i>.</p>
5249+
* <p>For more information about this processor including examples, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-parseToOCSF">parseToOCSF</a> in the <i>CloudWatch Logs User Guide</i>.</p>
52425250
* @public
52435251
*/
52445252
export interface ParseToOCSF {
@@ -5261,6 +5269,13 @@ export interface ParseToOCSF {
52615269
* @public
52625270
*/
52635271
ocsfVersion: OCSFVersion | undefined;
5272+
5273+
/**
5274+
* <p>Identifies the specific release of the Open Cybersecurity Schema Framework (OCSF)
5275+
* transformer being used to parse OCSF data. Defaults to the latest version if not specified. Does not automatically update.</p>
5276+
* @public
5277+
*/
5278+
mappingVersion?: string | undefined;
52645279
}
52655280

52665281
/**
@@ -6712,11 +6727,18 @@ export interface PutDeliverySourceRequest {
67126727
* <code>ERROR_LOGS</code>.</p>
67136728
* </li>
67146729
* <li>
6730+
* <p>For Network Load Balancer, the valid value is <code>NLB_ACCESS_LOGS</code>.</p>
6731+
* </li>
6732+
* <li>
67156733
* <p>For PCS, the valid values are <code>PCS_SCHEDULER_LOGS</code> and
67166734
* <code>PCS_JOBCOMP_LOGS</code>.</p>
67176735
* </li>
67186736
* <li>
6719-
* <p>For Amazon Q, the valid values are <code>EVENT_LOGS</code> and <code>SYNC_JOB_LOGS</code>.</p>
6737+
* <p>For Amazon Web Services RTB Fabric, the valid values is <code>APPLICATION_LOGS</code>.</p>
6738+
* </li>
6739+
* <li>
6740+
* <p>For Amazon Q, the valid values are <code>EVENT_LOGS</code> and
6741+
* <code>SYNC_JOB_LOGS</code>.</p>
67206742
* </li>
67216743
* <li>
67226744
* <p>For Amazon SES mail manager, the valid values are
@@ -7159,13 +7181,21 @@ export interface PutMetricFilterRequest {
71597181
applyOnTransformedLogs?: boolean | undefined;
71607182

71617183
/**
7162-
* <p>A filter expression that specifies which log events should be processed by this metric filter based on system fields such as source account and source region. Uses selection criteria syntax with operators like <code>=</code>, <code>!=</code>, <code>AND</code>, <code>OR</code>, <code>IN</code>, <code>NOT IN</code>. Example: <code>@aws.region = "us-east-1"</code> or <code>@aws.account IN ["123456789012", "987654321098"]</code>. Maximum length: 2000 characters.</p>
7184+
* <p>A filter expression that specifies which log events should be processed by this metric
7185+
* filter based on system fields such as source account and source region. Uses selection
7186+
* criteria syntax with operators like <code>=</code>, <code>!=</code>, <code>AND</code>,
7187+
* <code>OR</code>, <code>IN</code>, <code>NOT IN</code>. Example: <code>@aws.region =
7188+
* "us-east-1"</code> or <code>@aws.account IN ["123456789012", "987654321098"]</code>. Maximum
7189+
* length: 2000 characters.</p>
71637190
* @public
71647191
*/
71657192
fieldSelectionCriteria?: string | undefined;
71667193

71677194
/**
7168-
* <p>A list of system fields to emit as additional dimensions in the generated metrics. Valid values are <code>@aws.account</code> and <code>@aws.region</code>. These dimensions help identify the source of centralized log data and count toward the total dimension limit for metric filters.</p>
7195+
* <p>A list of system fields to emit as additional dimensions in the generated metrics. Valid
7196+
* values are <code>@aws.account</code> and <code>@aws.region</code>. These dimensions help
7197+
* identify the source of centralized log data and count toward the total dimension limit for
7198+
* metric filters.</p>
71697199
* @public
71707200
*/
71717201
emitSystemFieldDimensions?: string[] | undefined;
@@ -7263,11 +7293,11 @@ export interface PutResourcePolicyRequest {
72637293
* that call.</p>
72647294
* <p></p>
72657295
* <p>
7266-
* <code>\{ "Version": "2012-10-17", "Statement": [ \{ "Sid": "Route53LogsToCloudWatchLogs",
7267-
* "Effect": "Allow", "Principal": \{ "Service": [ "route53.amazonaws.com" ] \}, "Action":
7268-
* "logs:PutLogEvents", "Resource": "logArn", "Condition": \{ "ArnLike": \{ "aws:SourceArn":
7269-
* "myRoute53ResourceArn" \}, "StringEquals": \{ "aws:SourceAccount": "myAwsAccountId" \} \} \} ]
7270-
* \}</code>
7296+
* <code>\{ "Version": "2012-10-17", "Statement": [ \{ "Sid":
7297+
* "Route53LogsToCloudWatchLogs", "Effect": "Allow", "Principal": \{ "Service": [
7298+
* "route53.amazonaws.com" ] \}, "Action": "logs:PutLogEvents", "Resource": "logArn",
7299+
* "Condition": \{ "ArnLike": \{ "aws:SourceArn": "myRoute53ResourceArn" \}, "StringEquals": \{
7300+
* "aws:SourceAccount": "myAwsAccountId" \} \} \} ] \}</code>
72717301
* </p>
72727302
* @public
72737303
*/
@@ -7407,13 +7437,20 @@ export interface PutSubscriptionFilterRequest {
74077437
applyOnTransformedLogs?: boolean | undefined;
74087438

74097439
/**
7410-
* <p>A filter expression that specifies which log events should be processed by this subscription filter based on system fields such as source account and source region. Uses selection criteria syntax with operators like <code>=</code>, <code>!=</code>, <code>AND</code>, <code>OR</code>, <code>IN</code>, <code>NOT IN</code>. Example: <code>@aws.region NOT IN ["cn-north-1"]</code> or <code>@aws.account = "123456789012" AND @aws.region = "us-east-1"</code>. Maximum length: 2000 characters.</p>
7440+
* <p>A filter expression that specifies which log events should be processed by this
7441+
* subscription filter based on system fields such as source account and source region. Uses
7442+
* selection criteria syntax with operators like <code>=</code>, <code>!=</code>,
7443+
* <code>AND</code>, <code>OR</code>, <code>IN</code>, <code>NOT IN</code>. Example:
7444+
* <code>@aws.region NOT IN ["cn-north-1"]</code> or <code>@aws.account = "123456789012" AND
7445+
* @aws.region = "us-east-1"</code>. Maximum length: 2000 characters.</p>
74117446
* @public
74127447
*/
74137448
fieldSelectionCriteria?: string | undefined;
74147449

74157450
/**
7416-
* <p>A list of system fields to include in the log events sent to the subscription destination. Valid values are <code>@aws.account</code> and <code>@aws.region</code>. These fields provide source information for centralized log data in the forwarded payload.</p>
7451+
* <p>A list of system fields to include in the log events sent to the subscription destination.
7452+
* Valid values are <code>@aws.account</code> and <code>@aws.region</code>. These fields provide
7453+
* source information for centralized log data in the forwarded payload.</p>
74177454
* @public
74187455
*/
74197456
emitSystemFields?: string[] | undefined;

clients/client-cloudwatch-logs/src/schemas/schemas_0.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,7 @@ const _mP = "matchPatterns";
637637
const _mR = "maxResults";
638638
const _mT = "metricTransformations";
639639
const _mV = "metricValue";
640+
const _mVa = "mappingVersion";
640641
const _ma = "match";
641642
const _man = "mandatory";
642643
const _mat = "matches";
@@ -1625,7 +1626,7 @@ export var ParseKeyValue: StaticStructureSchema = [
16251626
];
16261627
export var ParsePostgres: StaticStructureSchema = [3, n0, _PP, 0, [_so], [0]];
16271628
export var ParseRoute53: StaticStructureSchema = [3, n0, _PR, 0, [_so], [0]];
1628-
export var ParseToOCSF: StaticStructureSchema = [3, n0, _PTOCSF, 0, [_so, _eSv, _oV], [0, 0, 0]];
1629+
export var ParseToOCSF: StaticStructureSchema = [3, n0, _PTOCSF, 0, [_so, _eSv, _oV, _mVa], [0, 0, 0, 0]];
16291630
export var ParseVPC: StaticStructureSchema = [3, n0, _PVPC, 0, [_so], [0]];
16301631
export var ParseWAF: StaticStructureSchema = [3, n0, _PWAF, 0, [_so], [0]];
16311632
export var PatternToken: StaticStructureSchema = [3, n0, _PT, 0, [_dTP, _iDs, _tS, _enu, _iTN], [1, 2, 0, 128 | 1, 0]];

0 commit comments

Comments
 (0)