Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Perform a raw API action on a server

USAGE:
scw instance server action <server-id ...> [arg=value ...]

EXAMPLES:
Start a server in the default zone with a given id
scw instance server action 11111111-1111-1111-1111-111111111111 action=poweron

ARGS:
action The raw API action to perform, as listed with 'scw instance server list-actions'
server-id ID of the server affected by the action.
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config

FLAGS:
-h, --help help for action
-w, --wait wait until the server is ready

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use

SEE ALSO:
# List available actions for a server
scw instance server list-actions

# Perform reboot action
scw instance server reboot

# Perform start action
scw instance server start

# Perform stop action
scw instance server stop
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ USAGE:
scw instance server <command>

AVAILABLE COMMANDS:
action Perform a raw API action on a server
attach-ip Attach an IP to a server
attach-volume Attach a volume to a server
backup Backup server
Expand Down
32 changes: 32 additions & 0 deletions docs/commands/instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Instance API.
- [Update all the rules of a security group](#update-all-the-rules-of-a-security-group)
- [Update security group](#update-security-group)
- [Instance management commands](#instance-management-commands)
- [Perform a raw API action on a server](#perform-a-raw-api-action-on-a-server)
- [Attach an IP to a server](#attach-an-ip-to-a-server)
- [Attach a volume to a server](#attach-a-volume-to-a-server)
- [Backup server](#backup-server)
Expand Down Expand Up @@ -1561,6 +1562,37 @@ Scaleway offers various Instance types including **Virtual Instances** and **ded



### Perform a raw API action on a server



**Usage:**

```
scw instance server action <server-id ...> [arg=value ...]
```


**Args:**

| Name | | Description |
|------|---|-------------|
| action | Required | The raw API action to perform, as listed with 'scw instance server list-actions' |
| server-id | Required | ID of the server affected by the action. |
| zone | Default: `fr-par-1` | Zone to target. If none is passed will use default zone from the config |


**Examples:**


Start a server in the default zone with a given id
```
scw instance server action 11111111-1111-1111-1111-111111111111 action=poweron
```




### Attach an IP to a server


Expand Down
1 change: 1 addition & 0 deletions internal/namespaces/instance/v1/custom.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ func GetCommands() *core.Commands {
serverTerminateCommand(),
serverDetachVolumeCommand(),
serverSSHCommand(),
serverActionCommand(),
serverStartCommand(),
serverStopCommand(),
serverStandbyCommand(),
Expand Down
Loading