@aws-sdk/client-mq 3.354.0 → 3.358.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/README.md +8 -0
- package/dist-cjs/Mq.js +2 -0
- package/dist-cjs/commands/PromoteCommand.js +46 -0
- package/dist-cjs/commands/index.js +1 -0
- package/dist-cjs/endpoint/ruleset.js +3 -3
- package/dist-cjs/models/models_0.js +10 -1
- package/dist-cjs/protocols/Aws_restJson1.js +108 -14
- package/dist-es/Mq.js +2 -0
- package/dist-es/commands/PromoteCommand.js +42 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/endpoint/ruleset.js +3 -3
- package/dist-es/models/models_0.js +9 -0
- package/dist-es/protocols/Aws_restJson1.js +99 -7
- package/dist-types/Mq.d.ts +7 -0
- package/dist-types/MqClient.d.ts +4 -3
- package/dist-types/commands/CreateBrokerCommand.d.ts +9 -6
- package/dist-types/commands/CreateConfigurationCommand.d.ts +3 -3
- package/dist-types/commands/CreateUserCommand.d.ts +2 -1
- package/dist-types/commands/DescribeBrokerCommand.d.ts +24 -8
- package/dist-types/commands/DescribeBrokerEngineTypesCommand.d.ts +1 -1
- package/dist-types/commands/DescribeBrokerInstanceOptionsCommand.d.ts +3 -3
- package/dist-types/commands/DescribeConfigurationCommand.d.ts +2 -2
- package/dist-types/commands/DescribeUserCommand.d.ts +2 -1
- package/dist-types/commands/ListBrokersCommand.d.ts +3 -3
- package/dist-types/commands/ListConfigurationsCommand.d.ts +2 -2
- package/dist-types/commands/ListUsersCommand.d.ts +1 -1
- package/dist-types/commands/PromoteCommand.d.ts +86 -0
- package/dist-types/commands/UpdateBrokerCommand.d.ts +21 -4
- package/dist-types/commands/UpdateConfigurationCommand.d.ts +1 -1
- package/dist-types/commands/UpdateUserCommand.d.ts +1 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +166 -30
- package/dist-types/protocols/Aws_restJson1.d.ts +9 -0
- package/dist-types/ts3.4/Mq.d.ts +17 -0
- package/dist-types/ts3.4/MqClient.d.ts +6 -0
- package/dist-types/ts3.4/commands/PromoteCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +42 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +12 -0
- package/package.json +28 -28
package/README.md
CHANGED
|
@@ -346,6 +346,14 @@ ListUsers
|
|
|
346
346
|
|
|
347
347
|
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-mq/classes/listuserscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-mq/interfaces/listuserscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-mq/interfaces/listuserscommandoutput.html)
|
|
348
348
|
|
|
349
|
+
</details>
|
|
350
|
+
<details>
|
|
351
|
+
<summary>
|
|
352
|
+
Promote
|
|
353
|
+
</summary>
|
|
354
|
+
|
|
355
|
+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-mq/classes/promotecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-mq/interfaces/promotecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-mq/interfaces/promotecommandoutput.html)
|
|
356
|
+
|
|
349
357
|
</details>
|
|
350
358
|
<details>
|
|
351
359
|
<summary>
|
package/dist-cjs/Mq.js
CHANGED
|
@@ -20,6 +20,7 @@ const ListConfigurationRevisionsCommand_1 = require("./commands/ListConfiguratio
|
|
|
20
20
|
const ListConfigurationsCommand_1 = require("./commands/ListConfigurationsCommand");
|
|
21
21
|
const ListTagsCommand_1 = require("./commands/ListTagsCommand");
|
|
22
22
|
const ListUsersCommand_1 = require("./commands/ListUsersCommand");
|
|
23
|
+
const PromoteCommand_1 = require("./commands/PromoteCommand");
|
|
23
24
|
const RebootBrokerCommand_1 = require("./commands/RebootBrokerCommand");
|
|
24
25
|
const UpdateBrokerCommand_1 = require("./commands/UpdateBrokerCommand");
|
|
25
26
|
const UpdateConfigurationCommand_1 = require("./commands/UpdateConfigurationCommand");
|
|
@@ -44,6 +45,7 @@ const commands = {
|
|
|
44
45
|
ListConfigurationsCommand: ListConfigurationsCommand_1.ListConfigurationsCommand,
|
|
45
46
|
ListTagsCommand: ListTagsCommand_1.ListTagsCommand,
|
|
46
47
|
ListUsersCommand: ListUsersCommand_1.ListUsersCommand,
|
|
48
|
+
PromoteCommand: PromoteCommand_1.PromoteCommand,
|
|
47
49
|
RebootBrokerCommand: RebootBrokerCommand_1.RebootBrokerCommand,
|
|
48
50
|
UpdateBrokerCommand: UpdateBrokerCommand_1.UpdateBrokerCommand,
|
|
49
51
|
UpdateConfigurationCommand: UpdateConfigurationCommand_1.UpdateConfigurationCommand,
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PromoteCommand = exports.$Command = void 0;
|
|
4
|
+
const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint");
|
|
5
|
+
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
6
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
8
|
+
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
9
|
+
class PromoteCommand extends smithy_client_1.Command {
|
|
10
|
+
static getEndpointParameterInstructions() {
|
|
11
|
+
return {
|
|
12
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
13
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
14
|
+
Region: { type: "builtInParams", name: "region" },
|
|
15
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
constructor(input) {
|
|
19
|
+
super();
|
|
20
|
+
this.input = input;
|
|
21
|
+
}
|
|
22
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
23
|
+
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
|
24
|
+
this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, PromoteCommand.getEndpointParameterInstructions()));
|
|
25
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
26
|
+
const { logger } = configuration;
|
|
27
|
+
const clientName = "MqClient";
|
|
28
|
+
const commandName = "PromoteCommand";
|
|
29
|
+
const handlerExecutionContext = {
|
|
30
|
+
logger,
|
|
31
|
+
clientName,
|
|
32
|
+
commandName,
|
|
33
|
+
inputFilterSensitiveLog: (_) => _,
|
|
34
|
+
outputFilterSensitiveLog: (_) => _,
|
|
35
|
+
};
|
|
36
|
+
const { requestHandler } = configuration;
|
|
37
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
38
|
+
}
|
|
39
|
+
serialize(input, context) {
|
|
40
|
+
return (0, Aws_restJson1_1.se_PromoteCommand)(input, context);
|
|
41
|
+
}
|
|
42
|
+
deserialize(output, context) {
|
|
43
|
+
return (0, Aws_restJson1_1.de_PromoteCommand)(output, context);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.PromoteCommand = PromoteCommand;
|
|
@@ -19,6 +19,7 @@ tslib_1.__exportStar(require("./ListConfigurationRevisionsCommand"), exports);
|
|
|
19
19
|
tslib_1.__exportStar(require("./ListConfigurationsCommand"), exports);
|
|
20
20
|
tslib_1.__exportStar(require("./ListTagsCommand"), exports);
|
|
21
21
|
tslib_1.__exportStar(require("./ListUsersCommand"), exports);
|
|
22
|
+
tslib_1.__exportStar(require("./PromoteCommand"), exports);
|
|
22
23
|
tslib_1.__exportStar(require("./RebootBrokerCommand"), exports);
|
|
23
24
|
tslib_1.__exportStar(require("./UpdateBrokerCommand"), exports);
|
|
24
25
|
tslib_1.__exportStar(require("./UpdateConfigurationCommand"), exports);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ruleSet = void 0;
|
|
4
|
-
const
|
|
5
|
-
const a = "
|
|
6
|
-
const _data = { version: "1.0", parameters: { Region:
|
|
4
|
+
const q = "required", r = "fn", s = "argv", t = "ref";
|
|
5
|
+
const a = "isSet", b = "tree", c = "error", d = "endpoint", e = "PartitionResult", f = { [q]: false, "type": "String" }, g = { [q]: true, "default": false, "type": "Boolean" }, h = { [t]: "Endpoint" }, i = { [r]: "booleanEquals", [s]: [{ [t]: "UseFIPS" }, true] }, j = { [r]: "booleanEquals", [s]: [{ [t]: "UseDualStack" }, true] }, k = {}, l = { [r]: "booleanEquals", [s]: [true, { [r]: "getAttr", [s]: [{ [t]: e }, "supportsFIPS"] }] }, m = { [r]: "booleanEquals", [s]: [true, { [r]: "getAttr", [s]: [{ [t]: e }, "supportsDualStack"] }] }, n = [i], o = [j], p = [{ [t]: "Region" }];
|
|
6
|
+
const _data = { version: "1.0", parameters: { Region: f, UseDualStack: g, UseFIPS: g, Endpoint: f }, rules: [{ conditions: [{ [r]: a, [s]: [h] }], type: b, rules: [{ conditions: n, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, { type: b, rules: [{ conditions: o, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: h, properties: k, headers: k }, type: d }] }] }, { type: b, rules: [{ conditions: [{ [r]: a, [s]: p }], type: b, rules: [{ conditions: [{ [r]: "aws.partition", [s]: p, assign: e }], type: b, rules: [{ conditions: [i, j], type: b, rules: [{ conditions: [l, m], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://mq-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }] }, { conditions: n, type: b, rules: [{ conditions: [l], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://mq-fips.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: o, type: b, rules: [{ conditions: [m], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://mq.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { type: b, rules: [{ endpoint: { url: "https://mq.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }] }, { error: "Invalid Configuration: Missing Region", type: c }] }] };
|
|
7
7
|
exports.ruleSet = _data;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NotFoundException = exports.UnauthorizedException = exports.InternalServerErrorException = exports.ForbiddenException = exports.DayOfWeek = exports.ConflictException = exports.BadRequestException = exports.ChangeType = exports.SanitizationWarningReason = exports.AuthenticationStrategy = exports.BrokerState = exports.DeploymentMode = exports.BrokerStorageType = exports.EngineType = void 0;
|
|
3
|
+
exports.PromoteMode = exports.NotFoundException = exports.UnauthorizedException = exports.InternalServerErrorException = exports.ForbiddenException = exports.DayOfWeek = exports.DataReplicationMode = exports.ConflictException = exports.BadRequestException = exports.ChangeType = exports.SanitizationWarningReason = exports.AuthenticationStrategy = exports.BrokerState = exports.DeploymentMode = exports.BrokerStorageType = exports.EngineType = void 0;
|
|
4
4
|
const MqServiceException_1 = require("./MqServiceException");
|
|
5
5
|
exports.EngineType = {
|
|
6
6
|
ACTIVEMQ: "ACTIVEMQ",
|
|
@@ -21,6 +21,7 @@ exports.BrokerState = {
|
|
|
21
21
|
CRITICAL_ACTION_REQUIRED: "CRITICAL_ACTION_REQUIRED",
|
|
22
22
|
DELETION_IN_PROGRESS: "DELETION_IN_PROGRESS",
|
|
23
23
|
REBOOT_IN_PROGRESS: "REBOOT_IN_PROGRESS",
|
|
24
|
+
REPLICA: "REPLICA",
|
|
24
25
|
RUNNING: "RUNNING",
|
|
25
26
|
};
|
|
26
27
|
exports.AuthenticationStrategy = {
|
|
@@ -67,6 +68,10 @@ class ConflictException extends MqServiceException_1.MqServiceException {
|
|
|
67
68
|
}
|
|
68
69
|
}
|
|
69
70
|
exports.ConflictException = ConflictException;
|
|
71
|
+
exports.DataReplicationMode = {
|
|
72
|
+
CRDR: "CRDR",
|
|
73
|
+
NONE: "NONE",
|
|
74
|
+
};
|
|
70
75
|
exports.DayOfWeek = {
|
|
71
76
|
FRIDAY: "FRIDAY",
|
|
72
77
|
MONDAY: "MONDAY",
|
|
@@ -136,3 +141,7 @@ class NotFoundException extends MqServiceException_1.MqServiceException {
|
|
|
136
141
|
}
|
|
137
142
|
}
|
|
138
143
|
exports.NotFoundException = NotFoundException;
|
|
144
|
+
exports.PromoteMode = {
|
|
145
|
+
FAILOVER: "FAILOVER",
|
|
146
|
+
SWITCHOVER: "SWITCHOVER",
|
|
147
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_UpdateUserCommand = exports.de_UpdateConfigurationCommand = exports.de_UpdateBrokerCommand = exports.de_RebootBrokerCommand = exports.de_ListUsersCommand = exports.de_ListTagsCommand = exports.de_ListConfigurationsCommand = exports.de_ListConfigurationRevisionsCommand = exports.de_ListBrokersCommand = exports.de_DescribeUserCommand = exports.de_DescribeConfigurationRevisionCommand = exports.de_DescribeConfigurationCommand = exports.de_DescribeBrokerInstanceOptionsCommand = exports.de_DescribeBrokerEngineTypesCommand = exports.de_DescribeBrokerCommand = exports.de_DeleteUserCommand = exports.de_DeleteTagsCommand = exports.de_DeleteBrokerCommand = exports.de_CreateUserCommand = exports.de_CreateTagsCommand = exports.de_CreateConfigurationCommand = exports.de_CreateBrokerCommand = exports.se_UpdateUserCommand = exports.se_UpdateConfigurationCommand = exports.se_UpdateBrokerCommand = exports.se_RebootBrokerCommand = exports.se_ListUsersCommand = exports.se_ListTagsCommand = exports.se_ListConfigurationsCommand = exports.se_ListConfigurationRevisionsCommand = exports.se_ListBrokersCommand = exports.se_DescribeUserCommand = exports.se_DescribeConfigurationRevisionCommand = exports.se_DescribeConfigurationCommand = exports.se_DescribeBrokerInstanceOptionsCommand = exports.se_DescribeBrokerEngineTypesCommand = exports.se_DescribeBrokerCommand = exports.se_DeleteUserCommand = exports.se_DeleteTagsCommand = exports.se_DeleteBrokerCommand = exports.se_CreateUserCommand = exports.se_CreateTagsCommand = exports.se_CreateConfigurationCommand = exports.se_CreateBrokerCommand = void 0;
|
|
3
|
+
exports.de_UpdateUserCommand = exports.de_UpdateConfigurationCommand = exports.de_UpdateBrokerCommand = exports.de_RebootBrokerCommand = exports.de_PromoteCommand = exports.de_ListUsersCommand = exports.de_ListTagsCommand = exports.de_ListConfigurationsCommand = exports.de_ListConfigurationRevisionsCommand = exports.de_ListBrokersCommand = exports.de_DescribeUserCommand = exports.de_DescribeConfigurationRevisionCommand = exports.de_DescribeConfigurationCommand = exports.de_DescribeBrokerInstanceOptionsCommand = exports.de_DescribeBrokerEngineTypesCommand = exports.de_DescribeBrokerCommand = exports.de_DeleteUserCommand = exports.de_DeleteTagsCommand = exports.de_DeleteBrokerCommand = exports.de_CreateUserCommand = exports.de_CreateTagsCommand = exports.de_CreateConfigurationCommand = exports.de_CreateBrokerCommand = exports.se_UpdateUserCommand = exports.se_UpdateConfigurationCommand = exports.se_UpdateBrokerCommand = exports.se_RebootBrokerCommand = exports.se_PromoteCommand = exports.se_ListUsersCommand = exports.se_ListTagsCommand = exports.se_ListConfigurationsCommand = exports.se_ListConfigurationRevisionsCommand = exports.se_ListBrokersCommand = exports.se_DescribeUserCommand = exports.se_DescribeConfigurationRevisionCommand = exports.se_DescribeConfigurationCommand = exports.se_DescribeBrokerInstanceOptionsCommand = exports.se_DescribeBrokerEngineTypesCommand = exports.se_DescribeBrokerCommand = exports.se_DeleteUserCommand = exports.se_DeleteTagsCommand = exports.se_DeleteBrokerCommand = exports.se_CreateUserCommand = exports.se_CreateTagsCommand = exports.se_CreateConfigurationCommand = exports.se_CreateBrokerCommand = void 0;
|
|
4
4
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
5
5
|
const protocol_http_1 = require("@smithy/protocol-http");
|
|
6
6
|
const uuid_1 = require("uuid");
|
|
@@ -19,6 +19,8 @@ const se_CreateBrokerCommand = async (input, context) => {
|
|
|
19
19
|
brokerName: [, , `BrokerName`],
|
|
20
20
|
configuration: [, (_) => se_ConfigurationId(_, context), `Configuration`],
|
|
21
21
|
creatorRequestId: [true, (_) => _ ?? (0, uuid_1.v4)(), `CreatorRequestId`],
|
|
22
|
+
dataReplicationMode: [, , `DataReplicationMode`],
|
|
23
|
+
dataReplicationPrimaryBrokerArn: [, , `DataReplicationPrimaryBrokerArn`],
|
|
22
24
|
deploymentMode: [, , `DeploymentMode`],
|
|
23
25
|
encryptionOptions: [, (_) => se_EncryptionOptions(_, context), `EncryptionOptions`],
|
|
24
26
|
engineType: [, , `EngineType`],
|
|
@@ -105,6 +107,7 @@ const se_CreateUserCommand = async (input, context) => {
|
|
|
105
107
|
consoleAccess: [, , `ConsoleAccess`],
|
|
106
108
|
groups: [, (_) => (0, smithy_client_1._json)(_), `Groups`],
|
|
107
109
|
password: [, , `Password`],
|
|
110
|
+
replicationUser: [, , `ReplicationUser`],
|
|
108
111
|
}));
|
|
109
112
|
return new protocol_http_1.HttpRequest({
|
|
110
113
|
protocol,
|
|
@@ -397,6 +400,28 @@ const se_ListUsersCommand = async (input, context) => {
|
|
|
397
400
|
});
|
|
398
401
|
};
|
|
399
402
|
exports.se_ListUsersCommand = se_ListUsersCommand;
|
|
403
|
+
const se_PromoteCommand = async (input, context) => {
|
|
404
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
405
|
+
const headers = {
|
|
406
|
+
"content-type": "application/json",
|
|
407
|
+
};
|
|
408
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/brokers/{BrokerId}/promote";
|
|
409
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "BrokerId", () => input.BrokerId, "{BrokerId}", false);
|
|
410
|
+
let body;
|
|
411
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
412
|
+
mode: [, , `Mode`],
|
|
413
|
+
}));
|
|
414
|
+
return new protocol_http_1.HttpRequest({
|
|
415
|
+
protocol,
|
|
416
|
+
hostname,
|
|
417
|
+
port,
|
|
418
|
+
method: "POST",
|
|
419
|
+
headers,
|
|
420
|
+
path: resolvedPath,
|
|
421
|
+
body,
|
|
422
|
+
});
|
|
423
|
+
};
|
|
424
|
+
exports.se_PromoteCommand = se_PromoteCommand;
|
|
400
425
|
const se_RebootBrokerCommand = async (input, context) => {
|
|
401
426
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
402
427
|
const headers = {};
|
|
@@ -426,6 +451,7 @@ const se_UpdateBrokerCommand = async (input, context) => {
|
|
|
426
451
|
authenticationStrategy: [, , `AuthenticationStrategy`],
|
|
427
452
|
autoMinorVersionUpgrade: [, , `AutoMinorVersionUpgrade`],
|
|
428
453
|
configuration: [, (_) => se_ConfigurationId(_, context), `Configuration`],
|
|
454
|
+
dataReplicationMode: [, , `DataReplicationMode`],
|
|
429
455
|
engineVersion: [, , `EngineVersion`],
|
|
430
456
|
hostInstanceType: [, , `HostInstanceType`],
|
|
431
457
|
ldapServerMetadata: [, (_) => se_LdapServerMetadataInput(_, context), `LdapServerMetadata`],
|
|
@@ -480,6 +506,7 @@ const se_UpdateUserCommand = async (input, context) => {
|
|
|
480
506
|
consoleAccess: [, , `ConsoleAccess`],
|
|
481
507
|
groups: [, (_) => (0, smithy_client_1._json)(_), `Groups`],
|
|
482
508
|
password: [, , `Password`],
|
|
509
|
+
replicationUser: [, , `ReplicationUser`],
|
|
483
510
|
}));
|
|
484
511
|
return new protocol_http_1.HttpRequest({
|
|
485
512
|
protocol,
|
|
@@ -594,7 +621,7 @@ const de_CreateTagsCommand = async (output, context) => {
|
|
|
594
621
|
const contents = (0, smithy_client_1.map)({
|
|
595
622
|
$metadata: deserializeMetadata(output),
|
|
596
623
|
});
|
|
597
|
-
await collectBody(output.body, context);
|
|
624
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
598
625
|
return contents;
|
|
599
626
|
};
|
|
600
627
|
exports.de_CreateTagsCommand = de_CreateTagsCommand;
|
|
@@ -633,7 +660,7 @@ const de_CreateUserCommand = async (output, context) => {
|
|
|
633
660
|
const contents = (0, smithy_client_1.map)({
|
|
634
661
|
$metadata: deserializeMetadata(output),
|
|
635
662
|
});
|
|
636
|
-
await collectBody(output.body, context);
|
|
663
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
637
664
|
return contents;
|
|
638
665
|
};
|
|
639
666
|
exports.de_CreateUserCommand = de_CreateUserCommand;
|
|
@@ -718,7 +745,7 @@ const de_DeleteTagsCommand = async (output, context) => {
|
|
|
718
745
|
const contents = (0, smithy_client_1.map)({
|
|
719
746
|
$metadata: deserializeMetadata(output),
|
|
720
747
|
});
|
|
721
|
-
await collectBody(output.body, context);
|
|
748
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
722
749
|
return contents;
|
|
723
750
|
};
|
|
724
751
|
exports.de_DeleteTagsCommand = de_DeleteTagsCommand;
|
|
@@ -757,7 +784,7 @@ const de_DeleteUserCommand = async (output, context) => {
|
|
|
757
784
|
const contents = (0, smithy_client_1.map)({
|
|
758
785
|
$metadata: deserializeMetadata(output),
|
|
759
786
|
});
|
|
760
|
-
await collectBody(output.body, context);
|
|
787
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
761
788
|
return contents;
|
|
762
789
|
};
|
|
763
790
|
exports.de_DeleteUserCommand = de_DeleteUserCommand;
|
|
@@ -808,6 +835,8 @@ const de_DescribeBrokerCommand = async (output, context) => {
|
|
|
808
835
|
BrokerState: [, smithy_client_1.expectString, `brokerState`],
|
|
809
836
|
Configurations: [, (_) => de_Configurations(_, context), `configurations`],
|
|
810
837
|
Created: [, (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)), `created`],
|
|
838
|
+
DataReplicationMetadata: [, (_) => de_DataReplicationMetadataOutput(_, context), `dataReplicationMetadata`],
|
|
839
|
+
DataReplicationMode: [, smithy_client_1.expectString, `dataReplicationMode`],
|
|
811
840
|
DeploymentMode: [, smithy_client_1.expectString, `deploymentMode`],
|
|
812
841
|
EncryptionOptions: [, (_) => de_EncryptionOptions(_, context), `encryptionOptions`],
|
|
813
842
|
EngineType: [, smithy_client_1.expectString, `engineType`],
|
|
@@ -817,6 +846,12 @@ const de_DescribeBrokerCommand = async (output, context) => {
|
|
|
817
846
|
Logs: [, (_) => de_LogsSummary(_, context), `logs`],
|
|
818
847
|
MaintenanceWindowStartTime: [, (_) => de_WeeklyStartTime(_, context), `maintenanceWindowStartTime`],
|
|
819
848
|
PendingAuthenticationStrategy: [, smithy_client_1.expectString, `pendingAuthenticationStrategy`],
|
|
849
|
+
PendingDataReplicationMetadata: [
|
|
850
|
+
,
|
|
851
|
+
(_) => de_DataReplicationMetadataOutput(_, context),
|
|
852
|
+
`pendingDataReplicationMetadata`,
|
|
853
|
+
],
|
|
854
|
+
PendingDataReplicationMode: [, smithy_client_1.expectString, `pendingDataReplicationMode`],
|
|
820
855
|
PendingEngineVersion: [, smithy_client_1.expectString, `pendingEngineVersion`],
|
|
821
856
|
PendingHostInstanceType: [, smithy_client_1.expectString, `pendingHostInstanceType`],
|
|
822
857
|
PendingLdapServerMetadata: [, (_) => de_LdapServerMetadataOutput(_, context), `pendingLdapServerMetadata`],
|
|
@@ -1055,6 +1090,7 @@ const de_DescribeUserCommand = async (output, context) => {
|
|
|
1055
1090
|
ConsoleAccess: [, smithy_client_1.expectBoolean, `consoleAccess`],
|
|
1056
1091
|
Groups: [, smithy_client_1._json, `groups`],
|
|
1057
1092
|
Pending: [, (_) => de_UserPendingChanges(_, context), `pending`],
|
|
1093
|
+
ReplicationUser: [, smithy_client_1.expectBoolean, `replicationUser`],
|
|
1058
1094
|
Username: [, smithy_client_1.expectString, `username`],
|
|
1059
1095
|
});
|
|
1060
1096
|
Object.assign(contents, doc);
|
|
@@ -1307,6 +1343,49 @@ const de_ListUsersCommandError = async (output, context) => {
|
|
|
1307
1343
|
});
|
|
1308
1344
|
}
|
|
1309
1345
|
};
|
|
1346
|
+
const de_PromoteCommand = async (output, context) => {
|
|
1347
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1348
|
+
return de_PromoteCommandError(output, context);
|
|
1349
|
+
}
|
|
1350
|
+
const contents = (0, smithy_client_1.map)({
|
|
1351
|
+
$metadata: deserializeMetadata(output),
|
|
1352
|
+
});
|
|
1353
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1354
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1355
|
+
BrokerId: [, smithy_client_1.expectString, `brokerId`],
|
|
1356
|
+
});
|
|
1357
|
+
Object.assign(contents, doc);
|
|
1358
|
+
return contents;
|
|
1359
|
+
};
|
|
1360
|
+
exports.de_PromoteCommand = de_PromoteCommand;
|
|
1361
|
+
const de_PromoteCommandError = async (output, context) => {
|
|
1362
|
+
const parsedOutput = {
|
|
1363
|
+
...output,
|
|
1364
|
+
body: await parseErrorBody(output.body, context),
|
|
1365
|
+
};
|
|
1366
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1367
|
+
switch (errorCode) {
|
|
1368
|
+
case "BadRequestException":
|
|
1369
|
+
case "com.amazonaws.mq#BadRequestException":
|
|
1370
|
+
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
1371
|
+
case "ForbiddenException":
|
|
1372
|
+
case "com.amazonaws.mq#ForbiddenException":
|
|
1373
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
1374
|
+
case "InternalServerErrorException":
|
|
1375
|
+
case "com.amazonaws.mq#InternalServerErrorException":
|
|
1376
|
+
throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
|
|
1377
|
+
case "NotFoundException":
|
|
1378
|
+
case "com.amazonaws.mq#NotFoundException":
|
|
1379
|
+
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1380
|
+
default:
|
|
1381
|
+
const parsedBody = parsedOutput.body;
|
|
1382
|
+
return throwDefaultError({
|
|
1383
|
+
output,
|
|
1384
|
+
parsedBody,
|
|
1385
|
+
errorCode,
|
|
1386
|
+
});
|
|
1387
|
+
}
|
|
1388
|
+
};
|
|
1310
1389
|
const de_RebootBrokerCommand = async (output, context) => {
|
|
1311
1390
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1312
1391
|
return de_RebootBrokerCommandError(output, context);
|
|
@@ -1314,7 +1393,7 @@ const de_RebootBrokerCommand = async (output, context) => {
|
|
|
1314
1393
|
const contents = (0, smithy_client_1.map)({
|
|
1315
1394
|
$metadata: deserializeMetadata(output),
|
|
1316
1395
|
});
|
|
1317
|
-
await collectBody(output.body, context);
|
|
1396
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1318
1397
|
return contents;
|
|
1319
1398
|
};
|
|
1320
1399
|
exports.de_RebootBrokerCommand = de_RebootBrokerCommand;
|
|
@@ -1359,11 +1438,19 @@ const de_UpdateBrokerCommand = async (output, context) => {
|
|
|
1359
1438
|
AutoMinorVersionUpgrade: [, smithy_client_1.expectBoolean, `autoMinorVersionUpgrade`],
|
|
1360
1439
|
BrokerId: [, smithy_client_1.expectString, `brokerId`],
|
|
1361
1440
|
Configuration: [, (_) => de_ConfigurationId(_, context), `configuration`],
|
|
1441
|
+
DataReplicationMetadata: [, (_) => de_DataReplicationMetadataOutput(_, context), `dataReplicationMetadata`],
|
|
1442
|
+
DataReplicationMode: [, smithy_client_1.expectString, `dataReplicationMode`],
|
|
1362
1443
|
EngineVersion: [, smithy_client_1.expectString, `engineVersion`],
|
|
1363
1444
|
HostInstanceType: [, smithy_client_1.expectString, `hostInstanceType`],
|
|
1364
1445
|
LdapServerMetadata: [, (_) => de_LdapServerMetadataOutput(_, context), `ldapServerMetadata`],
|
|
1365
1446
|
Logs: [, (_) => de_Logs(_, context), `logs`],
|
|
1366
1447
|
MaintenanceWindowStartTime: [, (_) => de_WeeklyStartTime(_, context), `maintenanceWindowStartTime`],
|
|
1448
|
+
PendingDataReplicationMetadata: [
|
|
1449
|
+
,
|
|
1450
|
+
(_) => de_DataReplicationMetadataOutput(_, context),
|
|
1451
|
+
`pendingDataReplicationMetadata`,
|
|
1452
|
+
],
|
|
1453
|
+
PendingDataReplicationMode: [, smithy_client_1.expectString, `pendingDataReplicationMode`],
|
|
1367
1454
|
SecurityGroups: [, smithy_client_1._json, `securityGroups`],
|
|
1368
1455
|
});
|
|
1369
1456
|
Object.assign(contents, doc);
|
|
@@ -1459,7 +1546,7 @@ const de_UpdateUserCommand = async (output, context) => {
|
|
|
1459
1546
|
const contents = (0, smithy_client_1.map)({
|
|
1460
1547
|
$metadata: deserializeMetadata(output),
|
|
1461
1548
|
});
|
|
1462
|
-
await collectBody(output.body, context);
|
|
1549
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1463
1550
|
return contents;
|
|
1464
1551
|
};
|
|
1465
1552
|
exports.de_UpdateUserCommand = de_UpdateUserCommand;
|
|
@@ -1624,6 +1711,7 @@ const se_User = (input, context) => {
|
|
|
1624
1711
|
consoleAccess: [, , `ConsoleAccess`],
|
|
1625
1712
|
groups: [, smithy_client_1._json, `Groups`],
|
|
1626
1713
|
password: [, , `Password`],
|
|
1714
|
+
replicationUser: [, , `ReplicationUser`],
|
|
1627
1715
|
username: [, , `Username`],
|
|
1628
1716
|
});
|
|
1629
1717
|
};
|
|
@@ -1810,6 +1898,18 @@ const de_Configurations = (output, context) => {
|
|
|
1810
1898
|
Pending: [, (_) => de_ConfigurationId(_, context), `pending`],
|
|
1811
1899
|
});
|
|
1812
1900
|
};
|
|
1901
|
+
const de_DataReplicationCounterpart = (output, context) => {
|
|
1902
|
+
return (0, smithy_client_1.take)(output, {
|
|
1903
|
+
BrokerId: [, smithy_client_1.expectString, `brokerId`],
|
|
1904
|
+
Region: [, smithy_client_1.expectString, `region`],
|
|
1905
|
+
});
|
|
1906
|
+
};
|
|
1907
|
+
const de_DataReplicationMetadataOutput = (output, context) => {
|
|
1908
|
+
return (0, smithy_client_1.take)(output, {
|
|
1909
|
+
DataReplicationCounterpart: [, (_) => de_DataReplicationCounterpart(_, context), `dataReplicationCounterpart`],
|
|
1910
|
+
DataReplicationRole: [, smithy_client_1.expectString, `dataReplicationRole`],
|
|
1911
|
+
});
|
|
1912
|
+
};
|
|
1813
1913
|
const de_EncryptionOptions = (output, context) => {
|
|
1814
1914
|
return (0, smithy_client_1.take)(output, {
|
|
1815
1915
|
KmsKeyId: [, smithy_client_1.expectString, `kmsKeyId`],
|
|
@@ -1889,13 +1989,7 @@ const deserializeMetadata = (output) => ({
|
|
|
1889
1989
|
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1890
1990
|
cfId: output.headers["x-amz-cf-id"],
|
|
1891
1991
|
});
|
|
1892
|
-
const
|
|
1893
|
-
if (streamBody instanceof Uint8Array) {
|
|
1894
|
-
return Promise.resolve(streamBody);
|
|
1895
|
-
}
|
|
1896
|
-
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1897
|
-
};
|
|
1898
|
-
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1992
|
+
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1899
1993
|
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
1900
1994
|
value !== null &&
|
|
1901
1995
|
value !== "" &&
|
package/dist-es/Mq.js
CHANGED
|
@@ -17,6 +17,7 @@ import { ListConfigurationRevisionsCommand, } from "./commands/ListConfiguration
|
|
|
17
17
|
import { ListConfigurationsCommand, } from "./commands/ListConfigurationsCommand";
|
|
18
18
|
import { ListTagsCommand } from "./commands/ListTagsCommand";
|
|
19
19
|
import { ListUsersCommand } from "./commands/ListUsersCommand";
|
|
20
|
+
import { PromoteCommand } from "./commands/PromoteCommand";
|
|
20
21
|
import { RebootBrokerCommand, } from "./commands/RebootBrokerCommand";
|
|
21
22
|
import { UpdateBrokerCommand, } from "./commands/UpdateBrokerCommand";
|
|
22
23
|
import { UpdateConfigurationCommand, } from "./commands/UpdateConfigurationCommand";
|
|
@@ -41,6 +42,7 @@ const commands = {
|
|
|
41
42
|
ListConfigurationsCommand,
|
|
42
43
|
ListTagsCommand,
|
|
43
44
|
ListUsersCommand,
|
|
45
|
+
PromoteCommand,
|
|
44
46
|
RebootBrokerCommand,
|
|
45
47
|
UpdateBrokerCommand,
|
|
46
48
|
UpdateConfigurationCommand,
|
|
@@ -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 { de_PromoteCommand, se_PromoteCommand } from "../protocols/Aws_restJson1";
|
|
5
|
+
export { $Command };
|
|
6
|
+
export class PromoteCommand extends $Command {
|
|
7
|
+
static getEndpointParameterInstructions() {
|
|
8
|
+
return {
|
|
9
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
10
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
11
|
+
Region: { type: "builtInParams", name: "region" },
|
|
12
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
constructor(input) {
|
|
16
|
+
super();
|
|
17
|
+
this.input = input;
|
|
18
|
+
}
|
|
19
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
20
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
21
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, PromoteCommand.getEndpointParameterInstructions()));
|
|
22
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
23
|
+
const { logger } = configuration;
|
|
24
|
+
const clientName = "MqClient";
|
|
25
|
+
const commandName = "PromoteCommand";
|
|
26
|
+
const handlerExecutionContext = {
|
|
27
|
+
logger,
|
|
28
|
+
clientName,
|
|
29
|
+
commandName,
|
|
30
|
+
inputFilterSensitiveLog: (_) => _,
|
|
31
|
+
outputFilterSensitiveLog: (_) => _,
|
|
32
|
+
};
|
|
33
|
+
const { requestHandler } = configuration;
|
|
34
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
35
|
+
}
|
|
36
|
+
serialize(input, context) {
|
|
37
|
+
return se_PromoteCommand(input, context);
|
|
38
|
+
}
|
|
39
|
+
deserialize(output, context) {
|
|
40
|
+
return de_PromoteCommand(output, context);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -16,6 +16,7 @@ export * from "./ListConfigurationRevisionsCommand";
|
|
|
16
16
|
export * from "./ListConfigurationsCommand";
|
|
17
17
|
export * from "./ListTagsCommand";
|
|
18
18
|
export * from "./ListUsersCommand";
|
|
19
|
+
export * from "./PromoteCommand";
|
|
19
20
|
export * from "./RebootBrokerCommand";
|
|
20
21
|
export * from "./UpdateBrokerCommand";
|
|
21
22
|
export * from "./UpdateConfigurationCommand";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
2
|
-
const a = "
|
|
3
|
-
const _data = { version: "1.0", parameters: { Region:
|
|
1
|
+
const q = "required", r = "fn", s = "argv", t = "ref";
|
|
2
|
+
const a = "isSet", b = "tree", c = "error", d = "endpoint", e = "PartitionResult", f = { [q]: false, "type": "String" }, g = { [q]: true, "default": false, "type": "Boolean" }, h = { [t]: "Endpoint" }, i = { [r]: "booleanEquals", [s]: [{ [t]: "UseFIPS" }, true] }, j = { [r]: "booleanEquals", [s]: [{ [t]: "UseDualStack" }, true] }, k = {}, l = { [r]: "booleanEquals", [s]: [true, { [r]: "getAttr", [s]: [{ [t]: e }, "supportsFIPS"] }] }, m = { [r]: "booleanEquals", [s]: [true, { [r]: "getAttr", [s]: [{ [t]: e }, "supportsDualStack"] }] }, n = [i], o = [j], p = [{ [t]: "Region" }];
|
|
3
|
+
const _data = { version: "1.0", parameters: { Region: f, UseDualStack: g, UseFIPS: g, Endpoint: f }, rules: [{ conditions: [{ [r]: a, [s]: [h] }], type: b, rules: [{ conditions: n, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, { type: b, rules: [{ conditions: o, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: h, properties: k, headers: k }, type: d }] }] }, { type: b, rules: [{ conditions: [{ [r]: a, [s]: p }], type: b, rules: [{ conditions: [{ [r]: "aws.partition", [s]: p, assign: e }], type: b, rules: [{ conditions: [i, j], type: b, rules: [{ conditions: [l, m], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://mq-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }] }, { conditions: n, type: b, rules: [{ conditions: [l], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://mq-fips.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: o, type: b, rules: [{ conditions: [m], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://mq.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { type: b, rules: [{ endpoint: { url: "https://mq.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }] }, { error: "Invalid Configuration: Missing Region", type: c }] }] };
|
|
4
4
|
export const ruleSet = _data;
|
|
@@ -18,6 +18,7 @@ export const BrokerState = {
|
|
|
18
18
|
CRITICAL_ACTION_REQUIRED: "CRITICAL_ACTION_REQUIRED",
|
|
19
19
|
DELETION_IN_PROGRESS: "DELETION_IN_PROGRESS",
|
|
20
20
|
REBOOT_IN_PROGRESS: "REBOOT_IN_PROGRESS",
|
|
21
|
+
REPLICA: "REPLICA",
|
|
21
22
|
RUNNING: "RUNNING",
|
|
22
23
|
};
|
|
23
24
|
export const AuthenticationStrategy = {
|
|
@@ -62,6 +63,10 @@ export class ConflictException extends __BaseException {
|
|
|
62
63
|
this.Message = opts.Message;
|
|
63
64
|
}
|
|
64
65
|
}
|
|
66
|
+
export const DataReplicationMode = {
|
|
67
|
+
CRDR: "CRDR",
|
|
68
|
+
NONE: "NONE",
|
|
69
|
+
};
|
|
65
70
|
export const DayOfWeek = {
|
|
66
71
|
FRIDAY: "FRIDAY",
|
|
67
72
|
MONDAY: "MONDAY",
|
|
@@ -127,3 +132,7 @@ export class NotFoundException extends __BaseException {
|
|
|
127
132
|
this.Message = opts.Message;
|
|
128
133
|
}
|
|
129
134
|
}
|
|
135
|
+
export const PromoteMode = {
|
|
136
|
+
FAILOVER: "FAILOVER",
|
|
137
|
+
SWITCHOVER: "SWITCHOVER",
|
|
138
|
+
};
|