actionECS

deregister_container_instance

Deregister an ECS container

Activity as code

Below are the details and signature of the activity Python module.

Typeaction
Modulechaosaws.ecs.actions
Namederegister_container_instance
Returnmapping

Usage

JSON

{
  "name": "deregister-container-instance",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosaws.ecs.actions",
    "func": "deregister_container_instance",
    "arguments": {
      "cluster": "",
      "instance_id": ""
    }
  }
}

YAML

name: deregister-container-instance
provider:
  arguments:
    cluster: ""
    instance_id: ""
  func: deregister_container_instance
  module: chaosaws.ecs.actions
  type: python
type: action

Arguments

NameTypeDefaultRequiredTitleDescription
clusterstringYesClusterName of the target ECS cluster or ARN
instance_idstringYesInstance ID / ARNInstance identifier or ARN
forcebooleanfalseNoForceForce unregistering the container instance

Warning: If using “force”, any task not deleted before deregistration will remain orphaned

Signature

def deregister_container_instance(
        cluster: str,
        instance_id: str,
        force: bool = False,
        configuration: Dict[str, Dict[str, str]] = None,
        secrets: Dict[str, Dict[str, str]] = None) -> Dict[str, Any]:
    pass