Skip to content

Commit 7dbbfd5

Browse files
author
awstools
committed
feat(client-fms): AWS Firewall Manager now supports the configuration of third-party policies that can use either the centralized or distributed deployment models.
1 parent 4e3290e commit 7dbbfd5

26 files changed

+7346
-5285
lines changed

clients/client-fms/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
AWS SDK for JavaScript FMS Client for Node.js, Browser and React Native.
99

1010
<p>This is the <i>Firewall Manager API Reference</i>. This guide is for
11-
developers who need detailed information about the Firewall Manager API actions, data types, and
12-
errors. For detailed information about Firewall Manager features, see the <a href="https://docs.aws.amazon.com/waf/latest/developerguide/fms-chapter.html">Firewall Manager
13-
Developer Guide</a>.</p>
14-
<p>Some API actions require explicit resource permissions. For information, see the
15-
developer guide topic <a href="https://docs.aws.amazon.com/waf/latest/developerguide/fms-api-permissions-ref.html">Firewall Manager required permissions
16-
for API actions</a>. </p>
11+
developers who need detailed information about the Firewall Manager API actions, data
12+
types, and errors. For detailed information about Firewall Manager features, see the
13+
<a href="https://docs.aws.amazon.com/waf/latest/developerguide/fms-chapter.html">Firewall Manager Developer Guide</a>.</p>
14+
<p>Some API actions require explicit resource permissions. For information, see the developer guide topic
15+
<a href="https://docs.aws.amazon.com/waf/latest/developerguide/fms-api-permissions-ref.html">Firewall Manager required permissions for API actions</a>.
16+
</p>
1717

1818
## Installing
1919

clients/client-fms/src/FMS.ts

Lines changed: 208 additions & 59 deletions
Large diffs are not rendered by default.

