swb remove-region
Takes a region off the connection of an AWS account; the regions it keeps keep their order.
Synopsis
Code
Arguments and flags
| Argument or flag | Takes | Default |
|---|---|---|
<account> | The AWS account id the connection is of — the connection's id. Required. | — |
<region> | A region the connection names. Required. | — |
--json | Nothing. Prints the connection as the API answered it instead of the summary. | off |
--help, -h | Prints the command's help and exits. | off |
What it does
Calls Mutation.removeConnectionRegion for the tenant's connection of that
account, with a fresh client token. The region leaves the connection's list
and the others keep their order. The act writes the list and nothing else:
nothing in the account changes. From then on the connection offers no
forwarding link for the region, and Verify reads nothing there.
Two regions are never taken. The region the connection stack stands in, or, before its launch has landed, the first region named, where its launch link opens, is the connection's own. And a region whose forwarding stack the connection records stays named until that stack is deleted in the account and Verify has read it gone: delete it in the region's CloudFormation console, run Verify on the connection, then remove the region.
What it prints
Code
— the connection's alias and account, the regions it names and the region its connection stack stands in (or, before its launch has landed, is launched in), then one line per further region it still names: Forward from where no forwarding stack stands there, Update forwarding where one does, and its link.
--json prints the connection as the API answered it, every field of
AccountConnection, among them regions, stackRegion and
forwardingLinks.
The operation and the permission
Mutation.removeConnectionRegion. The caller needs swb.connections.manage
on the tenant. The tenant is the one Query.me names, read once and kept
with the credential. On the console, the same act is Remove on
the connection's row of Tenant settings → AWS connections, shown
disabled with its reason for the two regions it never takes.
Refusals and exit status
Exit status is 0 once the region is removed, and 1 on every refusal below.
| Refusal | When |
|---|---|
swb remove-region takes <account> <region> | The account or the region is missing. |
not signed in or token expired — run swb login | There is no usable credential. |
ValidationFailed: <region> is the region the connection stack of account <account> stands in, which the connection keeps | The region is the connection stack's. |
ValidationFailed: <region> is the first region the connection of account <account> names, where its connection stack is launched, which the connection keeps | The connection's launch has not landed, and the region is the first it names. |
ValidationFailed: the connection of account <account> records the forwarding stack <stack> in <region>: … | A forwarding stack stands there; delete it in the account and run Verify first. |
ValidationFailed: <region> is not a region of the connection of account <account>, which names … | The connection does not name it. |
ValidationFailed: account <account>'s connection is a child of <stack>, whose deploy writes its regions; … | The account is the class's own: its regions are written by that stack's deploy. |
NotFound: AccountConnection <account> not found | The tenant has no connection of that account. |
Conflict: the regions of the connection of account <account> changed since they were read: … | Another region act, or a forwarding stack's record, landed between the read and the write; run it again. |
NotAuthorized: … | The caller lacks swb.connections.manage. |
Example
Code