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

com.pulumi.aws.cloudformation.kotlin.StackSetArgs.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: 6.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.cloudformation.kotlin

import com.pulumi.aws.cloudformation.StackSetArgs.builder
import com.pulumi.aws.cloudformation.kotlin.inputs.StackSetAutoDeploymentArgs
import com.pulumi.aws.cloudformation.kotlin.inputs.StackSetAutoDeploymentArgsBuilder
import com.pulumi.aws.cloudformation.kotlin.inputs.StackSetManagedExecutionArgs
import com.pulumi.aws.cloudformation.kotlin.inputs.StackSetManagedExecutionArgsBuilder
import com.pulumi.aws.cloudformation.kotlin.inputs.StackSetOperationPreferencesArgs
import com.pulumi.aws.cloudformation.kotlin.inputs.StackSetOperationPreferencesArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages a CloudFormation StackSet. StackSets allow CloudFormation templates to be easily deployed across multiple accounts and regions via StackSet Instances (`aws.cloudformation.StackSetInstance` resource). Additional information about StackSets can be found in the [AWS CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/what-is-cfnstacksets.html).
 * > **NOTE:** All template parameters, including those with a `Default`, must be configured or ignored with the `lifecycle` configuration block `ignore_changes` argument.
 * > **NOTE:** All `NoEcho` template parameters must be ignored with the `lifecycle` configuration block `ignore_changes` argument.
 * > **NOTE:** When using a delegated administrator account, ensure that your IAM User or Role has the `organizations:ListDelegatedAdministrators` permission. Otherwise, you may get an error like `ValidationError: Account used is not a delegated administrator`.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const aWSCloudFormationStackSetAdministrationRoleAssumeRolePolicy = aws.iam.getPolicyDocument({
 *     statements: [{
 *         actions: ["sts:AssumeRole"],
 *         effect: "Allow",
 *         principals: [{
 *             identifiers: ["cloudformation.amazonaws.com"],
 *             type: "Service",
 *         }],
 *     }],
 * });
 * const aWSCloudFormationStackSetAdministrationRole = new aws.iam.Role("AWSCloudFormationStackSetAdministrationRole", {
 *     assumeRolePolicy: aWSCloudFormationStackSetAdministrationRoleAssumeRolePolicy.then(aWSCloudFormationStackSetAdministrationRoleAssumeRolePolicy => aWSCloudFormationStackSetAdministrationRoleAssumeRolePolicy.json),
 *     name: "AWSCloudFormationStackSetAdministrationRole",
 * });
 * const example = new aws.cloudformation.StackSet("example", {
 *     administrationRoleArn: aWSCloudFormationStackSetAdministrationRole.arn,
 *     name: "example",
 *     parameters: {
 *         VPCCidr: "10.0.0.0/16",
 *     },
 *     templateBody: JSON.stringify({
 *         Parameters: {
 *             VPCCidr: {
 *                 Type: "String",
 *                 Default: "10.0.0.0/16",
 *                 Description: "Enter the CIDR block for the VPC. Default is 10.0.0.0/16.",
 *             },
 *         },
 *         Resources: {
 *             myVpc: {
 *                 Type: "AWS::EC2::VPC",
 *                 Properties: {
 *                     CidrBlock: {
 *                         Ref: "VPCCidr",
 *                     },
 *                     Tags: [{
 *                         Key: "Name",
 *                         Value: "Primary_CF_VPC",
 *                     }],
 *                 },
 *             },
 *         },
 *     }),
 * });
 * const aWSCloudFormationStackSetAdministrationRoleExecutionPolicy = aws.iam.getPolicyDocumentOutput({
 *     statements: [{
 *         actions: ["sts:AssumeRole"],
 *         effect: "Allow",
 *         resources: [pulumi.interpolate`arn:aws:iam::*:role/${example.executionRoleName}`],
 *     }],
 * });
 * const aWSCloudFormationStackSetAdministrationRoleExecutionPolicyRolePolicy = new aws.iam.RolePolicy("AWSCloudFormationStackSetAdministrationRole_ExecutionPolicy", {
 *     name: "ExecutionPolicy",
 *     policy: aWSCloudFormationStackSetAdministrationRoleExecutionPolicy.apply(aWSCloudFormationStackSetAdministrationRoleExecutionPolicy => aWSCloudFormationStackSetAdministrationRoleExecutionPolicy.json),
 *     role: aWSCloudFormationStackSetAdministrationRole.name,
 * });
 * ```
 * ```python
 * import pulumi
 * import json
 * import pulumi_aws as aws
 * a_ws_cloud_formation_stack_set_administration_role_assume_role_policy = aws.iam.get_policy_document(statements=[{
 *     "actions": ["sts:AssumeRole"],
 *     "effect": "Allow",
 *     "principals": [{
 *         "identifiers": ["cloudformation.amazonaws.com"],
 *         "type": "Service",
 *     }],
 * }])
 * a_ws_cloud_formation_stack_set_administration_role = aws.iam.Role("AWSCloudFormationStackSetAdministrationRole",
 *     assume_role_policy=a_ws_cloud_formation_stack_set_administration_role_assume_role_policy.json,
 *     name="AWSCloudFormationStackSetAdministrationRole")
 * example = aws.cloudformation.StackSet("example",
 *     administration_role_arn=a_ws_cloud_formation_stack_set_administration_role.arn,
 *     name="example",
 *     parameters={
 *         "VPCCidr": "10.0.0.0/16",
 *     },
 *     template_body=json.dumps({
 *         "Parameters": {
 *             "VPCCidr": {
 *                 "Type": "String",
 *                 "Default": "10.0.0.0/16",
 *                 "Description": "Enter the CIDR block for the VPC. Default is 10.0.0.0/16.",
 *             },
 *         },
 *         "Resources": {
 *             "myVpc": {
 *                 "Type": "AWS::EC2::VPC",
 *                 "Properties": {
 *                     "CidrBlock": {
 *                         "Ref": "VPCCidr",
 *                     },
 *                     "Tags": [{
 *                         "Key": "Name",
 *                         "Value": "Primary_CF_VPC",
 *                     }],
 *                 },
 *             },
 *         },
 *     }))
 * a_ws_cloud_formation_stack_set_administration_role_execution_policy = aws.iam.get_policy_document_output(statements=[{
 *     "actions": ["sts:AssumeRole"],
 *     "effect": "Allow",
 *     "resources": [example.execution_role_name.apply(lambda execution_role_name: f"arn:aws:iam::*:role/{execution_role_name}")],
 * }])
 * a_ws_cloud_formation_stack_set_administration_role_execution_policy_role_policy = aws.iam.RolePolicy("AWSCloudFormationStackSetAdministrationRole_ExecutionPolicy",
 *     name="ExecutionPolicy",
 *     policy=a_ws_cloud_formation_stack_set_administration_role_execution_policy.json,
 *     role=a_ws_cloud_formation_stack_set_administration_role.name)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using System.Text.Json;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var aWSCloudFormationStackSetAdministrationRoleAssumeRolePolicy = Aws.Iam.GetPolicyDocument.Invoke(new()
 *     {
 *         Statements = new[]
 *         {
 *             new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs
 *             {
 *                 Actions = new[]
 *                 {
 *                     "sts:AssumeRole",
 *                 },
 *                 Effect = "Allow",
 *                 Principals = new[]
 *                 {
 *                     new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs
 *                     {
 *                         Identifiers = new[]
 *                         {
 *                             "cloudformation.amazonaws.com",
 *                         },
 *                         Type = "Service",
 *                     },
 *                 },
 *             },
 *         },
 *     });
 *     var aWSCloudFormationStackSetAdministrationRole = new Aws.Iam.Role("AWSCloudFormationStackSetAdministrationRole", new()
 *     {
 *         AssumeRolePolicy = aWSCloudFormationStackSetAdministrationRoleAssumeRolePolicy.Apply(getPolicyDocumentResult => getPolicyDocumentResult.Json),
 *         Name = "AWSCloudFormationStackSetAdministrationRole",
 *     });
 *     var example = new Aws.CloudFormation.StackSet("example", new()
 *     {
 *         AdministrationRoleArn = aWSCloudFormationStackSetAdministrationRole.Arn,
 *         Name = "example",
 *         Parameters =
 *         {
 *             { "VPCCidr", "10.0.0.0/16" },
 *         },
 *         TemplateBody = JsonSerializer.Serialize(new Dictionary
 *         {
 *             ["Parameters"] = new Dictionary
 *             {
 *                 ["VPCCidr"] = new Dictionary
 *                 {
 *                     ["Type"] = "String",
 *                     ["Default"] = "10.0.0.0/16",
 *                     ["Description"] = "Enter the CIDR block for the VPC. Default is 10.0.0.0/16.",
 *                 },
 *             },
 *             ["Resources"] = new Dictionary
 *             {
 *                 ["myVpc"] = new Dictionary
 *                 {
 *                     ["Type"] = "AWS::EC2::VPC",
 *                     ["Properties"] = new Dictionary
 *                     {
 *                         ["CidrBlock"] = new Dictionary
 *                         {
 *                             ["Ref"] = "VPCCidr",
 *                         },
 *                         ["Tags"] = new[]
 *                         {
 *                             new Dictionary
 *                             {
 *                                 ["Key"] = "Name",
 *                                 ["Value"] = "Primary_CF_VPC",
 *                             },
 *                         },
 *                     },
 *                 },
 *             },
 *         }),
 *     });
 *     var aWSCloudFormationStackSetAdministrationRoleExecutionPolicy = Aws.Iam.GetPolicyDocument.Invoke(new()
 *     {
 *         Statements = new[]
 *         {
 *             new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs
 *             {
 *                 Actions = new[]
 *                 {
 *                     "sts:AssumeRole",
 *                 },
 *                 Effect = "Allow",
 *                 Resources = new[]
 *                 {
 *                     $"arn:aws:iam::*:role/{example.ExecutionRoleName}",
 *                 },
 *             },
 *         },
 *     });
 *     var aWSCloudFormationStackSetAdministrationRoleExecutionPolicyRolePolicy = new Aws.Iam.RolePolicy("AWSCloudFormationStackSetAdministrationRole_ExecutionPolicy", new()
 *     {
 *         Name = "ExecutionPolicy",
 *         Policy = aWSCloudFormationStackSetAdministrationRoleExecutionPolicy.Apply(getPolicyDocumentResult => getPolicyDocumentResult.Json),
 *         Role = aWSCloudFormationStackSetAdministrationRole.Name,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"encoding/json"
 * 	"fmt"
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudformation"
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		aWSCloudFormationStackSetAdministrationRoleAssumeRolePolicy, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{
 * 			Statements: []iam.GetPolicyDocumentStatement{
 * 				{
 * 					Actions: []string{
 * 						"sts:AssumeRole",
 * 					},
 * 					Effect: pulumi.StringRef("Allow"),
 * 					Principals: []iam.GetPolicyDocumentStatementPrincipal{
 * 						{
 * 							Identifiers: []string{
 * 								"cloudformation.amazonaws.com",
 * 							},
 * 							Type: "Service",
 * 						},
 * 					},
 * 				},
 * 			},
 * 		}, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		aWSCloudFormationStackSetAdministrationRole, err := iam.NewRole(ctx, "AWSCloudFormationStackSetAdministrationRole", &iam.RoleArgs{
 * 			AssumeRolePolicy: pulumi.String(aWSCloudFormationStackSetAdministrationRoleAssumeRolePolicy.Json),
 * 			Name:             pulumi.String("AWSCloudFormationStackSetAdministrationRole"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		tmpJSON0, err := json.Marshal(map[string]interface{}{
 * 			"Parameters": map[string]interface{}{
 * 				"VPCCidr": map[string]interface{}{
 * 					"Type":        "String",
 * 					"Default":     "10.0.0.0/16",
 * 					"Description": "Enter the CIDR block for the VPC. Default is 10.0.0.0/16.",
 * 				},
 * 			},
 * 			"Resources": map[string]interface{}{
 * 				"myVpc": map[string]interface{}{
 * 					"Type": "AWS::EC2::VPC",
 * 					"Properties": map[string]interface{}{
 * 						"CidrBlock": map[string]interface{}{
 * 							"Ref": "VPCCidr",
 * 						},
 * 						"Tags": []map[string]interface{}{
 * 							map[string]interface{}{
 * 								"Key":   "Name",
 * 								"Value": "Primary_CF_VPC",
 * 							},
 * 						},
 * 					},
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		json0 := string(tmpJSON0)
 * 		example, err := cloudformation.NewStackSet(ctx, "example", &cloudformation.StackSetArgs{
 * 			AdministrationRoleArn: aWSCloudFormationStackSetAdministrationRole.Arn,
 * 			Name:                  pulumi.String("example"),
 * 			Parameters: pulumi.StringMap{
 * 				"VPCCidr": pulumi.String("10.0.0.0/16"),
 * 			},
 * 			TemplateBody: pulumi.String(json0),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		aWSCloudFormationStackSetAdministrationRoleExecutionPolicy := iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{
 * 			Statements: iam.GetPolicyDocumentStatementArray{
 * 				&iam.GetPolicyDocumentStatementArgs{
 * 					Actions: pulumi.StringArray{
 * 						pulumi.String("sts:AssumeRole"),
 * 					},
 * 					Effect: pulumi.String("Allow"),
 * 					Resources: pulumi.StringArray{
 * 						example.ExecutionRoleName.ApplyT(func(executionRoleName string) (string, error) {
 * 							return fmt.Sprintf("arn:aws:iam::*:role/%v", executionRoleName), nil
 * 						}).(pulumi.StringOutput),
 * 					},
 * 				},
 * 			},
 * 		}, nil)
 * 		_, err = iam.NewRolePolicy(ctx, "AWSCloudFormationStackSetAdministrationRole_ExecutionPolicy", &iam.RolePolicyArgs{
 * 			Name: pulumi.String("ExecutionPolicy"),
 * 			Policy: pulumi.String(aWSCloudFormationStackSetAdministrationRoleExecutionPolicy.ApplyT(func(aWSCloudFormationStackSetAdministrationRoleExecutionPolicy iam.GetPolicyDocumentResult) (*string, error) {
 * 				return &aWSCloudFormationStackSetAdministrationRoleExecutionPolicy.Json, nil
 * 			}).(pulumi.StringPtrOutput)),
 * 			Role: aWSCloudFormationStackSetAdministrationRole.Name,
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.iam.IamFunctions;
 * import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;
 * import com.pulumi.aws.iam.Role;
 * import com.pulumi.aws.iam.RoleArgs;
 * import com.pulumi.aws.cloudformation.StackSet;
 * import com.pulumi.aws.cloudformation.StackSetArgs;
 * import com.pulumi.aws.iam.RolePolicy;
 * import com.pulumi.aws.iam.RolePolicyArgs;
 * import static com.pulumi.codegen.internal.Serialization.*;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         final var aWSCloudFormationStackSetAdministrationRoleAssumeRolePolicy = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
 *             .statements(GetPolicyDocumentStatementArgs.builder()
 *                 .actions("sts:AssumeRole")
 *                 .effect("Allow")
 *                 .principals(GetPolicyDocumentStatementPrincipalArgs.builder()
 *                     .identifiers("cloudformation.amazonaws.com")
 *                     .type("Service")
 *                     .build())
 *                 .build())
 *             .build());
 *         var aWSCloudFormationStackSetAdministrationRole = new Role("aWSCloudFormationStackSetAdministrationRole", RoleArgs.builder()
 *             .assumeRolePolicy(aWSCloudFormationStackSetAdministrationRoleAssumeRolePolicy.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json()))
 *             .name("AWSCloudFormationStackSetAdministrationRole")
 *             .build());
 *         var example = new StackSet("example", StackSetArgs.builder()
 *             .administrationRoleArn(aWSCloudFormationStackSetAdministrationRole.arn())
 *             .name("example")
 *             .parameters(Map.of("VPCCidr", "10.0.0.0/16"))
 *             .templateBody(serializeJson(
 *                 jsonObject(
 *                     jsonProperty("Parameters", jsonObject(
 *                         jsonProperty("VPCCidr", jsonObject(
 *                             jsonProperty("Type", "String"),
 *                             jsonProperty("Default", "10.0.0.0/16"),
 *                             jsonProperty("Description", "Enter the CIDR block for the VPC. Default is 10.0.0.0/16.")
 *                         ))
 *                     )),
 *                     jsonProperty("Resources", jsonObject(
 *                         jsonProperty("myVpc", jsonObject(
 *                             jsonProperty("Type", "AWS::EC2::VPC"),
 *                             jsonProperty("Properties", jsonObject(
 *                                 jsonProperty("CidrBlock", jsonObject(
 *                                     jsonProperty("Ref", "VPCCidr")
 *                                 )),
 *                                 jsonProperty("Tags", jsonArray(jsonObject(
 *                                     jsonProperty("Key", "Name"),
 *                                     jsonProperty("Value", "Primary_CF_VPC")
 *                                 )))
 *                             ))
 *                         ))
 *                     ))
 *                 )))
 *             .build());
 *         final var aWSCloudFormationStackSetAdministrationRoleExecutionPolicy = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
 *             .statements(GetPolicyDocumentStatementArgs.builder()
 *                 .actions("sts:AssumeRole")
 *                 .effect("Allow")
 *                 .resources(example.executionRoleName().applyValue(executionRoleName -> String.format("arn:aws:iam::*:role/%s", executionRoleName)))
 *                 .build())
 *             .build());
 *         var aWSCloudFormationStackSetAdministrationRoleExecutionPolicyRolePolicy = new RolePolicy("aWSCloudFormationStackSetAdministrationRoleExecutionPolicyRolePolicy", RolePolicyArgs.builder()
 *             .name("ExecutionPolicy")
 *             .policy(aWSCloudFormationStackSetAdministrationRoleExecutionPolicy.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult).applyValue(aWSCloudFormationStackSetAdministrationRoleExecutionPolicy -> aWSCloudFormationStackSetAdministrationRoleExecutionPolicy.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json())))
 *             .role(aWSCloudFormationStackSetAdministrationRole.name())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   aWSCloudFormationStackSetAdministrationRole:
 *     type: aws:iam:Role
 *     name: AWSCloudFormationStackSetAdministrationRole
 *     properties:
 *       assumeRolePolicy: ${aWSCloudFormationStackSetAdministrationRoleAssumeRolePolicy.json}
 *       name: AWSCloudFormationStackSetAdministrationRole
 *   example:
 *     type: aws:cloudformation:StackSet
 *     properties:
 *       administrationRoleArn: ${aWSCloudFormationStackSetAdministrationRole.arn}
 *       name: example
 *       parameters:
 *         VPCCidr: 10.0.0.0/16
 *       templateBody:
 *         fn::toJSON:
 *           Parameters:
 *             VPCCidr:
 *               Type: String
 *               Default: 10.0.0.0/16
 *               Description: Enter the CIDR block for the VPC. Default is 10.0.0.0/16.
 *           Resources:
 *             myVpc:
 *               Type: AWS::EC2::VPC
 *               Properties:
 *                 CidrBlock:
 *                   Ref: VPCCidr
 *                 Tags:
 *                   - Key: Name
 *                     Value: Primary_CF_VPC
 *   aWSCloudFormationStackSetAdministrationRoleExecutionPolicyRolePolicy:
 *     type: aws:iam:RolePolicy
 *     name: AWSCloudFormationStackSetAdministrationRole_ExecutionPolicy
 *     properties:
 *       name: ExecutionPolicy
 *       policy: ${aWSCloudFormationStackSetAdministrationRoleExecutionPolicy.json}
 *       role: ${aWSCloudFormationStackSetAdministrationRole.name}
 * variables:
 *   aWSCloudFormationStackSetAdministrationRoleAssumeRolePolicy:
 *     fn::invoke:
 *       Function: aws:iam:getPolicyDocument
 *       Arguments:
 *         statements:
 *           - actions:
 *               - sts:AssumeRole
 *             effect: Allow
 *             principals:
 *               - identifiers:
 *                   - cloudformation.amazonaws.com
 *                 type: Service
 *   aWSCloudFormationStackSetAdministrationRoleExecutionPolicy:
 *     fn::invoke:
 *       Function: aws:iam:getPolicyDocument
 *       Arguments:
 *         statements:
 *           - actions:
 *               - sts:AssumeRole
 *             effect: Allow
 *             resources:
 *               - arn:aws:iam::*:role/${example.executionRoleName}
 * ```
 * 
 * ## Import
 * Import CloudFormation StackSets when acting a delegated administrator in a member account using the `name` and `call_as` values separated by a comma (`,`). For example:
 * Using `pulumi import`, import CloudFormation StackSets using the `name`. For example:
 * ```sh
 * $ pulumi import aws:cloudformation/stackSet:StackSet example example
 * ```
 * Using `pulumi import`, import CloudFormation StackSets when acting a delegated administrator in a member account using the `name` and `call_as` values separated by a comma (`,`). For example:
 * ```sh
 * $ pulumi import aws:cloudformation/stackSet:StackSet example example,DELEGATED_ADMIN
 * ```
 * @property administrationRoleArn Amazon Resource Number (ARN) of the IAM Role in the administrator account. This must be defined when using the `SELF_MANAGED` permission model.
 * @property autoDeployment Configuration block containing the auto-deployment model for your StackSet. This can only be defined when using the `SERVICE_MANAGED` permission model.
 * @property callAs Specifies whether you are acting as an account administrator in the organization's management account or as a delegated administrator in a member account. Valid values: `SELF` (default), `DELEGATED_ADMIN`.
 * @property capabilities A list of capabilities. Valid values: `CAPABILITY_IAM`, `CAPABILITY_NAMED_IAM`, `CAPABILITY_AUTO_EXPAND`.
 * @property description Description of the StackSet.
 * @property executionRoleName Name of the IAM Role in all target accounts for StackSet operations. Defaults to `AWSCloudFormationStackSetExecutionRole` when using the `SELF_MANAGED` permission model. This should not be defined when using the `SERVICE_MANAGED` permission model.
 * @property managedExecution Configuration block to allow StackSets to perform non-conflicting operations concurrently and queues conflicting operations.
 * @property name Name of the StackSet. The name must be unique in the region where you create your StackSet. The name can contain only alphanumeric characters (case-sensitive) and hyphens. It must start with an alphabetic character and cannot be longer than 128 characters.
 * @property operationPreferences Preferences for how AWS CloudFormation performs a stack set update.
 * @property parameters Key-value map of input parameters for the StackSet template. All template parameters, including those with a `Default`, must be configured or ignored with `lifecycle` configuration block `ignore_changes` argument. All `NoEcho` template parameters must be ignored with the `lifecycle` configuration block `ignore_changes` argument.
 * @property permissionModel Describes how the IAM roles required for your StackSet are created. Valid values: `SELF_MANAGED` (default), `SERVICE_MANAGED`.
 * @property tags Key-value map of tags to associate with this StackSet 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. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
 * @property templateBody String containing the CloudFormation template body. Maximum size: 51,200 bytes. Conflicts with `template_url`.
 * @property templateUrl String containing the location of a file containing the CloudFormation template body. The URL must point to a template that is located in an Amazon S3 bucket. Maximum location file size: 460,800 bytes. Conflicts with `template_body`.
 */
public data class StackSetArgs(
    public val administrationRoleArn: Output? = null,
    public val autoDeployment: Output? = null,
    public val callAs: Output? = null,
    public val capabilities: Output>? = null,
    public val description: Output? = null,
    public val executionRoleName: Output? = null,
    public val managedExecution: Output? = null,
    public val name: Output? = null,
    public val operationPreferences: Output? = null,
    public val parameters: Output>? = null,
    public val permissionModel: Output? = null,
    public val tags: Output>? = null,
    public val templateBody: Output? = null,
    public val templateUrl: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.cloudformation.StackSetArgs =
        com.pulumi.aws.cloudformation.StackSetArgs.builder()
            .administrationRoleArn(administrationRoleArn?.applyValue({ args0 -> args0 }))
            .autoDeployment(autoDeployment?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .callAs(callAs?.applyValue({ args0 -> args0 }))
            .capabilities(capabilities?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .description(description?.applyValue({ args0 -> args0 }))
            .executionRoleName(executionRoleName?.applyValue({ args0 -> args0 }))
            .managedExecution(managedExecution?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .name(name?.applyValue({ args0 -> args0 }))
            .operationPreferences(
                operationPreferences?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .parameters(
                parameters?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .permissionModel(permissionModel?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .templateBody(templateBody?.applyValue({ args0 -> args0 }))
            .templateUrl(templateUrl?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [StackSetArgs].
 */
@PulumiTagMarker
public class StackSetArgsBuilder internal constructor() {
    private var administrationRoleArn: Output? = null

    private var autoDeployment: Output? = null

    private var callAs: Output? = null

    private var capabilities: Output>? = null

    private var description: Output? = null

    private var executionRoleName: Output? = null

    private var managedExecution: Output? = null

    private var name: Output? = null

    private var operationPreferences: Output? = null

    private var parameters: Output>? = null

    private var permissionModel: Output? = null

    private var tags: Output>? = null

    private var templateBody: Output? = null

    private var templateUrl: Output? = null

    /**
     * @param value Amazon Resource Number (ARN) of the IAM Role in the administrator account. This must be defined when using the `SELF_MANAGED` permission model.
     */
    @JvmName("qoilthpkojpalyvi")
    public suspend fun administrationRoleArn(`value`: Output) {
        this.administrationRoleArn = value
    }

    /**
     * @param value Configuration block containing the auto-deployment model for your StackSet. This can only be defined when using the `SERVICE_MANAGED` permission model.
     */
    @JvmName("yaugupyalymjxbfm")
    public suspend fun autoDeployment(`value`: Output) {
        this.autoDeployment = value
    }

    /**
     * @param value Specifies whether you are acting as an account administrator in the organization's management account or as a delegated administrator in a member account. Valid values: `SELF` (default), `DELEGATED_ADMIN`.
     */
    @JvmName("aqrbkkthplcfdkgy")
    public suspend fun callAs(`value`: Output) {
        this.callAs = value
    }

    /**
     * @param value A list of capabilities. Valid values: `CAPABILITY_IAM`, `CAPABILITY_NAMED_IAM`, `CAPABILITY_AUTO_EXPAND`.
     */
    @JvmName("yngtgfjqjojgdksb")
    public suspend fun capabilities(`value`: Output>) {
        this.capabilities = value
    }

    @JvmName("nrjubifhmorergxy")
    public suspend fun capabilities(vararg values: Output) {
        this.capabilities = Output.all(values.asList())
    }

    /**
     * @param values A list of capabilities. Valid values: `CAPABILITY_IAM`, `CAPABILITY_NAMED_IAM`, `CAPABILITY_AUTO_EXPAND`.
     */
    @JvmName("cfegcbwpskijsbtm")
    public suspend fun capabilities(values: List>) {
        this.capabilities = Output.all(values)
    }

    /**
     * @param value Description of the StackSet.
     */
    @JvmName("nxtgwjpcoraxstof")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value Name of the IAM Role in all target accounts for StackSet operations. Defaults to `AWSCloudFormationStackSetExecutionRole` when using the `SELF_MANAGED` permission model. This should not be defined when using the `SERVICE_MANAGED` permission model.
     */
    @JvmName("xokvionyteoxhdnf")
    public suspend fun executionRoleName(`value`: Output) {
        this.executionRoleName = value
    }

    /**
     * @param value Configuration block to allow StackSets to perform non-conflicting operations concurrently and queues conflicting operations.
     */
    @JvmName("tnpdmdjwxwkgcnal")
    public suspend fun managedExecution(`value`: Output) {
        this.managedExecution = value
    }

    /**
     * @param value Name of the StackSet. The name must be unique in the region where you create your StackSet. The name can contain only alphanumeric characters (case-sensitive) and hyphens. It must start with an alphabetic character and cannot be longer than 128 characters.
     */
    @JvmName("lnhjydvcpqnwycor")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Preferences for how AWS CloudFormation performs a stack set update.
     */
    @JvmName("vgaudsybqvvaijmh")
    public suspend fun operationPreferences(`value`: Output) {
        this.operationPreferences = value
    }

    /**
     * @param value Key-value map of input parameters for the StackSet template. All template parameters, including those with a `Default`, must be configured or ignored with `lifecycle` configuration block `ignore_changes` argument. All `NoEcho` template parameters must be ignored with the `lifecycle` configuration block `ignore_changes` argument.
     */
    @JvmName("rnuofeghxhtjluuu")
    public suspend fun parameters(`value`: Output>) {
        this.parameters = value
    }

    /**
     * @param value Describes how the IAM roles required for your StackSet are created. Valid values: `SELF_MANAGED` (default), `SERVICE_MANAGED`.
     */
    @JvmName("gnakonifhehvhxjl")
    public suspend fun permissionModel(`value`: Output) {
        this.permissionModel = value
    }

    /**
     * @param value Key-value map of tags to associate with this StackSet 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. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("fwpnmnoikansjljv")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value String containing the CloudFormation template body. Maximum size: 51,200 bytes. Conflicts with `template_url`.
     */
    @JvmName("qxoxorcfltbhifeb")
    public suspend fun templateBody(`value`: Output) {
        this.templateBody = value
    }

    /**
     * @param value String containing the location of a file containing the CloudFormation template body. The URL must point to a template that is located in an Amazon S3 bucket. Maximum location file size: 460,800 bytes. Conflicts with `template_body`.
     */
    @JvmName("vfutvcktahgqiblt")
    public suspend fun templateUrl(`value`: Output) {
        this.templateUrl = value
    }

    /**
     * @param value Amazon Resource Number (ARN) of the IAM Role in the administrator account. This must be defined when using the `SELF_MANAGED` permission model.
     */
    @JvmName("ukocvuvatnkvbjgb")
    public suspend fun administrationRoleArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.administrationRoleArn = mapped
    }

    /**
     * @param value Configuration block containing the auto-deployment model for your StackSet. This can only be defined when using the `SERVICE_MANAGED` permission model.
     */
    @JvmName("xfjxcqauobiscwsr")
    public suspend fun autoDeployment(`value`: StackSetAutoDeploymentArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoDeployment = mapped
    }

    /**
     * @param argument Configuration block containing the auto-deployment model for your StackSet. This can only be defined when using the `SERVICE_MANAGED` permission model.
     */
    @JvmName("rktbkcctajbdbwry")
    public suspend fun autoDeployment(argument: suspend StackSetAutoDeploymentArgsBuilder.() -> Unit) {
        val toBeMapped = StackSetAutoDeploymentArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.autoDeployment = mapped
    }

    /**
     * @param value Specifies whether you are acting as an account administrator in the organization's management account or as a delegated administrator in a member account. Valid values: `SELF` (default), `DELEGATED_ADMIN`.
     */
    @JvmName("moxcnwkycinshnxm")
    public suspend fun callAs(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.callAs = mapped
    }

    /**
     * @param value A list of capabilities. Valid values: `CAPABILITY_IAM`, `CAPABILITY_NAMED_IAM`, `CAPABILITY_AUTO_EXPAND`.
     */
    @JvmName("itakmpwkdtjpymaq")
    public suspend fun capabilities(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.capabilities = mapped
    }

    /**
     * @param values A list of capabilities. Valid values: `CAPABILITY_IAM`, `CAPABILITY_NAMED_IAM`, `CAPABILITY_AUTO_EXPAND`.
     */
    @JvmName("mnotronbryywyqar")
    public suspend fun capabilities(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.capabilities = mapped
    }

    /**
     * @param value Description of the StackSet.
     */
    @JvmName("epkgqtqwstxyxaay")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value Name of the IAM Role in all target accounts for StackSet operations. Defaults to `AWSCloudFormationStackSetExecutionRole` when using the `SELF_MANAGED` permission model. This should not be defined when using the `SERVICE_MANAGED` permission model.
     */
    @JvmName("dohpmfmnobkyxrfw")
    public suspend fun executionRoleName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.executionRoleName = mapped
    }

    /**
     * @param value Configuration block to allow StackSets to perform non-conflicting operations concurrently and queues conflicting operations.
     */
    @JvmName("bwbsttsqytcpfwfc")
    public suspend fun managedExecution(`value`: StackSetManagedExecutionArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.managedExecution = mapped
    }

    /**
     * @param argument Configuration block to allow StackSets to perform non-conflicting operations concurrently and queues conflicting operations.
     */
    @JvmName("hqovcklpgwujujqx")
    public suspend fun managedExecution(argument: suspend StackSetManagedExecutionArgsBuilder.() -> Unit) {
        val toBeMapped = StackSetManagedExecutionArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.managedExecution = mapped
    }

    /**
     * @param value Name of the StackSet. The name must be unique in the region where you create your StackSet. The name can contain only alphanumeric characters (case-sensitive) and hyphens. It must start with an alphabetic character and cannot be longer than 128 characters.
     */
    @JvmName("nbnmnhyoxdvttcmt")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Preferences for how AWS CloudFormation performs a stack set update.
     */
    @JvmName("txdukewpkxxmhmqy")
    public suspend fun operationPreferences(`value`: StackSetOperationPreferencesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.operationPreferences = mapped
    }

    /**
     * @param argument Preferences for how AWS CloudFormation performs a stack set update.
     */
    @JvmName("tmmneplhsuqxmfmq")
    public suspend fun operationPreferences(argument: suspend StackSetOperationPreferencesArgsBuilder.() -> Unit) {
        val toBeMapped = StackSetOperationPreferencesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.operationPreferences = mapped
    }

    /**
     * @param value Key-value map of input parameters for the StackSet template. All template parameters, including those with a `Default`, must be configured or ignored with `lifecycle` configuration block `ignore_changes` argument. All `NoEcho` template parameters must be ignored with the `lifecycle` configuration block `ignore_changes` argument.
     */
    @JvmName("yegvgbnhstgnpbeq")
    public suspend fun parameters(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param values Key-value map of input parameters for the StackSet template. All template parameters, including those with a `Default`, must be configured or ignored with `lifecycle` configuration block `ignore_changes` argument. All `NoEcho` template parameters must be ignored with the `lifecycle` configuration block `ignore_changes` argument.
     */
    @JvmName("qmhwimuvqnaayxpp")
    public fun parameters(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param value Describes how the IAM roles required for your StackSet are created. Valid values: `SELF_MANAGED` (default), `SERVICE_MANAGED`.
     */
    @JvmName("gjjycidrnudqasha")
    public suspend fun permissionModel(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.permissionModel = mapped
    }

    /**
     * @param value Key-value map of tags to associate with this StackSet 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. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("yjggcbaggnpyyslc")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Key-value map of tags to associate with this StackSet 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. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("vqbadfdnatblqvtv")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value String containing the CloudFormation template body. Maximum size: 51,200 bytes. Conflicts with `template_url`.
     */
    @JvmName("xqnnhmakgmmqkpmr")
    public suspend fun templateBody(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.templateBody = mapped
    }

    /**
     * @param value String containing the location of a file containing the CloudFormation template body. The URL must point to a template that is located in an Amazon S3 bucket. Maximum location file size: 460,800 bytes. Conflicts with `template_body`.
     */
    @JvmName("ohjjteqrxssjhtnv")
    public suspend fun templateUrl(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.templateUrl = mapped
    }

    internal fun build(): StackSetArgs = StackSetArgs(
        administrationRoleArn = administrationRoleArn,
        autoDeployment = autoDeployment,
        callAs = callAs,
        capabilities = capabilities,
        description = description,
        executionRoleName = executionRoleName,
        managedExecution = managedExecution,
        name = name,
        operationPreferences = operationPreferences,
        parameters = parameters,
        permissionModel = permissionModel,
        tags = tags,
        templateBody = templateBody,
        templateUrl = templateUrl,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy