@aws-sdk/client-mq 3.353.0 → 3.357.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 (40) hide show
  1. package/README.md +8 -0
  2. package/dist-cjs/Mq.js +2 -0
  3. package/dist-cjs/commands/PromoteCommand.js +46 -0
  4. package/dist-cjs/commands/index.js +1 -0
  5. package/dist-cjs/endpoint/ruleset.js +3 -3
  6. package/dist-cjs/models/models_0.js +10 -1
  7. package/dist-cjs/protocols/Aws_restJson1.js +108 -14
  8. package/dist-es/Mq.js +2 -0
  9. package/dist-es/commands/PromoteCommand.js +42 -0
  10. package/dist-es/commands/index.js +1 -0
  11. package/dist-es/endpoint/ruleset.js +3 -3
  12. package/dist-es/models/models_0.js +9 -0
  13. package/dist-es/protocols/Aws_restJson1.js +99 -7
  14. package/dist-types/Mq.d.ts +7 -0
  15. package/dist-types/MqClient.d.ts +4 -3
  16. package/dist-types/commands/CreateBrokerCommand.d.ts +9 -6
  17. package/dist-types/commands/CreateConfigurationCommand.d.ts +3 -3
  18. package/dist-types/commands/CreateUserCommand.d.ts +2 -1
  19. package/dist-types/commands/DescribeBrokerCommand.d.ts +24 -8
  20. package/dist-types/commands/DescribeBrokerEngineTypesCommand.d.ts +1 -1
  21. package/dist-types/commands/DescribeBrokerInstanceOptionsCommand.d.ts +3 -3
  22. package/dist-types/commands/DescribeConfigurationCommand.d.ts +2 -2
  23. package/dist-types/commands/DescribeUserCommand.d.ts +2 -1
  24. package/dist-types/commands/ListBrokersCommand.d.ts +3 -3
  25. package/dist-types/commands/ListConfigurationsCommand.d.ts +2 -2
  26. package/dist-types/commands/ListUsersCommand.d.ts +1 -1
  27. package/dist-types/commands/PromoteCommand.d.ts +86 -0
  28. package/dist-types/commands/UpdateBrokerCommand.d.ts +21 -4
  29. package/dist-types/commands/UpdateConfigurationCommand.d.ts +1 -1
  30. package/dist-types/commands/UpdateUserCommand.d.ts +1 -0
  31. package/dist-types/commands/index.d.ts +1 -0
  32. package/dist-types/models/models_0.d.ts +166 -30
  33. package/dist-types/protocols/Aws_restJson1.d.ts +9 -0
  34. package/dist-types/ts3.4/Mq.d.ts +17 -0
  35. package/dist-types/ts3.4/MqClient.d.ts +6 -0
  36. package/dist-types/ts3.4/commands/PromoteCommand.d.ts +35 -0
  37. package/dist-types/ts3.4/commands/index.d.ts +1 -0
  38. package/dist-types/ts3.4/models/models_0.d.ts +42 -0
  39. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +12 -0
  40. package/package.json +28 -28
@@ -1,4 +1,4 @@
1
- import { _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, take, withBaseException, } from "@aws-sdk/smithy-client";
1
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, take, withBaseException, } from "@aws-sdk/smithy-client";
2
2
  import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
3
  import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { BadRequestException, ConflictException, ForbiddenException, InternalServerErrorException, NotFoundException, UnauthorizedException, } from "../models/models_0";
@@ -16,6 +16,8 @@ export const se_CreateBrokerCommand = async (input, context) => {
16
16
  brokerName: [, , `BrokerName`],
17
17
  configuration: [, (_) => se_ConfigurationId(_, context), `Configuration`],
18
18
  creatorRequestId: [true, (_) => _ ?? generateIdempotencyToken(), `CreatorRequestId`],
19
+ dataReplicationMode: [, , `DataReplicationMode`],
20
+ dataReplicationPrimaryBrokerArn: [, , `DataReplicationPrimaryBrokerArn`],
19
21
  deploymentMode: [, , `DeploymentMode`],
20
22
  encryptionOptions: [, (_) => se_EncryptionOptions(_, context), `EncryptionOptions`],
21
23
  engineType: [, , `EngineType`],
@@ -99,6 +101,7 @@ export const se_CreateUserCommand = async (input, context) => {
99
101
  consoleAccess: [, , `ConsoleAccess`],
100
102
  groups: [, (_) => _json(_), `Groups`],
101
103
  password: [, , `Password`],
104
+ replicationUser: [, , `ReplicationUser`],
102
105
  }));
103
106
  return new __HttpRequest({
104
107
  protocol,
@@ -376,6 +379,27 @@ export const se_ListUsersCommand = async (input, context) => {
376
379
  body,
377
380
  });
378
381
  };
