All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.awsnative.cloudformation.kotlin.outputs.GetStackResult.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 1.24.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.cloudformation.kotlin.outputs

import com.pulumi.awsnative.cloudformation.kotlin.enums.StackCapabilitiesItem
import com.pulumi.awsnative.cloudformation.kotlin.enums.StackStatus
import com.pulumi.awsnative.kotlin.outputs.Tag
import kotlin.Any
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.Map

/**
 *
 * @property capabilities In some cases, you must explicitly acknowledge that your stack template contains certain capabilities in order for AWS CloudFormation to create the stack.
 * - `CAPABILITY_IAM` and `CAPABILITY_NAMED_IAM`
 * Some stack templates might include resources that can affect permissions in your AWS account ; for example, by creating new AWS Identity and Access Management (IAM) users. For those stacks, you must explicitly acknowledge this by specifying one of these capabilities.
 * The following IAM resources require you to specify either the `CAPABILITY_IAM` or `CAPABILITY_NAMED_IAM` capability.
 * - If you have IAM resources, you can specify either capability.
 * - If you have IAM resources with custom names, you *must* specify `CAPABILITY_NAMED_IAM` .
 * - If you don't specify either of these capabilities, AWS CloudFormation returns an `InsufficientCapabilities` error.
 * If your stack template contains these resources, we recommend that you review all permissions associated with them and edit their permissions if necessary.
 * - [`AWS::IAM::AccessKey`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html)
 * - [`AWS::IAM::Group`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html)
 * - [`AWS::IAM::InstanceProfile`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html)
 * - [`AWS::IAM::Policy`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html)
 * - [`AWS::IAM::Role`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html)
 * - [`AWS::IAM::User`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html)
 * - [`AWS::IAM::UserToGroupAddition`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html)
 * For more information, see [Acknowledging IAM Resources in AWS CloudFormation Templates](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities) .
 * - `CAPABILITY_AUTO_EXPAND`
 * Some template contain macros. Macros perform custom processing on templates; this can include simple actions like find-and-replace operations, all the way to extensive transformations of entire templates. Because of this, users typically create a change set from the processed template, so that they can review the changes resulting from the macros before actually creating the stack. If your stack template contains one or more macros, and you choose to create a stack directly from the processed template, without first reviewing the resulting changes in a change set, you must acknowledge this capability. This includes the [AWS::Include](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html) and [AWS::Serverless](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html) transforms, which are macros hosted by AWS CloudFormation .
 * If you want to create a stack from a stack template that contains macros *and* nested stacks, you must create the stack directly from the template using this capability.
 * > You should only create stacks directly from a stack template that contains macros if you know what processing the macro performs.
 * >
 * > Each macro relies on an underlying Lambda service function for processing stack templates. Be aware that the Lambda function owner can update the function operation without AWS CloudFormation being notified.
 * For more information, see [Using AWS CloudFormation macros to perform custom processing on templates](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html) .
 * @property changeSetId The unique ID of the change set.
 * @property creationTime The time at which the stack was created.
 * @property description A user-defined description associated with the stack.
 * @property disableRollback Set to `true` to disable rollback of the stack if stack creation failed. You can specify either `DisableRollback` or `OnFailure` , but not both.
 * Default: `false`
 * @property enableTerminationProtection Whether to enable termination protection on the specified stack. If a user attempts to delete a stack with termination protection enabled, the operation fails and the stack remains unchanged. For more information, see [Protecting a Stack From Being Deleted](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-protect-stacks.html) in the *AWS CloudFormation User Guide* . Termination protection is deactivated on stacks by default.
 * For [nested stacks](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html) , termination protection is set on the root stack and can't be changed directly on the nested stack.
 * @property lastUpdateTime The time the stack was last updated. This field will only be returned if the stack has been updated at least once.
 * @property notificationArns The Amazon Simple Notification Service (Amazon SNS) topic ARNs to publish stack related events. You can find your Amazon SNS topic ARNs using the Amazon SNS console or your Command Line Interface (CLI).
 * @property outputs A list of output structures.
 * @property parameters The set value pairs that represent the parameters passed to CloudFormation when this nested stack is created. Each parameter has a name corresponding to a parameter defined in the embedded template and a value representing the value that you want to set for the parameter.
 * > If you use the `Ref` function to pass a parameter value to a nested stack, comma-delimited list parameters must be of type `String` . In other words, you can't pass values that are of type `CommaDelimitedList` to nested stacks.
 * Conditional. Required if the nested stack requires input parameters.
 * Whether an update causes interruptions depends on the resources that are being updated. An update never causes a nested stack to be replaced.
 * @property 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 [Working with Nested Stacks](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html) in the *AWS CloudFormation User Guide* .
 * @property roleArn The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role that AWS CloudFormation assumes to create the stack. AWS CloudFormation uses the role's credentials to make calls on your behalf. AWS CloudFormation always uses this role for all future operations on the stack. Provided that users have permission to operate on the stack, AWS CloudFormation uses this role even if the users don't have permission to pass it. Ensure that the role grants least privilege.
 * If you don't specify a value, AWS CloudFormation uses the role that was previously associated with the stack. If no role is available, AWS CloudFormation uses a temporary session that's generated from your user credentials.
 * @property 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 [Working with Nested Stacks](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html) in the *AWS CloudFormation User Guide* .
 * @property stackId Unique identifier of the stack.
 * @property stackPolicyBody Structure containing the stack policy body. For more information, go to [Prevent Updates to Stack Resources](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/protect-stack-resources.html) in the *AWS CloudFormation User Guide* . You can specify either the `StackPolicyBody` or the `StackPolicyURL` parameter, but not both.
 * Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::CloudFormation::Stack` for more information about the expected schema for this property.
 * @property stackStatus Current status of the stack.
 * @property stackStatusReason Success/failure message associated with the stack status.
 * @property tags Key-value pairs to associate with this stack. AWS CloudFormation also propagates these tags to the resources created in the stack. A maximum number of 50 tags can be specified.
 * @property templateBody Structure containing the template body with a minimum length of 1 byte and a maximum length of 51,200 bytes. For more information, go to [Template anatomy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html) in the AWS CloudFormation User Guide.
 * Conditional: You must specify either the `TemplateBody` or the `TemplateURL` parameter, but not both.
 * Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::CloudFormation::Stack` for more information about the expected schema for this property.
 * @property timeoutInMinutes The length of time, in minutes, that CloudFormation waits for the nested stack to reach the `CREATE_COMPLETE` state. The default is no timeout. When CloudFormation detects that the nested stack has reached the `CREATE_COMPLETE` state, it marks the nested stack resource as `CREATE_COMPLETE` in the parent stack and resumes creating the parent stack. If the timeout period expires before the nested stack reaches `CREATE_COMPLETE` , CloudFormation marks the nested stack as failed and rolls back both the nested stack and parent stack.
 * Updates aren't supported.
 */
