/// <summary> /// Get the Site object by Id. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.SiteRecovery.ISiteOperations. /// </param> /// <param name='siteId'> /// Required. Site ID. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// The response model for the Job details object. /// </returns> public static JobResponse Delete(this ISiteOperations operations, string siteId, CustomRequestHeaders customRequestHeaders) { return(Task.Factory.StartNew((object s) => { return ((ISiteOperations)s).DeleteAsync(siteId, customRequestHeaders); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Initializes a new instance of the SiteRecoveryManagementClient /// class. /// </summary> /// <param name='httpClient'> /// The Http client /// </param> public SiteRecoveryManagementClient(HttpClient httpClient) : base(httpClient) { this._jobs = new JobOperations(this); this._networkMappings = new NetworkMappingOperations(this); this._networks = new NetworkOperations(this); this._protectionContainer = new ProtectionContainerOperations(this); this._protectionEntity = new ProtectionEntityOperations(this); this._protectionProfile = new ProtectionProfileOperations(this); this._recoveryPlan = new RecoveryPlanOperations(this); this._servers = new ServerOperations(this); this._sites = new SiteOperations(this); this._storageMappings = new StorageMappingOperations(this); this._storages = new StorageOperations(this); this._vaultExtendedInfo = new VaultExtendedInfoOperations(this); this._vmGroup = new VirtualMachineGroupOperations(this); this._vm = new VirtualMachineOperations(this); this._apiVersion = "2013-03-01"; this._longRunningOperationInitialTimeout = -1; this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <summary> /// Get the Site object by Id. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.SiteRecovery.ISiteOperations. /// </param> /// <param name='input'> /// Required. Site Creation Input. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// The response model for the Job details object. /// </returns> public static Task <JobResponse> CreateAsync(this ISiteOperations operations, SiteCreationInput input, CustomRequestHeaders customRequestHeaders) { return(operations.CreateAsync(input, customRequestHeaders, CancellationToken.None)); }
/// <summary> /// Get the list of all Sites under the vault. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.SiteRecovery.ISiteOperations. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// The response model for the list Sites operation. /// </returns> public static Task <SiteListResponse> ListAsync(this ISiteOperations operations, CustomRequestHeaders customRequestHeaders) { return(operations.ListAsync(customRequestHeaders, CancellationToken.None)); }
/// <summary> /// Get the Site object by Id. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.SiteRecovery.ISiteOperations. /// </param> /// <param name='siteId'> /// Required. Site ID. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// The response model for the Site object /// </returns> public static Task <SiteResponse> GetAsync(this ISiteOperations operations, string siteId, CustomRequestHeaders customRequestHeaders) { return(operations.GetAsync(siteId, customRequestHeaders, CancellationToken.None)); }