382
+ export const se_PromoteCommand = async (input, context) => {
383
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
384
+ const headers = {
385
+ "content-type": "application/json",
386
+ };
387
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/brokers/{BrokerId}/promote";
388
+ resolvedPath = __resolvedPath(resolvedPath, input, "BrokerId", () => input.BrokerId, "{BrokerId}", false);
389
+ let body;
390
+ body = JSON.stringify(take(input, {
391
+ mode: [, , `Mode`],
392
+ }));
393
+ return new __HttpRequest({
394
+ protocol,
395
+ hostname,
396
+ port,
397
+ method: "POST",
398
+ headers,
399
+ path: resolvedPath,
400
+ body,
401
+ });
402
+ };
379
403
  export const se_RebootBrokerCommand = async (input, context) => {
380
404
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
381
405
  const headers = {};
@@ -404,6 +428,7 @@ export const se_UpdateBrokerCommand = async (input, context) => {
404
428
  authenticationStrategy: [, , `AuthenticationStrategy`],
405
429
  autoMinorVersionUpgrade: [, , `AutoMinorVersionUpgrade`],
406
430
  configuration: [, (_) => se_ConfigurationId(_, context), `Configuration`],
431
+ dataReplicationMode: [, , `DataReplicationMode`],
407
432
  engineVersion: [, , `EngineVersion`],
408
433
  hostInstanceType: [, , `HostInstanceType`],
409
434
  ldapServerMetadata: [, (_) => se_LdapServerMetadataInput(_, context), `LdapServerMetadata`],
@@ -456,6 +481,7 @@ export const se_UpdateUserCommand = async (input, context) => {
456
481
  consoleAccess: [, , `ConsoleAccess`],
457
482
  groups: [, (_) => _json(_), `Groups`],
458
483
  password: [, , `Password`],
484
+ replicationUser: [, , `ReplicationUser`],
459
485
  }));
460
486
  return new __HttpRequest({
461
487
  protocol,
@@ -776,6 +802,8 @@ export const de_DescribeBrokerCommand = async (output, context) => {
776
802
  BrokerState: [, __expectString, `brokerState`],
777
803
  Configurations: [, (_) => de_Configurations(_, context), `configurations`],
778
804
  Created: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `created`],
805
+ DataReplicationMetadata: [, (_) => de_DataReplicationMetadataOutput(_, context), `dataReplicationMetadata`],
806
+ DataReplicationMode: [, __expectString, `dataReplicationMode`],
779
807
  DeploymentMode: [, __expectString, `deploymentMode`],
780
808
  EncryptionOptions: [, (_) => de_EncryptionOptions(_, context), `encryptionOptions`],
781
809
  EngineType: [, __expectString, `engineType`],
@@ -785,6 +813,12 @@ export const de_DescribeBrokerCommand = async (output, context) => {
785
813
  Logs: [, (_) => de_LogsSummary(_, context), `logs`],
786
814
  MaintenanceWindowStartTime: [, (_) => de_WeeklyStartTime(_, context), `maintenanceWindowStartTime`],
787
815
  PendingAuthenticationStrategy: [, __expectString, `pendingAuthenticationStrategy`],
816
+ PendingDataReplicationMetadata: [
817
+ ,
818
+ (_) => de_DataReplicationMetadataOutput(_, context),
819
+ `pendingDataReplicationMetadata`,
820
+ ],
821
+ PendingDataReplicationMode: [, __expectString, `pendingDataReplicationMode`],
788
822
  PendingEngineVersion: [, __expectString, `pendingEngineVersion`],
789
823
  PendingHostInstanceType: [, __expectString, `pendingHostInstanceType`],
790
824
  PendingLdapServerMetadata: [, (_) => de_LdapServerMetadataOutput(_, context), `pendingLdapServerMetadata`],
@@ -1018,6 +1052,7 @@ export const de_DescribeUserCommand = async (output, context) => {
1018
1052
  ConsoleAccess: [, __expectBoolean, `consoleAccess`],
1019
1053
  Groups: [, _json, `groups`],
1020
1054
  Pending: [, (_) => de_UserPendingChanges(_, context), `pending`],
1055
+ ReplicationUser: [, __expectBoolean, `replicationUser`],
1021
1056
  Username: [, __expectString, `username`],
1022
1057
  });
1023
1058
  Object.assign(contents, doc);
@@ -1264,6 +1299,48 @@ const de_ListUsersCommandError = async (output, context) => {
1264
1299
  });
1265
1300
  }
1266
1301
  };
1302
+ export const de_PromoteCommand = async (output, context) => {
1303
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1304
+ return de_PromoteCommandError(output, context);
1305
+ }
1306
+ const contents = map({
1307
+ $metadata: deserializeMetadata(output),
1308
+ });
1309
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1310
+ const doc = take(data, {
1311
+ BrokerId: [, __expectString, `brokerId`],
1312
+ });
1313
+ Object.assign(contents, doc);
1314
+ return contents;
1315
+ };
1316
+ const de_PromoteCommandError = async (output, context) => {
1317
+ const parsedOutput = {
1318
+ ...output,
1319
+ body: await parseErrorBody(output.body, context),
1320
+ };
1321
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1322
+ switch (errorCode) {
1323
+ case "BadRequestException":
1324
+ case "com.amazonaws.mq#BadRequestException":
1325
+ throw await de_BadRequestExceptionRes(parsedOutput, context);
1326
+ case "ForbiddenException":
1327
+ case "com.amazonaws.mq#ForbiddenException":
1328
+ throw await de_ForbiddenExceptionRes(parsedOutput, context);
1329
+ case "InternalServerErrorException":
1330
+ case "com.amazonaws.mq#InternalServerErrorException":
1331
+ throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1332
+ case "NotFoundException":
1333
+ case "com.amazonaws.mq#NotFoundException":
1334
+ throw await de_NotFoundExceptionRes(parsedOutput, context);
1335
+ default:
1336
+ const parsedBody = parsedOutput.body;
1337
+ return throwDefaultError({
1338
+ output,
1339
+ parsedBody,
1340
+ errorCode,
1341
+ });
1342
+ }
1343
+ };
1267
1344
  export const de_RebootBrokerCommand = async (output, context) => {
1268
1345
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1269
1346
  return de_RebootBrokerCommandError(output, context);
@@ -1315,11 +1392,19 @@ export const de_UpdateBrokerCommand = async (output, context) => {
1315
1392
  AutoMinorVersionUpgrade: [, __expectBoolean, `autoMinorVersionUpgrade`],
1316
1393
  BrokerId: [, __expectString, `brokerId`],
1317
1394
  Configuration: [, (_) => de_ConfigurationId(_, context), `configuration`],
1395
+ DataReplicationMetadata: [, (_) => de_DataReplicationMetadataOutput(_, context), `dataReplicationMetadata`],
1396
+ DataReplicationMode: [, __expectString, `dataReplicationMode`],
1318
1397
  EngineVersion: [, __expectString, `engineVersion`],
1319
1398
  HostInstanceType: [, __expectString, `hostInstanceType`],
1320
1399
  LdapServerMetadata: [, (_) => de_LdapServerMetadataOutput(_, context), `ldapServerMetadata`],
1321
1400
  Logs: [, (_) => de_Logs(_, context), `logs`],
1322
1401
  MaintenanceWindowStartTime: [, (_) => de_WeeklyStartTime(_, context), `maintenanceWindowStartTime`],
1402
+ PendingDataReplicationMetadata: [
1403
+ ,
1404
+ (_) => de_DataReplicationMetadataOutput(_, context),
1405
+ `pendingDataReplicationMetadata`,
1406
+ ],
1407
+ PendingDataReplicationMode: [, __expectString, `pendingDataReplicationMode`],
1323
1408
  SecurityGroups: [, _json, `securityGroups`],
1324
1409
  });
