@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:37.566Z") @Stability(value=Stable) public abstract class StackInstances extends software.amazon.jsii.JsiiObject
Example:
// Example automatically generated from non-compiling source. May contain errors.
Pipeline pipeline;
Artifact sourceOutput;
pipeline.addStage(StageOptions.builder()
.stageName("DeployStackSets")
.actions(List.of(
// First, update the StackSet itself with the newest template
CloudFormationDeployStackSetAction.Builder.create()
.actionName("UpdateStackSet")
.runOrder(1)
.stackSetName("MyStackSet")
.template(StackSetTemplate.fromArtifactPath(sourceOutput.atPath("template.yaml")))
// Change this to 'StackSetDeploymentModel.organizations()' if you want to deploy to OUs
.deploymentModel(StackSetDeploymentModel.selfManaged())
// This deploys to a set of accounts
.stackInstances(StackInstances.inAccounts(List.of("111111111111"), List.of("us-east-1", "eu-west-1")))
.build(),
// Afterwards, update/create additional instances in other accounts
CloudFormationDeployStackInstancesAction.Builder.create()
.actionName("AddMoreInstances")
.runOrder(2)
.stackSetName("MyStackSet")
.stackInstances(StackInstances.inAccounts(List.of("222222222222", "333333333333"), List.of("us-east-1", "eu-west-1")))
.build()))
.build());
| Modifier | Constructor and Description |
|---|---|
protected |
StackInstances() |
protected |
StackInstances(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
StackInstances(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
static StackInstances |
fromArtifactPath(ArtifactPath artifactPath,
List<String> regions)
Create stack instances in a set of accounts or organizational units taken from the pipeline artifacts, and a set of regions The file must be a JSON file containing a list of strings.
|
static StackInstances |
inAccounts(List<String> accounts,
List<String> regions)
Create stack instances in a set of accounts and regions passed as literal lists.
|
static StackInstances |
inOrganizationalUnits(List<String> ous,
List<String> regions)
Create stack instances in all accounts in a set of Organizational Units (OUs) and regions passed as literal lists.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected StackInstances(software.amazon.jsii.JsiiObjectRef objRef)
protected StackInstances(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable) protected StackInstances()
@Stability(value=Stable) @NotNull public static StackInstances fromArtifactPath(@NotNull ArtifactPath artifactPath, @NotNull List<String> regions)
For example:
[
"111111111111",
"222222222222",
"333333333333"
]
Stack Instances will be created in every combination of region and account, or region and Organizational Units (OUs).
If this is set of Organizational Units, you must have selected StackSetDeploymentModel.organizations()
as deployment model.
artifactPath - This parameter is required.regions - This parameter is required.@Stability(value=Stable) @NotNull public static StackInstances inAccounts(@NotNull List<String> accounts, @NotNull List<String> regions)
Stack Instances will be created in every combination of region and account.
NOTE:
StackInstances.inAccounts()andStackInstances.inOrganizationalUnits()have exactly the same behavior, and you can use them interchangeably if you want. The only difference between them is that your code clearly indicates what entity it's working with.
accounts - This parameter is required.regions - This parameter is required.@Stability(value=Stable) @NotNull public static StackInstances inOrganizationalUnits(@NotNull List<String> ous, @NotNull List<String> regions)
If you want to deploy to Organization Units, you must choose have created the StackSet
with deploymentModel: DeploymentModel.organizations().
Stack Instances will be created in every combination of region and account.
NOTE:
StackInstances.inAccounts()andStackInstances.inOrganizationalUnits()have exactly the same behavior, and you can use them interchangeably if you want. The only difference between them is that your code clearly indicates what entity it's working with.
ous - This parameter is required.regions - This parameter is required.Copyright © 2022. All rights reserved.