Skip to content

Commit 2f877b3

Browse files
author
awstools
committed
feat(client-cloudformation): My AWS Service (placeholder) - Add a new feature Account-level Targeting for StackSet operation
1 parent 5e37998 commit 2f877b3

File tree

6 files changed

+153
-70
lines changed

6 files changed

+153
-70
lines changed

clients/client-cloudformation/src/CloudFormation.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2498,10 +2498,11 @@ export class CloudFormation extends CloudFormationClient {
24982498

24992499
/**
25002500
* <p>Sends a signal to the specified resource with a success or failure status. You can use
2501-
* the <code>SignalResource</code> operation in conjunction with a creation policy or update policy. CloudFormation doesn't proceed with a stack creation or update until resources receive
2502-
* the required number of signals or the timeout period is exceeded. The <code>SignalResource</code> operation is
2503-
* useful in cases where you want to send signals from anywhere other than an Amazon EC2
2504-
* instance.</p>
2501+
* the <code>SignalResource</code> operation in conjunction with a creation policy or update
2502+
* policy. CloudFormation doesn't proceed with a stack creation or update until
2503+
* resources receive the required number of signals or the timeout period is exceeded. The
2504+
* <code>SignalResource</code> operation is useful in cases where you want to send signals
2505+
* from anywhere other than an Amazon EC2 instance.</p>
25052506
*/
25062507
public signalResource(
25072508
args: SignalResourceCommandInput,
@@ -2533,7 +2534,9 @@ export class CloudFormation extends CloudFormationClient {
25332534
}
25342535

25352536
/**
2536-
* <p>Stops an in-progress operation on a stack set and its associated stack instances. StackSets will cancel all the unstarted stack instance deployments and wait for those are in-progress to complete.</p>
2537+
* <p>Stops an in-progress operation on a stack set and its associated stack instances.
2538+
* StackSets will cancel all the unstarted stack instance deployments and wait for those are
2539+
* in-progress to complete.</p>
25372540
*/
25382541
public stopStackSetOperation(
25392542
args: StopStackSetOperationCommandInput,

clients/client-cloudformation/src/commands/SignalResourceCommand.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,11 @@ export interface SignalResourceCommandOutput extends __MetadataBearer {}
2424

2525
/**
2626
* <p>Sends a signal to the specified resource with a success or failure status. You can use
27-
* the <code>SignalResource</code> operation in conjunction with a creation policy or update policy. CloudFormation doesn't proceed with a stack creation or update until resources receive
28-
* the required number of signals or the timeout period is exceeded. The <code>SignalResource</code> operation is
29-
* useful in cases where you want to send signals from anywhere other than an Amazon EC2
30-
* instance.</p>
27+
* the <code>SignalResource</code> operation in conjunction with a creation policy or update
28+
* policy. CloudFormation doesn't proceed with a stack creation or update until
29+
* resources receive the required number of signals or the timeout period is exceeded. The
30+
* <code>SignalResource</code> operation is useful in cases where you want to send signals
31+
* from anywhere other than an Amazon EC2 instance.</p>
3132
* @example
3233
* Use a bare-bones client and the command you need to make an API call.
3334
* ```javascript

clients/client-cloudformation/src/commands/StopStackSetOperationCommand.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ export interface StopStackSetOperationCommandInput extends StopStackSetOperation
2323
export interface StopStackSetOperationCommandOutput extends StopStackSetOperationOutput, __MetadataBearer {}
2424

2525
/**
26-
* <p>Stops an in-progress operation on a stack set and its associated stack instances. StackSets will cancel all the unstarted stack instance deployments and wait for those are in-progress to complete.</p>
26+
* <p>Stops an in-progress operation on a stack set and its associated stack instances.
27+
* StackSets will cancel all the unstarted stack instance deployments and wait for those are
28+
* in-progress to complete.</p>
2729
* @example
2830
* Use a bare-bones client and the command you need to make an API call.
2931
* ```javascript

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

Lines changed: 81 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ import { ExceptionOptionType as __ExceptionOptionType } from "@aws-sdk/smithy-cl
33

44
import { CloudFormationServiceException as __BaseException } from "./CloudFormationServiceException";
55

6+
export enum AccountFilterType {
7+
DIFFERENCE = "DIFFERENCE",
8+
INTERSECTION = "INTERSECTION",
9+
NONE = "NONE",
10+
UNION = "UNION",
11+
}
12+
613
export type AccountGateStatus = "FAILED" | "SKIPPED" | "SUCCEEDED";
714

815
/**
@@ -42,8 +49,8 @@ export interface AccountGateResult {
4249
* <ul>
4350
* <li>
4451
* <p>An account gate function hasn't been specified for the account and Region.
45-
* CloudFormation proceeds with the stack set operation in this account
46-
* and Region.</p>
52+
* CloudFormation proceeds with the stack set operation in this account and
53+
* Region.</p>
4754
* </li>
4855
* <li>
4956
* <p>The <code>AWSCloudFormationStackSetExecutionRole</code> of the stack set
@@ -1379,8 +1386,8 @@ export interface Parameter {
13791386
UsePreviousValue?: boolean;
13801387

13811388
/**
1382-
* <p>Read-only. The value that corresponds to a SSM parameter key. This field is
1383-
* returned only for <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html#aws-ssm-parameter-types">
1389+
* <p>Read-only. The value that corresponds to a SSM parameter key. This field
1390+
* is returned only for <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html#aws-ssm-parameter-types">
13841391
* <code>SSM</code>
13851392
* </a> parameter types in the template.</p>
13861393
*/
@@ -2193,6 +2200,41 @@ export interface DeploymentTargets {
21932200
* deploys.</p>
21942201
*/
21952202
OrganizationalUnitIds?: string[];
2203+
2204+
/**
2205+
* <p>Limit deployment targets to individual accounts or include additional accounts with
2206+
* provided OUs.</p>
2207+
*
2208+
* <p>The following is a list of possible values for the <code>AccountFilterType</code>
2209+
* operation.</p>
2210+
* <ul>
2211+
* <li>
2212+
* <p>
2213+
* <code>INTERSECTION</code>: StackSets deploys to the accounts specified in
2214+
* <code>Accounts</code> parameter. </p>
2215+
* </li>
2216+
* <li>
2217+
* <p>
2218+
* <code>DIFFERENCE</code>: StackSets excludes the accounts specified in
2219+
* <code>Accounts</code> parameter. This enables user to avoid certain accounts within an OU
2220+
* such as suspended accounts.</p>
2221+
* </li>
2222+
* <li>
2223+
* <p>
2224+
* <code>UNION</code>: (default value) StackSets includes additional accounts deployment
2225+
* targets. </p>
2226+
* <p>This is the default value if <code>AccountFilterType</code> is not provided. This
2227+
* enables user to update an entire OU and individual accounts from a different OU in one
2228+
* request, which used to be two separate requests.</p>
2229+
* </li>
2230+
* <li>
2231+
* <p>
2232+
* <code>NONE</code>: Deploys to all the accounts in specified organizational units
2233+
* (OU).</p>
2234+
* </li>
2235+
* </ul>
2236+
*/
2237+
AccountFilterType?: AccountFilterType | string;
21962238
}
21972239

21982240
export namespace DeploymentTargets {
@@ -2228,8 +2270,7 @@ export interface StackSetOperationPreferences {
22282270

22292271
/**
22302272
* <p>The number of accounts, per Region, for which this operation can fail before CloudFormation stops the operation in that Region. If the operation is stopped in a
2231-
* Region, CloudFormation doesn't attempt the operation in any subsequent
2232-
* Regions.</p>
2273+
* Region, CloudFormation doesn't attempt the operation in any subsequent Regions.</p>
22332274
* <p>Conditional: You must specify either <code>FailureToleranceCount</code> or
22342275
* <code>FailureTolerancePercentage</code> (but not both).</p>
22352276
* <p>By default, <code>0</code> is specified.</p>
@@ -2238,9 +2279,8 @@ export interface StackSetOperationPreferences {
22382279

22392280
/**
22402281
* <p>The percentage of accounts, per Region, for which this stack operation can fail before
2241-
* CloudFormation stops the operation in that Region. If the operation is stopped
2242-
* in a Region, CloudFormation doesn't attempt the operation in any subsequent
2243-
* Regions.</p>
2282+
* CloudFormation stops the operation in that Region. If the operation is stopped in a
2283+
* Region, CloudFormation doesn't attempt the operation in any subsequent Regions.</p>
22442284
* <p>When calculating the number of accounts based on the specified percentage, CloudFormation rounds <i>down</i> to the next whole number.</p>
22452285
* <p>Conditional: You must specify either <code>FailureToleranceCount</code> or
22462286
* <code>FailureTolerancePercentage</code>, but not both.</p>
@@ -4035,12 +4075,12 @@ export namespace StackInstanceComprehensiveStatus {
40354075
export type StackInstanceStatus = "CURRENT" | "INOPERABLE" | "OUTDATED";
40364076

40374077
/**
4038-
* <p>An CloudFormation stack, in a specific account and Region, that's part of a
4039-
* stack set operation. A stack instance is a reference to an attempted or actual stack in a
4040-
* given account within a given Region. A stack instance can exist without a stack—for
4041-
* example, if the stack couldn't be created for some reason. A stack instance is associated
4042-
* with only one stack set. Each stack instance contains the ID of its associated stack set,
4043-
* in addition to the ID of the actual stack and the stack status.</p>
4078+
* <p>An CloudFormation stack, in a specific account and Region, that's part of a stack
4079+
* set operation. A stack instance is a reference to an attempted or actual stack in a given
4080+
* account within a given Region. A stack instance can exist without a stack—for example, if
4081+
* the stack couldn't be created for some reason. A stack instance is associated with only one
4082+
* stack set. Each stack instance contains the ID of its associated stack set, in addition to
4083+
* the ID of the actual stack and the stack status.</p>
40444084
*/
40454085
export interface StackInstance {
40464086
/**
@@ -5572,8 +5612,8 @@ export interface StackSetOperation {
55725612
* during stack create and update operations. If the number of failed stacks within a
55735613
* Region exceeds the failure tolerance, the status of the operation in the Region is
55745614
* set to <code>FAILED</code>. This in turn sets the status of the operation as a whole
5575-
* to <code>FAILED</code>, and CloudFormation cancels the operation in any
5576-
* remaining Regions.</p>
5615+
* to <code>FAILED</code>, and CloudFormation cancels the operation in any remaining
5616+
* Regions.</p>
55775617
* </li>
55785618
* <li>
55795619
* <p>
@@ -5616,8 +5656,8 @@ export interface StackSetOperation {
56165656
RetainStacks?: boolean;
56175657

56185658
/**
5619-
* <p>The Amazon Resource Name (ARN) of the IAM role used to perform this
5620-
* stack set operation.</p>
5659+
* <p>The Amazon Resource Name (ARN) of the IAM role used to perform this stack
5660+
* set operation.</p>
56215661
* <p>Use customized administrator roles to control which users or groups can manage specific
56225662
* stack sets within the same administrator account. For more information, see <a href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs.html">Define Permissions for Multiple
56235663
* Administrators</a> in the <i>CloudFormation User Guide</i>.</p>
@@ -5635,9 +5675,9 @@ export interface StackSetOperation {
56355675
/**
56365676
* <p>The time at which the operation was initiated. Note that the creation times for the
56375677
* stack set operation might differ from the creation time of the individual stacks
5638-
* themselves. This is because CloudFormation needs to perform preparatory work for
5639-
* the operation, such as dispatching the work to the requested Regions, before actually
5640-
* creating the first stacks.</p>
5678+
* themselves. This is because CloudFormation needs to perform preparatory work for the
5679+
* operation, such as dispatching the work to the requested Regions, before actually creating
5680+
* the first stacks.</p>
56415681
*/
56425682
CreationTimestamp?: Date;
56435683

@@ -5850,7 +5890,8 @@ export interface DescribeTypeOutput {
58505890
* <p>The ID of the default version of the extension. The default version is used when the
58515891
* extension version isn't specified.</p>
58525892
* <p>This applies only to private extensions you have registered in your account. For public
5853-
* extensions, both those provided by Amazon Web Services and published by third parties, CloudFormation returns <code>null</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_RegisterType.html">RegisterType</a>.</p>
5893+
* extensions, both those provided by Amazon Web Services and published by third parties,
5894+
* CloudFormation returns <code>null</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_RegisterType.html">RegisterType</a>.</p>
58545895
* <p>To set the default version of an extension, use <code>
58555896
* <a>SetTypeDefaultVersion</a>
58565897
* </code>.</p>
@@ -5982,8 +6023,8 @@ export interface DescribeTypeOutput {
59826023
/**
59836024
* <p>Contains logging configuration information for private extensions. This applies only to
59846025
* private extensions you have registered in your account. For public extensions, both those
5985-
* provided by Amazon Web Services and published by third parties, CloudFormation returns
5986-
* <code>null</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_RegisterType.html">RegisterType</a>.</p>
6026+
* provided by Amazon Web Services and published by third parties, CloudFormation
6027+
* returns <code>null</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_RegisterType.html">RegisterType</a>.</p>
59876028
*/
59886029
LoggingConfig?: LoggingConfig;
59896030

@@ -6021,7 +6062,7 @@ export interface DescribeTypeOutput {
60216062
* <li>
60226063
* <p>
60236064
* <code>PUBLIC</code>: The extension is publicly visible and usable within any
6024-
* Amazon Web Services account.</p>
6065+
* Amazon Web Services account.</p>
60256066
* </li>
60266067
* </ul>
60276068
*/
@@ -7813,8 +7854,8 @@ export interface StackSetOperationResultSummary {
78137854
StatusReason?: string;
78147855

78157856
/**
7816-
* <p>The results of the account gate function CloudFormation invokes, if present,
7817-
* before proceeding with stack set operations in an account.</p>
7857+
* <p>The results of the account gate function CloudFormation invokes, if present, before
7858+
* proceeding with stack set operations in an account.</p>
78187859
*/
78197860
AccountGateResult?: AccountGateResult;
78207861

@@ -7942,8 +7983,8 @@ export interface StackSetOperationSummary {
79427983
* during stack create and update operations. If the number of failed stacks within a
79437984
* Region exceeds the failure tolerance, the status of the operation in the Region is
79447985
* set to <code>FAILED</code>. This in turn sets the status of the operation as a whole
7945-
* to <code>FAILED</code>, and CloudFormation cancels the operation in any
7946-
* remaining Regions.</p>
7986+
* to <code>FAILED</code>, and CloudFormation cancels the operation in any remaining
7987+
* Regions.</p>
79477988
* </li>
79487989
* <li>
79497990
* <p>
@@ -7976,9 +8017,9 @@ export interface StackSetOperationSummary {
79768017
/**
79778018
* <p>The time at which the operation was initiated. Note that the creation times for the
79788019
* stack set operation might differ from the creation time of the individual stacks
7979-
* themselves. This is because CloudFormation needs to perform preparatory work for
7980-
* the operation, such as dispatching the work to the requested Regions, before actually
7981-
* creating the first stacks.</p>
8020+
* themselves. This is because CloudFormation needs to perform preparatory work for the
8021+
* operation, such as dispatching the work to the requested Regions, before actually creating
8022+
* the first stacks.</p>
79828023
*/
79838024
CreationTimestamp?: Date;
79848025

@@ -8377,8 +8418,8 @@ export interface ListTypesInput {
83778418
* <li>
83788419
* <p>
83798420
* <code>PUBLIC</code>: Extensions that are publicly visible and available to be
8380-
* activated within any Amazon Web Services account. This includes extensions from Amazon Web Services, in
8381-
* addition to third-party publishers.</p>
8421+
* activated within any Amazon Web Services account. This includes extensions from
8422+
* Amazon Web Services, in addition to third-party publishers.</p>
83828423
* </li>
83838424
* </ul>
83848425
* <p>The default is <code>PRIVATE</code>.</p>
@@ -8838,8 +8879,7 @@ export namespace PublishTypeInput {
88388879

88398880
export interface PublishTypeOutput {
88408881
/**
8841-
* <p>The Amazon Resource Name (ARN) assigned to the public extension upon
8842-
* publication.</p>
8882+
* <p>The Amazon Resource Name (ARN) assigned to the public extension upon publication.</p>
88438883
*/
88448884
PublicTypeArn?: string;
88458885
}
@@ -9046,7 +9086,8 @@ export interface RegisterTypeInput {
90469086
* <i>company_or_organization</i>::<i>service</i>::<i>type</i>::MODULE.</p>
90479087
* </li>
90489088
* <li>
9049-
* <p>For hooks, <i>MyCompany</i>::<i>Testing</i>::<i>MyTestHook</i>.</p>
9089+
* <p>For hooks,
9090+
* <i>MyCompany</i>::<i>Testing</i>::<i>MyTestHook</i>.</p>
90509091
* </li>
90519092
* </ul>
90529093
*
@@ -9705,8 +9746,8 @@ export interface UpdateStackInput {
97059746
* <p>You should only update stacks directly from a stack template that contains
97069747
* macros if you know what processing the macro performs.</p>
97079748
* <p>Each macro relies on an underlying Lambda service function for
9708-
* processing stack templates. Be aware that the Lambda function owner can update the
9709-
* function operation without CloudFormation being notified.</p>
9749+
* processing stack templates. Be aware that the Lambda function owner
9750+
* can update the function operation without CloudFormation being notified.</p>
97109751
* </important>
97119752
* <p>For more information, see <a href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html">Using
97129753
* CloudFormation Macros to Perform Custom Processing on

clients/client-cloudformation/src/protocols/Aws_query.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5268,6 +5268,9 @@ const serializeAws_queryDeploymentTargets = (input: DeploymentTargets, context:
52685268
entries[loc] = value;
52695269
});
52705270
}
5271+
if (input.AccountFilterType !== undefined && input.AccountFilterType !== null) {
5272+
entries["AccountFilterType"] = input.AccountFilterType;
5273+
}
52715274
return entries;
52725275
};
52735276

@@ -7289,6 +7292,7 @@ const deserializeAws_queryDeploymentTargets = (output: any, context: __SerdeCont
72897292
Accounts: undefined,
72907293
AccountsUrl: undefined,
72917294
OrganizationalUnitIds: undefined,
7295+
AccountFilterType: undefined,
72927296
};
72937297
if (output.Accounts === "") {
72947298
contents.Accounts = [];
@@ -7306,6 +7310,9 @@ const deserializeAws_queryDeploymentTargets = (output: any, context: __SerdeCont
73067310
context
73077311
);
73087312
}
7313+
if (output["AccountFilterType"] !== undefined) {
7314+
contents.AccountFilterType = __expectString(output["AccountFilterType"]);
7315+
}
73097316
return contents;
73107317
};
73117318

0 commit comments

Comments
 (0)