@aws-sdk/client-route-53 3.485.0 → 3.490.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 (33) hide show
  1. package/dist-cjs/Route53Client.js +17 -4
  2. package/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
  3. package/dist-cjs/auth/httpAuthSchemeProvider.js +47 -0
  4. package/dist-cjs/protocols/Aws_restXml.js +57 -0
  5. package/dist-cjs/runtimeConfig.shared.js +10 -0
  6. package/dist-cjs/runtimeExtensions.js +3 -0
  7. package/dist-es/Route53Client.js +17 -4
  8. package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
  9. package/dist-es/auth/httpAuthSchemeProvider.js +41 -0
  10. package/dist-es/protocols/Aws_restXml.js +57 -0
  11. package/dist-es/runtimeConfig.shared.js +10 -0
  12. package/dist-es/runtimeExtensions.js +3 -0
  13. package/dist-types/Route53Client.d.ts +13 -11
  14. package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
  15. package/dist-types/auth/httpAuthSchemeProvider.d.ts +61 -0
  16. package/dist-types/commands/ChangeResourceRecordSetsCommand.d.ts +9 -0
  17. package/dist-types/commands/ListResourceRecordSetsCommand.d.ts +9 -0
  18. package/dist-types/extensionConfiguration.d.ts +2 -1
  19. package/dist-types/models/models_0.d.ts +105 -27
  20. package/dist-types/runtimeConfig.browser.d.ts +5 -3
  21. package/dist-types/runtimeConfig.d.ts +5 -3
  22. package/dist-types/runtimeConfig.native.d.ts +6 -4
  23. package/dist-types/runtimeConfig.shared.d.ts +2 -0
  24. package/dist-types/ts3.4/Route53Client.d.ts +11 -9
  25. package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
  26. package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +44 -0
  27. package/dist-types/ts3.4/extensionConfiguration.d.ts +3 -1
  28. package/dist-types/ts3.4/models/models_0.d.ts +11 -0
  29. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +5 -5
  30. package/dist-types/ts3.4/runtimeConfig.d.ts +5 -5
  31. package/dist-types/ts3.4/runtimeConfig.native.d.ts +8 -8
  32. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +2 -0
  33. package/package.json +15 -15
@@ -4,14 +4,15 @@ exports.Route53Client = exports.__Client = void 0;
4
4
  const middleware_host_header_1 = require("@aws-sdk/middleware-host-header");
5
5
  const middleware_logger_1 = require("@aws-sdk/middleware-logger");
6
6
  const middleware_recursion_detection_1 = require("@aws-sdk/middleware-recursion-detection");
7
- const middleware_signing_1 = require("@aws-sdk/middleware-signing");
8
7
  const middleware_user_agent_1 = require("@aws-sdk/middleware-user-agent");
9
8
  const config_resolver_1 = require("@smithy/config-resolver");
9
+ const core_1 = require("@smithy/core");
10
10
  const middleware_content_length_1 = require("@smithy/middleware-content-length");
11
11
  const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
12
12
  const middleware_retry_1 = require("@smithy/middleware-retry");
13
13
  const smithy_client_1 = require("@smithy/smithy-client");
14
14
  Object.defineProperty(exports, "__Client", { enumerable: true, get: function () { return smithy_client_1.Client; } });
15
+ const httpAuthSchemeProvider_1 = require("./auth/httpAuthSchemeProvider");
15
16
  const EndpointParameters_1 = require("./endpoint/EndpointParameters");
16
17
  const runtimeConfig_1 = require("./runtimeConfig");
17
18
  const runtimeExtensions_1 = require("./runtimeExtensions");
@@ -23,8 +24,8 @@ class Route53Client extends smithy_client_1.Client {
23
24
  const _config_3 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_2);
24
25
  const _config_4 = (0, middleware_retry_1.resolveRetryConfig)(_config_3);
25
26
  const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4);
