@aws-sdk/client-ecs 3.509.0 → 3.513.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist-cjs/auth/httpAuthExtensionConfiguration.js +1 -0
  2. package/dist-cjs/auth/httpAuthSchemeProvider.js +47 -0
  3. package/dist-cjs/index.js +65 -7
  4. package/dist-cjs/runtimeConfig.shared.js +10 -0
  5. package/dist-es/ECSClient.js +17 -4
  6. package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
  7. package/dist-es/auth/httpAuthSchemeProvider.js +41 -0
  8. package/dist-es/runtimeConfig.shared.js +10 -0
  9. package/dist-es/runtimeExtensions.js +3 -0
  10. package/dist-types/ECSClient.d.ts +13 -11
  11. package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
  12. package/dist-types/auth/httpAuthSchemeProvider.d.ts +61 -0
  13. package/dist-types/commands/CreateTaskSetCommand.d.ts +2 -1
  14. package/dist-types/commands/PutAccountSettingCommand.d.ts +0 -36
  15. package/dist-types/extensionConfiguration.d.ts +2 -1
  16. package/dist-types/models/models_0.d.ts +217 -69
  17. package/dist-types/runtimeConfig.browser.d.ts +5 -3
  18. package/dist-types/runtimeConfig.d.ts +4 -2
  19. package/dist-types/runtimeConfig.native.d.ts +6 -4
  20. package/dist-types/runtimeConfig.shared.d.ts +2 -0
  21. package/dist-types/ts3.4/ECSClient.d.ts +11 -9
  22. package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
  23. package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +43 -0
  24. package/dist-types/ts3.4/extensionConfiguration.d.ts +3 -1
  25. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +5 -5
  26. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -4
  27. package/dist-types/ts3.4/runtimeConfig.native.d.ts +8 -8
  28. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +2 -0
  29. package/package.json +16 -16
@@ -0,0 +1 @@
1
+ module.exports = require("../index.js");
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolveHttpAuthSchemeConfig = exports.defaultECSHttpAuthSchemeProvider = exports.defaultECSHttpAuthSchemeParametersProvider = void 0;
4
+ const core_1 = require("@aws-sdk/core");
5
+ const util_middleware_1 = require("@smithy/util-middleware");
6
+ const defaultECSHttpAuthSchemeParametersProvider = async (config, context, input) => {
7
+ return {
8
+ operation: (0, util_middleware_1.getSmithyContext)(context).operation,
9
+ region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) ||
10
+ (() => {
11
+ throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
12
+ })(),
13
+ };
14
+ };
15
+ exports.defaultECSHttpAuthSchemeParametersProvider = defaultECSHttpAuthSchemeParametersProvider;
16
+ function createAwsAuthSigv4HttpAuthOption(authParameters) {
17
+ return {
18
+ schemeId: "aws.auth#sigv4",
19
+ signingProperties: {
20
+ name: "ecs",
21
+ region: authParameters.region,
22
+ },
23
+ propertiesExtractor: (config, context) => ({
24
+ signingProperties: {
25
+ config,
26
+ context,
27
+ },
28
+ }),
29
+ };
30
+ }
31
+ const defaultECSHttpAuthSchemeProvider = (authParameters) => {
32
+ const options = [];
33
+ switch (authParameters.operation) {
34
+ default: {
35
+ options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
36
+ }
37
+ }
38
+ return options;
39
+ };
40
+ exports.defaultECSHttpAuthSchemeProvider = defaultECSHttpAuthSchemeProvider;
41
+ const resolveHttpAuthSchemeConfig = (config) => {
42
+ const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config);
43
+ return {
44
+ ...config_0,
45
+ };
46
+ };
47
+ exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
package/dist-cjs/index.js CHANGED
@@ -195,13 +195,14 @@ module.exports = __toCommonJS(src_exports);
195
195
  var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
196
196
  var import_middleware_logger = require("@aws-sdk/middleware-logger");
197
197
  var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
198
- var import_middleware_signing = require("@aws-sdk/middleware-signing");
199
198
  var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
