@aws-sdk/client-support-app 3.190.0 → 3.192.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 (89) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +0 -1
  3. package/dist-cjs/SupportApp.js +15 -0
  4. package/dist-cjs/SupportAppClient.js +11 -8
  5. package/dist-cjs/commands/CreateSlackChannelConfigurationCommand.js +10 -0
  6. package/dist-cjs/commands/DeleteAccountAliasCommand.js +10 -0
  7. package/dist-cjs/commands/DeleteSlackChannelConfigurationCommand.js +10 -0
  8. package/dist-cjs/commands/DeleteSlackWorkspaceConfigurationCommand.js +10 -0
  9. package/dist-cjs/commands/GetAccountAliasCommand.js +10 -0
  10. package/dist-cjs/commands/ListSlackChannelConfigurationsCommand.js +10 -0
  11. package/dist-cjs/commands/ListSlackWorkspaceConfigurationsCommand.js +10 -0
  12. package/dist-cjs/commands/PutAccountAliasCommand.js +10 -0
  13. package/dist-cjs/commands/RegisterSlackWorkspaceForOrganizationCommand.js +46 -0
  14. package/dist-cjs/commands/UpdateSlackChannelConfigurationCommand.js +10 -0
  15. package/dist-cjs/commands/index.js +1 -0
  16. package/dist-cjs/endpoint/EndpointParameters.js +13 -0
  17. package/dist-cjs/endpoint/endpointResolver.js +12 -0
  18. package/dist-cjs/endpoint/ruleset.js +312 -0
  19. package/dist-cjs/models/models_0.js +14 -1
  20. package/dist-cjs/protocols/Aws_restJson1.js +77 -1
  21. package/dist-cjs/runtimeConfig.shared.js +3 -3
  22. package/dist-es/SupportApp.js +15 -0
  23. package/dist-es/SupportAppClient.js +12 -9
  24. package/dist-es/commands/CreateSlackChannelConfigurationCommand.js +10 -0
  25. package/dist-es/commands/DeleteAccountAliasCommand.js +10 -0
  26. package/dist-es/commands/DeleteSlackChannelConfigurationCommand.js +10 -0
  27. package/dist-es/commands/DeleteSlackWorkspaceConfigurationCommand.js +10 -0
  28. package/dist-es/commands/GetAccountAliasCommand.js +10 -0
  29. package/dist-es/commands/ListSlackChannelConfigurationsCommand.js +10 -0
  30. package/dist-es/commands/ListSlackWorkspaceConfigurationsCommand.js +10 -0
  31. package/dist-es/commands/PutAccountAliasCommand.js +10 -0
  32. package/dist-es/commands/RegisterSlackWorkspaceForOrganizationCommand.js +42 -0
  33. package/dist-es/commands/UpdateSlackChannelConfigurationCommand.js +10 -0
  34. package/dist-es/commands/index.js +1 -0
  35. package/dist-es/endpoint/EndpointParameters.js +8 -0
  36. package/dist-es/endpoint/endpointResolver.js +8 -0
  37. package/dist-es/endpoint/ruleset.js +309 -0
  38. package/dist-es/models/models_0.js +11 -0
  39. package/dist-es/protocols/Aws_restJson1.js +74 -0
  40. package/dist-es/runtimeConfig.shared.js +2 -2
  41. package/dist-types/SupportApp.d.ts +36 -1
  42. package/dist-types/SupportAppClient.d.ts +9 -12
  43. package/dist-types/commands/CreateSlackChannelConfigurationCommand.d.ts +2 -0
  44. package/dist-types/commands/DeleteAccountAliasCommand.d.ts +2 -0
  45. package/dist-types/commands/DeleteSlackChannelConfigurationCommand.d.ts +2 -0
  46. package/dist-types/commands/DeleteSlackWorkspaceConfigurationCommand.d.ts +2 -0
  47. package/dist-types/commands/GetAccountAliasCommand.d.ts +2 -0
  48. package/dist-types/commands/ListSlackChannelConfigurationsCommand.d.ts +2 -0
  49. package/dist-types/commands/ListSlackWorkspaceConfigurationsCommand.d.ts +2 -0
  50. package/dist-types/commands/PutAccountAliasCommand.d.ts +2 -0
  51. package/dist-types/commands/RegisterSlackWorkspaceForOrganizationCommand.d.ts +66 -0
  52. package/dist-types/commands/UpdateSlackChannelConfigurationCommand.d.ts +2 -0
  53. package/dist-types/commands/index.d.ts +1 -0
  54. package/dist-types/endpoint/EndpointParameters.d.ts +19 -0
  55. package/dist-types/endpoint/endpointResolver.d.ts +5 -0
  56. package/dist-types/endpoint/ruleset.d.ts +2 -0
  57. package/dist-types/models/models_0.d.ts +72 -20
  58. package/dist-types/protocols/Aws_restJson1.d.ts +3 -0
  59. package/dist-types/runtimeConfig.browser.d.ts +4 -2
  60. package/dist-types/runtimeConfig.d.ts +4 -2
  61. package/dist-types/runtimeConfig.native.d.ts +4 -2
  62. package/dist-types/runtimeConfig.shared.d.ts +3 -1
  63. package/dist-types/ts3.4/SupportApp.d.ts +23 -0
  64. package/dist-types/ts3.4/SupportAppClient.d.ts +21 -8
  65. package/dist-types/ts3.4/commands/CreateSlackChannelConfigurationCommand.d.ts +2 -0
  66. package/dist-types/ts3.4/commands/DeleteAccountAliasCommand.d.ts +2 -0
  67. package/dist-types/ts3.4/commands/DeleteSlackChannelConfigurationCommand.d.ts +2 -0
  68. package/dist-types/ts3.4/commands/DeleteSlackWorkspaceConfigurationCommand.d.ts +2 -0
  69. package/dist-types/ts3.4/commands/GetAccountAliasCommand.d.ts +2 -0
  70. package/dist-types/ts3.4/commands/ListSlackChannelConfigurationsCommand.d.ts +2 -0
  71. package/dist-types/ts3.4/commands/ListSlackWorkspaceConfigurationsCommand.d.ts +2 -0
  72. package/dist-types/ts3.4/commands/PutAccountAliasCommand.d.ts +2 -0
  73. package/dist-types/ts3.4/commands/RegisterSlackWorkspaceForOrganizationCommand.d.ts +41 -0
  74. package/dist-types/ts3.4/commands/UpdateSlackChannelConfigurationCommand.d.ts +2 -0
  75. package/dist-types/ts3.4/commands/index.d.ts +1 -0
  76. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +26 -0
  77. package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
  78. package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
  79. package/dist-types/ts3.4/models/models_0.d.ts +20 -0
  80. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +12 -0
  81. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +14 -4
  82. package/dist-types/ts3.4/runtimeConfig.d.ts +14 -4
  83. package/dist-types/ts3.4/runtimeConfig.native.d.ts +14 -3
  84. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +6 -1
  85. package/package.json +4 -3
  86. package/dist-cjs/endpoints.js +0 -132
  87. package/dist-es/endpoints.js +0 -128
  88. package/dist-types/endpoints.d.ts +0 -2
  89. package/dist-types/ts3.4/endpoints.d.ts +0 -2