26
- const _config_6 = (0, middleware_signing_1.resolveAwsAuthConfig)(_config_5);
27
- const _config_7 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_6);
27
+ const _config_6 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_5);
28
+ const _config_7 = (0, httpAuthSchemeProvider_1.resolveHttpAuthSchemeConfig)(_config_6);
28
29
  const _config_8 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_7, configuration?.extensions || []);
29
30
  super(_config_8);
30
31
  this.config = _config_8;
@@ -33,11 +34,23 @@ class Route53Client extends smithy_client_1.Client {
33
34
  this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config));
34
35
  this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config));
35
36
  this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config));
36
- this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(this.config));
37
37
  this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));
38
+ this.middlewareStack.use((0, core_1.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
39
+ httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(),
40
+ identityProviderConfigProvider: this.getIdentityProviderConfigProvider(),
41
+ }));
42
+ this.middlewareStack.use((0, core_1.getHttpSigningPlugin)(this.config));
38
43
  }
39
44
  destroy() {
40
45
  super.destroy();
41
46
  }
47
+ getDefaultHttpAuthSchemeParametersProvider() {
48
+ return httpAuthSchemeProvider_1.defaultRoute53HttpAuthSchemeParametersProvider;
49
+ }
50
+ getIdentityProviderConfigProvider() {
51
+ return async (config) => new core_1.DefaultIdentityProviderConfig({
52
+ "aws.auth#sigv4": config.credentials,
53
+ });
54
+ }
42
55
  }
43
56
  exports.Route53Client = Route53Client;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolveHttpAuthRuntimeConfig = exports.getHttpAuthExtensionConfiguration = void 0;
4
+ const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
5
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
6
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
7
+ let _credentials = runtimeConfig.credentials;
8
+ return {
9
+ setHttpAuthScheme(httpAuthScheme) {
10
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
11
+ if (index === -1) {
12
+ _httpAuthSchemes.push(httpAuthScheme);
13
+ }
14
+ else {
15
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
16
+ }
17
+ },
18
+ httpAuthSchemes() {
19
+ return _httpAuthSchemes;
20
+ },
21
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
22
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
23
+ },
24
+ httpAuthSchemeProvider() {
25
+ return _httpAuthSchemeProvider;
26
+ },
27
+ setCredentials(credentials) {
28
+ _credentials = credentials;
29
+ },
30
+ credentials() {
31
+ return _credentials;
32
+ },
33
+ };
34
+ };
35
+ exports.getHttpAuthExtensionConfiguration = getHttpAuthExtensionConfiguration;
36
+ const resolveHttpAuthRuntimeConfig = (config) => {
37
+ return {
38
+ httpAuthSchemes: config.httpAuthSchemes(),
39
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
40
+ credentials: config.credentials(),
41
+ };
42
+ };
43
+ exports.resolveHttpAuthRuntimeConfig = resolveHttpAuthRuntimeConfig;
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolveHttpAuthSchemeConfig = exports.defaultRoute53HttpAuthSchemeProvider = exports.defaultRoute53HttpAuthSchemeParametersProvider = void 0;
4
+ const core_1 = require("@aws-sdk/core");
5
+ const util_middleware_1 = require("@smithy/util-middleware");
6
+ const defaultRoute53HttpAuthSchemeParametersProvider = 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.defaultRoute53HttpAuthSchemeParametersProvider = defaultRoute53HttpAuthSchemeParametersProvider;
16
+ function createAwsAuthSigv4HttpAuthOption(authParameters) {
17
+ return {
18
+ schemeId: "aws.auth#sigv4",
19
+ signingProperties: {
20
+ name: "route53",
21
+ region: authParameters.region,
22
+ },
23
+ propertiesExtractor: (config, context) => ({
24
+ signingProperties: {
25
+ config,
26
+ context,
27
+ },
28
+ }),
29
+ };
30
+ }
31
+ const defaultRoute53HttpAuthSchemeProvider = (authParameters) => {
32
+ const options = [];
33
+ switch (authParameters.operation) {
34
+ default: {
35
+ options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
36
+ }
37
+ }
38
+ return options;
39
+ };
40
+ exports.defaultRoute53HttpAuthSchemeProvider = defaultRoute53HttpAuthSchemeProvider;
41
+ const resolveHttpAuthSchemeConfig = (config) => {
42
+ const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config);
43
+ return {
44
+ ...config_0,
45
+ };
46
+ };
47
+ exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
@@ -5122,6 +5122,12 @@ const se_CidrRoutingConfig = (input, context) => {
5122
5122
  }
