Skip to content

CloudFormationClient.delete_stack_instances

rboto-cloudformation==0.4.0 · Service index · Types

Model summary (excerpt): Deletes stack instances for the specified accounts, in the specified Amazon Web Services Regions. The maximum number of organizational unit (OUs) supported by a DeleteStackInstances operation is 50. If you need more than 50, consider the following options: Batch processing: If you don't want to expose your OU hierarchy, split up the operations into multiple calls with less than 50 OUs each....

Install and imports

python -m pip install "rboto[cloudformation]==0.4.0"
from rboto import CloudFormationClient
from collections.abc import Sequence
from rboto_cloudformation.types import (
    CallAs,
    DeleteStackInstancesOutput,
    DeploymentTargets,
    StackSetOperationPreferences,
)

Signature

async def delete_stack_instances(
    *,
    stack_set_name: str,
    regions: Sequence[str],
    retain_stacks: bool,
    accounts: Sequence[str] | None = None,
    deployment_targets: DeploymentTargets | None = None,
    operation_preferences: StackSetOperationPreferences | None = None,
    operation_id: str | None = None,
    call_as: CallAs | None = None,
) -> DeleteStackInstancesOutput: ...

Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.

Arguments

Argument Required Model notes (excerpt)
stack_set_name Yes The name or unique ID of the StackSet that you want to delete stack instances for.
regions Yes The Amazon Web Services Regions where you want to delete StackSet instances.
retain_stacks Yes Removes the stack instances from the specified StackSet, but doesn't delete the stacks. You can't reassociate a retained stack or add an existing, saved stack to a new stack set. For more information, see StackSet operation options .
accounts No [Self-managed permissions] The account IDs of the Amazon Web Services accounts that you want to delete stack instances for. You can specify Accounts or DeploymentTargets , but not both.
deployment_targets No [Service-managed permissions] The Organizations accounts from which to delete stack instances. You can specify Accounts or DeploymentTargets , but not both.
operation_preferences No Preferences for how CloudFormation performs this StackSet operation.
operation_id No The unique identifier for this StackSet operation. If you don't specify an operation ID, the SDK generates one automatically. 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 can retry StackSet operation requests to ensure that CloudFormation successfully received...
call_as No [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,...

Output

DeleteStackInstancesOutput.

Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.

Field Type Presence References
operation_id str | None Always present —

| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.

CallAs, DeleteStackInstancesOutput, DeploymentTargets, StackSetOperationPreferences

Follow these links for nested inputs and outputs; recursive types link back to the same type page.

Pagination and streaming

No generated paginator for this operation.

No output stream.

Errors

Import from rboto_cloudformation.exceptions:

InvalidOperationError, OperationIdAlreadyExistsError, OperationInProgressError, StackSetNotFoundError, StaleRequestError.

Other service failures use the service base error; credential, transport and timeout failures use shared errors.

Service guide · Pinned model