@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:37.567Z") @Stability(value=Stable) public abstract class StackSetDeploymentModel 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 |
StackSetDeploymentModel() |
protected |
StackSetDeploymentModel(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
StackSetDeploymentModel(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
static StackSetDeploymentModel |
organizations()
Deploy to AWS Organizations accounts.
|
static StackSetDeploymentModel |
organizations(OrganizationsDeploymentProps props)
Deploy to AWS Organizations accounts.
|
static StackSetDeploymentModel |
selfManaged()
Deploy to AWS Accounts not managed by AWS Organizations.
|
static StackSetDeploymentModel |
selfManaged(SelfManagedDeploymentProps props)
Deploy to AWS Accounts not managed by AWS Organizations.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected StackSetDeploymentModel(software.amazon.jsii.JsiiObjectRef objRef)
protected StackSetDeploymentModel(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable) protected StackSetDeploymentModel()
@Stability(value=Stable) @NotNull public static StackSetDeploymentModel organizations(@Nullable OrganizationsDeploymentProps props)
AWS CloudFormation StackSets automatically creates the IAM roles required to deploy to accounts managed by AWS Organizations. This requires an account to be a member of an Organization.
Using this deployment model, you can specify either AWS Account Ids or
Organization Unit Ids in the stackInstances parameter.
props - @Stability(value=Stable) @NotNull public static StackSetDeploymentModel organizations()
AWS CloudFormation StackSets automatically creates the IAM roles required to deploy to accounts managed by AWS Organizations. This requires an account to be a member of an Organization.
Using this deployment model, you can specify either AWS Account Ids or
Organization Unit Ids in the stackInstances parameter.
@Stability(value=Stable) @NotNull public static StackSetDeploymentModel selfManaged(@Nullable SelfManagedDeploymentProps props)
You are responsible for creating Execution Roles in every account you will
be deploying to in advance to create the actual stack instances. Unless you
specify overrides, StackSets expects the execution roles you create to have
the default name AWSCloudFormationStackSetExecutionRole. See the Grant
self-managed
permissions
section of the CloudFormation documentation.
The CDK will automatically create the central Administration Role in the Pipeline account which will be used to assume the Execution Role in each of the target accounts.
If you wish to use a pre-created Administration Role, use Role.fromRoleName()
or Role.fromRoleArn() to import it, and pass it to this function:
// Example automatically generated from non-compiling source. May contain errors.
IRole existingAdminRole = Role.fromRoleName(this, "AdminRole", "AWSCloudFormationStackSetAdministrationRole");
StackSetDeploymentModel deploymentModel = StackSetDeploymentModel.selfManaged(SelfManagedDeploymentProps.builder()
// Use an existing Role. Leave this out to create a new Role.
.administrationRole(existingAdminRole)
.build());
Using this deployment model, you can only specify AWS Account Ids in the
stackInstances parameter.
props - @Stability(value=Stable) @NotNull public static StackSetDeploymentModel selfManaged()
You are responsible for creating Execution Roles in every account you will
be deploying to in advance to create the actual stack instances. Unless you
specify overrides, StackSets expects the execution roles you create to have
the default name AWSCloudFormationStackSetExecutionRole. See the Grant
self-managed
permissions
section of the CloudFormation documentation.
The CDK will automatically create the central Administration Role in the Pipeline account which will be used to assume the Execution Role in each of the target accounts.
If you wish to use a pre-created Administration Role, use Role.fromRoleName()
or Role.fromRoleArn() to import it, and pass it to this function:
// Example automatically generated from non-compiling source. May contain errors.
IRole existingAdminRole = Role.fromRoleName(this, "AdminRole", "AWSCloudFormationStackSetAdministrationRole");
StackSetDeploymentModel deploymentModel = StackSetDeploymentModel.selfManaged(SelfManagedDeploymentProps.builder()
// Use an existing Role. Leave this out to create a new Role.
.administrationRole(existingAdminRole)
.build());
Using this deployment model, you can only specify AWS Account Ids in the
stackInstances parameter.
Copyright © 2022. All rights reserved.