Skip to content

Commit 81b5510

Browse files
author
awstools
committed
feat(client-resiliencehub): In this release, we are introducing support for regional optimization for AWS Resilience Hub applications. It also includes a few documentation updates to improve clarity.
1 parent 991855c commit 81b5510

File tree

63 files changed

+2342
-189
lines changed

Some content is hidden

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

63 files changed

+2342
-189
lines changed

clients/client-resiliencehub/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-resiliencehub/src/ResiliencehubClient.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,
@@ -176,6 +170,12 @@ import {
176170
UpdateResiliencyPolicyCommandInput,
177171
UpdateResiliencyPolicyCommandOutput,
178172
} from "./commands/UpdateResiliencyPolicyCommand";
173+
import {
174+
ClientInputEndpointParameters,
175+
ClientResolvedEndpointParameters,
176+
EndpointParameters,
177+
resolveClientEndpointParameters,
178+
} from "./endpoint/EndpointParameters";
179179
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
180180

181181
export type ServiceInputTypes =
@@ -369,12 +369,6 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
369369
*/
370370
credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;
371371

372-
/**
373-
* Fetch related hostname, signing name or signing region with given region.
374-
* @internal
375-
*/
376-
regionInfoProvider?: RegionInfoProvider;
377-
378372
/**
379373
* The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
380374
* @internal
@@ -390,11 +384,12 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
390384
type ResiliencehubClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> &
391385
ClientDefaults &
392386
RegionInputConfig &
393-
EndpointsInputConfig &
387+
EndpointInputConfig<EndpointParameters> &
394388
RetryInputConfig &
395389
HostHeaderInputConfig &
396390
AwsAuthInputConfig &
397-
UserAgentInputConfig;
391+
UserAgentInputConfig &
392+
ClientInputEndpointParameters;
398393
/**
399394
* The configuration interface of ResiliencehubClient class constructor that set the region, credentials and other options.
400395
*/
@@ -403,11 +398,12 @@ export interface ResiliencehubClientConfig extends ResiliencehubClientConfigType
403398
type ResiliencehubClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> &
404399
Required<ClientDefaults> &
405400
RegionResolvedConfig &
406-
EndpointsResolvedConfig &
401+
EndpointResolvedConfig<EndpointParameters> &
407402
RetryResolvedConfig &
408403
HostHeaderResolvedConfig &
409404
AwsAuthResolvedConfig &
410-
UserAgentResolvedConfig;
405+
UserAgentResolvedConfig &
406+
ClientResolvedEndpointParameters;
411407
/**
412408
* The resolved configuration interface of ResiliencehubClient class. This is resolved and normalized from the {@link ResiliencehubClientConfig | constructor configuration interface}.
413409
*/
@@ -433,14 +429,15 @@ export class ResiliencehubClient extends __Client<
433429

