{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-cloudformation/json-schema/amazon-cloudformation-create-stack-instances-input-schema.json",
  "title": "CreateStackInstancesInput",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-cloudformation-stack-instance-api-openapi.yml#/components/schemas/CreateStackInstancesInput",
  "type": "object",
  "properties": {
    "StackSetName": {
      "type": "string",
      "description": "The name or unique ID of the StackSet that you want to create stack instances from."
    },
    "Accounts": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "[Self-managed permissions] The account IDs of one or more Amazon Web Services accounts that you want to create stack instances in the specified Region(s) for. You can specify Accounts or DeploymentTargets, but not both."
    },
    "DeploymentTargets": {
      "$ref": "#/$defs/DeploymentTargets"
    },
    "Regions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The names of one or more Amazon Web Services Regions where you want to create stack instances using the specified Amazon Web Services accounts."
    },
    "ParameterOverrides": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Parameter"
      },
      "description": "A list of StackSet parameters whose values you want to override in the selected stack instances. Any overridden parameter values will be applied to all stack instances in the specified accounts and Amazon Web Services Regions. When specifying parameters and their values, be aware of how CloudFormation sets parameter values during stack instance operations: To override the current value for a parameter, include the parameter and specify its value. To leave an overridden parameter set to its present value, include the parameter and specify UsePreviousValue as true. (You can't specify both a valu"
    },
    "OperationPreferences": {
      "$ref": "#/$defs/StackSetOperationPreferences"
    },
    "OperationId": {
      "type": "string",
      "description": "The unique identifier for this StackSet operation. The operation ID also functions as an idempotency token, to ensure that CloudFormation performs the StackSet operation only once, even if you retry the request multiple times. You might retry StackSet operation requests to ensure that CloudFormation successfully received them. If you don't specify an operation ID, the SDK generates one automatically. Repeating this StackSet operation with a new operation ID retries all stack instances whose status is OUTDATED."
    },
    "CallAs": {
      "type": "string",
      "enum": [
        "SELF",
        "DELEGATED_ADMIN"
      ],
      "description": "[Service-managed permissions] Specifies whether you are acting as an account administrator in the organization's management account or as a delegated administrator in a member account. By default, SELF is specified. Use SELF for StackSets with self-managed permissions. If you are signed in to the management account, specify SELF. If you are signed in to a delegated administrator account, specify DELEGATED_ADMIN. Your Amazon Web Services account must be registered as a delegated administrator in the management account. For more information, see Register a delegated administrator in the CloudFor"
    }
  },
  "required": [
    "StackSetName",
    "Regions"
  ],
  "$defs": {
    "DeploymentTargets": {
      "type": "object",
      "properties": {
        "Accounts": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The Amazon Web Services account IDs where you want to perform stack operations. How these accounts are used depends on the AccountFilterType property. If you have many account numbers, you can provide those accounts using the AccountsUrl property instead."
        },
        "AccountsUrl": {
          "type": "string",
          "description": "The Amazon S3 URL path to a file that contains a list of Amazon Web Services account IDs. The file format must be either .csv or .txt, and the data can be comma-separated or new-line-separated. There is currently a 10MB limit for the data (approximately 800,000 accounts). This property serves the same purpose as Accounts but allows you to specify a large number of accounts."
        },
        "OrganizationalUnitIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The organization root ID or organizational unit (OU) IDs where you want to perform stack operations. CloudFormation will perform operations on accounts within these OUs and their child OUs."
        },
        "AccountFilterType": {
          "type": "string",
          "enum": [
            "NONE",
            "INTERSECTION",
            "DIFFERENCE",
            "UNION"
          ],
          "description": "Refines which accounts will have stack operations performed on them by specifying how to use the Accounts and OrganizationalUnitIds properties together. The following values determine how CloudFormation selects target accounts: INTERSECTION: Performs stack operations only on specific individual accounts within the selected OUs. Only accounts that are both specified in the Accounts property and belong to the specified OUs will be targeted. DIFFERENCE: Performs stack operations on all accounts in the selected OUs except for specific accounts listed in the Accounts property. This enables you to e"
        }
      }
    },
    "Parameter": {
      "type": "object",
      "properties": {
        "ParameterKey": {
          "type": "string",
          "description": "The key associated with the parameter. If you don't specify a key and value for a particular parameter, CloudFormation uses the default value that's specified in your template."
        },
        "ParameterValue": {
          "type": "string",
          "description": "The input value associated with the parameter."
        },
        "UsePreviousValue": {
          "type": "boolean",
          "description": "During a stack update, use the existing parameter value that the stack is using for a given parameter key. If you specify true, do not specify a parameter value."
        },
        "ResolvedValue": {
          "type": "string",
          "description": "Read-only. The value that corresponds to a Systems Manager parameter key. This field is returned only for Systems Manager parameter types in the template. For more information, see Specify existing resources at runtime with CloudFormation-supplied parameter types in the CloudFormation User Guide."
        }
      }
    },
    "StackSetOperationPreferences": {
      "type": "object",
      "properties": {
        "RegionConcurrencyType": {
          "type": "string",
          "enum": [
            "SEQUENTIAL",
            "PARALLEL"
          ],
          "description": "The concurrency type of deploying StackSets operations in Regions, could be in parallel or one Region at a time."
        },
        "RegionOrder": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The order of the Regions where you want to perform the stack operation."
        },
        "FailureToleranceCount": {
          "type": "integer",
          "description": "The number of accounts per Region this operation can fail in before CloudFormation stops the operation in that Region. If the operation is stopped in a Region, CloudFormation doesn't attempt the operation in any subsequent Regions. You can specify either FailureToleranceCount or FailureTolerancePercentage, but not both. By default, 0 is specified."
        },
        "FailureTolerancePercentage": {
          "type": "integer",
          "description": "The percentage of accounts per Region this stack operation can fail in before CloudFormation stops the operation in that Region. If the operation is stopped in a Region, CloudFormation doesn't attempt the operation in any subsequent Regions. When calculating the number of accounts based on the specified percentage, CloudFormation rounds down to the next whole number. You can specify either FailureToleranceCount or FailureTolerancePercentage, but not both. By default, 0 is specified."
        },
        "MaxConcurrentCount": {
          "type": "integer",
          "description": "The maximum number of accounts in which to perform this operation at one time. This can depend on the value of FailureToleranceCount depending on your ConcurrencyMode. MaxConcurrentCount is at most one more than the FailureToleranceCount if you're using STRICT_FAILURE_TOLERANCE. Note that this setting lets you specify the maximum for operations. For large deployments, under certain circumstances the actual number of accounts acted upon concurrently may be lower due to service throttling. You can specify either MaxConcurrentCount or MaxConcurrentPercentage, but not both. By default, 1 is specif"
        },
        "MaxConcurrentPercentage": {
          "type": "integer",
          "description": "The maximum percentage of accounts in which to perform this operation at one time. When calculating the number of accounts based on the specified percentage, CloudFormation rounds down to the next whole number. This is true except in cases where rounding down would result is zero. In this case, CloudFormation sets the number as one instead. Note that this setting lets you specify the maximum for operations. For large deployments, under certain circumstances the actual number of accounts acted upon concurrently may be lower due to service throttling. You can specify either MaxConcurrentCount or"
        },
        "ConcurrencyMode": {
          "type": "string",
          "enum": [
            "STRICT_FAILURE_TOLERANCE",
            "SOFT_FAILURE_TOLERANCE"
          ],
          "description": "Specifies how the concurrency level behaves during the operation execution. STRICT_FAILURE_TOLERANCE: This option dynamically lowers the concurrency level to ensure the number of failed accounts never exceeds the value of FailureToleranceCount +1. The initial actual concurrency is set to the lower of either the value of the MaxConcurrentCount, or the value of FailureToleranceCount +1. The actual concurrency is then reduced proportionally by the number of failures. This is the default behavior. If failure tolerance or Maximum concurrent accounts are set to percentages, the behavior is similar. "
        }
      }
    }
  }
}