Skip to content

Commit 4da5ff3

Browse files
authored
feat(endpoint): add restXml endpoints 2.0 models (#4069)
1 parent 151667c commit 4da5ff3

File tree

186 files changed

+7481
-600
lines changed

Some content is hidden

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

186 files changed

+7481
-600
lines changed

clients/client-cloudfront/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-cloudfront/src/CloudFrontClient.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,
@@ -337,6 +331,12 @@ import {
337331
UpdateStreamingDistributionCommandInput,
338332
UpdateStreamingDistributionCommandOutput,
339333
} from "./commands/UpdateStreamingDistributionCommand";
334+
import {
335+
ClientInputEndpointParameters,
336+
ClientResolvedEndpointParameters,
337+
EndpointParameters,
338+
resolveClientEndpointParameters,
339+
} from "./endpoint/EndpointParameters";
340340
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
341341

342342
export type ServiceInputTypes =
@@ -648,12 +648,6 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
648648
*/
649649
credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;
650650

651-
/**
652-
* Fetch related hostname, signing name or signing region with given region.
653-
* @internal
654-
*/
655-
regionInfoProvider?: RegionInfoProvider;
656-
657651
/**
658652
* The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
659653
* @internal
@@ -669,11 +663,12 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
669663
type CloudFrontClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> &
670664
ClientDefaults &
671665
RegionInputConfig &
672-
EndpointsInputConfig &
666+
EndpointInputConfig<EndpointParameters> &
673667
RetryInputConfig &
674668
HostHeaderInputConfig &
675669
AwsAuthInputConfig &
676-
UserAgentInputConfig;
670+
UserAgentInputConfig &
671+
ClientInputEndpointParameters;
677672
/**
678673
* The configuration interface of CloudFrontClient class constructor that set the region, credentials and other options.
679674
*/
@@ -682,11 +677,12 @@ export interface CloudFrontClientConfig extends CloudFrontClientConfigType {}
682677
type CloudFrontClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> &
683678
Required<ClientDefaults> &
684679
RegionResolvedConfig &
685-
EndpointsResolvedConfig &
680+
EndpointResolvedConfig<EndpointParameters> &
686681
RetryResolvedConfig &
687682
HostHeaderResolvedConfig &
688683
AwsAuthResolvedConfig &
689-
UserAgentResolvedConfig;
684+
UserAgentResolvedConfig &
685+
ClientResolvedEndpointParameters;
690686
/**
691687
* The resolved configuration interface of CloudFrontClient class. This is resolved and normalized from the {@link CloudFrontClientConfig | constructor configuration interface}.
692688
*/
@@ -711,14 +707,15 @@ export class CloudFrontClient extends __Client<
711707

712708
constructor(configuration: CloudFrontClientConfig) {
713709
const _config_0 = __getRuntimeConfig(configuration);
714-
const _config_1 = resolveRegionConfig(_config_0);
715-
const _config_2 = resolveEndpointsConfig(_config_1);
716-
const _config_3 = resolveRetryConfig(_config_2);
717-
const _config_4 = resolveHostHeaderConfig(_config_3);
718-
const _config_5 = resolveAwsAuthConfig(_config_4);
719-
const _config_6 = resolveUserAgentConfig(_config_5);
720-
super(_config_6);
721-
this.config = _config_6;
710+
const _config_1 = resolveClientEndpointParameters(_config_0);
711+
const _config_2 = resolveRegionConfig(_config_1);
712+
const _config_3 = resolveEndpointConfig(_config_2);
713+
const _config_4 = resolveRetryConfig(_config_3);
714+
const _config_5 = resolveHostHeaderConfig(_config_4);
715+
const _config_6 = resolveAwsAuthConfig(_config_5);
716+
const _config_7 = resolveUserAgentConfig(_config_6);
717+
super(_config_7);
718+
this.config = _config_7;
722719
this.middlewareStack.use(getRetryPlugin(this.config));
723720
this.middlewareStack.use(getContentLengthPlugin(this.config));
724721
this.middlewareStack.use(getHostHeaderPlugin(this.config));

clients/client-cloudfront/src/commands/AssociateAliasCommand.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 AssociateAliasCommand 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: AssociateAliasCommandInput) {
6171
// Start section: command_constructor
6272
super();
@@ -72,6 +82,9 @@ export class AssociateAliasCommand extends $Command<
7282
options?: __HttpHandlerOptions
7383
): Handler<AssociateAliasCommandInput, AssociateAliasCommandOutput> {
7484
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
85+
this.middlewareStack.use(
86+
getEndpointPlugin(configuration, AssociateAliasCommand.getEndpointParameterInstructions())
87+
);
7588

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

clients/client-cloudfront/src/commands/CreateCachePolicyCommand.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";
@@ -72,6 +73,15 @@ export class CreateCachePolicyCommand extends $Command<
7273
// Start section: command_properties
7374
// End section: command_properties
7475

76+
public static getEndpointParameterInstructions(): EndpointParameterInstructions {
77+
return {
78+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
79+
Endpoint: { type: "builtInParams", name: "endpoint" },
80+
Region: { type: "builtInParams", name: "region" },
81+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
82+
};
83+
}
84+
7585
constructor(readonly input: CreateCachePolicyCommandInput) {
7686
// Start section: command_constructor
7787
super();
@@ -87,6 +97,9 @@ export class CreateCachePolicyCommand extends $Command<
8797
options?: __HttpHandlerOptions
8898
): Handler<CreateCachePolicyCommandInput, CreateCachePolicyCommandOutput> {
8999
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
100+
this.middlewareStack.use(
101+
getEndpointPlugin(configuration, CreateCachePolicyCommand.getEndpointParameterInstructions())
102+
);
90103

91104
const stack = clientStack.concat(this.middlewareStack);
92105

clients/client-cloudfront/src/commands/CreateCloudFrontOriginAccessIdentityCommand.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 CreateCloudFrontOriginAccessIdentityCommand 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: CreateCloudFrontOriginAccessIdentityCommandInput) {
6171
// Start section: command_constructor
6272
super();
@@ -72,6 +82,9 @@ export class CreateCloudFrontOriginAccessIdentityCommand extends $Command<
7282
options?: __HttpHandlerOptions
7383
): Handler<CreateCloudFrontOriginAccessIdentityCommandInput, CreateCloudFrontOriginAccessIdentityCommandOutput> {
7484
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
85+
this.middlewareStack.use(
86+
getEndpointPlugin(configuration, CreateCloudFrontOriginAccessIdentityCommand.getEndpointParameterInstructions())
87+
);
7588

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

clients/client-cloudfront/src/commands/CreateDistributionCommand.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 CreateDistributionCommand 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: CreateDistributionCommandInput) {
6878
// Start section: command_constructor
6979
super();
@@ -79,6 +89,9 @@ export class CreateDistributionCommand extends $Command<
7989
options?: __HttpHandlerOptions
8090
): Handler<CreateDistributionCommandInput, CreateDistributionCommandOutput> {
8191
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
92+
this.middlewareStack.use(
93+
getEndpointPlugin(configuration, CreateDistributionCommand.getEndpointParameterInstructions())
94+
);
8295

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

clients/client-cloudfront/src/commands/CreateDistributionWithTagsCommand.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 CreateDistributionWithTagsCommand 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: CreateDistributionWithTagsCommandInput) {
5666
// Start section: command_constructor
5767
super();
@@ -67,6 +77,9 @@ export class CreateDistributionWithTagsCommand extends $Command<
6777
options?: __HttpHandlerOptions
6878
): Handler<CreateDistributionWithTagsCommandInput, CreateDistributionWithTagsCommandOutput> {
6979
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
80+
this.middlewareStack.use(
81+
getEndpointPlugin(configuration, CreateDistributionWithTagsCommand.getEndpointParameterInstructions())
82+
);
7083

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

clients/client-cloudfront/src/commands/CreateFieldLevelEncryptionConfigCommand.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 CreateFieldLevelEncryptionConfigCommand 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: CreateFieldLevelEncryptionConfigCommandInput) {
5868
// Start section: command_constructor
5969
super();
@@ -69,6 +79,9 @@ export class CreateFieldLevelEncryptionConfigCommand extends $Command<
6979
options?: __HttpHandlerOptions
7080
): Handler<CreateFieldLevelEncryptionConfigCommandInput, CreateFieldLevelEncryptionConfigCommandOutput> {
7181
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
82+
this.middlewareStack.use(
83+
getEndpointPlugin(configuration, CreateFieldLevelEncryptionConfigCommand.getEndpointParameterInstructions())
84+
);
7285

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

clients/client-cloudfront/src/commands/CreateFieldLevelEncryptionProfileCommand.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 CreateFieldLevelEncryptionProfileCommand 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: CreateFieldLevelEncryptionProfileCommandInput) {
5868
// Start section: command_constructor
5969
super();
@@ -69,6 +79,9 @@ export class CreateFieldLevelEncryptionProfileCommand extends $Command<
6979
options?: __HttpHandlerOptions
7080
): Handler<CreateFieldLevelEncryptionProfileCommandInput, CreateFieldLevelEncryptionProfileCommandOutput> {
7181
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
82+
this.middlewareStack.use(
83+
getEndpointPlugin(configuration, CreateFieldLevelEncryptionProfileCommand.getEndpointParameterInstructions())
84+
);
7285

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

clients/client-cloudfront/src/commands/CreateFunctionCommand.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";
@@ -62,6 +63,15 @@ export class CreateFunctionCommand extends $Command<
6263
// Start section: command_properties
6364
// End section: command_properties
6465

66+
public static getEndpointParameterInstructions(): EndpointParameterInstructions {
67+
return {
68+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
69+
Endpoint: { type: "builtInParams", name: "endpoint" },
70+
Region: { type: "builtInParams", name: "region" },
71+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
72+
};
73+
}
74+
6575
constructor(readonly input: CreateFunctionCommandInput) {
6676
// Start section: command_constructor
6777
super();
@@ -77,6 +87,9 @@ export class CreateFunctionCommand extends $Command<
7787
options?: __HttpHandlerOptions
7888
): Handler<CreateFunctionCommandInput, CreateFunctionCommandOutput> {
7989
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
90+
this.middlewareStack.use(
91+
getEndpointPlugin(configuration, CreateFunctionCommand.getEndpointParameterInstructions())
92+
);
8093

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

0 commit comments

Comments
 (0)