During Public Preview you can use the Team plan for free, and get an early-adopter discount at GA. Sign in
locally chaos cosmos
This page is part of the CLI Reference and is generated from the CLI's own help output, so it matches what locally chaos cosmos --help prints.
For more information see Chaos Engineering and Cosmos DB Emulator.
locally chaos cosmos
Simulate Cosmos DB (data plane) failure modes.
Simulate Cosmos DB (data plane) failure modes. A fault command sets the fault's rate. With a scope flag (--location / --name) it adds or edits a rule instead. Examples: locally chaos cosmos <fault> --percentage N locally chaos cosmos <fault> reset locally chaos cosmos show locally chaos cosmos reset
Usage
locally chaos cosmos [flags] locally chaos cosmos [command]
Flags
-h, --help[=true|false] help for cosmos
Subcommands
- locally chaos cosmos 403 - Answer requests with 403, as when a role assignment has not replicated yet.
- locally chaos cosmos 429 - Answer requests with 429 Too Many Requests and a retry hint.
- locally chaos cosmos 500 - Answer requests with 500 Internal Server Error.
- locally chaos cosmos disconnect - Close live connections cleanly, in the protocol's own terms, so the client has to reconnect.
- locally chaos cosmos drop-connection - Close the connection without answering.
- locally chaos cosmos failover - Fail the primary over on a schedule.
- locally chaos cosmos incident - Take each resource down for a while, then bring it back.
- locally chaos cosmos latency - Hold requests for a random delay before they are handled.
- locally chaos cosmos outage - Fail requests for as long as the rule is armed, like a region or service that is down.
- locally chaos cosmos partial-response - Send the status, headers and part of the body, then cut the connection.
- locally chaos cosmos partition-split - Answer requests with 410 Gone substatus 1002, as Cosmos DB does while a partition splits.
- locally chaos cosmos request-timeout - Fail requests with the service's own server-side timeout, such as Cosmos DB's 408 or Storage's OperationTimedOut.
- locally chaos cosmos reset - Zero every Cosmos DB (data plane) fault and drop every rule.
- locally chaos cosmos retry-with - Answer writes with 449 Retry With, as Cosmos DB does on a write conflict it expects the client to retry.
- locally chaos cosmos session-not-available - Answer reads with 404 substatus 1002, as Cosmos DB does when a replica has not caught up with the client's session.
- locally chaos cosmos show - Print the current Cosmos DB (data plane) chaos configuration.
- locally chaos cosmos stale-read - Serve stale reads after a write.
- locally chaos cosmos write-forbidden - Refuse writes with 403 substatus 3, as a Cosmos DB region that is not accepting writes does.
locally chaos cosmos 403
Answer requests with 403, as when a role assignment has not replicated yet.
Answer requests with 403, as when a role assignment has not replicated yet. On the control plane the error code is AuthorizationFailed; on a database the engine's own equivalent error is sent instead. Without scope flags this sets the fault's rate on Cosmos DB (data plane). With --location / --name it adds or edits one rule, leaving the rate and other rules alone. A rule can be lower than the rate: "everywhere except one place" is a rate of 100 plus a rule at 0. --name acct1 matches that resource in any resource group; --name rg1/acct1 matches only rg1's. Examples: locally chaos cosmos 403 --percentage 25 locally chaos cosmos 403 --percentage 100 --location london locally chaos cosmos 403 reset --location london locally chaos cosmos 403 --percentage 100 --name acct1
Usage
locally chaos cosmos 403 [flags] locally chaos cosmos 403 [command]
Flags
-h, --help[=true|false] help for 403
--location string Scope this rule to one location, e.g. london
--name string Scope this rule to one resource by name, e.g. acct1, or rg1/acct1 for one resource group's
--percentage int How often this fault fires, 0-100 (required)
--subscription string Subscription UUID (defaults to the configured default)
Subcommands
- locally chaos cosmos 403 reset - Remove one 403 rule, or put the whole fault back to zero.
locally chaos cosmos 403 reset
Remove one 403 rule, or put the whole fault back to zero.
Reset the 403 fault. With a scope flag, removes that rule so those requests use the fault's rate. Without one, removes every rule and sets the rate to 0. 'reset --location X' removes the rule; '--percentage 0 --location X' keeps a rule that never fires, which is how to say "everywhere except X".
Usage
locally chaos cosmos 403 reset [flags]
Flags
-h, --help[=true|false] help for reset
--location string Scope this rule to one location, e.g. london
--name string Scope this rule to one resource by name, e.g. acct1, or rg1/acct1 for one resource group's
--subscription string Subscription UUID (defaults to the configured default)
locally chaos cosmos 429
Answer requests with 429 Too Many Requests and a retry hint.
Answer requests with 429 Too Many Requests and a retry hint. On a database the engine's own throttling error is sent instead. Without scope flags this sets the fault's rate on Cosmos DB (data plane). With --location / --name it adds or edits one rule, leaving the rate and other rules alone. A rule can be lower than the rate: "everywhere except one place" is a rate of 100 plus a rule at 0. --name acct1 matches that resource in any resource group; --name rg1/acct1 matches only rg1's. --retry-after sets the Retry-After header the fault answers with, such as 5s. Without one the service's usual hint is sent. A value flag left out keeps what the row already has; a new rule starts with none. 'reset' clears a row. Examples: locally chaos cosmos 429 --percentage 25 locally chaos cosmos 429 --percentage 25 --retry-after 5s locally chaos cosmos 429 --percentage 100 --location london locally chaos cosmos 429 reset --location london locally chaos cosmos 429 --percentage 100 --name acct1
Usage
locally chaos cosmos 429 [flags] locally chaos cosmos 429 [command]
Flags
-h, --help[=true|false] help for 429
--location string Scope this rule to one location, e.g. london
--name string Scope this rule to one resource by name, e.g. acct1, or rg1/acct1 for one resource group's
--percentage int How often this fault fires, 0-100 (required)
--retry-after string Retry-After this fault answers with, e.g. 5s or 500ms (the service's usual hint when omitted)
--subscription string Subscription UUID (defaults to the configured default)
Subcommands
- locally chaos cosmos 429 reset - Remove one 429 rule, or put the whole fault back to zero.
locally chaos cosmos 429 reset
Remove one 429 rule, or put the whole fault back to zero.
Reset the 429 fault. With a scope flag, removes that rule so those requests use the fault's rate. Without one, removes every rule and sets the rate to 0. 'reset --location X' removes the rule; '--percentage 0 --location X' keeps a rule that never fires, which is how to say "everywhere except X".
Usage
locally chaos cosmos 429 reset [flags]
Flags
-h, --help[=true|false] help for reset
--location string Scope this rule to one location, e.g. london
--name string Scope this rule to one resource by name, e.g. acct1, or rg1/acct1 for one resource group's
--subscription string Subscription UUID (defaults to the configured default)
locally chaos cosmos 500
Answer requests with 500 Internal Server Error.
Answer requests with 500 Internal Server Error. On a database the engine's own equivalent error is sent instead. Without scope flags this sets the fault's rate on Cosmos DB (data plane). With --location / --name it adds or edits one rule, leaving the rate and other rules alone. A rule can be lower than the rate: "everywhere except one place" is a rate of 100 plus a rule at 0. --name acct1 matches that resource in any resource group; --name rg1/acct1 matches only rg1's. Examples: locally chaos cosmos 500 --percentage 25 locally chaos cosmos 500 --percentage 100 --location london locally chaos cosmos 500 reset --location london locally chaos cosmos 500 --percentage 100 --name acct1
Usage
locally chaos cosmos 500 [flags] locally chaos cosmos 500 [command]
Flags
-h, --help[=true|false] help for 500
--location string Scope this rule to one location, e.g. london
--name string Scope this rule to one resource by name, e.g. acct1, or rg1/acct1 for one resource group's
--percentage int How often this fault fires, 0-100 (required)
--subscription string Subscription UUID (defaults to the configured default)
Subcommands
- locally chaos cosmos 500 reset - Remove one 500 rule, or put the whole fault back to zero.
locally chaos cosmos 500 reset
Remove one 500 rule, or put the whole fault back to zero.
Reset the 500 fault. With a scope flag, removes that rule so those requests use the fault's rate. Without one, removes every rule and sets the rate to 0. 'reset --location X' removes the rule; '--percentage 0 --location X' keeps a rule that never fires, which is how to say "everywhere except X".
Usage
locally chaos cosmos 500 reset [flags]
Flags
-h, --help[=true|false] help for reset
--location string Scope this rule to one location, e.g. london
--name string Scope this rule to one resource by name, e.g. acct1, or rg1/acct1 for one resource group's
--subscription string Subscription UUID (defaults to the configured default)
locally chaos cosmos disconnect
Close live connections cleanly, in the protocol's own terms, so the client has to reconnect.
Close live connections cleanly, in the protocol's own terms, so the client has to reconnect. Every interval each open connection is rolled for. Compare drop-connection, which cuts them with nothing said. Without scope flags this sets the fault's rate on Cosmos DB (data plane). With --location / --name it adds or edits one rule, leaving the rate and other rules alone. A rule can be lower than the rate: "everywhere except one place" is a rate of 100 plus a rule at 0. --name acct1 matches that resource in any resource group; --name rg1/acct1 matches only rg1's. --interval is how often the fault starts, such as 10m. It is required whenever the fault fires: nothing else sets it off. A value flag left out keeps what the row already has; a new rule starts with none. 'reset' clears a row. Examples: locally chaos cosmos disconnect --percentage 25 --interval 10m locally chaos cosmos disconnect --percentage 100 --interval 10m --location london locally chaos cosmos disconnect reset --location london locally chaos cosmos disconnect --percentage 100 --interval 10m --name acct1
Usage
locally chaos cosmos disconnect [flags] locally chaos cosmos disconnect [command]
Flags
-h, --help[=true|false] help for disconnect
--interval string How often this fault rolls for each resource, e.g. 10m; the first roll lands at a random point within the first interval (required when it fires)
--location string Scope this rule to one location, e.g. london
--name string Scope this rule to one resource by name, e.g. acct1, or rg1/acct1 for one resource group's
--percentage int How often this fault fires, 0-100 (required)
--subscription string Subscription UUID (defaults to the configured default)
Subcommands
- locally chaos cosmos disconnect reset - Remove one disconnect rule, or put the whole fault back to zero.
locally chaos cosmos disconnect reset
Remove one disconnect rule, or put the whole fault back to zero.
Reset the disconnect fault. With a scope flag, removes that rule so those requests use the fault's rate. Without one, removes every rule and sets the rate to 0. 'reset --location X' removes the rule; '--percentage 0 --location X' keeps a rule that never fires, which is how to say "everywhere except X".
Usage
locally chaos cosmos disconnect reset [flags]
Flags
-h, --help[=true|false] help for reset
--location string Scope this rule to one location, e.g. london
--name string Scope this rule to one resource by name, e.g. acct1, or rg1/acct1 for one resource group's
--subscription string Subscription UUID (defaults to the configured default)
locally chaos cosmos drop-connection
Close the connection without answering.
Close the connection without answering. The client sees the connection reset, with no status code or error body. With --interval it also cuts live connections: every interval each is rolled for, and on a hit it is reset with nothing said - no close frame or goodbye. For a clean close, use disconnect. Without scope flags this sets the fault's rate on Cosmos DB (data plane). With --location / --name it adds or edits one rule, leaving the rate and other rules alone. A rule can be lower than the rate: "everywhere except one place" is a rate of 100 plus a rule at 0. --name acct1 matches that resource in any resource group; --name rg1/acct1 matches only rg1's. --interval adds periodic action on live connections, such as every 30s, to the fault's per-request behaviour, which carries on as before. For periodic cuts with no per-request drops, arm disconnect instead. A value flag left out keeps what the row already has; a new rule starts with none. 'reset' clears a row. Examples: locally chaos cosmos drop-connection --percentage 25 locally chaos cosmos drop-connection --percentage 25 --interval 30s locally chaos cosmos drop-connection --percentage 100 --location london locally chaos cosmos drop-connection reset --location london locally chaos cosmos drop-connection --percentage 100 --name acct1
Usage
locally chaos cosmos drop-connection [flags] locally chaos cosmos drop-connection [command]
Flags
-h, --help[=true|false] help for drop-connection
--interval string Also act on live connections this often, e.g. 30s or 10m (adds to the per-request fault; use disconnect for periodic cuts only)
--location string Scope this rule to one location, e.g. london
--name string Scope this rule to one resource by name, e.g. acct1, or rg1/acct1 for one resource group's
--percentage int How often this fault fires, 0-100 (required)
--subscription string Subscription UUID (defaults to the configured default)
Subcommands
- locally chaos cosmos drop-connection reset - Remove one drop-connection rule, or put the whole fault back to zero.
locally chaos cosmos drop-connection reset
Remove one drop-connection rule, or put the whole fault back to zero.
Reset the drop-connection fault. With a scope flag, removes that rule so those requests use the fault's rate. Without one, removes every rule and sets the rate to 0. 'reset --location X' removes the rule; '--percentage 0 --location X' keeps a rule that never fires, which is how to say "everywhere except X".
Usage
locally chaos cosmos drop-connection reset [flags]
Flags
-h, --help[=true|false] help for reset
--location string Scope this rule to one location, e.g. london
--name string Scope this rule to one resource by name, e.g. acct1, or rg1/acct1 for one resource group's
--subscription string Subscription UUID (defaults to the configured default)
locally chaos cosmos failover
Fail the primary over on a schedule.
Fail the primary over on a schedule. On a hit the primary is unavailable for the rolled duration and any secondary serves reads only, then the primary returns. Without scope flags this sets the fault's rate on Cosmos DB (data plane). With --location / --name it adds or edits one rule, leaving the rate and other rules alone. A rule can be lower than the rate: "everywhere except one place" is a rate of 100 plus a rule at 0. --name acct1 matches that resource in any resource group; --name rg1/acct1 matches only rg1's. --seconds and --millis set the duration. A bare number is in the flag's unit; one with its own suffix, such as 250ms or 1.5s, means what it says. One value N picks 0 to N each time; MIN-MAX, such as 30-120, picks within that range. A duration is required whenever the fault fires. --interval is how often the fault starts, such as 10m. It is required whenever the fault fires: nothing else sets it off. A value flag left out keeps what the row already has; a new rule starts with none. 'reset' clears a row. Examples: locally chaos cosmos failover --percentage 25 --seconds 30-120 --interval 10m locally chaos cosmos failover --percentage 100 --seconds 30-120 --interval 10m --location london locally chaos cosmos failover reset --location london locally chaos cosmos failover --percentage 100 --seconds 30-120 --interval 10m --name acct1
Usage
locally chaos cosmos failover [flags] locally chaos cosmos failover [command]
Flags
-h, --help[=true|false] help for failover
--interval string How often this fault rolls for each resource, e.g. 10m; the first roll lands at a random point within the first interval (required when it fires)
--location string Scope this rule to one location, e.g. london
--millis string Duration in milliseconds, e.g. 250; N for 0 to N, or MIN-MAX for a range
--name string Scope this rule to one resource by name, e.g. acct1, or rg1/acct1 for one resource group's
--percentage int How often this fault fires, 0-100 (required)
--seconds string Duration in seconds, e.g. 30 or 1.5; N for 0 to N, or MIN-MAX for a range
--subscription string Subscription UUID (defaults to the configured default)
Subcommands
- locally chaos cosmos failover reset - Remove one failover rule, or put the whole fault back to zero.
locally chaos cosmos failover reset
Remove one failover rule, or put the whole fault back to zero.
Reset the failover fault. With a scope flag, removes that rule so those requests use the fault's rate. Without one, removes every rule and sets the rate to 0. 'reset --location X' removes the rule; '--percentage 0 --location X' keeps a rule that never fires, which is how to say "everywhere except X".
Usage
locally chaos cosmos failover reset [flags]
Flags
-h, --help[=true|false] help for reset
--location string Scope this rule to one location, e.g. london
--name string Scope this rule to one resource by name, e.g. acct1, or rg1/acct1 for one resource group's
--subscription string Subscription UUID (defaults to the configured default)
locally chaos cosmos incident
Take each resource down for a while, then bring it back.
Take each resource down for a while, then bring it back. Every interval each resource (or, on the directory and identity surfaces, the tenant) rolls against the percentage; on a hit every request to it fails for the rolled duration, answered as an outage would be, then it recovers on its own. Compare outage, which fails requests for as long as it is armed. Without scope flags this sets the fault's rate on Cosmos DB (data plane). With --location / --name it adds or edits one rule, leaving the rate and other rules alone. A rule can be lower than the rate: "everywhere except one place" is a rate of 100 plus a rule at 0. --name acct1 matches that resource in any resource group; --name rg1/acct1 matches only rg1's. --seconds and --millis set the duration. A bare number is in the flag's unit; one with its own suffix, such as 250ms or 1.5s, means what it says. One value N picks 0 to N each time; MIN-MAX, such as 30-120, picks within that range. A duration is required whenever the fault fires. --interval is how often the fault starts, such as 10m. It is required whenever the fault fires: nothing else sets it off. A value flag left out keeps what the row already has; a new rule starts with none. 'reset' clears a row. Examples: locally chaos cosmos incident --percentage 25 --seconds 30-120 --interval 10m locally chaos cosmos incident --percentage 100 --seconds 30-120 --interval 10m --location london locally chaos cosmos incident reset --location london locally chaos cosmos incident --percentage 100 --seconds 30-120 --interval 10m --name acct1
Usage
locally chaos cosmos incident [flags] locally chaos cosmos incident [command]
Flags
-h, --help[=true|false] help for incident
--interval string How often this fault rolls for each resource, e.g. 10m; the first roll lands at a random point within the first interval (required when it fires)
--location string Scope this rule to one location, e.g. london
--millis string Duration in milliseconds, e.g. 250; N for 0 to N, or MIN-MAX for a range
--name string Scope this rule to one resource by name, e.g. acct1, or rg1/acct1 for one resource group's
--percentage int How often this fault fires, 0-100 (required)
--seconds string Duration in seconds, e.g. 30 or 1.5; N for 0 to N, or MIN-MAX for a range
--subscription string Subscription UUID (defaults to the configured default)
Subcommands
- locally chaos cosmos incident reset - Remove one incident rule, or put the whole fault back to zero.
locally chaos cosmos incident reset
Remove one incident rule, or put the whole fault back to zero.
Reset the incident fault. With a scope flag, removes that rule so those requests use the fault's rate. Without one, removes every rule and sets the rate to 0. 'reset --location X' removes the rule; '--percentage 0 --location X' keeps a rule that never fires, which is how to say "everywhere except X".
Usage
locally chaos cosmos incident reset [flags]
Flags
-h, --help[=true|false] help for reset
--location string Scope this rule to one location, e.g. london
--name string Scope this rule to one resource by name, e.g. acct1, or rg1/acct1 for one resource group's
--subscription string Subscription UUID (defaults to the configured default)
locally chaos cosmos latency
Hold requests for a random delay before they are handled.
Hold requests for a random delay before they are handled. The response is unchanged, just late. With --interval it also stalls live connections: every interval each is rolled for, and on a hit nothing crosses it in either direction until the rolled delay has passed. Nothing is dropped; it all arrives late. Without scope flags this sets the fault's rate on Cosmos DB (data plane). With --location / --name it adds or edits one rule, leaving the rate and other rules alone. A rule can be lower than the rate: "everywhere except one place" is a rate of 100 plus a rule at 0. --name acct1 matches that resource in any resource group; --name rg1/acct1 matches only rg1's. --seconds and --millis set the duration. A bare number is in the flag's unit; one with its own suffix, such as 250ms or 1.5s, means what it says. The value is a maximum: each firing picks 0 to N. A duration is required whenever the fault fires. --interval adds periodic action on live connections, such as every 30s, to the fault's per-request behaviour, which carries on as before. For periodic cuts with no per-request drops, arm disconnect instead. A value flag left out keeps what the row already has; a new rule starts with none. 'reset' clears a row. Examples: locally chaos cosmos latency --percentage 25 --seconds 30 locally chaos cosmos latency --percentage 25 --seconds 30 --interval 30s locally chaos cosmos latency --percentage 100 --seconds 30 --location london locally chaos cosmos latency reset --location london locally chaos cosmos latency --percentage 100 --seconds 30 --name acct1
Usage
locally chaos cosmos latency [flags] locally chaos cosmos latency [command]
Flags
-h, --help[=true|false] help for latency
--interval string Also act on live connections this often, e.g. 30s or 10m (adds to the per-request fault; use disconnect for periodic cuts only)
--location string Scope this rule to one location, e.g. london
--millis string Duration in milliseconds, e.g. 250; the maximum: each firing picks 0 to N
--name string Scope this rule to one resource by name, e.g. acct1, or rg1/acct1 for one resource group's
--percentage int How often this fault fires, 0-100 (required)
--seconds string Duration in seconds, e.g. 30 or 1.5; the maximum: each firing picks 0 to N
--subscription string Subscription UUID (defaults to the configured default)
Subcommands
- locally chaos cosmos latency reset - Remove one latency rule, or put the whole fault back to zero.
locally chaos cosmos latency reset
Remove one latency rule, or put the whole fault back to zero.
Reset the latency fault. With a scope flag, removes that rule so those requests use the fault's rate. Without one, removes every rule and sets the rate to 0. 'reset --location X' removes the rule; '--percentage 0 --location X' keeps a rule that never fires, which is how to say "everywhere except X".
Usage
locally chaos cosmos latency reset [flags]
Flags
-h, --help[=true|false] help for reset
--location string Scope this rule to one location, e.g. london
--name string Scope this rule to one resource by name, e.g. acct1, or rg1/acct1 for one resource group's
--subscription string Subscription UUID (defaults to the configured default)
locally chaos cosmos outage
Fail requests for as long as the rule is armed, like a region or service that is down.
Fail requests for as long as the rule is armed, like a region or service that is down. Each request rolls against the percentage, so at 100 every request fails until the fault is turned off. Each service answers in its own terms, usually 503 Service Unavailable, and a protocol with live connections also closes the ones open when the outage starts. For downtime that ends by itself, see incident. Without scope flags this sets the fault's rate on Cosmos DB (data plane). With --location / --name it adds or edits one rule, leaving the rate and other rules alone. A rule can be lower than the rate: "everywhere except one place" is a rate of 100 plus a rule at 0. --name acct1 matches that resource in any resource group; --name rg1/acct1 matches only rg1's. --retry-after sets the Retry-After header the fault answers with, such as 5s. Without one the service's usual hint is sent. A value flag left out keeps what the row already has; a new rule starts with none. 'reset' clears a row. Examples: locally chaos cosmos outage --percentage 25 locally chaos cosmos outage --percentage 25 --retry-after 5s locally chaos cosmos outage --percentage 100 --location london locally chaos cosmos outage reset --location london locally chaos cosmos outage --percentage 100 --name acct1
Usage
locally chaos cosmos outage [flags] locally chaos cosmos outage [command]
Flags
-h, --help[=true|false] help for outage
--location string Scope this rule to one location, e.g. london
--name string Scope this rule to one resource by name, e.g. acct1, or rg1/acct1 for one resource group's
--percentage int How often this fault fires, 0-100 (required)
--retry-after string Retry-After this fault answers with, e.g. 5s or 500ms (the service's usual hint when omitted)
--subscription string Subscription UUID (defaults to the configured default)
Subcommands
- locally chaos cosmos outage reset - Remove one outage rule, or put the whole fault back to zero.
locally chaos cosmos outage reset
Remove one outage rule, or put the whole fault back to zero.
Reset the outage fault. With a scope flag, removes that rule so those requests use the fault's rate. Without one, removes every rule and sets the rate to 0. 'reset --location X' removes the rule; '--percentage 0 --location X' keeps a rule that never fires, which is how to say "everywhere except X".
Usage
locally chaos cosmos outage reset [flags]
Flags
-h, --help[=true|false] help for reset
--location string Scope this rule to one location, e.g. london
--name string Scope this rule to one resource by name, e.g. acct1, or rg1/acct1 for one resource group's
--subscription string Subscription UUID (defaults to the configured default)
locally chaos cosmos partial-response
Send the status, headers and part of the body, then cut the connection.
Send the status, headers and part of the body, then cut the connection. The client sees a response that ends early. Without scope flags this sets the fault's rate on Cosmos DB (data plane). With --location / --name it adds or edits one rule, leaving the rate and other rules alone. A rule can be lower than the rate: "everywhere except one place" is a rate of 100 plus a rule at 0. --name acct1 matches that resource in any resource group; --name rg1/acct1 matches only rg1's. Examples: locally chaos cosmos partial-response --percentage 25 locally chaos cosmos partial-response --percentage 100 --location london locally chaos cosmos partial-response reset --location london locally chaos cosmos partial-response --percentage 100 --name acct1
Usage
locally chaos cosmos partial-response [flags] locally chaos cosmos partial-response [command]
Flags
-h, --help[=true|false] help for partial-response
--location string Scope this rule to one location, e.g. london
--name string Scope this rule to one resource by name, e.g. acct1, or rg1/acct1 for one resource group's
--percentage int How often this fault fires, 0-100 (required)
--subscription string Subscription UUID (defaults to the configured default)
Subcommands
- locally chaos cosmos partial-response reset - Remove one partial-response rule, or put the whole fault back to zero.
locally chaos cosmos partial-response reset
Remove one partial-response rule, or put the whole fault back to zero.
Reset the partial-response fault. With a scope flag, removes that rule so those requests use the fault's rate. Without one, removes every rule and sets the rate to 0. 'reset --location X' removes the rule; '--percentage 0 --location X' keeps a rule that never fires, which is how to say "everywhere except X".
Usage
locally chaos cosmos partial-response reset [flags]
Flags
-h, --help[=true|false] help for reset
--location string Scope this rule to one location, e.g. london
--name string Scope this rule to one resource by name, e.g. acct1, or rg1/acct1 for one resource group's
--subscription string Subscription UUID (defaults to the configured default)
locally chaos cosmos partition-split
Answer requests with 410 Gone substatus 1002, as Cosmos DB does while a partition splits.
Answer requests with 410 Gone substatus 1002, as Cosmos DB does while a partition splits. The client is expected to refresh its routing and retry. Without scope flags this sets the fault's rate on Cosmos DB (data plane). With --location / --name it adds or edits one rule, leaving the rate and other rules alone. A rule can be lower than the rate: "everywhere except one place" is a rate of 100 plus a rule at 0. --name acct1 matches that resource in any resource group; --name rg1/acct1 matches only rg1's. Examples: locally chaos cosmos partition-split --percentage 25 locally chaos cosmos partition-split --percentage 100 --location london locally chaos cosmos partition-split reset --location london locally chaos cosmos partition-split --percentage 100 --name acct1
Usage
locally chaos cosmos partition-split [flags] locally chaos cosmos partition-split [command]
Flags
-h, --help[=true|false] help for partition-split
--location string Scope this rule to one location, e.g. london
--name string Scope this rule to one resource by name, e.g. acct1, or rg1/acct1 for one resource group's
--percentage int How often this fault fires, 0-100 (required)
--subscription string Subscription UUID (defaults to the configured default)
Subcommands
- locally chaos cosmos partition-split reset - Remove one partition-split rule, or put the whole fault back to zero.
locally chaos cosmos partition-split reset
Remove one partition-split rule, or put the whole fault back to zero.
Reset the partition-split fault. With a scope flag, removes that rule so those requests use the fault's rate. Without one, removes every rule and sets the rate to 0. 'reset --location X' removes the rule; '--percentage 0 --location X' keeps a rule that never fires, which is how to say "everywhere except X".
Usage
locally chaos cosmos partition-split reset [flags]
Flags
-h, --help[=true|false] help for reset
--location string Scope this rule to one location, e.g. london
--name string Scope this rule to one resource by name, e.g. acct1, or rg1/acct1 for one resource group's
--subscription string Subscription UUID (defaults to the configured default)
locally chaos cosmos request-timeout
Fail requests with the service's own server-side timeout, such as Cosmos DB's 408 or Storage's OperationTimedOut.
Fail requests with the service's own server-side timeout, such as Cosmos DB's 408 or Storage's OperationTimedOut. Without scope flags this sets the fault's rate on Cosmos DB (data plane). With --location / --name it adds or edits one rule, leaving the rate and other rules alone. A rule can be lower than the rate: "everywhere except one place" is a rate of 100 plus a rule at 0. --name acct1 matches that resource in any resource group; --name rg1/acct1 matches only rg1's. Examples: locally chaos cosmos request-timeout --percentage 25 locally chaos cosmos request-timeout --percentage 100 --location london locally chaos cosmos request-timeout reset --location london locally chaos cosmos request-timeout --percentage 100 --name acct1
Usage
locally chaos cosmos request-timeout [flags] locally chaos cosmos request-timeout [command]
Flags
-h, --help[=true|false] help for request-timeout
--location string Scope this rule to one location, e.g. london
--name string Scope this rule to one resource by name, e.g. acct1, or rg1/acct1 for one resource group's
--percentage int How often this fault fires, 0-100 (required)
--subscription string Subscription UUID (defaults to the configured default)
Subcommands
- locally chaos cosmos request-timeout reset - Remove one request-timeout rule, or put the whole fault back to zero.
locally chaos cosmos request-timeout reset
Remove one request-timeout rule, or put the whole fault back to zero.
Reset the request-timeout fault. With a scope flag, removes that rule so those requests use the fault's rate. Without one, removes every rule and sets the rate to 0. 'reset --location X' removes the rule; '--percentage 0 --location X' keeps a rule that never fires, which is how to say "everywhere except X".
Usage
locally chaos cosmos request-timeout reset [flags]
Flags
-h, --help[=true|false] help for reset
--location string Scope this rule to one location, e.g. london
--name string Scope this rule to one resource by name, e.g. acct1, or rg1/acct1 for one resource group's
--subscription string Subscription UUID (defaults to the configured default)
locally chaos cosmos reset
Zero every Cosmos DB (data plane) fault and drop every rule.
Zero every Cosmos DB (data plane) fault and drop every rule. Examples: locally chaos cosmos reset
Usage
locally chaos cosmos reset [flags]
Flags
-h, --help[=true|false] help for reset
--subscription string Subscription UUID (defaults to the configured default)
locally chaos cosmos retry-with
Answer writes with 449 Retry With, as Cosmos DB does on a write conflict it expects the client to retry.
Answer writes with 449 Retry With, as Cosmos DB does on a write conflict it expects the client to retry. Without scope flags this sets the fault's rate on Cosmos DB (data plane). With --location / --name it adds or edits one rule, leaving the rate and other rules alone. A rule can be lower than the rate: "everywhere except one place" is a rate of 100 plus a rule at 0. --name acct1 matches that resource in any resource group; --name rg1/acct1 matches only rg1's. Examples: locally chaos cosmos retry-with --percentage 25 locally chaos cosmos retry-with --percentage 100 --location london locally chaos cosmos retry-with reset --location london locally chaos cosmos retry-with --percentage 100 --name acct1
Usage
locally chaos cosmos retry-with [flags] locally chaos cosmos retry-with [command]
Flags
-h, --help[=true|false] help for retry-with
--location string Scope this rule to one location, e.g. london
--name string Scope this rule to one resource by name, e.g. acct1, or rg1/acct1 for one resource group's
--percentage int How often this fault fires, 0-100 (required)
--subscription string Subscription UUID (defaults to the configured default)
Subcommands
- locally chaos cosmos retry-with reset - Remove one retry-with rule, or put the whole fault back to zero.
locally chaos cosmos retry-with reset
Remove one retry-with rule, or put the whole fault back to zero.
Reset the retry-with fault. With a scope flag, removes that rule so those requests use the fault's rate. Without one, removes every rule and sets the rate to 0. 'reset --location X' removes the rule; '--percentage 0 --location X' keeps a rule that never fires, which is how to say "everywhere except X".
Usage
locally chaos cosmos retry-with reset [flags]
Flags
-h, --help[=true|false] help for reset
--location string Scope this rule to one location, e.g. london
--name string Scope this rule to one resource by name, e.g. acct1, or rg1/acct1 for one resource group's
--subscription string Subscription UUID (defaults to the configured default)
locally chaos cosmos session-not-available
Answer reads with 404 substatus 1002, as Cosmos DB does when a replica has not caught up with the client's session.
Answer reads with 404 substatus 1002, as Cosmos DB does when a replica has not caught up with the client's session. Without scope flags this sets the fault's rate on Cosmos DB (data plane). With --location / --name it adds or edits one rule, leaving the rate and other rules alone. A rule can be lower than the rate: "everywhere except one place" is a rate of 100 plus a rule at 0. --name acct1 matches that resource in any resource group; --name rg1/acct1 matches only rg1's. Examples: locally chaos cosmos session-not-available --percentage 25 locally chaos cosmos session-not-available --percentage 100 --location london locally chaos cosmos session-not-available reset --location london locally chaos cosmos session-not-available --percentage 100 --name acct1
Usage
locally chaos cosmos session-not-available [flags] locally chaos cosmos session-not-available [command]
Flags
-h, --help[=true|false] help for session-not-available
--location string Scope this rule to one location, e.g. london
--name string Scope this rule to one resource by name, e.g. acct1, or rg1/acct1 for one resource group's
--percentage int How often this fault fires, 0-100 (required)
--subscription string Subscription UUID (defaults to the configured default)
Subcommands
- locally chaos cosmos session-not-available reset - Remove one session-not-available rule, or put the whole fault back to zero.
locally chaos cosmos session-not-available reset
Remove one session-not-available rule, or put the whole fault back to zero.
Reset the session-not-available fault. With a scope flag, removes that rule so those requests use the fault's rate. Without one, removes every rule and sets the rate to 0. 'reset --location X' removes the rule; '--percentage 0 --location X' keeps a rule that never fires, which is how to say "everywhere except X".
Usage
locally chaos cosmos session-not-available reset [flags]
Flags
-h, --help[=true|false] help for reset
--location string Scope this rule to one location, e.g. london
--name string Scope this rule to one resource by name, e.g. acct1, or rg1/acct1 for one resource group's
--subscription string Subscription UUID (defaults to the configured default)
locally chaos cosmos show
Print the current Cosmos DB (data plane) chaos configuration.
Print the current Cosmos DB (data plane) chaos configuration. Examples: locally chaos cosmos show
Usage
locally chaos cosmos show [flags]
Flags
-h, --help[=true|false] help for show
--subscription string Subscription UUID (defaults to the configured default)
locally chaos cosmos stale-read
Serve stale reads after a write.
Serve stale reads after a write. Each write opens a window on what it wrote, and reads inside the window see it as it was before the write. Without scope flags this sets the fault's rate on Cosmos DB (data plane). With --location / --name it adds or edits one rule, leaving the rate and other rules alone. A rule can be lower than the rate: "everywhere except one place" is a rate of 100 plus a rule at 0. --name acct1 matches that resource in any resource group; --name rg1/acct1 matches only rg1's. --seconds and --millis set the duration. A bare number is in the flag's unit; one with its own suffix, such as 250ms or 1.5s, means what it says. The value is a maximum: each firing picks 0 to N. A duration is required whenever the fault fires. A value flag left out keeps what the row already has; a new rule starts with none. 'reset' clears a row. Examples: locally chaos cosmos stale-read --percentage 25 --seconds 30 locally chaos cosmos stale-read --percentage 100 --seconds 30 --location london locally chaos cosmos stale-read reset --location london locally chaos cosmos stale-read --percentage 100 --seconds 30 --name acct1
Usage
locally chaos cosmos stale-read [flags] locally chaos cosmos stale-read [command]
Flags
-h, --help[=true|false] help for stale-read
--location string Scope this rule to one location, e.g. london
--millis string Duration in milliseconds, e.g. 250; the maximum: each firing picks 0 to N
--name string Scope this rule to one resource by name, e.g. acct1, or rg1/acct1 for one resource group's
--percentage int How often this fault fires, 0-100 (required)
--seconds string Duration in seconds, e.g. 30 or 1.5; the maximum: each firing picks 0 to N
--subscription string Subscription UUID (defaults to the configured default)
Subcommands
- locally chaos cosmos stale-read reset - Remove one stale-read rule, or put the whole fault back to zero.
locally chaos cosmos stale-read reset
Remove one stale-read rule, or put the whole fault back to zero.
Reset the stale-read fault. With a scope flag, removes that rule so those requests use the fault's rate. Without one, removes every rule and sets the rate to 0. 'reset --location X' removes the rule; '--percentage 0 --location X' keeps a rule that never fires, which is how to say "everywhere except X".
Usage
locally chaos cosmos stale-read reset [flags]
Flags
-h, --help[=true|false] help for reset
--location string Scope this rule to one location, e.g. london
--name string Scope this rule to one resource by name, e.g. acct1, or rg1/acct1 for one resource group's
--subscription string Subscription UUID (defaults to the configured default)
locally chaos cosmos write-forbidden
Refuse writes with 403 substatus 3, as a Cosmos DB region that is not accepting writes does.
Refuse writes with 403 substatus 3, as a Cosmos DB region that is not accepting writes does. Without scope flags this sets the fault's rate on Cosmos DB (data plane). With --location / --name it adds or edits one rule, leaving the rate and other rules alone. A rule can be lower than the rate: "everywhere except one place" is a rate of 100 plus a rule at 0. --name acct1 matches that resource in any resource group; --name rg1/acct1 matches only rg1's. Examples: locally chaos cosmos write-forbidden --percentage 25 locally chaos cosmos write-forbidden --percentage 100 --location london locally chaos cosmos write-forbidden reset --location london locally chaos cosmos write-forbidden --percentage 100 --name acct1
Usage
locally chaos cosmos write-forbidden [flags] locally chaos cosmos write-forbidden [command]
Flags
-h, --help[=true|false] help for write-forbidden
--location string Scope this rule to one location, e.g. london
--name string Scope this rule to one resource by name, e.g. acct1, or rg1/acct1 for one resource group's
--percentage int How often this fault fires, 0-100 (required)
--subscription string Subscription UUID (defaults to the configured default)
Subcommands
- locally chaos cosmos write-forbidden reset - Remove one write-forbidden rule, or put the whole fault back to zero.
locally chaos cosmos write-forbidden reset
Remove one write-forbidden rule, or put the whole fault back to zero.
Reset the write-forbidden fault. With a scope flag, removes that rule so those requests use the fault's rate. Without one, removes every rule and sets the rate to 0. 'reset --location X' removes the rule; '--percentage 0 --location X' keeps a rule that never fires, which is how to say "everywhere except X".
Usage
locally chaos cosmos write-forbidden reset [flags]
Flags
-h, --help[=true|false] help for reset
--location string Scope this rule to one location, e.g. london
--name string Scope this rule to one resource by name, e.g. acct1, or rg1/acct1 for one resource group's
--subscription string Subscription UUID (defaults to the configured default)
During Public Preview you can use the Team plan for free, and get an early-adopter discount at GA. Sign in