Skip to content

Commit a52a975

Browse files
author
awstools
committed
feat(client-mq): You can now delete Amazon MQ broker configurations using the DeleteConfiguration API. For more information, see Configurations in the Amazon MQ API Reference.
1 parent 1bca5fe commit a52a975

File tree

8 files changed

+277
-0
lines changed

8 files changed

+277
-0
lines changed

clients/client-mq/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,14 @@ DeleteBroker
242242

243243
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/mq/command/DeleteBrokerCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-mq/Interface/DeleteBrokerCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-mq/Interface/DeleteBrokerCommandOutput/)
244244

245+
</details>
246+
<details>
247+
<summary>
248+
DeleteConfiguration
249+
</summary>
250+
251+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/mq/command/DeleteConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-mq/Interface/DeleteConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-mq/Interface/DeleteConfigurationCommandOutput/)
252+
245253
</details>
246254
<details>
247255
<summary>

clients/client-mq/src/Mq.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ import {
1919
DeleteBrokerCommandInput,
2020
DeleteBrokerCommandOutput,
2121
} from "./commands/DeleteBrokerCommand";
22+
import {
23+
DeleteConfigurationCommand,
24+
DeleteConfigurationCommandInput,
25+
DeleteConfigurationCommandOutput,
26+
} from "./commands/DeleteConfigurationCommand";
2227
import { DeleteTagsCommand, DeleteTagsCommandInput, DeleteTagsCommandOutput } from "./commands/DeleteTagsCommand";
2328
import { DeleteUserCommand, DeleteUserCommandInput, DeleteUserCommandOutput } from "./commands/DeleteUserCommand";
2429
import {
@@ -89,6 +94,7 @@ const commands = {
8994
CreateTagsCommand,
9095
CreateUserCommand,
9196
DeleteBrokerCommand,
97+
DeleteConfigurationCommand,
9298
DeleteTagsCommand,
9399
DeleteUserCommand,
94100
DescribeBrokerCommand,
@@ -171,6 +177,23 @@ export interface Mq {
171177
cb: (err: any, data?: DeleteBrokerCommandOutput) => void
172178
): void;
173179

180+
/**
181+
* @see {@link DeleteConfigurationCommand}
182+
*/
183+
deleteConfiguration(
184+
args: DeleteConfigurationCommandInput,
185+
options?: __HttpHandlerOptions
186+
): Promise<DeleteConfigurationCommandOutput>;
187+
deleteConfiguration(
188+
args: DeleteConfigurationCommandInput,
189+
cb: (err: any, data?: DeleteConfigurationCommandOutput) => void
190+
): void;
191+
deleteConfiguration(
192+
args: DeleteConfigurationCommandInput,
193+
options: __HttpHandlerOptions,
194+
cb: (err: any, data?: DeleteConfigurationCommandOutput) => void
195+
): void;
196+
174197
/**
175198
* @see {@link DeleteTagsCommand}
176199
*/

clients/client-mq/src/MqClient.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ import {
6161
import { CreateTagsCommandInput, CreateTagsCommandOutput } from "./commands/CreateTagsCommand";
6262
import { CreateUserCommandInput, CreateUserCommandOutput } from "./commands/CreateUserCommand";
6363
import { DeleteBrokerCommandInput, DeleteBrokerCommandOutput } from "./commands/DeleteBrokerCommand";
64+
import {
65+
DeleteConfigurationCommandInput,
66+
DeleteConfigurationCommandOutput,
67+
} from "./commands/DeleteConfigurationCommand";
6468
import { DeleteTagsCommandInput, DeleteTagsCommandOutput } from "./commands/DeleteTagsCommand";
6569
import { DeleteUserCommandInput, DeleteUserCommandOutput } from "./commands/DeleteUserCommand";
6670
import { DescribeBrokerCommandInput, DescribeBrokerCommandOutput } from "./commands/DescribeBrokerCommand";
@@ -117,6 +121,7 @@ export type ServiceInputTypes =
117121
| CreateTagsCommandInput
118122
| CreateUserCommandInput
119123
| DeleteBrokerCommandInput
124+
| DeleteConfigurationCommandInput
120125
| DeleteTagsCommandInput
121126
| DeleteUserCommandInput
122127
| DescribeBrokerCommandInput
@@ -145,6 +150,7 @@ export type ServiceOutputTypes =
145150
| CreateTagsCommandOutput
146151
| CreateUserCommandOutput
147152
| DeleteBrokerCommandOutput
153+
| DeleteConfigurationCommandOutput
148154
| DeleteTagsCommandOutput
149155
| DeleteUserCommandOutput
150156
| DescribeBrokerCommandOutput
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { getSerdePlugin } from "@smithy/middleware-serde";
4+
import { Command as $Command } from "@smithy/smithy-client";
5+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
6+
7+
import { commonParams } from "../endpoint/EndpointParameters";
8+
import { DeleteConfigurationRequest, DeleteConfigurationResponse } from "../models/models_0";
9+
import { MqClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../MqClient";
10+
import { de_DeleteConfigurationCommand, se_DeleteConfigurationCommand } from "../protocols/Aws_restJson1";
11+
12+
/**
13+
* @public
14+
*/
15+
export type { __MetadataBearer };
16+
export { $Command };
17+
/**
18+
* @public
19+
*
20+
* The input for {@link DeleteConfigurationCommand}.
21+
*/
22+
export interface DeleteConfigurationCommandInput extends DeleteConfigurationRequest {}
23+
/**
24+
* @public
25+
*
26+
* The output of {@link DeleteConfigurationCommand}.
27+
*/
28+
export interface DeleteConfigurationCommandOutput extends DeleteConfigurationResponse, __MetadataBearer {}
29+
30+
/**
31+
* <p>Deletes the specified configuration.</p>
32+
* @example
33+
* Use a bare-bones client and the command you need to make an API call.
34+
* ```javascript
35+
* import { MqClient, DeleteConfigurationCommand } from "@aws-sdk/client-mq"; // ES Modules import
36+
* // const { MqClient, DeleteConfigurationCommand } = require("@aws-sdk/client-mq"); // CommonJS import
37+
* const client = new MqClient(config);
38+
* const input = { // DeleteConfigurationRequest
39+
* ConfigurationId: "STRING_VALUE", // required
40+
* };
41+
* const command = new DeleteConfigurationCommand(input);
42+
* const response = await client.send(command);
43+
* // { // DeleteConfigurationResponse
44+
* // ConfigurationId: "STRING_VALUE",
45+
* // };
46+
*
47+
* ```
48+
*
49+
* @param DeleteConfigurationCommandInput - {@link DeleteConfigurationCommandInput}
50+
* @returns {@link DeleteConfigurationCommandOutput}
51+
* @see {@link DeleteConfigurationCommandInput} for command's `input` shape.
52+
* @see {@link DeleteConfigurationCommandOutput} for command's `response` shape.
53+
* @see {@link MqClientResolvedConfig | config} for MqClient's `config` shape.
54+
*
55+
* @throws {@link BadRequestException} (client fault)
56+
* <p>Returns information about an error.</p>
57+
*
58+
* @throws {@link ConflictException} (client fault)
59+
* <p>Returns information about an error.</p>
60+
*
61+
* @throws {@link ForbiddenException} (client fault)
62+
* <p>Returns information about an error.</p>
63+
*
64+
* @throws {@link InternalServerErrorException} (server fault)
65+
* <p>Returns information about an error.</p>
66+
*
67+
* @throws {@link NotFoundException} (client fault)
68+
* <p>Returns information about an error.</p>
69+
*
70+
* @throws {@link MqServiceException}
71+
* <p>Base exception class for all service exceptions from Mq service.</p>
72+
*
73+
*
74+
* @public
75+
*/
76+
export class DeleteConfigurationCommand extends $Command
77+
.classBuilder<
78+
DeleteConfigurationCommandInput,
79+
DeleteConfigurationCommandOutput,
80+
MqClientResolvedConfig,
81+
ServiceInputTypes,
82+
ServiceOutputTypes
83+
>()
84+
.ep(commonParams)
85+
.m(function (this: any, Command: any, cs: any, config: MqClientResolvedConfig, o: any) {
86+
return [
87+
getSerdePlugin(config, this.serialize, this.deserialize),
88+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
89+
];
90+
})
91+
.s("mq", "DeleteConfiguration", {})
92+
.n("MqClient", "DeleteConfigurationCommand")
93+
.f(void 0, void 0)
94+
.ser(se_DeleteConfigurationCommand)
95+
.de(de_DeleteConfigurationCommand)
96+
.build() {
97+
/** @internal type navigation helper, not in runtime. */
98+
protected declare static __types: {
99+
api: {
100+
input: DeleteConfigurationRequest;
101+
output: DeleteConfigurationResponse;
102+
};
103+
sdk: {
104+
input: DeleteConfigurationCommandInput;
105+
output: DeleteConfigurationCommandOutput;
106+
};
107+
};
108+
}

clients/client-mq/src/commands/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export * from "./CreateConfigurationCommand";
44
export * from "./CreateTagsCommand";
55
export * from "./CreateUserCommand";
66
export * from "./DeleteBrokerCommand";
7+
export * from "./DeleteConfigurationCommand";
78
export * from "./DeleteTagsCommand";
89
export * from "./DeleteUserCommand";
910
export * from "./DescribeBrokerCommand";

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1216,6 +1216,28 @@ export interface DeleteBrokerResponse {
12161216
BrokerId?: string | undefined;
12171217
}
12181218

1219+
/**
1220+
* @public
1221+
*/
1222+
export interface DeleteConfigurationRequest {
1223+
/**
1224+
* <p>The unique ID that Amazon MQ generates for the configuration.</p>
1225+
* @public
1226+
*/
1227+
ConfigurationId: string | undefined;
1228+
}
1229+
1230+
/**
1231+
* @public
1232+
*/
1233+
export interface DeleteConfigurationResponse {
1234+
/**
1235+
* <p>The unique ID that Amazon MQ generates for the configuration.</p>
1236+
* @public
1237+
*/
1238+
ConfigurationId?: string | undefined;
1239+
}
1240+
12191241
/**
12201242
* @public
12211243
*/

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

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ import {
3333
import { CreateTagsCommandInput, CreateTagsCommandOutput } from "../commands/CreateTagsCommand";
3434
import { CreateUserCommandInput, CreateUserCommandOutput } from "../commands/CreateUserCommand";
3535
import { DeleteBrokerCommandInput, DeleteBrokerCommandOutput } from "../commands/DeleteBrokerCommand";
36+
import {
37+
DeleteConfigurationCommandInput,
38+
DeleteConfigurationCommandOutput,
39+
} from "../commands/DeleteConfigurationCommand";
3640
import { DeleteTagsCommandInput, DeleteTagsCommandOutput } from "../commands/DeleteTagsCommand";
3741
import { DeleteUserCommandInput, DeleteUserCommandOutput } from "../commands/DeleteUserCommand";
3842
import { DescribeBrokerCommandInput, DescribeBrokerCommandOutput } from "../commands/DescribeBrokerCommand";
@@ -237,6 +241,22 @@ export const se_DeleteBrokerCommand = async (
237241
return b.build();
238242
};
239243

244+
/**
245+
* serializeAws_restJson1DeleteConfigurationCommand
246+
*/
247+
export const se_DeleteConfigurationCommand = async (
248+
input: DeleteConfigurationCommandInput,
249+
context: __SerdeContext
250+
): Promise<__HttpRequest> => {
251+
const b = rb(input, context);
252+
const headers: any = {};
253+
b.bp("/v1/configurations/{ConfigurationId}");
254+
b.p("ConfigurationId", () => input.ConfigurationId!, "{ConfigurationId}", false);
255+
let body: any;
256+
b.m("DELETE").h(headers).b(body);
257+
return b.build();
258+
};
259+
240260
/**
241261
* serializeAws_restJson1DeleteTagsCommand
242262
*/
@@ -700,6 +720,27 @@ export const de_DeleteBrokerCommand = async (
700720
return contents;
701721
};
702722

723+
/**
724+
* deserializeAws_restJson1DeleteConfigurationCommand
725+
*/
726+
export const de_DeleteConfigurationCommand = async (
727+
output: __HttpResponse,
728+
context: __SerdeContext
729+
): Promise<DeleteConfigurationCommandOutput> => {
730+
if (output.statusCode !== 200 && output.statusCode >= 300) {
731+
return de_CommandError(output, context);
732+
}
733+
const contents: any = map({
734+
$metadata: deserializeMetadata(output),
735+
});
736+
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
737+
const doc = take(data, {
738+
ConfigurationId: [, __expectString, `configurationId`],
739+
});
740+
Object.assign(contents, doc);
741+
return contents;
742+
};
743+
703744
/**
704745
* deserializeAws_restJson1DeleteTagsCommand
705746
*/

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

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1265,6 +1265,71 @@
12651265
"smithy.api#output": {}
12661266
}
12671267
},
1268+
"com.amazonaws.mq#DeleteConfiguration": {
1269+
"type": "operation",
1270+
"input": {
1271+
"target": "com.amazonaws.mq#DeleteConfigurationRequest"
1272+
},
1273+
"output": {
1274+
"target": "com.amazonaws.mq#DeleteConfigurationResponse"
1275+
},
1276+
"errors": [
1277+
{
1278+
"target": "com.amazonaws.mq#BadRequestException"
1279+
},
1280+
{
1281+
"target": "com.amazonaws.mq#ConflictException"
1282+
},
1283+
{
1284+
"target": "com.amazonaws.mq#ForbiddenException"
1285+
},
1286+
{
1287+
"target": "com.amazonaws.mq#InternalServerErrorException"
1288+
},
1289+
{
1290+
"target": "com.amazonaws.mq#NotFoundException"
1291+
}
1292+
],
1293+
"traits": {
1294+
"smithy.api#documentation": "<p>Deletes the specified configuration.</p>",
1295+
"smithy.api#http": {
1296+
"method": "DELETE",
1297+
"uri": "/v1/configurations/{ConfigurationId}",
1298+
"code": 200
1299+
}
1300+
}
1301+
},
1302+
"com.amazonaws.mq#DeleteConfigurationRequest": {
1303+
"type": "structure",
1304+
"members": {
1305+
"ConfigurationId": {
1306+
"target": "com.amazonaws.mq#__string",
1307+
"traits": {
1308+
"smithy.api#documentation": "<p>The unique ID that Amazon MQ generates for the configuration.</p>",
1309+
"smithy.api#httpLabel": {},
1310+
"smithy.api#required": {}
1311+
}
1312+
}
1313+
},
1314+
"traits": {
1315+
"smithy.api#input": {}
1316+
}
1317+
},
1318+
"com.amazonaws.mq#DeleteConfigurationResponse": {
1319+
"type": "structure",
1320+
"members": {
1321+
"ConfigurationId": {
1322+
"target": "com.amazonaws.mq#__string",
1323+
"traits": {
1324+
"smithy.api#documentation": "<p>The unique ID that Amazon MQ generates for the configuration.</p>",
1325+
"smithy.api#jsonName": "configurationId"
1326+
}
1327+
}
1328+
},
1329+
"traits": {
1330+
"smithy.api#output": {}
1331+
}
1332+
},
12681333
"com.amazonaws.mq#DeleteTags": {
12691334
"type": "operation",
12701335
"input": {
@@ -3977,6 +4042,9 @@
39774042
{
39784043
"target": "com.amazonaws.mq#DeleteBroker"
39794044
},
4045+
{
4046+
"target": "com.amazonaws.mq#DeleteConfiguration"
4047+
},
39804048
{
39814049
"target": "com.amazonaws.mq#DeleteTags"
39824050
},

0 commit comments

Comments
 (0)