@aws-sdk/client-ssm-incidents 3.511.0 → 3.514.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.
@@ -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.defaultSSMIncidentsHttpAuthSchemeProvider = exports.defaultSSMIncidentsHttpAuthSchemeParametersProvider = void 0;
4
+ const core_1 = require("@aws-sdk/core");
5
+ const util_middleware_1 = require("@smithy/util-middleware");
6
+ const defaultSSMIncidentsHttpAuthSchemeParametersProvider = 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.defaultSSMIncidentsHttpAuthSchemeParametersProvider = defaultSSMIncidentsHttpAuthSchemeParametersProvider;
16
+ function createAwsAuthSigv4HttpAuthOption(authParameters) {
17
+ return {
18
+ schemeId: "aws.auth#sigv4",
19
+ signingProperties: {
20
+ name: "ssm-incidents",
21
+ region: authParameters.region,
22
+ },
23
+ propertiesExtractor: (config, context) => ({
24
+ signingProperties: {
25
+ config,
26
+ context,
27
+ },
28
+ }),
29
+ };
30
+ }
31
+ const defaultSSMIncidentsHttpAuthSchemeProvider = (authParameters) => {
32
+ const options = [];
33
+ switch (authParameters.operation) {
34
+ default: {
35
+ options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
36
+ }
37
+ }
38
+ return options;
39
+ };
40
+ exports.defaultSSMIncidentsHttpAuthSchemeProvider = defaultSSMIncidentsHttpAuthSchemeProvider;
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
@@ -104,13 +104,14 @@ module.exports = __toCommonJS(src_exports);
104
104
  var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
105
105
  var import_middleware_logger = require("@aws-sdk/middleware-logger");
106
106
  var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
107
- var import_middleware_signing = require("@aws-sdk/middleware-signing");
108
107
  var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
109
108
  var import_config_resolver = require("@smithy/config-resolver");
109
+ var import_core = require("@smithy/core");
110
110
  var import_middleware_content_length = require("@smithy/middleware-content-length");
111
111
  var import_middleware_endpoint = require("@smithy/middleware-endpoint");
112
112
  var import_middleware_retry = require("@smithy/middleware-retry");
113
113
 
114
+ var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider");
114
115
 
115
116
  // src/endpoint/EndpointParameters.ts
116
117
  var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
@@ -135,19 +136,62 @@ var import_runtimeConfig = require("././runtimeConfig");
135
136
  var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
136
137
  var import_protocol_http = require("@smithy/protocol-http");
137
138
  var import_smithy_client = require("@smithy/smithy-client");
139
+
140
+ // src/auth/httpAuthExtensionConfiguration.ts
141
+ var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {
142
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
143
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
144
+ let _credentials = runtimeConfig.credentials;
145
+ return {
146
+ setHttpAuthScheme(httpAuthScheme) {
147
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
148
+ if (index === -1) {
149
+ _httpAuthSchemes.push(httpAuthScheme);
150
+ } else {
151
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
152
+ }
153
+ },
154
+ httpAuthSchemes() {
155
+ return _httpAuthSchemes;
156
+ },
157
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
158
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
159
+ },
160
+ httpAuthSchemeProvider() {
161
+ return _httpAuthSchemeProvider;
162
+ },
163
+ setCredentials(credentials) {
164
+ _credentials = credentials;
165
+ },
166
+ credentials() {
167
+ return _credentials;
168
+ }
169
+ };
170
+ }, "getHttpAuthExtensionConfiguration");
171
+ var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {
172
+ return {
173
+ httpAuthSchemes: config.httpAuthSchemes(),
174
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
175
+ credentials: config.credentials()
176
+ };
177
+ }, "resolveHttpAuthRuntimeConfig");
178
+
179
+ // src/runtimeExtensions.ts
138
180
  var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial");
139
181
  var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
140
182
  const extensionConfiguration = {
141
183
  ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),
142
184
  ...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),
143
- ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig))
185
+ ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig)),
186
+ ...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig))
144
187
  };
145
188
  extensions.forEach((extension) => extension.configure(extensionConfiguration));
146
189
  return {
147
190
  ...runtimeConfig,
148
191
  ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
149
192
  ...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
150
- ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration)
193
+ ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
194
+ ...resolveHttpAuthRuntimeConfig(extensionConfiguration)
151
195
  };
152
196
  }, "resolveRuntimeExtensions");