clients/client-fms/src/FMSClient.ts

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ import {
5555
AssociateAdminAccountCommandInput,
5656
AssociateAdminAccountCommandOutput,
5757
} from "./commands/AssociateAdminAccountCommand";
58+
import {
59+
AssociateThirdPartyFirewallCommandInput,
60+
AssociateThirdPartyFirewallCommandOutput,
61+
} from "./commands/AssociateThirdPartyFirewallCommand";
5862
import { DeleteAppsListCommandInput, DeleteAppsListCommandOutput } from "./commands/DeleteAppsListCommand";
5963
import {
6064
DeleteNotificationChannelCommandInput,
@@ -69,6 +73,10 @@ import {
6973
DisassociateAdminAccountCommandInput,
7074
DisassociateAdminAccountCommandOutput,
7175
} from "./commands/DisassociateAdminAccountCommand";
76+
import {
77+
DisassociateThirdPartyFirewallCommandInput,
78+
DisassociateThirdPartyFirewallCommandOutput,
79+
} from "./commands/DisassociateThirdPartyFirewallCommand";
7280
import { GetAdminAccountCommandInput, GetAdminAccountCommandOutput } from "./commands/GetAdminAccountCommand";
7381
import { GetAppsListCommandInput, GetAppsListCommandOutput } from "./commands/GetAppsListCommand";
7482
import {
@@ -85,6 +93,10 @@ import {
8593
GetProtectionStatusCommandOutput,
8694
} from "./commands/GetProtectionStatusCommand";
8795
import { GetProtocolsListCommandInput, GetProtocolsListCommandOutput } from "./commands/GetProtocolsListCommand";
96+
import {
97+
GetThirdPartyFirewallAssociationStatusCommandInput,
98+
GetThirdPartyFirewallAssociationStatusCommandOutput,
99+
} from "./commands/GetThirdPartyFirewallAssociationStatusCommand";
88100
import {
89101
GetViolationDetailsCommandInput,
90102
GetViolationDetailsCommandOutput,
@@ -101,6 +113,10 @@ import {
101113
ListTagsForResourceCommandInput,
102114
ListTagsForResourceCommandOutput,
103115
} from "./commands/ListTagsForResourceCommand";
116+
import {
117+
ListThirdPartyFirewallFirewallPoliciesCommandInput,
118+
ListThirdPartyFirewallFirewallPoliciesCommandOutput,
119+
} from "./commands/ListThirdPartyFirewallFirewallPoliciesCommand";
104120
import { PutAppsListCommandInput, PutAppsListCommandOutput } from "./commands/PutAppsListCommand";
105121
import {
106122
PutNotificationChannelCommandInput,
@@ -114,25 +130,29 @@ import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
114130

115131
export type ServiceInputTypes =
116132
| AssociateAdminAccountCommandInput
133+
| AssociateThirdPartyFirewallCommandInput
117134
| DeleteAppsListCommandInput
118135
| DeleteNotificationChannelCommandInput
119136
| DeletePolicyCommandInput
120137
| DeleteProtocolsListCommandInput
121138
| DisassociateAdminAccountCommandInput
139+
| DisassociateThirdPartyFirewallCommandInput
122140
| GetAdminAccountCommandInput
123141
| GetAppsListCommandInput
124142
| GetComplianceDetailCommandInput
125143
| GetNotificationChannelCommandInput
126144
| GetPolicyCommandInput
127145
| GetProtectionStatusCommandInput
128146
| GetProtocolsListCommandInput
147+
| GetThirdPartyFirewallAssociationStatusCommandInput
129148
| GetViolationDetailsCommandInput
130149
| ListAppsListsCommandInput
131150
| ListComplianceStatusCommandInput
132151
| ListMemberAccountsCommandInput
133152
| ListPoliciesCommandInput
134153
| ListProtocolsListsCommandInput
135154
| ListTagsForResourceCommandInput
155+
| ListThirdPartyFirewallFirewallPoliciesCommandInput
136156
| PutAppsListCommandInput
137157
| PutNotificationChannelCommandInput
138158
| PutPolicyCommandInput
@@ -142,25 +162,29 @@ export type ServiceInputTypes =
142162

143163
export type ServiceOutputTypes =
144164
| AssociateAdminAccountCommandOutput
165+
| AssociateThirdPartyFirewallCommandOutput
145166
| DeleteAppsListCommandOutput
146167
| DeleteNotificationChannelCommandOutput
147168
| DeletePolicyCommandOutput
148169
| DeleteProtocolsListCommandOutput
149170
| DisassociateAdminAccountCommandOutput
171+
| DisassociateThirdPartyFirewallCommandOutput
150172
| GetAdminAccountCommandOutput
151173
| GetAppsListCommandOutput
152174
| GetComplianceDetailCommandOutput
153175
| GetNotificationChannelCommandOutput
154176
| GetPolicyCommandOutput
155177
| GetProtectionStatusCommandOutput
156178
| GetProtocolsListCommandOutput
179+
| GetThirdPartyFirewallAssociationStatusCommandOutput
157180
| GetViolationDetailsCommandOutput
158181
| ListAppsListsCommandOutput
159182
| ListComplianceStatusCommandOutput
160183
| ListMemberAccountsCommandOutput
161184
| ListPoliciesCommandOutput
162185
| ListProtocolsListsCommandOutput
163186
| ListTagsForResourceCommandOutput
187+
| ListThirdPartyFirewallFirewallPoliciesCommandOutput
164188
| PutAppsListCommandOutput
165189
| PutNotificationChannelCommandOutput
166190
| PutPolicyCommandOutput
@@ -323,12 +347,12 @@ export interface FMSClientResolvedConfig extends FMSClientResolvedConfigType {}
323347

324348
/**
325349
* <p>This is the <i>Firewall Manager API Reference</i>. This guide is for
326-
* developers who need detailed information about the Firewall Manager API actions, data types, and
327-
* errors. For detailed information about Firewall Manager features, see the <a href="https://docs.aws.amazon.com/waf/latest/developerguide/fms-chapter.html">Firewall Manager
328-
* Developer Guide</a>.</p>
329-
* <p>Some API actions require explicit resource permissions. For information, see the
330-
* developer guide topic <a href="https://docs.aws.amazon.com/waf/latest/developerguide/fms-api-permissions-ref.html">Firewall Manager required permissions
331-
* for API actions</a>. </p>
350+
* developers who need detailed information about the Firewall Manager API actions, data
351+
* types, and errors. For detailed information about Firewall Manager features, see the
352+
* <a href="https://docs.aws.amazon.com/waf/latest/developerguide/fms-chapter.html">Firewall Manager Developer Guide</a>.</p>
353+
* <p>Some API actions require explicit resource permissions. For information, see the developer guide topic
354+
* <a href="https://docs.aws.amazon.com/waf/latest/developerguide/fms-api-permissions-ref.html">Firewall Manager required permissions for API actions</a>.
355+
* </p>
332356
*/
333357
export class FMSClient extends __Client<
334358
__HttpHandlerOptions,

clients/client-fms/src/commands/AssociateAdminAccountCommand.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,10 @@ export interface AssociateAdminAccountCommandInput extends AssociateAdminAccount
2222
export interface AssociateAdminAccountCommandOutput extends __MetadataBearer {}
2323

2424
/**
25-
* <p>Sets the Firewall Manager administrator account. The account must be a member of the
26-
* organization in Organizations whose resources you want to protect. Firewall Manager sets the
27-
* permissions that allow the account to administer your Firewall Manager policies.</p>
28-
* <p>The account that you associate with Firewall Manager is called the Firewall Manager administrator
29-
* account. </p>
25+
* <p>Sets the Firewall Manager administrator account. The account must be
26+
* a member of the organization in Organizations whose resources you want to protect.
27+
* Firewall Manager sets the permissions that allow the account to administer your Firewall Manager policies.</p>
28+
* <p>The account that you associate with Firewall Manager is called the Firewall Manager administrator account. </p>
3029
* @example
3130
* Use a bare-bones client and the command you need to make an API call.
3231
* ```javascript
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
2+
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
3+
import { Command as $Command } from "@aws-sdk/smithy-client";
4+
import {
5+
FinalizeHandlerArguments,
6+
Handler,
7+
HandlerExecutionContext,
8+
HttpHandlerOptions as __HttpHandlerOptions,
9+
MetadataBearer as __MetadataBearer,
10+
MiddlewareStack,
11+
SerdeContext as __SerdeContext,
12+
} from "@aws-sdk/types";
13+
14+
import { FMSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../FMSClient";
15+
import { AssociateThirdPartyFirewallRequest, AssociateThirdPartyFirewallResponse } from "../models/models_0";
16+
import {
17+
deserializeAws_json1_1AssociateThirdPartyFirewallCommand,
18+
serializeAws_json1_1AssociateThirdPartyFirewallCommand,
19+
} from "../protocols/Aws_json1_1";
20+
21+
export interface AssociateThirdPartyFirewallCommandInput extends AssociateThirdPartyFirewallRequest {}
22+
export interface AssociateThirdPartyFirewallCommandOutput
23+
extends AssociateThirdPartyFirewallResponse,
24+
__MetadataBearer {}
25+
26+
/**
27+
* <p>Sets the Firewall Manager policy administrator as a tenant administrator of a third-party firewall service. A tenant is an instance of the third-party firewall service that's associated with your Amazon Web Services customer account.</p>
28+
* @example
29+
* Use a bare-bones client and the command you need to make an API call.
30+
* ```javascript
31+
* import { FMSClient, AssociateThirdPartyFirewallCommand } from "@aws-sdk/client-fms"; // ES Modules import
32+
* // const { FMSClient, AssociateThirdPartyFirewallCommand } = require("@aws-sdk/client-fms"); // CommonJS import
33+
* const client = new FMSClient(config);
34+
* const command = new AssociateThirdPartyFirewallCommand(input);
35+
* const response = await client.send(command);
36+
* ```
37+
*
38+
* @see {@link AssociateThirdPartyFirewallCommandInput} for command's `input` shape.
39+
* @see {@link AssociateThirdPartyFirewallCommandOutput} for command's `response` shape.
40+
* @see {@link FMSClientResolvedConfig | config} for FMSClient's `config` shape.
41+
*
42+
*/
43+
export class AssociateThirdPartyFirewallCommand extends $Command<
44+
AssociateThirdPartyFirewallCommandInput,
45+
AssociateThirdPartyFirewallCommandOutput,
46+
FMSClientResolvedConfig
47+
> {
48+
// Start section: command_properties
49+
// End section: command_properties
50+
51+
constructor(readonly input: AssociateThirdPartyFirewallCommandInput) {
52+
// Start section: command_constructor
53+
super();
54+
// End section: command_constructor
55+
}
56+
57+
/**
58+
* @internal
59+
*/
60+
resolveMiddleware(
61+
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
62+
configuration: FMSClientResolvedConfig,
63+
options?: __HttpHandlerOptions
64+
): Handler<AssociateThirdPartyFirewallCommandInput, AssociateThirdPartyFirewallCommandOutput> {
65+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
66+
67+
const stack = clientStack.concat(this.middlewareStack);
68+
69+
const { logger } = configuration;
70+
const clientName = "FMSClient";
71+
const commandName = "AssociateThirdPartyFirewallCommand";
72+
const handlerExecutionContext: HandlerExecutionContext = {
73+
logger,
74+
clientName,
75+
commandName,
76+
inputFilterSensitiveLog: AssociateThirdPartyFirewallRequest.filterSensitiveLog,
77+
outputFilterSensitiveLog: AssociateThirdPartyFirewallResponse.filterSensitiveLog,
78+
};
79+
const { requestHandler } = configuration;
80+
return stack.resolve(
81+
(request: FinalizeHandlerArguments<any>) =>
82+
requestHandler.handle(request.request as __HttpRequest, options || {}),
83+
handlerExecutionContext
84+
);
85+
}
86+
87+
private serialize(input: AssociateThirdPartyFirewallCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
88+
return serializeAws_json1_1AssociateThirdPartyFirewallCommand(input, context);
89+
}
90+
91+
private deserialize(
92+
output: __HttpResponse,
93+
context: __SerdeContext
94+
): Promise<AssociateThirdPartyFirewallCommandOutput> {
95+
return deserializeAws_json1_1AssociateThirdPartyFirewallCommand(output, context);
96+
}
97+
98+
// Start section: command_body_extra
99+
// End section: command_body_extra
100+
}

clients/client-fms/src/commands/DeleteNotificationChannelCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ export interface DeleteNotificationChannelCommandInput extends DeleteNotificatio
2222
export interface DeleteNotificationChannelCommandOutput extends __MetadataBearer {}
2323

2424
/**
25-
* <p>Deletes an Firewall Manager association with the IAM role and the Amazon Simple Notification
26-
* Service (SNS) topic that is used to record Firewall Manager SNS logs.</p>
25+
* <p>Deletes an Firewall Manager association with the IAM role and the Amazon Simple
26+
* Notification Service (SNS) topic that is used to record Firewall Manager SNS logs.</p>
2727
* @example
2828
* Use a bare-bones client and the command you need to make an API call.
2929
* ```javascript

clients/client-fms/src/commands/DisassociateAdminAccountCommand.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ export interface DisassociateAdminAccountCommandInput extends DisassociateAdminA
2222
export interface DisassociateAdminAccountCommandOutput extends __MetadataBearer {}
2323

2424
/**
25-
* <p>Disassociates the account that has been set as the Firewall Manager administrator account. To
26-
* set a different account as the administrator account, you must submit an
27-
* <code>AssociateAdminAccount</code> request.</p>
25+
* <p>Disassociates the account that has been set as the Firewall Manager administrator
26+
* account. To set a different account as the administrator account, you must submit an
27+
* <code>AssociateAdminAccount</code> request.</p>
2828
* @example
2929
* Use a bare-bones client and the command you need to make an API call.
3030
* ```javascript
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
2+
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
3+
import { Command as $Command } from "@aws-sdk/smithy-client";
4+
import {
5+
FinalizeHandlerArguments,
6+
Handler,
7+
HandlerExecutionContext,
8+
HttpHandlerOptions as __HttpHandlerOptions,
9+
MetadataBearer as __MetadataBearer,
10+
MiddlewareStack,
11+
SerdeContext as __SerdeContext,
12+
} from "@aws-sdk/types";
13+
14+
import { FMSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../FMSClient";
15+
import { DisassociateThirdPartyFirewallRequest, DisassociateThirdPartyFirewallResponse } from "../models/models_0";
16+
import {
17+
deserializeAws_json1_1DisassociateThirdPartyFirewallCommand,
18+
serializeAws_json1_1DisassociateThirdPartyFirewallCommand,
19+
} from "../protocols/Aws_json1_1";
20+
21+
export interface DisassociateThirdPartyFirewallCommandInput extends DisassociateThirdPartyFirewallRequest {}
22+
export interface DisassociateThirdPartyFirewallCommandOutput
23+
extends DisassociateThirdPartyFirewallResponse,
24+
__MetadataBearer {}
25+
26+
/**
27+
* <p>Disassociates a Firewall Manager policy administrator from a third-party firewall tenant. When you call <code>DisassociateThirdPartyFirewall</code>, the third-party firewall vendor deletes all of the firewalls that are associated with the account.</p>
28+
* @example
29+
* Use a bare-bones client and the command you need to make an API call.
30+
* ```javascript
31+
* import { FMSClient, DisassociateThirdPartyFirewallCommand } from "@aws-sdk/client-fms"; // ES Modules import
32+
* // const { FMSClient, DisassociateThirdPartyFirewallCommand } = require("@aws-sdk/client-fms"); // CommonJS import
33+
* const client = new FMSClient(config);
34+
* const command = new DisassociateThirdPartyFirewallCommand(input);
35+
* const response = await client.send(command);
36+
* ```
37+
*
38+
* @see {@link DisassociateThirdPartyFirewallCommandInput} for command's `input` shape.
39+
* @see {@link DisassociateThirdPartyFirewallCommandOutput} for command's `response` shape.
40+
* @see {@link FMSClientResolvedConfig | config} for FMSClient's `config` shape.
41+
*
42+
*/
43+
export class DisassociateThirdPartyFirewallCommand extends $Command<
44+
DisassociateThirdPartyFirewallCommandInput,
45+
DisassociateThirdPartyFirewallCommandOutput,
46+
FMSClientResolvedConfig
47+
> {
48+
// Start section: command_properties
49+
// End section: command_properties
50+
51+
constructor(readonly input: DisassociateThirdPartyFirewallCommandInput) {
52+
// Start section: command_constructor
53+
super();
54+
// End section: command_constructor
55+
}
56+
57+
/**
58+
* @internal
59+
*/
60+
resolveMiddleware(
61+
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
62+
configuration: FMSClientResolvedConfig,
63+
options?: __HttpHandlerOptions
64+
): Handler<DisassociateThirdPartyFirewallCommandInput, DisassociateThirdPartyFirewallCommandOutput> {
65+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
66+
67+
const stack = clientStack.concat(this.middlewareStack);
68+
69+
const { logger } = configuration;
70+
const clientName = "FMSClient";
71+
const commandName = "DisassociateThirdPartyFirewallCommand";
72+
const handlerExecutionContext: HandlerExecutionContext = {
73+
logger,
74+
clientName,
75+
commandName,
76+
inputFilterSensitiveLog: DisassociateThirdPartyFirewallRequest.filterSensitiveLog,
77+
outputFilterSensitiveLog: DisassociateThirdPartyFirewallResponse.filterSensitiveLog,
78+
};
79+
const { requestHandler } = configuration;
80+
return stack.resolve(
81+
(request: FinalizeHandlerArguments<any>) =>
82+
requestHandler.handle(request.request as __HttpRequest, options || {}),
83+
handlerExecutionContext
84+
);
85+
}
86+
87+
private serialize(
88+
input: DisassociateThirdPartyFirewallCommandInput,
89+
context: __SerdeContext
90+
): Promise<__HttpRequest> {
91+
return serializeAws_json1_1DisassociateThirdPartyFirewallCommand(input, context);
92+
}
93+
94+
private deserialize(
95+
output: __HttpResponse,
96+
context: __SerdeContext
97+
): Promise<DisassociateThirdPartyFirewallCommandOutput> {
98+
return deserializeAws_json1_1DisassociateThirdPartyFirewallCommand(output, context);
99+
}
100+
101+
// Start section: command_body_extra
102+
// End section: command_body_extra
103+
}

clients/client-fms/src/commands/GetAdminAccountCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ export interface GetAdminAccountCommandInput extends GetAdminAccountRequest {}
2222
export interface GetAdminAccountCommandOutput extends GetAdminAccountResponse, __MetadataBearer {}
2323

2424
/**
25-
* <p>Returns the Organizations account that is associated with Firewall Manager as the Firewall Manager
26-
* administrator.</p>
25+
* <p>Returns the Organizations account that is associated with Firewall Manager
26+
* as the Firewall Manager administrator.</p>
2727
* @example
2828
* Use a bare-bones client and the command you need to make an API call.
2929
* ```javascript

0 commit comments

Comments
 (0)