Skip to content

Commit 950682d

Browse files
author
awstools
committed
feat(client-appconfig): This release adds support for deletion protection, which is a safety guardrail to prevent the unintentional deletion of a recently used AWS AppConfig Configuration Profile or Environment. This also includes a change to increase the maximum length of the Name parameter in UpdateConfigurationProfile.
1 parent 5a8ca89 commit 950682d

15 files changed

+700
-45
lines changed

clients/client-appconfig/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,14 @@ DeleteHostedConfigurationVersion
463463

464464
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/appconfig/command/DeleteHostedConfigurationVersionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-appconfig/Interface/DeleteHostedConfigurationVersionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-appconfig/Interface/DeleteHostedConfigurationVersionCommandOutput/)
465465

466+
</details>
467+
<details>
468+
<summary>
469+
GetAccountSettings
470+
</summary>
471+
472+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/appconfig/command/GetAccountSettingsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-appconfig/Interface/GetAccountSettingsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-appconfig/Interface/GetAccountSettingsCommandOutput/)
473+
466474
</details>
467475
<details>
468476
<summary>
@@ -639,6 +647,14 @@ UntagResource
639647

640648
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/appconfig/command/UntagResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-appconfig/Interface/UntagResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-appconfig/Interface/UntagResourceCommandOutput/)
641649

650+
</details>
651+
<details>
652+
<summary>
653+
UpdateAccountSettings
654+
</summary>
655+
656+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/appconfig/command/UpdateAccountSettingsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-appconfig/Interface/UpdateAccountSettingsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-appconfig/Interface/UpdateAccountSettingsCommandOutput/)
657+
642658
</details>
643659
<details>
644660
<summary>

