Skip to content

Commit 9c21f14

Browse files
authored
feat(middleware-stack): allow adding middleware to override an existing one (#1964)
* feat(middleware-stack): allow adding middleware to override an existing one * fix: add override config to all native middleware * fix: remove resolved flag in commands(revert #1883) This reverts commit d4c302b.
1 parent ea93d22 commit 9c21f14

File tree

8,982 files changed

+9382
-45041
lines changed

Some content is hidden

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

8,982 files changed

+9382
-45041
lines changed

Diff for: clients/client-accessanalyzer/commands/CreateAnalyzerCommand.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export class CreateAnalyzerCommand extends $Command<
2828
CreateAnalyzerCommandOutput,
2929
AccessAnalyzerClientResolvedConfig
3030
> {
31-
private resolved = false;
3231
// Start section: command_properties
3332
// End section: command_properties
3433

@@ -46,10 +45,7 @@ export class CreateAnalyzerCommand extends $Command<
4645
configuration: AccessAnalyzerClientResolvedConfig,
4746
options?: __HttpHandlerOptions
4847
): Handler<CreateAnalyzerCommandInput, CreateAnalyzerCommandOutput> {
49-
if (!this.resolved) {
50-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
51-
this.resolved = true;
52-
}
48+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
5349

5450
const stack = clientStack.concat(this.middlewareStack);
5551

Diff for: clients/client-accessanalyzer/commands/CreateArchiveRuleCommand.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ export class CreateArchiveRuleCommand extends $Command<
2929
CreateArchiveRuleCommandOutput,
3030
AccessAnalyzerClientResolvedConfig
3131
> {
32-
private resolved = false;
3332
// Start section: command_properties
3433
// End section: command_properties
3534

@@ -47,10 +46,7 @@ export class CreateArchiveRuleCommand extends $Command<
4746
configuration: AccessAnalyzerClientResolvedConfig,
4847
options?: __HttpHandlerOptions
4948
): Handler<CreateArchiveRuleCommandInput, CreateArchiveRuleCommandOutput> {
50-
if (!this.resolved) {
51-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
52-
this.resolved = true;
53-
}
49+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
5450

5551
const stack = clientStack.concat(this.middlewareStack);
5652

Diff for: clients/client-accessanalyzer/commands/DeleteAnalyzerCommand.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ export class DeleteAnalyzerCommand extends $Command<
3030
DeleteAnalyzerCommandOutput,
3131
AccessAnalyzerClientResolvedConfig
3232
> {
33-
private resolved = false;
3433
// Start section: command_properties
3534
// End section: command_properties
3635

@@ -48,10 +47,7 @@ export class DeleteAnalyzerCommand extends $Command<
4847
configuration: AccessAnalyzerClientResolvedConfig,
4948
options?: __HttpHandlerOptions
5049
): Handler<DeleteAnalyzerCommandInput, DeleteAnalyzerCommandOutput> {
51-
if (!this.resolved) {
52-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
53-
this.resolved = true;
54-
}
50+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
5551

5652
const stack = clientStack.concat(this.middlewareStack);
5753

Diff for: clients/client-accessanalyzer/commands/DeleteArchiveRuleCommand.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export class DeleteArchiveRuleCommand extends $Command<
2828
DeleteArchiveRuleCommandOutput,
2929
AccessAnalyzerClientResolvedConfig
3030
> {
31-
private resolved = false;
3231
// Start section: command_properties
3332
// End section: command_properties
3433

@@ -46,10 +45,7 @@ export class DeleteArchiveRuleCommand extends $Command<
4645
configuration: AccessAnalyzerClientResolvedConfig,
4746
options?: __HttpHandlerOptions
4847
): Handler<DeleteArchiveRuleCommandInput, DeleteArchiveRuleCommandOutput> {
49-
if (!this.resolved) {
50-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
51-
this.resolved = true;
52-
}
48+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
5349

5450
const stack = clientStack.concat(this.middlewareStack);
5551

Diff for: clients/client-accessanalyzer/commands/GetAnalyzedResourceCommand.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export class GetAnalyzedResourceCommand extends $Command<
2828
GetAnalyzedResourceCommandOutput,
2929
AccessAnalyzerClientResolvedConfig
3030
> {
31-
private resolved = false;
3231
// Start section: command_properties
3332
// End section: command_properties
3433

@@ -46,10 +45,7 @@ export class GetAnalyzedResourceCommand extends $Command<
4645
configuration: AccessAnalyzerClientResolvedConfig,
4746
options?: __HttpHandlerOptions
4847
): Handler<GetAnalyzedResourceCommandInput, GetAnalyzedResourceCommandOutput> {
49-
if (!this.resolved) {
50-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
51-
this.resolved = true;
52-
}
48+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
5349

5450
const stack = clientStack.concat(this.middlewareStack);
5551

Diff for: clients/client-accessanalyzer/commands/GetAnalyzerCommand.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export class GetAnalyzerCommand extends $Command<
2828
GetAnalyzerCommandOutput,
2929
AccessAnalyzerClientResolvedConfig
3030
> {
31-
private resolved = false;
3231
// Start section: command_properties
3332
// End section: command_properties
3433

@@ -46,10 +45,7 @@ export class GetAnalyzerCommand extends $Command<
4645
configuration: AccessAnalyzerClientResolvedConfig,
4746
options?: __HttpHandlerOptions
4847
): Handler<GetAnalyzerCommandInput, GetAnalyzerCommandOutput> {
49-
if (!this.resolved) {
50-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
51-
this.resolved = true;
52-
}
48+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
5349

5450
const stack = clientStack.concat(this.middlewareStack);
5551

Diff for: clients/client-accessanalyzer/commands/GetArchiveRuleCommand.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export class GetArchiveRuleCommand extends $Command<
2828
GetArchiveRuleCommandOutput,
2929
AccessAnalyzerClientResolvedConfig
3030
> {
31-
private resolved = false;
3231
// Start section: command_properties
3332
// End section: command_properties
3433

@@ -46,10 +45,7 @@ export class GetArchiveRuleCommand extends $Command<
4645
configuration: AccessAnalyzerClientResolvedConfig,
4746
options?: __HttpHandlerOptions
4847
): Handler<GetArchiveRuleCommandInput, GetArchiveRuleCommandOutput> {
49-
if (!this.resolved) {
50-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
51-
this.resolved = true;
52-
}
48+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
5349

5450
const stack = clientStack.concat(this.middlewareStack);
5551

Diff for: clients/client-accessanalyzer/commands/GetFindingCommand.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export class GetFindingCommand extends $Command<
2828
GetFindingCommandOutput,
2929
AccessAnalyzerClientResolvedConfig
3030
> {
31-
private resolved = false;
3231
// Start section: command_properties
3332
// End section: command_properties
3433

@@ -46,10 +45,7 @@ export class GetFindingCommand extends $Command<
4645
configuration: AccessAnalyzerClientResolvedConfig,
4746
options?: __HttpHandlerOptions
4847
): Handler<GetFindingCommandInput, GetFindingCommandOutput> {
49-
if (!this.resolved) {
50-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
51-
this.resolved = true;
52-
}
48+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
5349

5450
const stack = clientStack.concat(this.middlewareStack);
5551

Diff for: clients/client-accessanalyzer/commands/ListAnalyzedResourcesCommand.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ export class ListAnalyzedResourcesCommand extends $Command<
2929
ListAnalyzedResourcesCommandOutput,
3030
AccessAnalyzerClientResolvedConfig
3131
> {
32-
private resolved = false;
3332
// Start section: command_properties
3433
// End section: command_properties
3534

@@ -47,10 +46,7 @@ export class ListAnalyzedResourcesCommand extends $Command<
4746
configuration: AccessAnalyzerClientResolvedConfig,
4847
options?: __HttpHandlerOptions
4948
): Handler<ListAnalyzedResourcesCommandInput, ListAnalyzedResourcesCommandOutput> {
50-
if (!this.resolved) {
51-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
52-
this.resolved = true;
53-
}
49+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
5450

5551
const stack = clientStack.concat(this.middlewareStack);
5652

Diff for: clients/client-accessanalyzer/commands/ListAnalyzersCommand.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export class ListAnalyzersCommand extends $Command<
2828
ListAnalyzersCommandOutput,
2929
AccessAnalyzerClientResolvedConfig
3030
> {
31-
private resolved = false;
3231
// Start section: command_properties
3332
// End section: command_properties
3433

@@ -46,10 +45,7 @@ export class ListAnalyzersCommand extends $Command<
4645
configuration: AccessAnalyzerClientResolvedConfig,
4746
options?: __HttpHandlerOptions
4847
): Handler<ListAnalyzersCommandInput, ListAnalyzersCommandOutput> {
49-
if (!this.resolved) {
50-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
51-
this.resolved = true;
52-
}
48+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
5349

5450
const stack = clientStack.concat(this.middlewareStack);
5551

Diff for: clients/client-accessanalyzer/commands/ListArchiveRulesCommand.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export class ListArchiveRulesCommand extends $Command<
2828
ListArchiveRulesCommandOutput,
2929
AccessAnalyzerClientResolvedConfig
3030
> {
31-
private resolved = false;
3231
// Start section: command_properties
3332
// End section: command_properties
3433

@@ -46,10 +45,7 @@ export class ListArchiveRulesCommand extends $Command<
4645
configuration: AccessAnalyzerClientResolvedConfig,
4746
options?: __HttpHandlerOptions
4847
): Handler<ListArchiveRulesCommandInput, ListArchiveRulesCommandOutput> {
49-
if (!this.resolved) {
50-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
51-
this.resolved = true;
52-
}
48+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
5349

5450
const stack = clientStack.concat(this.middlewareStack);
5551

Diff for: clients/client-accessanalyzer/commands/ListFindingsCommand.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export class ListFindingsCommand extends $Command<
2828
ListFindingsCommandOutput,
2929
AccessAnalyzerClientResolvedConfig
3030
> {
31-
private resolved = false;
3231
// Start section: command_properties
3332
// End section: command_properties
3433

@@ -46,10 +45,7 @@ export class ListFindingsCommand extends $Command<
4645
configuration: AccessAnalyzerClientResolvedConfig,
4746
options?: __HttpHandlerOptions
4847
): Handler<ListFindingsCommandInput, ListFindingsCommandOutput> {
49-
if (!this.resolved) {
50-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
51-
this.resolved = true;
52-
}
48+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
5349

5450
const stack = clientStack.concat(this.middlewareStack);
5551

Diff for: clients/client-accessanalyzer/commands/ListTagsForResourceCommand.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export class ListTagsForResourceCommand extends $Command<
2828
ListTagsForResourceCommandOutput,
2929
AccessAnalyzerClientResolvedConfig
3030
> {
31-
private resolved = false;
3231
// Start section: command_properties
3332
// End section: command_properties
3433

@@ -46,10 +45,7 @@ export class ListTagsForResourceCommand extends $Command<
4645
configuration: AccessAnalyzerClientResolvedConfig,
4746
options?: __HttpHandlerOptions
4847
): Handler<ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput> {
49-
if (!this.resolved) {
50-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
51-
this.resolved = true;
52-
}
48+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
5349

5450
const stack = clientStack.concat(this.middlewareStack);
5551

Diff for: clients/client-accessanalyzer/commands/StartResourceScanCommand.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export class StartResourceScanCommand extends $Command<
2828
StartResourceScanCommandOutput,
2929
AccessAnalyzerClientResolvedConfig
3030
> {
31-
private resolved = false;
3231
// Start section: command_properties
3332
// End section: command_properties
3433

@@ -46,10 +45,7 @@ export class StartResourceScanCommand extends $Command<
4645
configuration: AccessAnalyzerClientResolvedConfig,
4746
options?: __HttpHandlerOptions
4847
): Handler<StartResourceScanCommandInput, StartResourceScanCommandOutput> {
49-
if (!this.resolved) {
50-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
51-
this.resolved = true;
52-
}
48+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
5349

5450
const stack = clientStack.concat(this.middlewareStack);
5551

Diff for: clients/client-accessanalyzer/commands/TagResourceCommand.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export class TagResourceCommand extends $Command<
2828
TagResourceCommandOutput,
2929
AccessAnalyzerClientResolvedConfig
3030
> {
31-
private resolved = false;
3231
// Start section: command_properties
3332
// End section: command_properties
3433

@@ -46,10 +45,7 @@ export class TagResourceCommand extends $Command<
4645
configuration: AccessAnalyzerClientResolvedConfig,
4746
options?: __HttpHandlerOptions
4847
): Handler<TagResourceCommandInput, TagResourceCommandOutput> {
49-
if (!this.resolved) {
50-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
51-
this.resolved = true;
52-
}
48+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
5349

5450
const stack = clientStack.concat(this.middlewareStack);
5551

Diff for: clients/client-accessanalyzer/commands/UntagResourceCommand.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export class UntagResourceCommand extends $Command<
2828
UntagResourceCommandOutput,
2929
AccessAnalyzerClientResolvedConfig
3030
> {
31-
private resolved = false;
3231
// Start section: command_properties
3332
// End section: command_properties
3433

@@ -46,10 +45,7 @@ export class UntagResourceCommand extends $Command<
4645
configuration: AccessAnalyzerClientResolvedConfig,
4746
options?: __HttpHandlerOptions
4847
): Handler<UntagResourceCommandInput, UntagResourceCommandOutput> {
49-
if (!this.resolved) {
50-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
51-
this.resolved = true;
52-
}
48+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
5349

5450
const stack = clientStack.concat(this.middlewareStack);
5551

Diff for: clients/client-accessanalyzer/commands/UpdateArchiveRuleCommand.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export class UpdateArchiveRuleCommand extends $Command<
2828
UpdateArchiveRuleCommandOutput,
2929
AccessAnalyzerClientResolvedConfig
3030
> {
31-
private resolved = false;
3231
// Start section: command_properties
3332
// End section: command_properties
3433

@@ -46,10 +45,7 @@ export class UpdateArchiveRuleCommand extends $Command<
4645
configuration: AccessAnalyzerClientResolvedConfig,
4746
options?: __HttpHandlerOptions
4847
): Handler<UpdateArchiveRuleCommandInput, UpdateArchiveRuleCommandOutput> {
49-
if (!this.resolved) {
50-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
51-
this.resolved = true;
52-
}
48+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
5349

5450
const stack = clientStack.concat(this.middlewareStack);
5551

Diff for: clients/client-accessanalyzer/commands/UpdateFindingsCommand.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export class UpdateFindingsCommand extends $Command<
2828
UpdateFindingsCommandOutput,
2929
AccessAnalyzerClientResolvedConfig
3030
> {
31-
private resolved = false;
3231
// Start section: command_properties
3332
// End section: command_properties
3433

@@ -46,10 +45,7 @@ export class UpdateFindingsCommand extends $Command<
4645
configuration: AccessAnalyzerClientResolvedConfig,
4746
options?: __HttpHandlerOptions
4847
): Handler<UpdateFindingsCommandInput, UpdateFindingsCommandOutput> {
49-
if (!this.resolved) {
50-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
51-
this.resolved = true;
52-
}
48+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
5349

5450
const stack = clientStack.concat(this.middlewareStack);
5551

Diff for: clients/client-acm-pca/commands/CreateCertificateAuthorityAuditReportCommand.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ export class CreateCertificateAuthorityAuditReportCommand extends $Command<
4747
CreateCertificateAuthorityAuditReportCommandOutput,
4848
ACMPCAClientResolvedConfig
4949
> {
50-
private resolved = false;
5150
// Start section: command_properties
5251
// End section: command_properties
5352

@@ -65,10 +64,7 @@ export class CreateCertificateAuthorityAuditReportCommand extends $Command<
6564
configuration: ACMPCAClientResolvedConfig,
6665
options?: __HttpHandlerOptions
6766
): Handler<CreateCertificateAuthorityAuditReportCommandInput, CreateCertificateAuthorityAuditReportCommandOutput> {
68-
if (!this.resolved) {
69-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
70-
this.resolved = true;
71-
}
67+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
7268

7369
const stack = clientStack.concat(this.middlewareStack);
7470

Diff for: clients/client-acm-pca/commands/CreateCertificateAuthorityCommand.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ export class CreateCertificateAuthorityCommand extends $Command<
4646
CreateCertificateAuthorityCommandOutput,
4747
ACMPCAClientResolvedConfig
4848
> {
49-
private resolved = false;
5049
// Start section: command_properties
5150
// End section: command_properties
5251

@@ -64,10 +63,7 @@ export class CreateCertificateAuthorityCommand extends $Command<
6463
configuration: ACMPCAClientResolvedConfig,
6564
options?: __HttpHandlerOptions
6665
): Handler<CreateCertificateAuthorityCommandInput, CreateCertificateAuthorityCommandOutput> {
67-
if (!this.resolved) {
68-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
69-
this.resolved = true;
70-
}
66+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
7167

7268
const stack = clientStack.concat(this.middlewareStack);
7369

0 commit comments

Comments
 (0)