public async Task RefreshDataIngestion(bool useTokenCredential) { MetricsAdvisorAdministrationClient adminClient = GetMetricsAdvisorAdministrationClient(useTokenCredential); var startTime = DateTimeOffset.Parse("2020-09-01T00:00:00Z"); var endTime = DateTimeOffset.Parse("2020-09-02T00:00:00Z"); Response response = await adminClient.RefreshDataFeedIngestionAsync(DataFeedId, startTime, endTime); Assert.That(response.Status, Is.EqualTo(204)); }
public async Task RefreshDataFeedIngestionAsync() { string endpoint = MetricsAdvisorUri; string subscriptionKey = MetricsAdvisorSubscriptionKey; string apiKey = MetricsAdvisorApiKey; var credential = new MetricsAdvisorKeyCredential(subscriptionKey, apiKey); var adminClient = new MetricsAdvisorAdministrationClient(new Uri(endpoint), credential); string dataFeedId = DataFeedId; var startTime = DateTimeOffset.Parse("2020-08-01T00:00:00Z"); var endTime = DateTimeOffset.Parse("2020-08-03T00:00:00Z"); await adminClient.RefreshDataFeedIngestionAsync(dataFeedId, startTime, endTime); }
public void RefreshDataIngestionValidatesArguments() { MetricsAdvisorAdministrationClient adminClient = GetMetricsAdvisorAdministrationClient(); Assert.That(() => adminClient.RefreshDataFeedIngestionAsync(null, default, default), Throws.InstanceOf <ArgumentNullException>());