Skip to content

Commit 790c085

Browse files
author
awstools
committed
feat(client-network-firewall): AWS Network Firewall adds support for stateful threat signature AWS managed rule groups.
1 parent 61e9e39 commit 790c085

File tree

3 files changed

+218
-2
lines changed

3 files changed

+218
-2
lines changed

clients/client-network-firewall/src/models/models_0.ts

+78-1
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ export interface EncryptionConfiguration {
492492
/**
493493
* <p>The type of Amazon Web Services KMS key to use for encryption of your Network Firewall resources.</p>
494494
*/
495-
Type?: EncryptionType | string;
495+
Type: EncryptionType | string | undefined;
496496
}
497497

498498
export namespace EncryptionConfiguration {
@@ -1230,6 +1230,11 @@ export interface FirewallPolicyResponse {
12301230
* <p>A complex type that contains the Amazon Web Services KMS encryption configuration settings for your firewall policy.</p>
12311231
*/
12321232
EncryptionConfiguration?: EncryptionConfiguration;
1233+
1234+
/**
1235+
* <p>The last time that the firewall policy was changed.</p>
1236+
*/
1237+
LastModifiedTime?: Date;
12331238
}
12341239

12351240
export namespace FirewallPolicyResponse {
@@ -1930,6 +1935,30 @@ export namespace RuleGroup {
19301935
});
19311936
}
19321937

