Skip to content

Commit b2be11f

Browse files
author
awstools
committed
feat(client-greengrass): This change allows customers to specify FunctionRuntimeOverride in FunctionDefinitionVersion. This configuration can be used if the runtime on the device is different from the AWS Lambda runtime specified for that function.
1 parent 92e9095 commit b2be11f

File tree

102 files changed

+3314
-455
lines changed

Some content is hidden

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

102 files changed

+3314
-455
lines changed

clients/client-greengrass/package.json

Lines changed: 1 addition & 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": "*",

clients/client-greengrass/src/GreengrassClient.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,
@@ -373,6 +367,12 @@ import {
373367
UpdateThingRuntimeConfigurationCommandInput,
374368
UpdateThingRuntimeConfigurationCommandOutput,
375369
} from "./commands/UpdateThingRuntimeConfigurationCommand";
370+
import {
371+
ClientInputEndpointParameters,
372+
ClientResolvedEndpointParameters,
373+
EndpointParameters,
374+
resolveClientEndpointParameters,
375+
} from "./endpoint/EndpointParameters";
376376
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
377377

378378
export type ServiceInputTypes =
@@ -672,12 +672,6 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
672672
*/
673673
credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;
674674

675-
/**
676-
* Fetch related hostname, signing name or signing region with given region.
677-
* @internal
678-
*/
679-
regionInfoProvider?: RegionInfoProvider;
680-
681675
/**
682676
* The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
683677
* @internal
@@ -693,11 +687,12 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
693687
type GreengrassClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> &
694688
ClientDefaults &
695689
RegionInputConfig &
696-
EndpointsInputConfig &
690+
EndpointInputConfig<EndpointParameters> &
697691
RetryInputConfig &
698692
HostHeaderInputConfig &
699693
AwsAuthInputConfig &
700-
UserAgentInputConfig;
694+
UserAgentInputConfig &
695+
ClientInputEndpointParameters;
701696
/**
702697
* The configuration interface of GreengrassClient class constructor that set the region, credentials and other options.
703698
*/
@@ -706,11 +701,12 @@ export interface GreengrassClientConfig extends GreengrassClientConfigType {}
706701
type GreengrassClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> &
707702
Required<ClientDefaults> &
708703
RegionResolvedConfig &
709-
EndpointsResolvedConfig &
704+
EndpointResolvedConfig<EndpointParameters> &
710705
RetryResolvedConfig &
711706
HostHeaderResolvedConfig &
712707
AwsAuthResolvedConfig &
713-
UserAgentResolvedConfig;
708+
UserAgentResolvedConfig &
709+
ClientResolvedEndpointParameters;
714710
/**
715711
* The resolved configuration interface of GreengrassClient class. This is resolved and normalized from the {@link GreengrassClientConfig | constructor configuration interface}.
716712
*/
@@ -732,14 +728,15 @@ export class GreengrassClient extends __Client<
732728

733729
constructor(configuration: GreengrassClientConfig) {
734730
const _config_0 = __getRuntimeConfig(configuration);
735-
const _config_1 = resolveRegionConfig(_config_0);
736-
const _config_2 = resolveEndpointsConfig(_config_1);
737-
const _config_3 = resolveRetryConfig(_config_2);
738-
const _config_4 = resolveHostHeaderConfig(_config_3);
739-
const _config_5 = resolveAwsAuthConfig(_config_4);
740-
const _config_6 = resolveUserAgentConfig(_config_5);
741-
super(_config_6);
742-
this.config = _config_6;
731+
const _config_1 = resolveClientEndpointParameters(_config_0);
732+
const _config_2 = resolveRegionConfig(_config_1);
733+
const _config_3 = resolveEndpointConfig(_config_2);
734+
const _config_4 = resolveRetryConfig(_config_3);
735+
const _config_5 = resolveHostHeaderConfig(_config_4);
736+
const _config_6 = resolveAwsAuthConfig(_config_5);
737+
const _config_7 = resolveUserAgentConfig(_config_6);
738+
super(_config_7);
739+
this.config = _config_7;
743740
this.middlewareStack.use(getRetryPlugin(this.config));
744741
this.middlewareStack.use(getContentLengthPlugin(this.config));
745742
this.middlewareStack.use(getHostHeaderPlugin(this.config));

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

0 commit comments

Comments
 (0)