public data class GetStackResult(
    public val capabilities: List? = null,
    public val changeSetId: String? = null,
    public val creationTime: String? = null,
    public val description: String? = null,
    public val disableRollback: Boolean? = null,
    public val enableTerminationProtection: Boolean? = null,
    public val lastUpdateTime: String? = null,
    public val notificationArns: List? = null,
    public val outputs: List? = null,
    public val parameters: Map? = null,
    public val parentId: String? = null,
    public val roleArn: String? = null,
    public val rootId: String? = null,
    public val stackId: String? = null,
    public val stackPolicyBody: Any? = null,
    public val stackStatus: StackStatus? = null,
    public val stackStatusReason: String? = null,
    public val tags: List? = null,
    public val templateBody: Any? = null,
    public val timeoutInMinutes: Int? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.awsnative.cloudformation.outputs.GetStackResult): GetStackResult = GetStackResult(
            capabilities = javaType.capabilities().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.awsnative.cloudformation.kotlin.enums.StackCapabilitiesItem.Companion.toKotlin(args0)
                })
            }),
            changeSetId = javaType.changeSetId().map({ args0 -> args0 }).orElse(null),
            creationTime = javaType.creationTime().map({ args0 -> args0 }).orElse(null),
            description = javaType.description().map({ args0 -> args0 }).orElse(null),
            disableRollback = javaType.disableRollback().map({ args0 -> args0 }).orElse(null),
            enableTerminationProtection = javaType.enableTerminationProtection().map({ args0 ->
                args0
            }).orElse(null),
            lastUpdateTime = javaType.lastUpdateTime().map({ args0 -> args0 }).orElse(null),
            notificationArns = javaType.notificationArns().map({ args0 -> args0 }),
            outputs = javaType.outputs().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.awsnative.cloudformation.kotlin.outputs.StackOutput.Companion.toKotlin(args0)
                })
            }),
            parameters = javaType.parameters().map({ args0 -> args0.key.to(args0.value) }).toMap(),
            parentId = javaType.parentId().map({ args0 -> args0 }).orElse(null),
            roleArn = javaType.roleArn().map({ args0 -> args0 }).orElse(null),
            rootId = javaType.rootId().map({ args0 -> args0 }).orElse(null),
            stackId = javaType.stackId().map({ args0 -> args0 }).orElse(null),
            stackPolicyBody = javaType.stackPolicyBody().map({ args0 -> args0 }).orElse(null),
            stackStatus = javaType.stackStatus().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.awsnative.cloudformation.kotlin.enums.StackStatus.Companion.toKotlin(args0)
                })
            }).orElse(null),
            stackStatusReason = javaType.stackStatusReason().map({ args0 -> args0 }).orElse(null),
            tags = javaType.tags().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin(args0)
                })
            }),
            templateBody = javaType.templateBody().map({ args0 -> args0 }).orElse(null),
            timeoutInMinutes = javaType.timeoutInMinutes().map({ args0 -> args0 }).orElse(null),
        )
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy