Skip to content

Commit

Permalink
fix(clients): remove unsupported CORS retry headers in new services (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr authored Feb 18, 2021
1 parent a0068f3 commit 82df9d3
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 10 deletions.
9 changes: 8 additions & 1 deletion clients/client-appintegrations/AppIntegrationsClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,13 @@ import {
resolveHostHeaderConfig,
} from "@aws-sdk/middleware-host-header";
import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
import { RetryInputConfig, RetryResolvedConfig, getRetryPlugin, resolveRetryConfig } from "@aws-sdk/middleware-retry";
import {
RetryInputConfig,
RetryResolvedConfig,
getOmitRetryHeadersPlugin,
getRetryPlugin,
resolveRetryConfig,
} from "@aws-sdk/middleware-retry";
import {
AwsAuthInputConfig,
AwsAuthResolvedConfig,
Expand Down Expand Up @@ -248,6 +254,7 @@ export class AppIntegrationsClient extends __Client<
this.middlewareStack.use(getHostHeaderPlugin(this.config));
this.middlewareStack.use(getLoggerPlugin(this.config));
this.middlewareStack.use(getUserAgentPlugin(this.config));
this.middlewareStack.use(getOmitRetryHeadersPlugin(this.config));
}

destroy(): void {
Expand Down
9 changes: 8 additions & 1 deletion clients/client-auditmanager/AuditManagerClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,13 @@ import {
resolveHostHeaderConfig,
} from "@aws-sdk/middleware-host-header";
import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
import { RetryInputConfig, RetryResolvedConfig, getRetryPlugin, resolveRetryConfig } from "@aws-sdk/middleware-retry";
import {
RetryInputConfig,
RetryResolvedConfig,
getOmitRetryHeadersPlugin,
getRetryPlugin,
resolveRetryConfig,
} from "@aws-sdk/middleware-retry";
import {
AwsAuthInputConfig,
AwsAuthResolvedConfig,
Expand Down Expand Up @@ -464,6 +470,7 @@ export class AuditManagerClient extends __Client<
this.middlewareStack.use(getHostHeaderPlugin(this.config));
this.middlewareStack.use(getLoggerPlugin(this.config));
this.middlewareStack.use(getUserAgentPlugin(this.config));
this.middlewareStack.use(getOmitRetryHeadersPlugin(this.config));
}

destroy(): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@ import {
resolveHostHeaderConfig,
} from "@aws-sdk/middleware-host-header";
import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
import { RetryInputConfig, RetryResolvedConfig, getRetryPlugin, resolveRetryConfig } from "@aws-sdk/middleware-retry";
import {
RetryInputConfig,
RetryResolvedConfig,
getOmitRetryHeadersPlugin,
getRetryPlugin,
resolveRetryConfig,
} from "@aws-sdk/middleware-retry";
import {
AwsAuthInputConfig,
AwsAuthResolvedConfig,
Expand Down Expand Up @@ -207,6 +213,7 @@ export class ConnectContactLensClient extends __Client<
this.middlewareStack.use(getHostHeaderPlugin(this.config));
this.middlewareStack.use(getLoggerPlugin(this.config));
this.middlewareStack.use(getUserAgentPlugin(this.config));
this.middlewareStack.use(getOmitRetryHeadersPlugin(this.config));
}

destroy(): void {
Expand Down
9 changes: 8 additions & 1 deletion clients/client-customer-profiles/CustomerProfilesClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,13 @@ import {
resolveHostHeaderConfig,
} from "@aws-sdk/middleware-host-header";
import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
import { RetryInputConfig, RetryResolvedConfig, getRetryPlugin, resolveRetryConfig } from "@aws-sdk/middleware-retry";
import {
RetryInputConfig,
RetryResolvedConfig,
getOmitRetryHeadersPlugin,
getRetryPlugin,
resolveRetryConfig,
} from "@aws-sdk/middleware-retry";
import {
AwsAuthInputConfig,
AwsAuthResolvedConfig,
Expand Down Expand Up @@ -317,6 +323,7 @@ export class CustomerProfilesClient extends __Client<
this.middlewareStack.use(getHostHeaderPlugin(this.config));
this.middlewareStack.use(getLoggerPlugin(this.config));
this.middlewareStack.use(getUserAgentPlugin(this.config));
this.middlewareStack.use(getOmitRetryHeadersPlugin(this.config));
}

destroy(): void {
Expand Down
9 changes: 8 additions & 1 deletion clients/client-devops-guru/DevOpsGuruClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,13 @@ import {
resolveHostHeaderConfig,
} from "@aws-sdk/middleware-host-header";
import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
import { RetryInputConfig, RetryResolvedConfig, getRetryPlugin, resolveRetryConfig } from "@aws-sdk/middleware-retry";
import {
RetryInputConfig,
RetryResolvedConfig,
getOmitRetryHeadersPlugin,
getRetryPlugin,
resolveRetryConfig,
} from "@aws-sdk/middleware-retry";
import {
AwsAuthInputConfig,
AwsAuthResolvedConfig,
Expand Down Expand Up @@ -284,6 +290,7 @@ export class DevOpsGuruClient extends __Client<
this.middlewareStack.use(getHostHeaderPlugin(this.config));
this.middlewareStack.use(getLoggerPlugin(this.config));
this.middlewareStack.use(getUserAgentPlugin(this.config));
this.middlewareStack.use(getOmitRetryHeadersPlugin(this.config));
}

destroy(): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,13 @@ import {
resolveHostHeaderConfig,
} from "@aws-sdk/middleware-host-header";
import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
import { RetryInputConfig, RetryResolvedConfig, getRetryPlugin, resolveRetryConfig } from "@aws-sdk/middleware-retry";
import {
RetryInputConfig,
RetryResolvedConfig,
getOmitRetryHeadersPlugin,
getRetryPlugin,
resolveRetryConfig,
} from "@aws-sdk/middleware-retry";
import {
AwsAuthInputConfig,
AwsAuthResolvedConfig,
Expand Down Expand Up @@ -284,6 +290,7 @@ export class ServiceCatalogAppRegistryClient extends __Client<
this.middlewareStack.use(getHostHeaderPlugin(this.config));
this.middlewareStack.use(getLoggerPlugin(this.config));
this.middlewareStack.use(getUserAgentPlugin(this.config));
this.middlewareStack.use(getOmitRetryHeadersPlugin(this.config));
}

destroy(): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,17 @@

public class AddOmitRetryHeadersDependency implements TypeScriptIntegration {
private static final Set<String> SERVICE_IDS = SetUtils.of(
"ConnectParticipant",
"IoT Data Plane",
"IoT",
"Kinesis Video Signaling"
"ConnectParticipant", // P43593766
"IoT Data Plane", // P40355845
"IoT", // P39759657
"Kinesis Video Signaling",
"AppFlow", // P44424582
"AppIntegrations", // P44426207
"AuditManager", // P44428767
"Connect Contact Lens", // P44429036
"Customer Profiles", // P44430824
"DevOps Guru", // P44429743
"Service Catalog AppRegistry" // P44430229
);

@Override
Expand Down

0 comments on commit 82df9d3

Please sign in to comment.