Class Stack
- java.lang.Object
-
- software.amazon.awssdk.services.cloudformation.model.Stack
-
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<Stack.Builder,Stack>
@Generated("software.amazon.awssdk:codegen") public final class Stack extends Object implements SdkPojo, Serializable, ToCopyableBuilder<Stack.Builder,Stack>
The Stack data type.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
Stack.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Stack.Builder
builder()
List<Capability>
capabilities()
The capabilities allowed in the stack.List<String>
capabilitiesAsStrings()
The capabilities allowed in the stack.String
changeSetId()
The unique ID of the change set.Instant
creationTime()
The time at which the stack was created.DeletionMode
deletionMode()
Specifies the deletion mode for the stack.String
deletionModeAsString()
Specifies the deletion mode for the stack.Instant
deletionTime()
The time the stack was deleted.String
description()
A user-defined description associated with the stack.DetailedStatus
detailedStatus()
The detailed status of the resource or stack.String
detailedStatusAsString()
The detailed status of the resource or stack.Boolean
disableRollback()
Boolean to enable or disable rollback on stack creation failures:StackDriftInformation
driftInformation()
Information about whether a stack's actual configuration differs, or has drifted, from its expected configuration, as defined in the stack template and any values specified as template parameters.Boolean
enableTerminationProtection()
Whether termination protection is enabled for the stack.boolean
equals(Object obj)
boolean
equalsBySdkFields(Object obj)
<T> Optional<T>
getValueForField(String fieldName, Class<T> clazz)
boolean
hasCapabilities()
For responses, this returns true if the service returned a value for the Capabilities property.int
hashCode()
boolean
hasNotificationARNs()
For responses, this returns true if the service returned a value for the NotificationARNs property.boolean
hasOutputs()
For responses, this returns true if the service returned a value for the Outputs property.boolean
hasParameters()
For responses, this returns true if the service returned a value for the Parameters property.boolean
hasTags()
For responses, this returns true if the service returned a value for the Tags property.Instant
lastUpdatedTime()
The time the stack was last updated.List<String>
notificationARNs()
Amazon SNS topic Amazon Resource Names (ARNs) to which stack related events are published.List<Output>
outputs()
A list of output structures.List<Parameter>
parameters()
A list ofParameter
structures.String
parentId()
For nested stacks--stacks created as resources for another stack--the stack ID of the direct parent of this stack.Boolean
retainExceptOnCreate()
When set totrue
, newly created resources are deleted when the operation rolls back.String
roleARN()
The Amazon Resource Name (ARN) of an IAM role that's associated with the stack.RollbackConfiguration
rollbackConfiguration()
The rollback triggers for CloudFormation to monitor during stack creation and updating operations, and for the specified monitoring period afterwards.String
rootId()
For nested stacks--stacks created as resources for another stack--the stack ID of the top-level stack to which the nested stack ultimately belongs.List<SdkField<?>>
sdkFields()
static Class<? extends Stack.Builder>
serializableBuilderClass()
String
stackId()
Unique identifier of the stack.String
stackName()
The name associated with the stack.StackStatus
stackStatus()
Current status of the stack.String
stackStatusAsString()
Current status of the stack.String
stackStatusReason()
Success/failure message associated with the stack status.List<Tag>
tags()
A list ofTag
s that specify information about the stack.Integer
timeoutInMinutes()
The amount of time within which stack creation should complete.Stack.Builder
toBuilder()
String
toString()
Returns a string representation of this object.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
stackId
public final String stackId()
Unique identifier of the stack.
- Returns:
- Unique identifier of the stack.
-
stackName
public final String stackName()
The name associated with the stack.
- Returns:
- The name associated with the stack.
-
changeSetId
public final String changeSetId()
The unique ID of the change set.
- Returns:
- The unique ID of the change set.
-
description
public final String description()
A user-defined description associated with the stack.
- Returns:
- A user-defined description associated with the stack.
-
hasParameters
public final boolean hasParameters()
For responses, this returns true if the service returned a value for the Parameters property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
parameters
public final List<Parameter> parameters()
A list of
Parameter
structures.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasParameters()
method.- Returns:
- A list of
Parameter
structures.
-
creationTime
public final Instant creationTime()
The time at which the stack was created.
- Returns:
- The time at which the stack was created.
-
deletionTime
public final Instant deletionTime()
The time the stack was deleted.
- Returns:
- The time the stack was deleted.
-
lastUpdatedTime
public final Instant lastUpdatedTime()
The time the stack was last updated. This field will only be returned if the stack has been updated at least once.
- Returns:
- The time the stack was last updated. This field will only be returned if the stack has been updated at least once.
-
rollbackConfiguration
public final RollbackConfiguration rollbackConfiguration()
The rollback triggers for CloudFormation to monitor during stack creation and updating operations, and for the specified monitoring period afterwards.
- Returns:
- The rollback triggers for CloudFormation to monitor during stack creation and updating operations, and for the specified monitoring period afterwards.
-
stackStatus
public final StackStatus stackStatus()
Current status of the stack.
If the service returns an enum value that is not available in the current SDK version,
stackStatus
will returnStackStatus.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromstackStatusAsString()
.- Returns:
- Current status of the stack.
- See Also:
StackStatus
-
stackStatusAsString
public final String stackStatusAsString()
Current status of the stack.
If the service returns an enum value that is not available in the current SDK version,
stackStatus
will returnStackStatus.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromstackStatusAsString()
.- Returns:
- Current status of the stack.
- See Also:
StackStatus
-
stackStatusReason
public final String stackStatusReason()
Success/failure message associated with the stack status.
- Returns:
- Success/failure message associated with the stack status.
-
disableRollback
public final Boolean disableRollback()
Boolean to enable or disable rollback on stack creation failures:
-
true
: disable rollback. -
false
: enable rollback.
- Returns:
- Boolean to enable or disable rollback on stack creation failures:
-
true
: disable rollback. -
false
: enable rollback.
-
-
-
hasNotificationARNs
public final boolean hasNotificationARNs()
For responses, this returns true if the service returned a value for the NotificationARNs property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
notificationARNs
public final List<String> notificationARNs()
Amazon SNS topic Amazon Resource Names (ARNs) to which stack related events are published.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasNotificationARNs()
method.- Returns:
- Amazon SNS topic Amazon Resource Names (ARNs) to which stack related events are published.
-
timeoutInMinutes
public final Integer timeoutInMinutes()
The amount of time within which stack creation should complete.
- Returns:
- The amount of time within which stack creation should complete.
-
capabilities
public final List<Capability> capabilities()
The capabilities allowed in the stack.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasCapabilities()
method.- Returns:
- The capabilities allowed in the stack.
-
hasCapabilities
public final boolean hasCapabilities()
For responses, this returns true if the service returned a value for the Capabilities property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
capabilitiesAsStrings
public final List<String> capabilitiesAsStrings()
The capabilities allowed in the stack.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasCapabilities()
method.- Returns:
- The capabilities allowed in the stack.
-
hasOutputs
public final boolean hasOutputs()
For responses, this returns true if the service returned a value for the Outputs property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
outputs
public final List<Output> outputs()
A list of output structures.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasOutputs()
method.- Returns:
- A list of output structures.
-
roleARN
public final String roleARN()
The Amazon Resource Name (ARN) of an IAM role that's associated with the stack. During a stack operation, CloudFormation uses this role's credentials to make calls on your behalf.
- Returns:
- The Amazon Resource Name (ARN) of an IAM role that's associated with the stack. During a stack operation, CloudFormation uses this role's credentials to make calls on your behalf.
-
hasTags
public final boolean hasTags()
For responses, this returns true if the service returned a value for the Tags property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
tags
public final List<Tag> tags()
A list of
Tag
s that specify information about the stack.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasTags()
method.- Returns:
- A list of
Tag
s that specify information about the stack.
-
enableTerminationProtection
public final Boolean enableTerminationProtection()
Whether termination protection is enabled for the stack.
For nested stacks, termination protection is set on the root stack and can't be changed directly on the nested stack. For more information, see Protect a CloudFormation stack from being deleted in the CloudFormation User Guide.
- Returns:
- Whether termination protection is enabled for the stack.
For nested stacks, termination protection is set on the root stack and can't be changed directly on the nested stack. For more information, see Protect a CloudFormation stack from being deleted in the CloudFormation User Guide.
-
parentId
public final String parentId()
For nested stacks--stacks created as resources for another stack--the stack ID of the direct parent of this stack. For the first level of nested stacks, the root stack is also the parent stack.
For more information, see Embed stacks within other stacks using nested stacks in the CloudFormation User Guide.
- Returns:
- For nested stacks--stacks created as resources for another stack--the stack ID of the direct parent of
this stack. For the first level of nested stacks, the root stack is also the parent stack.
For more information, see Embed stacks within other stacks using nested stacks in the CloudFormation User Guide.
-
rootId
public final String rootId()
For nested stacks--stacks created as resources for another stack--the stack ID of the top-level stack to which the nested stack ultimately belongs.
For more information, see Embed stacks within other stacks using nested stacks in the CloudFormation User Guide.
- Returns:
- For nested stacks--stacks created as resources for another stack--the stack ID of the top-level stack to
which the nested stack ultimately belongs.
For more information, see Embed stacks within other stacks using nested stacks in the CloudFormation User Guide.
-
driftInformation
public final StackDriftInformation driftInformation()
Information about whether a stack's actual configuration differs, or has drifted, from its expected configuration, as defined in the stack template and any values specified as template parameters. For more information, see Detect unmanaged configuration changes to stacks and resources with drift detection.
- Returns:
- Information about whether a stack's actual configuration differs, or has drifted, from its expected configuration, as defined in the stack template and any values specified as template parameters. For more information, see Detect unmanaged configuration changes to stacks and resources with drift detection.
-
retainExceptOnCreate
public final Boolean retainExceptOnCreate()
When set to
true
, newly created resources are deleted when the operation rolls back. This includes newly created resources marked with a deletion policy ofRetain
.Default:
false
- Returns:
- When set to
true
, newly created resources are deleted when the operation rolls back. This includes newly created resources marked with a deletion policy ofRetain
.Default:
false
-
deletionMode
public final DeletionMode deletionMode()
Specifies the deletion mode for the stack. Possible values are:
-
STANDARD
- Use the standard behavior. Specifying this value is the same as not specifying this parameter. -
FORCE_DELETE_STACK
- Delete the stack if it's stuck in aDELETE_FAILED
state due to resource deletion failure.
If the service returns an enum value that is not available in the current SDK version,
deletionMode
will returnDeletionMode.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromdeletionModeAsString()
.- Returns:
- Specifies the deletion mode for the stack. Possible values are:
-
STANDARD
- Use the standard behavior. Specifying this value is the same as not specifying this parameter. -
FORCE_DELETE_STACK
- Delete the stack if it's stuck in aDELETE_FAILED
state due to resource deletion failure.
-
- See Also:
DeletionMode
-
-
deletionModeAsString
public final String deletionModeAsString()
Specifies the deletion mode for the stack. Possible values are:
-
STANDARD
- Use the standard behavior. Specifying this value is the same as not specifying this parameter. -
FORCE_DELETE_STACK
- Delete the stack if it's stuck in aDELETE_FAILED
state due to resource deletion failure.
If the service returns an enum value that is not available in the current SDK version,
deletionMode
will returnDeletionMode.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromdeletionModeAsString()
.- Returns:
- Specifies the deletion mode for the stack. Possible values are:
-
STANDARD
- Use the standard behavior. Specifying this value is the same as not specifying this parameter. -
FORCE_DELETE_STACK
- Delete the stack if it's stuck in aDELETE_FAILED
state due to resource deletion failure.
-
- See Also:
DeletionMode
-
-
detailedStatus
public final DetailedStatus detailedStatus()
The detailed status of the resource or stack. If
CONFIGURATION_COMPLETE
is present, the resource or resource configuration phase has completed and the stabilization of the resources is in progress. The stack setsCONFIGURATION_COMPLETE
when all of the resources in the stack have reached that event. For more information, see Understand CloudFormation stack creation events in the CloudFormation User Guide.If the service returns an enum value that is not available in the current SDK version,
detailedStatus
will returnDetailedStatus.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromdetailedStatusAsString()
.- Returns:
- The detailed status of the resource or stack. If
CONFIGURATION_COMPLETE
is present, the resource or resource configuration phase has completed and the stabilization of the resources is in progress. The stack setsCONFIGURATION_COMPLETE
when all of the resources in the stack have reached that event. For more information, see Understand CloudFormation stack creation events in the CloudFormation User Guide. - See Also:
DetailedStatus
-
detailedStatusAsString
public final String detailedStatusAsString()
The detailed status of the resource or stack. If
CONFIGURATION_COMPLETE
is present, the resource or resource configuration phase has completed and the stabilization of the resources is in progress. The stack setsCONFIGURATION_COMPLETE
when all of the resources in the stack have reached that event. For more information, see Understand CloudFormation stack creation events in the CloudFormation User Guide.If the service returns an enum value that is not available in the current SDK version,
detailedStatus
will returnDetailedStatus.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromdetailedStatusAsString()
.- Returns:
- The detailed status of the resource or stack. If
CONFIGURATION_COMPLETE
is present, the resource or resource configuration phase has completed and the stabilization of the resources is in progress. The stack setsCONFIGURATION_COMPLETE
when all of the resources in the stack have reached that event. For more information, see Understand CloudFormation stack creation events in the CloudFormation User Guide. - See Also:
DetailedStatus
-
toBuilder
public Stack.Builder toBuilder()
- Specified by:
toBuilder
in interfaceToCopyableBuilder<Stack.Builder,Stack>
-
builder
public static Stack.Builder builder()
-
serializableBuilderClass
public static Class<? extends Stack.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFields
in interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
-