Skip to content

Commit 98e1d9f

Browse files
author
awstools
committed
feat(client-cloudformation): This release would return a new field - PolicyAction in cloudformation's existed DescribeChangeSetResponse, showing actions we are going to apply on the physical resource (e.g., Delete, Retain) according to the user's template
1 parent 21c6b46 commit 98e1d9f

10 files changed

+150
-48
lines changed

Diff for: clients/client-cloudformation/src/commands/ActivateTypeCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export interface ActivateTypeCommandOutput extends ActivateTypeOutput, __Metadat
3131
* see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-public.html">Using public
3232
* extensions</a> in the <i>CloudFormation User Guide</i>.</p>
3333
* <p>Once you have activated a public third-party extension in your account and Region, use <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_SetTypeConfiguration.html">SetTypeConfiguration</a> to specify configuration properties for the extension. For more information, see
34-
* <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-register.html#registry-set-configuration">Configuring extensions at
34+
* <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-private.html#registry-set-configuration">Configuring extensions at
3535
* the account level</a> in the <i>CloudFormation User Guide</i>.</p>
3636
* @example
3737
* Use a bare-bones client and the command you need to make an API call.

Diff for: clients/client-cloudformation/src/commands/BatchDescribeTypeConfigurationsCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export interface BatchDescribeTypeConfigurationsCommandOutput
3434
/**
3535
* <p>Returns configuration data for the specified CloudFormation extensions, from the CloudFormation registry
3636
* for the account and Region.</p>
37-
* <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-register.html#registry-set-configuration">Configuring extensions at
37+
* <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-private.html#registry-set-configuration">Configuring extensions at
3838
* the account level</a> in the <i>CloudFormation User Guide</i>.</p>
3939
* @example
4040
* Use a bare-bones client and the command you need to make an API call.

Diff for: clients/client-cloudformation/src/commands/DescribeChangeSetCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ export interface DescribeChangeSetCommandOutput extends DescribeChangeSetOutput,
8787
* // Type: "Resource",
8888
* // HookInvocationCount: Number("int"),
8989
* // ResourceChange: { // ResourceChange
90+
* // PolicyAction: "Delete" || "Retain" || "Snapshot" || "ReplaceAndDelete" || "ReplaceAndRetain" || "ReplaceAndSnapshot",
9091
* // Action: "Add" || "Modify" || "Remove" || "Import" || "Dynamic",
9192
* // LogicalResourceId: "STRING_VALUE",
9293
* // PhysicalResourceId: "STRING_VALUE",

Diff for: clients/client-cloudformation/src/commands/RegisterTypeCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export interface RegisterTypeCommandOutput extends RegisterTypeOutput, __Metadat
4646
* per Region. Use <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_DeregisterType.html">DeregisterType</a> to deregister specific extension versions if necessary.</p>
4747
* <p>Once you have initiated a registration request using <a>RegisterType</a>, you can use <a>DescribeTypeRegistration</a> to monitor the progress of the registration request.</p>
4848
* <p>Once you have registered a private extension in your account and Region, use <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_SetTypeConfiguration.html">SetTypeConfiguration</a> to specify
49-
* configuration properties for the extension. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-register.html#registry-set-configuration">Configuring extensions at
49+
* configuration properties for the extension. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-private.html#registry-set-configuration">Configuring extensions at
5050
* the account level</a> in the <i>CloudFormation User Guide</i>.</p>
5151
* @example
5252
* Use a bare-bones client and the command you need to make an API call.

Diff for: clients/client-cloudformation/src/commands/SetTypeConfigurationCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export interface SetTypeConfigurationCommandOutput extends SetTypeConfigurationO
2929
/**
3030
* <p>Specifies the configuration data for a registered CloudFormation extension, in the given account and Region.</p>
3131
* <p>To view the current configuration data for an extension, refer to the <code>ConfigurationSchema</code> element
32-
* of <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_DescribeType.html">DescribeType</a>. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-register.html#registry-set-configuration">Configuring extensions at
32+
* of <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_DescribeType.html">DescribeType</a>. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-private.html#registry-set-configuration">Configuring extensions at
3333
* the account level</a> in the <i>CloudFormation User Guide</i>.</p>
3434
* <important>
3535
* <p>It's strongly recommended that you use dynamic references to restrict sensitive configuration definitions, such

Diff for: clients/client-cloudformation/src/commands/SetTypeDefaultVersionCommand.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { CloudFormationClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudFormationClient";
88
import { commonParams } from "../endpoint/EndpointParameters";
9-
import { SetTypeDefaultVersionInput } from "../models/models_0";
10-
import { SetTypeDefaultVersionOutput } from "../models/models_1";
9+
import { SetTypeDefaultVersionInput, SetTypeDefaultVersionOutput } from "../models/models_1";
1110
import { de_SetTypeDefaultVersionCommand, se_SetTypeDefaultVersionCommand } from "../protocols/Aws_query";
1211

1312
/**

Diff for: clients/client-cloudformation/src/models/models_0.ts

+52-35
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ export interface BatchDescribeTypeConfigurationsError {
510510
/**
511511
* <p>Detailed information concerning the specification of a CloudFormation extension in a given account and
512512
* Region.</p>
513-
* <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-register.html#registry-set-configuration">Configuring extensions at
513+
* <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-private.html#registry-set-configuration">Configuring extensions at
514514
* the account level</a> in the <i>CloudFormation User Guide</i>.</p>
515515
* @public
516516
*/
@@ -932,6 +932,24 @@ export interface ModuleInfo {
932932
LogicalIdHierarchy?: string;
933933
}
934934

