swb add-region
Adds a region of the class to the connection of an AWS account, after the regions it names, and prints the link to forward from it.
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 class lists, such as us-east-1. 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.addConnectionRegion for the tenant's connection of that
account, with a fresh client token. The region goes last in the
connection's list, after the regions it names, so its first region, the one
an environment takes, stays first. The act writes the list and nothing else:
nothing in the account changes, the connection's status, template version
and any offered update stay as they were, and no link is stored.
The connection is answered with a link for every region it names beyond the one its connection stack stands in, among them the region just added: Forward from , the quick-create page of that region's CloudFormation console, which someone with rights in the account launches to stand the forwarding stack there. Until that stack stands, the next Verify reads the connection degraded, naming 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: 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.addConnectionRegion. 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 Add region on the
connection's row of Tenant settings → AWS connections.
Refusals and exit status
Exit status is 0 once the region is added, and 1 on every refusal below.
| Refusal | When |
|---|---|
swb add-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 not a region of the class <class>, which lists … | The class does not list the region; the refusal names the regions it does. |
ValidationFailed: <region> is already a region of the connection of account <account> | The connection already names 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 landed between the read and the write; run it again. |
NotAuthorized: … | The caller lacks swb.connections.manage. |
Example
Code