Virtual Machine Api Product
Operations with instances, including create, delete, start, stop, reboot and other actions.
List Virtual Machine instances in the current tenant which is logged in.
| _limit | integer ( Limit) <= 2147483647 Default: 50 limit the number of the results |
| _offset | integer ( Offset) [ 0 .. 2147483647 ] Default: 0 pagination for the results limited |
| _sort | string ( Sort) ^(^[\w-]+:(asc|desc)(,[\w-]+:(asc|desc))*)?$ Default: "created_at:asc" order of the results using informed fields |
| expand | Array of strings (Expand) Default: "" You can get more detailed info about: ['image', 'machine-type', 'machine-types', 'network'] |
{- "instances": [
- {
- "availability_zone": "br-regiao-1a",
- "created_at": "2022-06-10T18:33:12Z",
- "error": {
- "message": "An error occurred while creating your instance. Please contact our support for assistance.",
- "slug": "create_instance.keypair.not_found"
}, - "id": "2ae0b896-855c-456c-b4a5-c8f4e6d2f4f6",
- "image": {
- "id": "2ae0b896-855c-456c-b4a5-c8f4e6d2f4f6"
}, - "machine_type": {
- "id": "2ae0b896-855c-456c-b4a5-c8f4e6d2f4f6"
}, - "name": "instance name",
- "network": {
- "ports": [
- {
- "id": "2ae0b896-855c-456c-b4a5-c8f4e6d2f4f6"
}
]
}, - "ssh_key_name": "keypair_name_here",
- "state": "running",
- "status": "completed",
- "updated_at": "2022-06-11T18:33:12Z",
- "user_data": "base64_data"
}
]
}Creates a Virtual Machine instance in the current tenant which is logged in.
An instance is ready for you to use when it's in the running state.
| name required | string (Name) [ 1 .. 255 ] characters |
required | ID (object) or Name (object) (Machine Type) |
| ssh_key_name required | string (Ssh key Name) >= 0 characters |
required | ID (object) or Name (object) (Image) |
Availability Zone (string) or Availability Zone (null) (Availability Zone) | |
InstanceCreateRequestV1NetworkDefault (object) or null Default: {"vpc":{"name":"default"},"associate_public_ip":true} | |
Used to perform automated configuration tasks. (string) or Used to perform automated configuration tasks. (null) (Used to perform automated configuration tasks.) |
{- "availability_zone": "br-regiao-1a",
- "image": {
- "id": "2ae0b896-855c-456c-b4a5-c8f4e6d2f4f6"
}, - "machine_type": {
- "id": "2ae0b896-855c-456c-b4a5-c8f4e6d2f4f6"
}, - "name": "instance name",
- "network": {
- "associate_public_ip": true,
- "interface": {
- "security_groups": [
- {
- "id": "f273fbde-2ddf-4dcd-8c41-342671ac0d17"
}, - {
- "id": "02a2acf3-d6db-4424-ac97-0254cb9c329e"
}
]
}, - "vpc": {
- "id": "2ae0b896-855c-456c-b4a5-c8f4e6d2f4f6"
}
}, - "ssh_key_name": "keypair_name_here",
- "user_data": "some_base64_script"
}{- "id": "9ec75090-2872-4f51-8111-53d05d96d2c6"
}Attach network interface to an instance for a default project.
required | ID (object) or Name (object) (Instance) |
required | object (NICRequestInterfaceField) |
{- "instance": {
- "id": "c47e974f-8002-46e9-8a63-d66505be2aa1"
}, - "network": {
- "interface": {
- "id": "31dcb3ea-9320-4122-8fea-3a3b06114ca1"
}
}
}{- "slug": "string",
- "message": "string",
- "details": { }
}Detach a non primary network interface from an instance for a default project
required | ID (object) or Name (object) (Instance) |
required | object (NICRequestInterfaceField) |
{- "instance": {
- "id": "c47e974f-8002-46e9-8a63-d66505be2aa1"
}, - "network": {
- "interface": {
- "id": "31dcb3ea-9320-4122-8fea-3a3b06114ca1"
}
}
}{- "slug": "string",
- "message": "string",
- "details": { }
}Deletes permanently an instance with the id provided in the current tenant which is logged in.
| id required | string <uuid> (Id) Instance id - for help use ./mgc virtual-machines instances list . |
| delete_public_ip | boolean (Delete Public Ip) Default: false Flag default value false. |
{- "slug": "string",
- "message": "string",
- "details": { }
}Get an instance details for the current tenant which is logged in.
You can use the virtual-machine list command to retrieve all instances, so you can get the id of the instance that you want to get details.
You can use the expand argument to get more details from the inner ob...
| id required | string (Id) Instance id - for help use ./mgc virtual-machines instances list . |
| expand | Array of strings (Expand) Default: "" You can get more detailed info about: ['image', 'machine-type', 'machine-types', 'network'] |
{- "availability_zone": "br-regiao-1a",
- "created_at": "2022-06-10T18:33:12Z",
- "error": {
- "message": "An error occurred while creating your instance. Please contact our support for assistance.",
- "slug": "create_instance.keypair.not_found"
}, - "id": "2ae0b896-855c-456c-b4a5-c8f4e6d2f4f6",
- "image": {
- "id": "2ae0b896-855c-456c-b4a5-c8f4e6d2f4f6"
}, - "machine_type": {
- "id": "2ae0b896-855c-456c-b4a5-c8f4e6d2f4f6"
}, - "name": "instance name",
- "network": {
- "ports": [
- {
- "id": "2ae0b896-855c-456c-b4a5-c8f4e6d2f4f6"
}
]
}, - "ssh_key_name": "keypair_name_here",
- "state": "running",
- "status": "completed",
- "updated_at": "2022-06-11T18:33:12Z",
- "user_data": "some_base_64_str"
}Reboots a Virtual Machine instance with the id provided in the current tenant which is logged in.
| id required | string <uuid> (Id) Instance id - for help use ./mgc virtual-machines instances list . |
{- "detail": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string"
}
]
}Renames a Virtual Machine instance with the id provided in the current tenant which is logged in.
| id required | string (Id) Instance id - for help use ./mgc virtual-machines instances list . |
| name required | string (Name) [ 1 .. 255 ] characters New name |
{- "name": "new instance name"
}{- "slug": "string",
- "message": "string",
- "details": { }
}Changes a Virtual Machine instance machine type with the id provided in the current tenant which is logged in.
| id required | string <uuid> (Id) Instance id - for help use ./mgc virtual-machines instances list . |
required | ID (object) or Name (object) (Machine Type) | ||
Any of
| |||
{- "machine_type": {
- "id": "2ae0b896-855c-456c-b4a5-c8f4e6d2f4f6"
}
}{- "slug": "string",
- "message": "string",
- "details": { }
}Starts a Virtual Machine instance with the id provided in the current tenant which is logged in.
| id required | string <uuid> (Id) Instance id - for help use ./mgc virtual-machines instances list . |
{- "detail": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string"
}
]
}Stops a Virtual Machine instance with the id provided in the current tenant which is logged in.
| id required | string <uuid> (Id) Instance id - for help use ./mgc virtual-machines instances list . |
{- "detail": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string"
}
]
}Suspends a Virtual Machine instance with the id provided in the current tenant which is logged in.
| id required | string <uuid> (Id) Instance id - for help use ./mgc virtual-machines instances list . |
{- "detail": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string"
}
]
}Retrieve a list of images allowed for the current region.
| _limit | integer ( Limit) <= 2147483647 Default: 50 |
| _offset | integer ( Offset) [ 0 .. 2147483647 ] Default: 0 |
| _sort | string ( Sort) ^(^[\w-]+:(asc|desc)(,[\w-]+:(asc|desc))*)?$ Default: "platform:asc,end_life_at:desc" |
{- "images": [
- {
- "end_life_at": "2022-06-10T18:33:12Z",
- "end_standard_support_at": "2022-06-10T18:33:12Z",
- "id": "c47e974f-8002-46e9-8a63-d66505be2aa1",
- "minimum_requirements": {
- "disk": 2,
- "ram": 1,
- "vcpu": 1
}, - "name": "ubuntu 22.10",
- "platform": "linux",
- "release_at": "2022-06-10T18:33:12Z",
- "status": "active",
- "version": "22.10"
}
]
}Retrieves a list of machine types allowed for the current tenant which is logged in.
| _limit | integer ( Limit) <= 2147483647 Default: 50 limit the number of the results |
| _offset | integer ( Offset) [ 0 .. 2147483647 ] Default: 0 pagination for the results limited |
| _sort | string ( Sort) ^(^[\w-]+:(asc|desc)(,[\w-]+:(asc|desc))*)?$ Default: "created_at:asc" order of the results using informed fields |
{- "machine_types": [
- {
- "disk": 10,
- "gpu": 1,
- "id": "3a4dc05b-eb10-42ec-8c0c-848e06f7aded",
- "name": "abc.small",
- "ram": 2,
- "sku": "some_sku",
- "status": "active",
- "vcpus": 2
}
]
}List all snapshots in the current tenant which is logged in.
| _limit | integer ( Limit) <= 2147483647 Default: 50 limit the number of the results |
| _offset | integer ( Offset) [ 0 .. 2147483647 ] Default: 0 pagination for the results limited |
| _sort | string ( Sort) ^(^[\w-]+:(asc|desc)(,[\w-]+:(asc|desc))*)?$ Default: "created_at:asc" order of the results using informed fields |
| expand | Array of strings (Expand) Default: "" You can get more detailed info about: ['image', 'machine-type'] |
{- "snapshots": [
- {
- "created_at": "2022-06-10T18:33:12Z",
- "id": "4830bfbe-0362-4ebb-a8ba-f36be4b4bc6a",
- "instance": {
- "id": "4830bfbe-0362-4ebb-a8ba-f36be4b4bc6a",
- "image": {
- "id": "4830bfbe-0362-4ebb-a8ba-f36be4b4bc6a"
}, - "machine_type": {
- "id": "4830bfbe-0362-4ebb-a8ba-f36be4b4bc6a"
}
}, - "name": "snapshot name",
- "size": 1000,
- "state": "available",
- "status": "completed",
- "updated_at": "2022-06-11T18:33:12Z"
}
]
}Create a snapshot of a Virtual Machine in the current tenant which is logged in.
A Snapshot is ready for restore when it's in available state.
| name required | string (Name) [ 1 .. 255 ] characters |
required | ID (object) or Name (object) (Instance) |
{- "instance": {
- "id": "4830bfbe-0362-4ebb-a8ba-f36be4b4bc6a"
}, - "name": "snapshot name"
}{- "id": "9ec75090-2872-4f51-8111-53d05d96d2c6"
}Deletes an snapshot with the id provided in the current tenant which is logged in.
| id required | string <uuid> (Id) |
{- "slug": "string",
- "message": "string",
- "details": { }
}Get an snapshot details for the current tenant which is logged in.
You can use the snapshots list command to retrieve all snapshots, so you can get the id of the snapshot that you want to get details.
You can use the expand argument to get more details from the inner objects ...
| id required | string (Id) |
| expand | Array of strings (Expand) Default: "" You can get more detailed info about: ['image', 'machine-type'] |
{- "created_at": "2022-06-10T18:33:12Z",
- "id": "4830bfbe-0362-4ebb-a8ba-f36be4b4bc6a",
- "instance": {
- "id": "4830bfbe-0362-4ebb-a8ba-f36be4b4bc6a",
- "image": {
- "id": "4830bfbe-0362-4ebb-a8ba-f36be4b4bc6a"
}, - "machine_type": {
- "id": "4830bfbe-0362-4ebb-a8ba-f36be4b4bc6a"
}
}, - "name": "snapshot name",
- "size": 1000,
- "state": "available",
- "status": "completed",
- "updated_at": "2022-06-11T18:33:12Z"
}Restore a snapshot of an instance with the current tenant which is logged in.
| id required | string (Id) |
| name required | string (Name) [ 1 .. 255 ] characters |
required | ID (object) or Name (object) (Machine Type) |
| ssh_key_name required | string (Ssh Key Name) >= 0 characters |
Availability Zone (string) or Availability Zone (null) (Availability Zone) | |
InstanceCreateRequestV1NetworkDefault (object) or null Default: {"vpc":{"name":"default"},"associate_public_ip":true} | |
User Data (string) or User Data (null) (User Data) |
{- "availability_zone": "br-regiao-1a",
- "machine_type": {
- "id": "4830bfbe-0362-4ebb-a8ba-f36be4b4bc6a"
}, - "name": "instance name",
- "network": {
- "associate_public_ip": true,
- "interface": {
- "security_groups": [
- {
- "id": "f273fbde-2ddf-4dcd-8c41-342671ac0d17"
}, - {
- "id": "02a2acf3-d6db-4424-ac97-0254cb9c329e"
}
]
}, - "vpc": {
- "id": "2ae0b896-855c-456c-b4a5-c8f4e6d2f4f6"
}
}, - "ssh_key_name": "keypair_name_here",
- "user_data": "some_base64_script"
}{- "id": "9ec75090-2872-4f51-8111-53d05d96d2c6"
}Renames a Snapshot with the id provided in the current tenant which is logged in.
| id required | string (Id) |
| name required | string (Name) [ 1 .. 255 ] characters |
{- "name": "new snapshot name"
}{- "slug": "string",
- "message": "string",
- "details": { }
}List Virtual Machine backups in the current tenant which is logged in.
| _limit | integer ( Limit) <= 2147483647 Default: 50 limit the number of the results |
| _offset | integer ( Offset) [ 0 .. 2147483647 ] Default: 0 pagination for the results limited |
| _sort | string ( Sort) ^(^[\w-]+:(asc|desc)(,[\w-]+:(asc|desc))*)?$ Default: "created_at:asc" order of the results using informed fields |
| expand | Array of strings (Expand) Default: "" You can get more detailed info about: ['instance'] |
{- "backups": [
- {
- "backup_type": "daily",
- "created_at": "2022-06-10T18:33:12Z",
- "id": "2ae0b896-855c-456c-b4a5-c8f4e6d2f4f6",
- "instance": {
- "id": "4830bfbe-0362-4ebb-a8ba-f36be4b4bc6a"
}, - "min_disk": 10,
- "name": "backup name ffff",
- "size": 1000,
- "state": "available",
- "status": "completed",
- "updated_at": "2022-06-11T18:33:12Z"
}
]
}Create a backup of a Virtual Machine with the current tenant which is logged in.
A Backup is ready for restore when it's in completed status.
| name required | string (Name) [ 1 .. 255 ] characters |
required | ID (object) or Name (object) (Instance) |
{- "instance": {
- "id": "4830bfbe-0362-4ebb-a8ba-f36be4b4bc6a"
}, - "name": "backup name"
}{- "id": "9ec75090-2872-4f51-8111-53d05d96d2c6"
}Get a backup details for the current tenant which is logged in.
You can use the backup list command to retrieve all backups, so you can get the id of the backup that you want to get details.
You can use the expand argument to get more details from the object like instance.
| id required | string (Id) |
| expand | Array of strings (Expand) Default: "" You can get more detailed info about: ['instance'] |
{- "backup_type": "daily",
- "created_at": "2022-06-10T18:33:12Z",
- "id": "2ae0b896-855c-456c-b4a5-c8f4e6d2f4f6",
- "instance": {
- "id": "4830bfbe-0362-4ebb-a8ba-f36be4b4bc6a"
}, - "min_disk": 10,
- "name": "backup name",
- "size": 1000,
- "state": "available",
- "status": "completed",
- "updated_at": "2022-06-11T18:33:12Z"
}Copy a backup region
| id required | string <uuid> (Id) |
| region required | string (Regions) Enum: "br-se1" "br-se-1" "br-ne-1" |
{- "region": "br-ne-1"
}{- "slug": "string",
- "message": "string",
- "details": { }
}Renames a backup with the id provided in the current tenant which is logged in.
| id required | string (Id) |
| name required | string (Name) [ 1 .. 255 ] characters |
{- "name": "new backup name"
}{- "slug": "string",
- "message": "string",
- "details": { }
}Restore a backup of a Virtual Machine with the current tenant which is logged in.
A Backup is ready for restore when it's in completed status.
| id required | string <uuid> (Id) |
| name required | string (Name) [ 1 .. 255 ] characters |
required | ID (object) or Name (object) (Machine Type) |
| ssh_key_name required | string (Ssh Key Name) |
Availability Zone (string) or Availability Zone (null) (Availability Zone) | |
required | object (InstanceCreateRequestV1NetworkDefault) |
User Data (string) or User Data (null) (User Data) |
{- "availability_zone": "br-regiao-1a",
- "machine_type": {
- "id": "4830bfbe-0362-4ebb-a8ba-f36be4b4bc6a"
}, - "name": "instance name",
- "network": {
- "associate_public_ip": true,
- "interface": {
- "security_groups": [
- {
- "id": "f273fbde-2ddf-4dcd-8c41-342671ac0d17"
}, - {
- "id": "02a2acf3-d6db-4424-ac97-0254cb9c329e"
}
]
}, - "vpc": {
- "id": "4830bfbe-0362-4ebb-a8ba-f36be4b4bc6a"
}
}, - "ssh_key_name": "keypair_name_here",
- "user_data": "some_base64_script"
}{- "id": "9ec75090-2872-4f51-8111-53d05d96d2c6"
}