Skip to content

Commit 0abb527

Browse files
author
awstools
committed
feat(client-mq): This release adds the CRITICAL_ACTION_REQUIRED broker state and the ActionRequired API property. CRITICAL_ACTION_REQUIRED informs you when your broker is degraded. ActionRequired provides you with a code which you can use to find instructions in the Developer Guide on how to resolve the issue.
1 parent 08a57e7 commit 0abb527

File tree

3 files changed

+115
-16
lines changed

3 files changed

+115
-16
lines changed

clients/client-mq/src/models/models_0.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,30 @@ import { MetadataBearer as $MetadataBearer } from "@aws-sdk/types";
33

44
import { MqServiceException as __BaseException } from "./MqServiceException";
55

6+
/**
7+
* <p>The action required to resolve a broker issue when the broker is in a CRITICAL_ACTION_REQUIRED state.</p>
8+
*/
9+
export interface ActionRequired {
10+
/**
11+
* <p>The code you can use to resolve your broker issue when the broker is in a CRITICAL_ACTION_REQUIRED state. You can find instructions by choosing the link for your code from the list of action required codes in <a href="https://docs.aws.amazon.com//latest/developer-guide/troubleshooting-action-required-codes.html">Amazon MQ action required codes</a>. Each code references a topic with detailed information, instructions, and recommendations for how to resolve the issue and prevent future occurrences.</p>
12+
*/
13+
ActionRequiredCode?: string;
14+
15+
/**
16+
* <p>Information about the action required to resolve your broker issue when the broker is in a CRITICAL_ACTION_REQUIRED state.</p>
17+
*/
18+
ActionRequiredInfo?: string;
19+
}
20+
21+
export namespace ActionRequired {
22+
/**
23+
* @internal
24+
*/
25+
export const filterSensitiveLog = (obj: ActionRequired): any => ({
26+
...obj,
27+
});
28+
}
29+
630
/**
731
* <p>Name of the availability zone.</p>
832
*/
@@ -157,6 +181,7 @@ export namespace BrokerInstanceOption {
157181
export enum BrokerState {
158182
CREATION_FAILED = "CREATION_FAILED",
159183
CREATION_IN_PROGRESS = "CREATION_IN_PROGRESS",
184+
CRITICAL_ACTION_REQUIRED = "CRITICAL_ACTION_REQUIRED",
160185
DELETION_IN_PROGRESS = "DELETION_IN_PROGRESS",
161186
REBOOT_IN_PROGRESS = "REBOOT_IN_PROGRESS",
162187
RUNNING = "RUNNING",
@@ -1324,6 +1349,11 @@ export namespace LogsSummary {
13241349
}
13251350

13261351
export interface DescribeBrokerResponse {
1352+
/**
1353+
* <p>A list of actions required for a broker.</p>
1354+
*/
1355+
ActionsRequired?: ActionRequired[];
1356+
13271357
/**
13281358
* <p>The authentication strategy used to secure the broker. The default is SIMPLE.</p>
13291359
*/

clients/client-mq/src/protocols/Aws_restJson1.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ import {
6060
} from "../commands/UpdateConfigurationCommand";
6161
import { UpdateUserCommandInput, UpdateUserCommandOutput } from "../commands/UpdateUserCommand";
6262
import {
63+
ActionRequired,
6364
AvailabilityZone,
6465
BadRequestException,
6566
BrokerEngineType,
@@ -1257,6 +1258,7 @@ export const deserializeAws_restJson1DescribeBrokerCommand = async (
12571258
}
12581259
const contents: DescribeBrokerCommandOutput = {
12591260
$metadata: deserializeMetadata(output),
1261+
ActionsRequired: undefined,
12601262
AuthenticationStrategy: undefined,
12611263
AutoMinorVersionUpgrade: undefined,
12621264
BrokerArn: undefined,
@@ -1287,6 +1289,9 @@ export const deserializeAws_restJson1DescribeBrokerCommand = async (
12871289
Users: undefined,
12881290
};
12891291
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1292+
if (data.actionsRequired !== undefined && data.actionsRequired !== null) {
1293+
contents.ActionsRequired = deserializeAws_restJson1__listOfActionRequired(data.actionsRequired, context);
1294+
}
12901295
if (data.authenticationStrategy !== undefined && data.authenticationStrategy !== null) {
12911296
contents.AuthenticationStrategy = __expectString(data.authenticationStrategy);
12921297
}
@@ -2550,6 +2555,18 @@ const deserializeAws_restJson1__listOf__string = (output: any, context: __SerdeC
25502555
return retVal;
25512556
};
25522557

2558+
const deserializeAws_restJson1__listOfActionRequired = (output: any, context: __SerdeContext): ActionRequired[] => {
2559+
const retVal = (output || [])
2560+
.filter((e: any) => e != null)
2561+
.map((entry: any) => {
2562+
if (entry === null) {
2563+
return null as any;
2564+
}
2565+
return deserializeAws_restJson1ActionRequired(entry, context);
2566+
});
2567+
return retVal;
2568+
};
2569+
25532570
const deserializeAws_restJson1__listOfAvailabilityZone = (output: any, context: __SerdeContext): AvailabilityZone[] => {
25542571
const retVal = (output || [])
25552572
.filter((e: any) => e != null)
@@ -2718,6 +2735,13 @@ const deserializeAws_restJson1__mapOf__string = (output: any, context: __SerdeCo
27182735
}, {});
27192736
};
27202737

2738+
const deserializeAws_restJson1ActionRequired = (output: any, context: __SerdeContext): ActionRequired => {
2739+
return {
2740+
ActionRequiredCode: __expectString(output.actionRequiredCode),
2741+
ActionRequiredInfo: __expectString(output.actionRequiredInfo),
2742+
} as any;
2743+
};
2744+
27212745
const deserializeAws_restJson1AvailabilityZone = (output: any, context: __SerdeContext): AvailabilityZone => {
27222746
return {
27232747
Name: __expectString(output.name),

codegen/sdk-codegen/aws-models/mq.json

Lines changed: 61 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,28 @@
2929
]
3030
},
3131
"shapes": {
32+
"com.amazonaws.mq#ActionRequired": {
33+
"type": "structure",
34+
"members": {
35+
"ActionRequiredCode": {
36+
"target": "com.amazonaws.mq#__string",
37+
"traits": {
38+
"smithy.api#documentation": "<p>The code you can use to resolve your broker issue when the broker is in a CRITICAL_ACTION_REQUIRED state. You can find instructions by choosing the link for your code from the list of action required codes in <a href=\"https://docs.aws.amazon.com//latest/developer-guide/troubleshooting-action-required-codes.html\">Amazon MQ action required codes</a>. Each code references a topic with detailed information, instructions, and recommendations for how to resolve the issue and prevent future occurrences.</p>",
39+
"smithy.api#jsonName": "actionRequiredCode"
40+
}
41+
},
42+
"ActionRequiredInfo": {
43+
"target": "com.amazonaws.mq#__string",
44+
"traits": {
45+
"smithy.api#documentation": "<p>Information about the action required to resolve your broker issue when the broker is in a CRITICAL_ACTION_REQUIRED state.</p>",
46+
"smithy.api#jsonName": "actionRequiredInfo"
47+
}
48+
}
49+
},
50+
"traits": {
51+
"smithy.api#documentation": "<p>The action required to resolve a broker issue when the broker is in a CRITICAL_ACTION_REQUIRED state.</p>"
52+
}
53+
},
3254
"com.amazonaws.mq#AuthenticationStrategy": {
3355
"type": "string",
3456
"traits": {
@@ -209,6 +231,10 @@
209231
{
210232
"value": "REBOOT_IN_PROGRESS",
211233
"name": "REBOOT_IN_PROGRESS"
234+
},
235+
{
236+
"value": "CRITICAL_ACTION_REQUIRED",
237+
"name": "CRITICAL_ACTION_REQUIRED"
212238
}
213239
]
214240
}
@@ -841,6 +867,9 @@
841867
"input": {
842868
"target": "com.amazonaws.mq#CreateTagsRequest"
843869
},
870+
"output": {
871+
"target": "smithy.api#Unit"
872+
},
844873
"errors": [
845874
{
846875
"target": "com.amazonaws.mq#BadRequestException"
@@ -1067,6 +1096,9 @@
10671096
"input": {
10681097
"target": "com.amazonaws.mq#DeleteTagsRequest"
10691098
},
1099+
"output": {
1100+
"target": "smithy.api#Unit"
1101+
},
10701102
"errors": [
10711103
{
10721104
"target": "com.amazonaws.mq#BadRequestException"
@@ -1408,6 +1440,13 @@
14081440
"com.amazonaws.mq#DescribeBrokerResponse": {
14091441
"type": "structure",
14101442
"members": {
1443+
"ActionsRequired": {
1444+
"target": "com.amazonaws.mq#__listOfActionRequired",
1445+
"traits": {
1446+
"smithy.api#documentation": "<p>A list of actions required for a broker.</p>",
1447+
"smithy.api#jsonName": "actionsRequired"
1448+
}
1449+
},
14111450
"AuthenticationStrategy": {
14121451
"target": "com.amazonaws.mq#AuthenticationStrategy",
14131452
"traits": {
@@ -3327,6 +3366,12 @@
33273366
}
33283367
}
33293368
},
3369+
"com.amazonaws.mq#__listOfActionRequired": {
3370+
"type": "list",
3371+
"member": {
3372+
"target": "com.amazonaws.mq#ActionRequired"
3373+
}
3374+
},
33303375
"com.amazonaws.mq#__listOfAvailabilityZone": {
33313376
"type": "list",
33323377
"member": {
@@ -3431,6 +3476,21 @@
34313476
},
34323477
"com.amazonaws.mq#mq": {
34333478
"type": "service",
3479+
"traits": {
3480+
"aws.api#service": {
3481+
"sdkId": "mq",
3482+
"arnNamespace": "mq",
3483+
"cloudFormationName": "AmazonMQ",
3484+
"cloudTrailEventSource": "mq.amazonaws.com",
3485+
"endpointPrefix": "mq"
3486+
},
3487+
"aws.auth#sigv4": {
3488+
"name": "mq"
3489+
},
3490+
"aws.protocols#restJson1": {},
3491+
"smithy.api#documentation": "<p>Amazon MQ is a managed message broker service for Apache ActiveMQ and RabbitMQ that makes it easy to set up and operate message brokers in the cloud. A message broker allows software applications and components to communicate using various programming languages, operating systems, and formal messaging protocols.</p>",
3492+
"smithy.api#title": "AmazonMQ"
3493+
},
34343494
"version": "2017-11-27",
34353495
"operations": [
34363496
{
@@ -3499,22 +3559,7 @@
34993559
{
35003560
"target": "com.amazonaws.mq#UpdateUser"
35013561
}
3502-
],
3503-
"traits": {
3504-
"aws.api#service": {
3505-
"sdkId": "mq",
3506-
"arnNamespace": "mq",
3507-
"cloudFormationName": "AmazonMQ",
3508-
"cloudTrailEventSource": "mq.amazonaws.com",
3509-
"endpointPrefix": "mq"
3510-
},
3511-
"aws.auth#sigv4": {
3512-
"name": "mq"
3513-
},
3514-
"aws.protocols#restJson1": {},
3515-
"smithy.api#documentation": "<p>Amazon MQ is a managed message broker service for Apache ActiveMQ and RabbitMQ that makes it easy to set up and operate message brokers in the cloud. A message broker allows software applications and components to communicate using various programming languages, operating systems, and formal messaging protocols.</p>",
3516-
"smithy.api#title": "AmazonMQ"
3517-
}
3562+
]
35183563
}
35193564
}
35203565
}

0 commit comments

Comments
 (0)