public override Task <JobProperties> ExportDevicesAsync(string exportBlobContainerUri, bool excludeKeys, CancellationToken ct) { var jobProperties = new JobProperties() { Type = JobType.ExportDevices, OutputBlobContainerUri = exportBlobContainerUri, ExcludeKeysInExport = excludeKeys }; return(this.CreateJobAsync(jobProperties, ct)); }
public override Task <JobProperties> ImportDevicesAsync(string importBlobContainerUri, string outputBlobContainerUri, CancellationToken ct) { var jobProperties = new JobProperties() { Type = JobType.ImportDevices, InputBlobContainerUri = importBlobContainerUri, OutputBlobContainerUri = outputBlobContainerUri }; return(this.CreateJobAsync(jobProperties, ct)); }
Task <JobProperties> CreateJobAsync(JobProperties jobProperties, CancellationToken ct) { this.EnsureInstanceNotClosed(); var errorMappingOverrides = new Dictionary <HttpStatusCode, Func <HttpResponseMessage, Task <Exception> > > { { HttpStatusCode.Forbidden, responseMessage => Task.FromResult((Exception) new JobQuotaExceededException()) } }; return(this.httpClientHelper.PostAsync <JobProperties, JobProperties>( GetJobUri("/create"), jobProperties, errorMappingOverrides, null, ct)); }
Task<JobProperties> CreateJobAsync(JobProperties jobProperties, CancellationToken ct) { this.EnsureInstanceNotClosed(); var errorMappingOverrides = new Dictionary<HttpStatusCode, Func<HttpResponseMessage, Task<Exception>>>() { { HttpStatusCode.Forbidden, responseMessage => Task.FromResult((Exception) new JobQuotaExceededException())} }; return this.httpClientHelper.PostAsync<JobProperties, JobProperties>( GetJobUri("/create"), jobProperties, errorMappingOverrides, null, ct); }
public override Task<JobProperties> ImportDevicesAsync(string importBlobContainerUri, string outputBlobContainerUri, CancellationToken ct) { var jobProperties = new JobProperties() { Type = JobType.ImportDevices, InputBlobContainerUri = importBlobContainerUri, OutputBlobContainerUri = outputBlobContainerUri }; return this.CreateJobAsync(jobProperties, ct); }
public override Task<JobProperties> ExportDevicesAsync(string exportBlobContainerUri, bool excludeKeys, CancellationToken ct) { var jobProperties = new JobProperties() { Type = JobType.ExportDevices, OutputBlobContainerUri = exportBlobContainerUri, ExcludeKeysInExport = excludeKeys }; return this.CreateJobAsync(jobProperties, ct); }