Returns a paginated list of Linodes you have permission to view.
LinodeClient linodeClient =newLinodeClient("apikey");// Get allList<LinodeInstance> list =awaitlinodeClient.LinodeInstance.Get();
Get One
Get a specific Linode by ID.
LinodeClient linodeClient =newLinodeClient("apikey");long instanceId =52767381;// Get OneLinodeInstance linodeInstance =awaitlinodeClient.LinodeInstance.Get(instanceId);
Create Linode Instance (Simple)
Creates a Linode Instance on your Account. In order for this request to complete successfully, your User must have the add_linodes grant. Creating a new Linode will incur a charge on your Account.
Linodes can be created using one of the available Types. See Types List to get more information about each Type’s specs and cost.
Linodes can be created in any one of our available Regions, which are accessible from the Regions List endpoint.
Important: You must be an unrestricted User in order to add or modify tags on Linodes.
Creates a Linode Instance on your Account. In order for this request to complete successfully, your User must have the add_linodes grant. Creating a new Linode will incur a charge on your Account.
Linodes can be created using one of the available Types. See Types List to get more information about each Type’s specs and cost.
Linodes can be created in any one of our available Regions, which are accessible from the Regions List endpoint.
Important: You must be an unrestricted User in order to add or modify tags on Linodes.
LinodeClient linodeClient =newLinodeClient("apikey");// Requiredstring label ="mySuperServerLinode";string regionId ="eu-central";string linodeTypeId ="g6-nanode-1";string imageId ="linode/debian11";string rootPassword ="krGNsg7oPxWTYS^q*KWL8HkHC2nJRUDjE*wT";// Optional// List of authorized usersList<string> authorizedUsers =newList<string> { "LJChuello" };// List of enabled public SSH keysList<string> authorizedKeys =newList<string>();// We rely on the 'SshKeyGenerator' library to generate SSH credentials.SshKeyGenerator.SshKeyGenerator sshKeyGenerator =newSshKeyGenerator.SshKeyGenerator(2048);// Add to listauthorizedKeys.Add(sshKeyGenerator.ToRfcPublicKey($"{Guid.NewGuid()}"));// If true, we indicate that backups are made by Linodebool backups =true;// If indicated, sets the firewall ID of the firewall that was specifiedlong firewallId =285728;// If StackScripts is set, the server executes the Stack Scripts of the specified IDlong stackscriptId =1278172;// If Private Ip is true, it enables the private IP address on the Linodebool privateIp =true;// If specified, it is a list of tags with which the Linode will be identifiedList<string> tags =newList<string> { "this","super","server" };// CreateLinodeInstance linodeInstance =awaitlinodeClient.LinodeInstance.Create( label, regionId, linodeTypeId, imageId, rootPassword, authorizedUsers: authorizedUsers, authorizedKeys: authorizedKeys, backups: backups, firewallId: firewallId, stackscriptId: stackscriptId, privateIp: privateIp, tags: tags);
Updates a Linode
Updates a Linode that you have permission to read_write.
Important: You must be an unrestricted User in order to add or modify tags on Linodes.
LinodeClient linodeClient =newLinodeClient("apikey");// GetLinodeInstance linodeInstance =awaitlinodeClient.LinodeInstance.Get(54126156);// Set label and TagslinodeInstance.Label=$"{Guid.NewGuid()}";linodeInstance.Tags=newList<string> { "Kevin","Magnussen","Haas F1 Team" };// UpdatelinodeInstance =awaitlinodeClient.LinodeInstance.Update(linodeInstance);
Deletes a Linode
Deletes a Linode you have permission to read_write.
Deleting a Linode is a destructive action and cannot be undone.
Additionally, deleting a Linode:
Gives up any IP addresses the Linode was assigned.
Deletes all Disks, Backups, Configs, etc.
Detaches any Volumes associated with the Linode.
Stops billing for the Linode and its associated services. You will be billed for time used within the billing period the Linode was active.
LinodeClient linodeClient =newLinodeClient("apikey");// GetLinodeInstance linodeInstance =awaitlinodeClient.LinodeInstance.Get(54126784);// You can delete it by passing the object as a parameterawaitlinodeClient.LinodeInstance.Delete(linodeInstance);// You can also delete it by passing the ID as a parameter.awaitlinodeClient.LinodeInstance.Delete(54126784);