actionECS

set_service_placement_strategy

Sets the service's instance placement strategy

Activity as code

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

Typeaction
Modulechaosaws.ecs.actions
Nameset_service_placement_strategy
Returnmapping

Usage

JSON

{
  "name": "set-service-placement-strategy",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosaws.ecs.actions",
    "func": "set_service_placement_strategy",
    "arguments": {
      "cluster": "",
      "service": "",
      "placement_type": ""
    }
  }
}

YAML

name: set-service-placement-strategy
provider:
  arguments:
    cluster: ""
    placement_type: ""
    service: ""
  func: set_service_placement_strategy
  module: chaosaws.ecs.actions
  type: python
type: action

Arguments

NameTypeDefaultRequiredTitleDescription
clusterstringYesClusterName of the target ECS cluster
servicestringYesServiceName of the target service
placement_typestringYesPlacement StrategyType of placement to employ: random, spread or binpack
placement_fieldstringnullNoPlacement FieldField to apply the placement strategy to

Signature

def set_service_placement_strategy(
        cluster: str,
        service: str,
        placement_type: str,
        placement_field: str = None,
        configuration: Dict[str, Dict[str, str]] = None,
        secrets: Dict[str, Dict[str, str]] = None) -> Dict[str, Any]:
    pass