1938+
/**
1939+
* <p>High-level information about the managed rule group that your own rule group is copied from. You can use the the metadata to track version updates made to the originating rule group. You can retrieve all objects for a rule group by calling <a href="https://docs.aws.amazon.com/network-firewall/latest/APIReference/API_DescribeRuleGroup.html">DescribeRuleGroup</a>.</p>
1940+
*/
1941+
export interface SourceMetadata {
1942+
/**
1943+
* <p>The Amazon Resource Name (ARN) of the rule group that your own rule group is copied from.</p>
1944+
*/
1945+
SourceArn?: string;
1946+
1947+
/**
1948+
* <p>The update token of the Amazon Web Services managed rule group that your own rule group is copied from. To determine the update token for the managed rule group, call <a href="https://docs.aws.amazon.com/network-firewall/latest/APIReference/API_DescribeRuleGroup.html#networkfirewall-DescribeRuleGroup-response-UpdateToken">DescribeRuleGroup</a>.</p>
1949+
*/
1950+
SourceUpdateToken?: string;
1951+
}
1952+
1953+
export namespace SourceMetadata {
1954+
/**
1955+
* @internal
1956+
*/
1957+
export const filterSensitiveLog = (obj: SourceMetadata): any => ({
1958+
...obj,
1959+
});
1960+
}
1961+
19331962
export enum RuleGroupType {
19341963
STATEFUL = "STATEFUL",
19351964
STATELESS = "STATELESS",
@@ -2035,6 +2064,11 @@ export interface CreateRuleGroupRequest {
20352064
* <p>A complex type that contains settings for encryption of your rule group resources.</p>
20362065
*/
20372066
EncryptionConfiguration?: EncryptionConfiguration;
2067+
2068+
/**
2069+
* <p>A complex type that contains metadata about the rule group that your own rule group is copied from. You can use the metadata to keep track of updates made to the originating rule group.</p>
2070+
*/
2071+
SourceMetadata?: SourceMetadata;
20382072
}
20392073

20402074
export namespace CreateRuleGroupRequest {
@@ -2114,6 +2148,24 @@ export interface RuleGroupResponse {
21142148
* <p>A complex type that contains the Amazon Web Services KMS encryption configuration settings for your rule group.</p>
21152149
*/
21162150
EncryptionConfiguration?: EncryptionConfiguration;
2151+
2152+
/**
2153+
* <p>A complex type that contains metadata about the rule group that your own rule group is copied from. You can use the metadata to track the version updates made to the originating rule group.</p>
2154+
*/
2155+
SourceMetadata?: SourceMetadata;
2156+
2157+
/**
2158+
* <p>The Amazon resource name (ARN) of the Amazon Simple Notification Service SNS topic that's
2159+
* used to record changes to the managed rule group. You can subscribe to the SNS topic to receive
2160+
* notifications when the managed rule group is modified, such as for new versions and for version
2161+
* expiration. For more information, see the <a href="https://docs.aws.amazon.com/sns/latest/dg/welcome.html">Amazon Simple Notification Service Developer Guide.</a>.</p>
2162+
*/
2163+
SnsTopic?: string;
2164+
2165+
/**
2166+
* <p>The last time that the rule group was changed.</p>
2167+
*/
2168+
LastModifiedTime?: Date;
21172169
}
21182170

21192171
export namespace RuleGroupResponse {
@@ -2762,6 +2814,11 @@ export interface DescribeRuleGroupMetadataResponse {
27622814
* <p>Additional options governing how Network Firewall handles the rule group. You can only use these for stateful rule groups.</p>
27632815
*/
27642816
StatefulRuleOptions?: StatefulRuleOptions;
2817+
2818+
/**
2819+
* <p>The last time that the rule group was changed.</p>
2820+
*/
2821+
LastModifiedTime?: Date;
27652822
}
27662823

27672824
export namespace DescribeRuleGroupMetadataResponse {
@@ -2998,6 +3055,11 @@ export namespace ListFirewallsResponse {
29983055
});
29993056
}
30003057

3058+
export enum ResourceManagedType {
3059+
AWS_MANAGED_DOMAIN_LISTS = "AWS_MANAGED_DOMAIN_LISTS",
3060+
AWS_MANAGED_THREAT_SIGNATURES = "AWS_MANAGED_THREAT_SIGNATURES",
3061+
}
3062+
30013063
export enum ResourceManagedStatus {
30023064
ACCOUNT = "ACCOUNT",
30033065
MANAGED = "MANAGED",
@@ -3024,6 +3086,16 @@ export interface ListRuleGroupsRequest {
30243086
* <code>MANAGED</code> returns all available managed rule groups.</p>
30253087
*/
30263088
Scope?: ResourceManagedStatus | string;
3089+
3090+
/**
3091+
* <p>Indicates the general category of the Amazon Web Services managed rule group.</p>
3092+
*/
3093+
ManagedType?: ResourceManagedType | string;
3094+
3095+
/**
3096+
* <p>Indicates whether the rule group is stateless or stateful. If the rule group is stateless, it contains stateless rules. If it is stateful, it contains stateful rules.</p>
3097+
*/
3098+
Type?: RuleGroupType | string;
30273099
}
30283100

30293101
export namespace ListRuleGroupsRequest {
@@ -3781,6 +3853,11 @@ export interface UpdateRuleGroupRequest {
37813853
* <p>A complex type that contains settings for encryption of your rule group resources.</p>
37823854
*/
37833855
EncryptionConfiguration?: EncryptionConfiguration;
3856+
3857+
/**
3858+
* <p>A complex type that contains metadata about the rule group that your own rule group is copied from. You can use the metadata to keep track of updates made to the originating rule group.</p>
3859+
*/
3860+
SourceMetadata?: SourceMetadata;
37843861
}
37853862

37863863
export namespace UpdateRuleGroupRequest {

clients/client-network-firewall/src/protocols/Aws_json1_0.ts

+46
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ import {
33
decorateServiceException as __decorateServiceException,
44
expectBoolean as __expectBoolean,
55
expectInt32 as __expectInt32,
6+
expectNonNull as __expectNonNull,
7+
expectNumber as __expectNumber,
68
expectString as __expectString,
9+
parseEpochTimestamp as __parseEpochTimestamp,
710
} from "@aws-sdk/smithy-client";
811
import {
912
Endpoint as __Endpoint,
@@ -179,6 +182,7 @@ import {
179182
RulesSource,
180183
RulesSourceList,
181184
RuleVariables,
185+
SourceMetadata,
182186
StatefulEngineOptions,
183187
StatefulRule,
184188
StatefulRuleGroupOverride,
@@ -2600,6 +2604,10 @@ const serializeAws_json1_0CreateRuleGroupRequest = (input: CreateRuleGroupReques
26002604
input.RuleGroup !== null && { RuleGroup: serializeAws_json1_0RuleGroup(input.RuleGroup, context) }),
26012605
...(input.RuleGroupName !== undefined && input.RuleGroupName !== null && { RuleGroupName: input.RuleGroupName }),
26022606
...(input.Rules !== undefined && input.Rules !== null && { Rules: input.Rules }),
2607+
...(input.SourceMetadata !== undefined &&
2608+
input.SourceMetadata !== null && {
2609+
SourceMetadata: serializeAws_json1_0SourceMetadata(input.SourceMetadata, context),
2610+
}),
26032611
...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_0TagList(input.Tags, context) }),
26042612
...(input.Type !== undefined && input.Type !== null && { Type: input.Type }),
26052613
};
@@ -2866,9 +2874,11 @@ const serializeAws_json1_0ListFirewallsRequest = (input: ListFirewallsRequest, c
28662874

28672875
const serializeAws_json1_0ListRuleGroupsRequest = (input: ListRuleGroupsRequest, context: __SerdeContext): any => {
28682876
return {
2877+
...(input.ManagedType !== undefined && input.ManagedType !== null && { ManagedType: input.ManagedType }),
28692878
...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
28702879
...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
28712880
...(input.Scope !== undefined && input.Scope !== null && { Scope: input.Scope }),
2881+
...(input.Type !== undefined && input.Type !== null && { Type: input.Type }),
28722882
};
28732883
};
28742884

@@ -3121,6 +3131,14 @@ const serializeAws_json1_0Settings = (input: string[], context: __SerdeContext):
31213131
});
31223132
};
31233133

3134+
const serializeAws_json1_0SourceMetadata = (input: SourceMetadata, context: __SerdeContext): any => {
3135+
return {
3136+
...(input.SourceArn !== undefined && input.SourceArn !== null && { SourceArn: input.SourceArn }),
3137+
...(input.SourceUpdateToken !== undefined &&
3138+
input.SourceUpdateToken !== null && { SourceUpdateToken: input.SourceUpdateToken }),
3139+
};
3140+
};
3141+
31243142
const serializeAws_json1_0StatefulActions = (input: string[], context: __SerdeContext): any => {
31253143
return input
31263144
.filter((e: any) => e != null)
@@ -3469,6 +3487,10 @@ const serializeAws_json1_0UpdateRuleGroupRequest = (input: UpdateRuleGroupReques
34693487
...(input.RuleGroupArn !== undefined && input.RuleGroupArn !== null && { RuleGroupArn: input.RuleGroupArn }),
34703488
...(input.RuleGroupName !== undefined && input.RuleGroupName !== null && { RuleGroupName: input.RuleGroupName }),
34713489
...(input.Rules !== undefined && input.Rules !== null && { Rules: input.Rules }),
3490+
...(input.SourceMetadata !== undefined &&
3491+
input.SourceMetadata !== null && {
3492+
SourceMetadata: serializeAws_json1_0SourceMetadata(input.SourceMetadata, context),
3493+
}),
34723494
...(input.Type !== undefined && input.Type !== null && { Type: input.Type }),
34733495
...(input.UpdateToken !== undefined && input.UpdateToken !== null && { UpdateToken: input.UpdateToken }),
34743496
};
@@ -3739,6 +3761,10 @@ const deserializeAws_json1_0DescribeRuleGroupMetadataResponse = (
37393761
return {
37403762
Capacity: __expectInt32(output.Capacity),
37413763
Description: __expectString(output.Description),
3764+
LastModifiedTime:
3765+
output.LastModifiedTime !== undefined && output.LastModifiedTime !== null
3766+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime)))
3767+
: undefined,
37423768
RuleGroupArn: __expectString(output.RuleGroupArn),
37433769
RuleGroupName: __expectString(output.RuleGroupName),
37443770
StatefulRuleOptions:
@@ -3907,6 +3933,10 @@ const deserializeAws_json1_0FirewallPolicyResponse = (output: any, context: __Se
39073933
FirewallPolicyId: __expectString(output.FirewallPolicyId),
39083934
FirewallPolicyName: __expectString(output.FirewallPolicyName),
39093935
FirewallPolicyStatus: __expectString(output.FirewallPolicyStatus),
3936+
LastModifiedTime:
3937+
output.LastModifiedTime !== undefined && output.LastModifiedTime !== null
3938+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime)))
3939+
: undefined,
39103940
NumberOfAssociations: __expectInt32(output.NumberOfAssociations),
39113941
Tags:
39123942
output.Tags !== undefined && output.Tags !== null
@@ -4303,11 +4333,20 @@ const deserializeAws_json1_0RuleGroupResponse = (output: any, context: __SerdeCo
43034333
output.EncryptionConfiguration !== undefined && output.EncryptionConfiguration !== null
43044334
? deserializeAws_json1_0EncryptionConfiguration(output.EncryptionConfiguration, context)
43054335
: undefined,
4336+
LastModifiedTime:
4337+
output.LastModifiedTime !== undefined && output.LastModifiedTime !== null
4338+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime)))
4339+
: undefined,
43064340
NumberOfAssociations: __expectInt32(output.NumberOfAssociations),
43074341
RuleGroupArn: __expectString(output.RuleGroupArn),
43084342
RuleGroupId: __expectString(output.RuleGroupId),
43094343
RuleGroupName: __expectString(output.RuleGroupName),
43104344
RuleGroupStatus: __expectString(output.RuleGroupStatus),
4345+
SnsTopic: __expectString(output.SnsTopic),
4346+
SourceMetadata:
4347+
output.SourceMetadata !== undefined && output.SourceMetadata !== null
4348+
? deserializeAws_json1_0SourceMetadata(output.SourceMetadata, context)
4349+
: undefined,
43114350
Tags:
43124351
output.Tags !== undefined && output.Tags !== null
43134352
? deserializeAws_json1_0TagList(output.Tags, context)
@@ -4419,6 +4458,13 @@ const deserializeAws_json1_0Settings = (output: any, context: __SerdeContext): s
44194458
return retVal;
44204459
};
44214460

4461+
const deserializeAws_json1_0SourceMetadata = (output: any, context: __SerdeContext): SourceMetadata => {
4462+
return {
4463+
SourceArn: __expectString(output.SourceArn),
4464+
SourceUpdateToken: __expectString(output.SourceUpdateToken),
4465+
} as any;
4466+
};
4467+
44224468
const deserializeAws_json1_0StatefulActions = (output: any, context: __SerdeContext): string[] => {
44234469
const retVal = (output || [])
44244470
.filter((e: any) => e != null)

0 commit comments

Comments
 (0)