Simulations

Create a scheduled failure injection

Creates a new failure injection that will be applied to the simulation during the specified time window. The injection is applied immediately to the resource state (the affected resource's status changes) and an event is recorded.

Failure types:

  • instance_kill — PERMANENTLY removes a compute instance from the simulation (deleting the failure does not restore it)
  • instance_down — reversible single-node outage: marks a compute instance critical without removing it; deactivating (isActive: false) or deleting the failure restores the node
  • az_outage — simulates an availability zone outage
  • database_overload — modeled load-sensitive database CPU, bounded Aurora ACU, latency and failed requests; thresholds are assumptions, not AWS guarantees. Set top-level severity (minor/moderate/severe, default moderate) or intensity (0–1, mapped into those three bands), not both; the response echoes effective severity. Do not place controls in parameters.
  • network_latency — adds latency to all network resources

Precondition — already-critical targets: an instance_down or instance_kill element whose targetResourceId refers to a resource that is already in critical status is rejected with 400 and error code RESOURCE_NOT_FAILEABLE — the same code and reason semantics as POST /simulations/{simulationId}/inject-failure. Consistent with the batch contract, one rejected element aborts the whole request (all-or-nothing) and no failure injection is created or applied. In an array (batch) body the error pointer is index-prefixed (/2/targetResourceId) and the message is prefixed with failures[2]: .

Requires write scope and ownership.

post/simulations/{simulationId}/failures

Request

  • Base URL: https://www.cloudworldmodel.ai/api
  • URL: https://www.cloudworldmodel.ai/api/simulations/{simulationId}/failures
  • Auth: one of:
    • HTTP bearer
    • API key in header X-PAYMENT
    • API key in header PAYMENT-SIGNATURE

Path parameters

simulationIdstring required

Simulation UUID

Request body

namestring required

Human-readable label for this failure

type'instance_kill' | 'instance_down' | 'az_outage' | 'region_outage' | 'permanent_data_loss' | 'database_overload' | 'network_latency' | 'spot_interruption' required

Type of failure to inject

startTimeinteger required

Simulation time step at which to begin the failure

endTimeinteger nullable

Simulation time step at which the failure resolves (null = permanent)

targetResourceIdstring nullable

ID of the specific resource to target (optional)

targetZonestring nullable

Availability zone to target for az_outage (optional)

targetRegionstring

Canonical region key. region_outage requires this and targetProvider. Permanent data loss requires a resource ID or provider-qualified region/zone scope; expiration never restores destroyed data.

targetProvider'aws' | 'gcp' | 'azure' | 'oci' | 'digitalocean'
severity'minor' | 'moderate' | 'severe'

Top-level database_overload severity; mutually exclusive with intensity.

intensitynumber

Alternative database_overload control, mapped to minor below 0.34, moderate below 0.67, severe otherwise; mutually exclusive with severity.

isActiveboolean

Example request

{
  "name": "Simulate AZ outage",
  "type": "az_outage",
  "startTime": 10,
  "endTime": 30,
  "targetZone": "us-east-1a"
}

Response

Failure injection created

idstring
simulationIdstring
namestring
typestring
severity'minor' | 'moderate' | 'severe'

Effective severity (including when intensity was supplied).

isActiveboolean
startTimeinteger
endTimeinteger nullable

Changes

No recorded changes to this operation across all 1 revision of this API.