From 950682d34cf17f946a8f1aa9625a720827d04864 Mon Sep 17 00:00:00 2001 From: awstools Date: Wed, 28 Aug 2024 18:20:08 +0000 Subject: [PATCH] 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. --- clients/client-appconfig/README.md | 16 ++ clients/client-appconfig/src/AppConfig.ts | 48 +++++ .../client-appconfig/src/AppConfigClient.ts | 9 + ...CreateHostedConfigurationVersionCommand.ts | 6 +- .../src/commands/DeleteApplicationCommand.ts | 3 +- .../DeleteConfigurationProfileCommand.ts | 7 +- .../DeleteDeploymentStrategyCommand.ts | 3 +- .../src/commands/DeleteEnvironmentCommand.ts | 8 +- .../src/commands/GetAccountSettingsCommand.ts | 90 +++++++++ .../src/commands/GetConfigurationCommand.ts | 2 +- .../commands/UpdateAccountSettingsCommand.ts | 94 +++++++++ .../client-appconfig/src/commands/index.ts | 2 + .../client-appconfig/src/models/models_0.ts | 178 ++++++++++++++++-- .../src/protocols/Aws_restJson1.ts | 101 +++++++++- codegen/sdk-codegen/aws-models/appconfig.json | 178 ++++++++++++++++-- 15 files changed, 700 insertions(+), 45 deletions(-) create mode 100644 clients/client-appconfig/src/commands/GetAccountSettingsCommand.ts create mode 100644 clients/client-appconfig/src/commands/UpdateAccountSettingsCommand.ts diff --git a/clients/client-appconfig/README.md b/clients/client-appconfig/README.md index 64bce3a1b927e..20f580b09d1c2 100644 --- a/clients/client-appconfig/README.md +++ b/clients/client-appconfig/README.md @@ -463,6 +463,14 @@ DeleteHostedConfigurationVersion [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/) + +
+ +GetAccountSettings + + +[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/) +
@@ -639,6 +647,14 @@ UntagResource [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/) +
+
+ +UpdateAccountSettings + + +[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/) +
diff --git a/clients/client-appconfig/src/AppConfig.ts b/clients/client-appconfig/src/AppConfig.ts index cd2615fd211e7..789ffbfac8a04 100644 --- a/clients/client-appconfig/src/AppConfig.ts +++ b/clients/client-appconfig/src/AppConfig.ts @@ -73,6 +73,11 @@ import { DeleteHostedConfigurationVersionCommandInput, DeleteHostedConfigurationVersionCommandOutput, } from "./commands/DeleteHostedConfigurationVersionCommand"; +import { + GetAccountSettingsCommand, + GetAccountSettingsCommandInput, + GetAccountSettingsCommandOutput, +} from "./commands/GetAccountSettingsCommand"; import { GetApplicationCommand, GetApplicationCommandInput, @@ -179,6 +184,11 @@ import { UntagResourceCommandInput, UntagResourceCommandOutput, } from "./commands/UntagResourceCommand"; +import { + UpdateAccountSettingsCommand, + UpdateAccountSettingsCommandInput, + UpdateAccountSettingsCommandOutput, +} from "./commands/UpdateAccountSettingsCommand"; import { UpdateApplicationCommand, UpdateApplicationCommandInput, @@ -230,6 +240,7 @@ const commands = { DeleteExtensionCommand, DeleteExtensionAssociationCommand, DeleteHostedConfigurationVersionCommand, + GetAccountSettingsCommand, GetApplicationCommand, GetConfigurationCommand, GetConfigurationProfileCommand, @@ -252,6 +263,7 @@ const commands = { StopDeploymentCommand, TagResourceCommand, UntagResourceCommand, + UpdateAccountSettingsCommand, UpdateApplicationCommand, UpdateConfigurationProfileCommand, UpdateDeploymentStrategyCommand, @@ -494,6 +506,24 @@ export interface AppConfig { cb: (err: any, data?: DeleteHostedConfigurationVersionCommandOutput) => void ): void; + /** + * @see {@link GetAccountSettingsCommand} + */ + getAccountSettings(): Promise; + getAccountSettings( + args: GetAccountSettingsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getAccountSettings( + args: GetAccountSettingsCommandInput, + cb: (err: any, data?: GetAccountSettingsCommandOutput) => void + ): void; + getAccountSettings( + args: GetAccountSettingsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetAccountSettingsCommandOutput) => void + ): void; + /** * @see {@link GetApplicationCommand} */ @@ -830,6 +860,24 @@ export interface AppConfig { cb: (err: any, data?: UntagResourceCommandOutput) => void ): void; + /** + * @see {@link UpdateAccountSettingsCommand} + */ + updateAccountSettings(): Promise; + updateAccountSettings( + args: UpdateAccountSettingsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + updateAccountSettings( + args: UpdateAccountSettingsCommandInput, + cb: (err: any, data?: UpdateAccountSettingsCommandOutput) => void + ): void; + updateAccountSettings( + args: UpdateAccountSettingsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateAccountSettingsCommandOutput) => void + ): void; + /** * @see {@link UpdateApplicationCommand} */ diff --git a/clients/client-appconfig/src/AppConfigClient.ts b/clients/client-appconfig/src/AppConfigClient.ts index bab2e11eece60..98dfb451103d1 100644 --- a/clients/client-appconfig/src/AppConfigClient.ts +++ b/clients/client-appconfig/src/AppConfigClient.ts @@ -91,6 +91,7 @@ import { DeleteHostedConfigurationVersionCommandInput, DeleteHostedConfigurationVersionCommandOutput, } from "./commands/DeleteHostedConfigurationVersionCommand"; +import { GetAccountSettingsCommandInput, GetAccountSettingsCommandOutput } from "./commands/GetAccountSettingsCommand"; import { GetApplicationCommandInput, GetApplicationCommandOutput } from "./commands/GetApplicationCommand"; import { GetConfigurationCommandInput, GetConfigurationCommandOutput } from "./commands/GetConfigurationCommand"; import { @@ -140,6 +141,10 @@ import { StartDeploymentCommandInput, StartDeploymentCommandOutput } from "./com import { StopDeploymentCommandInput, StopDeploymentCommandOutput } from "./commands/StopDeploymentCommand"; import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand"; +import { + UpdateAccountSettingsCommandInput, + UpdateAccountSettingsCommandOutput, +} from "./commands/UpdateAccountSettingsCommand"; import { UpdateApplicationCommandInput, UpdateApplicationCommandOutput } from "./commands/UpdateApplicationCommand"; import { UpdateConfigurationProfileCommandInput, @@ -188,6 +193,7 @@ export type ServiceInputTypes = | DeleteExtensionAssociationCommandInput | DeleteExtensionCommandInput | DeleteHostedConfigurationVersionCommandInput + | GetAccountSettingsCommandInput | GetApplicationCommandInput | GetConfigurationCommandInput | GetConfigurationProfileCommandInput @@ -210,6 +216,7 @@ export type ServiceInputTypes = | StopDeploymentCommandInput | TagResourceCommandInput | UntagResourceCommandInput + | UpdateAccountSettingsCommandInput | UpdateApplicationCommandInput | UpdateConfigurationProfileCommandInput | UpdateDeploymentStrategyCommandInput @@ -236,6 +243,7 @@ export type ServiceOutputTypes = | DeleteExtensionAssociationCommandOutput | DeleteExtensionCommandOutput | DeleteHostedConfigurationVersionCommandOutput + | GetAccountSettingsCommandOutput | GetApplicationCommandOutput | GetConfigurationCommandOutput | GetConfigurationProfileCommandOutput @@ -258,6 +266,7 @@ export type ServiceOutputTypes = | StopDeploymentCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput + | UpdateAccountSettingsCommandOutput | UpdateApplicationCommandOutput | UpdateConfigurationProfileCommandOutput | UpdateDeploymentStrategyCommandOutput diff --git a/clients/client-appconfig/src/commands/CreateHostedConfigurationVersionCommand.ts b/clients/client-appconfig/src/commands/CreateHostedConfigurationVersionCommand.ts index 30d1a3e36bdc6..6b2e9db59e159 100644 --- a/clients/client-appconfig/src/commands/CreateHostedConfigurationVersionCommand.ts +++ b/clients/client-appconfig/src/commands/CreateHostedConfigurationVersionCommand.ts @@ -57,8 +57,10 @@ export interface CreateHostedConfigurationVersionCommandOutput __MetadataBearer {} /** - *

Creates a new configuration in the AppConfig hosted configuration - * store.

+ *

Creates a new configuration in the AppConfig hosted configuration store. If + * you're creating a feature flag, we recommend you familiarize yourself with the JSON schema + * for feature flag data. For more information, see Type reference for AWS.AppConfig.FeatureFlags in the + * AppConfig User Guide.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-appconfig/src/commands/DeleteApplicationCommand.ts b/clients/client-appconfig/src/commands/DeleteApplicationCommand.ts index 697930f8b90d6..ef7f5525a9124 100644 --- a/clients/client-appconfig/src/commands/DeleteApplicationCommand.ts +++ b/clients/client-appconfig/src/commands/DeleteApplicationCommand.ts @@ -28,8 +28,7 @@ export interface DeleteApplicationCommandInput extends DeleteApplicationRequest export interface DeleteApplicationCommandOutput extends __MetadataBearer {} /** - *

Deletes an application. Deleting an application does not delete a configuration from a - * host.

+ *

Deletes an application.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-appconfig/src/commands/DeleteConfigurationProfileCommand.ts b/clients/client-appconfig/src/commands/DeleteConfigurationProfileCommand.ts index b62027121e793..d4f350e8ba84b 100644 --- a/clients/client-appconfig/src/commands/DeleteConfigurationProfileCommand.ts +++ b/clients/client-appconfig/src/commands/DeleteConfigurationProfileCommand.ts @@ -28,8 +28,10 @@ export interface DeleteConfigurationProfileCommandInput extends DeleteConfigurat export interface DeleteConfigurationProfileCommandOutput extends __MetadataBearer {} /** - *

Deletes a configuration profile. Deleting a configuration profile does not delete a - * configuration from a host.

+ *

Deletes a configuration profile.

+ *

To prevent users from unintentionally deleting actively-used configuration profiles, + * enable deletion + * protection.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript @@ -39,6 +41,7 @@ export interface DeleteConfigurationProfileCommandOutput extends __MetadataBeare * const input = { // DeleteConfigurationProfileRequest * ApplicationId: "STRING_VALUE", // required * ConfigurationProfileId: "STRING_VALUE", // required + * DeletionProtectionCheck: "ACCOUNT_DEFAULT" || "APPLY" || "BYPASS", * }; * const command = new DeleteConfigurationProfileCommand(input); * const response = await client.send(command); diff --git a/clients/client-appconfig/src/commands/DeleteDeploymentStrategyCommand.ts b/clients/client-appconfig/src/commands/DeleteDeploymentStrategyCommand.ts index ef99076d37b00..3cfe8caf9555a 100644 --- a/clients/client-appconfig/src/commands/DeleteDeploymentStrategyCommand.ts +++ b/clients/client-appconfig/src/commands/DeleteDeploymentStrategyCommand.ts @@ -28,8 +28,7 @@ export interface DeleteDeploymentStrategyCommandInput extends DeleteDeploymentSt export interface DeleteDeploymentStrategyCommandOutput extends __MetadataBearer {} /** - *

Deletes a deployment strategy. Deleting a deployment strategy does not delete a - * configuration from a host.

+ *

Deletes a deployment strategy.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-appconfig/src/commands/DeleteEnvironmentCommand.ts b/clients/client-appconfig/src/commands/DeleteEnvironmentCommand.ts index 638622d4377af..b22bfcfa5befb 100644 --- a/clients/client-appconfig/src/commands/DeleteEnvironmentCommand.ts +++ b/clients/client-appconfig/src/commands/DeleteEnvironmentCommand.ts @@ -28,8 +28,9 @@ export interface DeleteEnvironmentCommandInput extends DeleteEnvironmentRequest export interface DeleteEnvironmentCommandOutput extends __MetadataBearer {} /** - *

Deletes an environment. Deleting an environment does not delete a configuration from a - * host.

+ *

Deletes an environment.

+ *

To prevent users from unintentionally deleting actively-used environments, enable deletion + * protection.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript @@ -37,8 +38,9 @@ export interface DeleteEnvironmentCommandOutput extends __MetadataBearer {} * // const { AppConfigClient, DeleteEnvironmentCommand } = require("@aws-sdk/client-appconfig"); // CommonJS import * const client = new AppConfigClient(config); * const input = { // DeleteEnvironmentRequest - * ApplicationId: "STRING_VALUE", // required * EnvironmentId: "STRING_VALUE", // required + * ApplicationId: "STRING_VALUE", // required + * DeletionProtectionCheck: "ACCOUNT_DEFAULT" || "APPLY" || "BYPASS", * }; * const command = new DeleteEnvironmentCommand(input); * const response = await client.send(command); diff --git a/clients/client-appconfig/src/commands/GetAccountSettingsCommand.ts b/clients/client-appconfig/src/commands/GetAccountSettingsCommand.ts new file mode 100644 index 0000000000000..03141c29bece1 --- /dev/null +++ b/clients/client-appconfig/src/commands/GetAccountSettingsCommand.ts @@ -0,0 +1,90 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { AppConfigClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppConfigClient"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { AccountSettings } from "../models/models_0"; +import { de_GetAccountSettingsCommand, se_GetAccountSettingsCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link GetAccountSettingsCommand}. + */ +export interface GetAccountSettingsCommandInput {} +/** + * @public + * + * The output of {@link GetAccountSettingsCommand}. + */ +export interface GetAccountSettingsCommandOutput extends AccountSettings, __MetadataBearer {} + +/** + *

Returns information about the status of the DeletionProtection + * parameter.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AppConfigClient, GetAccountSettingsCommand } from "@aws-sdk/client-appconfig"; // ES Modules import + * // const { AppConfigClient, GetAccountSettingsCommand } = require("@aws-sdk/client-appconfig"); // CommonJS import + * const client = new AppConfigClient(config); + * const input = {}; + * const command = new GetAccountSettingsCommand(input); + * const response = await client.send(command); + * // { // AccountSettings + * // DeletionProtection: { // DeletionProtectionSettings + * // Enabled: true || false, + * // ProtectionPeriodInMinutes: Number("int"), + * // }, + * // }; + * + * ``` + * + * @param GetAccountSettingsCommandInput - {@link GetAccountSettingsCommandInput} + * @returns {@link GetAccountSettingsCommandOutput} + * @see {@link GetAccountSettingsCommandInput} for command's `input` shape. + * @see {@link GetAccountSettingsCommandOutput} for command's `response` shape. + * @see {@link AppConfigClientResolvedConfig | config} for AppConfigClient's `config` shape. + * + * @throws {@link BadRequestException} (client fault) + *

The input fails to satisfy the constraints specified by an Amazon Web Services service.

+ * + * @throws {@link InternalServerException} (server fault) + *

There was an internal failure in the AppConfig service.

+ * + * @throws {@link AppConfigServiceException} + *

Base exception class for all service exceptions from AppConfig service.

+ * + * @public + */ +export class GetAccountSettingsCommand extends $Command + .classBuilder< + GetAccountSettingsCommandInput, + GetAccountSettingsCommandOutput, + AppConfigClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep({ + ...commonParams, + }) + .m(function (this: any, Command: any, cs: any, config: AppConfigClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonAppConfig", "GetAccountSettings", {}) + .n("AppConfigClient", "GetAccountSettingsCommand") + .f(void 0, void 0) + .ser(se_GetAccountSettingsCommand) + .de(de_GetAccountSettingsCommand) + .build() {} diff --git a/clients/client-appconfig/src/commands/GetConfigurationCommand.ts b/clients/client-appconfig/src/commands/GetConfigurationCommand.ts index 6aef631c9d1da..30ecc9c95cbed 100644 --- a/clients/client-appconfig/src/commands/GetConfigurationCommand.ts +++ b/clients/client-appconfig/src/commands/GetConfigurationCommand.ts @@ -46,7 +46,7 @@ export interface GetConfigurationCommandOutput extends GetConfigurationCommandOu * *
  • *

    - * GetConfiguration is a priced call. For more information, see + * GetConfiguration is a priced call. For more information, see * Pricing.

    *
  • * diff --git a/clients/client-appconfig/src/commands/UpdateAccountSettingsCommand.ts b/clients/client-appconfig/src/commands/UpdateAccountSettingsCommand.ts new file mode 100644 index 0000000000000..7eafe7d2eaa8d --- /dev/null +++ b/clients/client-appconfig/src/commands/UpdateAccountSettingsCommand.ts @@ -0,0 +1,94 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { AppConfigClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppConfigClient"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { AccountSettings, UpdateAccountSettingsRequest } from "../models/models_0"; +import { de_UpdateAccountSettingsCommand, se_UpdateAccountSettingsCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link UpdateAccountSettingsCommand}. + */ +export interface UpdateAccountSettingsCommandInput extends UpdateAccountSettingsRequest {} +/** + * @public + * + * The output of {@link UpdateAccountSettingsCommand}. + */ +export interface UpdateAccountSettingsCommandOutput extends AccountSettings, __MetadataBearer {} + +/** + *

    Updates the value of the DeletionProtection parameter.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AppConfigClient, UpdateAccountSettingsCommand } from "@aws-sdk/client-appconfig"; // ES Modules import + * // const { AppConfigClient, UpdateAccountSettingsCommand } = require("@aws-sdk/client-appconfig"); // CommonJS import + * const client = new AppConfigClient(config); + * const input = { // UpdateAccountSettingsRequest + * DeletionProtection: { // DeletionProtectionSettings + * Enabled: true || false, + * ProtectionPeriodInMinutes: Number("int"), + * }, + * }; + * const command = new UpdateAccountSettingsCommand(input); + * const response = await client.send(command); + * // { // AccountSettings + * // DeletionProtection: { // DeletionProtectionSettings + * // Enabled: true || false, + * // ProtectionPeriodInMinutes: Number("int"), + * // }, + * // }; + * + * ``` + * + * @param UpdateAccountSettingsCommandInput - {@link UpdateAccountSettingsCommandInput} + * @returns {@link UpdateAccountSettingsCommandOutput} + * @see {@link UpdateAccountSettingsCommandInput} for command's `input` shape. + * @see {@link UpdateAccountSettingsCommandOutput} for command's `response` shape. + * @see {@link AppConfigClientResolvedConfig | config} for AppConfigClient's `config` shape. + * + * @throws {@link BadRequestException} (client fault) + *

    The input fails to satisfy the constraints specified by an Amazon Web Services service.

    + * + * @throws {@link InternalServerException} (server fault) + *

    There was an internal failure in the AppConfig service.

    + * + * @throws {@link AppConfigServiceException} + *

    Base exception class for all service exceptions from AppConfig service.

    + * + * @public + */ +export class UpdateAccountSettingsCommand extends $Command + .classBuilder< + UpdateAccountSettingsCommandInput, + UpdateAccountSettingsCommandOutput, + AppConfigClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep({ + ...commonParams, + }) + .m(function (this: any, Command: any, cs: any, config: AppConfigClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonAppConfig", "UpdateAccountSettings", {}) + .n("AppConfigClient", "UpdateAccountSettingsCommand") + .f(void 0, void 0) + .ser(se_UpdateAccountSettingsCommand) + .de(de_UpdateAccountSettingsCommand) + .build() {} diff --git a/clients/client-appconfig/src/commands/index.ts b/clients/client-appconfig/src/commands/index.ts index 0ecfa59bc33d3..22e99b272637f 100644 --- a/clients/client-appconfig/src/commands/index.ts +++ b/clients/client-appconfig/src/commands/index.ts @@ -13,6 +13,7 @@ export * from "./DeleteEnvironmentCommand"; export * from "./DeleteExtensionAssociationCommand"; export * from "./DeleteExtensionCommand"; export * from "./DeleteHostedConfigurationVersionCommand"; +export * from "./GetAccountSettingsCommand"; export * from "./GetApplicationCommand"; export * from "./GetConfigurationCommand"; export * from "./GetConfigurationProfileCommand"; @@ -35,6 +36,7 @@ export * from "./StartDeploymentCommand"; export * from "./StopDeploymentCommand"; export * from "./TagResourceCommand"; export * from "./UntagResourceCommand"; +export * from "./UpdateAccountSettingsCommand"; export * from "./UpdateApplicationCommand"; export * from "./UpdateConfigurationProfileCommand"; export * from "./UpdateDeploymentStrategyCommand"; diff --git a/clients/client-appconfig/src/models/models_0.ts b/clients/client-appconfig/src/models/models_0.ts index 5576880c1ac0a..da520786109de 100644 --- a/clients/client-appconfig/src/models/models_0.ts +++ b/clients/client-appconfig/src/models/models_0.ts @@ -3,6 +3,63 @@ import { ExceptionOptionType as __ExceptionOptionType, SENSITIVE_STRING } from " import { AppConfigServiceException as __BaseException } from "./AppConfigServiceException"; +/** + *

    A parameter to configure deletion protection. If enabled, deletion protection prevents a + * user from deleting a configuration profile or an environment if AppConfig has + * called either GetLatestConfiguration or for the + * configuration profile or from the environment during the specified interval.

    + *

    This setting uses the following default values:

    + *
      + *
    • + *

      Deletion protection is disabled by default.

      + *
    • + *
    • + *

      The default interval specified by ProtectionPeriodInMinutes is + * 60.

      + *
    • + *
    • + *

      + * DeletionProtectionCheck skips configuration profiles and environments + * that were created in the past hour.

      + *
    • + *
    + * @public + */ +export interface DeletionProtectionSettings { + /** + *

    A parameter that indicates if deletion protection is enabled or not.

    + * @public + */ + Enabled?: boolean; + + /** + *

    The time interval during which AppConfig monitors for calls to GetLatestConfiguration or for a + * configuration profile or from an environment. AppConfig returns an error if a + * user calls or for the designated configuration profile or + * environment. To bypass the error and delete a configuration profile or an environment, + * specify BYPASS for the DeletionProtectionCheck parameter for + * either or .

    + * @public + */ + ProtectionPeriodInMinutes?: number; +} + +/** + * @public + */ +export interface AccountSettings { + /** + *

    A parameter to configure deletion protection. If enabled, deletion protection prevents a + * user from deleting a configuration profile or an environment if AppConfig has + * called either GetLatestConfiguration or for the + * configuration profile or from the environment during the specified interval. Deletion + * protection is disabled by default. The default interval for + * ProtectionPeriodInMinutes is 60.

    + * @public + */ + DeletionProtection?: DeletionProtectionSettings; +} + /** *

    An action defines the tasks that the extension performs during the AppConfig * workflow. Each action includes an action point such as @@ -387,8 +444,8 @@ export type ValidatorType = (typeof ValidatorType)[keyof typeof ValidatorType]; *

    A validator provides a syntactic or semantic check to ensure the configuration that you * want to deploy functions as intended. To validate your application configuration data, you * provide a schema or an Amazon Web Services Lambda function that runs against the configuration. The - * configuration deployment or update can only proceed when the configuration data is - * valid.

    + * configuration deployment or update can only proceed when the configuration data is valid. + * For more information, see About validators in the AppConfig User Guide.

    * @public */ export interface Validator { @@ -1166,7 +1223,11 @@ export interface CreateHostedConfigurationVersionRequest { Description?: string; /** - *

    The content of the configuration or the configuration data.

    + *

    The configuration data, as bytes.

    + * + *

    AppConfig accepts any type of data, including text formats like JSON or + * TOML, or binary formats like protocol buffers or compressed data.

    + *
    * @public */ Content: Uint8Array | undefined; @@ -1304,6 +1365,21 @@ export interface DeleteApplicationRequest { ApplicationId: string | undefined; } +/** + * @public + * @enum + */ +export const DeletionProtectionCheck = { + ACCOUNT_DEFAULT: "ACCOUNT_DEFAULT", + APPLY: "APPLY", + BYPASS: "BYPASS", +} as const; + +/** + * @public + */ +export type DeletionProtectionCheck = (typeof DeletionProtectionCheck)[keyof typeof DeletionProtectionCheck]; + /** * @public */ @@ -1319,6 +1395,35 @@ export interface DeleteConfigurationProfileRequest { * @public */ ConfigurationProfileId: string | undefined; + + /** + *

    A parameter to configure deletion protection. If enabled, deletion protection prevents a + * user from deleting a configuration profile if your application has called either GetLatestConfiguration or for the + * configuration profile during the specified interval.

    + *

    This parameter supports the following values:

    + *
      + *
    • + *

      + * BYPASS: Instructs AppConfig to bypass the deletion + * protection check and delete a configuration profile even if deletion protection would + * have otherwise prevented it.

      + *
    • + *
    • + *

      + * APPLY: Instructs the deletion protection check to run, even if + * deletion protection is disabled at the account level. APPLY also forces + * the deletion protection check to run against resources created in the past hour, + * which are normally excluded from deletion protection checks.

      + *
    • + *
    • + *

      + * ACCOUNT_DEFAULT: The default setting, which instructs AppConfig to implement the deletion protection value specified in the + * UpdateAccountSettings API.

      + *
    • + *
    + * @public + */ + DeletionProtectionCheck?: DeletionProtectionCheck; } /** @@ -1336,6 +1441,12 @@ export interface DeleteDeploymentStrategyRequest { * @public */ export interface DeleteEnvironmentRequest { + /** + *

    The ID of the environment that you want to delete.

    + * @public + */ + EnvironmentId: string | undefined; + /** *

    The application ID that includes the environment that you want to delete.

    * @public @@ -1343,10 +1454,33 @@ export interface DeleteEnvironmentRequest { ApplicationId: string | undefined; /** - *

    The ID of the environment that you want to delete.

    + *

    A parameter to configure deletion protection. If enabled, deletion protection prevents a + * user from deleting an environment if your application called either GetLatestConfiguration or in the + * environment during the specified interval.

    + *

    This parameter supports the following values:

    + *
      + *
    • + *

      + * BYPASS: Instructs AppConfig to bypass the deletion + * protection check and delete a configuration profile even if deletion protection would + * have otherwise prevented it.

      + *
    • + *
    • + *

      + * APPLY: Instructs the deletion protection check to run, even if + * deletion protection is disabled at the account level. APPLY also forces + * the deletion protection check to run against resources created in the past hour, + * which are normally excluded from deletion protection checks.

      + *
    • + *
    • + *

      + * ACCOUNT_DEFAULT: The default setting, which instructs AppConfig to implement the deletion protection value specified in the + * UpdateAccountSettings API.

      + *
    • + *
    * @public */ - EnvironmentId: string | undefined; + DeletionProtectionCheck?: DeletionProtectionCheck; } /** @@ -1477,22 +1611,20 @@ export interface GetConfigurationRequest { ClientId: string | undefined; /** - *

    The configuration version returned in the most recent GetConfiguration + *

    The configuration version returned in the most recent GetConfiguration * response.

    * *

    AppConfig uses the value of the ClientConfigurationVersion * parameter to identify the configuration version on your clients. If you don’t send - * ClientConfigurationVersion with each call to - * GetConfiguration, your clients receive the current configuration. You - * are charged each time your clients receive a configuration.

    + * ClientConfigurationVersion with each call to GetConfiguration, your clients receive the current configuration. You are + * charged each time your clients receive a configuration.

    *

    To avoid excess charges, we recommend you use the StartConfigurationSession and GetLatestConfiguration APIs, which track the client configuration version on - * your behalf. If you choose to continue using GetConfiguration, we recommend - * that you include the ClientConfigurationVersion value with every call to - * GetConfiguration. The value to use for + * your behalf. If you choose to continue using GetConfiguration, we + * recommend that you include the ClientConfigurationVersion value with every + * call to GetConfiguration. The value to use for * ClientConfigurationVersion comes from the - * ConfigurationVersion attribute returned by GetConfiguration - * when there is new or updated data, and should be saved for subsequent calls to - * GetConfiguration.

    + * ConfigurationVersion attribute returned by GetConfiguration when there is new or updated data, and should be saved + * for subsequent calls to GetConfiguration.

    *
    *

    For more information about working with configurations, see Retrieving the * Configuration in the AppConfig User Guide.

    @@ -2670,6 +2802,22 @@ export interface UntagResourceRequest { TagKeys: string[] | undefined; } +/** + * @public + */ +export interface UpdateAccountSettingsRequest { + /** + *

    A parameter to configure deletion protection. If enabled, deletion protection prevents a + * user from deleting a configuration profile or an environment if AppConfig has + * called either GetLatestConfiguration or for the + * configuration profile or from the environment during the specified interval. Deletion + * protection is disabled by default. The default interval for + * ProtectionPeriodInMinutes is 60.

    + * @public + */ + DeletionProtection?: DeletionProtectionSettings; +} + /** * @public */ diff --git a/clients/client-appconfig/src/protocols/Aws_restJson1.ts b/clients/client-appconfig/src/protocols/Aws_restJson1.ts index 631c98c714e7f..510a9af0f8881 100644 --- a/clients/client-appconfig/src/protocols/Aws_restJson1.ts +++ b/clients/client-appconfig/src/protocols/Aws_restJson1.ts @@ -69,6 +69,7 @@ import { DeleteHostedConfigurationVersionCommandInput, DeleteHostedConfigurationVersionCommandOutput, } from "../commands/DeleteHostedConfigurationVersionCommand"; +import { GetAccountSettingsCommandInput, GetAccountSettingsCommandOutput } from "../commands/GetAccountSettingsCommand"; import { GetApplicationCommandInput, GetApplicationCommandOutput } from "../commands/GetApplicationCommand"; import { GetConfigurationCommandInput, GetConfigurationCommandOutput } from "../commands/GetConfigurationCommand"; import { @@ -118,6 +119,10 @@ import { StartDeploymentCommandInput, StartDeploymentCommandOutput } from "../co import { StopDeploymentCommandInput, StopDeploymentCommandOutput } from "../commands/StopDeploymentCommand"; import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand"; import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand"; +import { + UpdateAccountSettingsCommandInput, + UpdateAccountSettingsCommandOutput, +} from "../commands/UpdateAccountSettingsCommand"; import { UpdateApplicationCommandInput, UpdateApplicationCommandOutput } from "../commands/UpdateApplicationCommand"; import { UpdateConfigurationProfileCommandInput, @@ -143,6 +148,7 @@ import { ActionPoint, BadRequestException, ConflictException, + DeletionProtectionSettings, DeploymentEvent, DeploymentStrategy, DeploymentSummary, @@ -366,7 +372,9 @@ export const se_DeleteConfigurationProfileCommand = async ( context: __SerdeContext ): Promise<__HttpRequest> => { const b = rb(input, context); - const headers: any = {}; + const headers: any = map({}, isSerializableHeaderValue, { + [_xadpc]: input[_DPC]!, + }); b.bp("/applications/{ApplicationId}/configurationprofiles/{ConfigurationProfileId}"); b.p("ApplicationId", () => input.ApplicationId!, "{ApplicationId}", false); b.p("ConfigurationProfileId", () => input.ConfigurationProfileId!, "{ConfigurationProfileId}", false); @@ -399,10 +407,12 @@ export const se_DeleteEnvironmentCommand = async ( context: __SerdeContext ): Promise<__HttpRequest> => { const b = rb(input, context); - const headers: any = {}; + const headers: any = map({}, isSerializableHeaderValue, { + [_xadpc]: input[_DPC]!, + }); b.bp("/applications/{ApplicationId}/environments/{EnvironmentId}"); - b.p("ApplicationId", () => input.ApplicationId!, "{ApplicationId}", false); b.p("EnvironmentId", () => input.EnvironmentId!, "{EnvironmentId}", false); + b.p("ApplicationId", () => input.ApplicationId!, "{ApplicationId}", false); let body: any; b.m("DELETE").h(headers).b(body); return b.build(); @@ -463,6 +473,21 @@ export const se_DeleteHostedConfigurationVersionCommand = async ( return b.build(); }; +/** + * serializeAws_restJson1GetAccountSettingsCommand + */ +export const se_GetAccountSettingsCommand = async ( + input: GetAccountSettingsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = {}; + b.bp("/settings"); + let body: any; + b.m("GET").h(headers).b(body); + return b.build(); +}; + /** * serializeAws_restJson1GetApplicationCommand */ @@ -897,6 +922,28 @@ export const se_UntagResourceCommand = async ( return b.build(); }; +/** + * serializeAws_restJson1UpdateAccountSettingsCommand + */ +export const se_UpdateAccountSettingsCommand = async ( + input: UpdateAccountSettingsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = { + "content-type": "application/json", + }; + b.bp("/settings"); + let body: any; + body = JSON.stringify( + take(input, { + DeletionProtection: (_) => _json(_), + }) + ); + b.m("PATCH").h(headers).b(body); + return b.build(); +}; + /** * serializeAws_restJson1UpdateApplicationCommand */ @@ -1375,6 +1422,27 @@ export const de_DeleteHostedConfigurationVersionCommand = async ( return contents; }; +/** + * deserializeAws_restJson1GetAccountSettingsCommand + */ +export const de_GetAccountSettingsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + DeletionProtection: _json, + }); + Object.assign(contents, doc); + return contents; +}; + /** * deserializeAws_restJson1GetApplicationCommand */ @@ -1937,6 +2005,27 @@ export const de_UntagResourceCommand = async ( return contents; }; +/** + * deserializeAws_restJson1UpdateAccountSettingsCommand + */ +export const de_UpdateAccountSettingsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + DeletionProtection: _json, + }); + Object.assign(contents, doc); + return contents; +}; + /** * deserializeAws_restJson1UpdateApplicationCommand */ @@ -2279,6 +2368,8 @@ const de_ServiceQuotaExceededExceptionRes = async ( // se_ActionsMap omitted. +// se_DeletionProtectionSettings omitted. + // se_DynamicParameterMap omitted. // se_Monitor omitted. @@ -2321,6 +2412,8 @@ const de_ServiceQuotaExceededExceptionRes = async ( // de_ConfigurationProfileSummaryList omitted. +// de_DeletionProtectionSettings omitted. + /** * deserializeAws_restJson1DeploymentEvent */ @@ -2470,6 +2563,7 @@ const _CPI = "ConfigurationProfileId"; const _CT = "ContentType"; const _CV = "ConfigurationVersion"; const _D = "Description"; +const _DPC = "DeletionProtectionCheck"; const _EI = "ExtensionIdentifier"; const _EVN = "ExtensionVersionNumber"; const _KKA = "KmsKeyArn"; @@ -2505,3 +2599,4 @@ const _ve = "version"; const _vl = "version_label"; const _vn = "version_number"; const _vn_ = "version-number"; +const _xadpc = "x-amzn-deletion-protection-check"; diff --git a/codegen/sdk-codegen/aws-models/appconfig.json b/codegen/sdk-codegen/aws-models/appconfig.json index d01b4b0aa7bd7..635d0b5bb5d0b 100644 --- a/codegen/sdk-codegen/aws-models/appconfig.json +++ b/codegen/sdk-codegen/aws-models/appconfig.json @@ -29,6 +29,17 @@ ] }, "shapes": { + "com.amazonaws.appconfig#AccountSettings": { + "type": "structure", + "members": { + "DeletionProtection": { + "target": "com.amazonaws.appconfig#DeletionProtectionSettings", + "traits": { + "smithy.api#documentation": "

    A parameter to configure deletion protection. If enabled, deletion protection prevents a\n user from deleting a configuration profile or an environment if AppConfig has\n called either GetLatestConfiguration or for the\n configuration profile or from the environment during the specified interval. Deletion\n protection is disabled by default. The default interval for\n ProtectionPeriodInMinutes is 60.

    " + } + } + } + }, "com.amazonaws.appconfig#Action": { "type": "structure", "members": { @@ -237,6 +248,9 @@ { "target": "com.amazonaws.appconfig#DeleteHostedConfigurationVersion" }, + { + "target": "com.amazonaws.appconfig#GetAccountSettings" + }, { "target": "com.amazonaws.appconfig#GetApplication" }, @@ -303,6 +317,9 @@ { "target": "com.amazonaws.appconfig#UntagResource" }, + { + "target": "com.amazonaws.appconfig#UpdateAccountSettings" + }, { "target": "com.amazonaws.appconfig#UpdateApplication" }, @@ -1424,7 +1441,7 @@ "min": 20, "max": 2048 }, - "smithy.api#pattern": "^arn:(aws[a-zA-Z-]*)?:[a-z]+:([a-z]{2}((-gov)|(-iso(b?)))?-[a-z]+-\\d{1})?:(\\d{12})?:[a-zA-Z0-9-_/:.]+$" + "smithy.api#pattern": "^arn:(aws[a-zA-Z-]*)?:[a-z]+:([a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\\d{1})?:(\\d{12})?:[a-zA-Z0-9-_/:.]+$" } }, "com.amazonaws.appconfig#BadRequestDetails": { @@ -2235,7 +2252,7 @@ } ], "traits": { - "smithy.api#documentation": "

    Creates a new configuration in the AppConfig hosted configuration\n store.

    ", + "smithy.api#documentation": "

    Creates a new configuration in the AppConfig hosted configuration store. If\n you're creating a feature flag, we recommend you familiarize yourself with the JSON schema\n for feature flag data. For more information, see Type reference for AWS.AppConfig.FeatureFlags in the\n AppConfig User Guide.

    ", "smithy.api#examples": [ { "title": "To create a hosted configuration version", @@ -2291,7 +2308,7 @@ "Content": { "target": "com.amazonaws.appconfig#Blob", "traits": { - "smithy.api#documentation": "

    The content of the configuration or the configuration data.

    ", + "smithy.api#documentation": "

    The configuration data, as bytes.

    \n \n

    AppConfig accepts any type of data, including text formats like JSON or\n TOML, or binary formats like protocol buffers or compressed data.

    \n
    ", "smithy.api#httpPayload": {}, "smithy.api#required": {} } @@ -2344,7 +2361,7 @@ } ], "traits": { - "smithy.api#documentation": "

    Deletes an application. Deleting an application does not delete a configuration from a\n host.

    ", + "smithy.api#documentation": "

    Deletes an application.

    ", "smithy.api#examples": [ { "title": "To delete an application", @@ -2400,7 +2417,7 @@ } ], "traits": { - "smithy.api#documentation": "

    Deletes a configuration profile. Deleting a configuration profile does not delete a\n configuration from a host.

    ", + "smithy.api#documentation": "

    Deletes a configuration profile.

    \n

    To prevent users from unintentionally deleting actively-used configuration profiles,\n enable deletion\n protection.

    ", "smithy.api#examples": [ { "title": "To delete a configuration profile", @@ -2436,6 +2453,13 @@ "smithy.api#httpLabel": {}, "smithy.api#required": {} } + }, + "DeletionProtectionCheck": { + "target": "com.amazonaws.appconfig#DeletionProtectionCheck", + "traits": { + "smithy.api#documentation": "

    A parameter to configure deletion protection. If enabled, deletion protection prevents a\n user from deleting a configuration profile if your application has called either GetLatestConfiguration or for the\n configuration profile during the specified interval.

    \n

    This parameter supports the following values:

    \n
      \n
    • \n

      \n BYPASS: Instructs AppConfig to bypass the deletion\n protection check and delete a configuration profile even if deletion protection would\n have otherwise prevented it.

      \n
    • \n
    • \n

      \n APPLY: Instructs the deletion protection check to run, even if\n deletion protection is disabled at the account level. APPLY also forces\n the deletion protection check to run against resources created in the past hour,\n which are normally excluded from deletion protection checks.

      \n
    • \n
    • \n

      \n ACCOUNT_DEFAULT: The default setting, which instructs AppConfig to implement the deletion protection value specified in the\n UpdateAccountSettings API.

      \n
    • \n
    ", + "smithy.api#httpHeader": "x-amzn-deletion-protection-check" + } } }, "traits": { @@ -2462,7 +2486,7 @@ } ], "traits": { - "smithy.api#documentation": "

    Deletes a deployment strategy. Deleting a deployment strategy does not delete a\n configuration from a host.

    ", + "smithy.api#documentation": "

    Deletes a deployment strategy.

    ", "smithy.api#examples": [ { "title": "To delete a deployment strategy", @@ -2518,7 +2542,7 @@ } ], "traits": { - "smithy.api#documentation": "

    Deletes an environment. Deleting an environment does not delete a configuration from a\n host.

    ", + "smithy.api#documentation": "

    Deletes an environment.

    \n

    To prevent users from unintentionally deleting actively-used environments, enable deletion\n protection.

    ", "smithy.api#examples": [ { "title": "To delete an environment", @@ -2539,21 +2563,28 @@ "com.amazonaws.appconfig#DeleteEnvironmentRequest": { "type": "structure", "members": { - "ApplicationId": { + "EnvironmentId": { "target": "com.amazonaws.appconfig#Id", "traits": { - "smithy.api#documentation": "

    The application ID that includes the environment that you want to delete.

    ", + "smithy.api#documentation": "

    The ID of the environment that you want to delete.

    ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } }, - "EnvironmentId": { + "ApplicationId": { "target": "com.amazonaws.appconfig#Id", "traits": { - "smithy.api#documentation": "

    The ID of the environment that you want to delete.

    ", + "smithy.api#documentation": "

    The application ID that includes the environment that you want to delete.

    ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } + }, + "DeletionProtectionCheck": { + "target": "com.amazonaws.appconfig#DeletionProtectionCheck", + "traits": { + "smithy.api#documentation": "

    A parameter to configure deletion protection. If enabled, deletion protection prevents a\n user from deleting an environment if your application called either GetLatestConfiguration or in the\n environment during the specified interval.

    \n

    This parameter supports the following values:

    \n
      \n
    • \n

      \n BYPASS: Instructs AppConfig to bypass the deletion\n protection check and delete a configuration profile even if deletion protection would\n have otherwise prevented it.

      \n
    • \n
    • \n

      \n APPLY: Instructs the deletion protection check to run, even if\n deletion protection is disabled at the account level. APPLY also forces\n the deletion protection check to run against resources created in the past hour,\n which are normally excluded from deletion protection checks.

      \n
    • \n
    • \n

      \n ACCOUNT_DEFAULT: The default setting, which instructs AppConfig to implement the deletion protection value specified in the\n UpdateAccountSettings API.

      \n
    • \n
    ", + "smithy.api#httpHeader": "x-amzn-deletion-protection-check" + } } }, "traits": { @@ -2728,6 +2759,59 @@ "smithy.api#input": {} } }, + "com.amazonaws.appconfig#DeletionProtectionCheck": { + "type": "enum", + "members": { + "ACCOUNT_DEFAULT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACCOUNT_DEFAULT" + } + }, + "APPLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "APPLY" + } + }, + "BYPASS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BYPASS" + } + } + } + }, + "com.amazonaws.appconfig#DeletionProtectionDuration": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 15, + "max": 1440 + } + } + }, + "com.amazonaws.appconfig#DeletionProtectionSettings": { + "type": "structure", + "members": { + "Enabled": { + "target": "com.amazonaws.appconfig#Boolean", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

    A parameter that indicates if deletion protection is enabled or not.

    " + } + }, + "ProtectionPeriodInMinutes": { + "target": "com.amazonaws.appconfig#DeletionProtectionDuration", + "traits": { + "smithy.api#documentation": "

    The time interval during which AppConfig monitors for calls to GetLatestConfiguration or for a\n configuration profile or from an environment. AppConfig returns an error if a\n user calls or for the designated configuration profile or\n environment. To bypass the error and delete a configuration profile or an environment,\n specify BYPASS for the DeletionProtectionCheck parameter for\n either or .

    " + } + } + }, + "traits": { + "smithy.api#documentation": "

    A parameter to configure deletion protection. If enabled, deletion protection prevents a\n user from deleting a configuration profile or an environment if AppConfig has\n called either GetLatestConfiguration or for the\n configuration profile or from the environment during the specified interval.

    \n

    This setting uses the following default values:

    \n
      \n
    • \n

      Deletion protection is disabled by default.

      \n
    • \n
    • \n

      The default interval specified by ProtectionPeriodInMinutes is\n 60.

      \n
    • \n
    • \n

      \n DeletionProtectionCheck skips configuration profiles and environments\n that were created in the past hour.

      \n
    • \n
    " + } + }, "com.amazonaws.appconfig#Deployment": { "type": "structure", "members": { @@ -3520,6 +3604,31 @@ "smithy.api#default": 0 } }, + "com.amazonaws.appconfig#GetAccountSettings": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "com.amazonaws.appconfig#AccountSettings" + }, + "errors": [ + { + "target": "com.amazonaws.appconfig#BadRequestException" + }, + { + "target": "com.amazonaws.appconfig#InternalServerException" + } + ], + "traits": { + "smithy.api#documentation": "

    Returns information about the status of the DeletionProtection\n parameter.

    ", + "smithy.api#http": { + "method": "GET", + "uri": "/settings", + "code": 200 + } + } + }, "com.amazonaws.appconfig#GetApplication": { "type": "operation", "input": { @@ -3600,7 +3709,7 @@ "smithy.api#deprecated": { "message": "This API has been deprecated in favor of the GetLatestConfiguration API used in conjunction with StartConfigurationSession." }, - "smithy.api#documentation": "

    (Deprecated) Retrieves the latest deployed configuration.

    \n \n

    Note the following important information.

    \n \n
    ", + "smithy.api#documentation": "

    (Deprecated) Retrieves the latest deployed configuration.

    \n \n

    Note the following important information.

    \n \n
    ", "smithy.api#examples": [ { "title": "To retrieve configuration details", @@ -3731,7 +3840,7 @@ "ClientConfigurationVersion": { "target": "com.amazonaws.appconfig#Version", "traits": { - "smithy.api#documentation": "

    The configuration version returned in the most recent GetConfiguration\n response.

    \n \n

    AppConfig uses the value of the ClientConfigurationVersion\n parameter to identify the configuration version on your clients. If you don’t send\n ClientConfigurationVersion with each call to\n GetConfiguration, your clients receive the current configuration. You\n are charged each time your clients receive a configuration.

    \n

    To avoid excess charges, we recommend you use the StartConfigurationSession and GetLatestConfiguration APIs, which track the client configuration version on\n your behalf. If you choose to continue using GetConfiguration, we recommend\n that you include the ClientConfigurationVersion value with every call to\n GetConfiguration. The value to use for\n ClientConfigurationVersion comes from the\n ConfigurationVersion attribute returned by GetConfiguration\n when there is new or updated data, and should be saved for subsequent calls to\n GetConfiguration.

    \n
    \n

    For more information about working with configurations, see Retrieving the\n Configuration in the AppConfig User Guide.

    ", + "smithy.api#documentation": "

    The configuration version returned in the most recent GetConfiguration\n response.

    \n \n

    AppConfig uses the value of the ClientConfigurationVersion\n parameter to identify the configuration version on your clients. If you don’t send\n ClientConfigurationVersion with each call to GetConfiguration, your clients receive the current configuration. You are\n charged each time your clients receive a configuration.

    \n

    To avoid excess charges, we recommend you use the StartConfigurationSession and GetLatestConfiguration APIs, which track the client configuration version on\n your behalf. If you choose to continue using GetConfiguration, we\n recommend that you include the ClientConfigurationVersion value with every\n call to GetConfiguration. The value to use for\n ClientConfigurationVersion comes from the\n ConfigurationVersion attribute returned by GetConfiguration when there is new or updated data, and should be saved\n for subsequent calls to GetConfiguration.

    \n
    \n

    For more information about working with configurations, see Retrieving the\n Configuration in the AppConfig User Guide.

    ", "smithy.api#httpQuery": "client_configuration_version" } } @@ -5718,6 +5827,45 @@ "smithy.api#input": {} } }, + "com.amazonaws.appconfig#UpdateAccountSettings": { + "type": "operation", + "input": { + "target": "com.amazonaws.appconfig#UpdateAccountSettingsRequest" + }, + "output": { + "target": "com.amazonaws.appconfig#AccountSettings" + }, + "errors": [ + { + "target": "com.amazonaws.appconfig#BadRequestException" + }, + { + "target": "com.amazonaws.appconfig#InternalServerException" + } + ], + "traits": { + "smithy.api#documentation": "

    Updates the value of the DeletionProtection parameter.

    ", + "smithy.api#http": { + "method": "PATCH", + "uri": "/settings", + "code": 200 + } + } + }, + "com.amazonaws.appconfig#UpdateAccountSettingsRequest": { + "type": "structure", + "members": { + "DeletionProtection": { + "target": "com.amazonaws.appconfig#DeletionProtectionSettings", + "traits": { + "smithy.api#documentation": "

    A parameter to configure deletion protection. If enabled, deletion protection prevents a\n user from deleting a configuration profile or an environment if AppConfig has\n called either GetLatestConfiguration or for the\n configuration profile or from the environment during the specified interval. Deletion\n protection is disabled by default. The default interval for\n ProtectionPeriodInMinutes is 60.

    " + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, "com.amazonaws.appconfig#UpdateApplication": { "type": "operation", "input": { @@ -5857,7 +6005,7 @@ } }, "Name": { - "target": "com.amazonaws.appconfig#Name", + "target": "com.amazonaws.appconfig#LongName", "traits": { "smithy.api#documentation": "

    The name of the configuration profile.

    " } @@ -6295,7 +6443,7 @@ } }, "traits": { - "smithy.api#documentation": "

    A validator provides a syntactic or semantic check to ensure the configuration that you\n want to deploy functions as intended. To validate your application configuration data, you\n provide a schema or an Amazon Web Services Lambda function that runs against the configuration. The\n configuration deployment or update can only proceed when the configuration data is\n valid.

    " + "smithy.api#documentation": "

    A validator provides a syntactic or semantic check to ensure the configuration that you\n want to deploy functions as intended. To validate your application configuration data, you\n provide a schema or an Amazon Web Services Lambda function that runs against the configuration. The\n configuration deployment or update can only proceed when the configuration data is valid.\n For more information, see About validators in the AppConfig User Guide.

    " } }, "com.amazonaws.appconfig#ValidatorList": {