Skip to content

Commit

Permalink
feat(client-mq): The Cross Region Disaster Recovery feature allows to…
Browse files Browse the repository at this point in the history
… replicate a brokers state from one region to another in order to provide customers with multi-region resiliency in the event of a regional outage.
  • Loading branch information
awstools committed Jun 21, 2023
1 parent f0ede90 commit 983be32
Show file tree
Hide file tree
Showing 23 changed files with 1,696 additions and 1,635 deletions.
8 changes: 8 additions & 0 deletions clients/client-mq/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,14 @@ ListUsers

[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)

</details>
<details>
<summary>
Promote
</summary>

[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)

</details>
<details>
<summary>
Expand Down
13 changes: 13 additions & 0 deletions clients/client-mq/src/Mq.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ import {
} from "./commands/ListConfigurationsCommand";
import { ListTagsCommand, ListTagsCommandInput, ListTagsCommandOutput } from "./commands/ListTagsCommand";
import { ListUsersCommand, ListUsersCommandInput, ListUsersCommandOutput } from "./commands/ListUsersCommand";
import { PromoteCommand, PromoteCommandInput, PromoteCommandOutput } from "./commands/PromoteCommand";
import {
RebootBrokerCommand,
RebootBrokerCommandInput,
Expand Down Expand Up @@ -101,6 +102,7 @@ const commands = {
ListConfigurationsCommand,
ListTagsCommand,
ListUsersCommand,
PromoteCommand,
RebootBrokerCommand,
UpdateBrokerCommand,
UpdateConfigurationCommand,
Expand Down Expand Up @@ -351,6 +353,17 @@ export interface Mq {
cb: (err: any, data?: ListUsersCommandOutput) => void
): void;

/**
* @see {@link PromoteCommand}
*/
promote(args: PromoteCommandInput, options?: __HttpHandlerOptions): Promise<PromoteCommandOutput>;
promote(args: PromoteCommandInput, cb: (err: any, data?: PromoteCommandOutput) => void): void;
promote(
args: PromoteCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: PromoteCommandOutput) => void
): void;

/**
* @see {@link RebootBrokerCommand}
*/
Expand Down
3 changes: 3 additions & 0 deletions clients/client-mq/src/MqClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ import {
import { ListConfigurationsCommandInput, ListConfigurationsCommandOutput } from "./commands/ListConfigurationsCommand";
import { ListTagsCommandInput, ListTagsCommandOutput } from "./commands/ListTagsCommand";
import { ListUsersCommandInput, ListUsersCommandOutput } from "./commands/ListUsersCommand";
import { PromoteCommandInput, PromoteCommandOutput } from "./commands/PromoteCommand";
import { RebootBrokerCommandInput, RebootBrokerCommandOutput } from "./commands/RebootBrokerCommand";
import { UpdateBrokerCommandInput, UpdateBrokerCommandOutput } from "./commands/UpdateBrokerCommand";
import {
Expand Down Expand Up @@ -126,6 +127,7 @@ export type ServiceInputTypes =
| ListConfigurationsCommandInput
| ListTagsCommandInput
| ListUsersCommandInput
| PromoteCommandInput
| RebootBrokerCommandInput
| UpdateBrokerCommandInput
| UpdateConfigurationCommandInput
Expand Down Expand Up @@ -153,6 +155,7 @@ export type ServiceOutputTypes =
| ListConfigurationsCommandOutput
| ListTagsCommandOutput
| ListUsersCommandOutput
| PromoteCommandOutput
| RebootBrokerCommandOutput
| UpdateBrokerCommandOutput
| UpdateConfigurationCommandOutput
Expand Down
15 changes: 9 additions & 6 deletions clients/client-mq/src/commands/CreateBrokerCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,28 +36,28 @@ export interface CreateBrokerCommandOutput extends CreateBrokerResponse, __Metad

/**
* @public
* <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>
* <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>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { MqClient, CreateBrokerCommand } from "@aws-sdk/client-mq"; // ES Modules import
* // const { MqClient, CreateBrokerCommand } = require("@aws-sdk/client-mq"); // CommonJS import
* const client = new MqClient(config);
* const input = { // CreateBrokerRequest
* AuthenticationStrategy: "STRING_VALUE",
* AuthenticationStrategy: "SIMPLE" || "LDAP",
* AutoMinorVersionUpgrade: true || false, // required
* BrokerName: "STRING_VALUE", // required
* Configuration: { // ConfigurationId
* Id: "STRING_VALUE", // required
* Revision: Number("int"),
* },
* CreatorRequestId: "STRING_VALUE",
* DeploymentMode: "STRING_VALUE", // required
* DeploymentMode: "SINGLE_INSTANCE" || "ACTIVE_STANDBY_MULTI_AZ" || "CLUSTER_MULTI_AZ", // required
* EncryptionOptions: { // EncryptionOptions
* KmsKeyId: "STRING_VALUE",
* UseAwsOwnedKey: true || false, // required
* },
* EngineType: "STRING_VALUE", // required
* EngineType: "ACTIVEMQ" || "RABBITMQ", // required
* EngineVersion: "STRING_VALUE", // required
* HostInstanceType: "STRING_VALUE", // required
* LdapServerMetadata: { // LdapServerMetadataInput
Expand All @@ -80,15 +80,15 @@ export interface CreateBrokerCommandOutput extends CreateBrokerResponse, __Metad
* General: true || false,
* },
* MaintenanceWindowStartTime: { // WeeklyStartTime
* DayOfWeek: "STRING_VALUE", // required
* DayOfWeek: "MONDAY" || "TUESDAY" || "WEDNESDAY" || "THURSDAY" || "FRIDAY" || "SATURDAY" || "SUNDAY", // required
* TimeOfDay: "STRING_VALUE", // required
* TimeZone: "STRING_VALUE",
* },
* PubliclyAccessible: true || false, // required
* SecurityGroups: [
* "STRING_VALUE",
* ],
* StorageType: "STRING_VALUE",
* StorageType: "EBS" || "EFS",
* SubnetIds: [
* "STRING_VALUE",
* ],
Expand All @@ -101,8 +101,11 @@ export interface CreateBrokerCommandOutput extends CreateBrokerResponse, __Metad
* Groups: "<__listOf__string>",
* Password: "STRING_VALUE", // required
* Username: "STRING_VALUE", // required
* ReplicationUser: true || false,
* },
* ],
* DataReplicationMode: "NONE" || "CRDR",
* DataReplicationPrimaryBrokerArn: "STRING_VALUE",
* };
* const command = new CreateBrokerCommand(input);
* const response = await client.send(command);
Expand Down
6 changes: 3 additions & 3 deletions clients/client-mq/src/commands/CreateConfigurationCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ export interface CreateConfigurationCommandOutput extends CreateConfigurationRes
* // const { MqClient, CreateConfigurationCommand } = require("@aws-sdk/client-mq"); // CommonJS import
* const client = new MqClient(config);
* const input = { // CreateConfigurationRequest
* AuthenticationStrategy: "STRING_VALUE",
* EngineType: "STRING_VALUE", // required
* AuthenticationStrategy: "SIMPLE" || "LDAP",
* EngineType: "ACTIVEMQ" || "RABBITMQ", // required
* EngineVersion: "STRING_VALUE", // required
* Name: "STRING_VALUE", // required
* Tags: { // __mapOf__string
Expand All @@ -56,7 +56,7 @@ export interface CreateConfigurationCommandOutput extends CreateConfigurationRes
* const response = await client.send(command);
* // { // CreateConfigurationResponse
* // Arn: "STRING_VALUE",
* // AuthenticationStrategy: "STRING_VALUE",
* // AuthenticationStrategy: "SIMPLE" || "LDAP",
* // Created: new Date("TIMESTAMP"),
* // Id: "STRING_VALUE",
* // LatestRevision: { // ConfigurationRevision
Expand Down
3 changes: 2 additions & 1 deletion clients/client-mq/src/commands/CreateUserCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export interface CreateUserCommandOutput extends CreateUserResponse, __MetadataB

/**
* @public
* <p>Creates an ActiveMQ user.</p>
* <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>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand All @@ -51,6 +51,7 @@ export interface CreateUserCommandOutput extends CreateUserResponse, __MetadataB
* ],
* Password: "STRING_VALUE", // required
* Username: "STRING_VALUE", // required
* ReplicationUser: true || false,
* };
* const command = new CreateUserCommand(input);
* const response = await client.send(command);
Expand Down
32 changes: 24 additions & 8 deletions clients/client-mq/src/commands/DescribeBrokerCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export interface DescribeBrokerCommandOutput extends DescribeBrokerResponse, __M
* // ActionRequiredInfo: "STRING_VALUE",
* // },
* // ],
* // AuthenticationStrategy: "STRING_VALUE",
* // AuthenticationStrategy: "SIMPLE" || "LDAP",
* // AutoMinorVersionUpgrade: true || false,
* // BrokerArn: "STRING_VALUE",
* // BrokerId: "STRING_VALUE",
Expand All @@ -69,7 +69,7 @@ export interface DescribeBrokerCommandOutput extends DescribeBrokerResponse, __M
* // },
* // ],
* // BrokerName: "STRING_VALUE",
* // BrokerState: "STRING_VALUE",
* // BrokerState: "CREATION_IN_PROGRESS" || "CREATION_FAILED" || "DELETION_IN_PROGRESS" || "RUNNING" || "REBOOT_IN_PROGRESS" || "CRITICAL_ACTION_REQUIRED" || "REPLICA",
* // Configurations: { // Configurations
* // Current: { // ConfigurationId
* // Id: "STRING_VALUE", // required
Expand All @@ -87,12 +87,12 @@ export interface DescribeBrokerCommandOutput extends DescribeBrokerResponse, __M
* // },
* // },
* // Created: new Date("TIMESTAMP"),
* // DeploymentMode: "STRING_VALUE",
* // DeploymentMode: "SINGLE_INSTANCE" || "ACTIVE_STANDBY_MULTI_AZ" || "CLUSTER_MULTI_AZ",
* // EncryptionOptions: { // EncryptionOptions
* // KmsKeyId: "STRING_VALUE",
* // UseAwsOwnedKey: true || false, // required
* // },
* // EngineType: "STRING_VALUE",
* // EngineType: "ACTIVEMQ" || "RABBITMQ",
* // EngineVersion: "STRING_VALUE",
* // HostInstanceType: "STRING_VALUE",
* // LdapServerMetadata: { // LdapServerMetadataOutput
Expand Down Expand Up @@ -120,11 +120,11 @@ export interface DescribeBrokerCommandOutput extends DescribeBrokerResponse, __M
* // },
* // },
* // MaintenanceWindowStartTime: { // WeeklyStartTime
* // DayOfWeek: "STRING_VALUE", // required
* // DayOfWeek: "MONDAY" || "TUESDAY" || "WEDNESDAY" || "THURSDAY" || "FRIDAY" || "SATURDAY" || "SUNDAY", // required
* // TimeOfDay: "STRING_VALUE", // required
* // TimeZone: "STRING_VALUE",
* // },
* // PendingAuthenticationStrategy: "STRING_VALUE",
* // PendingAuthenticationStrategy: "SIMPLE" || "LDAP",
* // PendingEngineVersion: "STRING_VALUE",
* // PendingHostInstanceType: "STRING_VALUE",
* // PendingLdapServerMetadata: {
Expand All @@ -144,17 +144,33 @@ export interface DescribeBrokerCommandOutput extends DescribeBrokerResponse, __M
* // PendingSecurityGroups: "<__listOf__string>",
* // PubliclyAccessible: true || false,
* // SecurityGroups: "<__listOf__string>",
* // StorageType: "STRING_VALUE",
* // StorageType: "EBS" || "EFS",
* // SubnetIds: "<__listOf__string>",
* // Tags: { // __mapOf__string
* // "<keys>": "STRING_VALUE",
* // },
* // Users: [ // __listOfUserSummary
* // { // UserSummary
* // PendingChange: "STRING_VALUE",
* // PendingChange: "CREATE" || "UPDATE" || "DELETE",
* // Username: "STRING_VALUE", // required
* // },
* // ],
* // DataReplicationMetadata: { // DataReplicationMetadataOutput
* // DataReplicationCounterpart: { // DataReplicationCounterpart
* // BrokerId: "STRING_VALUE", // required
* // Region: "STRING_VALUE", // required
* // },
* // DataReplicationRole: "STRING_VALUE", // required
* // },
* // DataReplicationMode: "NONE" || "CRDR",
* // PendingDataReplicationMetadata: {
* // DataReplicationCounterpart: {
* // BrokerId: "STRING_VALUE", // required
* // Region: "STRING_VALUE", // required
* // },
* // DataReplicationRole: "STRING_VALUE", // required
* // },
* // PendingDataReplicationMode: "NONE" || "CRDR",
* // };
*
* ```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export interface DescribeBrokerEngineTypesCommandOutput extends DescribeBrokerEn
* // { // DescribeBrokerEngineTypesResponse
* // BrokerEngineTypes: [ // __listOfBrokerEngineType
* // { // BrokerEngineType
* // EngineType: "STRING_VALUE",
* // EngineType: "ACTIVEMQ" || "RABBITMQ",
* // EngineVersions: [ // __listOfEngineVersion
* // { // EngineVersion
* // Name: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ export interface DescribeBrokerInstanceOptionsCommandOutput
* // Name: "STRING_VALUE",
* // },
* // ],
* // EngineType: "STRING_VALUE",
* // EngineType: "ACTIVEMQ" || "RABBITMQ",
* // HostInstanceType: "STRING_VALUE",
* // StorageType: "STRING_VALUE",
* // StorageType: "EBS" || "EFS",
* // SupportedDeploymentModes: [ // __listOfDeploymentMode
* // "STRING_VALUE",
* // "SINGLE_INSTANCE" || "ACTIVE_STANDBY_MULTI_AZ" || "CLUSTER_MULTI_AZ",
* // ],
* // SupportedEngineVersions: [ // __listOf__string
* // "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ export interface DescribeConfigurationCommandOutput extends DescribeConfiguratio
* const response = await client.send(command);
* // { // DescribeConfigurationResponse
* // Arn: "STRING_VALUE",
* // AuthenticationStrategy: "STRING_VALUE",
* // AuthenticationStrategy: "SIMPLE" || "LDAP",
* // Created: new Date("TIMESTAMP"),
* // Description: "STRING_VALUE",
* // EngineType: "STRING_VALUE",
* // EngineType: "ACTIVEMQ" || "RABBITMQ",
* // EngineVersion: "STRING_VALUE",
* // Id: "STRING_VALUE",
* // LatestRevision: { // ConfigurationRevision
Expand Down
3 changes: 2 additions & 1 deletion clients/client-mq/src/commands/DescribeUserCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@ export interface DescribeUserCommandOutput extends DescribeUserResponse, __Metad
* // Groups: [
* // "STRING_VALUE",
* // ],
* // PendingChange: "STRING_VALUE", // required
* // PendingChange: "CREATE" || "UPDATE" || "DELETE", // required
* // },
* // Username: "STRING_VALUE",
* // ReplicationUser: true || false,
* // };
*
* ```
Expand Down
6 changes: 3 additions & 3 deletions clients/client-mq/src/commands/ListBrokersCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ export interface ListBrokersCommandOutput extends ListBrokersResponse, __Metadat
* // BrokerArn: "STRING_VALUE",
* // BrokerId: "STRING_VALUE",
* // BrokerName: "STRING_VALUE",
* // BrokerState: "STRING_VALUE",
* // BrokerState: "CREATION_IN_PROGRESS" || "CREATION_FAILED" || "DELETION_IN_PROGRESS" || "RUNNING" || "REBOOT_IN_PROGRESS" || "CRITICAL_ACTION_REQUIRED" || "REPLICA",
* // Created: new Date("TIMESTAMP"),
* // DeploymentMode: "STRING_VALUE", // required
* // EngineType: "STRING_VALUE", // required
* // DeploymentMode: "SINGLE_INSTANCE" || "ACTIVE_STANDBY_MULTI_AZ" || "CLUSTER_MULTI_AZ", // required
* // EngineType: "ACTIVEMQ" || "RABBITMQ", // required
* // HostInstanceType: "STRING_VALUE",
* // },
* // ],
Expand Down
4 changes: 2 additions & 2 deletions clients/client-mq/src/commands/ListConfigurationsCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ export interface ListConfigurationsCommandOutput extends ListConfigurationsRespo
* // Configurations: [ // __listOfConfiguration
* // { // Configuration
* // Arn: "STRING_VALUE", // required
* // AuthenticationStrategy: "STRING_VALUE", // required
* // AuthenticationStrategy: "SIMPLE" || "LDAP", // required
* // Created: new Date("TIMESTAMP"), // required
* // Description: "STRING_VALUE", // required
* // EngineType: "STRING_VALUE", // required
* // EngineType: "ACTIVEMQ" || "RABBITMQ", // required
* // EngineVersion: "STRING_VALUE", // required
* // Id: "STRING_VALUE", // required
* // LatestRevision: { // ConfigurationRevision
Expand Down
2 changes: 1 addition & 1 deletion clients/client-mq/src/commands/ListUsersCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export interface ListUsersCommandOutput extends ListUsersResponse, __MetadataBea
* // NextToken: "STRING_VALUE",
* // Users: [ // __listOfUserSummary
* // { // UserSummary
* // PendingChange: "STRING_VALUE",
* // PendingChange: "CREATE" || "UPDATE" || "DELETE",
* // Username: "STRING_VALUE", // required
* // },
* // ],
Expand Down
Loading

0 comments on commit 983be32

Please sign in to comment.