5123
5123
  return bn;
5124
5124
  };
5125
+ const se_Coordinates = (input, context) => {
5126
+ const bn = new xml_builder_1.XmlNode(_Coo);
5127
+ bn.cc(input, _La);
5128
+ bn.cc(input, _Lo);
5129
+ return bn;
5130
+ };
5125
5131
  const se_GeoLocation = (input, context) => {
5126
5132
  const bn = new xml_builder_1.XmlNode(_GL);
5127
5133
  if (input[_CC] != null) {
@@ -5135,6 +5141,18 @@ const se_GeoLocation = (input, context) => {
5135
5141
  }
5136
5142
  return bn;
5137
5143
  };
5144
+ const se_GeoProximityLocation = (input, context) => {
5145
+ const bn = new xml_builder_1.XmlNode(_GPL);
5146
+ bn.cc(input, _AWSR);
5147
+ bn.cc(input, _LZG);
5148
+ if (input[_Coo] != null) {
5149
+ bn.c(se_Coordinates(input[_Coo], context).n(_Coo));
5150
+ }
5151
+ if (input[_B] != null) {
5152
+ bn.c(xml_builder_1.XmlNode.of(_B, String(input[_B])).n(_B));
5153
+ }
5154
+ return bn;
5155
+ };
5138
5156
  const se_HealthCheckConfig = (input, context) => {
5139
5157
  const bn = new xml_builder_1.XmlNode(_HCC);
5140
5158
  bn.cc(input, _IPA);
@@ -5256,6 +5274,9 @@ const se_ResourceRecordSet = (input, context) => {
5256
5274
  if (input[_CRC] != null) {
5257
5275
  bn.c(se_CidrRoutingConfig(input[_CRC], context).n(_CRC));
5258
5276
  }
5277
+ if (input[_GPL] != null) {
5278
+ bn.c(se_GeoProximityLocation(input[_GPL], context).n(_GPL));
5279
+ }
5259
5280
  return bn;
5260
5281
  };
5261
5282
  const se_Tag = (input, context) => {
@@ -5458,6 +5479,16 @@ const de_CollectionSummary = (output, context) => {
5458
5479
  }
5459
5480
  return contents;
5460
5481
  };
5482
+ const de_Coordinates = (output, context) => {
5483
+ const contents = {};
5484
+ if (output[_La] != null) {
5485
+ contents[_La] = (0, smithy_client_1.expectString)(output[_La]);
5486
+ }
5487
+ if (output[_Lo] != null) {
5488
+ contents[_Lo] = (0, smithy_client_1.expectString)(output[_Lo]);
5489
+ }
5490
+ return contents;
5491
+ };
5461
5492
  const de_DelegationSet = (output, context) => {
5462
5493
  const contents = {};
5463
5494
  if (output[_Id] != null) {
@@ -5564,6 +5595,22 @@ const de_GeoLocationDetailsList = (output, context) => {
5564
5595
  return de_GeoLocationDetails(entry, context);
5565
5596
  });
5566
5597
  };
5598
+ const de_GeoProximityLocation = (output, context) => {
5599
+ const contents = {};
5600
+ if (output[_AWSR] != null) {
5601
+ contents[_AWSR] = (0, smithy_client_1.expectString)(output[_AWSR]);
5602
+ }
5603
+ if (output[_LZG] != null) {
5604
+ contents[_LZG] = (0, smithy_client_1.expectString)(output[_LZG]);
5605
+ }
5606
+ if (output[_Coo] != null) {
5607
+ contents[_Coo] = de_Coordinates(output[_Coo], context);
5608
+ }
5609
+ if (output[_B] != null) {
5610
+ contents[_B] = (0, smithy_client_1.strictParseInt32)(output[_B]);
5611
+ }
5612
+ return contents;
5613
+ };
5567
5614
  const de_HealthCheck = (output, context) => {
5568
5615
  const contents = {};
5569
5616
  if (output[_Id] != null) {
@@ -5934,6 +5981,9 @@ const de_ResourceRecordSet = (output, context) => {
5934
5981
  if (output[_CRC] != null) {
5935
5982
  contents[_CRC] = de_CidrRoutingConfig(output[_CRC], context);
5936
5983
  }
5984
+ if (output[_GPL] != null) {
5985
+ contents[_GPL] = de_GeoProximityLocation(output[_GPL], context);
5986
+ }
5937
5987
  return contents;
5938
5988
  };
5939
5989
  const de_ResourceRecordSets = (output, context) => {
@@ -6133,7 +6183,9 @@ const _AT = "AddTags";
6133
6183
  const _ATl = "AliasTarget";
6134
6184
  const _AVPCC = "AssociateVPCComment";
6135
6185
  const _AVPCWHZR = "AssociateVPCWithHostedZoneRequest";
6186
+ const _AWSR = "AWSRegion";
6136
6187
  const _Ar = "Arn";
6188
+ const _B = "Bias";
6137
6189
  const _C = "Comment";
6138
6190
  const _CA = "ChangeAction";
6139
6191
  const _CB = "ChangeBatch";
@@ -6184,6 +6236,7 @@ const _Cha = "Change";
6184
6236
  const _Ci = "Cidr";
6185
6237
  const _Co = "Collection";
6186
6238
  const _Con = "Config";
6239
+ const _Coo = "Coordinates";
6187
6240
  const _Cou = "Count";
6188
6241
  const _D = "Document";
6189
6242
  const _DAM = "DigestAlgorithmMnemonic";
@@ -6217,6 +6270,7 @@ const _GLCCe = "GeoLocationCountryCode";
6217
6270
  const _GLD = "GeoLocationDetails";
6218
6271
  const _GLDL = "GeoLocationDetailsList";
6219
6272
  const _GLSC = "GeoLocationSubdivisionCode";
6273
+ const _GPL = "GeoProximityLocation";
6220
6274
  const _HC = "HealthCheck";
6221
6275
  const _HCC = "HealthCheckConfig";
6222
6276
  const _HCCe = "HealthCheckCount";
@@ -6256,7 +6310,10 @@ const _LN = "LocationName";
6256
6310
  const _LS = "LinkedService";
6257
6311
  const _LTFRR = "ListTagsForResourcesRequest";
6258
6312
  const _LV = "LatestVersion";
6313
+ const _LZG = "LocalZoneGroup";
6314
+ const _La = "Latitude";
6259
6315
  const _Li = "Limit";
6316
+ const _Lo = "Longitude";
6260
6317
  const _M = "Marker";
6261
6318
  const _MI = "MaxItems";
6262
6319
  const _ML = "MeasureLatency";
@@ -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.defaultRoute53HttpAuthSchemeProvider,
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 ?? "Route 53",
19
29
  urlParser: config?.urlParser ?? url_parser_1.parseUrl,
@@ -4,12 +4,14 @@ exports.resolveRuntimeExtensions = void 0;
4
4
  const region_config_resolver_1 = require("@aws-sdk/region-config-resolver");
5
5
  const protocol_http_1 = require("@smithy/protocol-http");
6
6
  const smithy_client_1 = require("@smithy/smithy-client");
7
+ const httpAuthExtensionConfiguration_1 = require("./auth/httpAuthExtensionConfiguration");
7
8
  const asPartial = (t) => t;
8
9
  const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
9
10
  const extensionConfiguration = {
10
11
  ...asPartial((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig)),
11
12
  ...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)),
12
13
  ...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)),
14
+ ...asPartial((0, httpAuthExtensionConfiguration_1.getHttpAuthExtensionConfiguration)(runtimeConfig)),
13
15
  };
14
16
  extensions.forEach((extension) => extension.configure(extensionConfiguration));
15
17
  return {
@@ -17,6 +19,7 @@ const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
17
19
  ...(0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
18
20
  ...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration),
19
21
  ...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
22
+ ...(0, httpAuthExtensionConfiguration_1.resolveHttpAuthRuntimeConfig)(extensionConfiguration),
20
23
  };
21
24
  };
22
25
  exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
@@ -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 { defaultRoute53HttpAuthSchemeParametersProvider, 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 Route53Client 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 Route53Client 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 defaultRoute53HttpAuthSchemeParametersProvider;
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 defaultRoute53HttpAuthSchemeParametersProvider = 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: "route53",
17
+ region: authParameters.region,
18
+ },
19
+ propertiesExtractor: (config, context) => ({
20
+ signingProperties: {
21
+ config,
22
+ context,
23
+ },
24
+ }),
25
+ };
26
+ }
27
+ export const defaultRoute53HttpAuthSchemeProvider = (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
+ };
@@ -4977,6 +4977,12 @@ const se_CidrRoutingConfig = (input, context) => {
4977
4977
  }
4978
4978
  return bn;
4979
4979
  };
4980
+ const se_Coordinates = (input, context) => {
4981
+ const bn = new __XmlNode(_Coo);
4982
+ bn.cc(input, _La);
4983
+ bn.cc(input, _Lo);
4984
+ return bn;
4985
+ };
4980
4986
  const se_GeoLocation = (input, context) => {
4981
4987
  const bn = new __XmlNode(_GL);
4982
4988
  if (input[_CC] != null) {
@@ -4990,6 +4996,18 @@ const se_GeoLocation = (input, context) => {
4990
4996
  }
4991
4997
  return bn;
4992
4998
  };
4999
+ const se_GeoProximityLocation = (input, context) => {
5000
+ const bn = new __XmlNode(_GPL);
5001
+ bn.cc(input, _AWSR);
5002
+ bn.cc(input, _LZG);
5003
+ if (input[_Coo] != null) {
5004
+ bn.c(se_Coordinates(input[_Coo], context).n(_Coo));
5005
+ }
5006
+ if (input[_B] != null) {
5007
+ bn.c(__XmlNode.of(_B, String(input[_B])).n(_B));
5008
+ }
5009
+ return bn;
5010
+ };
4993
5011
  const se_HealthCheckConfig = (input, context) => {
4994
5012
  const bn = new __XmlNode(_HCC);
4995
5013
  bn.cc(input, _IPA);
@@ -5111,6 +5129,9 @@ const se_ResourceRecordSet = (input, context) => {
5111
5129
  if (input[_CRC] != null) {
5112
5130
  bn.c(se_CidrRoutingConfig(input[_CRC], context).n(_CRC));
5113
5131
  }
5132
+ if (input[_GPL] != null) {
5133
+ bn.c(se_GeoProximityLocation(input[_GPL], context).n(_GPL));
5134
+ }
5114
5135
  return bn;
5115
5136
  };
5116
5137
  const se_Tag = (input, context) => {
@@ -5313,6 +5334,16 @@ const de_CollectionSummary = (output, context) => {
5313
5334
  }
5314
5335
  return contents;
5315
5336
  };
5337
+ const de_Coordinates = (output, context) => {
5338
+ const contents = {};
5339
+ if (output[_La] != null) {
5340
+ contents[_La] = __expectString(output[_La]);
5341
+ }
5342
+ if (output[_Lo] != null) {
5343
+ contents[_Lo] = __expectString(output[_Lo]);
5344
+ }
5345
+ return contents;
5346
+ };
5316
5347
  const de_DelegationSet = (output, context) => {
5317
5348
  const contents = {};
5318
5349
  if (output[_Id] != null) {
@@ -5419,6 +5450,22 @@ const de_GeoLocationDetailsList = (output, context) => {
5419
5450
  return de_GeoLocationDetails(entry, context);
5420
5451
  });
5421
5452
  };
5453
+ const de_GeoProximityLocation = (output, context) => {
5454
+ const contents = {};
5455
+ if (output[_AWSR] != null) {
5456
+ contents[_AWSR] = __expectString(output[_AWSR]);
5457
+ }
5458
+ if (output[_LZG] != null) {
5459
+ contents[_LZG] = __expectString(output[_LZG]);
5460
+ }
5461
+ if (output[_Coo] != null) {
5462
+ contents[_Coo] = de_Coordinates(output[_Coo], context);
5463
+ }
5464
+ if (output[_B] != null) {
5465
+ contents[_B] = __strictParseInt32(output[_B]);
5466
+ }
5467
+ return contents;
5468
+ };
5422
5469
  const de_HealthCheck = (output, context) => {
5423
5470
  const contents = {};
5424
5471
  if (output[_Id] != null) {
@@ -5789,6 +5836,9 @@ const de_ResourceRecordSet = (output, context) => {
5789
5836
  if (output[_CRC] != null) {
5790
5837
  contents[_CRC] = de_CidrRoutingConfig(output[_CRC], context);
5791
5838
  }
5839
+ if (output[_GPL] != null) {
5840
+ contents[_GPL] = de_GeoProximityLocation(output[_GPL], context);
5841
+ }
5792
5842
  return contents;
5793
5843
  };
5794
5844
  const de_ResourceRecordSets = (output, context) => {
@@ -5988,7 +6038,9 @@ const _AT = "AddTags";
5988
6038
  const _ATl = "AliasTarget";
5989
6039
  const _AVPCC = "AssociateVPCComment";
5990
6040
  const _AVPCWHZR = "AssociateVPCWithHostedZoneRequest";
6041
+ const _AWSR = "AWSRegion";
5991
6042
  const _Ar = "Arn";
6043
+ const _B = "Bias";
5992
6044
  const _C = "Comment";
5993
6045
  const _CA = "ChangeAction";
5994
6046
  const _CB = "ChangeBatch";
@@ -6039,6 +6091,7 @@ const _Cha = "Change";
6039
6091
  const _Ci = "Cidr";
6040
6092
  const _Co = "Collection";
6041
6093
  const _Con = "Config";
6094
+ const _Coo = "Coordinates";
6042
6095
  const _Cou = "Count";
6043
6096
  const _D = "Document";
6044
6097
  const _DAM = "DigestAlgorithmMnemonic";
@@ -6072,6 +6125,7 @@ const _GLCCe = "GeoLocationCountryCode";
6072
6125
  const _GLD = "GeoLocationDetails";
6073
6126
  const _GLDL = "GeoLocationDetailsList";
6074
6127
  const _GLSC = "GeoLocationSubdivisionCode";
6128
+ const _GPL = "GeoProximityLocation";
6075
6129
  const _HC = "HealthCheck";
6076
6130
  const _HCC = "HealthCheckConfig";
6077
6131
  const _HCCe = "HealthCheckCount";
@@ -6111,7 +6165,10 @@ const _LN = "LocationName";
6111
6165
  const _LS = "LinkedService";
6112
6166
  const _LTFRR = "ListTagsForResourcesRequest";
6113
6167
  const _LV = "LatestVersion";
6168
+ const _LZG = "LocalZoneGroup";
6169
+ const _La = "Latitude";
6114
6170
  const _Li = "Limit";
6171
+ const _Lo = "Longitude";
6115
6172
  const _M = "Marker";
6116
6173
  const _MI = "MaxItems";
6117
6174
  const _ML = "MeasureLatency";
@@ -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 { defaultRoute53HttpAuthSchemeProvider } 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 ?? defaultRoute53HttpAuthSchemeProvider,
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 ?? "Route 53",
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
  };