935+
/**
936+
* @public
937+
* @enum
938+
*/
939+
export const PolicyAction = {
940+
Delete: "Delete",
941+
ReplaceAndDelete: "ReplaceAndDelete",
942+
ReplaceAndRetain: "ReplaceAndRetain",
943+
ReplaceAndSnapshot: "ReplaceAndSnapshot",
944+
Retain: "Retain",
945+
Snapshot: "Snapshot",
946+
} as const;
947+
948+
/**
949+
* @public
950+
*/
951+
export type PolicyAction = (typeof PolicyAction)[keyof typeof PolicyAction];
952+
935953
/**
936954
* @public
937955
* @enum
@@ -953,6 +971,38 @@ export type Replacement = (typeof Replacement)[keyof typeof Replacement];
953971
* @public
954972
*/
955973
export interface ResourceChange {
974+
/**
975+
* <p>The action that will be taken on the physical resource when the change set is executed.</p>
976+
* <ul>
977+
* <li>
978+
* <p>
979+
* <code>Delete</code> The resource will be deleted.</p>
980+
* </li>
981+
* <li>
982+
* <p>
983+
* <code>Retain</code> The resource will be retained.</p>
984+
* </li>
985+
* <li>
986+
* <p>
987+
* <code>Snapshot</code> The resource will have a snapshot taken.</p>
988+
* </li>
989+
* <li>
990+
* <p>
991+
* <code>ReplaceAndDelete</code> The resource will be replaced and then deleted.</p>
992+
* </li>
993+
* <li>
994+
* <p>
995+
* <code>ReplaceAndRetain</code> The resource will be replaced and then retained.</p>
996+
* </li>
997+
* <li>
998+
* <p>
999+
* <code>ReplaceAndSnapshot</code> The resource will be replaced and then have a snapshot taken.</p>
1000+
* </li>
1001+
* </ul>
1002+
* @public
1003+
*/
1004+
PolicyAction?: PolicyAction;
1005+
9561006
/**
9571007
* <p>The action that CloudFormation takes on the resource, such as <code>Add</code> (adds a new resource), <code>Modify</code>
9581008
* (changes a resource), <code>Remove</code> (deletes a resource), <code>Import</code> (imports a resource), or
@@ -7051,7 +7101,7 @@ export interface DescribeTypeOutput {
70517101
/**
70527102
* <p>A JSON string that represent the current configuration data for the extension in this account and Region.</p>
70537103
* <p>To set the configuration data for an extension, use <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_SetTypeConfiguration.html">SetTypeConfiguration</a>. For more
7054-
* information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-register.html#registry-set-configuration">Configuring extensions at
7104+
* information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-private.html#registry-set-configuration">Configuring extensions at
70557105
* the account level</a> in the <i>CloudFormation User Guide</i>.</p>
70567106
* @public
70577107
*/
@@ -10878,36 +10928,3 @@ export interface SetTypeConfigurationOutput {
1087810928
*/
1087910929
ConfigurationArn?: string;
1088010930
}
10881-
10882-
/**
10883-
* @public
10884-
*/
10885-
export interface SetTypeDefaultVersionInput {
10886-
/**
10887-
* <p>The Amazon Resource Name (ARN) of the extension for which you want version summary information.</p>
10888-
* <p>Conditional: You must specify either <code>TypeName</code> and <code>Type</code>, or <code>Arn</code>.</p>
10889-
* @public
10890-
*/
10891-
Arn?: string;
10892-
10893-
/**
10894-
* <p>The kind of extension.</p>
10895-
* <p>Conditional: You must specify either <code>TypeName</code> and <code>Type</code>, or <code>Arn</code>.</p>
10896-
* @public
10897-
*/
10898-
Type?: RegistryType;
10899-
10900-
/**
10901-
* <p>The name of the extension.</p>
10902-
* <p>Conditional: You must specify either <code>TypeName</code> and <code>Type</code>, or <code>Arn</code>.</p>
10903-
* @public
10904-
*/
10905-
TypeName?: string;
10906-
10907-
/**
10908-
* <p>The ID of a specific version of the extension. The version ID is the value at the end of the Amazon Resource
10909-
* Name (ARN) assigned to the extension version when it is registered.</p>
10910-
* @public
10911-
*/
10912-
VersionId?: string;
10913-
}

Diff for: clients/client-cloudformation/src/models/models_1.ts

+34
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
ManagedExecution,
1212
Parameter,
1313
PermissionModels,
14+
RegistryType,
1415
ResourceDefinition,
1516
RollbackConfiguration,
1617
StackSetOperationPreferences,
@@ -19,6 +20,39 @@ import {
1920
ThirdPartyType,
2021
} from "./models_0";
2122

23+
/**
24+
* @public
25+
*/
26+
export interface SetTypeDefaultVersionInput {
27+
/**
28+
* <p>The Amazon Resource Name (ARN) of the extension for which you want version summary information.</p>
29+
* <p>Conditional: You must specify either <code>TypeName</code> and <code>Type</code>, or <code>Arn</code>.</p>
30+
* @public
31+
*/
32+
Arn?: string;
33+
34+
/**
35+
* <p>The kind of extension.</p>
36+
* <p>Conditional: You must specify either <code>TypeName</code> and <code>Type</code>, or <code>Arn</code>.</p>
37+
* @public
38+
*/
39+
Type?: RegistryType;
40+
41+
/**
42+
* <p>The name of the extension.</p>
43+
* <p>Conditional: You must specify either <code>TypeName</code> and <code>Type</code>, or <code>Arn</code>.</p>
44+
* @public
45+
*/
46+
TypeName?: string;
47+
48+
/**
49+
* <p>The ID of a specific version of the extension. The version ID is the value at the end of the Amazon Resource
50+
* Name (ARN) assigned to the extension version when it is registered.</p>
51+
* @public
52+
*/
53+
VersionId?: string;
54+
}
55+
2256
/**
2357
* @public
2458
*/

Diff for: clients/client-cloudformation/src/protocols/Aws_query.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,6 @@ import {
421421
SetStackPolicyInput,
422422
SetTypeConfigurationInput,
423423
SetTypeConfigurationOutput,
424-
SetTypeDefaultVersionInput,
425424
Stack,
426425
StackDriftInformation,
427426
StackDriftInformationSummary,
@@ -474,6 +473,7 @@ import {
474473
} from "../models/models_0";
475474
import {
476475
ResourceScanLimitExceededException,
476+
SetTypeDefaultVersionInput,
477477
SetTypeDefaultVersionOutput,
478478
SignalResourceInput,
479479
StartResourceScanInput,
@@ -9018,6 +9018,9 @@ const de_RequiredActivatedTypes = (output: any, context: __SerdeContext): Requir
90189018
*/
90199019
const de_ResourceChange = (output: any, context: __SerdeContext): ResourceChange => {
90209020
const contents: any = {};
9021+
if (output[_PA] != null) {
9022+
contents[_PA] = __expectString(output[_PA]);
9023+
}
90219024
if (output[_A] != null) {
90229025
contents[_A] = __expectString(output[_A]);
90239026
}
@@ -11258,6 +11261,7 @@ const _OUI = "OrganizationalUnitIds";
1125811261
const _OUIr = "OrganizationalUnitId";
1125911262
const _OV = "OutputValue";
1126011263
const _P = "Parameters";
11264+
const _PA = "PolicyAction";
1126111265
const _PC = "PercentageCompleted";
1126211266
const _PCSI = "ParentChangeSetId";
1126311267
const _PCa = "ParameterConstraints";

0 commit comments

Comments
 (0)