actionEC2

attach_volume

Attaches a previously detached EBS volume to its associated EC2 instance

Activity as code

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

Typeaction
Modulechaosaws.ec2.actions
Nameattach_volume
Returnlist

Usage

JSON

{
  "name": "attach-volume",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosaws.ec2.actions",
    "func": "attach_volume"
  }
}

YAML

name: attach-volume
provider:
  func: attach_volume
  module: chaosaws.ec2.actions
  type: python
type: action

Arguments

NameTypeDefaultRequiredTitleDescription
instance_idslistnullNoInstance IDsList of instance identifiers, or filters below
filterslistnullNoInstance FiltersList of key/value pairs to select instances

If neither ‘instance_ids’ or ‘filters’ are provided, all detached volumes will be reattached to their respective instances

One of:

Signature

def attach_volume(
        instance_ids: List[str] = None,
        filters: List[Dict[str, Any]] = None,
        configuration: Dict[str, Dict[str, str]] = None,
        secrets: Dict[str, Dict[str, str]] = None) -> List[Dict[str, Any]]:
    pass