io.github.cdklabs.cdk.stacksets.StackSet Maven / Gradle / Ivy
package io.github.cdklabs.cdk.stacksets;
/**
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.83.0 (build fd4544d)", date = "2023-06-13T00:17:42.431Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Jsii(module = io.github.cdklabs.cdk.stacksets.$Module.class, fqn = "cdk-stacksets.StackSet")
public class StackSet extends software.amazon.awscdk.Resource implements io.github.cdklabs.cdk.stacksets.IStackSet {
protected StackSet(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected StackSet(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* @param scope This parameter is required.
* @param id This parameter is required.
* @param props This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public StackSet(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.stacksets.StackSetProps props) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") });
}
/**
* @param target This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public void addTarget(final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.stacksets.StackSetTarget target) {
software.amazon.jsii.Kernel.call(this, "addTarget", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(target, "target is required") });
}
/**
* (experimental) Only available on self managed stacksets.
*
* The admin role that CloudFormation will use to perform stackset operations.
* This role should only have permissions to be assumed by the CloudFormation service
* and to assume the execution role in each individual account.
*
* When you create the execution role it must have an assume role policy statement which
* allows sts:AssumeRole
from this admin role.
*
* To grant specific users/groups access to use this role to deploy stacksets they must have
* a policy that allows iam:GetRole
& iam:PassRole
on this role resource.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.iam.IRole getRole() {
return software.amazon.jsii.Kernel.get(this, "role", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.iam.IRole.class));
}
/**
* (experimental) A fluent builder for {@link io.github.cdklabs.cdk.stacksets.StackSet}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
/**
* @return a new instance of {@link Builder}.
* @param scope This parameter is required.
* @param id This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static Builder create(final software.constructs.Construct scope, final java.lang.String id) {
return new Builder(scope, id);
}
private final software.constructs.Construct scope;
private final java.lang.String id;
private final io.github.cdklabs.cdk.stacksets.StackSetProps.Builder props;
private Builder(final software.constructs.Construct scope, final java.lang.String id) {
this.scope = scope;
this.id = id;
this.props = new io.github.cdklabs.cdk.stacksets.StackSetProps.Builder();
}
/**
* (experimental) Which accounts/OUs and regions to deploy the StackSet to.
*
* @return {@code this}
* @param target Which accounts/OUs and regions to deploy the StackSet to. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder target(final io.github.cdklabs.cdk.stacksets.StackSetTarget target) {
this.props.target(target);
return this;
}
/**
* (experimental) The Stack that will be deployed to the target.
*
* @return {@code this}
* @param template The Stack that will be deployed to the target. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder template(final io.github.cdklabs.cdk.stacksets.StackSetTemplate template) {
this.props.template(template);
return this;
}
/**
* (experimental) Specify a list of capabilities required by your stackset.
*
* StackSets that contains certain functionality require an explicit acknowledgement
* that the stack contains these capabilities.
*
* If you deploy a stack that requires certain capabilities and they are
* not specified, the deployment will fail with a InsufficientCapabilities
error.
*
* Default: - no specific capabilities
*
* @return {@code this}
* @param capabilities Specify a list of capabilities required by your stackset. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder capabilities(final java.util.List extends io.github.cdklabs.cdk.stacksets.Capability> capabilities) {
this.props.capabilities(capabilities);
return this;
}
/**
* (experimental) The type of deployment for this StackSet.
*
* The deployment can either be managed by
* AWS Organizations (i.e. DeploymentType.serviceManaged()) or by the AWS account that
* the StackSet is deployed from.
*
* In order to use DeploymentType.serviceManaged() the account needs to either be the
* organizations's management account or a delegated administrator account.
*
* Default: DeploymentType.self()
*
* @return {@code this}
* @param deploymentType The type of deployment for this StackSet. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder deploymentType(final io.github.cdklabs.cdk.stacksets.DeploymentType deploymentType) {
this.props.deploymentType(deploymentType);
return this;
}
/**
* (experimental) An optional description to add to the StackSet.
*
* Default: - no description
*
* @return {@code this}
* @param description An optional description to add to the StackSet. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder description(final java.lang.String description) {
this.props.description(description);
return this;
}
/**
* (experimental) If this is true
then StackSets will perform non-conflicting operations concurrently and queue any conflicting operations.
*
* This means that you can submit more than one operation per StackSet and they will be
* executed concurrently. For example you can submit a single request that updates existing
* stack instances and creates new stack instances. Any conflicting operations will be queued
* for immediate processing once the conflict is resolved.
*
* Default: true
*
* @return {@code this}
* @param managedExecution If this is true
then StackSets will perform non-conflicting operations concurrently and queue any conflicting operations. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder managedExecution(final java.lang.Boolean managedExecution) {
this.props.managedExecution(managedExecution);
return this;
}
/**
* @return {@code this}
* @param operationPreferences This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder operationPreferences(final io.github.cdklabs.cdk.stacksets.OperationPreferences operationPreferences) {
this.props.operationPreferences(operationPreferences);
return this;
}
/**
* (experimental) The name of the stack set.
*
* Default: - CloudFormation generated name
*
* @return {@code this}
* @param stackSetName The name of the stack set. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder stackSetName(final java.lang.String stackSetName) {
this.props.stackSetName(stackSetName);
return this;
}
/**
* @return a newly built instance of {@link io.github.cdklabs.cdk.stacksets.StackSet}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public io.github.cdklabs.cdk.stacksets.StackSet build() {
return new io.github.cdklabs.cdk.stacksets.StackSet(
this.scope,
this.id,
this.props.build()
);
}
}
}