Joyent CloudAPI v0.0.2 CloudAPI View Source
This module is responsible for tying all CloudAPI related functionality together into one context.
Link to this section Summary
Functions
Set tags on the given instance. A pre-existing tag with the same name as one given will be overwritten.
Creates a new NIC on an instance belonging to a given account.
This is a separate rule for password changes, so different policies can be used for an user trying to modify other data, or only their own password.
Creates an independent copy of the source image. The login account must be on the source image ACL to be able to make an image clone.
Create a fabric Network on a VLAN.
Creates a new VLAN on the fabric.
Adds a new firewall rule for the specified account. This rule will be added to all the account's instances where it may be necessary.
Creates an image from a virtual machine.
Uploads a new OpenSSH key to Triton for use in HTTP signing and SSH.
Allows you to provision an instance.
Allows you to take a snapshot of an instance. Once you have one or more snapshots, you can boot the instance from a previous snapshot.
Creates an account policy.
Create an account role.
Creates a new user under an account.
Create a SSH Key for a user.
Create a new volume for the account.
Deletes all metadata keys from this instance.
Deletes all tags from an instance asynchronously.
Delete a fabric Network on a VLAN.
Delete a fabric VLAN.
Removes the given firewall rule from all the required instances.
Delete image by id.
Deletes a single SSH key, by name or fingerprint.
Delete a machine.
Deletes a single metadata key from this instance.
Deletes the specified snapshot of an instance.
Deletes a single tag from this instance asynchronously.
Deletes an account policy.
Delete an account role by name or id.
Remove a user. They will no longer be able to use this API.
Delete a user's SSH Key by its name or fingerprint.
Deletes a volume for the account.
Disables the given firewall rule if it is enabled.
Disable Deletion Protection on an instance. An instance can be destroyed after it is disabled.
Disables the machine's firewall.
Enables the given firewall rule if it is disabled.
Enable Deletion Protection on an instance. An instance can no longer be destroyed until the protection is disabled.
Enables the machine's firewall.
Exports an image to a Manta server.
Retrieves your account details.
Gets your configuration. Mostly docker related.
Gets a fabric Network on a VLAN.
Gets a VLAN on the fabric by its id.
Retrieves an individual firewall rule.
Get an image by its id.
Retrieves the record for an individual key.
Gets the details for an individual instance.
Returns a single metadata entry associated with this instance.
Gets the state of the named snapshot.
Returns the value for a single tag on this instance.
Get a migration status.
Retrieves information about an individual network.
Get a network's IP. On a public network you can only get an IP owned by you. On private network you can get an IP owned by any of the network's shared owners, however the belongs_to_uuid field will be omitted if you do not own the instance the IP is assocaited with.
Gets a specific NIC on an instance belonging to a given account.
Gets a package by id or name.
Get an account policy by its id.
Get an account role by id or name.
Get one user for an account.
Get a user's SSH Key by its name or fingerprint.
Retrieves information about a single volume.
This will copy the image with the given id from the source datacenter into this datacenter. The copied image will retain all fields as the original image. All incremental images in the origin chain will also be copied.
Lists all available Datacenters and their endpoints.
Lists all of the networks in a fabric on the VLAN specified by VLAN ID.
CloudAPI provides a way to create and manipulate a fabric. On the fabric you can create VLANs, and then under that create layer three networks.
List all firewall rules for the current account.
Lists all instances a firewall rule is applied to, in the same format as list_machines
.
Lists all available images.
Lists all public keys we have on record for the specified account.
This has exactly the same input and output format as list_firewall_rules
, but just for the rules affecting the given machine.
Returns the complete set of metadata associated with this instance.
Lists all snapshots taken for a given instance.
Returns the complete set of tags associated with this instance.
Lists all instances we have on record for your account. If you have a large number of instances, you can filter using the input parameters listed below. Note that deleted instances are returned only if the instance history has not been purged from Triton.
Triton supports incremental offline migrations starting with CloudAPI version 9.6.0.
List a network's IPs. On a public network only IPs owned by the user will be returned. On a private network all IPs that are either reserved or allocated will be returned.
List all the networks which can be used by the given account. If a network was created on a fabric, then additional information will be shown
List all the NICs on an instance belonging to a given account.
Provides a list of packages available in this datacenter.
Lists all account policies.
Returns an array of account roles.
Lists all available services like Manta.
Lists all SSH keys for a user.
Returns a list of an account's user objects.
Returns a list of all volumes for the account.
Provides a list of an instance's accomplished actions. Results are sorted from newest to oldest action.
Migrates a Machine to another server.
Reboot a machine.
Removes a NIC on an instance belonging to a given account.
Rename an instance.
Fully replace all tags on an instance with the given tags.
Resizing is only supported for containers (instances which are not hardware virtual machines -- they have brand=kvm or brand=bhyve). Hardware virtual machines cannot be resized.
Start a machine.
If an instance is in the 'stopped' state, you can choose to start the instance from the referenced snapshot. This is effectively a means to roll back instance state.
Stop a machine.
Updates your account details.
Updates your account configuration.
Update a fabric Network on a VLAN.
Updates a fabric VLAN.
Updates the given rule record and -- depending on rule contents -- adds/removes/updates the rule on all the required instances.
Updates an image.
Allows you to update the metadata for a given instance. Note that updating the metadata via CloudAPI will result in the metadata being updated in the running instance.
Updates an account policy.
Updates an account role.
Update a user's modifiable properties.
Update a volume for the account.
Link to this section Functions
Set tags on the given instance. A pre-existing tag with the same name as one given will be overwritten.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the machine.
- tags: Map of Key-Value assignment of tags.
Creates a new NIC on an instance belonging to a given account.
WARNING: this causes the instance to reboot while adding the NIC.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- machine_id: String that represents the machine id.
- network_id: String that represents the network id.
This is a separate rule for password changes, so different policies can be used for an user trying to modify other data, or only their own password.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: UUID that represents the ID of the User.
- password: String that represents the new password.
Creates an independent copy of the source image. The login account must be on the source image ACL to be able to make an image clone.
The resulting cloned image will have the same properties as the source image, but the cloned image will have a different id, it will be owned by the login account and the image will have an empty ACL.
All incremental images in the image origin chain that are not operator images (i.e. are not owned by admin) will also be cloned, though all cloned incremental images will have state disabled so that they are not visible in the default image listings.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the image id to clone.
create_fabric_network(login \\ "my", vlan_id, network)
View Sourcecreate_fabric_network(String.t(), String.t(), CloudAPI.Network.t()) :: Tuple.t()
Create a fabric Network on a VLAN.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- vlan_id: String that represents the VLAN id.
- network: %CloudAPI.Network{} with the details you want updated.
Creates a new VLAN on the fabric.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the VLAN id.
create_firewall_rule(login \\ "my", fwrule)
View Sourcecreate_firewall_rule(String.t(), CloudAPI.FirewallRule.t()) :: Tuple.t()
Adds a new firewall rule for the specified account. This rule will be added to all the account's instances where it may be necessary.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- fwrule: %CloudAPI.FirewallRule{} with the details you want updated.
Creates an image from a virtual machine.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- create_image: %CloudAPI.CreateImageFromMachine{} with the details you want updated.
create_key(login \\ "my", key)
View Sourcecreate_key(String.t(), CloudAPI.Key.t()) :: Tuple.t()
Uploads a new OpenSSH key to Triton for use in HTTP signing and SSH.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- account: %CloudAPI.Key{} with the details you want created.
create_machine(login \\ "my", machine)
View Sourcecreate_machine(String.t(), CloudAPI.CreateMachine.t()) :: Tuple.t()
Allows you to provision an instance.
If you do not specify a name, CloudAPI will generate a random one for you. If you have enabled Triton CNS on your account, this name will also be used in DNS to refer to the new instance (and must therefore consist of DNS-safe characters only).
Your instance will initially be not available for login (Triton must provision and boot it); you can poll GetMachine for its status. When the state field is equal to running, you can log in. If the instance is a brand other than kvm or bhyve, you can usually use any of the SSH keys managed under the keys section of CloudAPI to login as any POSIX user on the OS. You can add/remove keys over time, and the instance will automatically work with that set.
If the the instance has a brand kvm or bhyve, and of a UNIX-derived OS (e.g. Linux), you must have keys uploaded before provisioning; that entire set of keys will be written out to /root/.ssh/authorized_keys in the new instance, and you can SSH in using one of those keys. Changing the keys over time under your account will not affect a running hardware virtual machine in any way; those keys are statically written at provisioning-time only, and you will need to manually manage them on the instance itself.
If the image you create an instance from is set to generate passwords for you, the username/password pairs will be returned in the metadata response as a nested object, like so:
"metadata": { "credentials": {
"root": "s8v9kuht5e",
"admin": "mf4bteqhpy"
} } You cannot overwrite the credentials key in CloudAPI.
More generally, the metadata keys can be set either at the time of instance creation, or after the fact. You must either pass in plain-string values, or a JSON-encoded string. On metadata retrieval, you will get a JSON object back.
Networks can be specified using the networks attribute. It is possible to have an instance attached to an internal network, external network or both. If the networks attribute is absent from the input, the instance will be attached to one externally-accessible network (i.e. assigned a public IP), and any one of internal/private networks. If the account owns or has access to multiple private networks, it will be important to include the desired network(s) in the request payload instead of letting the system assign the network automatically.
Be aware that CreateMachine does not return IP addresses or networks. To obtain the IP addresses and networks of a newly-provisioned instance, poll GetMachine until the instance state is running.
Typically, Triton will allocate the new instance somewhere reasonable within the cloud. See affinity rules below for options on controlling server placement of new instances.
When Triton CNS is enabled, the DNS search domain of the new VM will be automatically set to the suffix of the "instance" record that is created for that VM. For example, if the full CNS name of the new VM would be "foo.inst.35ad1ec4-2eab-11e6-ac02-8f56c66976a1.us-west-1.triton.zone", its automatic DNS search path would include "inst.35ad1ec4-2eab-11e6-ac02-8f56c66976a1.us-west-1.triton.zone". This can be changed later within the instance, if desired.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- machine: %CloudAPI.CreateMachine{} with the details you want updated.
Allows you to take a snapshot of an instance. Once you have one or more snapshots, you can boot the instance from a previous snapshot.
Snapshots are not usable with other instances; they are a point-in-time snapshot of the current instance. Snapshots can also only be taken of instances that are not of brand 'kvm' or 'bhyve'.
Since instance instances use a copy-on-write filesystem, snapshots take up increasing amounts of space as the filesystem changes over time. There is a limit to how much space snapshots are allowed to take. Plan your snapshots accordingly.
You can poll on get_machine_snapshot
until the state is created.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the machine.
- name: String that represents the name of the snapshot.
create_policy(login \\ "my", policy)
View Sourcecreate_policy(String.t(), CloudAPI.Policy.t()) :: Tuple.t()
Creates an account policy.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- policy: %CloudAPI.Policy{} with the details you want updated.
create_role(login \\ "my", role)
View Sourcecreate_role(String.t(), CloudAPI.Role.t()) :: Tuple.t()
Create an account role.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- role: %CloudAPI.Role{} with the details you want updated.
create_user(login \\ "my", user)
View Sourcecreate_user(String.t(), CloudAPI.Account.t()) :: Tuple.t()
Creates a new user under an account.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- user: %CloudAPI.Account{} with the details you want created.
create_user_key(login \\ "my", user, key)
View Sourcecreate_user_key(String.t(), String.t(), CloudAPI.Key.t()) :: Tuple.t()
Create a SSH Key for a user.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- user: String that represents the users id or name.
- key: %CloudAPI.Key{} with the details you want updated.
create_volume(login \\ "my", volume)
View Sourcecreate_volume(String.t(), CloudAPI.Volume.t()) :: Tuple.t()
Create a new volume for the account.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- volume: %CloudAPI.Volume{} with the details you want updated.
Deletes all metadata keys from this instance.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the machine.
Deletes all tags from an instance asynchronously.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the machine.
Delete a fabric Network on a VLAN.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- vlan_id: String that represents the VLAN id.
- id: String that represents the Network id.
Delete a fabric VLAN.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the VLAN id.
Removes the given firewall rule from all the required instances.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the Firewall Rule.
Delete image by id.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String represents the image id.
Deletes a single SSH key, by name or fingerprint.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- name_or_fingerprint: String that is either the Fingerprint of the SSH Key or it's name as it appears in the Cloud Portal.
Delete a machine.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the machine to be deleted.
Deletes a single metadata key from this instance.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the machine.
- key: String that represents the metadata key.
Deletes the specified snapshot of an instance.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the machine.
- name: String that represents the name of the snapshot.
Deletes a single tag from this instance asynchronously.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the machine.
- tag: String that represents the tag name.
Deletes an account policy.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the policy id.
Delete an account role by name or id.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- role: %CloudAPI.Role{} with the details you want updated.
Remove a user. They will no longer be able to use this API.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: UUID that represents the ID of the User.
Delete a user's SSH Key by its name or fingerprint.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- user: String that represents the users id or name.
- name_or_fingerprint: String that represents the SSH Key's name or fingerprint.
Deletes a volume for the account.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String represents the volume id.
Disables the given firewall rule if it is enabled.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the Firewall Rule.
Disable Deletion Protection on an instance. An instance can be destroyed after it is disabled.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the machine.
Disables the machine's firewall.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the machine.
Enables the given firewall rule if it is disabled.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the Firewall Rule.
Enable Deletion Protection on an instance. An instance can no longer be destroyed until the protection is disabled.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the machine.
Enables the machine's firewall.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the machine.
Exports an image to a Manta server.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String represents the image id.
- manta_path: String represents the Manta's URL.
Retrieves your account details.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
Gets your configuration. Mostly docker related.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
Gets a fabric Network on a VLAN.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- vlan_id: String that represents the VLAN id.
- id: String that represents the Network id.
Gets a VLAN on the fabric by its id.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the VLAN id.
Retrieves an individual firewall rule.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the Firewall Rule id.
Get an image by its id.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String represents the image id.
Retrieves the record for an individual key.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- name_or_fingerprint: String that is either the Fingerprint of the SSH Key or it's name as it appears in the Cloud Portal.
Gets the details for an individual instance.
Deleted instances are returned only if the instance history has not been purged from Triton.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the machine id.
Returns a single metadata entry associated with this instance.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the machine.
- key: String that represents the metadata key.
Gets the state of the named snapshot.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the machine.
- name: String that represents the name of the snapshot.
Returns the value for a single tag on this instance.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the machine.
- tag: String that represents the tag name.
Get a migration status.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the migration.
Retrieves information about an individual network.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the Network id.
Get a network's IP. On a public network you can only get an IP owned by you. On private network you can get an IP owned by any of the network's shared owners, however the belongs_to_uuid field will be omitted if you do not own the instance the IP is assocaited with.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the Network id.
- ip: String that represents the IP.
Gets a specific NIC on an instance belonging to a given account.
NB: the :mac element in the path must have all the colons (':') stripped from it in the request.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- machine_id: String that represents the machine id.
- mac: String that represents the NIC's MAC Address.
Gets a package by id or name.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the package's id or name.
Get an account policy by its id.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the policy id.
Get an account role by id or name.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String represents the role id or name.
Get one user for an account.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: UUID that represents the ID of the User.
Get a user's SSH Key by its name or fingerprint.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- user: String that represents the users id or name.
- name_or_fingerprint: String that represents the SSH Key's name or fingerprint.
Retrieves information about a single volume.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String represents the volume id.
This will copy the image with the given id from the source datacenter into this datacenter. The copied image will retain all fields as the original image. All incremental images in the origin chain will also be copied.
You can use the list_datacenters
Method to get all datacenters and their names.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- datacenter: String that represents the Datacenter.
- id: String that represents the image id to copy.
Lists all available Datacenters and their endpoints.
Lists all of the networks in a fabric on the VLAN specified by VLAN ID.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the VLAN id.
CloudAPI provides a way to create and manipulate a fabric. On the fabric you can create VLANs, and then under that create layer three networks.
A fabric is the basis for building your own private networks that cannot be accessed by any other user. It represents the physical infrastructure that makes up a network; however, you don't have to cable or program it. Every account has its own unique fabric in every datacenter.
On a fabric, you can create your own VLANs and layer-three IPv4 networks. You can create any VLAN from 0-4095, and you can create any number of IPv4 networks on top of the VLANs, with all of the traditional IPv4 private addresses spaces -- 10.0.0.0/8, 192.168.0.0/16, and 172.16.0.0/12 -- available for use.
You can create networks on your fabrics to create most network topologies. For example, you could create a single isolated private network that nothing else could reach, or you could create a traditional configuration where you have a database network, a web network, and a load balancer network, each on their own VLAN.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
List all firewall rules for the current account.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
Lists all instances a firewall rule is applied to, in the same format as list_machines
.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- rule_id: String that represents the Firewall Rule id.
Lists all available images.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
Lists all public keys we have on record for the specified account.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
This has exactly the same input and output format as list_firewall_rules
, but just for the rules affecting the given machine.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- machine_id: String that represents the machine id.
Returns the complete set of metadata associated with this instance.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the machine.
- credentials: Boolean that represents if the API should return credentials stored in metadata.
Lists all snapshots taken for a given instance.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the machine.
Returns the complete set of tags associated with this instance.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the machine.
Lists all instances we have on record for your account. If you have a large number of instances, you can filter using the input parameters listed below. Note that deleted instances are returned only if the instance history has not been purged from Triton.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
Triton supports incremental offline migrations starting with CloudAPI version 9.6.0.
It is possible to migrate (move a VM) to another CN using these APIs. See RFD 34 for the background on how and why instance migration works the way it does.
VM migration operates in three distinct phases, the begin phase creates a hidden target placeholder vm for which to migrate into, the sync phase will synchronize the underlying filesystems and the switch phase will shutdown the original source vm, perform a final filesystem synchronization, hide the original source VM and then enable and restart the target VM.
A migration can be set to run all of these phases in one (automatic migration) or these phases can each be run manually (on demand migration).
For any migration action (e.g. begin, sync, switch or abort) you can use the migration watch endpoint to show progress information for the running migration action.
Once the migration switch is complete, if you are happy with the new migrated instance then you should run the finalize action to remove the original source instance. Note that once the finalize action completes successfully, the migration will no longer show up in the migration list.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
List a network's IPs. On a public network only IPs owned by the user will be returned. On a private network all IPs that are either reserved or allocated will be returned.
Note that not every network from ListNetworks will work. Some UUIDs are for pools which are not supported at this time. However, every network UUID from get_machine
and get_nic
will work, as they are UUIDs for a specific network.
The reserved field determines if the IP can be used automatically when provisioning a new instance. If reserved is set to true, then the IP will not be given out.
The managed field in the IP object tells you if the IP is manged by Triton itself. An example of this is the gateway and broadcast IPs on a network.
If the IP is associated with an instance then owner_uuid will be shown as well, so that on shared private networks it is clear who is using the IP. The belongs_to_uuid field will tell you which instance owns the IP if any, and will only be present if that instance is owned by you.
You can paginate this API by passing in offset and limit. HTTP responses will contain the additional headers x-resource-count and x-query-limit. If x-resource-count is less than x-query-limit, you're done, otherwise call the API again with offset set to offset + limit to fetch additional instances.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the Network id.
List all the networks which can be used by the given account. If a network was created on a fabric, then additional information will be shown:
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
List all the NICs on an instance belonging to a given account.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- machine_id: String that represents the machine id.
Provides a list of packages available in this datacenter.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
Lists all account policies.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
Returns an array of account roles.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
Lists all available services like Manta.
Lists all SSH keys for a user.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- user: String that represents the users id or name.
Returns a list of an account's user objects.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
Returns a list of all volumes for the account.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
Provides a list of an instance's accomplished actions. Results are sorted from newest to oldest action.
Note that the complete audit trail is returned only if the instance history and job records have not been purged from Triton.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the machine.
Migrates a Machine to another server.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the migration.
- action: String that represents the action to take, usually begin or watch.
- affinity: Array that represents the affinity rules. Only applies when actions are begin or automatic.
Reboot a machine.
You can poll with `get_machine' for the current state. ## Parameters - login: String that represents the Cloud Portal Login. Defaults to "my". - id: String that represents the id of the machine.
Removes a NIC on an instance belonging to a given account.
Like AddNic above, the NIC won't be removed from the instance immediately. After the NIC is removed, it will start returning 404 through CloudAPI.
WARNING: this causes the instance to reboot while removing the NIC.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- machine_id: String that represents the machine id.
- mac: String that represents the NIC's MAC Address.
Rename an instance.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the machine.
- name: String that represents the new name of the machine.
Fully replace all tags on an instance with the given tags.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the machine.
- tags: Map of Key-Value assignment of tags.
Resizing is only supported for containers (instances which are not hardware virtual machines -- they have brand=kvm or brand=bhyve). Hardware virtual machines cannot be resized.
Resizing is not guaranteed to work, especially when resizing upwards in resources. It is best-effort, and may fail. Resizing downwards will usually succeed.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the machine.
- package_id: String that represents the id of the target package.
Start a machine.
You can poll with `get_machine' for the current state. ## Parameters - login: String that represents the Cloud Portal Login. Defaults to "my". - id: String that represents the id of the machine.
If an instance is in the 'stopped' state, you can choose to start the instance from the referenced snapshot. This is effectively a means to roll back instance state.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the machine.
- name: String that represents the name of the snapshot.
Stop a machine.
You can poll with `get_machine' for the current state. ## Parameters - login: String that represents the Cloud Portal Login. Defaults to "my". - id: String that represents the id of the machine.
Updates your account details.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- account: %CloudAPI.Account{} with the details you want updated.
update_config(login \\ "my", config)
View Sourceupdate_config(String.t(), CloudAPI.Config.t()) :: Tuple.t()
Updates your account configuration.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- config: %CloudAPI.Config{} with the details you want updated.
update_fabric_network(login \\ "my", vlan_id, network)
View Sourceupdate_fabric_network(String.t(), String.t(), CloudAPI.Network.t()) :: Tuple.t()
Update a fabric Network on a VLAN.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- vlan_id: String that represents the VLAN id.
- network: %CloudAPI.Network{} with the details you want updated.
update_fabric_vlan(login \\ "my", vlan)
View Sourceupdate_fabric_vlan(String.t(), CloudAPI.VLAN.t()) :: Tuple.t()
Updates a fabric VLAN.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- vlan: %CloudAPI.VLAN{} with the details you want updated.
update_firewall_rule(login \\ "my", fwrule)
View Sourceupdate_firewall_rule(String.t(), CloudAPI.FirewallRule.t()) :: Tuple.t()
Updates the given rule record and -- depending on rule contents -- adds/removes/updates the rule on all the required instances.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- fwrule: %CloudAPI.FirewallRule{} with the details you want updated.
update_image(login \\ "my", image)
View Sourceupdate_image(String.t(), CloudAPI.Image.t()) :: Tuple.t()
Updates an image.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- image: %CloudAPI.Image{} with the details you want updated.
Allows you to update the metadata for a given instance. Note that updating the metadata via CloudAPI will result in the metadata being updated in the running instance.
The semantics of this call are subtly different that the AddMachineTags call -- any metadata keys passed in here are created if they do not exist, and overwritten if they do.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the machine.
- metadata: Map of Key-Value to store as metadata.
update_policy(login \\ "my", policy)
View Sourceupdate_policy(String.t(), CloudAPI.Policy.t()) :: Tuple.t()
Updates an account policy.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- policy: %CloudAPI.Policy{} with the details you want updated.
update_role(login \\ "my", role)
View Sourceupdate_role(String.t(), CloudAPI.Role.t()) :: Tuple.t()
Updates an account role.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- role: %CloudAPI.Role{} with the details you want updated.
update_user(login \\ "my", user)
View Sourceupdate_user(String.t(), CloudAPI.Account.t()) :: Tuple.t()
Update a user's modifiable properties.
Note: Password changes are not allowed using this endpoint; there is an additional change_user_password
Method for password changes so it can be selectively allowed/disallowed for users using policies.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- user: %CloudAPI.Account{} with the details you want created.
update_volume(login \\ "my", volume)
View Sourceupdate_volume(String.t(), CloudAPI.Volume.t()) :: Tuple.t()
Update a volume for the account.
Parameters
- login: String that represents the Cloud Portal Login. Defaults to "my".
- volume: %CloudAPI.Volume{} with the details you want updated.