com.pulumi.awsnative.cloudformation.kotlin.StackSet.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.cloudformation.kotlin
import com.pulumi.awsnative.cloudformation.kotlin.enums.StackSetCallAs
import com.pulumi.awsnative.cloudformation.kotlin.enums.StackSetCapability
import com.pulumi.awsnative.cloudformation.kotlin.enums.StackSetPermissionModel
import com.pulumi.awsnative.cloudformation.kotlin.outputs.ManagedExecutionProperties
import com.pulumi.awsnative.cloudformation.kotlin.outputs.StackSetAutoDeployment
import com.pulumi.awsnative.cloudformation.kotlin.outputs.StackSetOperationPreferences
import com.pulumi.awsnative.cloudformation.kotlin.outputs.StackSetParameter
import com.pulumi.awsnative.cloudformation.kotlin.outputs.StackSetStackInstances
import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.awsnative.cloudformation.kotlin.enums.StackSetCallAs.Companion.toKotlin as stackSetCallAsToKotlin
import com.pulumi.awsnative.cloudformation.kotlin.enums.StackSetCapability.Companion.toKotlin as stackSetCapabilityToKotlin
import com.pulumi.awsnative.cloudformation.kotlin.enums.StackSetPermissionModel.Companion.toKotlin as stackSetPermissionModelToKotlin
import com.pulumi.awsnative.cloudformation.kotlin.outputs.ManagedExecutionProperties.Companion.toKotlin as managedExecutionPropertiesToKotlin
import com.pulumi.awsnative.cloudformation.kotlin.outputs.StackSetAutoDeployment.Companion.toKotlin as stackSetAutoDeploymentToKotlin
import com.pulumi.awsnative.cloudformation.kotlin.outputs.StackSetOperationPreferences.Companion.toKotlin as stackSetOperationPreferencesToKotlin
import com.pulumi.awsnative.cloudformation.kotlin.outputs.StackSetParameter.Companion.toKotlin as stackSetParameterToKotlin
import com.pulumi.awsnative.cloudformation.kotlin.outputs.StackSetStackInstances.Companion.toKotlin as stackSetStackInstancesToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
/**
* Builder for [StackSet].
*/
@PulumiTagMarker
public class StackSetResourceBuilder internal constructor() {
public var name: String? = null
public var args: StackSetArgs = StackSetArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend StackSetArgsBuilder.() -> Unit) {
val builder = StackSetArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): StackSet {
val builtJavaResource = com.pulumi.awsnative.cloudformation.StackSet(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return StackSet(builtJavaResource)
}
}
/**
* StackSet as a resource provides one-click experience for provisioning a StackSet and StackInstances
*/
public class StackSet internal constructor(
override val javaResource: com.pulumi.awsnative.cloudformation.StackSet,
) : KotlinCustomResource(javaResource, StackSetMapper) {
/**
* The Amazon Resource Number (ARN) of the IAM role to use to create this stack set. Specify an IAM role only if you are using customized administrator roles to control which users or groups can manage specific stack sets within the same administrator account.
*/
public val administrationRoleArn: Output?
get() = javaResource.administrationRoleArn().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Describes whether StackSets automatically deploys to AWS Organizations accounts that are added to the target organization or organizational unit (OU). Specify only if PermissionModel is SERVICE_MANAGED.
*/
public val autoDeployment: Output?
get() = javaResource.autoDeployment().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> stackSetAutoDeploymentToKotlin(args0) })
}).orElse(null)
})
/**
* Specifies the AWS account that you are acting from. By default, SELF is specified. For self-managed permissions, specify SELF; for service-managed permissions, if you are signed in to the organization's management account, specify SELF. If you are signed in to a delegated administrator account, specify DELEGATED_ADMIN.
*/
public val callAs: Output?
get() = javaResource.callAs().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
stackSetCallAsToKotlin(args0)
})
}).orElse(null)
})
/**
* In some cases, you must explicitly acknowledge that your stack set template contains certain capabilities in order for AWS CloudFormation to create the stack set and related stack instances.
*/
public val capabilities: Output>?
get() = javaResource.capabilities().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> stackSetCapabilityToKotlin(args0) })
})
}).orElse(null)
})
/**
* A description of the stack set. You can use the description to identify the stack set's purpose or other important information.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The name of the IAM execution role to use to create the stack set. If you do not specify an execution role, AWS CloudFormation uses the AWSCloudFormationStackSetExecutionRole role for the stack set operation.
*/
public val executionRoleName: Output?
get() = javaResource.executionRoleName().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Describes whether StackSets performs non-conflicting operations concurrently and queues conflicting operations.
*/
public val managedExecution: Output?
get() = javaResource.managedExecution().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> managedExecutionPropertiesToKotlin(args0) })
}).orElse(null)
})
/**
* The user-specified preferences for how AWS CloudFormation performs a stack set operation.
*/
public val operationPreferences: Output?
get() = javaResource.operationPreferences().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> stackSetOperationPreferencesToKotlin(args0) })
}).orElse(null)
})
/**
* The input parameters for the stack set template.
*/
public val parameters: Output>?
get() = javaResource.parameters().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> stackSetParameterToKotlin(args0) })
})
}).orElse(null)
})
/**
* Describes how the IAM roles required for stack set operations are created. By default, SELF-MANAGED is specified.
*/
public val permissionModel: Output
get() = javaResource.permissionModel().applyValue({ args0 ->
args0.let({ args0 ->
stackSetPermissionModelToKotlin(args0)
})
})
/**
* A group of stack instances with parameters in some specific accounts and regions.
*/
public val stackInstancesGroup: Output>?
get() = javaResource.stackInstancesGroup().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
stackSetStackInstancesToKotlin(args0)
})
})
}).orElse(null)
})
/**
* The ID of the stack set that you're creating.
*/
public val stackSetId: Output
get() = javaResource.stackSetId().applyValue({ args0 -> args0 })
/**
* The name to associate with the stack set. The name must be unique in the Region where you create your stack set.
*/
public val stackSetName: Output
get() = javaResource.stackSetName().applyValue({ args0 -> args0 })
/**
* The key-value pairs to associate with this stack set and the stacks created from it. AWS CloudFormation also propagates these tags to supported resources that are created in the stacks. A maximum number of 50 tags can be specified.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
/**
* The structure that contains the template body, with a minimum length of 1 byte and a maximum length of 51,200 bytes.
*/
public val templateBody: Output?
get() = javaResource.templateBody().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Location of file containing the template body. The URL must point to a template (max size: 460,800 bytes) that is located in an Amazon S3 bucket.
*/
public val templateUrl: Output?
get() = javaResource.templateUrl().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
}
public object StackSetMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.cloudformation.StackSet::class == javaResource::class
override fun map(javaResource: Resource): StackSet = StackSet(
javaResource as
com.pulumi.awsnative.cloudformation.StackSet,
)
}
/**
* @see [StackSet].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [StackSet].
*/
public suspend fun stackSet(name: String, block: suspend StackSetResourceBuilder.() -> Unit): StackSet {
val builder = StackSetResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [StackSet].
* @param name The _unique_ name of the resulting resource.
*/
public fun stackSet(name: String): StackSet {
val builder = StackSetResourceBuilder()
builder.name(name)
return builder.build()
}