200
199
  var import_config_resolver = require("@smithy/config-resolver");
200
+ var import_core = require("@smithy/core");
201
201
  var import_middleware_content_length = require("@smithy/middleware-content-length");
202
202
  var import_middleware_endpoint = require("@smithy/middleware-endpoint");
203
203
  var import_middleware_retry = require("@smithy/middleware-retry");
204
204
 
205
+ var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider");
205
206
 
206
207
  // src/endpoint/EndpointParameters.ts
207
208
  var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
@@ -226,19 +227,62 @@ var import_runtimeConfig = require("././runtimeConfig");
226
227
  var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
227
228
  var import_protocol_http = require("@smithy/protocol-http");
228
229
  var import_smithy_client = require("@smithy/smithy-client");
230
+
231
+ // src/auth/httpAuthExtensionConfiguration.ts
232
+ var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {
233
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
234
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
235
+ let _credentials = runtimeConfig.credentials;
236
+ return {
237
+ setHttpAuthScheme(httpAuthScheme) {
238
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
239
+ if (index === -1) {
240
+ _httpAuthSchemes.push(httpAuthScheme);
241
+ } else {
242
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
243
+ }
244
+ },
245
+ httpAuthSchemes() {
246
+ return _httpAuthSchemes;
247
+ },
248
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
249
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
250
+ },
251
+ httpAuthSchemeProvider() {
252
+ return _httpAuthSchemeProvider;
253
+ },
254
+ setCredentials(credentials) {
255
+ _credentials = credentials;
256
+ },
257
+ credentials() {
258
+ return _credentials;
259
+ }
260
+ };
261
+ }, "getHttpAuthExtensionConfiguration");
262
+ var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {
263
+ return {
264
+ httpAuthSchemes: config.httpAuthSchemes(),
265
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
266
+ credentials: config.credentials()
267
+ };
268
+ }, "resolveHttpAuthRuntimeConfig");
269
+
270
+ // src/runtimeExtensions.ts
229
271
  var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial");
230
272
  var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
231
273
  const extensionConfiguration = {
232
274
  ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),
233
275
  ...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),
234
- ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig))
276
+ ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig)),
277
+ ...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig))
235
278
  };
236
279
  extensions.forEach((extension) => extension.configure(extensionConfiguration));
237
280
  return {
238
281
  ...runtimeConfig,
239
282
  ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
240
283
  ...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
241
- ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration)
284
+ ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
285
+ ...resolveHttpAuthRuntimeConfig(extensionConfiguration)
242
286
  };
243
287
  }, "resolveRuntimeExtensions");
244
288
 
@@ -251,8 +295,8 @@ var _ECSClient = class _ECSClient extends import_smithy_client.Client {
251
295
  const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);
252
296
  const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);
253
297
  const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
254
- const _config_6 = (0, import_middleware_signing.resolveAwsAuthConfig)(_config_5);
255
- const _config_7 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_6);
298
+ const _config_6 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_5);
299
+ const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);
256
300
  const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []);
257
301
  super(_config_8);
258
302
  this.config = _config_8;
@@ -261,8 +305,14 @@ var _ECSClient = class _ECSClient extends import_smithy_client.Client {
261
305
  this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
262
306
  this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
263
307
  this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
264
- this.middlewareStack.use((0, import_middleware_signing.getAwsAuthPlugin)(this.config));
265
308
  this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
309
+ this.middlewareStack.use(
310
+ (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
311
+ httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(),
312
+ identityProviderConfigProvider: this.getIdentityProviderConfigProvider()
313
+ })
314
+ );
315
+ this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));
266
316
  }
267
317
  /**
268
318
  * Destroy underlying resources, like sockets. It's usually not necessary to do this.
@@ -272,6 +322,14 @@ var _ECSClient = class _ECSClient extends import_smithy_client.Client {
272
322
  destroy() {
273
323
  super.destroy();
274
324
  }
325
+ getDefaultHttpAuthSchemeParametersProvider() {
326
+ return import_httpAuthSchemeProvider.defaultECSHttpAuthSchemeParametersProvider;
327
+ }
328
+ getIdentityProviderConfigProvider() {
329
+ return async (config) => new import_core.DefaultIdentityProviderConfig({
330
+ "aws.auth#sigv4": config.credentials
331
+ });
332
+ }
275
333
  };
276
334
  __name(_ECSClient, "ECSClient");
277
335
  var ECSClient = _ECSClient;
@@ -4092,7 +4150,7 @@ var ECS = _ECS;
4092
4150
  (0, import_smithy_client.createAggregatedClient)(commands, ECS);
4093
4151
 
4094
4152
  // src/pagination/ListAccountSettingsPaginator.ts
4095
- var import_core = require("@smithy/core");
4153
+
4096
4154
  var paginateListAccountSettings = (0, import_core.createPaginator)(ECSClient, ListAccountSettingsCommand, "nextToken", "nextToken", "maxResults");
4097
4155
 
4098
4156
  // src/pagination/ListAttributesPaginator.ts
@@ -1,10 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getRuntimeConfig = void 0;
4
+ const core_1 = require("@aws-sdk/core");
4
5
  const smithy_client_1 = require("@smithy/smithy-client");
5
6
  const url_parser_1 = require("@smithy/url-parser");
6
7
  const util_base64_1 = require("@smithy/util-base64");
7
8
  const util_utf8_1 = require("@smithy/util-utf8");
9
+ const httpAuthSchemeProvider_1 = require("./auth/httpAuthSchemeProvider");
8
10
  const endpointResolver_1 = require("./endpoint/endpointResolver");
9
11
  const getRuntimeConfig = (config) => {
10
12
  return {
@@ -14,6 +16,14 @@ const getRuntimeConfig = (config) => {
14
16
  disableHostPrefix: config?.disableHostPrefix ?? false,
15
17
  endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
16
18
  extensions: config?.extensions ?? [],
19
+ httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultECSHttpAuthSchemeProvider,
20
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
21
+ {
22
+ schemeId: "aws.auth#sigv4",
23
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
24
+ signer: new core_1.AwsSdkSigV4Signer(),
25
+ },
26
+ ],
17
27
  logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
18
28
  serviceId: config?.serviceId ?? "ECS",
19
29
  urlParser: config?.urlParser ?? url_parser_1.parseUrl,
@@ -1,13 +1,14 @@
1
1
  import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
2
2
  import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
3
3
  import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection";
4
- import { getAwsAuthPlugin, resolveAwsAuthConfig, } from "@aws-sdk/middleware-signing";
5
4
  import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
6
5
  import { resolveRegionConfig } from "@smithy/config-resolver";
6
+ import { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from "@smithy/core";
7
7
  import { getContentLengthPlugin } from "@smithy/middleware-content-length";
8
8
  import { resolveEndpointConfig } from "@smithy/middleware-endpoint";
9
9
  import { getRetryPlugin, resolveRetryConfig } from "@smithy/middleware-retry";
10
10
  import { Client as __Client, } from "@smithy/smithy-client";
11
+ import { defaultECSHttpAuthSchemeParametersProvider, resolveHttpAuthSchemeConfig, } from "./auth/httpAuthSchemeProvider";
11
12
  import { resolveClientEndpointParameters, } from "./endpoint/EndpointParameters";
12
13
  import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
13
14
  import { resolveRuntimeExtensions } from "./runtimeExtensions";
@@ -20,8 +21,8 @@ export class ECSClient extends __Client {
20
21
  const _config_3 = resolveEndpointConfig(_config_2);
21
22
  const _config_4 = resolveRetryConfig(_config_3);
22
23
  const _config_5 = resolveHostHeaderConfig(_config_4);
23
- const _config_6 = resolveAwsAuthConfig(_config_5);
24
- const _config_7 = resolveUserAgentConfig(_config_6);
24
+ const _config_6 = resolveUserAgentConfig(_config_5);
25
+ const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
25
26
  const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
26
27
  super(_config_8);
27
28
  this.config = _config_8;
@@ -30,10 +31,22 @@ export class ECSClient extends __Client {
30
31
  this.middlewareStack.use(getHostHeaderPlugin(this.config));
31
32
  this.middlewareStack.use(getLoggerPlugin(this.config));
32
33
  this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
33
- this.middlewareStack.use(getAwsAuthPlugin(this.config));
34
34
  this.middlewareStack.use(getUserAgentPlugin(this.config));
35
+ this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
36
+ httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(),
37
+ identityProviderConfigProvider: this.getIdentityProviderConfigProvider(),
38
+ }));
39
+ this.middlewareStack.use(getHttpSigningPlugin(this.config));
35
40
  }
36
41
  destroy() {
37
42
  super.destroy();
38
43
  }
44
+ getDefaultHttpAuthSchemeParametersProvider() {
45
+ return defaultECSHttpAuthSchemeParametersProvider;
46
+ }
47
+ getIdentityProviderConfigProvider() {
48
+ return async (config) => new DefaultIdentityProviderConfig({
49
+ "aws.auth#sigv4": config.credentials,
50
+ });
51
+ }
39
52
  }
@@ -0,0 +1,38 @@
1
+ export const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
2
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
3
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
4
+ let _credentials = runtimeConfig.credentials;
5
+ return {
6
+ setHttpAuthScheme(httpAuthScheme) {
7
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
8
+ if (index === -1) {
9
+ _httpAuthSchemes.push(httpAuthScheme);
10
+ }
11
+ else {
12
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
13
+ }
14
+ },
15
+ httpAuthSchemes() {
16
+ return _httpAuthSchemes;
17
+ },
18
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
19
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
20
+ },
21
+ httpAuthSchemeProvider() {
22
+ return _httpAuthSchemeProvider;
23
+ },
24
+ setCredentials(credentials) {
25
+ _credentials = credentials;
26
+ },
27
+ credentials() {
28
+ return _credentials;
29
+ },
30
+ };
31
+ };
32
+ export const resolveHttpAuthRuntimeConfig = (config) => {
33
+ return {
34
+ httpAuthSchemes: config.httpAuthSchemes(),
35
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
36
+ credentials: config.credentials(),
37
+ };
38
+ };
@@ -0,0 +1,41 @@
1
+ import { resolveAwsSdkSigV4Config, } from "@aws-sdk/core";
2
+ import { getSmithyContext, normalizeProvider } from "@smithy/util-middleware";
3
+ export const defaultECSHttpAuthSchemeParametersProvider = async (config, context, input) => {
4
+ return {
5
+ operation: getSmithyContext(context).operation,
6
+ region: (await normalizeProvider(config.region)()) ||
7
+ (() => {
8
+ throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
9
+ })(),
10
+ };
11
+ };
12
+ function createAwsAuthSigv4HttpAuthOption(authParameters) {
13
+ return {
14
+ schemeId: "aws.auth#sigv4",
15
+ signingProperties: {
16
+ name: "ecs",
17
+ region: authParameters.region,
18
+ },
19
+ propertiesExtractor: (config, context) => ({
20
+ signingProperties: {
21
+ config,
22
+ context,
23
+ },
24
+ }),
25
+ };
26
+ }
27
+ export const defaultECSHttpAuthSchemeProvider = (authParameters) => {
28
+ const options = [];
29
+ switch (authParameters.operation) {
30
+ default: {
31
+ options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
32
+ }
33
+ }
34
+ return options;
35
+ };
36
+ export const resolveHttpAuthSchemeConfig = (config) => {
37
+ const config_0 = resolveAwsSdkSigV4Config(config);
38
+ return {
39
+ ...config_0,
40
+ };
41
+ };
@@ -1,7 +1,9 @@
1
+ import { AwsSdkSigV4Signer } from "@aws-sdk/core";
1
2
  import { NoOpLogger } from "@smithy/smithy-client";
2
3
  import { parseUrl } from "@smithy/url-parser";
3
4
  import { fromBase64, toBase64 } from "@smithy/util-base64";
4
5
  import { fromUtf8, toUtf8 } from "@smithy/util-utf8";
6
+ import { defaultECSHttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider";
5
7
  import { defaultEndpointResolver } from "./endpoint/endpointResolver";
6
8
  export const getRuntimeConfig = (config) => {
7
9
  return {
@@ -11,6 +13,14 @@ export const getRuntimeConfig = (config) => {
11
13
  disableHostPrefix: config?.disableHostPrefix ?? false,
12
14
  endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
13
15
  extensions: config?.extensions ?? [],
16
+ httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultECSHttpAuthSchemeProvider,
17
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
18
+ {
19
+ schemeId: "aws.auth#sigv4",
20
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
21
+ signer: new AwsSdkSigV4Signer(),
22
+ },
23
+ ],
14
24
  logger: config?.logger ?? new NoOpLogger(),
15
25
  serviceId: config?.serviceId ?? "ECS",
16
26
  urlParser: config?.urlParser ?? parseUrl,
@@ -1,12 +1,14 @@
1
1
  import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, } from "@aws-sdk/region-config-resolver";
2
2
  import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/protocol-http";
3
3
  import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/smithy-client";
4
+ import { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from "./auth/httpAuthExtensionConfiguration";
4
5
  const asPartial = (t) => t;
5
6
  export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
6
7
  const extensionConfiguration = {
7
8
  ...asPartial(getAwsRegionExtensionConfiguration(runtimeConfig)),
8
9
  ...asPartial(getDefaultExtensionConfiguration(runtimeConfig)),
9
10
  ...asPartial(getHttpHandlerExtensionConfiguration(runtimeConfig)),
11
+ ...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig)),
10
12
  };
11
13
  extensions.forEach((extension) => extension.configure(extensionConfiguration));
12
14
  return {
@@ -14,5 +16,6 @@ export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
14
16
  ...resolveAwsRegionExtensionConfiguration(extensionConfiguration),
15
17
  ...resolveDefaultRuntimeConfig(extensionConfiguration),
16
18
  ...resolveHttpHandlerRuntimeConfig(extensionConfiguration),
19
+ ...resolveHttpAuthRuntimeConfig(extensionConfiguration),
17
20
  };
18
21
  };
@@ -1,13 +1,12 @@
1
1
  import { HostHeaderInputConfig, HostHeaderResolvedConfig } from "@aws-sdk/middleware-host-header";
2
- import { AwsAuthInputConfig, AwsAuthResolvedConfig } from "@aws-sdk/middleware-signing";
3
2
  import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
4
- import { Credentials as __Credentials } from "@aws-sdk/types";
5
3
  import { RegionInputConfig, RegionResolvedConfig } from "@smithy/config-resolver";
6
4
  import { EndpointInputConfig, EndpointResolvedConfig } from "@smithy/middleware-endpoint";
7
5
  import { RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry";
8
6
  import { HttpHandler as __HttpHandler } from "@smithy/protocol-http";
9
7
  import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@smithy/smithy-client";
10
- import { BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
8
+ import { AwsCredentialIdentityProvider, BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
9
+ import { HttpAuthSchemeInputConfig, HttpAuthSchemeResolvedConfig } from "./auth/httpAuthSchemeProvider";
11
10
  import { CreateCapacityProviderCommandInput, CreateCapacityProviderCommandOutput } from "./commands/CreateCapacityProviderCommand";
12
11
  import { CreateClusterCommandInput, CreateClusterCommandOutput } from "./commands/CreateClusterCommand";
13
12
  import { CreateServiceCommandInput, CreateServiceCommandOutput } from "./commands/CreateServiceCommand";
@@ -147,20 +146,21 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
147
146
  * Enables FIPS compatible endpoints.
148
147
  */
149
148
  useFipsEndpoint?: boolean | __Provider<boolean>;
149
+ /**
150
+ * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
151
+ * @internal
152
+ */
153
+ defaultUserAgentProvider?: Provider<__UserAgent>;
150
154
  /**
151
155
  * The AWS region to which this client will send requests
152
156
  */
153
157
  region?: string | __Provider<string>;
154
158
  /**
155
159
  * Default credentials provider; Not available in browser runtime.
160
+ * @deprecated
156
161
  * @internal
157
162
  */
158
- credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;
159
- /**
160
- * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
161
- * @internal
162
- */
163
- defaultUserAgentProvider?: Provider<__UserAgent>;
163
+ credentialDefaultProvider?: (input: any) => AwsCredentialIdentityProvider;
164
164
  /**
165
165
  * Value for how many times a request will be made at most in case of retry.
166
166
  */
@@ -187,7 +187,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
187
187
  /**
188
188
  * @public
189
189
  */
190
- export type ECSClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RegionInputConfig & EndpointInputConfig<EndpointParameters> & RetryInputConfig & HostHeaderInputConfig & AwsAuthInputConfig & UserAgentInputConfig & ClientInputEndpointParameters;
190
+ export type ECSClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RegionInputConfig & EndpointInputConfig<EndpointParameters> & RetryInputConfig & HostHeaderInputConfig & UserAgentInputConfig & HttpAuthSchemeInputConfig & ClientInputEndpointParameters;
191
191
  /**
192
192
  * @public
193
193
  *
@@ -198,7 +198,7 @@ export interface ECSClientConfig extends ECSClientConfigType {
198
198
  /**
199
199
  * @public
200
200
  */