434430
constructor(configuration: ResiliencehubClientConfig) {
435431
const _config_0 = __getRuntimeConfig(configuration);
436-
const _config_1 = resolveRegionConfig(_config_0);
437-
const _config_2 = resolveEndpointsConfig(_config_1);
438-
const _config_3 = resolveRetryConfig(_config_2);
439-
const _config_4 = resolveHostHeaderConfig(_config_3);
440-
const _config_5 = resolveAwsAuthConfig(_config_4);
441-
const _config_6 = resolveUserAgentConfig(_config_5);
442-
super(_config_6);
443-
this.config = _config_6;
432+
const _config_1 = resolveClientEndpointParameters(_config_0);
433+
const _config_2 = resolveRegionConfig(_config_1);
434+
const _config_3 = resolveEndpointConfig(_config_2);
435+
const _config_4 = resolveRetryConfig(_config_3);
436+
const _config_5 = resolveHostHeaderConfig(_config_4);
437+
const _config_6 = resolveAwsAuthConfig(_config_5);
438+
const _config_7 = resolveUserAgentConfig(_config_6);
439+
super(_config_7);
440+
this.config = _config_7;
444441
this.middlewareStack.use(getRetryPlugin(this.config));
445442
this.middlewareStack.use(getContentLengthPlugin(this.config));
446443
this.middlewareStack.use(getHostHeaderPlugin(this.config));

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

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

clients/client-resiliencehub/src/commands/CreateAppCommand.ts

Lines changed: 11 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";
@@ -60,6 +61,15 @@ export class CreateAppCommand extends $Command<
6061
// Start section: command_properties
6162
// End section: command_properties
6263

64+
public static getEndpointParameterInstructions(): EndpointParameterInstructions {
65+
return {
66+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
67+
Endpoint: { type: "builtInParams", name: "endpoint" },
68+
Region: { type: "builtInParams", name: "region" },
69+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
70+
};
71+
}
72+
6373
constructor(readonly input: CreateAppCommandInput) {
6474
// Start section: command_constructor
6575
super();
@@ -75,6 +85,7 @@ export class CreateAppCommand extends $Command<
7585
options?: __HttpHandlerOptions
7686
): Handler<CreateAppCommandInput, CreateAppCommandOutput> {
7787
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
88+
this.middlewareStack.use(getEndpointPlugin(configuration, CreateAppCommand.getEndpointParameterInstructions()));
7889

7990
const stack = clientStack.concat(this.middlewareStack);
8091

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

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

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

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

clients/client-resiliencehub/src/commands/DeleteAppAssessmentCommand.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";
@@ -53,6 +54,15 @@ export class DeleteAppAssessmentCommand extends $Command<
5354
// Start section: command_properties
5455
// End section: command_properties
5556

57+
public static getEndpointParameterInstructions(): EndpointParameterInstructions {
58+
return {
59+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
60+
Endpoint: { type: "builtInParams", name: "endpoint" },
61+
Region: { type: "builtInParams", name: "region" },
62+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
63+
};
64+
}
65+
5666
constructor(readonly input: DeleteAppAssessmentCommandInput) {
5767
// Start section: command_constructor
5868
super();
@@ -68,6 +78,9 @@ export class DeleteAppAssessmentCommand extends $Command<
6878
options?: __HttpHandlerOptions
6979
): Handler<DeleteAppAssessmentCommandInput, DeleteAppAssessmentCommandOutput> {
7080
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
81+
this.middlewareStack.use(
82+
getEndpointPlugin(configuration, DeleteAppAssessmentCommand.getEndpointParameterInstructions())
83+
);
7184

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

clients/client-resiliencehub/src/commands/DeleteAppCommand.ts

Lines changed: 11 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";
@@ -53,6 +54,15 @@ export class DeleteAppCommand extends $Command<
5354
// Start section: command_properties
5455
// End section: command_properties
5556

57+
public static getEndpointParameterInstructions(): EndpointParameterInstructions {
58+
return {
59+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
60+
Endpoint: { type: "builtInParams", name: "endpoint" },
61+
Region: { type: "builtInParams", name: "region" },
62+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
63+
};
64+
}
65+
5666
constructor(readonly input: DeleteAppCommandInput) {
5767
// Start section: command_constructor
5868
super();
@@ -68,6 +78,7 @@ export class DeleteAppCommand extends $Command<
6878
options?: __HttpHandlerOptions
6979
): Handler<DeleteAppCommandInput, DeleteAppCommandOutput> {
7080
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
81+
this.middlewareStack.use(getEndpointPlugin(configuration, DeleteAppCommand.getEndpointParameterInstructions()));
7182

7283
const stack = clientStack.concat(this.middlewareStack);
7384

clients/client-resiliencehub/src/commands/DeleteRecommendationTemplateCommand.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";
@@ -55,6 +56,15 @@ export class DeleteRecommendationTemplateCommand extends $Command<
5556
// Start section: command_properties
5657
// End section: command_properties
5758

59+
public static getEndpointParameterInstructions(): EndpointParameterInstructions {
60+
return {
61+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
62+
Endpoint: { type: "builtInParams", name: "endpoint" },
63+
Region: { type: "builtInParams", name: "region" },
64+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
65+
};
66+
}
67+
5868
constructor(readonly input: DeleteRecommendationTemplateCommandInput) {
5969
// Start section: command_constructor
6070
super();
@@ -70,6 +80,9 @@ export class DeleteRecommendationTemplateCommand extends $Command<
7080
options?: __HttpHandlerOptions
7181
): Handler<DeleteRecommendationTemplateCommandInput, DeleteRecommendationTemplateCommandOutput> {
7282
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
83+
this.middlewareStack.use(
84+
getEndpointPlugin(configuration, DeleteRecommendationTemplateCommand.getEndpointParameterInstructions())
85+
);
7386

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

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

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

0 commit comments

Comments
 (0)