java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-24T21:00:33.017Z") @Stability(Stable) public class CfnStack extends CfnResource implements IInspectable, ITaggable
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-stack.html.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.opsworks.*;
 Object customJson;
 CfnStack cfnStack = CfnStack.Builder.create(this, "MyCfnStack")
         .defaultInstanceProfileArn("defaultInstanceProfileArn")
         .name("name")
         .serviceRoleArn("serviceRoleArn")
         // the properties below are optional
         .agentVersion("agentVersion")
         .attributes(Map.of(
                 "attributesKey", "attributes"))
         .chefConfiguration(ChefConfigurationProperty.builder()
                 .berkshelfVersion("berkshelfVersion")
                 .manageBerkshelf(false)
                 .build())
         .cloneAppIds(List.of("cloneAppIds"))
         .clonePermissions(false)
         .configurationManager(StackConfigurationManagerProperty.builder()
                 .name("name")
                 .version("version")
                 .build())
         .customCookbooksSource(SourceProperty.builder()
                 .password("password")
                 .revision("revision")
                 .sshKey("sshKey")
                 .type("type")
                 .url("url")
                 .username("username")
                 .build())
         .customJson(customJson)
         .defaultAvailabilityZone("defaultAvailabilityZone")
         .defaultOs("defaultOs")
         .defaultRootDeviceType("defaultRootDeviceType")
         .defaultSshKeyName("defaultSshKeyName")
         .defaultSubnetId("defaultSubnetId")
         .ecsClusterArn("ecsClusterArn")
         .elasticIps(List.of(ElasticIpProperty.builder()
                 .ip("ip")
                 // the properties below are optional
                 .name("name")
                 .build()))
         .hostnameTheme("hostnameTheme")
         .rdsDbInstances(List.of(RdsDbInstanceProperty.builder()
                 .dbPassword("dbPassword")
                 .dbUser("dbUser")
                 .rdsDbInstanceArn("rdsDbInstanceArn")
                 .build()))
         .sourceStackId("sourceStackId")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .useCustomCookbooks(false)
         .useOpsworksSecurityGroups(false)
         .vpcId("vpcId")
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnStack

      protected CfnStack(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnStack

      protected CfnStack(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnStack

      @Stability(Stable) public CfnStack(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnStackProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getDefaultInstanceProfileArn

      @Stability(Stable) @NotNull public String getDefaultInstanceProfileArn()
      The Amazon Resource Name (ARN) of an IAM profile that is the default profile for all of the stack's EC2 instances.
    • setDefaultInstanceProfileArn

      @Stability(Stable) public void setDefaultInstanceProfileArn(@NotNull String value)
      The Amazon Resource Name (ARN) of an IAM profile that is the default profile for all of the stack's EC2 instances.
    • getName

      @Stability(Stable) @NotNull public String getName()
      The stack name.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      The stack name.
    • getServiceRoleArn

      @Stability(Stable) @NotNull public String getServiceRoleArn()
      The stack's IAM role, which allows AWS OpsWorks Stacks to work with AWS resources on your behalf.
    • setServiceRoleArn

      @Stability(Stable) public void setServiceRoleArn(@NotNull String value)
      The stack's IAM role, which allows AWS OpsWorks Stacks to work with AWS resources on your behalf.
    • getAgentVersion

      @Stability(Stable) @Nullable public String getAgentVersion()
      The default AWS OpsWorks Stacks agent version.

      You have the following options:.

    • setAgentVersion

      @Stability(Stable) public void setAgentVersion(@Nullable String value)
      The default AWS OpsWorks Stacks agent version.

      You have the following options:.

    • getAttributes

      @Stability(Stable) @Nullable public Object getAttributes()
      One or more user-defined key-value pairs to be added to the stack attributes.
    • setAttributes

      @Stability(Stable) public void setAttributes(@Nullable IResolvable value)
      One or more user-defined key-value pairs to be added to the stack attributes.
    • setAttributes

      @Stability(Stable) public void setAttributes(@Nullable Map<String,String> value)
      One or more user-defined key-value pairs to be added to the stack attributes.
    • getChefConfiguration

      @Stability(Stable) @Nullable public Object getChefConfiguration()
      A ChefConfiguration object that specifies whether to enable Berkshelf and the Berkshelf version on Chef 11.10 stacks. For more information, see Create a New Stack .
    • setChefConfiguration

      @Stability(Stable) public void setChefConfiguration(@Nullable IResolvable value)
      A ChefConfiguration object that specifies whether to enable Berkshelf and the Berkshelf version on Chef 11.10 stacks. For more information, see Create a New Stack .
    • setChefConfiguration

      @Stability(Stable) public void setChefConfiguration(@Nullable CfnStack.ChefConfigurationProperty value)
      A ChefConfiguration object that specifies whether to enable Berkshelf and the Berkshelf version on Chef 11.10 stacks. For more information, see Create a New Stack .
    • getCloneAppIds

      @Stability(Stable) @Nullable public List<String> getCloneAppIds()
      If you're cloning an AWS OpsWorks stack, a list of AWS OpsWorks application stack IDs from the source stack to include in the cloned stack.
    • setCloneAppIds

      @Stability(Stable) public void setCloneAppIds(@Nullable List<String> value)
      If you're cloning an AWS OpsWorks stack, a list of AWS OpsWorks application stack IDs from the source stack to include in the cloned stack.
    • getClonePermissions

      @Stability(Stable) @Nullable public Object getClonePermissions()
      If you're cloning an AWS OpsWorks stack, indicates whether to clone the source stack's permissions.
    • setClonePermissions

      @Stability(Stable) public void setClonePermissions(@Nullable Boolean value)
      If you're cloning an AWS OpsWorks stack, indicates whether to clone the source stack's permissions.
    • setClonePermissions

      @Stability(Stable) public void setClonePermissions(@Nullable IResolvable value)
      If you're cloning an AWS OpsWorks stack, indicates whether to clone the source stack's permissions.
    • getConfigurationManager

      @Stability(Stable) @Nullable public Object getConfigurationManager()
      The configuration manager.
    • setConfigurationManager

      @Stability(Stable) public void setConfigurationManager(@Nullable IResolvable value)
      The configuration manager.
    • setConfigurationManager

      @Stability(Stable) public void setConfigurationManager(@Nullable CfnStack.StackConfigurationManagerProperty value)
      The configuration manager.
    • getCustomCookbooksSource

      @Stability(Stable) @Nullable public Object getCustomCookbooksSource()
      Contains the information required to retrieve an app or cookbook from a repository.
    • setCustomCookbooksSource

      @Stability(Stable) public void setCustomCookbooksSource(@Nullable IResolvable value)
      Contains the information required to retrieve an app or cookbook from a repository.
    • setCustomCookbooksSource

      @Stability(Stable) public void setCustomCookbooksSource(@Nullable CfnStack.SourceProperty value)
      Contains the information required to retrieve an app or cookbook from a repository.
    • getCustomJson

      @Stability(Stable) @Nullable public Object getCustomJson()
      A string that contains user-defined, custom JSON.
    • setCustomJson

      @Stability(Stable) public void setCustomJson(@Nullable Object value)
      A string that contains user-defined, custom JSON.
    • getDefaultAvailabilityZone

      @Stability(Stable) @Nullable public String getDefaultAvailabilityZone()
      The stack's default Availability Zone, which must be in the specified region.
    • setDefaultAvailabilityZone

      @Stability(Stable) public void setDefaultAvailabilityZone(@Nullable String value)
      The stack's default Availability Zone, which must be in the specified region.
    • getDefaultOs

      @Stability(Stable) @Nullable public String getDefaultOs()
      The stack's default operating system, which is installed on every instance unless you specify a different operating system when you create the instance.
    • setDefaultOs

      @Stability(Stable) public void setDefaultOs(@Nullable String value)
      The stack's default operating system, which is installed on every instance unless you specify a different operating system when you create the instance.
    • getDefaultRootDeviceType

      @Stability(Stable) @Nullable public String getDefaultRootDeviceType()
      The default root device type.
    • setDefaultRootDeviceType

      @Stability(Stable) public void setDefaultRootDeviceType(@Nullable String value)
      The default root device type.
    • getDefaultSshKeyName

      @Stability(Stable) @Nullable public String getDefaultSshKeyName()
      A default Amazon EC2 key pair name.
    • setDefaultSshKeyName

      @Stability(Stable) public void setDefaultSshKeyName(@Nullable String value)
      A default Amazon EC2 key pair name.
    • getDefaultSubnetId

      @Stability(Stable) @Nullable public String getDefaultSubnetId()
      The stack's default subnet ID.
    • setDefaultSubnetId

      @Stability(Stable) public void setDefaultSubnetId(@Nullable String value)
      The stack's default subnet ID.
    • getEcsClusterArn

      @Stability(Stable) @Nullable public String getEcsClusterArn()
      The Amazon Resource Name (ARN) of the Amazon Elastic Container Service ( Amazon ECS ) cluster to register with the AWS OpsWorks stack.
    • setEcsClusterArn

      @Stability(Stable) public void setEcsClusterArn(@Nullable String value)
      The Amazon Resource Name (ARN) of the Amazon Elastic Container Service ( Amazon ECS ) cluster to register with the AWS OpsWorks stack.
    • getElasticIps

      @Stability(Stable) @Nullable public Object getElasticIps()
      A list of Elastic IP addresses to register with the AWS OpsWorks stack.
    • setElasticIps

      @Stability(Stable) public void setElasticIps(@Nullable IResolvable value)
      A list of Elastic IP addresses to register with the AWS OpsWorks stack.
    • setElasticIps

      @Stability(Stable) public void setElasticIps(@Nullable List<Object> value)
      A list of Elastic IP addresses to register with the AWS OpsWorks stack.
    • getHostnameTheme

      @Stability(Stable) @Nullable public String getHostnameTheme()
      The stack's host name theme, with spaces replaced by underscores.
    • setHostnameTheme

      @Stability(Stable) public void setHostnameTheme(@Nullable String value)
      The stack's host name theme, with spaces replaced by underscores.
    • getRdsDbInstances

      @Stability(Stable) @Nullable public Object getRdsDbInstances()
      The Amazon Relational Database Service ( Amazon RDS ) database instance to register with the AWS OpsWorks stack.
    • setRdsDbInstances

      @Stability(Stable) public void setRdsDbInstances(@Nullable IResolvable value)
      The Amazon Relational Database Service ( Amazon RDS ) database instance to register with the AWS OpsWorks stack.
    • setRdsDbInstances

      @Stability(Stable) public void setRdsDbInstances(@Nullable List<Object> value)
      The Amazon Relational Database Service ( Amazon RDS ) database instance to register with the AWS OpsWorks stack.
    • getSourceStackId

      @Stability(Stable) @Nullable public String getSourceStackId()
      If you're cloning an AWS OpsWorks stack, the stack ID of the source AWS OpsWorks stack to clone.
    • setSourceStackId

      @Stability(Stable) public void setSourceStackId(@Nullable String value)
      If you're cloning an AWS OpsWorks stack, the stack ID of the source AWS OpsWorks stack to clone.
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      A map that contains tag keys and tag values that are attached to a stack or layer.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      A map that contains tag keys and tag values that are attached to a stack or layer.
    • getUseCustomCookbooks

      @Stability(Stable) @Nullable public Object getUseCustomCookbooks()
      Whether the stack uses custom cookbooks.
    • setUseCustomCookbooks

      @Stability(Stable) public void setUseCustomCookbooks(@Nullable Boolean value)
      Whether the stack uses custom cookbooks.
    • setUseCustomCookbooks

      @Stability(Stable) public void setUseCustomCookbooks(@Nullable IResolvable value)
      Whether the stack uses custom cookbooks.
    • getUseOpsworksSecurityGroups

      @Stability(Stable) @Nullable public Object getUseOpsworksSecurityGroups()
      Whether to associate the AWS OpsWorks Stacks built-in security groups with the stack's layers.
    • setUseOpsworksSecurityGroups

      @Stability(Stable) public void setUseOpsworksSecurityGroups(@Nullable Boolean value)
      Whether to associate the AWS OpsWorks Stacks built-in security groups with the stack's layers.
    • setUseOpsworksSecurityGroups

      @Stability(Stable) public void setUseOpsworksSecurityGroups(@Nullable IResolvable value)
      Whether to associate the AWS OpsWorks Stacks built-in security groups with the stack's layers.
    • getVpcId

      @Stability(Stable) @Nullable public String getVpcId()
      The ID of the VPC that the stack is to be launched into.
    • setVpcId

      @Stability(Stable) public void setVpcId(@Nullable String value)
      The ID of the VPC that the stack is to be launched into.