Skip to content

Commit 41bb10d

Browse files
authored
feat(endpoint): endpoint models for awsquery protocol (#4070)
1 parent 4da5ff3 commit 41bb10d

File tree

1,730 files changed

+68105
-4756
lines changed

Some content is hidden

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

1,730 files changed

+68105
-4756
lines changed

clients/client-auto-scaling/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"@aws-sdk/hash-node": "*",
2727
"@aws-sdk/invalid-dependency": "*",
2828
"@aws-sdk/middleware-content-length": "*",
29+
"@aws-sdk/middleware-endpoint": "*",
2930
"@aws-sdk/middleware-host-header": "*",
3031
"@aws-sdk/middleware-logger": "*",
3132
"@aws-sdk/middleware-recursion-detection": "*",
@@ -46,6 +47,7 @@
4647
"@aws-sdk/util-body-length-node": "*",
4748
"@aws-sdk/util-defaults-mode-browser": "*",
4849
"@aws-sdk/util-defaults-mode-node": "*",
50+
"@aws-sdk/util-endpoints": "*",
4951
"@aws-sdk/util-user-agent-browser": "*",
5052
"@aws-sdk/util-user-agent-node": "*",
5153
"@aws-sdk/util-utf8-browser": "*",

clients/client-auto-scaling/src/AutoScalingClient.ts

Lines changed: 24 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
// smithy-typescript generated code
2-
import {
3-
EndpointsInputConfig,
4-
EndpointsResolvedConfig,
5-
RegionInputConfig,
6-
RegionResolvedConfig,
7-
resolveEndpointsConfig,
8-
resolveRegionConfig,
9-
} from "@aws-sdk/config-resolver";
2+
import { RegionInputConfig, RegionResolvedConfig, resolveRegionConfig } from "@aws-sdk/config-resolver";
103
import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
4+
import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@aws-sdk/middleware-endpoint";
115
import {
126
getHostHeaderPlugin,
137
HostHeaderInputConfig,
@@ -41,13 +35,13 @@ import {
4135
Credentials as __Credentials,
4236
Decoder as __Decoder,
4337
Encoder as __Encoder,
38+
EndpointV2 as __EndpointV2,
4439
Hash as __Hash,
4540
HashConstructor as __HashConstructor,
4641
HttpHandlerOptions as __HttpHandlerOptions,
4742
Logger as __Logger,
4843
Provider as __Provider,
4944
Provider,
50-
RegionInfoProvider,
5145
StreamCollector as __StreamCollector,
5246
UrlParser as __UrlParser,
5347
UserAgent as __UserAgent,
@@ -240,6 +234,12 @@ import {
240234
UpdateAutoScalingGroupCommandInput,
241235
UpdateAutoScalingGroupCommandOutput,
242236
} from "./commands/UpdateAutoScalingGroupCommand";
237+
import {
238+
ClientInputEndpointParameters,
239+
ClientResolvedEndpointParameters,
240+
EndpointParameters,
241+
resolveClientEndpointParameters,
242+
} from "./endpoint/EndpointParameters";
243243
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
244244

245245
export type ServiceInputTypes =
@@ -477,12 +477,6 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
477477
*/
478478
credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;
479479

480-
/**
481-
* Fetch related hostname, signing name or signing region with given region.
482-
* @internal
483-
*/
484-
regionInfoProvider?: RegionInfoProvider;
485-
486480
/**
487481
* The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
488482
* @internal
@@ -498,11 +492,12 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
498492
type AutoScalingClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> &
499493
ClientDefaults &
500494
RegionInputConfig &
501-
EndpointsInputConfig &
495+
EndpointInputConfig<EndpointParameters> &
502496
RetryInputConfig &
503497
HostHeaderInputConfig &
504498
AwsAuthInputConfig &
505-
UserAgentInputConfig;
499+
UserAgentInputConfig &
500+
ClientInputEndpointParameters;
506501
/**
507502
* The configuration interface of AutoScalingClient class constructor that set the region, credentials and other options.
508503
*/
@@ -511,11 +506,12 @@ export interface AutoScalingClientConfig extends AutoScalingClientConfigType {}
511506
type AutoScalingClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> &
512507
Required<ClientDefaults> &
513508
RegionResolvedConfig &
514-
EndpointsResolvedConfig &
509+
EndpointResolvedConfig<EndpointParameters> &
515510
RetryResolvedConfig &
516511
HostHeaderResolvedConfig &
517512
AwsAuthResolvedConfig &
518-
UserAgentResolvedConfig;
513+
UserAgentResolvedConfig &
514+
ClientResolvedEndpointParameters;
519515
/**
520516
* The resolved configuration interface of AutoScalingClient class. This is resolved and normalized from the {@link AutoScalingClientConfig | constructor configuration interface}.
521517
*/
@@ -553,14 +549,15 @@ export class AutoScalingClient extends __Client<
553549

554550
constructor(configuration: AutoScalingClientConfig) {
555551
const _config_0 = __getRuntimeConfig(configuration);
556-
const _config_1 = resolveRegionConfig(_config_0);
557-
const _config_2 = resolveEndpointsConfig(_config_1);
558-
const _config_3 = resolveRetryConfig(_config_2);
559-
const _config_4 = resolveHostHeaderConfig(_config_3);
560-
const _config_5 = resolveAwsAuthConfig(_config_4);
561-
const _config_6 = resolveUserAgentConfig(_config_5);
562-
super(_config_6);
563-
this.config = _config_6;
552+
const _config_1 = resolveClientEndpointParameters(_config_0);
553+
const _config_2 = resolveRegionConfig(_config_1);
554+
const _config_3 = resolveEndpointConfig(_config_2);
555+
const _config_4 = resolveRetryConfig(_config_3);
556+
const _config_5 = resolveHostHeaderConfig(_config_4);
557+
const _config_6 = resolveAwsAuthConfig(_config_5);
558+
const _config_7 = resolveUserAgentConfig(_config_6);
559+
super(_config_7);
560+
this.config = _config_7;
564561
this.middlewareStack.use(getRetryPlugin(this.config));
565562
this.middlewareStack.use(getContentLengthPlugin(this.config));
566563
this.middlewareStack.use(getHostHeaderPlugin(this.config));

clients/client-auto-scaling/src/commands/AttachInstancesCommand.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// smithy-typescript generated code
2+
import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
23
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
34
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
45
import { Command as $Command } from "@aws-sdk/smithy-client";
@@ -56,6 +57,15 @@ export class AttachInstancesCommand extends $Command<
5657
// Start section: command_properties
5758
// End section: command_properties
5859

60+
public static getEndpointParameterInstructions(): EndpointParameterInstructions {
61+
return {
62+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
63+
Endpoint: { type: "builtInParams", name: "endpoint" },
64+
Region: { type: "builtInParams", name: "region" },
65+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
66+
};
67+
}
68+
5969
constructor(readonly input: AttachInstancesCommandInput) {
6070
// Start section: command_constructor
6171
super();
@@ -71,6 +81,9 @@ export class AttachInstancesCommand extends $Command<
7181
options?: __HttpHandlerOptions
7282
): Handler<AttachInstancesCommandInput, AttachInstancesCommandOutput> {
7383
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
84+
this.middlewareStack.use(
85+
getEndpointPlugin(configuration, AttachInstancesCommand.getEndpointParameterInstructions())
86+
);
7487

7588
const stack = clientStack.concat(this.middlewareStack);
7689

clients/client-auto-scaling/src/commands/AttachLoadBalancerTargetGroupsCommand.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// smithy-typescript generated code
2+
import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
23
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
34
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
45
import { Command as $Command } from "@aws-sdk/smithy-client";
@@ -75,6 +76,15 @@ export class AttachLoadBalancerTargetGroupsCommand extends $Command<
7576
// Start section: command_properties
7677
// End section: command_properties
7778

79+
public static getEndpointParameterInstructions(): EndpointParameterInstructions {
80+
return {
81+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
82+
Endpoint: { type: "builtInParams", name: "endpoint" },
83+
Region: { type: "builtInParams", name: "region" },
84+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
85+
};
86+
}
87+
7888
constructor(readonly input: AttachLoadBalancerTargetGroupsCommandInput) {
7989
// Start section: command_constructor
8090
super();
@@ -90,6 +100,9 @@ export class AttachLoadBalancerTargetGroupsCommand extends $Command<
90100
options?: __HttpHandlerOptions
91101
): Handler<AttachLoadBalancerTargetGroupsCommandInput, AttachLoadBalancerTargetGroupsCommandOutput> {
92102
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
103+
this.middlewareStack.use(
104+
getEndpointPlugin(configuration, AttachLoadBalancerTargetGroupsCommand.getEndpointParameterInstructions())
105+
);
93106

94107
const stack = clientStack.concat(this.middlewareStack);
95108

clients/client-auto-scaling/src/commands/AttachLoadBalancersCommand.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// smithy-typescript generated code
2+
import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
23
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
34
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
45
import { Command as $Command } from "@aws-sdk/smithy-client";
@@ -63,6 +64,15 @@ export class AttachLoadBalancersCommand extends $Command<
6364
// Start section: command_properties
6465
// End section: command_properties
6566

67+
public static getEndpointParameterInstructions(): EndpointParameterInstructions {
68+
return {
69+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
70+
Endpoint: { type: "builtInParams", name: "endpoint" },
71+
Region: { type: "builtInParams", name: "region" },
72+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
73+
};
74+
}
75+
6676
constructor(readonly input: AttachLoadBalancersCommandInput) {
6777
// Start section: command_constructor
6878
super();
@@ -78,6 +88,9 @@ export class AttachLoadBalancersCommand extends $Command<
7888
options?: __HttpHandlerOptions
7989
): Handler<AttachLoadBalancersCommandInput, AttachLoadBalancersCommandOutput> {
8090
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
91+
this.middlewareStack.use(
92+
getEndpointPlugin(configuration, AttachLoadBalancersCommand.getEndpointParameterInstructions())
93+
);
8194

8295
const stack = clientStack.concat(this.middlewareStack);
8396

clients/client-auto-scaling/src/commands/BatchDeleteScheduledActionCommand.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// smithy-typescript generated code
2+
import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
23
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
34
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
45
import { Command as $Command } from "@aws-sdk/smithy-client";
@@ -52,6 +53,15 @@ export class BatchDeleteScheduledActionCommand extends $Command<
5253
// Start section: command_properties
5354
// End section: command_properties
5455

56+
public static getEndpointParameterInstructions(): EndpointParameterInstructions {
57+
return {
58+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
59+
Endpoint: { type: "builtInParams", name: "endpoint" },
60+
Region: { type: "builtInParams", name: "region" },
61+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
62+
};
63+
}
64+
5565
constructor(readonly input: BatchDeleteScheduledActionCommandInput) {
5666
// Start section: command_constructor
5767
super();
@@ -67,6 +77,9 @@ export class BatchDeleteScheduledActionCommand extends $Command<
6777
options?: __HttpHandlerOptions
6878
): Handler<BatchDeleteScheduledActionCommandInput, BatchDeleteScheduledActionCommandOutput> {
6979
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
80+
this.middlewareStack.use(
81+
getEndpointPlugin(configuration, BatchDeleteScheduledActionCommand.getEndpointParameterInstructions())
82+
);
7083

7184
const stack = clientStack.concat(this.middlewareStack);
7285

clients/client-auto-scaling/src/commands/BatchPutScheduledUpdateGroupActionCommand.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// smithy-typescript generated code
2+
import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
23
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
34
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
45
import { Command as $Command } from "@aws-sdk/smithy-client";
@@ -54,6 +55,15 @@ export class BatchPutScheduledUpdateGroupActionCommand extends $Command<
5455
// Start section: command_properties
5556
// End section: command_properties
5657

58+
public static getEndpointParameterInstructions(): EndpointParameterInstructions {
59+
return {
60+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
61+
Endpoint: { type: "builtInParams", name: "endpoint" },
62+
Region: { type: "builtInParams", name: "region" },
63+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
64+
};
65+
}
66+
5767
constructor(readonly input: BatchPutScheduledUpdateGroupActionCommandInput) {
5868
// Start section: command_constructor
5969
super();
@@ -69,6 +79,9 @@ export class BatchPutScheduledUpdateGroupActionCommand extends $Command<
6979
options?: __HttpHandlerOptions
7080
): Handler<BatchPutScheduledUpdateGroupActionCommandInput, BatchPutScheduledUpdateGroupActionCommandOutput> {
7181
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
82+
this.middlewareStack.use(
83+
getEndpointPlugin(configuration, BatchPutScheduledUpdateGroupActionCommand.getEndpointParameterInstructions())
84+
);
7285

7386
const stack = clientStack.concat(this.middlewareStack);
7487

clients/client-auto-scaling/src/commands/CancelInstanceRefreshCommand.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// smithy-typescript generated code
2+
import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
23
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
34
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
45
import { Command as $Command } from "@aws-sdk/smithy-client";
@@ -57,6 +58,15 @@ export class CancelInstanceRefreshCommand extends $Command<
5758
// Start section: command_properties
5859
// End section: command_properties
5960

61+
public static getEndpointParameterInstructions(): EndpointParameterInstructions {
62+
return {
63+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
64+
Endpoint: { type: "builtInParams", name: "endpoint" },
65+
Region: { type: "builtInParams", name: "region" },
66+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
67+
};
68+
}
69+
6070
constructor(readonly input: CancelInstanceRefreshCommandInput) {
6171
// Start section: command_constructor
6272
super();
@@ -72,6 +82,9 @@ export class CancelInstanceRefreshCommand extends $Command<
7282
options?: __HttpHandlerOptions
7383
): Handler<CancelInstanceRefreshCommandInput, CancelInstanceRefreshCommandOutput> {
7484
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
85+
this.middlewareStack.use(
86+
getEndpointPlugin(configuration, CancelInstanceRefreshCommand.getEndpointParameterInstructions())
87+
);
7588

7689
const stack = clientStack.concat(this.middlewareStack);
7790

clients/client-auto-scaling/src/commands/CompleteLifecycleActionCommand.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// smithy-typescript generated code
2+
import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
23
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
34
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
45
import { Command as $Command } from "@aws-sdk/smithy-client";
@@ -89,6 +90,15 @@ export class CompleteLifecycleActionCommand extends $Command<
8990
// Start section: command_properties
9091
// End section: command_properties
9192

93+
public static getEndpointParameterInstructions(): EndpointParameterInstructions {
94+
return {
95+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
96+
Endpoint: { type: "builtInParams", name: "endpoint" },
97+
Region: { type: "builtInParams", name: "region" },
98+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
99+
};
100+
}
101+
92102
constructor(readonly input: CompleteLifecycleActionCommandInput) {
93103
// Start section: command_constructor
94104
super();
@@ -104,6 +114,9 @@ export class CompleteLifecycleActionCommand extends $Command<
104114
options?: __HttpHandlerOptions
105115
): Handler<CompleteLifecycleActionCommandInput, CompleteLifecycleActionCommandOutput> {
106116
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
117+
this.middlewareStack.use(
118+
getEndpointPlugin(configuration, CompleteLifecycleActionCommand.getEndpointParameterInstructions())
119+
);
107120

108121
const stack = clientStack.concat(this.middlewareStack);
109122

clients/client-auto-scaling/src/commands/CreateAutoScalingGroupCommand.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// smithy-typescript generated code
2+
import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
23
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
34
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
45
import { Command as $Command } from "@aws-sdk/smithy-client";
@@ -64,6 +65,15 @@ export class CreateAutoScalingGroupCommand extends $Command<
6465
// Start section: command_properties
6566
// End section: command_properties
6667

68+
public static getEndpointParameterInstructions(): EndpointParameterInstructions {
69+
return {
70+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
71+
Endpoint: { type: "builtInParams", name: "endpoint" },
72+
Region: { type: "builtInParams", name: "region" },
73+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
74+
};
75+
}
76+
6777
constructor(readonly input: CreateAutoScalingGroupCommandInput) {
6878
// Start section: command_constructor
6979
super();
@@ -79,6 +89,9 @@ export class CreateAutoScalingGroupCommand extends $Command<
7989
options?: __HttpHandlerOptions
8090
): Handler<CreateAutoScalingGroupCommandInput, CreateAutoScalingGroupCommandOutput> {
8191
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
92+
this.middlewareStack.use(
93+
getEndpointPlugin(configuration, CreateAutoScalingGroupCommand.getEndpointParameterInstructions())
94+
);
8295

8396
const stack = clientStack.concat(this.middlewareStack);
8497

0 commit comments

Comments
 (0)