@@ -1,3 +1,4 @@
1
+ import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
1
2
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
2
3
  import { Command as $Command } from "@aws-sdk/smithy-client";
3
4
  import { ListSlackChannelConfigurationsRequestFilterSensitiveLog, ListSlackChannelConfigurationsResultFilterSensitiveLog, } from "../models/models_0";
@@ -7,8 +8,17 @@ export class ListSlackChannelConfigurationsCommand extends $Command {
7
8
  super();
8
9
  this.input = input;
9
10
  }
11
+ static getEndpointParameterInstructions() {
12
+ return {
13
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
14
+ Endpoint: { type: "builtInParams", name: "endpoint" },
15
+ Region: { type: "builtInParams", name: "region" },
16
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
+ };
18
+ }
10
19
  resolveMiddleware(clientStack, configuration, options) {
11
20
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
+ this.middlewareStack.use(getEndpointPlugin(configuration, ListSlackChannelConfigurationsCommand.getEndpointParameterInstructions()));
12
22
  const stack = clientStack.concat(this.middlewareStack);
13
23
  const { logger } = configuration;
14
24
  const clientName = "SupportAppClient";
@@ -1,3 +1,4 @@
1
+ import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
1
2
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
2
3
  import { Command as $Command } from "@aws-sdk/smithy-client";
3
4
  import { ListSlackWorkspaceConfigurationsRequestFilterSensitiveLog, ListSlackWorkspaceConfigurationsResultFilterSensitiveLog, } from "../models/models_0";
@@ -7,8 +8,17 @@ export class ListSlackWorkspaceConfigurationsCommand extends $Command {
7
8
  super();
8
9
  this.input = input;
9
10
  }
11
+ static getEndpointParameterInstructions() {
12
+ return {
13
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
14
+ Endpoint: { type: "builtInParams", name: "endpoint" },
15
+ Region: { type: "builtInParams", name: "region" },
16
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
+ };
18
+ }
10
19
  resolveMiddleware(clientStack, configuration, options) {
11
20
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
+ this.middlewareStack.use(getEndpointPlugin(configuration, ListSlackWorkspaceConfigurationsCommand.getEndpointParameterInstructions()));
12
22
  const stack = clientStack.concat(this.middlewareStack);
13
23
  const { logger } = configuration;
14
24
  const clientName = "SupportAppClient";
@@ -1,3 +1,4 @@
1
+ import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
1
2
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
2
3
  import { Command as $Command } from "@aws-sdk/smithy-client";
3
4
  import { PutAccountAliasRequestFilterSensitiveLog, PutAccountAliasResultFilterSensitiveLog, } from "../models/models_0";
@@ -7,8 +8,17 @@ export class PutAccountAliasCommand extends $Command {
7
8
  super();
8
9
  this.input = input;
9
10
  }
11
+ static getEndpointParameterInstructions() {
12
+ return {
13
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
14
+ Endpoint: { type: "builtInParams", name: "endpoint" },
15
+ Region: { type: "builtInParams", name: "region" },
16
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
+ };
18
+ }
10
19
  resolveMiddleware(clientStack, configuration, options) {
11
20
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
+ this.middlewareStack.use(getEndpointPlugin(configuration, PutAccountAliasCommand.getEndpointParameterInstructions()));
12
22
  const stack = clientStack.concat(this.middlewareStack);
13
23
  const { logger } = configuration;
14
24
  const clientName = "SupportAppClient";
@@ -0,0 +1,42 @@
1
+ import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { RegisterSlackWorkspaceForOrganizationRequestFilterSensitiveLog, RegisterSlackWorkspaceForOrganizationResultFilterSensitiveLog, } from "../models/models_0";
5
+ import { deserializeAws_restJson1RegisterSlackWorkspaceForOrganizationCommand, serializeAws_restJson1RegisterSlackWorkspaceForOrganizationCommand, } from "../protocols/Aws_restJson1";
6
+ export class RegisterSlackWorkspaceForOrganizationCommand extends $Command {
7
+ constructor(input) {
8
+ super();
9
+ this.input = input;
10
+ }
11
+ static getEndpointParameterInstructions() {
12
+ return {
13
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
14
+ Endpoint: { type: "builtInParams", name: "endpoint" },
15
+ Region: { type: "builtInParams", name: "region" },
16
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
+ };
18
+ }
19
+ resolveMiddleware(clientStack, configuration, options) {
20
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
+ this.middlewareStack.use(getEndpointPlugin(configuration, RegisterSlackWorkspaceForOrganizationCommand.getEndpointParameterInstructions()));
22
+ const stack = clientStack.concat(this.middlewareStack);
23
+ const { logger } = configuration;
24
+ const clientName = "SupportAppClient";
25
+ const commandName = "RegisterSlackWorkspaceForOrganizationCommand";
26
+ const handlerExecutionContext = {
27
+ logger,
28
+ clientName,
29
+ commandName,
30
+ inputFilterSensitiveLog: RegisterSlackWorkspaceForOrganizationRequestFilterSensitiveLog,
31
+ outputFilterSensitiveLog: RegisterSlackWorkspaceForOrganizationResultFilterSensitiveLog,
32
+ };
33
+ const { requestHandler } = configuration;
34
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
35
+ }
36
+ serialize(input, context) {
37
+ return serializeAws_restJson1RegisterSlackWorkspaceForOrganizationCommand(input, context);
38
+ }
39
+ deserialize(output, context) {
40
+ return deserializeAws_restJson1RegisterSlackWorkspaceForOrganizationCommand(output, context);
41
+ }
42
+ }
@@ -1,3 +1,4 @@
1
+ import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
1
2
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
2
3
  import { Command as $Command } from "@aws-sdk/smithy-client";
3
4
  import { UpdateSlackChannelConfigurationRequestFilterSensitiveLog, UpdateSlackChannelConfigurationResultFilterSensitiveLog, } from "../models/models_0";
@@ -7,8 +8,17 @@ export class UpdateSlackChannelConfigurationCommand extends $Command {
7
8
  super();
8
9
  this.input = input;
9
10
  }
11
+ static getEndpointParameterInstructions() {
12
+ return {
13
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
14
+ Endpoint: { type: "builtInParams", name: "endpoint" },
15
+ Region: { type: "builtInParams", name: "region" },
16
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
+ };
18
+ }
10
19
  resolveMiddleware(clientStack, configuration, options) {
11
20
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
+ this.middlewareStack.use(getEndpointPlugin(configuration, UpdateSlackChannelConfigurationCommand.getEndpointParameterInstructions()));
12
22
  const stack = clientStack.concat(this.middlewareStack);
13
23
  const { logger } = configuration;
14
24
  const clientName = "SupportAppClient";
@@ -6,4 +6,5 @@ export * from "./GetAccountAliasCommand";
6
6
  export * from "./ListSlackChannelConfigurationsCommand";
7
7
  export * from "./ListSlackWorkspaceConfigurationsCommand";
8
8
  export * from "./PutAccountAliasCommand";
9
+ export * from "./RegisterSlackWorkspaceForOrganizationCommand";
9
10
  export * from "./UpdateSlackChannelConfigurationCommand";
@@ -0,0 +1,8 @@
1
+ export const resolveClientEndpointParameters = (options) => {
2
+ return {
3
+ ...options,
4
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
5
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
6
+ defaultSigningName: "supportapp",
7
+ };
8
+ };
@@ -0,0 +1,8 @@
1
+ import { resolveEndpoint } from "@aws-sdk/util-endpoints";
2
+ import { ruleSet } from "../endpoint/ruleset";
3
+ export const defaultEndpointResolver = (endpointParams, context = {}) => {
4
+ return resolveEndpoint(ruleSet, {
5
+ endpointParams: endpointParams,
6
+ logger: context.logger,
7
+ });
8
+ };
@@ -0,0 +1,309 @@
1
+ export const ruleSet = {
2
+ version: "1.0",
3
+ parameters: {
4
+ Region: {
5
+ builtIn: "AWS::Region",
6
+ required: true,
7
+ documentation: "The AWS region used to dispatch the request.",
8
+ type: "String",
9
+ },
10
+ UseDualStack: {
11
+ builtIn: "AWS::UseDualStack",
12
+ required: true,
13
+ default: false,
14
+ documentation: "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.",
15
+ type: "Boolean",
16
+ },
17
+ UseFIPS: {
18
+ builtIn: "AWS::UseFIPS",
19
+ required: true,
20
+ default: false,
21
+ documentation: "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.",
22
+ type: "Boolean",
23
+ },
24
+ Endpoint: {
25
+ builtIn: "SDK::Endpoint",
26
+ required: false,
27
+ documentation: "Override the endpoint used to send this request",
28
+ type: "String",
29
+ },
30
+ },
31
+ rules: [
32
+ {
33
+ conditions: [
34
+ {
35
+ fn: "aws.partition",
36
+ argv: [
37
+ {
38
+ ref: "Region",
39
+ },
40
+ ],
41
+ assign: "PartitionResult",
42
+ },
43
+ ],
44
+ type: "tree",
45
+ rules: [
46
+ {
47
+ conditions: [
48
+ {
49
+ fn: "isSet",
50
+ argv: [
51
+ {
52
+ ref: "Endpoint",
53
+ },
54
+ ],
55
+ },
56
+ {
57
+ fn: "parseURL",
58
+ argv: [
59
+ {
60
+ ref: "Endpoint",
61
+ },
62
+ ],
63
+ assign: "url",
64
+ },
65
+ ],
66
+ type: "tree",
67
+ rules: [
68
+ {
69
+ conditions: [
70
+ {
71
+ fn: "booleanEquals",
72
+ argv: [
73
+ {
74
+ ref: "UseFIPS",
75
+ },
76
+ true,
77
+ ],
78
+ },
79
+ ],
80
+ error: "Invalid Configuration: FIPS and custom endpoint are not supported",
81
+ type: "error",
82
+ },
83
+ {
84
+ conditions: [],
85
+ type: "tree",
86
+ rules: [
87
+ {
88
+ conditions: [
89
+ {
90
+ fn: "booleanEquals",
91
+ argv: [
92
+ {
93
+ ref: "UseDualStack",
94
+ },
95
+ true,
96
+ ],
97
+ },
98
+ ],
99
+ error: "Invalid Configuration: Dualstack and custom endpoint are not supported",
100
+ type: "error",
101
+ },
102
+ {
103
+ conditions: [],
104
+ endpoint: {
105
+ url: {
106
+ ref: "Endpoint",
107
+ },
108
+ properties: {},
109
+ headers: {},
110
+ },
111
+ type: "endpoint",
112
+ },
113
+ ],
114
+ },
115
+ ],
116
+ },
117
+ {
118
+ conditions: [
119
+ {
120
+ fn: "booleanEquals",
121
+ argv: [
122
+ {
123
+ ref: "UseFIPS",
124
+ },
125
+ true,
126
+ ],
127
+ },
128
+ {
129
+ fn: "booleanEquals",
130
+ argv: [
131
+ {
132
+ ref: "UseDualStack",
133
+ },
134
+ true,
135
+ ],
136
+ },
137
+ ],
138
+ type: "tree",
139
+ rules: [
140
+ {
141
+ conditions: [
142
+ {
143
+ fn: "booleanEquals",
144
+ argv: [
145
+ true,
146
+ {
147
+ fn: "getAttr",
148
+ argv: [
149
+ {
150
+ ref: "PartitionResult",
151
+ },
152
+ "supportsFIPS",
153
+ ],
154
+ },
155
+ ],
156
+ },
157
+ {
158
+ fn: "booleanEquals",
159
+ argv: [
160
+ true,
161
+ {
162
+ fn: "getAttr",
163
+ argv: [
164
+ {
165
+ ref: "PartitionResult",
166
+ },
167
+ "supportsDualStack",
168
+ ],
169
+ },
170
+ ],
171
+ },
172
+ ],
173
+ type: "tree",
174
+ rules: [
175
+ {
176
+ conditions: [],
177
+ endpoint: {
178
+ url: "https://support-app-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",
179
+ properties: {},
180
+ headers: {},
181
+ },
182
+ type: "endpoint",
183
+ },
184
+ ],
185
+ },
186
+ {
187
+ conditions: [],
188
+ error: "FIPS and DualStack are enabled, but this partition does not support one or both",
189
+ type: "error",
190
+ },
191
+ ],
192
+ },
193
+ {
194
+ conditions: [
195
+ {
196
+ fn: "booleanEquals",
197
+ argv: [
198
+ {
199
+ ref: "UseFIPS",
200
+ },
201
+ true,
202
+ ],
203
+ },
204
+ ],
205
+ type: "tree",
206
+ rules: [
207
+ {
208
+ conditions: [
209
+ {
210
+ fn: "booleanEquals",
211
+ argv: [
212
+ true,
213
+ {
214
+ fn: "getAttr",
215
+ argv: [
216
+ {
217
+ ref: "PartitionResult",
218
+ },
219
+ "supportsFIPS",
220
+ ],
221
+ },
222
+ ],
223
+ },
224
+ ],
225
+ type: "tree",
226
+ rules: [
227
+ {
228
+ conditions: [],
229
+ endpoint: {
230
+ url: "https://support-app-fips.{Region}.{PartitionResult#dnsSuffix}",
231
+ properties: {},
232
+ headers: {},
233
+ },
234
+ type: "endpoint",
235
+ },
236
+ ],
237
+ },
238
+ {
239
+ conditions: [],
240
+ error: "FIPS is enabled but this partition does not support FIPS",
241
+ type: "error",
242
+ },
243
+ ],
244
+ },
245
+ {
246
+ conditions: [
247
+ {
248
+ fn: "booleanEquals",
249
+ argv: [
250
+ {
251
+ ref: "UseDualStack",
252
+ },
253
+ true,
254
+ ],
255
+ },
256
+ ],
257
+ type: "tree",
258
+ rules: [
259
+ {
260
+ conditions: [
261
+ {
262
+ fn: "booleanEquals",
263
+ argv: [
264
+ true,
265
+ {
266
+ fn: "getAttr",
267
+ argv: [
268
+ {
269
+ ref: "PartitionResult",
270
+ },
271
+ "supportsDualStack",
272
+ ],
273
+ },
274
+ ],
275
+ },
276
+ ],
277
+ type: "tree",
278
+ rules: [
279
+ {
280
+ conditions: [],
281
+ endpoint: {
282
+ url: "https://support-app.{Region}.{PartitionResult#dualStackDnsSuffix}",
283
+ properties: {},
284
+ headers: {},
285
+ },
286
+ type: "endpoint",
287
+ },
288
+ ],
289
+ },
290
+ {
291
+ conditions: [],
292
+ error: "DualStack is enabled but this partition does not support DualStack",
293
+ type: "error",
294
+ },
295
+ ],
296
+ },
297
+ {
298
+ conditions: [],
299
+ endpoint: {
300
+ url: "https://support-app.{Region}.{PartitionResult#dnsSuffix}",
301
+ properties: {},
302
+ headers: {},
303
+ },
304
+ type: "endpoint",
305
+ },
306
+ ],
307
+ },
308
+ ],
309
+ };
@@ -11,6 +11,11 @@ export class AccessDeniedException extends __BaseException {
11
11
  Object.setPrototypeOf(this, AccessDeniedException.prototype);
12
12
  }
13
13
  }
14
+ export var AccountType;
15
+ (function (AccountType) {
16
+ AccountType["MANAGEMENT"] = "management";
17
+ AccountType["MEMBER"] = "member";
18
+ })(AccountType || (AccountType = {}));
14
19
  export class ConflictException extends __BaseException {
15
20
  constructor(opts) {
16
21
  super({
@@ -131,6 +136,12 @@ export const PutAccountAliasRequestFilterSensitiveLog = (obj) => ({
131
136
  export const PutAccountAliasResultFilterSensitiveLog = (obj) => ({
132
137
  ...obj,
133
138
  });
139
+ export const RegisterSlackWorkspaceForOrganizationRequestFilterSensitiveLog = (obj) => ({
140
+ ...obj,
141
+ });
142
+ export const RegisterSlackWorkspaceForOrganizationResultFilterSensitiveLog = (obj) => ({
143
+ ...obj,
144
+ });
134
145
  export const UpdateSlackChannelConfigurationRequestFilterSensitiveLog = (obj) => ({
135
146
  ...obj,
136
147
  });
@@ -173,6 +173,27 @@ export const serializeAws_restJson1PutAccountAliasCommand = async (input, contex
173
173
  body,
174
174
  });
175
175
  };
176
+ export const serializeAws_restJson1RegisterSlackWorkspaceForOrganizationCommand = async (input, context) => {
177
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
178
+ const headers = {
179
+ "content-type": "application/json",
180
+ };
181
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
182
+ "/control/register-slack-workspace-for-organization";
183
+ let body;
184
+ body = JSON.stringify({
185
+ ...(input.teamId != null && { teamId: input.teamId }),
186
+ });
187
+ return new __HttpRequest({
188
+ protocol,
189
+ hostname,
190
+ port,
191
+ method: "POST",
192
+ headers,
193
+ path: resolvedPath,
194
+ body,
195
+ });
196
+ };
176
197
  export const serializeAws_restJson1UpdateSlackChannelConfigurationCommand = async (input, context) => {
177
198
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
178
199
  const headers = {
@@ -512,6 +533,57 @@ const deserializeAws_restJson1PutAccountAliasCommandError = async (output, conte
512
533
  });
513
534
  }
514
535
  };
536
+ export const deserializeAws_restJson1RegisterSlackWorkspaceForOrganizationCommand = async (output, context) => {
537
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
538
+ return deserializeAws_restJson1RegisterSlackWorkspaceForOrganizationCommandError(output, context);
539
+ }
540
+ const contents = map({
541
+ $metadata: deserializeMetadata(output),
542
+ });
543
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
544
+ if (data.accountType != null) {
545
+ contents.accountType = __expectString(data.accountType);
546
+ }
547
+ if (data.teamId != null) {
548
+ contents.teamId = __expectString(data.teamId);
549
+ }
550
+ if (data.teamName != null) {
551
+ contents.teamName = __expectString(data.teamName);
552
+ }
553
+ return contents;
554
+ };
555
+ const deserializeAws_restJson1RegisterSlackWorkspaceForOrganizationCommandError = async (output, context) => {
556
+ const parsedOutput = {
557
+ ...output,
558
+ body: await parseErrorBody(output.body, context),
559
+ };
560
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
561
+ switch (errorCode) {
562
+ case "AccessDeniedException":
563
+ case "com.amazonaws.supportapp#AccessDeniedException":
564
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
565
+ case "ConflictException":
566
+ case "com.amazonaws.supportapp#ConflictException":
567
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
568
+ case "InternalServerException":
569
+ case "com.amazonaws.supportapp#InternalServerException":
570
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
571
+ case "ResourceNotFoundException":
572
+ case "com.amazonaws.supportapp#ResourceNotFoundException":
573
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
574
+ case "ValidationException":
575
+ case "com.amazonaws.supportapp#ValidationException":
576
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
577
+ default:
578
+ const parsedBody = parsedOutput.body;
579
+ throwDefaultError({
580
+ output,
581
+ parsedBody,
582
+ exceptionCtor: __BaseException,
583
+ errorCode,
584
+ });
585
+ }
586
+ };
515
587
  export const deserializeAws_restJson1UpdateSlackChannelConfigurationCommand = async (output, context) => {
516
588
  if (output.statusCode !== 200 && output.statusCode >= 300) {
517
589
  return deserializeAws_restJson1UpdateSlackChannelConfigurationCommandError(output, context);
@@ -676,7 +748,9 @@ const deserializeAws_restJson1slackChannelConfigurationList = (output, context)
676
748
  };
677
749
  const deserializeAws_restJson1SlackWorkspaceConfiguration = (output, context) => {
678
750
  return {
751
+ allowOrganizationMemberAccount: __expectBoolean(output.allowOrganizationMemberAccount),
679
752
  teamId: __expectString(output.teamId),
753
+ teamName: __expectString(output.teamName),
680
754
  };
681
755
  };
682
756
  const deserializeAws_restJson1SlackWorkspaceConfigurationList = (output, context) => {
@@ -1,10 +1,10 @@
1
1
  import { parseUrl } from "@aws-sdk/url-parser";
2
- import { defaultRegionInfoProvider } from "./endpoints";
2
+ import { defaultEndpointResolver } from "./endpoint/endpointResolver";
3
3
  export const getRuntimeConfig = (config) => ({
4
4
  apiVersion: "2021-08-20",
5
5
  disableHostPrefix: config?.disableHostPrefix ?? false,
6
+ endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
6
7
  logger: config?.logger ?? {},
7
- regionInfoProvider: config?.regionInfoProvider ?? defaultRegionInfoProvider,
8
8
  serviceId: config?.serviceId ?? "Support App",
9
9
  urlParser: config?.urlParser ?? parseUrl,
10
10
  });
@@ -7,6 +7,7 @@ import { GetAccountAliasCommandInput, GetAccountAliasCommandOutput } from "./com
7
7
  import { ListSlackChannelConfigurationsCommandInput, ListSlackChannelConfigurationsCommandOutput } from "./commands/ListSlackChannelConfigurationsCommand";
8
8
  import { ListSlackWorkspaceConfigurationsCommandInput, ListSlackWorkspaceConfigurationsCommandOutput } from "./commands/ListSlackWorkspaceConfigurationsCommand";
9
9
  import { PutAccountAliasCommandInput, PutAccountAliasCommandOutput } from "./commands/PutAccountAliasCommand";
10
+ import { RegisterSlackWorkspaceForOrganizationCommandInput, RegisterSlackWorkspaceForOrganizationCommandOutput } from "./commands/RegisterSlackWorkspaceForOrganizationCommand";
10
11
  import { UpdateSlackChannelConfigurationCommandInput, UpdateSlackChannelConfigurationCommandOutput } from "./commands/UpdateSlackChannelConfigurationCommand";
11
12
  import { SupportAppClient } from "./SupportAppClient";
12
13
  /**
@@ -53,7 +54,6 @@ import { SupportAppClient } from "./SupportAppClient";
53
54
  * <p>You can also use the Amazon Web Services Management Console instead of the Amazon Web Services Support App API to manage your Slack
54
55
  * configurations. For more information, see <a href="https://docs.aws.amazon.com/awssupport/latest/user/authorize-slack-workspace.html">Authorize a
55
56
  * Slack workspace to enable the Amazon Web Services Support App</a>.</p>
56
- *
57
57
  * <note>
58
58
  * <ul>
59
59
  * <li>
@@ -141,6 +141,41 @@ export declare class SupportApp extends SupportAppClient {
141
141
  putAccountAlias(args: PutAccountAliasCommandInput, options?: __HttpHandlerOptions): Promise<PutAccountAliasCommandOutput>;
142
142
  putAccountAlias(args: PutAccountAliasCommandInput, cb: (err: any, data?: PutAccountAliasCommandOutput) => void): void;
143
143
  putAccountAlias(args: PutAccountAliasCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: PutAccountAliasCommandOutput) => void): void;
144
+ /**
145
+ * <p>Registers a Slack workspace for your Amazon Web Services account. To call this API, your account must be
146
+ * part of an organization in Organizations.</p>
147
+ * <p>If you're the <i>management account</i> and you want to register Slack
148
+ * workspaces for your organization, you must complete the following tasks:</p>
149
+ * <ol>
150
+ * <li>
151
+ * <p>Sign in to the <a href="https://console.aws.amazon.com/support/app">Amazon Web Services Support Center</a> and
152
+ * authorize the Slack workspaces where you want your organization to have access to. See
153
+ * <a href="https://docs.aws.amazon.com/awssupport/latest/user/authorize-slack-workspace.html">Authorize a Slack workspace</a> in the <i>Amazon Web Services Support User
154
+ * Guide</i>.</p>
155
+ * </li>
156
+ * <li>
157
+ * <p>Call the <code>RegisterSlackWorkspaceForOrganization</code> API to authorize each
158
+ * Slack workspace for the organization.</p>
159
+ * </li>
160
+ * </ol>
161
+ * <p>After the management account authorizes the Slack workspace, member accounts can call this
162
+ * API to authorize the same Slack workspace for their individual accounts. Member accounts don't
163
+ * need to authorize the Slack workspace manually through the <a href="https://console.aws.amazon.com/support/app">Amazon Web Services Support Center</a>.</p>
164
+ * <p>To use the Amazon Web Services Support App, each account must then complete the following tasks:</p>
165
+ * <ul>
166
+ * <li>
167
+ * <p>Create an Identity and Access Management (IAM) role with the required permission. For more information,
168
+ * see <a href="https://docs.aws.amazon.com/awssupport/latest/user/support-app-permissions.html">Managing access to the Amazon Web Services Support App</a>.</p>
169
+ * </li>
170
+ * <li>
171
+ * <p>Configure a Slack channel to use the Amazon Web Services Support App for support cases for that account. For
172
+ * more information, see <a href="https://docs.aws.amazon.com/awssupport/latest/user/add-your-slack-channel.html">Configuring a Slack channel</a>.</p>
173
+ * </li>
174
+ * </ul>
175
+ */
176
+ registerSlackWorkspaceForOrganization(args: RegisterSlackWorkspaceForOrganizationCommandInput, options?: __HttpHandlerOptions): Promise<RegisterSlackWorkspaceForOrganizationCommandOutput>;
177
+ registerSlackWorkspaceForOrganization(args: RegisterSlackWorkspaceForOrganizationCommandInput, cb: (err: any, data?: RegisterSlackWorkspaceForOrganizationCommandOutput) => void): void;
178
+ registerSlackWorkspaceForOrganization(args: RegisterSlackWorkspaceForOrganizationCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: RegisterSlackWorkspaceForOrganizationCommandOutput) => void): void;
144
179
  /**
145
180
  * <p>Updates the configuration for a Slack channel, such as case update notifications.</p>
146
181
  */