201
- export type ECSClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig & RegionResolvedConfig & EndpointResolvedConfig<EndpointParameters> & RetryResolvedConfig & HostHeaderResolvedConfig & AwsAuthResolvedConfig & UserAgentResolvedConfig & ClientResolvedEndpointParameters;
201
+ export type ECSClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig & RegionResolvedConfig & EndpointResolvedConfig<EndpointParameters> & RetryResolvedConfig & HostHeaderResolvedConfig & UserAgentResolvedConfig & HttpAuthSchemeResolvedConfig & ClientResolvedEndpointParameters;
202
202
  /**
203
203
  * @public
204
204
  *
@@ -234,4 +234,6 @@ export declare class ECSClient extends __Client<__HttpHandlerOptions, ServiceInp
234
234
  * Otherwise, sockets might stay open for quite a long time before the server terminates them.
235
235
  */
236
236
  destroy(): void;
237
+ private getDefaultHttpAuthSchemeParametersProvider;
238
+ private getIdentityProviderConfigProvider;
237
239
  }
@@ -0,0 +1,29 @@
1
+ import { AwsCredentialIdentity, AwsCredentialIdentityProvider, HttpAuthScheme } from "@smithy/types";
2
+ import { ECSHttpAuthSchemeProvider } from "./httpAuthSchemeProvider";
3
+ /**
4
+ * @internal
5
+ */
6
+ export interface HttpAuthExtensionConfiguration {
7
+ setHttpAuthScheme(httpAuthScheme: HttpAuthScheme): void;
8
+ httpAuthSchemes(): HttpAuthScheme[];
9
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider: ECSHttpAuthSchemeProvider): void;
10
+ httpAuthSchemeProvider(): ECSHttpAuthSchemeProvider;
11
+ setCredentials(credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider): void;
12
+ credentials(): AwsCredentialIdentity | AwsCredentialIdentityProvider | undefined;
13
+ }
14
+ /**
15
+ * @internal
16
+ */
17
+ export type HttpAuthRuntimeConfig = Partial<{
18
+ httpAuthSchemes: HttpAuthScheme[];
19
+ httpAuthSchemeProvider: ECSHttpAuthSchemeProvider;
20
+ credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider;
21
+ }>;
22
+ /**
23
+ * @internal
24
+ */
25
+ export declare const getHttpAuthExtensionConfiguration: (runtimeConfig: HttpAuthRuntimeConfig) => HttpAuthExtensionConfiguration;
26
+ /**
27
+ * @internal
28
+ */
29
+ export declare const resolveHttpAuthRuntimeConfig: (config: HttpAuthExtensionConfiguration) => HttpAuthRuntimeConfig;
@@ -0,0 +1,61 @@
1
+ import { AwsSdkSigV4AuthInputConfig, AwsSdkSigV4AuthResolvedConfig, AwsSdkSigV4PreviouslyResolved } from "@aws-sdk/core";
2
+ import { HandlerExecutionContext, HttpAuthScheme, HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider, HttpAuthSchemeProvider } from "@smithy/types";
3
+ import { ECSClientResolvedConfig } from "../ECSClient";
4
+ /**
5
+ * @internal
6
+ */
7
+ export interface ECSHttpAuthSchemeParameters extends HttpAuthSchemeParameters {
8
+ region?: string;
9
+ }
10
+ /**
11
+ * @internal
12
+ */
13
+ export interface ECSHttpAuthSchemeParametersProvider extends HttpAuthSchemeParametersProvider<ECSClientResolvedConfig, HandlerExecutionContext, ECSHttpAuthSchemeParameters, object> {
14
+ }
15
+ /**
16
+ * @internal
17
+ */
18
+ export declare const defaultECSHttpAuthSchemeParametersProvider: (config: ECSClientResolvedConfig, context: HandlerExecutionContext, input: object) => Promise<ECSHttpAuthSchemeParameters>;
19
+ /**
20
+ * @internal
21
+ */
22
+ export interface ECSHttpAuthSchemeProvider extends HttpAuthSchemeProvider<ECSHttpAuthSchemeParameters> {
23
+ }
24
+ /**
25
+ * @internal
26
+ */
27
+ export declare const defaultECSHttpAuthSchemeProvider: ECSHttpAuthSchemeProvider;
28
+ /**
29
+ * @internal
30
+ */
31
+ export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig {
32
+ /**
33
+ * experimentalIdentityAndAuth: Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
34
+ * @internal
35
+ */
36
+ httpAuthSchemes?: HttpAuthScheme[];
37
+ /**
38
+ * experimentalIdentityAndAuth: Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use.
39
+ * @internal
40
+ */
41
+ httpAuthSchemeProvider?: ECSHttpAuthSchemeProvider;
42
+ }
43
+ /**
44
+ * @internal
45
+ */
46
+ export interface HttpAuthSchemeResolvedConfig extends AwsSdkSigV4AuthResolvedConfig {
47
+ /**
48
+ * experimentalIdentityAndAuth: Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
49
+ * @internal
50
+ */
51
+ readonly httpAuthSchemes: HttpAuthScheme[];
52
+ /**
53
+ * experimentalIdentityAndAuth: Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use.
54
+ * @internal
55
+ */
56
+ readonly httpAuthSchemeProvider: ECSHttpAuthSchemeProvider;
57
+ }
58
+ /**
59
+ * @internal
60
+ */
61
+ export declare const resolveHttpAuthSchemeConfig: <T>(config: T & HttpAuthSchemeInputConfig & AwsSdkSigV4PreviouslyResolved) => T & HttpAuthSchemeResolvedConfig;
@@ -30,7 +30,8 @@ declare const CreateTaskSetCommand_base: {
30
30
  * uses the <code>EXTERNAL</code> deployment controller type. For more information, see
31
31
  * <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html">Amazon ECS deployment
32
32
  * types</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
33
- * <p>For information about the maximum number of task sets and otther quotas, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-quotas.html">Amazon ECS service quotas</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
33
+ * <p>For information about the maximum number of task sets and otther quotas, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-quotas.html">Amazon ECS
34
+ * service quotas</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
34
35
  * @example
35
36
  * Use a bare-bones client and the command you need to make an API call.
36
37
  * ```javascript
@@ -31,42 +31,6 @@ declare const PutAccountSettingCommand_base: {
31
31
  * roles that do not have specified individual account settings. For more information, see
32
32
  * <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html">Account
33
33
  * Settings</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
34
- * <p>When you specify <code>serviceLongArnFormat</code>, <code>taskLongArnFormat</code>, or
35
- * <code>containerInstanceLongArnFormat</code>, the Amazon Resource Name (ARN) and
36
- * resource ID format of the resource type for a specified user, role, or the root user for an
37
- * account is affected. The opt-in and opt-out account setting must be set for each Amazon ECS
38
- * resource separately. The ARN and resource ID format of a resource is defined by the
39
- * opt-in status of the user or role that created the resource. You must turn on this
40
- * setting to use Amazon ECS features such as resource tagging.</p>
41
- * <p>When you specify <code>awsvpcTrunking</code>, the elastic network interface (ENI)
42
- * limit for any new container instances that support the feature is changed. If
43
- * <code>awsvpcTrunking</code> is turned on, any new container instances that support
44
- * the feature are launched have the increased ENI limits available to them. For more
45
- * information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/container-instance-eni.html">Elastic Network
46
- * Interface Trunking</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
47
- * <p>When you specify <code>containerInsights</code>, the default setting indicating
48
- * whether Amazon Web Services CloudWatch Container Insights is turned on for your clusters is changed. If
49
- * <code>containerInsights</code> is turned on, any new clusters that are created will
50
- * have Container Insights turned on unless you disable it during cluster creation. For
51
- * more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cloudwatch-container-insights.html">CloudWatch
52
- * Container Insights</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
53
- * <p>Amazon ECS is introducing tagging authorization for resource creation. Users must have
54
- * permissions for actions that create the resource, such as <code>ecsCreateCluster</code>.
55
- * If tags are specified when you create a resource, Amazon Web Services performs additional
56
- * authorization to verify if users or roles have permissions to create tags. Therefore,
57
- * you must grant explicit permissions to use the <code>ecs:TagResource</code> action. For
58
- * more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/supported-iam-actions-tagging.html">Grant
59
- * permission to tag resources on creation</a> in the <i>Amazon ECS Developer
60
- * Guide</i>.</p>
61
- * <p>When Amazon Web Services determines that a security or infrastructure update is needed for an Amazon ECS
62
- * task hosted on Fargate, the tasks need to be stopped and new tasks launched to replace
63
- * them. Use <code>fargateTaskRetirementWaitPeriod</code> to configure the wait time to
64
- * retire a Fargate task. For information about the Fargate tasks maintenance, see
65
- * <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-maintenance.html">Amazon Web Services Fargate task
66
- * maintenance</a> in the <i>Amazon ECS Developer Guide</i>.</p>
67
- * <p>The <code>guardDutyActivate</code> parameter is read-only in Amazon ECS and indicates whether
68
- * Amazon ECS Runtime Monitoring is enabled or disabled by your security administrator in your
69
- * Amazon ECS account. Amazon GuardDuty controls this account setting on your behalf. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-guard-duty-integration.html">Protecting Amazon ECS workloads with Amazon ECS Runtime Monitoring</a>.</p>
70
34
  * @example
71
35
  * Use a bare-bones client and the command you need to make an API call.
72
36
  * ```javascript
@@ -1,8 +1,9 @@
1
1
  import { AwsRegionExtensionConfiguration } from "@aws-sdk/types";
2
2
  import { HttpHandlerExtensionConfiguration } from "@smithy/protocol-http";
3
3
  import { DefaultExtensionConfiguration } from "@smithy/types";
4
+ import { HttpAuthExtensionConfiguration } from "./auth/httpAuthExtensionConfiguration";
4
5
  /**
5
6
  * @internal
6
7
  */
7
- export interface ECSExtensionConfiguration extends HttpHandlerExtensionConfiguration, DefaultExtensionConfiguration, AwsRegionExtensionConfiguration {
8
+ export interface ECSExtensionConfiguration extends HttpHandlerExtensionConfiguration, DefaultExtensionConfiguration, AwsRegionExtensionConfiguration, HttpAuthExtensionConfiguration {
8
9
  }