C# Class Microsoft.Azure.Commands.Compute.Extension.AzureVMBackup.AzureVMBackupExtensionUtil

Used to create/remove snapshots of the disk page blobs of the specified virtual machines.
Mostra file Open project: Azure/azure-powershell Class Usage Examples

Public Methods

Method Description
CreateSnapshotForDisks ( AzureVMBackupConfig vmConfig, string snapshotTag, VirtualMachineExtensionBaseCmdlet virtualMachineExtensionBaseCmdlet ) : void

we only support the Linux box now, if it's a windows, one AzureVMBackupException would be thrown.

FindSnapshot ( AzureContext azContext, List blobUris, List storageCredentialsFactory, string>.Dictionary snapshotQuery ) : List

find the snapshot with the tags

GenerateBlobSasUris ( List blobUris, AzureContext azContext ) : AzureVMBackupBlobSasUris
RemoveSnapshot ( AzureVMBackupConfig vmConfig, string snapshotTag, VirtualMachineExtensionBaseCmdlet virtualMachineExtensionBaseCmdlet ) : void

remove the vmbackups with the metadata key "vmbackuptag" and value snapshotTag, snapshotTag is the parameter passed in.

Private Methods

Method Description
GetBase64Encoding ( object obj ) : string
GetDiskBlobUris ( Microsoft.Azure.Management.Compute.Models.VirtualMachine virtualMachineResponse ) : List
GetResourceGroupFromId ( string id ) : string

Method Details

CreateSnapshotForDisks() public method

we only support the Linux box now, if it's a windows, one AzureVMBackupException would be thrown.
public CreateSnapshotForDisks ( AzureVMBackupConfig vmConfig, string snapshotTag, VirtualMachineExtensionBaseCmdlet virtualMachineExtensionBaseCmdlet ) : void
vmConfig AzureVMBackupConfig
snapshotTag string
virtualMachineExtensionBaseCmdlet VirtualMachineExtensionBaseCmdlet
return void

FindSnapshot() public method

find the snapshot with the tags
public FindSnapshot ( AzureContext azContext, List blobUris, List storageCredentialsFactory, string>.Dictionary snapshotQuery ) : List
azContext Microsoft.Azure.Commands.Common.Authentication.Models.AzureContext
blobUris List
storageCredentialsFactory List
snapshotQuery string>.Dictionary
return List

GenerateBlobSasUris() public method

public GenerateBlobSasUris ( List blobUris, AzureContext azContext ) : AzureVMBackupBlobSasUris
blobUris List
azContext Microsoft.Azure.Commands.Common.Authentication.Models.AzureContext
return Microsoft.Azure.Commands.Compute.Extension.AzureDiskEncryption.AzureVMBackupBlobSasUris

RemoveSnapshot() public method

remove the vmbackups with the metadata key "vmbackuptag" and value snapshotTag, snapshotTag is the parameter passed in.
public RemoveSnapshot ( AzureVMBackupConfig vmConfig, string snapshotTag, VirtualMachineExtensionBaseCmdlet virtualMachineExtensionBaseCmdlet ) : void
vmConfig AzureVMBackupConfig
snapshotTag string
virtualMachineExtensionBaseCmdlet VirtualMachineExtensionBaseCmdlet
return void