C# Class Microsoft.Azure.Commands.RecoveryServices.PSRecoveryServicesClient

Recovery services convenience client.
ファイルを表示 Open project: Azure/azure-powershell Class Usage Examples

Public Methods

Method Description
ChangeVaultContext ( ARSVault vault ) : ASRVaultCreds

Changes the Vault context

ConvertReplicationFrequencyToUshort ( string replicationFrequencyString ) : ushort

Converts the Parameter set string of Replication Frequency in seconds to UShort.

CreateExtendedInfo ( Microsoft.Azure.Management.RecoveryServices.Models.ResourceExtendedInformationArgs extendedInfoArgs ) : AzureOperationResponse

Creates the extended information for the vault

CreateVault ( string resouceGroupName, string vaultName, Microsoft.Azure.Management.RecoveryServices.Models.VaultCreateArgs vaultCreateInput ) : Microsoft.Azure.Management.RecoveryServices.Models.VaultCreateResponse

Method to create Azure Recovery Services Vault

DeleteVault ( string resouceGroupName, string vaultName ) : Microsoft.Azure.Management.RecoveryServices.Models.RecoveryServicesOperationStatusResponse

Method to delete Azure Recovery Services Vault

GenerateVaultCredential ( X509Certificate2 managementCert, ARSVault vault, ASRSite site ) : ASRVaultCreds

Gets the vault credential object

GetExtendedInfo ( ) : Task

Gets Vault Extended Information

GetRequestHeaders ( ) : Microsoft.Azure.Management.RecoveryServices.Models.CustomRequestHeaders

Gets request headers.

GetResouceGroups ( ) : ResourceGroupListResponse

Method to list Azure resouce groups

GetResourceGroup ( string resourceId ) : string
GetSubscriptionId ( string resourceId ) : string
GetVault ( string resouceGroupName, string resourceName ) : Microsoft.Azure.Management.RecoveryServices.Models.VaultResponse

Method to get Azure Recovery Services Vault

GetVaultStorageType ( string resouceGroupName, string vaultName ) : Microsoft.Azure.Management.RecoveryServices.Models.GetResourceStorageConfigResponse

Method to Get Azure Recovery Services Vault Backup Properties

GetVaultsInResouceGroup ( string resouceGroupName ) : VaultListResponse

Method to list Azure Recovery Services Vaults

PSRecoveryServicesClient ( IAzureProfile azureProfile ) : System

Initializes a new instance of the PSRecoveryServicesClient class with required current subscription.

UpdateVaultCertificate ( Microsoft.Azure.Management.RecoveryServices.Models.CertificateArgs args, string certFriendlyName ) : Task

Updates the vault certificate

UpdateVaultStorageType ( string resouceGroupName, string vaultName, Microsoft.Azure.Management.RecoveryServices.Models.UpdateVaultStorageTypeRequest vaultStorageUpdateRequest ) : AzureOperationResponse

Method to Update Azure Recovery Services Vault Backup Properties

UploadCertificate ( X509Certificate2 managementCert, ARSVault vault ) : Microsoft.Azure.Management.RecoveryServices.Models.UploadCertificateResponse

Upload cert to idmgmt

ValidateReplicationStartTime ( System.TimeSpan timeSpan ) : void

Validates if the time span object has a valid value.

ValidateStorageAccountAssociation ( string azureSubscription, string azureStorageAccount, string vaultLocation, bool &validationSuccessful, bool &locationValid ) : void

Validates whether the storage belongs to the currently logged account or not.

ValidateSubscriptionAccountAssociation ( string azureSubscriptionId ) : void

Validates whether the subscription belongs to the currently logged account or not.

Private Methods

Method Description
CreateVaultExtendedInformation ( ) : Microsoft.Azure.Management.RecoveryServices.Models.ResourceExtendedInformation

Method to create the extended info for the vault.

GenerateCredentialObject ( X509Certificate2 managementCert, Microsoft.Azure.Management.RecoveryServices.Models.UploadCertificateResponse acsDetails, string channelIntegrityKey, ARSVault vault, ASRSite site ) : ASRVaultCreds

Method to generate the credential file content

GetChannelIntegrityKey ( ) : Task

Get the Integrity key

IgnoreCertificateErrorHandler ( object sender, System certificate, System chain, SslPolicyErrors sslPolicyErrors ) : bool
UpdateVaultCertificate ( X509Certificate2 cert ) : Task

Method to update vault certificate

Method Details

ChangeVaultContext() public method

Changes the Vault context
public ChangeVaultContext ( ARSVault vault ) : ASRVaultCreds
vault ARSVault vault object
return Microsoft.Azure.Portal.RecoveryServices.Models.Common.ASRVaultCreds

ConvertReplicationFrequencyToUshort() public static method

Converts the Parameter set string of Replication Frequency in seconds to UShort.
public static ConvertReplicationFrequencyToUshort ( string replicationFrequencyString ) : ushort
replicationFrequencyString string Replication frequency in seconds.
return ushort

CreateExtendedInfo() public method

Creates the extended information for the vault
public CreateExtendedInfo ( Microsoft.Azure.Management.RecoveryServices.Models.ResourceExtendedInformationArgs extendedInfoArgs ) : AzureOperationResponse
extendedInfoArgs Microsoft.Azure.Management.RecoveryServices.Models.ResourceExtendedInformationArgs extended info to be created
return AzureOperationResponse

CreateVault() public method

