C# Class Elastacloud.AzureManagement.Fluent.Clients.LinuxVirtualMachineClient

Inheritance: ILinuxVirtualMachineClient
Afficher le fichier Open project: azurecoder/fluent-management Class Usage Examples

Méthodes publiques

Méthode Description
AddRolesToExistingDeployment ( List properties, string cloudServiceName, ServiceCertificateModel serviceCertificate ) : void
CleanupUnattachedDisks ( ) : void

Cleans up any disks which don't have an attached VM

ClosePorts ( string cloudServiceName, string virtualMachineName ) : void
CreateNewVirtualMachineDeploymentFromTemplateGallery ( List properties, string cloudServiceName, ServiceCertificateModel serviceCertificate = null, string location = LocationConstants.NorthEurope, string affinityGroup = "" ) : IVirtualMachineClient

Creates a new virtual machine from a gallery template

DeleteNamedVirtualMachineDisk ( string name ) : void

Deletes a vm disk if a name is known

DeleteVirtualMachine ( bool removeDisks = true, bool removeUnderlyingBlobs = true, bool removeCloudService = true, bool removeStorageAccount = true ) : void

Deletes the virtual machine that has context with the client

GetAvailableVirtualNetworks ( ) : List
GetCurrentUbuntuImage ( ) : ImageProperties

This returns all of the available ubuntu images in the gallery

GetHostDetails ( string cloudServiceName ) : List

Gets a list of hosts, internal ip addresses and other things

GetVirtualMachineSubnetCollection ( string cloudServiceName ) : CloudServiceNetworking

Gets a list of virtual machine subnets that the vms in the cloud service belong to

LinuxVirtualMachineClient ( List properties, string subscriptionId, X509Certificate2 certificate ) : System

Constructs a VirtualMachinenClient

LinuxVirtualMachineClient ( string subscriptionId, X509Certificate2 certificate ) : System

Constructs a LinuxVirtualMachineClient and will get the details of a virtual machine given a cloud service

ListImages ( string filter = "" ) : List

Lists all of the OS images assoiated with Linux that are public within the subscription

OpenPorts ( string cloudServiceName, string virtualMachineName ) : void
Restart ( ) : void

Restarts the virtual machine instance

Stop ( ) : void

Stops the virtual machine instance

Private Methods

Méthode Description
AddServiceCertificateToRoles ( ServiceCertificateModel serviceCertificate, string cloudServiceName, List &properties ) : void
CheckVmDeploymentIsRunning ( List properties ) : void
DeleteDataDisks ( PersistentVMRole vm, IBlobClient client ) : void
ParseBlobDetails ( string blobAddress ) : string

Returns the name of the blob and container

Method Details

AddRolesToExistingDeployment() public méthode

public AddRolesToExistingDeployment ( List properties, string cloudServiceName, ServiceCertificateModel serviceCertificate ) : void
properties List
cloudServiceName string
serviceCertificate Elastacloud.AzureManagement.Fluent.Clients.Helpers.ServiceCertificateModel
Résultat void

CleanupUnattachedDisks() public méthode

Cleans up any disks which don't have an attached VM
public CleanupUnattachedDisks ( ) : void
Résultat void

ClosePorts() public méthode

public ClosePorts ( string cloudServiceName, string virtualMachineName ) : void
cloudServiceName string
virtualMachineName string
Résultat void

CreateNewVirtualMachineDeploymentFromTemplateGallery() public méthode

Creates a new virtual machine from a gallery template
public CreateNewVirtualMachineDeploymentFromTemplateGallery ( List properties, string cloudServiceName, ServiceCertificateModel serviceCertificate = null, string location = LocationConstants.NorthEurope, string affinityGroup = "" ) : IVirtualMachineClient
properties List Can be any gallery template
cloudServiceName string The name of the cloud service - if it doesn't exist it will be created
serviceCertificate Elastacloud.AzureManagement.Fluent.Clients.Helpers.ServiceCertificateModel The service certificate responsible for adding the ssh keys
location string Where the cloud service will be created if it doesn't exist
affinityGroup string Affinity group that this service will live in
Résultat IVirtualMachineClient

DeleteNamedVirtualMachineDisk() public méthode

Deletes a vm disk if a name is known
public DeleteNamedVirtualMachineDisk ( string name ) : void
name string The name of the vm disk
Résultat void

DeleteVirtualMachine() public méthode

Deletes the virtual machine that has context with the client
public DeleteVirtualMachine ( bool removeDisks = true, bool removeUnderlyingBlobs = true, bool removeCloudService = true, bool removeStorageAccount = true ) : void
removeDisks bool True if the underlying disks in blob storage should be removed
removeUnderlyingBlobs bool removes the underlying blob
removeCloudService bool Removes the cloud service container
removeStorageAccount bool The storage account that the vhd is in
Résultat void

GetAvailableVirtualNetworks() public méthode

public GetAvailableVirtualNetworks ( ) : List
Résultat List

GetCurrentUbuntuImage() public méthode

This returns all of the available ubuntu images in the gallery
public GetCurrentUbuntuImage ( ) : ImageProperties
Résultat Elastacloud.AzureManagement.Fluent.Types.VirtualMachines.ImageProperties

GetHostDetails() public méthode

Gets a list of hosts, internal ip addresses and other things
public GetHostDetails ( string cloudServiceName ) : List
cloudServiceName string
Résultat List

GetVirtualMachineSubnetCollection() public méthode

Gets a list of virtual machine subnets that the vms in the cloud service belong to
public GetVirtualMachineSubnetCollection ( string cloudServiceName ) : CloudServiceNetworking
cloudServiceName string
Résultat Elastacloud.AzureManagement.Fluent.Types.VirtualNetworks.CloudServiceNetworking

LinuxVirtualMachineClient() public méthode

Constructs a VirtualMachinenClient
public LinuxVirtualMachineClient ( List properties, string subscriptionId, X509Certificate2 certificate ) : System
properties List A valid VirtualMachineProperties object
subscriptionId string The susbcription id for the subscription
certificate System.Security.Cryptography.X509Certificates.X509Certificate2 The susbcription id for the subscription
Résultat System

LinuxVirtualMachineClient() public méthode

Constructs a LinuxVirtualMachineClient and will get the details of a virtual machine given a cloud service
public LinuxVirtualMachineClient ( string subscriptionId, X509Certificate2 certificate ) : System
subscriptionId string the subscription id
certificate System.Security.Cryptography.X509Certificates.X509Certificate2 A management certificate for the subscription
Résultat System

ListImages() public méthode

Lists all of the OS images assoiated with Linux that are public within the subscription
public ListImages ( string filter = "" ) : List
filter string
Résultat List

OpenPorts() public méthode

public OpenPorts ( string cloudServiceName, string virtualMachineName ) : void
cloudServiceName string
virtualMachineName string
Résultat void

Restart() public méthode

Restarts the virtual machine instance
public Restart ( ) : void
Résultat void

Stop() public méthode

Stops the virtual machine instance
public Stop ( ) : void
Résultat void