@aws-sdk/client-xray 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.
- package/dist-cjs/auth/httpAuthExtensionConfiguration.js +1 -0
- package/dist-cjs/auth/httpAuthSchemeProvider.js +47 -0
- package/dist-cjs/index.js +121 -63
- package/dist-cjs/runtimeConfig.shared.js +10 -0
- package/dist-es/XRayClient.js +17 -4
- package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +41 -0
- package/dist-es/runtimeConfig.shared.js +10 -0
- package/dist-es/runtimeExtensions.js +3 -0
- package/dist-types/XRayClient.d.ts +13 -11
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +61 -0
- package/dist-types/extensionConfiguration.d.ts +2 -1
- package/dist-types/runtimeConfig.browser.d.ts +5 -3
- package/dist-types/runtimeConfig.d.ts +4 -2
- package/dist-types/runtimeConfig.native.d.ts +6 -4
- package/dist-types/runtimeConfig.shared.d.ts +2 -0
- package/dist-types/ts3.4/XRayClient.d.ts +11 -9
- package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
- package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +43 -0
- package/dist-types/ts3.4/extensionConfiguration.d.ts +3 -1
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +5 -5
- package/dist-types/ts3.4/runtimeConfig.d.ts +4 -4
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +8 -8
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +2 -0
- 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.defaultXRayHttpAuthSchemeProvider = exports.defaultXRayHttpAuthSchemeParametersProvider = void 0;
|
|
4
|
+
const core_1 = require("@aws-sdk/core");
|
|
5
|
+
const util_middleware_1 = require("@smithy/util-middleware");
|
|
6
|
+
const defaultXRayHttpAuthSchemeParametersProvider = 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.defaultXRayHttpAuthSchemeParametersProvider = defaultXRayHttpAuthSchemeParametersProvider;
|
|
16
|
+
function createAwsAuthSigv4HttpAuthOption(authParameters) {
|
|
17
|
+
return {
|
|
18
|
+
schemeId: "aws.auth#sigv4",
|
|
19
|
+
signingProperties: {
|
|
20
|
+
name: "xray",
|
|
21
|
+
region: authParameters.region,
|
|
22
|
+
},
|
|
23
|
+
propertiesExtractor: (config, context) => ({
|
|
24
|
+
signingProperties: {
|
|
25
|
+
config,
|
|
26
|
+
context,
|
|
27
|
+
},
|
|
28
|
+
}),
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
const defaultXRayHttpAuthSchemeProvider = (authParameters) => {
|
|
32
|
+
const options = [];
|
|
33
|
+
switch (authParameters.operation) {
|
|
34
|
+
default: {
|
|
35
|
+
options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return options;
|
|
39
|
+
};
|
|
40
|
+
exports.defaultXRayHttpAuthSchemeProvider = defaultXRayHttpAuthSchemeProvider;
|
|
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
|
@@ -91,13 +91,14 @@ module.exports = __toCommonJS(src_exports);
|
|
|
91
91
|
var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
|
|
92
92
|
var import_middleware_logger = require("@aws-sdk/middleware-logger");
|
|
93
93
|
var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
|
|
94
|
-
var import_middleware_signing = require("@aws-sdk/middleware-signing");
|
|
95
94
|
var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
|
|
96
95
|
var import_config_resolver = require("@smithy/config-resolver");
|
|
96
|
+
var import_core = require("@smithy/core");
|
|
97
97
|
var import_middleware_content_length = require("@smithy/middleware-content-length");
|
|
98
98
|
var import_middleware_endpoint = require("@smithy/middleware-endpoint");
|
|
99
99
|
var import_middleware_retry = require("@smithy/middleware-retry");
|
|
100
100
|
|
|
101
|
+
var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider");
|
|
101
102
|
|
|
102
103
|
// src/endpoint/EndpointParameters.ts
|
|
103
104
|
var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
|
|
@@ -122,19 +123,62 @@ var import_runtimeConfig = require("././runtimeConfig");
|
|
|
122
123
|
var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
|
|
123
124
|
var import_protocol_http = require("@smithy/protocol-http");
|
|
124
125
|
var import_smithy_client = require("@smithy/smithy-client");
|
|
126
|
+
|
|
127
|
+
// src/auth/httpAuthExtensionConfiguration.ts
|
|
128
|
+
var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {
|
|
129
|
+
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
|
|
130
|
+
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
|
|
131
|
+
let _credentials = runtimeConfig.credentials;
|
|
132
|
+
return {
|
|
133
|
+
setHttpAuthScheme(httpAuthScheme) {
|
|
134
|
+
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
|
|
135
|
+
if (index === -1) {
|
|
136
|
+
_httpAuthSchemes.push(httpAuthScheme);
|
|
137
|
+
} else {
|
|
138
|
+
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
httpAuthSchemes() {
|
|
142
|
+
return _httpAuthSchemes;
|
|
143
|
+
},
|
|
144
|
+
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
|
|
145
|
+
_httpAuthSchemeProvider = httpAuthSchemeProvider;
|
|
146
|
+
},
|
|
147
|
+
httpAuthSchemeProvider() {
|
|
148
|
+
return _httpAuthSchemeProvider;
|
|
149
|
+
},
|
|
150
|
+
setCredentials(credentials) {
|
|
151
|
+
_credentials = credentials;
|
|
152
|
+
},
|
|
153
|
+
credentials() {
|
|
154
|
+
return _credentials;
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
}, "getHttpAuthExtensionConfiguration");
|
|
158
|
+
var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {
|
|
159
|
+
return {
|
|
160
|
+
httpAuthSchemes: config.httpAuthSchemes(),
|
|
161
|
+
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
|
162
|
+
credentials: config.credentials()
|
|
163
|
+
};
|
|
164
|
+
}, "resolveHttpAuthRuntimeConfig");
|
|
165
|
+
|
|
166
|
+
// src/runtimeExtensions.ts
|
|
125
167
|
var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial");
|
|
126
168
|
var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
|
|
127
169
|
const extensionConfiguration = {
|
|
128
170
|
...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),
|
|
129
171
|
...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),
|
|
130
|
-
...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig))
|
|
172
|
+
...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig)),
|
|
173
|
+
...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig))
|
|
131
174
|
};
|
|
132
175
|
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
133
176
|
return {
|
|
134
177
|
...runtimeConfig,
|
|
135
178
|
...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
|
|
136
179
|
...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
|
|
137
|
-
...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration)
|
|
180
|
+
...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
|
|
181
|
+
...resolveHttpAuthRuntimeConfig(extensionConfiguration)
|
|
138
182
|
};
|
|
139
183
|
}, "resolveRuntimeExtensions");
|
|
140
184
|
|
|
@@ -147,8 +191,8 @@ var _XRayClient = class _XRayClient extends import_smithy_client.Client {
|
|
|
147
191
|
const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);
|
|
148
192
|
const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);
|
|
149
193
|
const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
|
|
150
|
-
const _config_6 = (0,
|
|
151
|
-
const _config_7 = (0,
|
|
194
|
+
const _config_6 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_5);
|
|
195
|
+
const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);
|
|
152
196
|
const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []);
|
|
153
197
|
super(_config_8);
|
|
154
198
|
this.config = _config_8;
|
|
@@ -157,8 +201,14 @@ var _XRayClient = class _XRayClient extends import_smithy_client.Client {
|
|
|
157
201
|
this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
|
|
158
202
|
this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
|
|
159
203
|
this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
|
|
160
|
-
this.middlewareStack.use((0, import_middleware_signing.getAwsAuthPlugin)(this.config));
|
|
161
204
|
this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
|
|
205
|
+
this.middlewareStack.use(
|
|
206
|
+
(0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
|
|
207
|
+
httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(),
|
|
208
|
+
identityProviderConfigProvider: this.getIdentityProviderConfigProvider()
|
|
209
|
+
})
|
|
210
|
+
);
|
|
211
|
+
this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));
|
|
162
212
|
}
|
|
163
213
|
/**
|
|
164
214
|
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
|
|
@@ -168,6 +218,14 @@ var _XRayClient = class _XRayClient extends import_smithy_client.Client {
|
|
|
168
218
|
destroy() {
|
|
169
219
|
super.destroy();
|
|
170
220
|
}
|
|
221
|
+
getDefaultHttpAuthSchemeParametersProvider() {
|
|
222
|
+
return import_httpAuthSchemeProvider.defaultXRayHttpAuthSchemeParametersProvider;
|
|
223
|
+
}
|
|
224
|
+
getIdentityProviderConfigProvider() {
|
|
225
|
+
return async (config) => new import_core.DefaultIdentityProviderConfig({
|
|
226
|
+
"aws.auth#sigv4": config.credentials
|
|
227
|
+
});
|
|
228
|
+
}
|
|
171
229
|
};
|
|
172
230
|
__name(_XRayClient, "XRayClient");
|
|
173
231
|
var XRayClient = _XRayClient;
|
|
@@ -182,8 +240,8 @@ var import_middleware_serde = require("@smithy/middleware-serde");
|
|
|
182
240
|
var import_types = require("@smithy/types");
|
|
183
241
|
|
|
184
242
|
// src/protocols/Aws_restJson1.ts
|
|
185
|
-
var
|
|
186
|
-
|
|
243
|
+
var import_core2 = require("@aws-sdk/core");
|
|
244
|
+
|
|
187
245
|
|
|
188
246
|
|
|
189
247
|
// src/models/XRayServiceException.ts
|
|
@@ -422,7 +480,7 @@ var TooManyTagsException = _TooManyTagsException;
|
|
|
422
480
|
|
|
423
481
|
// src/protocols/Aws_restJson1.ts
|
|
424
482
|
var se_BatchGetTracesCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
425
|
-
const b = (0,
|
|
483
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
426
484
|
const headers = {
|
|
427
485
|
"content-type": "application/json"
|
|
428
486
|
};
|
|
@@ -438,7 +496,7 @@ var se_BatchGetTracesCommand = /* @__PURE__ */ __name(async (input, context) =>
|
|
|
438
496
|
return b.build();
|
|
439
497
|
}, "se_BatchGetTracesCommand");
|
|
440
498
|
var se_CreateGroupCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
441
|
-
const b = (0,
|
|
499
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
442
500
|
const headers = {
|
|
443
501
|
"content-type": "application/json"
|
|
444
502
|
};
|
|
@@ -456,7 +514,7 @@ var se_CreateGroupCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
|
456
514
|
return b.build();
|
|
457
515
|
}, "se_CreateGroupCommand");
|
|
458
516
|
var se_CreateSamplingRuleCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
459
|
-
const b = (0,
|
|
517
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
460
518
|
const headers = {
|
|
461
519
|
"content-type": "application/json"
|
|
462
520
|
};
|
|
@@ -472,7 +530,7 @@ var se_CreateSamplingRuleCommand = /* @__PURE__ */ __name(async (input, context)
|
|
|
472
530
|
return b.build();
|
|
473
531
|
}, "se_CreateSamplingRuleCommand");
|
|
474
532
|
var se_DeleteGroupCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
475
|
-
const b = (0,
|
|
533
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
476
534
|
const headers = {
|
|
477
535
|
"content-type": "application/json"
|
|
478
536
|
};
|
|
@@ -488,7 +546,7 @@ var se_DeleteGroupCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
|
488
546
|
return b.build();
|
|
489
547
|
}, "se_DeleteGroupCommand");
|
|
490
548
|
var se_DeleteResourcePolicyCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
491
|
-
const b = (0,
|
|
549
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
492
550
|
const headers = {
|
|
493
551
|
"content-type": "application/json"
|
|
494
552
|
};
|
|
@@ -504,7 +562,7 @@ var se_DeleteResourcePolicyCommand = /* @__PURE__ */ __name(async (input, contex
|
|
|
504
562
|
return b.build();
|
|
505
563
|
}, "se_DeleteResourcePolicyCommand");
|
|
506
564
|
var se_DeleteSamplingRuleCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
507
|
-
const b = (0,
|
|
565
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
508
566
|
const headers = {
|
|
509
567
|
"content-type": "application/json"
|
|
510
568
|
};
|
|
@@ -520,7 +578,7 @@ var se_DeleteSamplingRuleCommand = /* @__PURE__ */ __name(async (input, context)
|
|
|
520
578
|
return b.build();
|
|
521
579
|
}, "se_DeleteSamplingRuleCommand");
|
|
522
580
|
var se_GetEncryptionConfigCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
523
|
-
const b = (0,
|
|
581
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
524
582
|
const headers = {
|
|
525
583
|
"content-type": "application/json"
|
|
526
584
|
};
|
|
@@ -531,7 +589,7 @@ var se_GetEncryptionConfigCommand = /* @__PURE__ */ __name(async (input, context
|
|
|
531
589
|
return b.build();
|
|
532
590
|
}, "se_GetEncryptionConfigCommand");
|
|
533
591
|
var se_GetGroupCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
534
|
-
const b = (0,
|
|
592
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
535
593
|
const headers = {
|
|
536
594
|
"content-type": "application/json"
|
|
537
595
|
};
|
|
@@ -547,7 +605,7 @@ var se_GetGroupCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
|
547
605
|
return b.build();
|
|
548
606
|
}, "se_GetGroupCommand");
|
|
549
607
|
var se_GetGroupsCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
550
|
-
const b = (0,
|
|
608
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
551
609
|
const headers = {
|
|
552
610
|
"content-type": "application/json"
|
|
553
611
|
};
|
|
@@ -562,7 +620,7 @@ var se_GetGroupsCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
|
562
620
|
return b.build();
|
|
563
621
|
}, "se_GetGroupsCommand");
|
|
564
622
|
var se_GetInsightCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
565
|
-
const b = (0,
|
|
623
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
566
624
|
const headers = {
|
|
567
625
|
"content-type": "application/json"
|
|
568
626
|
};
|
|
@@ -577,7 +635,7 @@ var se_GetInsightCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
|
577
635
|
return b.build();
|
|
578
636
|
}, "se_GetInsightCommand");
|
|
579
637
|
var se_GetInsightEventsCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
580
|
-
const b = (0,
|
|
638
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
581
639
|
const headers = {
|
|
582
640
|
"content-type": "application/json"
|
|
583
641
|
};
|
|
@@ -594,7 +652,7 @@ var se_GetInsightEventsCommand = /* @__PURE__ */ __name(async (input, context) =
|
|
|
594
652
|
return b.build();
|
|
595
653
|
}, "se_GetInsightEventsCommand");
|
|
596
654
|
var se_GetInsightImpactGraphCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
597
|
-
const b = (0,
|
|
655
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
598
656
|
const headers = {
|
|
599
657
|
"content-type": "application/json"
|
|
600
658
|
};
|
|
@@ -612,7 +670,7 @@ var se_GetInsightImpactGraphCommand = /* @__PURE__ */ __name(async (input, conte
|
|
|
612
670
|
return b.build();
|
|
613
671
|
}, "se_GetInsightImpactGraphCommand");
|
|
614
672
|
var se_GetInsightSummariesCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
615
|
-
const b = (0,
|
|
673
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
616
674
|
const headers = {
|
|
617
675
|
"content-type": "application/json"
|
|
618
676
|
};
|
|
@@ -633,7 +691,7 @@ var se_GetInsightSummariesCommand = /* @__PURE__ */ __name(async (input, context
|
|
|
633
691
|
return b.build();
|
|
634
692
|
}, "se_GetInsightSummariesCommand");
|
|
635
693
|
var se_GetSamplingRulesCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
636
|
-
const b = (0,
|
|
694
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
637
695
|
const headers = {
|
|
638
696
|
"content-type": "application/json"
|
|
639
697
|
};
|
|
@@ -648,7 +706,7 @@ var se_GetSamplingRulesCommand = /* @__PURE__ */ __name(async (input, context) =
|
|
|
648
706
|
return b.build();
|
|
649
707
|
}, "se_GetSamplingRulesCommand");
|
|
650
708
|
var se_GetSamplingStatisticSummariesCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
651
|
-
const b = (0,
|
|
709
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
652
710
|
const headers = {
|
|
653
711
|
"content-type": "application/json"
|
|
654
712
|
};
|
|
@@ -663,7 +721,7 @@ var se_GetSamplingStatisticSummariesCommand = /* @__PURE__ */ __name(async (inpu
|
|
|
663
721
|
return b.build();
|
|
664
722
|
}, "se_GetSamplingStatisticSummariesCommand");
|
|
665
723
|
var se_GetSamplingTargetsCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
666
|
-
const b = (0,
|
|
724
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
667
725
|
const headers = {
|
|
668
726
|
"content-type": "application/json"
|
|
669
727
|
};
|
|
@@ -678,7 +736,7 @@ var se_GetSamplingTargetsCommand = /* @__PURE__ */ __name(async (input, context)
|
|
|
678
736
|
return b.build();
|
|
679
737
|
}, "se_GetSamplingTargetsCommand");
|
|
680
738
|
var se_GetServiceGraphCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
681
|
-
const b = (0,
|
|
739
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
682
740
|
const headers = {
|
|
683
741
|
"content-type": "application/json"
|
|
684
742
|
};
|
|
@@ -697,7 +755,7 @@ var se_GetServiceGraphCommand = /* @__PURE__ */ __name(async (input, context) =>
|
|
|
697
755
|
return b.build();
|
|
698
756
|
}, "se_GetServiceGraphCommand");
|
|
699
757
|
var se_GetTimeSeriesServiceStatisticsCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
700
|
-
const b = (0,
|
|
758
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
701
759
|
const headers = {
|
|
702
760
|
"content-type": "application/json"
|
|
703
761
|
};
|
|
@@ -719,7 +777,7 @@ var se_GetTimeSeriesServiceStatisticsCommand = /* @__PURE__ */ __name(async (inp
|
|
|
719
777
|
return b.build();
|
|
720
778
|
}, "se_GetTimeSeriesServiceStatisticsCommand");
|
|
721
779
|
var se_GetTraceGraphCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
722
|
-
const b = (0,
|
|
780
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
723
781
|
const headers = {
|
|
724
782
|
"content-type": "application/json"
|
|
725
783
|
};
|
|
@@ -735,7 +793,7 @@ var se_GetTraceGraphCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
|
735
793
|
return b.build();
|
|
736
794
|
}, "se_GetTraceGraphCommand");
|
|
737
795
|
var se_GetTraceSummariesCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
738
|
-
const b = (0,
|
|
796
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
739
797
|
const headers = {
|
|
740
798
|
"content-type": "application/json"
|
|
741
799
|
};
|
|
@@ -756,7 +814,7 @@ var se_GetTraceSummariesCommand = /* @__PURE__ */ __name(async (input, context)
|
|
|
756
814
|
return b.build();
|
|
757
815
|
}, "se_GetTraceSummariesCommand");
|
|
758
816
|
var se_ListResourcePoliciesCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
759
|
-
const b = (0,
|
|
817
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
760
818
|
const headers = {
|
|
761
819
|
"content-type": "application/json"
|
|
762
820
|
};
|
|
@@ -771,7 +829,7 @@ var se_ListResourcePoliciesCommand = /* @__PURE__ */ __name(async (input, contex
|
|
|
771
829
|
return b.build();
|
|
772
830
|
}, "se_ListResourcePoliciesCommand");
|
|
773
831
|
var se_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
774
|
-
const b = (0,
|
|
832
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
775
833
|
const headers = {
|
|
776
834
|
"content-type": "application/json"
|
|
777
835
|
};
|
|
@@ -787,7 +845,7 @@ var se_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (input, context
|
|
|
787
845
|
return b.build();
|
|
788
846
|
}, "se_ListTagsForResourceCommand");
|
|
789
847
|
var se_PutEncryptionConfigCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
790
|
-
const b = (0,
|
|
848
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
791
849
|
const headers = {
|
|
792
850
|
"content-type": "application/json"
|
|
793
851
|
};
|
|
@@ -803,7 +861,7 @@ var se_PutEncryptionConfigCommand = /* @__PURE__ */ __name(async (input, context
|
|
|
803
861
|
return b.build();
|
|
804
862
|
}, "se_PutEncryptionConfigCommand");
|
|
805
863
|
var se_PutResourcePolicyCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
806
|
-
const b = (0,
|
|
864
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
807
865
|
const headers = {
|
|
808
866
|
"content-type": "application/json"
|
|
809
867
|
};
|
|
@@ -821,7 +879,7 @@ var se_PutResourcePolicyCommand = /* @__PURE__ */ __name(async (input, context)
|
|
|
821
879
|
return b.build();
|
|
822
880
|
}, "se_PutResourcePolicyCommand");
|
|
823
881
|
var se_PutTelemetryRecordsCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
824
|
-
const b = (0,
|
|
882
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
825
883
|
const headers = {
|
|
826
884
|
"content-type": "application/json"
|
|
827
885
|
};
|
|
@@ -839,7 +897,7 @@ var se_PutTelemetryRecordsCommand = /* @__PURE__ */ __name(async (input, context
|
|
|
839
897
|
return b.build();
|
|
840
898
|
}, "se_PutTelemetryRecordsCommand");
|
|
841
899
|
var se_PutTraceSegmentsCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
842
|
-
const b = (0,
|
|
900
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
843
901
|
const headers = {
|
|
844
902
|
"content-type": "application/json"
|
|
845
903
|
};
|
|
@@ -854,7 +912,7 @@ var se_PutTraceSegmentsCommand = /* @__PURE__ */ __name(async (input, context) =
|
|
|
854
912
|
return b.build();
|
|
855
913
|
}, "se_PutTraceSegmentsCommand");
|
|
856
914
|
var se_TagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
857
|
-
const b = (0,
|
|
915
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
858
916
|
const headers = {
|
|
859
917
|
"content-type": "application/json"
|
|
860
918
|
};
|
|
@@ -870,7 +928,7 @@ var se_TagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
|
870
928
|
return b.build();
|
|
871
929
|
}, "se_TagResourceCommand");
|
|
872
930
|
var se_UntagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
873
|
-
const b = (0,
|
|
931
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
874
932
|
const headers = {
|
|
875
933
|
"content-type": "application/json"
|
|
876
934
|
};
|
|
@@ -886,7 +944,7 @@ var se_UntagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
|
886
944
|
return b.build();
|
|
887
945
|
}, "se_UntagResourceCommand");
|
|
888
946
|
var se_UpdateGroupCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
889
|
-
const b = (0,
|
|
947
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
890
948
|
const headers = {
|
|
891
949
|
"content-type": "application/json"
|
|
892
950
|
};
|
|
@@ -904,7 +962,7 @@ var se_UpdateGroupCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
|
904
962
|
return b.build();
|
|
905
963
|
}, "se_UpdateGroupCommand");
|
|
906
964
|
var se_UpdateSamplingRuleCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
907
|
-
const b = (0,
|
|
965
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
908
966
|
const headers = {
|
|
909
967
|
"content-type": "application/json"
|
|
910
968
|
};
|
|
@@ -1922,7 +1980,7 @@ var de_ValuesWithServiceIds = /* @__PURE__ */ __name((output, context) => {
|
|
|
1922
1980
|
}, "de_ValuesWithServiceIds");
|
|
1923
1981
|
var de_ValueWithServiceIds = /* @__PURE__ */ __name((output, context) => {
|
|
1924
1982
|
return (0, import_smithy_client.take)(output, {
|
|
1925
|
-
AnnotationValue: (_) => de_AnnotationValue((0,
|
|
1983
|
+
AnnotationValue: (_) => de_AnnotationValue((0, import_core2.awsExpectUnion)(_), context),
|
|
1926
1984
|
ServiceIds: import_smithy_client._json
|
|
1927
1985
|
});
|
|
1928
1986
|
}, "de_ValueWithServiceIds");
|
|
@@ -2520,52 +2578,52 @@ var XRay = _XRay;
|
|
|
2520
2578
|
(0, import_smithy_client.createAggregatedClient)(commands, XRay);
|
|
2521
2579
|
|
|
2522
2580
|
// src/pagination/BatchGetTracesPaginator.ts
|
|
2523
|
-
|
|
2524
|
-
var paginateBatchGetTraces = (0,
|
|
2581
|
+
|
|
2582
|
+
var paginateBatchGetTraces = (0, import_core.createPaginator)(XRayClient, BatchGetTracesCommand, "NextToken", "NextToken", "");
|
|
2525
2583
|
|
|
2526
2584
|
// src/pagination/GetGroupsPaginator.ts
|
|
2527
|
-
|
|
2528
|
-
var paginateGetGroups = (0,
|
|
2585
|
+
|
|
2586
|
+
var paginateGetGroups = (0, import_core.createPaginator)(XRayClient, GetGroupsCommand, "NextToken", "NextToken", "");
|
|
2529
2587
|
|
|
2530
2588
|
// src/pagination/GetInsightEventsPaginator.ts
|
|
2531
|
-
|
|
2532
|
-
var paginateGetInsightEvents = (0,
|
|
2589
|
+
|
|
2590
|
+
var paginateGetInsightEvents = (0, import_core.createPaginator)(XRayClient, GetInsightEventsCommand, "NextToken", "NextToken", "MaxResults");
|
|
2533
2591
|
|
|
2534
2592
|
// src/pagination/GetInsightSummariesPaginator.ts
|
|
2535
|
-
|
|
2536
|
-
var paginateGetInsightSummaries = (0,
|
|
2593
|
+
|
|
2594
|
+
var paginateGetInsightSummaries = (0, import_core.createPaginator)(XRayClient, GetInsightSummariesCommand, "NextToken", "NextToken", "MaxResults");
|
|
2537
2595
|
|
|
2538
2596
|
// src/pagination/GetSamplingRulesPaginator.ts
|
|
2539
|
-
|
|
2540
|
-
var paginateGetSamplingRules = (0,
|
|
2597
|
+
|
|
2598
|
+
var paginateGetSamplingRules = (0, import_core.createPaginator)(XRayClient, GetSamplingRulesCommand, "NextToken", "NextToken", "");
|
|
2541
2599
|
|
|
2542
2600
|
// src/pagination/GetSamplingStatisticSummariesPaginator.ts
|
|
2543
|
-
|
|
2544
|
-
var paginateGetSamplingStatisticSummaries = (0,
|
|
2601
|
+
|
|
2602
|
+
var paginateGetSamplingStatisticSummaries = (0, import_core.createPaginator)(XRayClient, GetSamplingStatisticSummariesCommand, "NextToken", "NextToken", "");
|
|
2545
2603
|
|
|
2546
2604
|
// src/pagination/GetServiceGraphPaginator.ts
|
|
2547
|
-
|
|
2548
|
-
var paginateGetServiceGraph = (0,
|
|
2605
|
+
|
|
2606
|
+
var paginateGetServiceGraph = (0, import_core.createPaginator)(XRayClient, GetServiceGraphCommand, "NextToken", "NextToken", "");
|
|
2549
2607
|
|
|
2550
2608
|
// src/pagination/GetTimeSeriesServiceStatisticsPaginator.ts
|
|
2551
|
-
|
|
2552
|
-
var paginateGetTimeSeriesServiceStatistics = (0,
|
|
2609
|
+
|
|
2610
|
+
var paginateGetTimeSeriesServiceStatistics = (0, import_core.createPaginator)(XRayClient, GetTimeSeriesServiceStatisticsCommand, "NextToken", "NextToken", "");
|
|
2553
2611
|
|
|
2554
2612
|
// src/pagination/GetTraceGraphPaginator.ts
|
|
2555
|
-
|
|
2556
|
-
var paginateGetTraceGraph = (0,
|
|
2613
|
+
|
|
2614
|
+
var paginateGetTraceGraph = (0, import_core.createPaginator)(XRayClient, GetTraceGraphCommand, "NextToken", "NextToken", "");
|
|
2557
2615
|
|
|
2558
2616
|
// src/pagination/GetTraceSummariesPaginator.ts
|
|
2559
|
-
|
|
2560
|
-
var paginateGetTraceSummaries = (0,
|
|
2617
|
+
|
|
2618
|
+
var paginateGetTraceSummaries = (0, import_core.createPaginator)(XRayClient, GetTraceSummariesCommand, "NextToken", "NextToken", "");
|
|
2561
2619
|
|
|
2562
2620
|
// src/pagination/ListResourcePoliciesPaginator.ts
|
|
2563
|
-
|
|
2564
|
-
var paginateListResourcePolicies = (0,
|
|
2621
|
+
|
|
2622
|
+
var paginateListResourcePolicies = (0, import_core.createPaginator)(XRayClient, ListResourcePoliciesCommand, "NextToken", "NextToken", "");
|
|
2565
2623
|
|
|
2566
2624
|
// src/pagination/ListTagsForResourcePaginator.ts
|
|
2567
|
-
|
|
2568
|
-
var paginateListTagsForResource = (0,
|
|
2625
|
+
|
|
2626
|
+
var paginateListTagsForResource = (0, import_core.createPaginator)(XRayClient, ListTagsForResourceCommand, "NextToken", "NextToken", "");
|
|
2569
2627
|
|
|
2570
2628
|
// src/index.ts
|
|
2571
2629
|
var import_util_endpoints = require("@aws-sdk/util-endpoints");
|
|
@@ -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.defaultXRayHttpAuthSchemeProvider,
|
|
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 ?? "XRay",
|
|
19
29
|
urlParser: config?.urlParser ?? url_parser_1.parseUrl,
|
package/dist-es/XRayClient.js
CHANGED
|
@@ -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 { defaultXRayHttpAuthSchemeParametersProvider, 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 XRayClient 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 =
|
|
24
|
-
const _config_7 =
|
|
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 XRayClient 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 defaultXRayHttpAuthSchemeParametersProvider;
|
|
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
|
+
};
|