1325
1410
  Object.assign(contents, doc);
@@ -1577,6 +1662,7 @@ const se_User = (input, context) => {
1577
1662
  consoleAccess: [, , `ConsoleAccess`],
1578
1663
  groups: [, _json, `Groups`],
1579
1664
  password: [, , `Password`],
1665
+ replicationUser: [, , `ReplicationUser`],
1580
1666
  username: [, , `Username`],
1581
1667
  });
1582
1668
  };
@@ -1763,6 +1849,18 @@ const de_Configurations = (output, context) => {
1763
1849
  Pending: [, (_) => de_ConfigurationId(_, context), `pending`],
1764
1850
  });
1765
1851
  };
1852
+ const de_DataReplicationCounterpart = (output, context) => {
1853
+ return take(output, {
1854
+ BrokerId: [, __expectString, `brokerId`],
1855
+ Region: [, __expectString, `region`],
1856
+ });
1857
+ };
1858
+ const de_DataReplicationMetadataOutput = (output, context) => {
1859
+ return take(output, {
1860
+ DataReplicationCounterpart: [, (_) => de_DataReplicationCounterpart(_, context), `dataReplicationCounterpart`],
1861
+ DataReplicationRole: [, __expectString, `dataReplicationRole`],
1862
+ });
1863
+ };
1766
1864
  const de_EncryptionOptions = (output, context) => {
1767
1865
  return take(output, {
1768
1866
  KmsKeyId: [, __expectString, `kmsKeyId`],
@@ -1842,12 +1940,6 @@ const deserializeMetadata = (output) => ({
1842
1940
  extendedRequestId: output.headers["x-amz-id-2"],
1843
1941
  cfId: output.headers["x-amz-cf-id"],
1844
1942
  });
1845
- const collectBody = (streamBody = new Uint8Array(), context) => {
1846
- if (streamBody instanceof Uint8Array) {
1847
- return Promise.resolve(streamBody);
1848
- }
1849
- return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
1850
- };
1851
1943
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1852
1944
  const isSerializableHeaderValue = (value) => value !== undefined &&
1853
1945
  value !== null &&
@@ -17,6 +17,7 @@ import { ListConfigurationRevisionsCommandInput, ListConfigurationRevisionsComma
17
17
  import { ListConfigurationsCommandInput, ListConfigurationsCommandOutput } from "./commands/ListConfigurationsCommand";
18
18
  import { ListTagsCommandInput, ListTagsCommandOutput } from "./commands/ListTagsCommand";
19
19
  import { ListUsersCommandInput, ListUsersCommandOutput } from "./commands/ListUsersCommand";
20
+ import { PromoteCommandInput, PromoteCommandOutput } from "./commands/PromoteCommand";
20
21
  import { RebootBrokerCommandInput, RebootBrokerCommandOutput } from "./commands/RebootBrokerCommand";
21
22
  import { UpdateBrokerCommandInput, UpdateBrokerCommandOutput } from "./commands/UpdateBrokerCommand";
22
23
  import { UpdateConfigurationCommandInput, UpdateConfigurationCommandOutput } from "./commands/UpdateConfigurationCommand";
@@ -131,6 +132,12 @@ export interface Mq {
131
132
  listUsers(args: ListUsersCommandInput, options?: __HttpHandlerOptions): Promise<ListUsersCommandOutput>;
132
133
  listUsers(args: ListUsersCommandInput, cb: (err: any, data?: ListUsersCommandOutput) => void): void;
133
134
  listUsers(args: ListUsersCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListUsersCommandOutput) => void): void;
135
+ /**
136
+ * @see {@link PromoteCommand}
137
+ */
138
+ promote(args: PromoteCommandInput, options?: __HttpHandlerOptions): Promise<PromoteCommandOutput>;
139
+ promote(args: PromoteCommandInput, cb: (err: any, data?: PromoteCommandOutput) => void): void;
140
+ promote(args: PromoteCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: PromoteCommandOutput) => void): void;
134
141
  /**
135
142
  * @see {@link RebootBrokerCommand}
136
143
  */
@@ -26,6 +26,7 @@ import { ListConfigurationRevisionsCommandInput, ListConfigurationRevisionsComma
26
26
  import { ListConfigurationsCommandInput, ListConfigurationsCommandOutput } from "./commands/ListConfigurationsCommand";
27
27
  import { ListTagsCommandInput, ListTagsCommandOutput } from "./commands/ListTagsCommand";
28
28
  import { ListUsersCommandInput, ListUsersCommandOutput } from "./commands/ListUsersCommand";
29
+ import { PromoteCommandInput, PromoteCommandOutput } from "./commands/PromoteCommand";
29
30
  import { RebootBrokerCommandInput, RebootBrokerCommandOutput } from "./commands/RebootBrokerCommand";
30
31
  import { UpdateBrokerCommandInput, UpdateBrokerCommandOutput } from "./commands/UpdateBrokerCommand";
31
32
  import { UpdateConfigurationCommandInput, UpdateConfigurationCommandOutput } from "./commands/UpdateConfigurationCommand";
@@ -35,11 +36,11 @@ export { __Client };
35
36
  /**
36
37
  * @public
37
38
  */
38
- export type ServiceInputTypes = CreateBrokerCommandInput | CreateConfigurationCommandInput | CreateTagsCommandInput | CreateUserCommandInput | DeleteBrokerCommandInput | DeleteTagsCommandInput | DeleteUserCommandInput | DescribeBrokerCommandInput | DescribeBrokerEngineTypesCommandInput | DescribeBrokerInstanceOptionsCommandInput | DescribeConfigurationCommandInput | DescribeConfigurationRevisionCommandInput | DescribeUserCommandInput | ListBrokersCommandInput | ListConfigurationRevisionsCommandInput | ListConfigurationsCommandInput | ListTagsCommandInput | ListUsersCommandInput | RebootBrokerCommandInput | UpdateBrokerCommandInput | UpdateConfigurationCommandInput | UpdateUserCommandInput;
39
+ export type ServiceInputTypes = CreateBrokerCommandInput | CreateConfigurationCommandInput | CreateTagsCommandInput | CreateUserCommandInput | DeleteBrokerCommandInput | DeleteTagsCommandInput | DeleteUserCommandInput | DescribeBrokerCommandInput | DescribeBrokerEngineTypesCommandInput | DescribeBrokerInstanceOptionsCommandInput | DescribeConfigurationCommandInput | DescribeConfigurationRevisionCommandInput | DescribeUserCommandInput | ListBrokersCommandInput | ListConfigurationRevisionsCommandInput | ListConfigurationsCommandInput | ListTagsCommandInput | ListUsersCommandInput | PromoteCommandInput | RebootBrokerCommandInput | UpdateBrokerCommandInput | UpdateConfigurationCommandInput | UpdateUserCommandInput;
39
40
  /**
40
41
  * @public
41
42
  */
42
- export type ServiceOutputTypes = CreateBrokerCommandOutput | CreateConfigurationCommandOutput | CreateTagsCommandOutput | CreateUserCommandOutput | DeleteBrokerCommandOutput | DeleteTagsCommandOutput | DeleteUserCommandOutput | DescribeBrokerCommandOutput | DescribeBrokerEngineTypesCommandOutput | DescribeBrokerInstanceOptionsCommandOutput | DescribeConfigurationCommandOutput | DescribeConfigurationRevisionCommandOutput | DescribeUserCommandOutput | ListBrokersCommandOutput | ListConfigurationRevisionsCommandOutput | ListConfigurationsCommandOutput | ListTagsCommandOutput | ListUsersCommandOutput | RebootBrokerCommandOutput | UpdateBrokerCommandOutput | UpdateConfigurationCommandOutput | UpdateUserCommandOutput;
43
+ export type ServiceOutputTypes = CreateBrokerCommandOutput | CreateConfigurationCommandOutput | CreateTagsCommandOutput | CreateUserCommandOutput | DeleteBrokerCommandOutput | DeleteTagsCommandOutput | DeleteUserCommandOutput | DescribeBrokerCommandOutput | DescribeBrokerEngineTypesCommandOutput | DescribeBrokerInstanceOptionsCommandOutput | DescribeConfigurationCommandOutput | DescribeConfigurationRevisionCommandOutput | DescribeUserCommandOutput | ListBrokersCommandOutput | ListConfigurationRevisionsCommandOutput | ListConfigurationsCommandOutput | ListTagsCommandOutput | ListUsersCommandOutput | PromoteCommandOutput | RebootBrokerCommandOutput | UpdateBrokerCommandOutput | UpdateConfigurationCommandOutput | UpdateUserCommandOutput;
43
44
  /**
44
45
  * @public
45
46
  */
@@ -95,7 +96,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
95
96
  */
96
97
  runtime?: string;
97
98
  /**
98
- * Disable dyanamically changing the endpoint of the client based on the hostPrefix
99
+ * Disable dynamically changing the endpoint of the client based on the hostPrefix
99
100
  * trait of an operation.
100
101
  */
101
102
  disableHostPrefix?: boolean;
@@ -23,7 +23,7 @@ export interface CreateBrokerCommandOutput extends CreateBrokerResponse, __Metad
23
23
  }
24
24
  /**
25
25
  * @public
26
- * <p>Creates a broker. Note: This API is asynchronous.</p> <p>To create a broker, you must either use the AmazonMQFullAccess IAM policy or include the following EC2 permissions in your IAM policy.</p> <ul><li><p>ec2:CreateNetworkInterface</p> <p>This permission is required to allow Amazon MQ to create an elastic network interface (ENI) on behalf of your account.</p></li> <li><p>ec2:CreateNetworkInterfacePermission</p> <p>This permission is required to attach the ENI to the broker instance.</p></li> <li><p>ec2:DeleteNetworkInterface</p></li> <li><p>ec2:DeleteNetworkInterfacePermission</p></li> <li><p>ec2:DetachNetworkInterface</p></li> <li><p>ec2:DescribeInternetGateways</p></li> <li><p>ec2:DescribeNetworkInterfaces</p></li> <li><p>ec2:DescribeNetworkInterfacePermissions</p></li> <li><p>ec2:DescribeRouteTables</p></li> <li><p>ec2:DescribeSecurityGroups</p></li> <li><p>ec2:DescribeSubnets</p></li> <li><p>ec2:DescribeVpcs</p></li></ul> <p>For more information, see <a href="https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/amazon-mq-setting-up.html#create-iam-user">Create an IAM User and Get Your AWS Credentials</a> and <a href="https://docs.aws.amazon.com/amazon-mq/latest/developer-guide/connecting-to-amazon-mq.html#never-modify-delete-elastic-network-interface">Never Modify or Delete the Amazon MQ Elastic Network Interface</a> in the <i>Amazon MQ Developer Guide</i>.</p>
26
+ * <p>Creates a broker. Note: This API is asynchronous.</p> <p>To create a broker, you must either use the AmazonMQFullAccess IAM policy or include the following EC2 permissions in your IAM policy.</p> <ul><li><p>ec2:CreateNetworkInterface</p> <p>This permission is required to allow Amazon MQ to create an elastic network interface (ENI) on behalf of your account.</p></li> <li><p>ec2:CreateNetworkInterfacePermission</p> <p>This permission is required to attach the ENI to the broker instance.</p></li> <li><p>ec2:DeleteNetworkInterface</p></li> <li><p>ec2:DeleteNetworkInterfacePermission</p></li> <li><p>ec2:DetachNetworkInterface</p></li> <li><p>ec2:DescribeInternetGateways</p></li> <li><p>ec2:DescribeNetworkInterfaces</p></li> <li><p>ec2:DescribeNetworkInterfacePermissions</p></li> <li><p>ec2:DescribeRouteTables</p></li> <li><p>ec2:DescribeSecurityGroups</p></li> <li><p>ec2:DescribeSubnets</p></li> <li><p>ec2:DescribeVpcs</p></li></ul> <p>For more information, see <a href="https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/amazon-mq-setting-up.html#create-iam-user">Create an IAM User and Get Your Amazon Web Services Credentials</a> and <a href="https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/connecting-to-amazon-mq.html#never-modify-delete-elastic-network-interface">Never Modify or Delete the Amazon MQ Elastic Network Interface</a> in the <i>Amazon MQ Developer Guide</i>.</p>
27
27
  * @example
28
28
  * Use a bare-bones client and the command you need to make an API call.
29
29
  * ```javascript
@@ -31,7 +31,7 @@ export interface CreateBrokerCommandOutput extends CreateBrokerResponse, __Metad
31
31
  * // const { MqClient, CreateBrokerCommand } = require("@aws-sdk/client-mq"); // CommonJS import
32
32
  * const client = new MqClient(config);
33
33
  * const input = { // CreateBrokerRequest
34
- * AuthenticationStrategy: "STRING_VALUE",
34
+ * AuthenticationStrategy: "SIMPLE" || "LDAP",
35
35
  * AutoMinorVersionUpgrade: true || false, // required
36
36
  * BrokerName: "STRING_VALUE", // required
37
37
  * Configuration: { // ConfigurationId
@@ -39,12 +39,12 @@ export interface CreateBrokerCommandOutput extends CreateBrokerResponse, __Metad
39
39
  * Revision: Number("int"),
40
40
  * },
41
41
  * CreatorRequestId: "STRING_VALUE",
42
- * DeploymentMode: "STRING_VALUE", // required
42
+ * DeploymentMode: "SINGLE_INSTANCE" || "ACTIVE_STANDBY_MULTI_AZ" || "CLUSTER_MULTI_AZ", // required
43
43
  * EncryptionOptions: { // EncryptionOptions
44
44
  * KmsKeyId: "STRING_VALUE",
45
45
  * UseAwsOwnedKey: true || false, // required
46
46
  * },
47
- * EngineType: "STRING_VALUE", // required
47
+ * EngineType: "ACTIVEMQ" || "RABBITMQ", // required
48
48
  * EngineVersion: "STRING_VALUE", // required
49
49
  * HostInstanceType: "STRING_VALUE", // required
50
50
  * LdapServerMetadata: { // LdapServerMetadataInput
@@ -67,7 +67,7 @@ export interface CreateBrokerCommandOutput extends CreateBrokerResponse, __Metad
67
67
  * General: true || false,
68
68
  * },
69
69
  * MaintenanceWindowStartTime: { // WeeklyStartTime
70
- * DayOfWeek: "STRING_VALUE", // required
70
+ * DayOfWeek: "MONDAY" || "TUESDAY" || "WEDNESDAY" || "THURSDAY" || "FRIDAY" || "SATURDAY" || "SUNDAY", // required
71
71
  * TimeOfDay: "STRING_VALUE", // required
72
72
  * TimeZone: "STRING_VALUE",
73
73
  * },
@@ -75,7 +75,7 @@ export interface CreateBrokerCommandOutput extends CreateBrokerResponse, __Metad
75
75
  * SecurityGroups: [
76
76
  * "STRING_VALUE",
77
77
  * ],
78
- * StorageType: "STRING_VALUE",
78
+ * StorageType: "EBS" || "EFS",
79
79
  * SubnetIds: [
80
80
  * "STRING_VALUE",
81
81
  * ],
@@ -88,8 +88,11 @@ export interface CreateBrokerCommandOutput extends CreateBrokerResponse, __Metad
88
88
  * Groups: "<__listOf__string>",
89
89
  * Password: "STRING_VALUE", // required
90
90
  * Username: "STRING_VALUE", // required
91
+ * ReplicationUser: true || false,
91
92
  * },
92
93
  * ],
94
+ * DataReplicationMode: "NONE" || "CRDR",
95
+ * DataReplicationPrimaryBrokerArn: "STRING_VALUE",
93
96
  * };
94
97
  * const command = new CreateBrokerCommand(input);
95
98
  * const response = await client.send(command);
@@ -31,8 +31,8 @@ export interface CreateConfigurationCommandOutput extends CreateConfigurationRes
31
31
  * // const { MqClient, CreateConfigurationCommand } = require("@aws-sdk/client-mq"); // CommonJS import
32
32
  * const client = new MqClient(config);
33
33
  * const input = { // CreateConfigurationRequest
34
- * AuthenticationStrategy: "STRING_VALUE",
35
- * EngineType: "STRING_VALUE", // required
34
+ * AuthenticationStrategy: "SIMPLE" || "LDAP",
35
+ * EngineType: "ACTIVEMQ" || "RABBITMQ", // required
36
36
  * EngineVersion: "STRING_VALUE", // required
37
37
  * Name: "STRING_VALUE", // required
38
38
  * Tags: { // __mapOf__string
@@ -43,7 +43,7 @@ export interface CreateConfigurationCommandOutput extends CreateConfigurationRes
43
43
  * const response = await client.send(command);
44
44
  * // { // CreateConfigurationResponse
45
45
  * // Arn: "STRING_VALUE",
46
- * // AuthenticationStrategy: "STRING_VALUE",
46
+ * // AuthenticationStrategy: "SIMPLE" || "LDAP",
47
47
  * // Created: new Date("TIMESTAMP"),
48
48
  * // Id: "STRING_VALUE",
49
49
  * // LatestRevision: { // ConfigurationRevision
@@ -23,7 +23,7 @@ export interface CreateUserCommandOutput extends CreateUserResponse, __MetadataB
23
23
  }
24
24
  /**
25
25
  * @public
26
- * <p>Creates an ActiveMQ user.</p>
26
+ * <p>Creates an ActiveMQ user.</p> <important><p>Do not add personally identifiable information (PII) or other confidential or sensitive information in broker usernames. Broker usernames are accessible to other Amazon Web Services services, including CloudWatch Logs. Broker usernames are not intended to be used for private or sensitive data.</p></important>
27
27
  * @example
28
28
  * Use a bare-bones client and the command you need to make an API call.
29
29
  * ```javascript
@@ -38,6 +38,7 @@ export interface CreateUserCommandOutput extends CreateUserResponse, __MetadataB
38
38
  * ],
39
39
  * Password: "STRING_VALUE", // required
40
40
  * Username: "STRING_VALUE", // required
41
+ * ReplicationUser: true || false,
41
42
  * };
42
43
  * const command = new CreateUserCommand(input);
43
44
  * const response = await client.send(command);
@@ -42,7 +42,7 @@ export interface DescribeBrokerCommandOutput extends DescribeBrokerResponse, __M
42
42
  * // ActionRequiredInfo: "STRING_VALUE",
43
43
  * // },
44
44
  * // ],
45
- * // AuthenticationStrategy: "STRING_VALUE",
45
+ * // AuthenticationStrategy: "SIMPLE" || "LDAP",
46
46
  * // AutoMinorVersionUpgrade: true || false,
47
47
  * // BrokerArn: "STRING_VALUE",
48
48
  * // BrokerId: "STRING_VALUE",
@@ -56,7 +56,7 @@ export interface DescribeBrokerCommandOutput extends DescribeBrokerResponse, __M
56
56
  * // },
57
57
  * // ],
58
58
  * // BrokerName: "STRING_VALUE",
59
- * // BrokerState: "STRING_VALUE",
59
+ * // BrokerState: "CREATION_IN_PROGRESS" || "CREATION_FAILED" || "DELETION_IN_PROGRESS" || "RUNNING" || "REBOOT_IN_PROGRESS" || "CRITICAL_ACTION_REQUIRED" || "REPLICA",
60
60
  * // Configurations: { // Configurations
61
61
  * // Current: { // ConfigurationId
62
62
  * // Id: "STRING_VALUE", // required
@@ -74,12 +74,12 @@ export interface DescribeBrokerCommandOutput extends DescribeBrokerResponse, __M
74
74
  * // },
75
75
  * // },
76
76
  * // Created: new Date("TIMESTAMP"),
77
- * // DeploymentMode: "STRING_VALUE",
77
+ * // DeploymentMode: "SINGLE_INSTANCE" || "ACTIVE_STANDBY_MULTI_AZ" || "CLUSTER_MULTI_AZ",
78
78
  * // EncryptionOptions: { // EncryptionOptions
79
79
  * // KmsKeyId: "STRING_VALUE",
80
80
  * // UseAwsOwnedKey: true || false, // required
81
81
  * // },
82
- * // EngineType: "STRING_VALUE",
82
+ * // EngineType: "ACTIVEMQ" || "RABBITMQ",
83
83
  * // EngineVersion: "STRING_VALUE",
84
84
  * // HostInstanceType: "STRING_VALUE",
85
85
  * // LdapServerMetadata: { // LdapServerMetadataOutput
@@ -107,11 +107,11 @@ export interface DescribeBrokerCommandOutput extends DescribeBrokerResponse, __M
107
107
  * // },
108
108
  * // },
109
109
  * // MaintenanceWindowStartTime: { // WeeklyStartTime
110
- * // DayOfWeek: "STRING_VALUE", // required
110
+ * // DayOfWeek: "MONDAY" || "TUESDAY" || "WEDNESDAY" || "THURSDAY" || "FRIDAY" || "SATURDAY" || "SUNDAY", // required
111
111
  * // TimeOfDay: "STRING_VALUE", // required
112
112
  * // TimeZone: "STRING_VALUE",
113
113
  * // },
114
- * // PendingAuthenticationStrategy: "STRING_VALUE",
114
+ * // PendingAuthenticationStrategy: "SIMPLE" || "LDAP",
115
115
  * // PendingEngineVersion: "STRING_VALUE",
116
116
  * // PendingHostInstanceType: "STRING_VALUE",
117
117
  * // PendingLdapServerMetadata: {
@@ -131,17 +131,33 @@ export interface DescribeBrokerCommandOutput extends DescribeBrokerResponse, __M
131
131
  * // PendingSecurityGroups: "<__listOf__string>",
132
132
  * // PubliclyAccessible: true || false,
133
133
  * // SecurityGroups: "<__listOf__string>",
134
- * // StorageType: "STRING_VALUE",
134
+ * // StorageType: "EBS" || "EFS",
135
135
  * // SubnetIds: "<__listOf__string>",
136
136
  * // Tags: { // __mapOf__string
137
137
  * // "<keys>": "STRING_VALUE",
138
138
  * // },
139
139
  * // Users: [ // __listOfUserSummary
140
140
  * // { // UserSummary
141
- * // PendingChange: "STRING_VALUE",
141
+ * // PendingChange: "CREATE" || "UPDATE" || "DELETE",
142
142
  * // Username: "STRING_VALUE", // required
143
143
  * // },
144
144
  * // ],
145
+ * // DataReplicationMetadata: { // DataReplicationMetadataOutput
146
+ * // DataReplicationCounterpart: { // DataReplicationCounterpart
147
+ * // BrokerId: "STRING_VALUE", // required
148
+ * // Region: "STRING_VALUE", // required
149
+ * // },
150
+ * // DataReplicationRole: "STRING_VALUE", // required
151
+ * // },
152
+ * // DataReplicationMode: "NONE" || "CRDR",
153
+ * // PendingDataReplicationMetadata: {
154
+ * // DataReplicationCounterpart: {
155
+ * // BrokerId: "STRING_VALUE", // required
156
+ * // Region: "STRING_VALUE", // required
157
+ * // },
158
+ * // DataReplicationRole: "STRING_VALUE", // required
159
+ * // },
160
+ * // PendingDataReplicationMode: "NONE" || "CRDR",
145
161
  * // };
146
162
  *
147
163
  * ```
@@ -40,7 +40,7 @@ export interface DescribeBrokerEngineTypesCommandOutput extends DescribeBrokerEn
40
40
  * // { // DescribeBrokerEngineTypesResponse
41
41
  * // BrokerEngineTypes: [ // __listOfBrokerEngineType
42
42
  * // { // BrokerEngineType
43
- * // EngineType: "STRING_VALUE",
43
+ * // EngineType: "ACTIVEMQ" || "RABBITMQ",
44
44
  * // EngineVersions: [ // __listOfEngineVersion
45
45
  * // { // EngineVersion
46
46
  * // Name: "STRING_VALUE",
@@ -47,11 +47,11 @@ export interface DescribeBrokerInstanceOptionsCommandOutput extends DescribeBrok
47
47
  * // Name: "STRING_VALUE",
48
48
  * // },
49
49
  * // ],
50
- * // EngineType: "STRING_VALUE",
50
+ * // EngineType: "ACTIVEMQ" || "RABBITMQ",
51
51
  * // HostInstanceType: "STRING_VALUE",
52
- * // StorageType: "STRING_VALUE",
52
+ * // StorageType: "EBS" || "EFS",
53
53
  * // SupportedDeploymentModes: [ // __listOfDeploymentMode
54
- * // "STRING_VALUE",
54
+ * // "SINGLE_INSTANCE" || "ACTIVE_STANDBY_MULTI_AZ" || "CLUSTER_MULTI_AZ",
55
55
  * // ],
56
56
  * // SupportedEngineVersions: [ // __listOf__string
57
57
  * // "STRING_VALUE",
@@ -37,10 +37,10 @@ export interface DescribeConfigurationCommandOutput extends DescribeConfiguratio
37
37
  * const response = await client.send(command);
38
38
  * // { // DescribeConfigurationResponse
39
39
  * // Arn: "STRING_VALUE",
40
- * // AuthenticationStrategy: "STRING_VALUE",
40
+ * // AuthenticationStrategy: "SIMPLE" || "LDAP",
41
41
  * // Created: new Date("TIMESTAMP"),
42
42
  * // Description: "STRING_VALUE",
43
- * // EngineType: "STRING_VALUE",
43
+ * // EngineType: "ACTIVEMQ" || "RABBITMQ",
44
44
  * // EngineVersion: "STRING_VALUE",
45
45
  * // Id: "STRING_VALUE",
46
46
  * // LatestRevision: { // ConfigurationRevision
@@ -47,9 +47,10 @@ export interface DescribeUserCommandOutput extends DescribeUserResponse, __Metad
47
47
  * // Groups: [
48
48
  * // "STRING_VALUE",
49
49
  * // ],
50
- * // PendingChange: "STRING_VALUE", // required
50
+ * // PendingChange: "CREATE" || "UPDATE" || "DELETE", // required
51
51
  * // },
52
52
  * // Username: "STRING_VALUE",
53
+ * // ReplicationUser: true || false,
53
54
  * // };
54
55
  *
55
56
  * ```
@@ -42,10 +42,10 @@ export interface ListBrokersCommandOutput extends ListBrokersResponse, __Metadat
42
42
  * // BrokerArn: "STRING_VALUE",
43
43
  * // BrokerId: "STRING_VALUE",
44
44
  * // BrokerName: "STRING_VALUE",
45
- * // BrokerState: "STRING_VALUE",
45
+ * // BrokerState: "CREATION_IN_PROGRESS" || "CREATION_FAILED" || "DELETION_IN_PROGRESS" || "RUNNING" || "REBOOT_IN_PROGRESS" || "CRITICAL_ACTION_REQUIRED" || "REPLICA",
46
46
  * // Created: new Date("TIMESTAMP"),
47
- * // DeploymentMode: "STRING_VALUE", // required
48
- * // EngineType: "STRING_VALUE", // required
47
+ * // DeploymentMode: "SINGLE_INSTANCE" || "ACTIVE_STANDBY_MULTI_AZ" || "CLUSTER_MULTI_AZ", // required
48
+ * // EngineType: "ACTIVEMQ" || "RABBITMQ", // required
49
49
  * // HostInstanceType: "STRING_VALUE",
50
50
  * // },
51
51
  * // ],
@@ -40,10 +40,10 @@ export interface ListConfigurationsCommandOutput extends ListConfigurationsRespo
40
40
  * // Configurations: [ // __listOfConfiguration
41
41
  * // { // Configuration
42
42
  * // Arn: "STRING_VALUE", // required
43
- * // AuthenticationStrategy: "STRING_VALUE", // required
43
+ * // AuthenticationStrategy: "SIMPLE" || "LDAP", // required
44
44
  * // Created: new Date("TIMESTAMP"), // required
45
45
  * // Description: "STRING_VALUE", // required
46
- * // EngineType: "STRING_VALUE", // required
46
+ * // EngineType: "ACTIVEMQ" || "RABBITMQ", // required
47
47
  * // EngineVersion: "STRING_VALUE", // required
48
48
  * // Id: "STRING_VALUE", // required
49
49
  * // LatestRevision: { // ConfigurationRevision
@@ -43,7 +43,7 @@ export interface ListUsersCommandOutput extends ListUsersResponse, __MetadataBea
43
43
  * // NextToken: "STRING_VALUE",
44
44
  * // Users: [ // __listOfUserSummary
45
45
  * // { // UserSummary
46
- * // PendingChange: "STRING_VALUE",
46
+ * // PendingChange: "CREATE" || "UPDATE" || "DELETE",
47
47
  * // Username: "STRING_VALUE", // required
48
48
  * // },
49
49
  * // ],
@@ -0,0 +1,86 @@
1
+ import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
2
+ import { Command as $Command } from "@aws-sdk/smithy-client";
3
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
4
+ import { PromoteRequest, PromoteResponse } from "../models/models_0";
5
+ import { MqClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../MqClient";
6
+ /**
7
+ * @public
8
+ */
9
+ export { __MetadataBearer, $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link PromoteCommand}.
14
+ */
15
+ export interface PromoteCommandInput extends PromoteRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link PromoteCommand}.
21
+ */
22
+ export interface PromoteCommandOutput extends PromoteResponse, __MetadataBearer {
23
+ }
24
+ /**
25
+ * @public
26
+ * <p>Promotes a data replication replica broker to the primary broker role.</p>
27
+ * @example
28
+ * Use a bare-bones client and the command you need to make an API call.
29
+ * ```javascript
30
+ * import { MqClient, PromoteCommand } from "@aws-sdk/client-mq"; // ES Modules import
31
+ * // const { MqClient, PromoteCommand } = require("@aws-sdk/client-mq"); // CommonJS import
32
+ * const client = new MqClient(config);
33
+ * const input = { // PromoteRequest
34
+ * BrokerId: "STRING_VALUE", // required
35
+ * Mode: "SWITCHOVER" || "FAILOVER", // required
36
+ * };
37
+ * const command = new PromoteCommand(input);
38
+ * const response = await client.send(command);
39
+ * // { // PromoteResponse
40
+ * // BrokerId: "STRING_VALUE",
41
+ * // };
42
+ *
43
+ * ```
44
+ *
45
+ * @param PromoteCommandInput - {@link PromoteCommandInput}
46
+ * @returns {@link PromoteCommandOutput}
47
+ * @see {@link PromoteCommandInput} for command's `input` shape.
48
+ * @see {@link PromoteCommandOutput} for command's `response` shape.
49
+ * @see {@link MqClientResolvedConfig | config} for MqClient's `config` shape.
50
+ *
51
+ * @throws {@link BadRequestException} (client fault)
52
+ * <p>Returns information about an error.</p>
53
+ *
54
+ * @throws {@link ForbiddenException} (client fault)
55
+ * <p>Returns information about an error.</p>
56
+ *
57
+ * @throws {@link InternalServerErrorException} (server fault)
58
+ * <p>Returns information about an error.</p>
59
+ *
60
+ * @throws {@link NotFoundException} (client fault)
61
+ * <p>Returns information about an error.</p>
62
+ *
63
+ * @throws {@link MqServiceException}
64
+ * <p>Base exception class for all service exceptions from Mq service.</p>
65
+ *
66
+ */
67
+ export declare class PromoteCommand extends $Command<PromoteCommandInput, PromoteCommandOutput, MqClientResolvedConfig> {
68
+ readonly input: PromoteCommandInput;
69
+ static getEndpointParameterInstructions(): EndpointParameterInstructions;
70
+ /**
71
+ * @public
72
+ */
73
+ constructor(input: PromoteCommandInput);
74
+ /**
75
+ * @internal
76
+ */
77
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: MqClientResolvedConfig, options?: __HttpHandlerOptions): Handler<PromoteCommandInput, PromoteCommandOutput>;
78
+ /**
79
+ * @internal
80
+ */
81
+ private serialize;
82
+ /**
83
+ * @internal
84
+ */
85
+ private deserialize;
86
+ }