diff --git a/clients/client-appconfig/README.md b/clients/client-appconfig/README.md index 20f580b09d1c..4fc2c40441b9 100644 --- a/clients/client-appconfig/README.md +++ b/clients/client-appconfig/README.md @@ -159,7 +159,7 @@ Guide.

## Installing -To install the this package, simply type add or install @aws-sdk/client-appconfig +To install this package, simply type add or install @aws-sdk/client-appconfig using your favorite package manager: - `npm install @aws-sdk/client-appconfig` diff --git a/clients/client-appconfig/src/commands/CreateEnvironmentCommand.ts b/clients/client-appconfig/src/commands/CreateEnvironmentCommand.ts index dcb65e249def..0d201a40c7f4 100644 --- a/clients/client-appconfig/src/commands/CreateEnvironmentCommand.ts +++ b/clients/client-appconfig/src/commands/CreateEnvironmentCommand.ts @@ -63,7 +63,7 @@ export interface CreateEnvironmentCommandOutput extends Environment, __MetadataB * // Id: "STRING_VALUE", * // Name: "STRING_VALUE", * // Description: "STRING_VALUE", - * // State: "READY_FOR_DEPLOYMENT" || "DEPLOYING" || "ROLLING_BACK" || "ROLLED_BACK", + * // State: "READY_FOR_DEPLOYMENT" || "DEPLOYING" || "ROLLING_BACK" || "ROLLED_BACK" || "REVERTED", * // Monitors: [ // MonitorList * // { // Monitor * // AlarmArn: "STRING_VALUE", // required diff --git a/clients/client-appconfig/src/commands/GetDeploymentCommand.ts b/clients/client-appconfig/src/commands/GetDeploymentCommand.ts index b334a73b3578..a436eb35726b 100644 --- a/clients/client-appconfig/src/commands/GetDeploymentCommand.ts +++ b/clients/client-appconfig/src/commands/GetDeploymentCommand.ts @@ -56,10 +56,10 @@ export interface GetDeploymentCommandOutput extends Deployment, __MetadataBearer * // GrowthType: "LINEAR" || "EXPONENTIAL", * // GrowthFactor: Number("float"), * // FinalBakeTimeInMinutes: Number("int"), - * // State: "BAKING" || "VALIDATING" || "DEPLOYING" || "COMPLETE" || "ROLLING_BACK" || "ROLLED_BACK", + * // State: "BAKING" || "VALIDATING" || "DEPLOYING" || "COMPLETE" || "ROLLING_BACK" || "ROLLED_BACK" || "REVERTED", * // EventLog: [ // DeploymentEvents * // { // DeploymentEvent - * // EventType: "PERCENTAGE_UPDATED" || "ROLLBACK_STARTED" || "ROLLBACK_COMPLETED" || "BAKE_TIME_STARTED" || "DEPLOYMENT_STARTED" || "DEPLOYMENT_COMPLETED", + * // EventType: "PERCENTAGE_UPDATED" || "ROLLBACK_STARTED" || "ROLLBACK_COMPLETED" || "BAKE_TIME_STARTED" || "DEPLOYMENT_STARTED" || "DEPLOYMENT_COMPLETED" || "REVERT_COMPLETED", * // TriggeredBy: "USER" || "APPCONFIG" || "CLOUDWATCH_ALARM" || "INTERNAL_ERROR", * // Description: "STRING_VALUE", * // ActionInvocations: [ // ActionInvocations diff --git a/clients/client-appconfig/src/commands/GetEnvironmentCommand.ts b/clients/client-appconfig/src/commands/GetEnvironmentCommand.ts index 44d9ba0edaf7..5dc46c76e0a5 100644 --- a/clients/client-appconfig/src/commands/GetEnvironmentCommand.ts +++ b/clients/client-appconfig/src/commands/GetEnvironmentCommand.ts @@ -51,7 +51,7 @@ export interface GetEnvironmentCommandOutput extends Environment, __MetadataBear * // Id: "STRING_VALUE", * // Name: "STRING_VALUE", * // Description: "STRING_VALUE", - * // State: "READY_FOR_DEPLOYMENT" || "DEPLOYING" || "ROLLING_BACK" || "ROLLED_BACK", + * // State: "READY_FOR_DEPLOYMENT" || "DEPLOYING" || "ROLLING_BACK" || "ROLLED_BACK" || "REVERTED", * // Monitors: [ // MonitorList * // { // Monitor * // AlarmArn: "STRING_VALUE", // required diff --git a/clients/client-appconfig/src/commands/ListDeploymentsCommand.ts b/clients/client-appconfig/src/commands/ListDeploymentsCommand.ts index 9c9e33e66317..4a946b6c7aae 100644 --- a/clients/client-appconfig/src/commands/ListDeploymentsCommand.ts +++ b/clients/client-appconfig/src/commands/ListDeploymentsCommand.ts @@ -53,7 +53,7 @@ export interface ListDeploymentsCommandOutput extends Deployments, __MetadataBea * // GrowthType: "LINEAR" || "EXPONENTIAL", * // GrowthFactor: Number("float"), * // FinalBakeTimeInMinutes: Number("int"), - * // State: "BAKING" || "VALIDATING" || "DEPLOYING" || "COMPLETE" || "ROLLING_BACK" || "ROLLED_BACK", + * // State: "BAKING" || "VALIDATING" || "DEPLOYING" || "COMPLETE" || "ROLLING_BACK" || "ROLLED_BACK" || "REVERTED", * // PercentageComplete: Number("float"), * // StartedAt: new Date("TIMESTAMP"), * // CompletedAt: new Date("TIMESTAMP"), diff --git a/clients/client-appconfig/src/commands/ListEnvironmentsCommand.ts b/clients/client-appconfig/src/commands/ListEnvironmentsCommand.ts index 6525d1e8fa96..71f5e71975d0 100644 --- a/clients/client-appconfig/src/commands/ListEnvironmentsCommand.ts +++ b/clients/client-appconfig/src/commands/ListEnvironmentsCommand.ts @@ -49,7 +49,7 @@ export interface ListEnvironmentsCommandOutput extends Environments, __MetadataB * // Id: "STRING_VALUE", * // Name: "STRING_VALUE", * // Description: "STRING_VALUE", - * // State: "READY_FOR_DEPLOYMENT" || "DEPLOYING" || "ROLLING_BACK" || "ROLLED_BACK", + * // State: "READY_FOR_DEPLOYMENT" || "DEPLOYING" || "ROLLING_BACK" || "ROLLED_BACK" || "REVERTED", * // Monitors: [ // MonitorList * // { // Monitor * // AlarmArn: "STRING_VALUE", // required diff --git a/clients/client-appconfig/src/commands/StartDeploymentCommand.ts b/clients/client-appconfig/src/commands/StartDeploymentCommand.ts index 6fdc5eabf3c6..cd736060585a 100644 --- a/clients/client-appconfig/src/commands/StartDeploymentCommand.ts +++ b/clients/client-appconfig/src/commands/StartDeploymentCommand.ts @@ -66,10 +66,10 @@ export interface StartDeploymentCommandOutput extends Deployment, __MetadataBear * // GrowthType: "LINEAR" || "EXPONENTIAL", * // GrowthFactor: Number("float"), * // FinalBakeTimeInMinutes: Number("int"), - * // State: "BAKING" || "VALIDATING" || "DEPLOYING" || "COMPLETE" || "ROLLING_BACK" || "ROLLED_BACK", + * // State: "BAKING" || "VALIDATING" || "DEPLOYING" || "COMPLETE" || "ROLLING_BACK" || "ROLLED_BACK" || "REVERTED", * // EventLog: [ // DeploymentEvents * // { // DeploymentEvent - * // EventType: "PERCENTAGE_UPDATED" || "ROLLBACK_STARTED" || "ROLLBACK_COMPLETED" || "BAKE_TIME_STARTED" || "DEPLOYMENT_STARTED" || "DEPLOYMENT_COMPLETED", + * // EventType: "PERCENTAGE_UPDATED" || "ROLLBACK_STARTED" || "ROLLBACK_COMPLETED" || "BAKE_TIME_STARTED" || "DEPLOYMENT_STARTED" || "DEPLOYMENT_COMPLETED" || "REVERT_COMPLETED", * // TriggeredBy: "USER" || "APPCONFIG" || "CLOUDWATCH_ALARM" || "INTERNAL_ERROR", * // Description: "STRING_VALUE", * // ActionInvocations: [ // ActionInvocations diff --git a/clients/client-appconfig/src/commands/StopDeploymentCommand.ts b/clients/client-appconfig/src/commands/StopDeploymentCommand.ts index a625a4263a54..95ff506e6eb6 100644 --- a/clients/client-appconfig/src/commands/StopDeploymentCommand.ts +++ b/clients/client-appconfig/src/commands/StopDeploymentCommand.ts @@ -29,8 +29,11 @@ export interface StopDeploymentCommandOutput extends Deployment, __MetadataBeare /** *

Stops a deployment. This API action works only on deployments that have a status of - * DEPLOYING. This action moves the deployment to a status of - * ROLLED_BACK.

+ * DEPLOYING, unless an AllowRevert parameter is supplied. If the + * AllowRevert parameter is supplied, the status of an in-progress deployment + * will be ROLLED_BACK. The status of a completed deployment will be + * REVERTED. AppConfig only allows a revert within 72 hours of + * deployment completion.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript @@ -41,6 +44,7 @@ export interface StopDeploymentCommandOutput extends Deployment, __MetadataBeare * ApplicationId: "STRING_VALUE", // required * EnvironmentId: "STRING_VALUE", // required * DeploymentNumber: Number("int"), // required + * AllowRevert: true || false, * }; * const command = new StopDeploymentCommand(input); * const response = await client.send(command); @@ -58,10 +62,10 @@ export interface StopDeploymentCommandOutput extends Deployment, __MetadataBeare * // GrowthType: "LINEAR" || "EXPONENTIAL", * // GrowthFactor: Number("float"), * // FinalBakeTimeInMinutes: Number("int"), - * // State: "BAKING" || "VALIDATING" || "DEPLOYING" || "COMPLETE" || "ROLLING_BACK" || "ROLLED_BACK", + * // State: "BAKING" || "VALIDATING" || "DEPLOYING" || "COMPLETE" || "ROLLING_BACK" || "ROLLED_BACK" || "REVERTED", * // EventLog: [ // DeploymentEvents * // { // DeploymentEvent - * // EventType: "PERCENTAGE_UPDATED" || "ROLLBACK_STARTED" || "ROLLBACK_COMPLETED" || "BAKE_TIME_STARTED" || "DEPLOYMENT_STARTED" || "DEPLOYMENT_COMPLETED", + * // EventType: "PERCENTAGE_UPDATED" || "ROLLBACK_STARTED" || "ROLLBACK_COMPLETED" || "BAKE_TIME_STARTED" || "DEPLOYMENT_STARTED" || "DEPLOYMENT_COMPLETED" || "REVERT_COMPLETED", * // TriggeredBy: "USER" || "APPCONFIG" || "CLOUDWATCH_ALARM" || "INTERNAL_ERROR", * // Description: "STRING_VALUE", * // ActionInvocations: [ // ActionInvocations diff --git a/clients/client-appconfig/src/commands/UpdateEnvironmentCommand.ts b/clients/client-appconfig/src/commands/UpdateEnvironmentCommand.ts index ba3096bfe8b0..c6cf8d057e2e 100644 --- a/clients/client-appconfig/src/commands/UpdateEnvironmentCommand.ts +++ b/clients/client-appconfig/src/commands/UpdateEnvironmentCommand.ts @@ -54,7 +54,7 @@ export interface UpdateEnvironmentCommandOutput extends Environment, __MetadataB * // Id: "STRING_VALUE", * // Name: "STRING_VALUE", * // Description: "STRING_VALUE", - * // State: "READY_FOR_DEPLOYMENT" || "DEPLOYING" || "ROLLING_BACK" || "ROLLED_BACK", + * // State: "READY_FOR_DEPLOYMENT" || "DEPLOYING" || "ROLLING_BACK" || "ROLLED_BACK" || "REVERTED", * // Monitors: [ // MonitorList * // { // Monitor * // AlarmArn: "STRING_VALUE", // required diff --git a/clients/client-appconfig/src/models/models_0.ts b/clients/client-appconfig/src/models/models_0.ts index da520786109d..e898acf907ef 100644 --- a/clients/client-appconfig/src/models/models_0.ts +++ b/clients/client-appconfig/src/models/models_0.ts @@ -914,6 +914,7 @@ export interface CreateEnvironmentRequest { export const EnvironmentState = { DEPLOYING: "DEPLOYING", READY_FOR_DEPLOYMENT: "READY_FOR_DEPLOYMENT", + REVERTED: "REVERTED", ROLLED_BACK: "ROLLED_BACK", ROLLING_BACK: "ROLLING_BACK", } as const; @@ -1626,8 +1627,9 @@ export interface GetConfigurationRequest { * 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.

