OBJECT

Mutation

link GraphQL Schema definition

  • type Mutation {
  • # Update your account details
  • #
  • # Arguments
  • # email: Email address
  • # companyName:
  • # firstName:
  • # lastName:
  • # address:
  • # postalCode:
  • # city:
  • # state:
  • # country:
  • # phone:
  • # triton_cns_enabled: Enable or disable the Triton CNS
  • updateAccount(
  • email: String,
  • companyName: String,
  • firstName: String,
  • lastName: String,
  • address: String,
  • postalCode: String,
  • city: String,
  • state: String,
  • country: String,
  • phone: String,
  • triton_cns_enabled: Boolean
  • ): User
  • # Uploads a new OpenSSH key to Triton for use in HTTP signing and SSH.
  • #
  • # Arguments
  • # user: User id. Use this for sub-user keys
  • # name: Name for this key
  • # key: OpenSSH formatted public key
  • createKey(user: ID, name: String, key: String!): Key
  • # Deletes a single SSH key, by name or fingerprint
  • #
  • # Arguments
  • # user: User id. Use this for sub-user keys
  • # name: Name for this key
  • # fingerprint: OpenSSH formatted public key
  • deleteKey(user: ID, name: String, fingerprint: String): Key
  • # Creates a new user under an account
  • #
  • # Arguments
  • # email: Email address
  • # login: Username
  • # password: Password
  • # companyName:
  • # firstName:
  • # lastName:
  • # address:
  • # postalCode:
  • # city:
  • # state:
  • # country:
  • # phone:
  • createUser(
  • email: String,
  • login: String,
  • password: String,
  • companyName: String,
  • firstName: String,
  • lastName: String,
  • address: String,
  • postalCode: String,
  • city: String,
  • state: String,
  • country: String,
  • phone: String
  • ): User
  • # Update a user's modifiable properties
  • #
  • # Arguments
  • # id:
  • # login:
  • # email:
  • # companyName:
  • # firstName:
  • # lastName:
  • # address:
  • # postalCode:
  • # city:
  • # state:
  • # country:
  • # phone:
  • updateUser(
  • id: ID!,
  • login: String,
  • email: String,
  • companyName: String,
  • firstName: String,
  • lastName: String,
  • address: String,
  • postalCode: String,
  • city: String,
  • state: String,
  • country: String,
  • phone: String
  • ): User
  • # 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
  • #
  • # Arguments
  • # id:
  • # password:
  • # password_confirmation:
  • changeUserPassword(
  • id: ID!,
  • password: String,
  • password_confirmation: String
  • ): User
  • # Remove a user
  • #
  • # Arguments
  • # id:
  • deleteUser(id: ID!): User
  • # Create a new role for your account
  • #
  • # Arguments
  • # name: The role's name
  • # policies: This account's policies to be given to this role
  • # members: This account's user logins to be added to this role
  • # default_members: This account's user logins to be added to this
  • # role and have it enabled by default
  • createRole(
  • name: String,
  • policies: [ID],
  • members: [ID],
  • default_members: [ID]
  • ): Role
  • # Modifies an account role. Anything but id can be modified
  • #
  • # Arguments
  • # id: Role id
  • # name: The role's name
  • # policies: This account's policies to be given to this role
  • # members: This account's user logins to be added to this role
  • # default_members: This account's user logins to be added to this
  • # role and have it enabled by default
  • updateRole(
  • id: ID!,
  • name: String,
  • policies: [ID],
  • members: [ID],
  • default_members: [ID]
  • ): Role
  • # Remove a role
  • #
  • # Arguments
  • # id: Role id
  • deleteRole(id: ID!): Role
  • # Creates a new account policy
  • #
  • # Arguments
  • # name: The policy name
  • # rules: One or more Aperture sentences to be added to the
  • # current policy
  • # description: A description for this policy
  • createPolicy(name: String, rules: [String]!, description: String): Policy
  • # Upgrades an existing account policy. Everything but id can be modified.
  • #
  • # Arguments
  • # id: Policy id
  • # name: The policy name
  • # rules: One or more Aperture sentences to be added to the
  • # current policy
  • # description: A description for this policy
  • updatePolicy(id: ID!, name: String, rules: [String], description: String): Policy
  • # Delete an RBAC policy
  • #
  • # Arguments
  • # id: Policy id
  • deletePolicy(id: ID!): Policy
  • # Updates configuration values for your account
  • #
  • # Arguments
  • # default_network: ID of the network used for provisioning docker
  • # containers
  • updateConfig(default_network: String): [KeyValue]
  • # Delete an image. Caller must be the owner of the image to delete it
  • #
  • # Arguments
  • # id: Image id
  • deleteImage(id: ID): Image
  • # Exports an image to the specified Manta path. Caller must be the owner of the
  • # image, and the correspondent Manta path prefix, in order to export it
  • #
  • #
  • # Arguments
  • #
  • # id:
  • #
  • # Arguments
  • # id: Image id
  • # manta_path: Manta path prefix used when exporting the image
  • exportImage(id: ID, manta_path: String!): MantaLocation
  • # Create a new custom image from an instance
  • #
  • # Arguments
  • # machine: The prepared and stopped instance UUID from which the
  • # image is to be created
  • # name: The name of the custom image, e.g. "my-image"
  • # version: The version of the custom image, e.g. "1.0.0"
  • # description: The image description
  • # homepage: The image homepage
  • # eula: The image eula
  • # acl: The image acl
  • # tags: The image tags
  • createImageFromMachine(
  • machine: ID!,
  • name: String!,
  • version: String!,
  • description: String,
  • homepage: String,
  • eula: String,
  • acl: String,
  • tags: [KeyValueInput]
  • ): Image
  • # Create a new custom image from an instance
  • #
  • # Arguments
  • # id: Image id
  • # name: The name of the custom image, e.g. "my-image"
  • # version: The version of the custom image, e.g. "1.0.0"
  • # description: The image description
  • # homepage: The image homepage
  • # eula: The image eula
  • # acl: The image acl
  • # tags: The image tags
  • updateImage(
  • id: ID!,
  • name: String,
  • version: String,
  • description: String,
  • homepage: String,
  • eula: String,
  • acl: String,
  • tags: [KeyValueInput]
  • ): Image
  • # 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](https://apidocs.joyent.com/cloudapi/#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`, you can usually use any of the SSH keys managed
  • # under the [keys section](https://apidocs.joyent.com/cloudapi/#keys) 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`, 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:
  • #
  • #
  • # ```json
  • #
  • # "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. If it is absent from the
  • # input, the instance will default to attaching to one externally-accessible
  • # network (it will have one public IP), and one internally-accessible network from
  • # the datacenter network pools. It is possible to have an instance attached to
  • # only an internal network, or both public and internal, or just external.
  • #
  • #
  • # 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](https://apidocs.joyent.com/cloudapi/#GetMachine) until the instance
  • # state is `running`.
  • #
  • #
  • # Typically, Triton will allocate the new instance somewhere reasonable within the
  • # cloud. See [affinity rules](https://apidocs.joyent.com/cloudapi/#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.
  • #
  • # Arguments
  • # name: Friendly name for this instance; default is the first 8
  • # characters of the machine id. If the name includes the string {{shortId}}, any
  • # instances of that tag within the name will be replaced by the first 8 characters
  • # of the machine id.
  • # package: Id of the package to use on provisioning, obtained
  • # from ListPackages
  • # image: The image UUID
  • # networks: Desired networks ids
  • # affinity: Optional array of affinity rules
  • # metadata: An arbitrary set of metadata key/value pairs can be
  • # set at provision time, but they must be prefixed with "metadata"
  • # tags: An arbitrary set of tags can be set at provision time,
  • # but they must be prefixed with "tag"
  • # firewall_enabled: Completely enable or disable firewall for
  • # this instance. Default is false
  • createMachine(
  • name: String!,
  • package: ID!,
  • image: ID!,
  • networks: [ID],
  • affinity: [AffinityRule],
  • metadata: [KeyValueInput],
  • tags: [KeyValueInput],
  • firewall_enabled: Boolean
  • ): Machine
  • # Allows you to shut down an instance
  • #
  • # Arguments
  • # id: Machine id
  • stopMachine(id: ID!): Machine
  • # Allows you to boot up an instance
  • #
  • # Arguments
  • # id: Machine id
  • startMachine(id: ID!): Machine
  • # Allows you to reboot an instance
  • #
  • # Arguments
  • # id: Machine id
  • rebootMachine(id: ID!): Machine
  • # Resize an instance to a new package
  • #
  • #
  • # Resizing is only supported for containers (instances which are not hardware
  • # virtual machines -- they have brand=kvm). 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.
  • #
  • # Arguments
  • # id: Machine id
  • # package: Package id
  • resizeMachine(id: ID!, package: ID!): Machine
  • # Allows you to rename an instance
  • #
  • # Arguments
  • # id: Machine id
  • # name: Package id
  • renameMachine(id: ID!, name: String!): Machine
  • # Allows you to enable the firewall for an instance
  • #
  • # Arguments
  • # id: Machine id
  • enableMachineFirewall(id: ID!): Machine
  • # Allows you to disable the firewall for an instance
  • #
  • # Arguments
  • # id: Machine id
  • disableMachineFirewall(id: ID!): Machine
  • # 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'.
  • #
  • # Arguments
  • # id: Machine id
  • # name:
  • createMachineSnapshot(id: ID!, name: String): Snapshot
  • # 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.
  • #
  • # Arguments
  • # id: Machine id
  • # snapshot:
  • startMachineFromSnapshot(id: ID!, snapshot: ID!): Machine
  • # Deletes the specified snapshot of an instance
  • #
  • # Arguments
  • # id: Machine id
  • # snapshot:
  • deleteMachineSnapshot(id: ID!, snapshot: ID!): Machine
  • # 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.
  • #
  • # Arguments
  • # id: Machine id
  • # metadata: Metadata key value pairs
  • updateMachineMetadata(id: ID!, metadata: [KeyValueInput]): Machine
  • # Deletes a single metadata key from this instance
  • #
  • # Arguments
  • # id: Machine id
  • # name: Metadata key
  • deleteMachineMetadata(id: ID!, name: String!): Machine
  • # Deletes all metadata keys from this instance
  • #
  • # Arguments
  • # id: Machine id
  • deleteAllMachineMetadata(id: ID!): Machine
  • # Set tags on the given instance. A pre-existing tag with the same name as one
  • # given will be overwritten
  • #
  • # Arguments
  • # id: Machine id
  • # tags: key value pairs
  • addMachineTags(id: ID!, tags: [KeyValueInput]!): Machine
  • # Fully replace all tags on an instance with the given tags
  • #
  • # Arguments
  • # id: Machine id
  • # tags: key value pairs
  • replaceMachineTags(id: ID!, tags: [KeyValueInput]!): Machine
  • # Deletes a single tag from this instance
  • #
  • # Arguments
  • # id: Machine id
  • # name: tag name
  • deleteMachineTag(id: ID!, name: String!): Machine
  • # Deletes all tags from an instance
  • #
  • # Arguments
  • # id: Machine id
  • deleteMachineTags(id: ID!): Machine
  • # Allows you to completely destroy an instance
  • #
  • # Arguments
  • # id: Machine id
  • deleteMachine(id: ID!): Machine
  • # 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
  • #
  • # Arguments
  • # enabled: Indicates if the rule is enabled (optional, false by
  • # default)
  • # rule: Firewall rule text
  • # description: Human-readable description for the rule
  • createFirewallRule(
  • enabled: Boolean,
  • rule: String!,
  • description: String
  • ): FirewallRule
  • # 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
  • #
  • # Arguments
  • # id: Firewall rule id
  • # enabled: Indicates if the rule is enabled (false by default)
  • # rule: Firewall rule text
  • # description: Human-readable description for the rule
  • updateFirewallRule(
  • id: ID!,
  • enabled: Boolean,
  • rule: String,
  • description: String
  • ): FirewallRule
  • # Enables the given firewall rule if it is disabled
  • #
  • # Arguments
  • # id: Firewall rule id
  • enableFirewallRule(id: ID!): FirewallRule
  • # Disables the given firewall rule if it is enabled
  • #
  • # Arguments
  • # id: Firewall rule id
  • disableFirewallRule(id: ID!): FirewallRule
  • # Removes the given firewall rule from all the required instances
  • #
  • # Arguments
  • # id: Firewall rule id
  • deleteFirewallRule(id: ID!): FirewallRule
  • # Creates a new VLAN on the fabric
  • #
  • # Arguments
  • # id: A number from 0-4095 that indicates the VLAN's id
  • # name: A unique name to identify the VLAN
  • # description: An optional description of the VLAN
  • createVLAN(id: Int!, name: String!, description: String): VLAN
  • # Updates a fabric VLAN
  • #
  • # Arguments
  • # id: The VLAN id
  • # name: A unique name to identify the VLAN
  • # description: An optional description of the VLAN
  • updateVLAN(id: Int!, name: String, description: String): VLAN
  • # Deletes the specified VLAN. Note there must be no networks on that VLAN in order
  • # for the VLAN to be deleted.
  • #
  • # Arguments
  • # id: The VLAN id
  • deleteVLAN(id: Int!): VLAN
  • # Create Fabric network
  • #
  • # Arguments
  • # vlan: The VLAN id
  • # name: The network name; must be unique
  • # description: Description of this network
  • # subnet: A CIDR formatted string that describes the network
  • # provision_start_ip: The first IP on the network that may be
  • # assigned
  • # provision_end_ip: The last IP on the network that may be
  • # assigned
  • # gateway: Gateway IP address
  • # resolvers: Optional resolver IP addresses
  • # routes: Optional Static routes for hosts on this network
  • # internet_nat: Provision internet NAT zone on gateway address,
  • # default is true
  • createNetwork(
  • vlan: Int!,
  • name: String!,
  • description: String,
  • subnet: String!,
  • provision_start_ip: String,
  • provision_end_ip: String,
  • gateway: String,
  • resolvers: [String],
  • routes: [KeyValueInput],
  • internet_nat: Boolean
  • ): Network
  • # Deletes the specified Network. Note that no instances may be provisioned on the
  • # Network
  • #
  • # Arguments
  • # vlan: The VLAN id
  • # id: The network id
  • deleteNetwork(vlan: Int!, id: ID): Network
  • # Creates a new NIC on an instance belonging to a given account
  • # *WARNING*: this causes the instance to reboot while adding the NIC
  • #
  • # Arguments
  • # machine: Machine id
  • # network: ID of network this NIC should attach to
  • addNic(machine: ID!, network: ID!): NIC
  • # Removes a NIC on an instance belonging to a given account
  • # *WARNING*: this causes the instance to reboot while removing the NIC
  • #
  • # Arguments
  • # machine: Machine id
  • # mac: NIC mac address
  • removeNic(machine: ID, mac: String): NIC
  • }

link Require by

This element is not required by anyone