153
197
 
@@ -160,8 +204,8 @@ var _SSMIncidentsClient = class _SSMIncidentsClient extends import_smithy_client
160
204
  const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);
161
205
  const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);
162
206
  const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
163
- const _config_6 = (0, import_middleware_signing.resolveAwsAuthConfig)(_config_5);
164
- const _config_7 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_6);
207
+ const _config_6 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_5);
208
+ const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);
165
209
  const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []);
166
210
  super(_config_8);
167
211
  this.config = _config_8;
@@ -170,8 +214,14 @@ var _SSMIncidentsClient = class _SSMIncidentsClient extends import_smithy_client
170
214
  this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
171
215
  this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
172
216
  this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
173
- this.middlewareStack.use((0, import_middleware_signing.getAwsAuthPlugin)(this.config));
174
217
  this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
218
+ this.middlewareStack.use(
219
+ (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
220
+ httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(),
221
+ identityProviderConfigProvider: this.getIdentityProviderConfigProvider()
222
+ })
223
+ );
224
+ this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));
175
225
  }
176
226
  /**
177
227
  * Destroy underlying resources, like sockets. It's usually not necessary to do this.
@@ -181,6 +231,14 @@ var _SSMIncidentsClient = class _SSMIncidentsClient extends import_smithy_client
181
231
  destroy() {
182
232
  super.destroy();
183
233
  }
234
+ getDefaultHttpAuthSchemeParametersProvider() {
235
+ return import_httpAuthSchemeProvider.defaultSSMIncidentsHttpAuthSchemeParametersProvider;
236
+ }
237
+ getIdentityProviderConfigProvider() {
238
+ return async (config) => new import_core.DefaultIdentityProviderConfig({
239
+ "aws.auth#sigv4": config.credentials
240
+ });
241
+ }
184
242
  };
185
243
  __name(_SSMIncidentsClient, "SSMIncidentsClient");
186
244
  var SSMIncidentsClient = _SSMIncidentsClient;
@@ -195,8 +253,8 @@ var import_middleware_serde = require("@smithy/middleware-serde");
195
253
  var import_types = require("@smithy/types");
196
254
 
197
255
  // src/protocols/Aws_restJson1.ts
198
- var import_core = require("@aws-sdk/core");
199
- var import_core2 = require("@smithy/core");
256
+ var import_core2 = require("@aws-sdk/core");
257
+
200
258
 
201
259
  var import_uuid = require("uuid");
202
260
 
@@ -554,7 +612,7 @@ var UpdateReplicationSetAction;
554
612
 
555
613
  // src/protocols/Aws_restJson1.ts
556
614
  var se_BatchGetIncidentFindingsCommand = /* @__PURE__ */ __name(async (input, context) => {
557
- const b = (0, import_core2.requestBuilder)(input, context);
615
+ const b = (0, import_core.requestBuilder)(input, context);
558
616
  const headers = {
559
617
  "content-type": "application/json"
560
618
  };
@@ -570,7 +628,7 @@ var se_BatchGetIncidentFindingsCommand = /* @__PURE__ */ __name(async (input, co
570
628
  return b.build();
571
629
  }, "se_BatchGetIncidentFindingsCommand");
572
630
  var se_CreateReplicationSetCommand = /* @__PURE__ */ __name(async (input, context) => {
573
- const b = (0, import_core2.requestBuilder)(input, context);
631
+ const b = (0, import_core.requestBuilder)(input, context);
574
632
  const headers = {
575
633
  "content-type": "application/json"
576
634
  };
@@ -587,7 +645,7 @@ var se_CreateReplicationSetCommand = /* @__PURE__ */ __name(async (input, contex
587
645
  return b.build();
588
646
  }, "se_CreateReplicationSetCommand");
589
647
  var se_CreateResponsePlanCommand = /* @__PURE__ */ __name(async (input, context) => {
590
- const b = (0, import_core2.requestBuilder)(input, context);
648
+ const b = (0, import_core.requestBuilder)(input, context);
591
649
  const headers = {
592
650
  "content-type": "application/json"
593
651
  };
@@ -610,7 +668,7 @@ var se_CreateResponsePlanCommand = /* @__PURE__ */ __name(async (input, context)
610
668
  return b.build();
611
669
  }, "se_CreateResponsePlanCommand");
612
670
  var se_CreateTimelineEventCommand = /* @__PURE__ */ __name(async (input, context) => {
613
- const b = (0, import_core2.requestBuilder)(input, context);
671
+ const b = (0, import_core.requestBuilder)(input, context);
614
672
  const headers = {
615
673
  "content-type": "application/json"
616
674
  };
@@ -630,7 +688,7 @@ var se_CreateTimelineEventCommand = /* @__PURE__ */ __name(async (input, context
630
688
  return b.build();
631
689
  }, "se_CreateTimelineEventCommand");
632
690
  var se_DeleteIncidentRecordCommand = /* @__PURE__ */ __name(async (input, context) => {
633
- const b = (0, import_core2.requestBuilder)(input, context);
691
+ const b = (0, import_core.requestBuilder)(input, context);
634
692
  const headers = {
635
693
  "content-type": "application/json"
636
694
  };
@@ -645,7 +703,7 @@ var se_DeleteIncidentRecordCommand = /* @__PURE__ */ __name(async (input, contex
645
703
  return b.build();
646
704
  }, "se_DeleteIncidentRecordCommand");
647
705
  var se_DeleteReplicationSetCommand = /* @__PURE__ */ __name(async (input, context) => {
648
- const b = (0, import_core2.requestBuilder)(input, context);
706
+ const b = (0, import_core.requestBuilder)(input, context);
649
707
  const headers = {};
650
708
  b.bp("/deleteReplicationSet");
651
709
  const query = (0, import_smithy_client.map)({
@@ -656,7 +714,7 @@ var se_DeleteReplicationSetCommand = /* @__PURE__ */ __name(async (input, contex
656
714
  return b.build();
657
715
  }, "se_DeleteReplicationSetCommand");
658
716
  var se_DeleteResourcePolicyCommand = /* @__PURE__ */ __name(async (input, context) => {
659
- const b = (0, import_core2.requestBuilder)(input, context);
717
+ const b = (0, import_core.requestBuilder)(input, context);
660
718
  const headers = {
661
719
  "content-type": "application/json"
662
720
  };
@@ -672,7 +730,7 @@ var se_DeleteResourcePolicyCommand = /* @__PURE__ */ __name(async (input, contex
672
730
  return b.build();
673
731
  }, "se_DeleteResourcePolicyCommand");
674
732
  var se_DeleteResponsePlanCommand = /* @__PURE__ */ __name(async (input, context) => {
675
- const b = (0, import_core2.requestBuilder)(input, context);
733
+ const b = (0, import_core.requestBuilder)(input, context);
676
734
  const headers = {
677
735
  "content-type": "application/json"
678
736
  };
@@ -687,7 +745,7 @@ var se_DeleteResponsePlanCommand = /* @__PURE__ */ __name(async (input, context)
687
745
  return b.build();
688
746
  }, "se_DeleteResponsePlanCommand");
689
747
  var se_DeleteTimelineEventCommand = /* @__PURE__ */ __name(async (input, context) => {
690
- const b = (0, import_core2.requestBuilder)(input, context);
748
+ const b = (0, import_core.requestBuilder)(input, context);
691
749
  const headers = {
692
750
  "content-type": "application/json"
693
751
  };
@@ -703,7 +761,7 @@ var se_DeleteTimelineEventCommand = /* @__PURE__ */ __name(async (input, context
703
761
  return b.build();
704
762
  }, "se_DeleteTimelineEventCommand");
705
763
  var se_GetIncidentRecordCommand = /* @__PURE__ */ __name(async (input, context) => {
706
- const b = (0, import_core2.requestBuilder)(input, context);
764
+ const b = (0, import_core.requestBuilder)(input, context);
707
765
  const headers = {};
708
766
  b.bp("/getIncidentRecord");
709
767
  const query = (0, import_smithy_client.map)({
@@ -714,7 +772,7 @@ var se_GetIncidentRecordCommand = /* @__PURE__ */ __name(async (input, context)
714
772
  return b.build();
715
773
  }, "se_GetIncidentRecordCommand");
716
774
  var se_GetReplicationSetCommand = /* @__PURE__ */ __name(async (input, context) => {
717
- const b = (0, import_core2.requestBuilder)(input, context);
775
+ const b = (0, import_core.requestBuilder)(input, context);
718
776
  const headers = {};
719
777
  b.bp("/getReplicationSet");
720
778
  const query = (0, import_smithy_client.map)({
@@ -725,7 +783,7 @@ var se_GetReplicationSetCommand = /* @__PURE__ */ __name(async (input, context)
725
783
  return b.build();
726
784
  }, "se_GetReplicationSetCommand");
727
785
  var se_GetResourcePoliciesCommand = /* @__PURE__ */ __name(async (input, context) => {
728
- const b = (0, import_core2.requestBuilder)(input, context);
786
+ const b = (0, import_core.requestBuilder)(input, context);
729
787
  const headers = {
730
788
  "content-type": "application/json"
731
789
  };
@@ -744,7 +802,7 @@ var se_GetResourcePoliciesCommand = /* @__PURE__ */ __name(async (input, context
744
802
  return b.build();
745
803
  }, "se_GetResourcePoliciesCommand");
746
804
  var se_GetResponsePlanCommand = /* @__PURE__ */ __name(async (input, context) => {
747
- const b = (0, import_core2.requestBuilder)(input, context);
805
+ const b = (0, import_core.requestBuilder)(input, context);
748
806
  const headers = {};
749
807
  b.bp("/getResponsePlan");
750
808
  const query = (0, import_smithy_client.map)({
@@ -755,7 +813,7 @@ var se_GetResponsePlanCommand = /* @__PURE__ */ __name(async (input, context) =>
755
813
  return b.build();
756
814
  }, "se_GetResponsePlanCommand");
757
815
  var se_GetTimelineEventCommand = /* @__PURE__ */ __name(async (input, context) => {
758
- const b = (0, import_core2.requestBuilder)(input, context);
816
+ const b = (0, import_core.requestBuilder)(input, context);
759
817
  const headers = {};
760
818
  b.bp("/getTimelineEvent");
761
819
  const query = (0, import_smithy_client.map)({
@@ -767,7 +825,7 @@ var se_GetTimelineEventCommand = /* @__PURE__ */ __name(async (input, context) =
767
825
  return b.build();
768
826
  }, "se_GetTimelineEventCommand");
769
827
  var se_ListIncidentFindingsCommand = /* @__PURE__ */ __name(async (input, context) => {
770
- const b = (0, import_core2.requestBuilder)(input, context);
828
+ const b = (0, import_core.requestBuilder)(input, context);
771
829
  const headers = {
772
830
  "content-type": "application/json"
773
831
  };
@@ -784,7 +842,7 @@ var se_ListIncidentFindingsCommand = /* @__PURE__ */ __name(async (input, contex
784
842
  return b.build();
785
843
  }, "se_ListIncidentFindingsCommand");
786
844
  var se_ListIncidentRecordsCommand = /* @__PURE__ */ __name(async (input, context) => {
787
- const b = (0, import_core2.requestBuilder)(input, context);
845
+ const b = (0, import_core.requestBuilder)(input, context);
788
846
  const headers = {
789
847
  "content-type": "application/json"
790
848
  };
@@ -801,7 +859,7 @@ var se_ListIncidentRecordsCommand = /* @__PURE__ */ __name(async (input, context
801
859
  return b.build();
802
860
  }, "se_ListIncidentRecordsCommand");
803
861
  var se_ListRelatedItemsCommand = /* @__PURE__ */ __name(async (input, context) => {
804
- const b = (0, import_core2.requestBuilder)(input, context);
862
+ const b = (0, import_core.requestBuilder)(input, context);
805
863
  const headers = {
806
864
  "content-type": "application/json"
807
865
  };
@@ -818,7 +876,7 @@ var se_ListRelatedItemsCommand = /* @__PURE__ */ __name(async (input, context) =
818
876
  return b.build();
819
877
  }, "se_ListRelatedItemsCommand");
820
878
  var se_ListReplicationSetsCommand = /* @__PURE__ */ __name(async (input, context) => {
821
- const b = (0, import_core2.requestBuilder)(input, context);
879
+ const b = (0, import_core.requestBuilder)(input, context);
822
880
  const headers = {
823
881
  "content-type": "application/json"
824
882
  };
@@ -834,7 +892,7 @@ var se_ListReplicationSetsCommand = /* @__PURE__ */ __name(async (input, context
834
892
  return b.build();
835
893
  }, "se_ListReplicationSetsCommand");
836
894
  var se_ListResponsePlansCommand = /* @__PURE__ */ __name(async (input, context) => {
837
- const b = (0, import_core2.requestBuilder)(input, context);
895
+ const b = (0, import_core.requestBuilder)(input, context);
838
896
  const headers = {
839
897
  "content-type": "application/json"
840
898
  };
@@ -850,7 +908,7 @@ var se_ListResponsePlansCommand = /* @__PURE__ */ __name(async (input, context)
850
908
  return b.build();
851
909
  }, "se_ListResponsePlansCommand");
852
910
  var se_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
853
- const b = (0, import_core2.requestBuilder)(input, context);
911
+ const b = (0, import_core.requestBuilder)(input, context);
854
912
  const headers = {};
855
913
  b.bp("/tags/{resourceArn}");
856
914
  b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
@@ -859,7 +917,7 @@ var se_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (input, context
859
917
  return b.build();
860
918
  }, "se_ListTagsForResourceCommand");
861
919
  var se_ListTimelineEventsCommand = /* @__PURE__ */ __name(async (input, context) => {
862
- const b = (0, import_core2.requestBuilder)(input, context);
920
+ const b = (0, import_core.requestBuilder)(input, context);
863
921
  const headers = {
864
922
  "content-type": "application/json"
865
923
  };
@@ -879,7 +937,7 @@ var se_ListTimelineEventsCommand = /* @__PURE__ */ __name(async (input, context)
879
937
  return b.build();
880
938
  }, "se_ListTimelineEventsCommand");
881
939
  var se_PutResourcePolicyCommand = /* @__PURE__ */ __name(async (input, context) => {
882
- const b = (0, import_core2.requestBuilder)(input, context);
940
+ const b = (0, import_core.requestBuilder)(input, context);
883
941
  const headers = {
884
942
  "content-type": "application/json"
885
943
  };
@@ -895,7 +953,7 @@ var se_PutResourcePolicyCommand = /* @__PURE__ */ __name(async (input, context)
895
953
  return b.build();
896
954
  }, "se_PutResourcePolicyCommand");
897
955
  var se_StartIncidentCommand = /* @__PURE__ */ __name(async (input, context) => {
898
- const b = (0, import_core2.requestBuilder)(input, context);
956
+ const b = (0, import_core.requestBuilder)(input, context);
899
957
  const headers = {
900
958
  "content-type": "application/json"
901
959
  };
@@ -915,7 +973,7 @@ var se_StartIncidentCommand = /* @__PURE__ */ __name(async (input, context) => {
915
973
  return b.build();
916
974
  }, "se_StartIncidentCommand");
917
975
  var se_TagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
918
- const b = (0, import_core2.requestBuilder)(input, context);
976
+ const b = (0, import_core.requestBuilder)(input, context);
919
977
  const headers = {
920
978
  "content-type": "application/json"
921
979
  };
@@ -931,7 +989,7 @@ var se_TagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
931
989
  return b.build();
932
990
  }, "se_TagResourceCommand");
933
991
  var se_UntagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
934
- const b = (0, import_core2.requestBuilder)(input, context);
992
+ const b = (0, import_core.requestBuilder)(input, context);
935
993
  const headers = {};
936
994
  b.bp("/tags/{resourceArn}");
937
995
  b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
@@ -946,7 +1004,7 @@ var se_UntagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
946
1004
  return b.build();
947
1005
  }, "se_UntagResourceCommand");
948
1006
  var se_UpdateDeletionProtectionCommand = /* @__PURE__ */ __name(async (input, context) => {
949
- const b = (0, import_core2.requestBuilder)(input, context);
1007
+ const b = (0, import_core.requestBuilder)(input, context);
950
1008
  const headers = {
951
1009
  "content-type": "application/json"
952
1010
  };
@@ -963,7 +1021,7 @@ var se_UpdateDeletionProtectionCommand = /* @__PURE__ */ __name(async (input, co
963
1021
  return b.build();
964
1022
  }, "se_UpdateDeletionProtectionCommand");
965
1023
  var se_UpdateIncidentRecordCommand = /* @__PURE__ */ __name(async (input, context) => {
966
- const b = (0, import_core2.requestBuilder)(input, context);
1024
+ const b = (0, import_core.requestBuilder)(input, context);
967
1025
  const headers = {
968
1026
  "content-type": "application/json"
969
1027
  };
@@ -985,7 +1043,7 @@ var se_UpdateIncidentRecordCommand = /* @__PURE__ */ __name(async (input, contex
985
1043
  return b.build();
986
1044
  }, "se_UpdateIncidentRecordCommand");
987
1045
  var se_UpdateRelatedItemsCommand = /* @__PURE__ */ __name(async (input, context) => {
988
- const b = (0, import_core2.requestBuilder)(input, context);
1046
+ const b = (0, import_core.requestBuilder)(input, context);
989
1047
  const headers = {
990
1048
  "content-type": "application/json"
991
1049
  };
@@ -1002,7 +1060,7 @@ var se_UpdateRelatedItemsCommand = /* @__PURE__ */ __name(async (input, context)
1002
1060
  return b.build();
1003
1061
  }, "se_UpdateRelatedItemsCommand");
1004
1062
  var se_UpdateReplicationSetCommand = /* @__PURE__ */ __name(async (input, context) => {
1005
- const b = (0, import_core2.requestBuilder)(input, context);
1063
+ const b = (0, import_core.requestBuilder)(input, context);
1006
1064
  const headers = {
1007
1065
  "content-type": "application/json"
1008
1066
  };
@@ -1019,7 +1077,7 @@ var se_UpdateReplicationSetCommand = /* @__PURE__ */ __name(async (input, contex
1019
1077
  return b.build();
1020
1078
  }, "se_UpdateReplicationSetCommand");
1021
1079
  var se_UpdateResponsePlanCommand = /* @__PURE__ */ __name(async (input, context) => {
1022
- const b = (0, import_core2.requestBuilder)(input, context);
1080
+ const b = (0, import_core.requestBuilder)(input, context);
1023
1081
  const headers = {
1024
1082
  "content-type": "application/json"
1025
1083
  };
@@ -1046,7 +1104,7 @@ var se_UpdateResponsePlanCommand = /* @__PURE__ */ __name(async (input, context)
1046
1104
  return b.build();
1047
1105
  }, "se_UpdateResponsePlanCommand");
1048
1106
  var se_UpdateTimelineEventCommand = /* @__PURE__ */ __name(async (input, context) => {
1049
- const b = (0, import_core2.requestBuilder)(input, context);
1107
+ const b = (0, import_core.requestBuilder)(input, context);
1050
1108
  const headers = {
1051
1109
  "content-type": "application/json"
1052
1110
  };
@@ -1228,7 +1286,7 @@ var de_GetResponsePlanCommand = /* @__PURE__ */ __name(async (output, context) =
1228
1286
  const doc = (0, import_smithy_client.take)(data, {
1229
1287
  actions: import_smithy_client._json,
1230
1288
  arn: import_smithy_client.expectString,
1231
- chatChannel: (_) => (0, import_smithy_client._json)((0, import_core.awsExpectUnion)(_)),
1289
+ chatChannel: (_) => (0, import_smithy_client._json)((0, import_core2.awsExpectUnion)(_)),
1232
1290
  displayName: import_smithy_client.expectString,
1233
1291
  engagements: import_smithy_client._json,
1234
1292
  incidentTemplate: import_smithy_client._json,
@@ -1665,7 +1723,7 @@ var de_EventSummaryList = /* @__PURE__ */ __name((output, context) => {
1665
1723
  var de_Finding = /* @__PURE__ */ __name((output, context) => {
1666
1724
  return (0, import_smithy_client.take)(output, {
1667
1725
  creationTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
1668
- details: (_) => de_FindingDetails((0, import_core.awsExpectUnion)(_), context),
1726
+ details: (_) => de_FindingDetails((0, import_core2.awsExpectUnion)(_), context),
1669
1727
  id: import_smithy_client.expectString,
1670
1728
  lastModifiedTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_)))
1671
1729
  });
@@ -1705,7 +1763,7 @@ var de_IncidentRecord = /* @__PURE__ */ __name((output, context) => {
1705
1763
  return (0, import_smithy_client.take)(output, {
1706
1764
  arn: import_smithy_client.expectString,
1707
1765
  automationExecutions: import_smithy_client._json,
1708
- chatChannel: (_) => (0, import_smithy_client._json)((0, import_core.awsExpectUnion)(_)),
1766
+ chatChannel: (_) => (0, import_smithy_client._json)((0, import_core2.awsExpectUnion)(_)),
1709
1767
  creationTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
1710
1768
  dedupeString: import_smithy_client.expectString,
1711
1769
  impact: import_smithy_client.expectInt32,
@@ -2393,32 +2451,32 @@ var SSMIncidents = _SSMIncidents;
2393
2451
  (0, import_smithy_client.createAggregatedClient)(commands, SSMIncidents);
2394
2452
 
2395
2453
  // src/pagination/GetResourcePoliciesPaginator.ts
2396
- var import_core3 = require("@smithy/core");
2397
- var paginateGetResourcePolicies = (0, import_core3.createPaginator)(SSMIncidentsClient, GetResourcePoliciesCommand, "nextToken", "nextToken", "maxResults");
2454
+
2455
+ var paginateGetResourcePolicies = (0, import_core.createPaginator)(SSMIncidentsClient, GetResourcePoliciesCommand, "nextToken", "nextToken", "maxResults");
2398
2456
 
2399
2457
  // src/pagination/ListIncidentFindingsPaginator.ts
2400
- var import_core4 = require("@smithy/core");
2401
- var paginateListIncidentFindings = (0, import_core4.createPaginator)(SSMIncidentsClient, ListIncidentFindingsCommand, "nextToken", "nextToken", "maxResults");
2458
+
2459
+ var paginateListIncidentFindings = (0, import_core.createPaginator)(SSMIncidentsClient, ListIncidentFindingsCommand, "nextToken", "nextToken", "maxResults");
2402
2460
 
2403
2461
  // src/pagination/ListIncidentRecordsPaginator.ts
2404
- var import_core5 = require("@smithy/core");
2405
- var paginateListIncidentRecords = (0, import_core5.createPaginator)(SSMIncidentsClient, ListIncidentRecordsCommand, "nextToken", "nextToken", "maxResults");
2462
+
2463
+ var paginateListIncidentRecords = (0, import_core.createPaginator)(SSMIncidentsClient, ListIncidentRecordsCommand, "nextToken", "nextToken", "maxResults");
2406
2464
 
2407
2465
  // src/pagination/ListRelatedItemsPaginator.ts
2408
- var import_core6 = require("@smithy/core");
2409
- var paginateListRelatedItems = (0, import_core6.createPaginator)(SSMIncidentsClient, ListRelatedItemsCommand, "nextToken", "nextToken", "maxResults");
2466
+
2467
+ var paginateListRelatedItems = (0, import_core.createPaginator)(SSMIncidentsClient, ListRelatedItemsCommand, "nextToken", "nextToken", "maxResults");
2410
2468
 
2411
2469
  // src/pagination/ListReplicationSetsPaginator.ts
2412
- var import_core7 = require("@smithy/core");
2413
- var paginateListReplicationSets = (0, import_core7.createPaginator)(SSMIncidentsClient, ListReplicationSetsCommand, "nextToken", "nextToken", "maxResults");
2470
+
2471
+ var paginateListReplicationSets = (0, import_core.createPaginator)(SSMIncidentsClient, ListReplicationSetsCommand, "nextToken", "nextToken", "maxResults");
2414
2472
 
2415
2473
  // src/pagination/ListResponsePlansPaginator.ts
2416
- var import_core8 = require("@smithy/core");
2417
- var paginateListResponsePlans = (0, import_core8.createPaginator)(SSMIncidentsClient, ListResponsePlansCommand, "nextToken", "nextToken", "maxResults");
2474
+
2475
+ var paginateListResponsePlans = (0, import_core.createPaginator)(SSMIncidentsClient, ListResponsePlansCommand, "nextToken", "nextToken", "maxResults");
2418
2476
 
2419
2477
  // src/pagination/ListTimelineEventsPaginator.ts
2420
- var import_core9 = require("@smithy/core");
2421
- var paginateListTimelineEvents = (0, import_core9.createPaginator)(SSMIncidentsClient, ListTimelineEventsCommand, "nextToken", "nextToken", "maxResults");
2478
+
2479
+ var paginateListTimelineEvents = (0, import_core.createPaginator)(SSMIncidentsClient, ListTimelineEventsCommand, "nextToken", "nextToken", "maxResults");
2422
2480
 
2423
2481
  // src/waiters/waitForWaitForReplicationSetActive.ts
2424
2482
  var import_util_waiter = require("@smithy/util-waiter");
@@ -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.defaultSSMIncidentsHttpAuthSchemeProvider,
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 ?? "SSM Incidents",
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 { defaultSSMIncidentsHttpAuthSchemeParametersProvider, 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 SSMIncidentsClient 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 SSMIncidentsClient 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 defaultSSMIncidentsHttpAuthSchemeParametersProvider;
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
+ };