Skip to content

Commit

Permalink
feat(client-mq): This release adds the CRITICAL_ACTION_REQUIRED broke…
Browse files Browse the repository at this point in the history
…r 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.
  • Loading branch information
awstools committed Apr 25, 2022
1 parent 08a57e7 commit 0abb527
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 16 deletions.
30 changes: 30 additions & 0 deletions clients/client-mq/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,30 @@ import { MetadataBearer as $MetadataBearer } from "@aws-sdk/types";

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

/**
* <p>The action required to resolve a broker issue when the broker is in a CRITICAL_ACTION_REQUIRED state.</p>
*/
export interface ActionRequired {
/**
* <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>
*/
ActionRequiredCode?: string;

/**
* <p>Information about the action required to resolve your broker issue when the broker is in a CRITICAL_ACTION_REQUIRED state.</p>
*/
ActionRequiredInfo?: string;
}

export namespace ActionRequired {
/**
* @internal
*/
export const filterSensitiveLog = (obj: ActionRequired): any => ({
...obj,
});
}

/**
* <p>Name of the availability zone.</p>
*/
Expand Down Expand Up @@ -157,6 +181,7 @@ export namespace BrokerInstanceOption {
export enum BrokerState {
CREATION_FAILED = "CREATION_FAILED",
CREATION_IN_PROGRESS = "CREATION_IN_PROGRESS",
CRITICAL_ACTION_REQUIRED = "CRITICAL_ACTION_REQUIRED",
DELETION_IN_PROGRESS = "DELETION_IN_PROGRESS",
REBOOT_IN_PROGRESS = "REBOOT_IN_PROGRESS",
RUNNING = "RUNNING",
Expand Down Expand Up @@ -1324,6 +1349,11 @@ export namespace LogsSummary {
}

export interface DescribeBrokerResponse {
/**
* <p>A list of actions required for a broker.</p>
*/
ActionsRequired?: ActionRequired[];

/**
* <p>The authentication strategy used to secure the broker. The default is SIMPLE.</p>
*/
Expand Down
24 changes: 24 additions & 0 deletions clients/client-mq/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ import {
} from "../commands/UpdateConfigurationCommand";
import { UpdateUserCommandInput, UpdateUserCommandOutput } from "../commands/UpdateUserCommand";
import {
ActionRequired,
AvailabilityZone,
BadRequestException,
BrokerEngineType,
Expand Down Expand Up @@ -1257,6 +1258,7 @@ export const deserializeAws_restJson1DescribeBrokerCommand = async (
}
const contents: DescribeBrokerCommandOutput = {
$metadata: deserializeMetadata(output),
ActionsRequired: undefined,
AuthenticationStrategy: undefined,
AutoMinorVersionUpgrade: undefined,
BrokerArn: undefined,
Expand Down Expand Up @@ -1287,6 +1289,9 @@ export const deserializeAws_restJson1DescribeBrokerCommand = async (
Users: undefined,
};
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
if (data.actionsRequired !== undefined && data.actionsRequired !== null) {
contents.ActionsRequired = deserializeAws_restJson1__listOfActionRequired(data.actionsRequired, context);
}
if (data.authenticationStrategy !== undefined && data.authenticationStrategy !== null) {
contents.AuthenticationStrategy = __expectString(data.authenticationStrategy);
}
Expand Down Expand Up @@ -2550,6 +2555,18 @@ const deserializeAws_restJson1__listOf__string = (output: any, context: __SerdeC
return retVal;
};

const deserializeAws_restJson1__listOfActionRequired = (output: any, context: __SerdeContext): ActionRequired[] => {
const retVal = (output || [])
.filter((e: any) => e != null)
.map((entry: any) => {
if (entry === null) {
return null as any;
}
return deserializeAws_restJson1ActionRequired(entry, context);
});
return retVal;
};

const deserializeAws_restJson1__listOfAvailabilityZone = (output: any, context: __SerdeContext): AvailabilityZone[] => {
const retVal = (output || [])
.filter((e: any) => e != null)
Expand Down Expand Up @@ -2718,6 +2735,13 @@ const deserializeAws_restJson1__mapOf__string = (output: any, context: __SerdeCo
}, {});
};

const deserializeAws_restJson1ActionRequired = (output: any, context: __SerdeContext): ActionRequired => {
return {
ActionRequiredCode: __expectString(output.actionRequiredCode),
ActionRequiredInfo: __expectString(output.actionRequiredInfo),
} as any;
};

const deserializeAws_restJson1AvailabilityZone = (output: any, context: __SerdeContext): AvailabilityZone => {
return {
Name: __expectString(output.name),
Expand Down
77 changes: 61 additions & 16 deletions codegen/sdk-codegen/aws-models/mq.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,28 @@
]
},
"shapes": {
"com.amazonaws.mq#ActionRequired": {
"type": "structure",
"members": {
"ActionRequiredCode": {
"target": "com.amazonaws.mq#__string",
"traits": {
"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>",
"smithy.api#jsonName": "actionRequiredCode"
}
},
"ActionRequiredInfo": {
"target": "com.amazonaws.mq#__string",
"traits": {
"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>",
"smithy.api#jsonName": "actionRequiredInfo"
}
}
},
"traits": {
"smithy.api#documentation": "<p>The action required to resolve a broker issue when the broker is in a CRITICAL_ACTION_REQUIRED state.</p>"
}
},
"com.amazonaws.mq#AuthenticationStrategy": {
"type": "string",
"traits": {
Expand Down Expand Up @@ -209,6 +231,10 @@
{
"value": "REBOOT_IN_PROGRESS",
"name": "REBOOT_IN_PROGRESS"
},
{
"value": "CRITICAL_ACTION_REQUIRED",
"name": "CRITICAL_ACTION_REQUIRED"
}
]
}
Expand Down Expand Up @@ -841,6 +867,9 @@
"input": {
"target": "com.amazonaws.mq#CreateTagsRequest"
},
"output": {
"target": "smithy.api#Unit"
},
"errors": [
{
"target": "com.amazonaws.mq#BadRequestException"
Expand Down Expand Up @@ -1067,6 +1096,9 @@
"input": {
"target": "com.amazonaws.mq#DeleteTagsRequest"
},
"output": {
"target": "smithy.api#Unit"
},
"errors": [
{
"target": "com.amazonaws.mq#BadRequestException"
Expand Down Expand Up @@ -1408,6 +1440,13 @@
"com.amazonaws.mq#DescribeBrokerResponse": {
"type": "structure",
"members": {
"ActionsRequired": {
"target": "com.amazonaws.mq#__listOfActionRequired",
"traits": {
"smithy.api#documentation": "<p>A list of actions required for a broker.</p>",
"smithy.api#jsonName": "actionsRequired"
}
},
"AuthenticationStrategy": {
"target": "com.amazonaws.mq#AuthenticationStrategy",
"traits": {
Expand Down Expand Up @@ -3327,6 +3366,12 @@
}
}
},
"com.amazonaws.mq#__listOfActionRequired": {
"type": "list",
"member": {
"target": "com.amazonaws.mq#ActionRequired"
}
},
"com.amazonaws.mq#__listOfAvailabilityZone": {
"type": "list",
"member": {
Expand Down Expand Up @@ -3431,6 +3476,21 @@
},
"com.amazonaws.mq#mq": {
"type": "service",
"traits": {
"aws.api#service": {
"sdkId": "mq",
"arnNamespace": "mq",
"cloudFormationName": "AmazonMQ",
"cloudTrailEventSource": "mq.amazonaws.com",
"endpointPrefix": "mq"
},
"aws.auth#sigv4": {
"name": "mq"
},
"aws.protocols#restJson1": {},
"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>",
"smithy.api#title": "AmazonMQ"
},
"version": "2017-11-27",
"operations": [
{
Expand Down Expand Up @@ -3499,22 +3559,7 @@
{
"target": "com.amazonaws.mq#UpdateUser"
}
],
"traits": {
"aws.api#service": {
"sdkId": "mq",
"arnNamespace": "mq",
"cloudFormationName": "AmazonMQ",
"cloudTrailEventSource": "mq.amazonaws.com",
"endpointPrefix": "mq"
},
"aws.auth#sigv4": {
"name": "mq"
},
"aws.protocols#restJson1": {},
"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>",
"smithy.api#title": "AmazonMQ"
}
]
}
}
}

0 comments on commit 0abb527

Please sign in to comment.