Joyent CloudAPI v0.0.3 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
add_machine_tags(dc, login \\ "my", id, tags)
View Sourceadd_machine_tags(CloudAPI.Datacenter.t(), String.t(), String.t(), Map.t()) :: Tuple.t()
Set tags on the given instance. A pre-existing tag with the same name as one given will be overwritten.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- 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.
add_nic(dc, login \\ "my", machine_id, network_id)
View Sourceadd_nic(CloudAPI.Datacenter.t(), String.t(), String.t(), String.t()) :: Tuple.t()
Creates a new NIC on an instance belonging to a given account.
WARNING: this causes the instance to reboot while adding the NIC.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- 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.
change_user_password(dc, login \\ "my", id, password)
View Sourcechange_user_password( CloudAPI.Datacenter.t(), String.t(), String.t(), String.t() ) :: Tuple.t()
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
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- 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.
clone_image(dc, login \\ "my", id)
View Sourceclone_image(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
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
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the image id to clone.
create_fabric_network(dc, login \\ "my", vlan_id, network)
View Sourcecreate_fabric_network( CloudAPI.Datacenter.t(), String.t(), String.t(), CloudAPI.Network.t() ) :: Tuple.t()
Create a fabric Network on a VLAN.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- 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.
create_fabric_vlan(dc, login \\ "my", vlan)
View Sourcecreate_fabric_vlan(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
Creates a new VLAN on the fabric.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the VLAN id.
create_firewall_rule(dc, login \\ "my", fwrule)
View Sourcecreate_firewall_rule( CloudAPI.Datacenter.t(), 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
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- fwrule: %CloudAPI.FirewallRule{} with the details you want updated.
create_image_from_machine(dc, login \\ "my", create_image)
View Sourcecreate_image_from_machine( CloudAPI.Datacenter.t(), String.t(), CloudAPI.CloudAPI.CreateImageFromMachine.t() ) :: Tuple.t()
Creates an image from a virtual machine.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- create_image: %CloudAPI.CreateImageFromMachine{} with the details you want updated.
create_key(dc, login \\ "my", key)
View Sourcecreate_key(CloudAPI.Datacenter.t(), String.t(), CloudAPI.Key.t()) :: Tuple.t()
Uploads a new OpenSSH key to Triton for use in HTTP signing and SSH.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- account: %CloudAPI.Key{} with the details you want created.
create_machine(dc, login \\ "my", machine)
View Sourcecreate_machine(CloudAPI.Datacenter.t(), 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
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- machine: %CloudAPI.CreateMachine{} with the details you want updated.
create_machine_snapshot(dc, login \\ "my", id, name)
View Sourcecreate_machine_snapshot( CloudAPI.Datacenter.t(), String.t(), String.t(), String.t() ) :: Tuple.t()
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
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- 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(dc, login \\ "my", policy)
View Sourcecreate_policy(CloudAPI.Datacenter.t(), String.t(), CloudAPI.Policy.t()) :: Tuple.t()
Creates an account policy.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- policy: %CloudAPI.Policy{} with the details you want updated.
create_role(dc, login \\ "my", role)
View Sourcecreate_role(CloudAPI.Datacenter.t(), String.t(), CloudAPI.Role.t()) :: Tuple.t()
Create an account role.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- role: %CloudAPI.Role{} with the details you want updated.
create_user(dc, login \\ "my", user)
View Sourcecreate_user(CloudAPI.Datacenter.t(), String.t(), CloudAPI.Account.t()) :: Tuple.t()
Creates a new user under an account.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- user: %CloudAPI.Account{} with the details you want created.
create_user_key(dc, login \\ "my", user, key)
View Sourcecreate_user_key( CloudAPI.Datacenter.t(), String.t(), String.t(), CloudAPI.Key.t() ) :: Tuple.t()
Create a SSH Key for a user.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- 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(dc, login \\ "my", volume)
View Sourcecreate_volume(CloudAPI.Datacenter.t(), String.t(), CloudAPI.Volume.t()) :: Tuple.t()
Create a new volume for the account.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- volume: %CloudAPI.Volume{} with the details you want updated.
delete_all_machine_metadata(dc, login \\ "my", id)
View Sourcedelete_all_machine_metadata(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
Deletes all metadata keys from this instance.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the machine.
delete_all_machine_tags(dc, login \\ "my", id)
View Sourcedelete_all_machine_tags(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
Deletes all tags from an instance asynchronously.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the machine.
delete_fabric_network(dc, login \\ "my", vlan_id, id)
View Sourcedelete_fabric_network( CloudAPI.Datacenter.t(), String.t(), String.t(), String.t() ) :: Tuple.t()
Delete a fabric Network on a VLAN.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- 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_fabric_vlan(dc, login \\ "my", id)
View Sourcedelete_fabric_vlan(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
Delete a fabric VLAN.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the VLAN id.
delete_firewall_rule(dc, login \\ "my", id)
View Sourcedelete_firewall_rule(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
Removes the given firewall rule from all the required instances.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the Firewall Rule.
delete_image(dc, login \\ "my", id)
View Sourcedelete_image(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
Delete image by id.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String represents the image id.
delete_key(dc, login \\ "my", name_or_fingerprint)
View Sourcedelete_key(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
Deletes a single SSH key, by name or fingerprint.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- 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_machine(dc, login \\ "my", id)
View Sourcedelete_machine(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
Delete a machine.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the machine to be deleted.
delete_machine_metadata(dc, login \\ "my", id, key)
View Sourcedelete_machine_metadata( CloudAPI.Datacenter.t(), String.t(), String.t(), String.t() ) :: Tuple.t()
Deletes a single metadata key from this instance.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- 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.
delete_machine_snapshot(dc, login \\ "my", id, name)
View Sourcedelete_machine_snapshot( CloudAPI.Datacenter.t(), String.t(), String.t(), String.t() ) :: Tuple.t()
Deletes the specified snapshot of an instance.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- 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.
delete_machine_tag(dc, login \\ "my", id, tag)
View Sourcedelete_machine_tag(CloudAPI.Datacenter.t(), String.t(), String.t(), String.t()) :: Tuple.t()
Deletes a single tag from this instance asynchronously.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- 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.
delete_policy(dc, login \\ "my", id)
View Sourcedelete_policy(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
Deletes an account policy.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the policy id.
delete_role(dc, login \\ "my", id)
View Sourcedelete_role(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
Delete an account role by name or id.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- role: %CloudAPI.Role{} with the details you want updated.
delete_user(dc, login \\ "my", id)
View Sourcedelete_user(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
Remove a user. They will no longer be able to use this API.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: UUID that represents the ID of the User.
delete_user_key(dc, login \\ "my", user, name_or_fingerprint)
View Sourcedelete_user_key(CloudAPI.Datacenter.t(), String.t(), String.t(), String.t()) :: Tuple.t()
Delete a user's SSH Key by its name or fingerprint.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- 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.
delete_volume(dc, login \\ "my", id)
View Sourcedelete_volume(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
Deletes a volume for the account.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String represents the volume id.
disable_firewall_rule(dc, login \\ "my", id)
View Sourcedisable_firewall_rule(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
Disables the given firewall rule if it is enabled.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the Firewall Rule.
disable_machine_deletion_protection(dc, login \\ "my", id)
View Sourcedisable_machine_deletion_protection( CloudAPI.Datacenter.t(), String.t(), String.t() ) :: Tuple.t()
Disable Deletion Protection on an instance. An instance can be destroyed after it is disabled.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the machine.
disable_machine_firewall(dc, login \\ "my", id)
View Sourcedisable_machine_firewall(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
Disables the machine's firewall.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the machine.
enable_firewall_rule(dc, login \\ "my", id)
View Sourceenable_firewall_rule(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
Enables the given firewall rule if it is disabled.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the Firewall Rule.
enable_machine_deletion_protection(dc, login \\ "my", id)
View Sourceenable_machine_deletion_protection( CloudAPI.Datacenter.t(), String.t(), String.t() ) :: Tuple.t()
Enable Deletion Protection on an instance. An instance can no longer be destroyed until the protection is disabled.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the machine.
enable_machine_firewall(dc, login \\ "my", id)
View Sourceenable_machine_firewall(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
Enables the machine's firewall.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the machine.
export_image(dc, login \\ "my", id, manta_path)
View Sourceexport_image(CloudAPI.Datacenter.t(), String.t(), String.t(), String.t()) :: Tuple.t()
Exports an image to a Manta server.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- 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.
get_account(dc, login \\ "my")
View Sourceget_account(CloudAPI.Datacenter.t(), String.t()) :: Tuple.t()
Retrieves your account details.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
get_config(dc, login \\ "my")
View Sourceget_config(CloudAPI.Datacenter.t(), String.t()) :: Tuple.t()
Gets your configuration. Mostly docker related.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
get_fabric_network(dc, login \\ "my", vlan_id, id)
View Sourceget_fabric_network(CloudAPI.Datacenter.t(), String.t(), String.t(), String.t()) :: Tuple.t()
Gets a fabric Network on a VLAN.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- 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.
get_fabric_vlan(dc, login \\ "my", id)
View Sourceget_fabric_vlan(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
Gets a VLAN on the fabric by its id.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the VLAN id.
get_firewall_rule(dc, login \\ "my", id)
View Sourceget_firewall_rule(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
Retrieves an individual firewall rule.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the Firewall Rule id.
get_image(dc, login \\ "my", id)
View Sourceget_image(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
Get an image by its id.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String represents the image id.
get_key(dc, login \\ "my", name_or_fingerprint)
View Sourceget_key(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
Retrieves the record for an individual key.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- 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.
get_machine(dc, login \\ "my", id)
View Sourceget_machine(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
Gets the details for an individual instance.
Deleted instances are returned only if the instance history has not been purged from Triton.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the machine id.
get_machine_metadata(dc, login \\ "my", id, key)
View Sourceget_machine_metadata( CloudAPI.Datacenter.t(), String.t(), String.t(), String.t() ) :: Tuple.t()
Returns a single metadata entry associated with this instance.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- 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.
get_machine_snapshot(dc, login \\ "my", id, name)
View Sourceget_machine_snapshot( CloudAPI.Datacenter.t(), String.t(), String.t(), String.t() ) :: Tuple.t()
Gets the state of the named snapshot.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- 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.
get_machine_tag(dc, login \\ "my", id, tag)
View Sourceget_machine_tag(CloudAPI.Datacenter.t(), String.t(), String.t(), String.t()) :: Tuple.t()
Returns the value for a single tag on this instance.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- 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_migration(dc, login \\ "my", id)
View Sourceget_migration(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
Get a migration status.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the migration.
get_network(dc, login \\ "my", id)
View Sourceget_network(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
Retrieves information about an individual network.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- 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
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the Network id.
- ip: String that represents the IP.
get_nic(dc, login \\ "my", machine_id, mac)
View Sourceget_nic(CloudAPI.Datacenter.t(), String.t(), String.t(), String.t()) :: Tuple.t()
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
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- 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.
get_package(dc, login \\ "my", id)
View Sourceget_package(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
Gets a package by id or name.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the package's id or name.
get_policy(dc, login \\ "my", id)
View Sourceget_policy(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
Get an account policy by its id.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the policy id.
get_role(dc, login \\ "my", id)
View Sourceget_role(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
Get an account role by id or name.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String represents the role id or name.
get_user(dc, login \\ "my", id)
View Sourceget_user(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
Get one user for an account.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: UUID that represents the ID of the User.
get_user_key(dc, login \\ "my", user, name_or_fingerprint)
View Sourceget_user_key(CloudAPI.Datacenter.t(), String.t(), String.t(), String.t()) :: Tuple.t()
Get a user's SSH Key by its name or fingerprint.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- 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.
get_volume(dc, login \\ "my", id)
View Sourceget_volume(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
Retrieves information about a single volume.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String represents the volume id.
import_image_from_datacenter(dc, login \\ "my", datacenter, id)
View Sourceimport_image_from_datacenter( CloudAPI.Datacenter.t(), String.t(), String.t(), String.t() ) :: Tuple.t()
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
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- 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.
list_datacenters(dc)
View Sourcelist_datacenters(CloudAPI.Datacenter.t()) :: Map.t()
Lists all available Datacenters and their endpoints.
list_fabric_networks(dc, login \\ "my", vlan_id)
View Sourcelist_fabric_networks(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
Lists all of the networks in a fabric on the VLAN specified by VLAN ID.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the VLAN id.
list_fabric_vlans(dc, login \\ "my")
View Sourcelist_fabric_vlans(CloudAPI.Datacenter.t(), String.t()) :: Tuple.t()
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
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
list_firewall_rules(dc, login \\ "my")
View Sourcelist_firewall_rules(CloudAPI.Datacenter.t(), String.t()) :: Tuple.t()
List all firewall rules for the current account.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
list_firewall_rules_machines(dc, login \\ "my", rule_id)
View Sourcelist_firewall_rules_machines(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
Lists all instances a firewall rule is applied to, in the same format as list_machines
.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- rule_id: String that represents the Firewall Rule id.
list_images(dc, login \\ "my")
View Sourcelist_images(CloudAPI.Datacenter.t(), String.t()) :: Tuple.t()
Lists all available images.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
list_keys(dc, login \\ "my")
View Sourcelist_keys(CloudAPI.Datacenter.t(), String.t()) :: Tuple.t()
Lists all public keys we have on record for the specified account.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
list_machine_firewall_rules(dc, login \\ "my", machine_id)
View Sourcelist_machine_firewall_rules(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
This has exactly the same input and output format as list_firewall_rules
, but just for the rules affecting the given machine.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- machine_id: String that represents the machine id.
list_machine_metadata(dc, login \\ "my", id, credentials \\ false)
View Sourcelist_machine_metadata( CloudAPI.Datacenter.t(), String.t(), String.t(), Boolean.t() ) :: Tuple.t()
Returns the complete set of metadata associated with this instance.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- 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.
list_machine_snapshots(dc, login \\ "my", id)
View Sourcelist_machine_snapshots(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
Lists all snapshots taken for a given instance.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the machine.
list_machine_tags(dc, login \\ "my", id)
View Sourcelist_machine_tags(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
Returns the complete set of tags associated with this instance.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the machine.
list_machines(dc, login \\ "my")
View Sourcelist_machines(CloudAPI.Datacenter.t(), String.t()) :: Tuple.t()
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
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
list_migrations(dc, login \\ "my")
View Sourcelist_migrations(CloudAPI.Datacenter.t(), String.t()) :: Tuple.t()
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
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
list_network_ips(dc, login \\ "my", id)
View Sourcelist_network_ips(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
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
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the Network id.
list_networks(dc, login \\ "my")
View Sourcelist_networks(CloudAPI.Datacenter.t(), String.t()) :: Tuple.t()
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
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
list_nics(dc, login \\ "my", machine_id)
View Sourcelist_nics(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
List all the NICs on an instance belonging to a given account.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- machine_id: String that represents the machine id.
list_packages(dc, login \\ "my")
View Sourcelist_packages(CloudAPI.Datacenter.t(), String.t()) :: Tuple.t()
Provides a list of packages available in this datacenter.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
list_policies(dc, login \\ "my")
View Sourcelist_policies(CloudAPI.Datacenter.t(), String.t()) :: Tuple.t()
Lists all account policies.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
list_roles(dc, login \\ "my")
View Sourcelist_roles(CloudAPI.Datacenter.t(), String.t()) :: Tuple.t()
Returns an array of account roles.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
list_services(dc)
View Sourcelist_services(CloudAPI.Datacenter.t()) :: Tuple.t()
Lists all available services like Manta.
Lists all SSH keys for a user.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- user: String that represents the users id or name.
list_users(dc, login \\ "my")
View Sourcelist_users(CloudAPI.Datacenter.t(), String.t()) :: Tuple.t()
Returns a list of an account's user objects.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
list_volumes(dc, login \\ "my")
View Sourcelist_volumes(CloudAPI.Datacenter.t(), String.t()) :: Tuple.t()
Returns a list of all volumes for the account.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
machine_audit(dc, login \\ "my", id)
View Sourcemachine_audit(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
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
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the machine.
migrate(dc, login \\ "my", id, action, affinity \\ [])
View Sourcemigrate(CloudAPI.Datacenter.t(), String.t(), String.t(), String.t(), Array.t()) :: Tuple.t()
Migrates a Machine to another server.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- 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_machine(dc, login \\ "my", id)
View Sourcereboot_machine(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
Reboot a machine.
You can poll with get_machine
for the current state.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the machine.
remove_nic(dc, login \\ "my", machine_id, mac)
View Sourceremove_nic(CloudAPI.Datacenter.t(), String.t(), String.t(), String.t()) :: Tuple.t()
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
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- 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_machine(dc, login \\ "my", id, name)
View Sourcerename_machine(CloudAPI.Datacenter.t(), String.t(), String.t(), String.t()) :: Tuple.t()
Rename an instance.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- 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.
replace_machine_tags(dc, login \\ "my", id, tags)
View Sourcereplace_machine_tags(CloudAPI.Datacenter.t(), String.t(), String.t(), Map.t()) :: Tuple.t()
Fully replace all tags on an instance with the given tags.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- 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.
resize_machine(dc, login \\ "my", id, package_id)
View Sourceresize_machine(CloudAPI.Datacenter.t(), String.t(), String.t(), String.t()) :: Tuple.t()
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
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- 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_machine(dc, login \\ "my", id)
View Sourcestart_machine(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
Start a machine.
You can poll with get_machine
for the current state.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the machine.
start_machine_from_snapshot(dc, login \\ "my", id, name)
View Sourcestart_machine_from_snapshot( CloudAPI.Datacenter.t(), String.t(), String.t(), String.t() ) :: Tuple.t()
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
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- 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_machine(dc, login \\ "my", id)
View Sourcestop_machine(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
Stop a machine.
You can poll with get_machine
for the current state.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- id: String that represents the id of the machine.
update_account(dc, login \\ "my", account)
View Sourceupdate_account(CloudAPI.Datacenter.t(), String.t(), CloudAPI.Account.t()) :: Tuple.t()
update_account(CloudAPI.Datacenter.t(), String.t(), String.t()) :: Tuple.t()
Updates your account details.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- account: %CloudAPI.Account{} with the details you want updated.
update_config(dc, login \\ "my", config)
View Sourceupdate_config(CloudAPI.Datacenter.t(), String.t(), CloudAPI.Config.t()) :: Tuple.t()
Updates your account configuration.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- config: %CloudAPI.Config{} with the details you want updated.
update_fabric_network(dc, login \\ "my", vlan_id, network)
View Sourceupdate_fabric_network( CloudAPI.Datacenter.t(), String.t(), String.t(), CloudAPI.Network.t() ) :: Tuple.t()
Update a fabric Network on a VLAN.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- 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(dc, login \\ "my", vlan)
View Sourceupdate_fabric_vlan(CloudAPI.Datacenter.t(), String.t(), CloudAPI.VLAN.t()) :: Tuple.t()
Updates a fabric VLAN.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- vlan: %CloudAPI.VLAN{} with the details you want updated.
update_firewall_rule(dc, login \\ "my", fwrule)
View Sourceupdate_firewall_rule( CloudAPI.Datacenter.t(), 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
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- fwrule: %CloudAPI.FirewallRule{} with the details you want updated.
update_image(dc, login \\ "my", image)
View Sourceupdate_image(CloudAPI.Datacenter.t(), String.t(), CloudAPI.Image.t()) :: Tuple.t()
Updates an image.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- image: %CloudAPI.Image{} with the details you want updated.
update_machine_metadata(dc, login \\ "my", id, metadata)
View Sourceupdate_machine_metadata( CloudAPI.Datacenter.t(), String.t(), String.t(), Map.t() ) :: Tuple.t()
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
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- 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(dc, login \\ "my", policy)
View Sourceupdate_policy(CloudAPI.Datacenter.t(), String.t(), CloudAPI.Policy.t()) :: Tuple.t()
Updates an account policy.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- policy: %CloudAPI.Policy{} with the details you want updated.
update_role(dc, login \\ "my", role)
View Sourceupdate_role(CloudAPI.Datacenter.t(), String.t(), CloudAPI.Role.t()) :: Tuple.t()
Updates an account role.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- role: %CloudAPI.Role{} with the details you want updated.
update_user(dc, login \\ "my", user)
View Sourceupdate_user(CloudAPI.Datacenter.t(), 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
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- user: %CloudAPI.Account{} with the details you want created.
update_volume(dc, login \\ "my", volume)
View Sourceupdate_volume(CloudAPI.Datacenter.t(), String.t(), CloudAPI.Volume.t()) :: Tuple.t()
Update a volume for the account.
Parameters
- dc: %CloudAPI.Datacenter{} with the details for how to connect to this datacenter.
- login: String that represents the Cloud Portal Login. Defaults to "my".
- volume: %CloudAPI.Volume{} with the details you want updated.