Skip to content

Commit 4f9f4a7

Browse files
authored
feat(clients): update clients as of 04/14/2021 (#2258)
1 parent da2c085 commit 4f9f4a7

File tree

3,267 files changed

+474984
-78085
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,267 files changed

+474984
-78085
lines changed

Diff for: clients/client-accessanalyzer/AccessAnalyzer.ts

+392-8
Large diffs are not rendered by default.

Diff for: clients/client-accessanalyzer/AccessAnalyzerClient.ts

+53-6
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,55 @@
1+
import { ApplyArchiveRuleCommandInput, ApplyArchiveRuleCommandOutput } from "./commands/ApplyArchiveRuleCommand";
2+
import {
3+
CancelPolicyGenerationCommandInput,
4+
CancelPolicyGenerationCommandOutput,
5+
} from "./commands/CancelPolicyGenerationCommand";
6+
import {
7+
CreateAccessPreviewCommandInput,
8+
CreateAccessPreviewCommandOutput,
9+
} from "./commands/CreateAccessPreviewCommand";
110
import { CreateAnalyzerCommandInput, CreateAnalyzerCommandOutput } from "./commands/CreateAnalyzerCommand";
211
import { CreateArchiveRuleCommandInput, CreateArchiveRuleCommandOutput } from "./commands/CreateArchiveRuleCommand";
312
import { DeleteAnalyzerCommandInput, DeleteAnalyzerCommandOutput } from "./commands/DeleteAnalyzerCommand";
413
import { DeleteArchiveRuleCommandInput, DeleteArchiveRuleCommandOutput } from "./commands/DeleteArchiveRuleCommand";
14+
import { GetAccessPreviewCommandInput, GetAccessPreviewCommandOutput } from "./commands/GetAccessPreviewCommand";
515
import {
616
GetAnalyzedResourceCommandInput,
717
GetAnalyzedResourceCommandOutput,
818
} from "./commands/GetAnalyzedResourceCommand";
919
import { GetAnalyzerCommandInput, GetAnalyzerCommandOutput } from "./commands/GetAnalyzerCommand";
1020
import { GetArchiveRuleCommandInput, GetArchiveRuleCommandOutput } from "./commands/GetArchiveRuleCommand";
1121
import { GetFindingCommandInput, GetFindingCommandOutput } from "./commands/GetFindingCommand";
22+
import { GetGeneratedPolicyCommandInput, GetGeneratedPolicyCommandOutput } from "./commands/GetGeneratedPolicyCommand";
23+
import {
24+
ListAccessPreviewFindingsCommandInput,
25+
ListAccessPreviewFindingsCommandOutput,
26+
} from "./commands/ListAccessPreviewFindingsCommand";
27+
import { ListAccessPreviewsCommandInput, ListAccessPreviewsCommandOutput } from "./commands/ListAccessPreviewsCommand";
1228
import {
1329
ListAnalyzedResourcesCommandInput,
1430
ListAnalyzedResourcesCommandOutput,
1531
} from "./commands/ListAnalyzedResourcesCommand";
1632
import { ListAnalyzersCommandInput, ListAnalyzersCommandOutput } from "./commands/ListAnalyzersCommand";
1733
import { ListArchiveRulesCommandInput, ListArchiveRulesCommandOutput } from "./commands/ListArchiveRulesCommand";
1834
import { ListFindingsCommandInput, ListFindingsCommandOutput } from "./commands/ListFindingsCommand";
35+
import {
36+
ListPolicyGenerationsCommandInput,
37+
ListPolicyGenerationsCommandOutput,
38+
} from "./commands/ListPolicyGenerationsCommand";
1939
import {
2040
ListTagsForResourceCommandInput,
2141
ListTagsForResourceCommandOutput,
2242
} from "./commands/ListTagsForResourceCommand";
43+
import {
44+
StartPolicyGenerationCommandInput,
45+
StartPolicyGenerationCommandOutput,
46+
} from "./commands/StartPolicyGenerationCommand";
2347
import { StartResourceScanCommandInput, StartResourceScanCommandOutput } from "./commands/StartResourceScanCommand";
2448
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
2549
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
2650
import { UpdateArchiveRuleCommandInput, UpdateArchiveRuleCommandOutput } from "./commands/UpdateArchiveRuleCommand";
2751
import { UpdateFindingsCommandInput, UpdateFindingsCommandOutput } from "./commands/UpdateFindingsCommand";
52+
import { ValidatePolicyCommandInput, ValidatePolicyCommandOutput } from "./commands/ValidatePolicyCommand";
2853
import { ClientDefaultValues as __ClientDefaultValues } from "./runtimeConfig";
2954
import {
3055
EndpointsInputConfig,
@@ -77,44 +102,64 @@ import {
77102
} from "@aws-sdk/types";
78103

79104
export type ServiceInputTypes =
105+
| ApplyArchiveRuleCommandInput
106+
| CancelPolicyGenerationCommandInput
107+
| CreateAccessPreviewCommandInput
80108
| CreateAnalyzerCommandInput
81109
| CreateArchiveRuleCommandInput
82110
| DeleteAnalyzerCommandInput
83111
| DeleteArchiveRuleCommandInput
112+
| GetAccessPreviewCommandInput
84113
| GetAnalyzedResourceCommandInput
85114
| GetAnalyzerCommandInput
86115
| GetArchiveRuleCommandInput
87116
| GetFindingCommandInput
117+
| GetGeneratedPolicyCommandInput
118+
| ListAccessPreviewFindingsCommandInput
119+
| ListAccessPreviewsCommandInput
88120
| ListAnalyzedResourcesCommandInput
89121
| ListAnalyzersCommandInput
90122
| ListArchiveRulesCommandInput
91123
| ListFindingsCommandInput
124+
| ListPolicyGenerationsCommandInput
92125
| ListTagsForResourceCommandInput
126+
| StartPolicyGenerationCommandInput
93127
| StartResourceScanCommandInput
94128
| TagResourceCommandInput
95129
| UntagResourceCommandInput
96130
| UpdateArchiveRuleCommandInput
97-
| UpdateFindingsCommandInput;
131+
| UpdateFindingsCommandInput
132+
| ValidatePolicyCommandInput;
98133

99134
export type ServiceOutputTypes =
135+
| ApplyArchiveRuleCommandOutput
136+
| CancelPolicyGenerationCommandOutput
137+
| CreateAccessPreviewCommandOutput
100138
| CreateAnalyzerCommandOutput
101139
| CreateArchiveRuleCommandOutput
102140
| DeleteAnalyzerCommandOutput
103141
| DeleteArchiveRuleCommandOutput
142+
| GetAccessPreviewCommandOutput
104143
| GetAnalyzedResourceCommandOutput
105144
| GetAnalyzerCommandOutput
106145
| GetArchiveRuleCommandOutput
107146
| GetFindingCommandOutput
147+
| GetGeneratedPolicyCommandOutput
148+
| ListAccessPreviewFindingsCommandOutput
149+
| ListAccessPreviewsCommandOutput
108150
| ListAnalyzedResourcesCommandOutput
109151
| ListAnalyzersCommandOutput
110152
| ListArchiveRulesCommandOutput
111153
| ListFindingsCommandOutput
154+
| ListPolicyGenerationsCommandOutput
112155
| ListTagsForResourceCommandOutput
156+
| StartPolicyGenerationCommandOutput
113157
| StartResourceScanCommandOutput
114158
| TagResourceCommandOutput
115159
| UntagResourceCommandOutput
116160
| UpdateArchiveRuleCommandOutput
117-
| UpdateFindingsCommandOutput;
161+
| UpdateFindingsCommandOutput
162+
| ValidatePolicyCommandOutput;
118163

119164
export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
120165
/**
@@ -233,10 +278,12 @@ export type AccessAnalyzerClientResolvedConfig = __SmithyResolvedConfiguration<_
233278
/**
234279
* <p>AWS IAM Access Analyzer helps identify potential resource-access risks by enabling you to identify
235280
* any policies that grant access to an external principal. It does this by using logic-based
236-
* reasoning to analyze resource-based policies in your AWS environment. An external principal
237-
* can be another AWS account, a root user, an IAM user or role, a federated user, an AWS
238-
* service, or an anonymous user. This guide describes the AWS IAM Access Analyzer operations that you can
239-
* call programmatically. For general information about Access Analyzer, see the <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/what-is-access-analyzer.html">AWS IAM Access Analyzer section of the IAM User Guide</a>.</p>
281+
* reasoning to analyze resource-based policies in your AWS environment. An external
282+
* principal can be another AWS account, a root user, an IAM user or role, a federated
283+
* user, an AWS service, or an anonymous user. You can also use Access Analyzer to preview and
284+
* validate public and cross-account access to your resources before deploying permissions
285+
* changes. This guide describes the AWS IAM Access Analyzer operations that you can call
286+
* programmatically. For general information about Access Analyzer, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/what-is-access-analyzer.html">AWS IAM Access Analyzer</a> in the <b>IAM User Guide</b>.</p>
240287
* <p>To start using Access Analyzer, you first need to create an analyzer.</p>
241288
*/
242289
export class AccessAnalyzerClient extends __Client<

Diff for: clients/client-accessanalyzer/README.md

+13-11
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ AWS SDK for JavaScript AccessAnalyzer Client for Node.js, Browser and React Nati
99

1010
<p>AWS IAM Access Analyzer helps identify potential resource-access risks by enabling you to identify
1111
any policies that grant access to an external principal. It does this by using logic-based
12-
reasoning to analyze resource-based policies in your AWS environment. An external principal
13-
can be another AWS account, a root user, an IAM user or role, a federated user, an AWS
14-
service, or an anonymous user. This guide describes the AWS IAM Access Analyzer operations that you can
15-
call programmatically. For general information about Access Analyzer, see the <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/what-is-access-analyzer.html">AWS IAM Access Analyzer section of the IAM User Guide</a>.</p>
12+
reasoning to analyze resource-based policies in your AWS environment. An external
13+
principal can be another AWS account, a root user, an IAM user or role, a federated
14+
user, an AWS service, or an anonymous user. You can also use Access Analyzer to preview and
15+
validate public and cross-account access to your resources before deploying permissions
16+
changes. This guide describes the AWS IAM Access Analyzer operations that you can call
17+
programmatically. For general information about Access Analyzer, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/what-is-access-analyzer.html">AWS IAM Access Analyzer</a> in the <b>IAM User Guide</b>.</p>
1618
<p>To start using Access Analyzer, you first need to create an analyzer.</p>
1719

1820
## Installing
@@ -30,16 +32,16 @@ using your favorite package manager:
3032

3133
The AWS SDK is modulized by clients and commands.
3234
To send a request, you only need to import the `AccessAnalyzerClient` and
33-
the commands you need, for example `CreateAnalyzerCommand`:
35+
the commands you need, for example `ApplyArchiveRuleCommand`:
3436

3537
```js
3638
// ES5 example
37-
const { AccessAnalyzerClient, CreateAnalyzerCommand } = require("@aws-sdk/client-accessanalyzer");
39+
const { AccessAnalyzerClient, ApplyArchiveRuleCommand } = require("@aws-sdk/client-accessanalyzer");
3840
```
3941

4042
```ts
4143
// ES6+ example
42-
import { AccessAnalyzerClient, CreateAnalyzerCommand } from "@aws-sdk/client-accessanalyzer";
44+
import { AccessAnalyzerClient, ApplyArchiveRuleCommand } from "@aws-sdk/client-accessanalyzer";
4345
```
4446

4547
### Usage
@@ -58,7 +60,7 @@ const client = new AccessAnalyzerClient({ region: "REGION" });
5860
const params = {
5961
/** input parameters */
6062
};
61-
const command = new CreateAnalyzerCommand(params);
63+
const command = new ApplyArchiveRuleCommand(params);
6264
```
6365

6466
#### Async/await
@@ -137,15 +139,15 @@ const client = new AWS.AccessAnalyzer({ region: "REGION" });
137139

138140
// async/await.
139141
try {
140-
const data = await client.createAnalyzer(params);
142+
const data = await client.applyArchiveRule(params);
141143
// process data.
142144
} catch (error) {
143145
// error handling.
144146
}
145147

146148
// Promises.
147149
client
148-
.createAnalyzer(params)
150+
.applyArchiveRule(params)
149151
.then((data) => {
150152
// process data.
151153
})
@@ -154,7 +156,7 @@ client
154156
});
155157

156158
// callbacks.
157-
client.createAnalyzer(params, (err, data) => {
159+
client.applyArchiveRule(params, (err, data) => {
158160
// proccess err and data.
159161
});
160162
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
import { AccessAnalyzerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AccessAnalyzerClient";
2+
import { ApplyArchiveRuleRequest } from "../models/models_0";
3+
import {
4+
deserializeAws_restJson1ApplyArchiveRuleCommand,
5+
serializeAws_restJson1ApplyArchiveRuleCommand,
6+
} from "../protocols/Aws_restJson1";
7+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
8+
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
9+
import { Command as $Command } from "@aws-sdk/smithy-client";
10+
import {
11+
FinalizeHandlerArguments,
12+
Handler,
13+
HandlerExecutionContext,
14+
MiddlewareStack,
15+
HttpHandlerOptions as __HttpHandlerOptions,
16+
MetadataBearer as __MetadataBearer,
17+
SerdeContext as __SerdeContext,
18+
} from "@aws-sdk/types";
19+
20+
export type ApplyArchiveRuleCommandInput = ApplyArchiveRuleRequest;
21+
export type ApplyArchiveRuleCommandOutput = __MetadataBearer;
22+
23+
/**
24+
* <p>Retroactively applies the archive rule to existing findings that meet the archive rule
25+
* criteria.</p>
26+
*/
27+
export class ApplyArchiveRuleCommand extends $Command<
28+
ApplyArchiveRuleCommandInput,
29+
ApplyArchiveRuleCommandOutput,
30+
AccessAnalyzerClientResolvedConfig
31+
> {
32+
// Start section: command_properties
33+
// End section: command_properties
34+
35+
constructor(readonly input: ApplyArchiveRuleCommandInput) {
36+
// Start section: command_constructor
37+
super();
38+
// End section: command_constructor
39+
}
40+
41+
/**
42+
* @internal
43+
*/
44+
resolveMiddleware(
45+
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
46+
configuration: AccessAnalyzerClientResolvedConfig,
47+
options?: __HttpHandlerOptions
48+
): Handler<ApplyArchiveRuleCommandInput, ApplyArchiveRuleCommandOutput> {
49+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
50+
51+
const stack = clientStack.concat(this.middlewareStack);
52+
53+
const { logger } = configuration;
54+
const clientName = "AccessAnalyzerClient";
55+
const commandName = "ApplyArchiveRuleCommand";
56+
const handlerExecutionContext: HandlerExecutionContext = {
57+
logger,
58+
clientName,
59+
commandName,
60+
inputFilterSensitiveLog: ApplyArchiveRuleRequest.filterSensitiveLog,
61+
outputFilterSensitiveLog: (output: any) => output,
62+
};
63+
const { requestHandler } = configuration;
64+
return stack.resolve(
65+
(request: FinalizeHandlerArguments<any>) =>
66+
requestHandler.handle(request.request as __HttpRequest, options || {}),
67+
handlerExecutionContext
68+
);
69+
}
70+
71+
private serialize(input: ApplyArchiveRuleCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
72+
return serializeAws_restJson1ApplyArchiveRuleCommand(input, context);
73+
}
74+
75+
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<ApplyArchiveRuleCommandOutput> {
76+
return deserializeAws_restJson1ApplyArchiveRuleCommand(output, context);
77+
}
78+
79+
// Start section: command_body_extra
80+
// End section: command_body_extra
81+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
import { AccessAnalyzerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AccessAnalyzerClient";
2+
import { CancelPolicyGenerationRequest, CancelPolicyGenerationResponse } from "../models/models_0";
3+
import {
4+
deserializeAws_restJson1CancelPolicyGenerationCommand,
5+
serializeAws_restJson1CancelPolicyGenerationCommand,
6+
} from "../protocols/Aws_restJson1";
7+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
8+
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
9+
import { Command as $Command } from "@aws-sdk/smithy-client";
10+
import {
11+
FinalizeHandlerArguments,
12+
Handler,
13+
HandlerExecutionContext,
14+
MiddlewareStack,
15+
HttpHandlerOptions as __HttpHandlerOptions,
16+
MetadataBearer as __MetadataBearer,
17+
SerdeContext as __SerdeContext,
18+
} from "@aws-sdk/types";
19+
20+
export type CancelPolicyGenerationCommandInput = CancelPolicyGenerationRequest;
21+
export type CancelPolicyGenerationCommandOutput = CancelPolicyGenerationResponse & __MetadataBearer;
22+
23+
/**
24+
* <p>Cancels the requested policy generation.</p>
25+
*/
26+
export class CancelPolicyGenerationCommand extends $Command<
27+
CancelPolicyGenerationCommandInput,
28+
CancelPolicyGenerationCommandOutput,
29+
AccessAnalyzerClientResolvedConfig
30+
> {
31+
// Start section: command_properties
32+
// End section: command_properties
33+
34+
constructor(readonly input: CancelPolicyGenerationCommandInput) {
35+
// Start section: command_constructor
36+
super();
37+
// End section: command_constructor
38+
}
39+
40+
/**
41+
* @internal
42+
*/
43+
resolveMiddleware(
44+
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
45+
configuration: AccessAnalyzerClientResolvedConfig,
46+
options?: __HttpHandlerOptions
47+
): Handler<CancelPolicyGenerationCommandInput, CancelPolicyGenerationCommandOutput> {
48+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
49+
50+
const stack = clientStack.concat(this.middlewareStack);
51+
52+
const { logger } = configuration;
53+
const clientName = "AccessAnalyzerClient";
54+
const commandName = "CancelPolicyGenerationCommand";
55+
const handlerExecutionContext: HandlerExecutionContext = {
56+
logger,
57+
clientName,
58+
commandName,
59+
inputFilterSensitiveLog: CancelPolicyGenerationRequest.filterSensitiveLog,
60+
outputFilterSensitiveLog: CancelPolicyGenerationResponse.filterSensitiveLog,
61+
};
62+
const { requestHandler } = configuration;
63+
return stack.resolve(
64+
(request: FinalizeHandlerArguments<any>) =>
65+
requestHandler.handle(request.request as __HttpRequest, options || {}),
66+
handlerExecutionContext
67+
);
68+
}
69+
70+
private serialize(input: CancelPolicyGenerationCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
71+
return serializeAws_restJson1CancelPolicyGenerationCommand(input, context);
72+
}
73+
74+
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<CancelPolicyGenerationCommandOutput> {
75+
return deserializeAws_restJson1CancelPolicyGenerationCommand(output, context);
76+
}
77+
78+
// Start section: command_body_extra
79+
// End section: command_body_extra
80+
}

0 commit comments

Comments
 (0)