Method to create Azure Recovery Services Vault
public CreateVault ( string resouceGroupName, string vaultName, Microsoft.Azure.Management.RecoveryServices.Models.VaultCreateArgs vaultCreateInput ) : Microsoft.Azure.Management.RecoveryServices.Models.VaultCreateResponse
resouceGroupName string Name of the resouce group
vaultName string Name of the vault
vaultCreateInput Microsoft.Azure.Management.RecoveryServices.Models.VaultCreateArgs Vault creation input object
return Microsoft.Azure.Management.RecoveryServices.Models.VaultCreateResponse

DeleteVault() public method

Method to delete Azure Recovery Services Vault
public DeleteVault ( string resouceGroupName, string vaultName ) : Microsoft.Azure.Management.RecoveryServices.Models.RecoveryServicesOperationStatusResponse
resouceGroupName string Name of the resouce group
vaultName string Name of the vault
return Microsoft.Azure.Management.RecoveryServices.Models.RecoveryServicesOperationStatusResponse

GenerateVaultCredential() public method

Gets the vault credential object
public GenerateVaultCredential ( X509Certificate2 managementCert, ARSVault vault, ASRSite site ) : ASRVaultCreds
managementCert System.Security.Cryptography.X509Certificates.X509Certificate2 certificate to be uploaded
vault ARSVault vault object
site ASRSite
return Microsoft.Azure.Portal.RecoveryServices.Models.Common.ASRVaultCreds

GetExtendedInfo() public method

Gets Vault Extended Information
public GetExtendedInfo ( ) : Task
return Task

GetRequestHeaders() public method

Gets request headers.
public GetRequestHeaders ( ) : Microsoft.Azure.Management.RecoveryServices.Models.CustomRequestHeaders
return Microsoft.Azure.Management.RecoveryServices.Models.CustomRequestHeaders

GetResouceGroups() public method

Method to list Azure resouce groups
public GetResouceGroups ( ) : ResourceGroupListResponse
return ResourceGroupListResponse

GetResourceGroup() public static method

public static GetResourceGroup ( string resourceId ) : string
resourceId string
return string

GetSubscriptionId() public static method

public static GetSubscriptionId ( string resourceId ) : string
resourceId string
return string

GetVault() public method

Method to get Azure Recovery Services Vault
public GetVault ( string resouceGroupName, string resourceName ) : Microsoft.Azure.Management.RecoveryServices.Models.VaultResponse
resouceGroupName string Name of the resouce group
resourceName string Name of the resource
return Microsoft.Azure.Management.RecoveryServices.Models.VaultResponse

GetVaultStorageType() public method

Method to Get Azure Recovery Services Vault Backup Properties
public GetVaultStorageType ( string resouceGroupName, string vaultName ) : Microsoft.Azure.Management.RecoveryServices.Models.GetResourceStorageConfigResponse
resouceGroupName string Name of the resouce group
vaultName string Name of the vault
return Microsoft.Azure.Management.RecoveryServices.Models.GetResourceStorageConfigResponse

GetVaultsInResouceGroup() public method

Method to list Azure Recovery Services Vaults
public GetVaultsInResouceGroup ( string resouceGroupName ) : VaultListResponse
resouceGroupName string Name of the resouce group
return VaultListResponse

PSRecoveryServicesClient() public method

Initializes a new instance of the PSRecoveryServicesClient class with required current subscription.
public PSRecoveryServicesClient ( IAzureProfile azureProfile ) : System
azureProfile IAzureProfile
return System

UpdateVaultCertificate() public method

Updates the vault certificate
public UpdateVaultCertificate ( Microsoft.Azure.Management.RecoveryServices.Models.CertificateArgs args, string certFriendlyName ) : Task
args Microsoft.Azure.Management.RecoveryServices.Models.CertificateArgs the certificate update arguments
certFriendlyName string
return Task

UpdateVaultStorageType() public method

Method to Update Azure Recovery Services Vault Backup Properties
public UpdateVaultStorageType ( string resouceGroupName, string vaultName, Microsoft.Azure.Management.RecoveryServices.Models.UpdateVaultStorageTypeRequest vaultStorageUpdateRequest ) : AzureOperationResponse
resouceGroupName string Name of the resouce group
vaultName string Name of the vault
vaultStorageUpdateRequest Microsoft.Azure.Management.RecoveryServices.Models.UpdateVaultStorageTypeRequest Backup Properties Update
return AzureOperationResponse

UploadCertificate() public method

Upload cert to idmgmt
public UploadCertificate ( X509Certificate2 managementCert, ARSVault vault ) : Microsoft.Azure.Management.RecoveryServices.Models.UploadCertificateResponse
managementCert System.Security.Cryptography.X509Certificates.X509Certificate2 certificate to be uploaded
vault ARSVault vault object
return Microsoft.Azure.Management.RecoveryServices.Models.UploadCertificateResponse

ValidateReplicationStartTime() public static method

Validates if the time span object has a valid value.
public static ValidateReplicationStartTime ( System.TimeSpan timeSpan ) : void
timeSpan System.TimeSpan Time span object to be validated
return void

ValidateStorageAccountAssociation() public method

Validates whether the storage belongs to the currently logged account or not.
public ValidateStorageAccountAssociation ( string azureSubscription, string azureStorageAccount, string vaultLocation, bool &validationSuccessful, bool &locationValid ) : void
azureSubscription string Subscription ID
azureStorageAccount string Storage Account details
vaultLocation string Current Vault Location
validationSuccessful bool Out variable to indicate if validation was successful
locationValid bool Out variable to indicate if location of storage account is valid
return void

ValidateSubscriptionAccountAssociation() public method

Validates whether the subscription belongs to the currently logged account or not.
public ValidateSubscriptionAccountAssociation ( string azureSubscriptionId ) : void
azureSubscriptionId string Azure Subscription ID
return void