+ *

For more information about working with configurations, see Retrieving feature flags and + * configuration data in AppConfig in the AppConfig + * User Guide.

* @public */ ClientConfigurationVersion?: string; @@ -1690,6 +1692,7 @@ export const DeploymentEventType = { DEPLOYMENT_COMPLETED: "DEPLOYMENT_COMPLETED", DEPLOYMENT_STARTED: "DEPLOYMENT_STARTED", PERCENTAGE_UPDATED: "PERCENTAGE_UPDATED", + REVERT_COMPLETED: "REVERT_COMPLETED", ROLLBACK_COMPLETED: "ROLLBACK_COMPLETED", ROLLBACK_STARTED: "ROLLBACK_STARTED", } as const; @@ -1775,6 +1778,7 @@ export const DeploymentState = { BAKING: "BAKING", COMPLETE: "COMPLETE", DEPLOYING: "DEPLOYING", + REVERTED: "REVERTED", ROLLED_BACK: "ROLLED_BACK", ROLLING_BACK: "ROLLING_BACK", VALIDATING: "VALIDATING", @@ -2764,6 +2768,14 @@ export interface StopDeploymentRequest { * @public */ DeploymentNumber: number | undefined; + + /** + *

A Boolean that enables AppConfig to rollback a COMPLETED + * deployment to the previous configuration version. This action moves the deployment to a + * status of REVERTED.

+ * @public + */ + AllowRevert?: boolean; } /** diff --git a/clients/client-appconfig/src/protocols/Aws_restJson1.ts b/clients/client-appconfig/src/protocols/Aws_restJson1.ts index 204c34c0af5e..a4c46aaddcba 100644 --- a/clients/client-appconfig/src/protocols/Aws_restJson1.ts +++ b/clients/client-appconfig/src/protocols/Aws_restJson1.ts @@ -868,7 +868,9 @@ export const se_StopDeploymentCommand = async ( context: __SerdeContext ): Promise<__HttpRequest> => { const b = rb(input, context); - const headers: any = {}; + const headers: any = map({}, isSerializableHeaderValue, { + [_ar]: [() => isSerializableHeaderValue(input[_AR]), () => input[_AR]!.toString()], + }); b.bp("/applications/{ApplicationId}/environments/{EnvironmentId}/deployments/{DeploymentNumber}"); b.p("ApplicationId", () => input.ApplicationId!, "{ApplicationId}", false); b.p("EnvironmentId", () => input.EnvironmentId!, "{EnvironmentId}", false); @@ -2548,6 +2550,7 @@ const collectBodyString = (streamBody: any, context: __SerdeContext): Promise context.utf8Encoder(body)); const _AI = "ApplicationId"; +const _AR = "AllowRevert"; const _CCV = "ClientConfigurationVersion"; const _CI = "ClientId"; const _CPI = "ConfigurationProfileId"; @@ -2568,6 +2571,7 @@ const _TK = "TagKeys"; const _VL = "VersionLabel"; const _VN = "VersionNumber"; const _ai = "application-id"; +const _ar = "allow-revert"; const _ccv = "client_configuration_version"; const _ci = "client_id"; const _cpi = "configuration-profile-id"; diff --git a/codegen/sdk-codegen/aws-models/appconfig.json b/codegen/sdk-codegen/aws-models/appconfig.json index 635d0b5bb5d0..ccb9a24b2b5c 100644 --- a/codegen/sdk-codegen/aws-models/appconfig.json +++ b/codegen/sdk-codegen/aws-models/appconfig.json @@ -3028,6 +3028,12 @@ "traits": { "smithy.api#enumValue": "DEPLOYMENT_COMPLETED" } + }, + "REVERT_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "REVERT_COMPLETED" + } } } }, @@ -3081,6 +3087,12 @@ "traits": { "smithy.api#enumValue": "ROLLED_BACK" } + }, + "REVERTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "REVERTED" + } } } }, @@ -3371,6 +3383,12 @@ "traits": { "smithy.api#enumValue": "ROLLED_BACK" } + }, + "REVERTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "REVERTED" + } } } }, @@ -3840,7 +3858,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 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#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 feature flags and\n configuration data in AppConfig in the AppConfig\n User Guide.

", "smithy.api#httpQuery": "client_configuration_version" } } @@ -5529,7 +5547,7 @@ } ], "traits": { - "smithy.api#documentation": "

Stops a deployment. This API action works only on deployments that have a status of\n DEPLOYING. This action moves the deployment to a status of\n ROLLED_BACK.

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

Stops a deployment. This API action works only on deployments that have a status of\n DEPLOYING, unless an AllowRevert parameter is supplied. If the\n AllowRevert parameter is supplied, the status of an in-progress deployment\n will be ROLLED_BACK. The status of a completed deployment will be\n REVERTED. AppConfig only allows a revert within 72 hours of\n deployment completion.

", "smithy.api#examples": [ { "title": "To stop configuration deployment", @@ -5582,6 +5600,14 @@ "smithy.api#httpLabel": {}, "smithy.api#required": {} } + }, + "AllowRevert": { + "target": "com.amazonaws.appconfig#Boolean", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

A Boolean that enables AppConfig to rollback a COMPLETED\n deployment to the previous configuration version. This action moves the deployment to a\n status of REVERTED.

", + "smithy.api#httpHeader": "Allow-Revert" + } } }, "traits": {