clients/client-appconfig/src/AppConfig.ts

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ import {
7373
DeleteHostedConfigurationVersionCommandInput,
7474
DeleteHostedConfigurationVersionCommandOutput,
7575
} from "./commands/DeleteHostedConfigurationVersionCommand";
76+
import {
77+
GetAccountSettingsCommand,
78+
GetAccountSettingsCommandInput,
79+
GetAccountSettingsCommandOutput,
80+
} from "./commands/GetAccountSettingsCommand";
7681
import {
7782
GetApplicationCommand,
7883
GetApplicationCommandInput,
@@ -179,6 +184,11 @@ import {
179184
UntagResourceCommandInput,
180185
UntagResourceCommandOutput,
181186
} from "./commands/UntagResourceCommand";
187+
import {
188+
UpdateAccountSettingsCommand,
189+
UpdateAccountSettingsCommandInput,
190+
UpdateAccountSettingsCommandOutput,
191+
} from "./commands/UpdateAccountSettingsCommand";
182192
import {
183193
UpdateApplicationCommand,
184194
UpdateApplicationCommandInput,
@@ -230,6 +240,7 @@ const commands = {
230240
DeleteExtensionCommand,
231241
DeleteExtensionAssociationCommand,
232242
DeleteHostedConfigurationVersionCommand,
243+
GetAccountSettingsCommand,
233244
GetApplicationCommand,
234245
GetConfigurationCommand,
235246
GetConfigurationProfileCommand,
@@ -252,6 +263,7 @@ const commands = {
252263
StopDeploymentCommand,
253264
TagResourceCommand,
254265
UntagResourceCommand,
266+
UpdateAccountSettingsCommand,
255267
UpdateApplicationCommand,
256268
UpdateConfigurationProfileCommand,
257269
UpdateDeploymentStrategyCommand,
@@ -494,6 +506,24 @@ export interface AppConfig {
494506
cb: (err: any, data?: DeleteHostedConfigurationVersionCommandOutput) => void
495507
): void;
496508

509+
/**
510+
* @see {@link GetAccountSettingsCommand}
511+
*/
512+
getAccountSettings(): Promise<GetAccountSettingsCommandOutput>;
513+
getAccountSettings(
514+
args: GetAccountSettingsCommandInput,
515+
options?: __HttpHandlerOptions
516+
): Promise<GetAccountSettingsCommandOutput>;
517+
getAccountSettings(
518+
args: GetAccountSettingsCommandInput,
519+
cb: (err: any, data?: GetAccountSettingsCommandOutput) => void
520+
): void;
521+
getAccountSettings(
522+
args: GetAccountSettingsCommandInput,
523+
options: __HttpHandlerOptions,
524+
cb: (err: any, data?: GetAccountSettingsCommandOutput) => void
525+
): void;
526+
497527
/**
498528
* @see {@link GetApplicationCommand}
499529
*/
@@ -830,6 +860,24 @@ export interface AppConfig {
830860
cb: (err: any, data?: UntagResourceCommandOutput) => void
831861
): void;
832862

863+
/**
864+
* @see {@link UpdateAccountSettingsCommand}
865+
*/
866+
updateAccountSettings(): Promise<UpdateAccountSettingsCommandOutput>;
867+
updateAccountSettings(
868+
args: UpdateAccountSettingsCommandInput,
869+
options?: __HttpHandlerOptions
870+
): Promise<UpdateAccountSettingsCommandOutput>;
871+
updateAccountSettings(
872+
args: UpdateAccountSettingsCommandInput,
873+
cb: (err: any, data?: UpdateAccountSettingsCommandOutput) => void
874+
): void;
875+
updateAccountSettings(
876+
args: UpdateAccountSettingsCommandInput,
877+
options: __HttpHandlerOptions,
878+
cb: (err: any, data?: UpdateAccountSettingsCommandOutput) => void
879+
): void;
880+
833881
/**
834882
* @see {@link UpdateApplicationCommand}
835883
*/

clients/client-appconfig/src/AppConfigClient.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ import {
9191
DeleteHostedConfigurationVersionCommandInput,
9292
DeleteHostedConfigurationVersionCommandOutput,
9393
} from "./commands/DeleteHostedConfigurationVersionCommand";
94+
import { GetAccountSettingsCommandInput, GetAccountSettingsCommandOutput } from "./commands/GetAccountSettingsCommand";
9495
import { GetApplicationCommandInput, GetApplicationCommandOutput } from "./commands/GetApplicationCommand";
9596
import { GetConfigurationCommandInput, GetConfigurationCommandOutput } from "./commands/GetConfigurationCommand";
9697
import {
@@ -140,6 +141,10 @@ import { StartDeploymentCommandInput, StartDeploymentCommandOutput } from "./com
140141
import { StopDeploymentCommandInput, StopDeploymentCommandOutput } from "./commands/StopDeploymentCommand";
141142
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
142143
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
144+
import {
145+
UpdateAccountSettingsCommandInput,
146+
UpdateAccountSettingsCommandOutput,
147+
} from "./commands/UpdateAccountSettingsCommand";
143148
import { UpdateApplicationCommandInput, UpdateApplicationCommandOutput } from "./commands/UpdateApplicationCommand";
144149
import {
145150
UpdateConfigurationProfileCommandInput,
@@ -188,6 +193,7 @@ export type ServiceInputTypes =
188193
| DeleteExtensionAssociationCommandInput
189194
| DeleteExtensionCommandInput
190195
| DeleteHostedConfigurationVersionCommandInput
196+
| GetAccountSettingsCommandInput
191197
| GetApplicationCommandInput
192198
| GetConfigurationCommandInput
193199
| GetConfigurationProfileCommandInput
@@ -210,6 +216,7 @@ export type ServiceInputTypes =
210216
| StopDeploymentCommandInput
211217
| TagResourceCommandInput
212218
| UntagResourceCommandInput
219+
| UpdateAccountSettingsCommandInput
213220
| UpdateApplicationCommandInput
214221
| UpdateConfigurationProfileCommandInput
215222
| UpdateDeploymentStrategyCommandInput
@@ -236,6 +243,7 @@ export type ServiceOutputTypes =
236243
| DeleteExtensionAssociationCommandOutput
237244
| DeleteExtensionCommandOutput
238245
| DeleteHostedConfigurationVersionCommandOutput
246+
| GetAccountSettingsCommandOutput
239247
| GetApplicationCommandOutput
240248
| GetConfigurationCommandOutput
241249
| GetConfigurationProfileCommandOutput
@@ -258,6 +266,7 @@ export type ServiceOutputTypes =
258266
| StopDeploymentCommandOutput
259267
| TagResourceCommandOutput
260268
| UntagResourceCommandOutput
269+
| UpdateAccountSettingsCommandOutput
261270
| UpdateApplicationCommandOutput
262271
| UpdateConfigurationProfileCommandOutput
263272
| UpdateDeploymentStrategyCommandOutput

clients/client-appconfig/src/commands/CreateHostedConfigurationVersionCommand.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,10 @@ export interface CreateHostedConfigurationVersionCommandOutput
5757
__MetadataBearer {}
5858

5959
/**
60-
* <p>Creates a new configuration in the AppConfig hosted configuration
61-
* store.</p>
60+
* <p>Creates a new configuration in the AppConfig hosted configuration store. If
61+
* you're creating a feature flag, we recommend you familiarize yourself with the JSON schema
62+
* for feature flag data. For more information, see <a href="https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-configuration-and-profile-feature-flags.html#appconfig-type-reference-feature-flags">Type reference for AWS.AppConfig.FeatureFlags</a> in the
63+
* <i>AppConfig User Guide</i>.</p>
6264
* @example
6365
* Use a bare-bones client and the command you need to make an API call.
6466
* ```javascript

clients/client-appconfig/src/commands/DeleteApplicationCommand.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ export interface DeleteApplicationCommandInput extends DeleteApplicationRequest
2828
export interface DeleteApplicationCommandOutput extends __MetadataBearer {}
2929

3030
/**
31-
* <p>Deletes an application. Deleting an application does not delete a configuration from a
32-
* host.</p>
31+
* <p>Deletes an application.</p>
3332
* @example
3433
* Use a bare-bones client and the command you need to make an API call.
3534
* ```javascript

clients/client-appconfig/src/commands/DeleteConfigurationProfileCommand.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ export interface DeleteConfigurationProfileCommandInput extends DeleteConfigurat
2828
export interface DeleteConfigurationProfileCommandOutput extends __MetadataBearer {}
2929

3030
/**
31-
* <p>Deletes a configuration profile. Deleting a configuration profile does not delete a
32-
* configuration from a host.</p>
31+
* <p>Deletes a configuration profile.</p>
32+
* <p>To prevent users from unintentionally deleting actively-used configuration profiles,
33+
* enable <a href="https://docs.aws.amazon.com/appconfig/latest/userguide/deletion-protection.html">deletion
34+
* protection</a>.</p>
3335
* @example
3436
* Use a bare-bones client and the command you need to make an API call.
3537
* ```javascript
@@ -39,6 +41,7 @@ export interface DeleteConfigurationProfileCommandOutput extends __MetadataBeare
3941
* const input = { // DeleteConfigurationProfileRequest
4042
* ApplicationId: "STRING_VALUE", // required
4143
* ConfigurationProfileId: "STRING_VALUE", // required
44+
* DeletionProtectionCheck: "ACCOUNT_DEFAULT" || "APPLY" || "BYPASS",
4245
* };
4346
* const command = new DeleteConfigurationProfileCommand(input);
4447
* const response = await client.send(command);

clients/client-appconfig/src/commands/DeleteDeploymentStrategyCommand.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ export interface DeleteDeploymentStrategyCommandInput extends DeleteDeploymentSt
2828
export interface DeleteDeploymentStrategyCommandOutput extends __MetadataBearer {}
2929

3030
/**
31-
* <p>Deletes a deployment strategy. Deleting a deployment strategy does not delete a
32-
* configuration from a host.</p>
31+
* <p>Deletes a deployment strategy.</p>
3332
* @example
3433
* Use a bare-bones client and the command you need to make an API call.
3534
* ```javascript

clients/client-appconfig/src/commands/DeleteEnvironmentCommand.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,19 @@ export interface DeleteEnvironmentCommandInput extends DeleteEnvironmentRequest
2828
export interface DeleteEnvironmentCommandOutput extends __MetadataBearer {}
2929

3030
/**
31-
* <p>Deletes an environment. Deleting an environment does not delete a configuration from a
32-
* host.</p>
31+
* <p>Deletes an environment.</p>
32+
* <p>To prevent users from unintentionally deleting actively-used environments, enable <a href="https://docs.aws.amazon.com/appconfig/latest/userguide/deletion-protection.html">deletion
33+
* protection</a>.</p>
3334
* @example
3435
* Use a bare-bones client and the command you need to make an API call.
3536
* ```javascript
3637
* import { AppConfigClient, DeleteEnvironmentCommand } from "@aws-sdk/client-appconfig"; // ES Modules import
3738
* // const { AppConfigClient, DeleteEnvironmentCommand } = require("@aws-sdk/client-appconfig"); // CommonJS import
3839
* const client = new AppConfigClient(config);
3940
* const input = { // DeleteEnvironmentRequest
40-
* ApplicationId: "STRING_VALUE", // required
4141
* EnvironmentId: "STRING_VALUE", // required
42+
* ApplicationId: "STRING_VALUE", // required
43+
* DeletionProtectionCheck: "ACCOUNT_DEFAULT" || "APPLY" || "BYPASS",
4244
* };
4345
* const command = new DeleteEnvironmentCommand(input);
4446
* const response = await client.send(command);
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
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 { AppConfigClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppConfigClient";
8+
import { commonParams } from "../endpoint/EndpointParameters";
9+
import { AccountSettings } from "../models/models_0";
10+
import { de_GetAccountSettingsCommand, se_GetAccountSettingsCommand } 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 GetAccountSettingsCommand}.
21+
*/
22+
export interface GetAccountSettingsCommandInput {}
23+
/**
24+
* @public
25+
*
26+
* The output of {@link GetAccountSettingsCommand}.
27+
*/
28+
export interface GetAccountSettingsCommandOutput extends AccountSettings, __MetadataBearer {}
29+
30+
/**
31+
* <p>Returns information about the status of the <code>DeletionProtection</code>
32+
* parameter.</p>
33+
* @example
34+
* Use a bare-bones client and the command you need to make an API call.
35+
* ```javascript
36+
* import { AppConfigClient, GetAccountSettingsCommand } from "@aws-sdk/client-appconfig"; // ES Modules import
37+
* // const { AppConfigClient, GetAccountSettingsCommand } = require("@aws-sdk/client-appconfig"); // CommonJS import
38+
* const client = new AppConfigClient(config);
39+
* const input = {};
40+
* const command = new GetAccountSettingsCommand(input);
41+
* const response = await client.send(command);
42+
* // { // AccountSettings
43+
* // DeletionProtection: { // DeletionProtectionSettings
44+
* // Enabled: true || false,
45+
* // ProtectionPeriodInMinutes: Number("int"),
46+
* // },
47+
* // };
48+
*
49+
* ```
50+
*
51+
* @param GetAccountSettingsCommandInput - {@link GetAccountSettingsCommandInput}
52+
* @returns {@link GetAccountSettingsCommandOutput}
53+
* @see {@link GetAccountSettingsCommandInput} for command's `input` shape.
54+
* @see {@link GetAccountSettingsCommandOutput} for command's `response` shape.
55+
* @see {@link AppConfigClientResolvedConfig | config} for AppConfigClient's `config` shape.
56+
*
57+
* @throws {@link BadRequestException} (client fault)
58+
* <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
59+
*
60+
* @throws {@link InternalServerException} (server fault)
61+
* <p>There was an internal failure in the AppConfig service.</p>
62+
*
63+
* @throws {@link AppConfigServiceException}
64+
* <p>Base exception class for all service exceptions from AppConfig service.</p>
65+
*
66+
* @public
67+
*/
68+
export class GetAccountSettingsCommand extends $Command
69+
.classBuilder<
70+
GetAccountSettingsCommandInput,
71+
GetAccountSettingsCommandOutput,
72+
AppConfigClientResolvedConfig,
73+
ServiceInputTypes,
74+
ServiceOutputTypes
75+
>()
76+
.ep({
77+
...commonParams,
78+
})
79+
.m(function (this: any, Command: any, cs: any, config: AppConfigClientResolvedConfig, o: any) {
80+
return [
81+
getSerdePlugin(config, this.serialize, this.deserialize),
82+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
83+
];
84+
})
85+
.s("AmazonAppConfig", "GetAccountSettings", {})
86+
.n("AppConfigClient", "GetAccountSettingsCommand")
87+
.f(void 0, void 0)
88+
.ser(se_GetAccountSettingsCommand)
89+
.de(de_GetAccountSettingsCommand)
90+
.build() {}

clients/client-appconfig/src/commands/GetConfigurationCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export interface GetConfigurationCommandOutput extends GetConfigurationCommandOu
4646
* </li>
4747
* <li>
4848
* <p>
49-
* <code>GetConfiguration</code> is a priced call. For more information, see
49+
* <a>GetConfiguration</a> is a priced call. For more information, see
5050
* <a href="https://aws.amazon.com/systems-manager/pricing/">Pricing</a>.</p>
5151
* </li>
5252
* </ul>

0 commit comments

Comments
 (0)