diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/CHANGELOG.md b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/CHANGELOG.md index 42e2416fdc4f5..81882745eaf35 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/CHANGELOG.md +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/CHANGELOG.md @@ -4,6 +4,8 @@ ### New Features - Added `DatasourceCredential` CRUD operations to the `MetricsAdvisorAdministrationClient`. This API provides new ways of authenticating to a `DataFeedSource`. +- Added property `Authentication` to data sources `AzureBlobDataFeedSource`, `AzureDataExplorerDataFeedSource`, `AzureDataLakeStorageGen2DataFeedSource`, and `SqlServerDataFeedSource` to specify the authentication type to use. +- Added property `DatasourceCredentialId` to data sources `AzureDataExplorerDataFeedSource`, `AzureDataLakeStorageGen2DataFeedSource`, and `SqlServerDataFeedSource` to specify the datasource credential to use for authentication. - Added properties `Value` and `ExpectedValue` to `DataPointAnomaly` to provide more information about the anomalous data point. - Added properties `ValueOfRootNode` and `ExpectedValueOfRootNode` to `AnomalyIncident` to provide more information about the anomalous data point at the root node of the indicent. - Response headers that were marked as `REDACTED` in error messages and logs are now exposed by default. diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/api/Azure.AI.MetricsAdvisor.netstandard2.0.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/api/Azure.AI.MetricsAdvisor.netstandard2.0.cs index 5137bb9c74976..60128f2db8209 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/api/Azure.AI.MetricsAdvisor.netstandard2.0.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/api/Azure.AI.MetricsAdvisor.netstandard2.0.cs @@ -455,9 +455,15 @@ public void UpdateApiKey(string apiKey) { } public partial class AzureBlobDataFeedSource : Azure.AI.MetricsAdvisor.Models.DataFeedSource { public AzureBlobDataFeedSource(string connectionString, string container, string blobTemplate) { } + public Azure.AI.MetricsAdvisor.Models.AzureBlobDataFeedSource.AuthenticationType? Authentication { get { throw null; } set { } } public string BlobTemplate { get { throw null; } set { } } public string Container { get { throw null; } set { } } public void UpdateConnectionString(string connectionString) { } + public enum AuthenticationType + { + Basic = 0, + ManagedIdentity = 1, + } } public partial class AzureCosmosDbDataFeedSource : Azure.AI.MetricsAdvisor.Models.DataFeedSource { @@ -470,17 +476,35 @@ public void UpdateConnectionString(string connectionString) { } public partial class AzureDataExplorerDataFeedSource : Azure.AI.MetricsAdvisor.Models.DataFeedSource { public AzureDataExplorerDataFeedSource(string connectionString, string query) { } + public Azure.AI.MetricsAdvisor.Models.AzureDataExplorerDataFeedSource.AuthenticationType? Authentication { get { throw null; } set { } } + public string DatasourceCredentialId { get { throw null; } set { } } public string Query { get { throw null; } set { } } public void UpdateConnectionString(string connectionString) { } + public enum AuthenticationType + { + Basic = 0, + ManagedIdentity = 1, + ServicePrincipal = 2, + ServicePrincipalInKeyVault = 3, + } } public partial class AzureDataLakeStorageGen2DataFeedSource : Azure.AI.MetricsAdvisor.Models.DataFeedSource { public AzureDataLakeStorageGen2DataFeedSource(string accountName, string accountKey, string fileSystemName, string directoryTemplate, string fileTemplate) { } public string AccountName { get { throw null; } set { } } + public Azure.AI.MetricsAdvisor.Models.AzureDataLakeStorageGen2DataFeedSource.AuthenticationType? Authentication { get { throw null; } set { } } + public string DatasourceCredentialId { get { throw null; } set { } } public string DirectoryTemplate { get { throw null; } set { } } public string FileSystemName { get { throw null; } set { } } public string FileTemplate { get { throw null; } set { } } public void UpdateAccountKey(string accountKey) { } + public enum AuthenticationType + { + Basic = 0, + SharedKey = 1, + ServicePrincipal = 2, + ServicePrincipalInKeyVault = 3, + } } public partial class AzureEventHubsDataFeedSource : Azure.AI.MetricsAdvisor.Models.DataFeedSource { @@ -1199,8 +1223,18 @@ public void UpdateConnectionString(string connectionString) { } public partial class SqlServerDataFeedSource : Azure.AI.MetricsAdvisor.Models.DataFeedSource { public SqlServerDataFeedSource(string connectionString, string query) { } + public Azure.AI.MetricsAdvisor.Models.SqlServerDataFeedSource.AuthenticationType? Authentication { get { throw null; } set { } } + public string DatasourceCredentialId { get { throw null; } set { } } public string Query { get { throw null; } set { } } public void UpdateConnectionString(string connectionString) { } + public enum AuthenticationType + { + Basic = 0, + ManagedIdentity = 1, + SqlConnectionString = 2, + ServicePrincipal = 3, + ServicePrincipalInKeyVault = 4, + } } public partial class SuppressCondition { diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/CodeGenInternal/AuthenticationTypeEnum.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/CodeGenInternal/AuthenticationTypeEnum.cs index dc998eab18df8..8ceceb28a3e7a 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/CodeGenInternal/AuthenticationTypeEnum.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/CodeGenInternal/AuthenticationTypeEnum.cs @@ -3,7 +3,6 @@ namespace Azure.AI.MetricsAdvisor.Models { - // TODO: expose it as part of 1.0.0-beta.4 internal readonly partial struct AuthenticationTypeEnum { } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/DataFeed/DataFeed.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/DataFeed/DataFeed.cs index 09016f440ff11..5578564a22b0c 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/DataFeed/DataFeed.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/DataFeed/DataFeed.cs @@ -198,6 +198,8 @@ internal DataFeedDetail GetDataFeedDetail() detail.Viewers.Add(viewer); } + SetAuthenticationProperties(detail, DataSource); + return detail; } @@ -247,7 +249,53 @@ internal DataFeedDetailPatch GetPatchModel() patch.Admins = AdministratorsEmails; patch.Viewers = ViewersEmails; + SetAuthenticationProperties(patch, DataSource); + return patch; } + + private static void SetAuthenticationProperties(DataFeedDetail detail, DataFeedSource dataSource) + { + switch (dataSource) + { + case AzureBlobDataFeedSource s: + detail.AuthenticationType = s.GetAuthenticationTypeEnum(); + break; + case AzureDataExplorerDataFeedSource s: + detail.AuthenticationType = s.GetAuthenticationTypeEnum(); + detail.CredentialId = s.DatasourceCredentialId; + break; + case AzureDataLakeStorageGen2DataFeedSource s: + detail.AuthenticationType = s.GetAuthenticationTypeEnum(); + detail.CredentialId = s.DatasourceCredentialId; + break; + case SqlServerDataFeedSource s: + detail.AuthenticationType = s.GetAuthenticationTypeEnum(); + detail.CredentialId = s.DatasourceCredentialId; + break; + } + } + + private static void SetAuthenticationProperties(DataFeedDetailPatch patch, DataFeedSource dataSource) + { + switch (dataSource) + { + case AzureBlobDataFeedSource s: + patch.AuthenticationType = s.GetAuthenticationTypeEnum(); + break; + case AzureDataExplorerDataFeedSource s: + patch.AuthenticationType = s.GetAuthenticationTypeEnum(); + patch.CredentialId = s.DatasourceCredentialId; + break; + case AzureDataLakeStorageGen2DataFeedSource s: + patch.AuthenticationType = s.GetAuthenticationTypeEnum(); + patch.CredentialId = s.DatasourceCredentialId; + break; + case SqlServerDataFeedSource s: + patch.AuthenticationType = s.GetAuthenticationTypeEnum(); + patch.CredentialId = s.DatasourceCredentialId; + break; + } + } } } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/DataFeed/DataFeedSource.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/DataFeed/DataFeedSource.cs index aaf84f4387f93..29e8d0b26f1bb 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/DataFeed/DataFeedSource.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/DataFeed/DataFeedSource.cs @@ -22,10 +22,10 @@ internal static DataFeedSource GetDataFeedSource(DataFeedDetail dataFeedDetail) dataFeedDetail switch { AzureApplicationInsightsDataFeed d => new AzureApplicationInsightsDataFeedSource(d.DataSourceParameter), - AzureBlobDataFeed d => new AzureBlobDataFeedSource(d.DataSourceParameter), + AzureBlobDataFeed d => new AzureBlobDataFeedSource(d.DataSourceParameter, d.AuthenticationType), AzureCosmosDBDataFeed d => new AzureCosmosDbDataFeedSource(d.DataSourceParameter), - AzureDataExplorerDataFeed d => new AzureDataExplorerDataFeedSource(d.DataSourceParameter), - AzureDataLakeStorageGen2DataFeed d => new AzureDataLakeStorageGen2DataFeedSource(d.DataSourceParameter), + AzureDataExplorerDataFeed d => new AzureDataExplorerDataFeedSource(d.DataSourceParameter, d.AuthenticationType, d.CredentialId), + AzureDataLakeStorageGen2DataFeed d => new AzureDataLakeStorageGen2DataFeedSource(d.DataSourceParameter, d.AuthenticationType, d.CredentialId), AzureEventHubsDataFeed d => new AzureEventHubsDataFeedSource(d.DataSourceParameter), AzureLogAnalyticsDataFeed d => new LogAnalyticsDataFeedSource(d.DataSourceParameter), AzureTableDataFeed d => new AzureTableDataFeedSource(d.DataSourceParameter), @@ -33,7 +33,7 @@ internal static DataFeedSource GetDataFeedSource(DataFeedDetail dataFeedDetail) MongoDBDataFeed d => new MongoDbDataFeedSource(d.DataSourceParameter), MySqlDataFeed d => new MySqlDataFeedSource(d.DataSourceParameter), PostgreSqlDataFeed d => new PostgreSqlDataFeedSource(d.DataSourceParameter), - SQLServerDataFeed d => new SqlServerDataFeedSource(d.DataSourceParameter), + SQLServerDataFeed d => new SqlServerDataFeedSource(d.DataSourceParameter, d.AuthenticationType, d.CredentialId), _ => throw new InvalidOperationException("Invalid DataFeedDetail type") }; diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/DataFeed/DataFeedSources/AzureBlobDataFeedSource.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/DataFeed/DataFeedSources/AzureBlobDataFeedSource.cs index 245ffff3b318a..ba4f5474646c5 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/DataFeed/DataFeedSources/AzureBlobDataFeedSource.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/DataFeed/DataFeedSources/AzureBlobDataFeedSource.cs @@ -58,7 +58,7 @@ public AzureBlobDataFeedSource(string connectionString, string container, string BlobTemplate = blobTemplate; } - internal AzureBlobDataFeedSource(AzureBlobParameter parameter) + internal AzureBlobDataFeedSource(AzureBlobParameter parameter, AuthenticationTypeEnum? authentication) : base(DataFeedSourceType.AzureBlob) { Argument.AssertNotNull(parameter, nameof(parameter)); @@ -66,8 +66,34 @@ internal AzureBlobDataFeedSource(AzureBlobParameter parameter) ConnectionString = parameter.ConnectionString; Container = parameter.Container; BlobTemplate = parameter.BlobTemplate; + + SetAuthentication(authentication); } + /// + /// The different ways of authenticating to an . + /// Defaults to . + /// + public enum AuthenticationType + { + /// + /// Only uses the present in this + /// instance for authentication. + /// + Basic, + + /// + /// Uses Managed Identity authentication. + /// + ManagedIdentity + }; + + /// + /// The method used to authenticate to this . Defaults to + /// . + /// + public AuthenticationType? Authentication { get; set; } + /// /// The name of the blob container. /// @@ -120,5 +146,25 @@ public void UpdateConnectionString(string connectionString) Argument.AssertNotNullOrEmpty(connectionString, nameof(connectionString)); ConnectionString = connectionString; } + + internal AuthenticationTypeEnum? GetAuthenticationTypeEnum() => Authentication switch + { + null => default(AuthenticationTypeEnum?), + AuthenticationType.Basic => AuthenticationTypeEnum.Basic, + AuthenticationType.ManagedIdentity => AuthenticationTypeEnum.ManagedIdentity, + _ => throw new InvalidOperationException($"Unknown authentication type: {Authentication}") + }; + + internal void SetAuthentication(AuthenticationTypeEnum? authentication) + { + if (authentication == AuthenticationTypeEnum.Basic) + { + Authentication = AuthenticationType.Basic; + } + else if (authentication == AuthenticationTypeEnum.ManagedIdentity) + { + Authentication = AuthenticationType.ManagedIdentity; + } + } } } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/DataFeed/DataFeedSources/AzureDataExplorerDataFeedSource.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/DataFeed/DataFeedSources/AzureDataExplorerDataFeedSource.cs index fb31ea6eec74c..05ae0ac5b7a0b 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/DataFeed/DataFeedSources/AzureDataExplorerDataFeedSource.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/DataFeed/DataFeedSources/AzureDataExplorerDataFeedSource.cs @@ -31,15 +31,65 @@ public AzureDataExplorerDataFeedSource(string connectionString, string query) Query = query; } - internal AzureDataExplorerDataFeedSource(SqlSourceParameter parameter) + internal AzureDataExplorerDataFeedSource(SqlSourceParameter parameter, AuthenticationTypeEnum? authentication, string credentialId) : base(DataFeedSourceType.AzureDataExplorer) { Argument.AssertNotNull(parameter, nameof(parameter)); ConnectionString = parameter.ConnectionString; Query = parameter.Query; + + SetAuthentication(authentication); + DatasourceCredentialId = credentialId; } + /// + /// The different ways of authenticating to an . Be aware that + /// some authentication types require you to have a in the service. In this + /// case, you also need to set the property to specify which credential + /// to use. Defaults to . + /// + public enum AuthenticationType + { + /// + /// Only uses the present in this + /// instance for authentication. + /// + Basic, + + /// + /// Uses Managed Identity authentication. + /// + ManagedIdentity, + + /// + /// Uses Service Principal authentication. You need to have a + /// in the server in order to use this type of authentication. + /// + ServicePrincipal, + + /// + /// Uses Service Principal authentication, but the client ID and the client secret must be + /// stored in a Key Vault resource. You need to have a + /// in the server in order to use this type of authentication. + /// + ServicePrincipalInKeyVault + }; + + /// + /// The method used to authenticate to this . Be aware that some + /// authentication types require you to have a in the service. In this + /// case, you also need to set the property to specify which credential + /// to use. Defaults to . + /// + public AuthenticationType? Authentication { get; set; } + + /// + /// The ID of the to use for authentication. The type of authentication to use + /// must also be specified in the property . + /// + public string DatasourceCredentialId { get; set; } + /// /// The query to retrieve the data to be ingested. /// @@ -65,5 +115,35 @@ public void UpdateConnectionString(string connectionString) Argument.AssertNotNullOrEmpty(connectionString, nameof(connectionString)); ConnectionString = connectionString; } + + internal AuthenticationTypeEnum? GetAuthenticationTypeEnum() => Authentication switch + { + null => default(AuthenticationTypeEnum?), + AuthenticationType.Basic => AuthenticationTypeEnum.Basic, + AuthenticationType.ManagedIdentity => AuthenticationTypeEnum.ManagedIdentity, + AuthenticationType.ServicePrincipal => AuthenticationTypeEnum.ServicePrincipal, + AuthenticationType.ServicePrincipalInKeyVault => AuthenticationTypeEnum.ServicePrincipalInKV, + _ => throw new InvalidOperationException($"Unknown authentication type: {Authentication}") + }; + + internal void SetAuthentication(AuthenticationTypeEnum? authentication) + { + if (authentication == AuthenticationTypeEnum.Basic) + { + Authentication = AuthenticationType.Basic; + } + else if (authentication == AuthenticationTypeEnum.ManagedIdentity) + { + Authentication = AuthenticationType.ManagedIdentity; + } + else if (authentication == AuthenticationTypeEnum.ServicePrincipal) + { + Authentication = AuthenticationType.ServicePrincipal; + } + else if (authentication == AuthenticationTypeEnum.ServicePrincipalInKV) + { + Authentication = AuthenticationType.ServicePrincipalInKeyVault; + } + } } } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/DataFeed/DataFeedSources/AzureDataLakeStorageGen2DataFeedSource.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/DataFeed/DataFeedSources/AzureDataLakeStorageGen2DataFeedSource.cs index f68dde3d2b8a8..b693077ac8245 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/DataFeed/DataFeedSources/AzureDataLakeStorageGen2DataFeedSource.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/DataFeed/DataFeedSources/AzureDataLakeStorageGen2DataFeedSource.cs @@ -64,7 +64,7 @@ public AzureDataLakeStorageGen2DataFeedSource(string accountName, string account FileTemplate = fileTemplate; } - internal AzureDataLakeStorageGen2DataFeedSource(AzureDataLakeStorageGen2Parameter parameter) + internal AzureDataLakeStorageGen2DataFeedSource(AzureDataLakeStorageGen2Parameter parameter, AuthenticationTypeEnum? authentication, string credentialId) : base(DataFeedSourceType.AzureDataLakeStorageGen2) { Argument.AssertNotNull(parameter, nameof(parameter)); @@ -74,8 +74,59 @@ internal AzureDataLakeStorageGen2DataFeedSource(AzureDataLakeStorageGen2Paramete FileSystemName = parameter.FileSystemName; DirectoryTemplate = parameter.DirectoryTemplate; FileTemplate = parameter.FileTemplate; + + SetAuthentication(authentication); + DatasourceCredentialId = credentialId; } + /// + /// The different ways of authenticating to an . Be aware that + /// some authentication types require you to have a in the service. In this + /// case, you also need to set the property to specify which credential + /// to use. Defaults to . + /// + public enum AuthenticationType + { + /// + /// Only uses the present in this + /// instance for authentication. + /// + Basic, + + /// + /// Uses a Data Lake Storage Gen 2 shared key for authentication. You need to have a + /// in the server in order to use this type of authentication. + /// + SharedKey, + + /// + /// Uses Service Principal authentication. You need to have a + /// in the server in order to use this type of authentication. + /// + ServicePrincipal, + + /// + /// Uses Service Principal authentication, but the client ID and the client secret must be + /// stored in a Key Vault resource. You need to have a + /// in the server in order to use this type of authentication. + /// + ServicePrincipalInKeyVault + }; + + /// + /// The method used to authenticate to this . Be aware that some + /// authentication types require you to have a in the service. In this + /// case, you also need to set the property to specify which credential + /// to use. Defaults to . + /// + public AuthenticationType? Authentication { get; set; } + + /// + /// The ID of the to use for authentication. The type of authentication to use + /// must also be specified in the property . + /// + public string DatasourceCredentialId { get; set; } + /// /// The name of the Storage Account. /// @@ -138,5 +189,35 @@ public void UpdateAccountKey(string accountKey) Argument.AssertNotNullOrEmpty(accountKey, nameof(accountKey)); AccountKey = accountKey; } + + internal AuthenticationTypeEnum? GetAuthenticationTypeEnum() => Authentication switch + { + null => default(AuthenticationTypeEnum?), + AuthenticationType.Basic => AuthenticationTypeEnum.Basic, + AuthenticationType.SharedKey => AuthenticationTypeEnum.DataLakeGen2SharedKey, + AuthenticationType.ServicePrincipal => AuthenticationTypeEnum.ServicePrincipal, + AuthenticationType.ServicePrincipalInKeyVault => AuthenticationTypeEnum.ServicePrincipalInKV, + _ => throw new InvalidOperationException($"Unknown authentication type: {Authentication}") + }; + + internal void SetAuthentication(AuthenticationTypeEnum? authentication) + { + if (authentication == AuthenticationTypeEnum.Basic) + { + Authentication = AuthenticationType.Basic; + } + else if (authentication == AuthenticationTypeEnum.DataLakeGen2SharedKey) + { + Authentication = AuthenticationType.SharedKey; + } + else if (authentication == AuthenticationTypeEnum.ServicePrincipal) + { + Authentication = AuthenticationType.ServicePrincipal; + } + else if (authentication == AuthenticationTypeEnum.ServicePrincipalInKV) + { + Authentication = AuthenticationType.ServicePrincipalInKeyVault; + } + } } } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/DataFeed/DataFeedSources/SqlServerDataFeedSource.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/DataFeed/DataFeedSources/SqlServerDataFeedSource.cs index 625f082d5dfc5..1250a05e05cf2 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/DataFeed/DataFeedSources/SqlServerDataFeedSource.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/DataFeed/DataFeedSources/SqlServerDataFeedSource.cs @@ -31,15 +31,72 @@ public SqlServerDataFeedSource(string connectionString, string query) Query = query; } - internal SqlServerDataFeedSource(SqlSourceParameter parameter) + internal SqlServerDataFeedSource(SqlSourceParameter parameter, AuthenticationTypeEnum? authentication, string credentialId) : base(DataFeedSourceType.SqlServer) { Argument.AssertNotNull(parameter, nameof(parameter)); ConnectionString = parameter.ConnectionString; Query = parameter.Query; + + SetAuthentication(authentication); + DatasourceCredentialId = credentialId; } + /// + /// The different ways of authenticating to a . Be aware that + /// some authentication types require you to have a in the service. In this + /// case, you also need to set the property to specify which credential + /// to use. Defaults to . + /// + public enum AuthenticationType + { + /// + /// Only uses the present in this + /// instance for authentication. + /// + Basic, + + /// + /// Uses Managed Identity authentication. + /// + ManagedIdentity, + + /// + /// Uses a SQL Server connection string for authentication. You need to have a + /// in the server in order to use this type of + /// authentication. + /// + SqlConnectionString, + + /// + /// Uses Service Principal authentication. You need to have a + /// in the server in order to use this type of authentication. + /// + ServicePrincipal, + + /// + /// Uses Service Principal authentication, but the client ID and the client secret must be + /// stored in a Key Vault resource. You need to have a + /// in the server in order to use this type of authentication. + /// + ServicePrincipalInKeyVault + }; + + /// + /// The method used to authenticate to this . Be aware that some + /// authentication types require you to have a in the service. In this + /// case, you also need to set the property to specify which credential + /// to use. Defaults to . + /// + public AuthenticationType? Authentication { get; set; } + + /// + /// The ID of the to use for authentication. The type of authentication to use + /// must also be specified in the property . + /// + public string DatasourceCredentialId { get; set; } + /// /// The query to retrieve the data to be ingested. /// @@ -65,5 +122,40 @@ public void UpdateConnectionString(string connectionString) Argument.AssertNotNullOrEmpty(connectionString, nameof(connectionString)); ConnectionString = connectionString; } + + internal AuthenticationTypeEnum? GetAuthenticationTypeEnum() => Authentication switch + { + null => default(AuthenticationTypeEnum?), + AuthenticationType.Basic => AuthenticationTypeEnum.Basic, + AuthenticationType.ManagedIdentity => AuthenticationTypeEnum.ManagedIdentity, + AuthenticationType.SqlConnectionString => AuthenticationTypeEnum.AzureSQLConnectionString, + AuthenticationType.ServicePrincipal => AuthenticationTypeEnum.ServicePrincipal, + AuthenticationType.ServicePrincipalInKeyVault => AuthenticationTypeEnum.ServicePrincipalInKV, + _ => throw new InvalidOperationException($"Unknown authentication type: {Authentication}") + }; + + internal void SetAuthentication(AuthenticationTypeEnum? authentication) + { + if (authentication == AuthenticationTypeEnum.Basic) + { + Authentication = AuthenticationType.Basic; + } + else if (authentication == AuthenticationTypeEnum.ManagedIdentity) + { + Authentication = AuthenticationType.ManagedIdentity; + } + else if (authentication == AuthenticationTypeEnum.AzureSQLConnectionString) + { + Authentication = AuthenticationType.SqlConnectionString; + } + else if (authentication == AuthenticationTypeEnum.ServicePrincipal) + { + Authentication = AuthenticationType.ServicePrincipal; + } + else if (authentication == AuthenticationTypeEnum.ServicePrincipalInKV) + { + Authentication = AuthenticationType.ServicePrincipalInKeyVault; + } + } } } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/DisposableDatasourceCredential.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/DisposableDatasourceCredential.cs index a4ea1ee90e30d..854ca72203c2a 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/DisposableDatasourceCredential.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/DisposableDatasourceCredential.cs @@ -39,8 +39,8 @@ private DisposableDatasourceCredential(MetricsAdvisorAdministrationClient adminC /// /// Creates a datasource credential using the specified . - /// A instance is returned, from which the created credential can - /// be obtained. Upon disposal, the associated credential will be deleted. + /// A instance is returned, from which the created credential + /// can be obtained. Upon disposal, the created credential will be deleted. /// /// The client to use for creating and for deleting the datasource credential. /// Specifies how the created should be configured. @@ -55,6 +55,30 @@ public static async Task CreateDatasourceCredent return new DisposableDatasourceCredential(adminClient, createdCredential); } + /// + /// Creates a datasource credential using the specified . + /// A instance is returned, from which the created credential can + /// be obtained. Except for the name, all of its required properties are initialized with mock values. Upon disposal, + /// the created credential will be deleted. + /// + /// The client to use for creating and for deleting the datasource credential. + /// The name of the datasource credential to be created. + /// Specifies which type of should be created. + /// A instance from which the created credential can be obtained. + public static async Task CreateDatasourceCredentialAsync(MetricsAdvisorAdministrationClient adminClient, string name, string authenticationType) + { + DatasourceCredential credential = authenticationType switch + { + "ServicePrincipal" => new ServicePrincipalDatasourceCredential(name, "mock", "mock", "mock"), + "ServicePrincipalInKeyVault" => new ServicePrincipalInKeyVaultDatasourceCredential(name, new Uri("https://mock.com/"), "mock", "mock", "mock", "mock", "mock"), + "SharedKey" => new DataLakeGen2SharedKeyDatasourceCredential(name, "mock"), + "SqlConnectionString" => new SqlConnectionStringDatasourceCredential(name, "mock"), + _ => throw new ArgumentOutOfRangeException($"Invalid datasource credential type: {authenticationType}") + }; + + return await CreateDatasourceCredentialAsync(adminClient, credential).ConfigureAwait(false); + } + /// /// Deletes the datasource credential this instance is associated with. /// diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorAdministrationClient/DataFeedLiveTests.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorAdministrationClient/DataFeedLiveTests.cs index b92875b50301b..bebf178429a6c 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorAdministrationClient/DataFeedLiveTests.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorAdministrationClient/DataFeedLiveTests.cs @@ -566,6 +566,178 @@ public async Task CreateAndGetSqlServerDataFeedWithOptionalMembers() ValidateSqlServerDataSource(createdDataFeed.DataSource as SqlServerDataFeedSource); } + [RecordedTest] + [TestCase(AzureBlobDataFeedSource.AuthenticationType.Basic)] + [TestCase(AzureBlobDataFeedSource.AuthenticationType.ManagedIdentity)] + public async Task CreateAndGetAzureBlobDataFeedWithAuthentication(AzureBlobDataFeedSource.AuthenticationType authentication) + { + MetricsAdvisorAdministrationClient adminClient = GetMetricsAdvisorAdministrationClient(); + + var dataFeedName = Recording.GenerateAlphaNumericId("dataFeed"); + var dataSource = new AzureBlobDataFeedSource("mock", "mock", "mock") + { + Authentication = authentication + }; + DataFeed dataFeedToCreate = GetDataFeedWithMinimumSetup(dataFeedName, dataSource); + + await using var disposableDataFeed = await DisposableDataFeed.CreateDataFeedAsync(adminClient, dataFeedToCreate); + + DataFeed createdDataFeed = await adminClient.GetDataFeedAsync(disposableDataFeed.Id); + AzureBlobDataFeedSource createdDataSource = createdDataFeed.DataSource as AzureBlobDataFeedSource; + + Assert.That(createdDataSource.Authentication, Is.EqualTo(authentication)); + } + + [RecordedTest] + [TestCase(AzureDataExplorerDataFeedSource.AuthenticationType.Basic)] + [TestCase(AzureDataExplorerDataFeedSource.AuthenticationType.ManagedIdentity)] + public async Task CreateAndGetAzureDataExplorerDataFeedWithAuthentication(AzureDataExplorerDataFeedSource.AuthenticationType authentication) + { + MetricsAdvisorAdministrationClient adminClient = GetMetricsAdvisorAdministrationClient(); + + var dataFeedName = Recording.GenerateAlphaNumericId("dataFeed"); + var dataSource = new AzureDataExplorerDataFeedSource("mock", "mock") + { + Authentication = authentication + }; + DataFeed dataFeedToCreate = GetDataFeedWithMinimumSetup(dataFeedName, dataSource); + + await using var disposableDataFeed = await DisposableDataFeed.CreateDataFeedAsync(adminClient, dataFeedToCreate); + + DataFeed createdDataFeed = await adminClient.GetDataFeedAsync(disposableDataFeed.Id); + AzureDataExplorerDataFeedSource createdDataSource = createdDataFeed.DataSource as AzureDataExplorerDataFeedSource; + + Assert.That(createdDataSource.Authentication, Is.EqualTo(authentication)); + } + + [RecordedTest] + [TestCase(AzureDataExplorerDataFeedSource.AuthenticationType.ServicePrincipal)] + [TestCase(AzureDataExplorerDataFeedSource.AuthenticationType.ServicePrincipalInKeyVault)] + public async Task CreateAndGetAzureDataExplorerDataFeedWithCredentialAuthentication(AzureDataExplorerDataFeedSource.AuthenticationType authentication) + { + MetricsAdvisorAdministrationClient adminClient = GetMetricsAdvisorAdministrationClient(); + + var credentialName = Recording.GenerateAlphaNumericId("credential"); + await using var disposableCredential = await DisposableDatasourceCredential.CreateDatasourceCredentialAsync(adminClient, credentialName, authentication.ToString()); + string credentialId = disposableCredential.Credential.Id; + + var dataFeedName = Recording.GenerateAlphaNumericId("dataFeed"); + var dataSource = new AzureDataExplorerDataFeedSource("mock", "mock") + { + Authentication = authentication, + DatasourceCredentialId = credentialId + }; + DataFeed dataFeedToCreate = GetDataFeedWithMinimumSetup(dataFeedName, dataSource); + + await using var disposableDataFeed = await DisposableDataFeed.CreateDataFeedAsync(adminClient, dataFeedToCreate); + + DataFeed createdDataFeed = await adminClient.GetDataFeedAsync(disposableDataFeed.Id); + AzureDataExplorerDataFeedSource createdDataSource = createdDataFeed.DataSource as AzureDataExplorerDataFeedSource; + + Assert.That(createdDataSource.Authentication, Is.EqualTo(authentication)); + Assert.That(createdDataSource.DatasourceCredentialId, Is.EqualTo(credentialId)); + } + + [RecordedTest] + public async Task CreateAndGetAzureDataLakeStorageGen2DataFeedWithAuthentication() + { + MetricsAdvisorAdministrationClient adminClient = GetMetricsAdvisorAdministrationClient(); + + var dataFeedName = Recording.GenerateAlphaNumericId("dataFeed"); + var dataSource = new AzureDataLakeStorageGen2DataFeedSource("mock", "mock", "mock", "mock", "mock") + { + Authentication = AzureDataLakeStorageGen2DataFeedSource.AuthenticationType.Basic + }; + DataFeed dataFeedToCreate = GetDataFeedWithMinimumSetup(dataFeedName, dataSource); + + await using var disposableDataFeed = await DisposableDataFeed.CreateDataFeedAsync(adminClient, dataFeedToCreate); + + DataFeed createdDataFeed = await adminClient.GetDataFeedAsync(disposableDataFeed.Id); + AzureDataLakeStorageGen2DataFeedSource createdDataSource = createdDataFeed.DataSource as AzureDataLakeStorageGen2DataFeedSource; + + Assert.That(createdDataSource.Authentication, Is.EqualTo(AzureDataLakeStorageGen2DataFeedSource.AuthenticationType.Basic)); + } + + [RecordedTest] + [TestCase(AzureDataLakeStorageGen2DataFeedSource.AuthenticationType.ServicePrincipal)] + [TestCase(AzureDataLakeStorageGen2DataFeedSource.AuthenticationType.ServicePrincipalInKeyVault)] + [TestCase(AzureDataLakeStorageGen2DataFeedSource.AuthenticationType.SharedKey)] + public async Task CreateAndGetAzureDataLakeStorageGen2DataFeedWithCredentialAuthentication(AzureDataLakeStorageGen2DataFeedSource.AuthenticationType authentication) + { + MetricsAdvisorAdministrationClient adminClient = GetMetricsAdvisorAdministrationClient(); + + var credentialName = Recording.GenerateAlphaNumericId("credential"); + await using var disposableCredential = await DisposableDatasourceCredential.CreateDatasourceCredentialAsync(adminClient, credentialName, authentication.ToString()); + string credentialId = disposableCredential.Credential.Id; + + var dataFeedName = Recording.GenerateAlphaNumericId("dataFeed"); + var dataSource = new AzureDataLakeStorageGen2DataFeedSource("mock", "mock", "mock", "mock", "mock") + { + Authentication = authentication, + DatasourceCredentialId = credentialId + }; + DataFeed dataFeedToCreate = GetDataFeedWithMinimumSetup(dataFeedName, dataSource); + + await using var disposableDataFeed = await DisposableDataFeed.CreateDataFeedAsync(adminClient, dataFeedToCreate); + + DataFeed createdDataFeed = await adminClient.GetDataFeedAsync(disposableDataFeed.Id); + AzureDataLakeStorageGen2DataFeedSource createdDataSource = createdDataFeed.DataSource as AzureDataLakeStorageGen2DataFeedSource; + + Assert.That(createdDataSource.Authentication, Is.EqualTo(authentication)); + Assert.That(createdDataSource.DatasourceCredentialId, Is.EqualTo(credentialId)); + } + + [RecordedTest] + [TestCase(SqlServerDataFeedSource.AuthenticationType.Basic)] + [TestCase(SqlServerDataFeedSource.AuthenticationType.ManagedIdentity)] + public async Task CreateAndGetSqlServerDataFeedWithAuthentication(SqlServerDataFeedSource.AuthenticationType authentication) + { + MetricsAdvisorAdministrationClient adminClient = GetMetricsAdvisorAdministrationClient(); + + var dataFeedName = Recording.GenerateAlphaNumericId("dataFeed"); + var dataSource = new SqlServerDataFeedSource("mock", "mock") + { + Authentication = authentication + }; + DataFeed dataFeedToCreate = GetDataFeedWithMinimumSetup(dataFeedName, dataSource); + + await using var disposableDataFeed = await DisposableDataFeed.CreateDataFeedAsync(adminClient, dataFeedToCreate); + + DataFeed createdDataFeed = await adminClient.GetDataFeedAsync(disposableDataFeed.Id); + SqlServerDataFeedSource createdDataSource = createdDataFeed.DataSource as SqlServerDataFeedSource; + + Assert.That(createdDataSource.Authentication, Is.EqualTo(authentication)); + } + + [RecordedTest] + [TestCase(SqlServerDataFeedSource.AuthenticationType.ServicePrincipal)] + [TestCase(SqlServerDataFeedSource.AuthenticationType.ServicePrincipalInKeyVault)] + [TestCase(SqlServerDataFeedSource.AuthenticationType.SqlConnectionString)] + public async Task CreateAndGetSqlServerDataFeedWithCredentialAuthentication(SqlServerDataFeedSource.AuthenticationType authentication) + { + MetricsAdvisorAdministrationClient adminClient = GetMetricsAdvisorAdministrationClient(); + + var credentialName = Recording.GenerateAlphaNumericId("credential"); + await using var disposableCredential = await DisposableDatasourceCredential.CreateDatasourceCredentialAsync(adminClient, credentialName, authentication.ToString()); + string credentialId = disposableCredential.Credential.Id; + + var dataFeedName = Recording.GenerateAlphaNumericId("dataFeed"); + var dataSource = new SqlServerDataFeedSource("mock", "mock") + { + Authentication = authentication, + DatasourceCredentialId = credentialId + }; + DataFeed dataFeedToCreate = GetDataFeedWithMinimumSetup(dataFeedName, dataSource); + + await using var disposableDataFeed = await DisposableDataFeed.CreateDataFeedAsync(adminClient, dataFeedToCreate); + + DataFeed createdDataFeed = await adminClient.GetDataFeedAsync(disposableDataFeed.Id); + SqlServerDataFeedSource createdDataSource = createdDataFeed.DataSource as SqlServerDataFeedSource; + + Assert.That(createdDataSource.Authentication, Is.EqualTo(authentication)); + Assert.That(createdDataSource.DatasourceCredentialId, Is.EqualTo(credentialId)); + } + [RecordedTest] public async Task UpdateAzureApplicationInsightsDataFeedWithMinimumSetupAndGetInstance() { @@ -1770,6 +1942,192 @@ public async Task UpdateSqlServerDataFeedWithEveryMemberAndNewInstance() ValidateSqlServerDataSource(updatedDataFeed.DataSource as SqlServerDataFeedSource); } + [RecordedTest] + [TestCase(AzureBlobDataFeedSource.AuthenticationType.Basic)] + [TestCase(AzureBlobDataFeedSource.AuthenticationType.ManagedIdentity)] + public async Task UpdateAzureBlobDataFeedWithAuthentication(AzureBlobDataFeedSource.AuthenticationType authentication) + { + MetricsAdvisorAdministrationClient adminClient = GetMetricsAdvisorAdministrationClient(); + + var dataFeedName = Recording.GenerateAlphaNumericId("dataFeed"); + var dataSource = new AzureBlobDataFeedSource("mock", "mock", "mock"); + DataFeed dataFeedToCreate = GetDataFeedWithMinimumSetup(dataFeedName, dataSource); + + await using var disposableDataFeed = await DisposableDataFeed.CreateDataFeedAsync(adminClient, dataFeedToCreate); + + DataFeed dataFeedToUpdate = await adminClient.GetDataFeedAsync(disposableDataFeed.Id); + AzureBlobDataFeedSource dataSourceToUpdate = dataFeedToUpdate.DataSource as AzureBlobDataFeedSource; + + dataSourceToUpdate.Authentication = authentication; + + DataFeed updatedDataFeed = await adminClient.UpdateDataFeedAsync(dataFeedToUpdate); + AzureBlobDataFeedSource updatedDataSource = updatedDataFeed.DataSource as AzureBlobDataFeedSource; + + Assert.That(updatedDataSource.Authentication, Is.EqualTo(authentication)); + } + + [RecordedTest] + [TestCase(AzureDataExplorerDataFeedSource.AuthenticationType.Basic)] + [TestCase(AzureDataExplorerDataFeedSource.AuthenticationType.ManagedIdentity)] + public async Task UpdateAzureDataExplorerDataFeedWithAuthentication(AzureDataExplorerDataFeedSource.AuthenticationType authentication) + { + MetricsAdvisorAdministrationClient adminClient = GetMetricsAdvisorAdministrationClient(); + + var dataFeedName = Recording.GenerateAlphaNumericId("dataFeed"); + var dataSource = new AzureDataExplorerDataFeedSource("mock", "mock"); + DataFeed dataFeedToCreate = GetDataFeedWithMinimumSetup(dataFeedName, dataSource); + + await using var disposableDataFeed = await DisposableDataFeed.CreateDataFeedAsync(adminClient, dataFeedToCreate); + + DataFeed dataFeedToUpdate = await adminClient.GetDataFeedAsync(disposableDataFeed.Id); + AzureDataExplorerDataFeedSource dataSourceToUpdate = dataFeedToUpdate.DataSource as AzureDataExplorerDataFeedSource; + + dataSourceToUpdate.Authentication = authentication; + + DataFeed updatedDataFeed = await adminClient.UpdateDataFeedAsync(dataFeedToUpdate); + AzureDataExplorerDataFeedSource updatedDataSource = updatedDataFeed.DataSource as AzureDataExplorerDataFeedSource; + + Assert.That(updatedDataSource.Authentication, Is.EqualTo(authentication)); + } + + [RecordedTest] + [TestCase(AzureDataExplorerDataFeedSource.AuthenticationType.ServicePrincipal)] + [TestCase(AzureDataExplorerDataFeedSource.AuthenticationType.ServicePrincipalInKeyVault)] + public async Task UpdateAzureDataExplorerDataFeedWithCredentialAuthentication(AzureDataExplorerDataFeedSource.AuthenticationType authentication) + { + MetricsAdvisorAdministrationClient adminClient = GetMetricsAdvisorAdministrationClient(); + + var credentialName = Recording.GenerateAlphaNumericId("credential"); + await using var disposableCredential = await DisposableDatasourceCredential.CreateDatasourceCredentialAsync(adminClient, credentialName, authentication.ToString()); + string credentialId = disposableCredential.Credential.Id; + + var dataFeedName = Recording.GenerateAlphaNumericId("dataFeed"); + var dataSource = new AzureDataExplorerDataFeedSource("mock", "mock"); + DataFeed dataFeedToCreate = GetDataFeedWithMinimumSetup(dataFeedName, dataSource); + + await using var disposableDataFeed = await DisposableDataFeed.CreateDataFeedAsync(adminClient, dataFeedToCreate); + + DataFeed dataFeedToUpdate = await adminClient.GetDataFeedAsync(disposableDataFeed.Id); + AzureDataExplorerDataFeedSource dataSourceToUpdate = dataFeedToUpdate.DataSource as AzureDataExplorerDataFeedSource; + + dataSourceToUpdate.Authentication = authentication; + dataSourceToUpdate.DatasourceCredentialId = credentialId; + + DataFeed updatedDataFeed = await adminClient.UpdateDataFeedAsync(dataFeedToUpdate); + AzureDataExplorerDataFeedSource updatedDataSource = updatedDataFeed.DataSource as AzureDataExplorerDataFeedSource; + + Assert.That(updatedDataSource.Authentication, Is.EqualTo(authentication)); + Assert.That(updatedDataSource.DatasourceCredentialId, Is.EqualTo(credentialId)); + } + + [RecordedTest] + public async Task UpdateAzureDataLakeStorageGen2DataFeedWithAuthentication() + { + MetricsAdvisorAdministrationClient adminClient = GetMetricsAdvisorAdministrationClient(); + + var dataFeedName = Recording.GenerateAlphaNumericId("dataFeed"); + var dataSource = new AzureDataLakeStorageGen2DataFeedSource("mock", "mock", "mock", "mock", "mock"); + DataFeed dataFeedToCreate = GetDataFeedWithMinimumSetup(dataFeedName, dataSource); + + await using var disposableDataFeed = await DisposableDataFeed.CreateDataFeedAsync(adminClient, dataFeedToCreate); + + DataFeed dataFeedToUpdate = await adminClient.GetDataFeedAsync(disposableDataFeed.Id); + AzureDataLakeStorageGen2DataFeedSource dataSourceToUpdate = dataFeedToUpdate.DataSource as AzureDataLakeStorageGen2DataFeedSource; + + dataSourceToUpdate.Authentication = AzureDataLakeStorageGen2DataFeedSource.AuthenticationType.Basic; + + DataFeed updatedDataFeed = await adminClient.UpdateDataFeedAsync(dataFeedToUpdate); + AzureDataLakeStorageGen2DataFeedSource updatedDataSource = updatedDataFeed.DataSource as AzureDataLakeStorageGen2DataFeedSource; + + Assert.That(updatedDataSource.Authentication, Is.EqualTo(AzureDataLakeStorageGen2DataFeedSource.AuthenticationType.Basic)); + } + + [RecordedTest] + [TestCase(AzureDataLakeStorageGen2DataFeedSource.AuthenticationType.ServicePrincipal)] + [TestCase(AzureDataLakeStorageGen2DataFeedSource.AuthenticationType.ServicePrincipalInKeyVault)] + [TestCase(AzureDataLakeStorageGen2DataFeedSource.AuthenticationType.SharedKey)] + public async Task UpdateAzureDataLakeStorageGen2DataFeedWithCredentialAuthentication(AzureDataLakeStorageGen2DataFeedSource.AuthenticationType authentication) + { + MetricsAdvisorAdministrationClient adminClient = GetMetricsAdvisorAdministrationClient(); + + var credentialName = Recording.GenerateAlphaNumericId("credential"); + await using var disposableCredential = await DisposableDatasourceCredential.CreateDatasourceCredentialAsync(adminClient, credentialName, authentication.ToString()); + string credentialId = disposableCredential.Credential.Id; + + var dataFeedName = Recording.GenerateAlphaNumericId("dataFeed"); + var dataSource = new AzureDataLakeStorageGen2DataFeedSource("mock", "mock", "mock", "mock", "mock"); + DataFeed dataFeedToCreate = GetDataFeedWithMinimumSetup(dataFeedName, dataSource); + + await using var disposableDataFeed = await DisposableDataFeed.CreateDataFeedAsync(adminClient, dataFeedToCreate); + + DataFeed dataFeedToUpdate = await adminClient.GetDataFeedAsync(disposableDataFeed.Id); + AzureDataLakeStorageGen2DataFeedSource dataSourceToUpdate = dataFeedToUpdate.DataSource as AzureDataLakeStorageGen2DataFeedSource; + + dataSourceToUpdate.Authentication = authentication; + dataSourceToUpdate.DatasourceCredentialId = credentialId; + + DataFeed updatedDataFeed = await adminClient.UpdateDataFeedAsync(dataFeedToUpdate); + AzureDataLakeStorageGen2DataFeedSource updatedDataSource = updatedDataFeed.DataSource as AzureDataLakeStorageGen2DataFeedSource; + + Assert.That(updatedDataSource.Authentication, Is.EqualTo(authentication)); + Assert.That(updatedDataSource.DatasourceCredentialId, Is.EqualTo(credentialId)); + } + + [RecordedTest] + [TestCase(SqlServerDataFeedSource.AuthenticationType.Basic)] + [TestCase(SqlServerDataFeedSource.AuthenticationType.ManagedIdentity)] + public async Task UpdateSqlServerDataFeedWithAuthentication(SqlServerDataFeedSource.AuthenticationType authentication) + { + MetricsAdvisorAdministrationClient adminClient = GetMetricsAdvisorAdministrationClient(); + + var dataFeedName = Recording.GenerateAlphaNumericId("dataFeed"); + var dataSource = new SqlServerDataFeedSource("mock", "mock"); + DataFeed dataFeedToCreate = GetDataFeedWithMinimumSetup(dataFeedName, dataSource); + + await using var disposableDataFeed = await DisposableDataFeed.CreateDataFeedAsync(adminClient, dataFeedToCreate); + + DataFeed dataFeedToUpdate = await adminClient.GetDataFeedAsync(disposableDataFeed.Id); + SqlServerDataFeedSource dataSourceToUpdate = dataFeedToUpdate.DataSource as SqlServerDataFeedSource; + + dataSourceToUpdate.Authentication = authentication; + + DataFeed updatedDataFeed = await adminClient.UpdateDataFeedAsync(dataFeedToUpdate); + SqlServerDataFeedSource updatedDataSource = updatedDataFeed.DataSource as SqlServerDataFeedSource; + + Assert.That(updatedDataSource.Authentication, Is.EqualTo(authentication)); + } + + [RecordedTest] + [TestCase(SqlServerDataFeedSource.AuthenticationType.ServicePrincipal)] + [TestCase(SqlServerDataFeedSource.AuthenticationType.ServicePrincipalInKeyVault)] + [TestCase(SqlServerDataFeedSource.AuthenticationType.SqlConnectionString)] + public async Task UpdateSqlServerDataFeedWithCredentialAuthentication(SqlServerDataFeedSource.AuthenticationType authentication) + { + MetricsAdvisorAdministrationClient adminClient = GetMetricsAdvisorAdministrationClient(); + + var credentialName = Recording.GenerateAlphaNumericId("credential"); + await using var disposableCredential = await DisposableDatasourceCredential.CreateDatasourceCredentialAsync(adminClient, credentialName, authentication.ToString()); + string credentialId = disposableCredential.Credential.Id; + + var dataFeedName = Recording.GenerateAlphaNumericId("dataFeed"); + var dataSource = new SqlServerDataFeedSource("mock", "mock"); + DataFeed dataFeedToCreate = GetDataFeedWithMinimumSetup(dataFeedName, dataSource); + + await using var disposableDataFeed = await DisposableDataFeed.CreateDataFeedAsync(adminClient, dataFeedToCreate); + + DataFeed dataFeedToUpdate = await adminClient.GetDataFeedAsync(disposableDataFeed.Id); + SqlServerDataFeedSource dataSourceToUpdate = dataFeedToUpdate.DataSource as SqlServerDataFeedSource; + + dataSourceToUpdate.Authentication = authentication; + dataSourceToUpdate.DatasourceCredentialId = credentialId; + + DataFeed updatedDataFeed = await adminClient.UpdateDataFeedAsync(dataFeedToUpdate); + SqlServerDataFeedSource updatedDataSource = updatedDataFeed.DataSource as SqlServerDataFeedSource; + + Assert.That(updatedDataSource.Authentication, Is.EqualTo(authentication)); + Assert.That(updatedDataSource.DatasourceCredentialId, Is.EqualTo(credentialId)); + } + [RecordedTest] [TestCase(true)] [TestCase(false)] diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureBlobDataFeedWithAuthentication(Basic).json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureBlobDataFeedWithAuthentication(Basic).json new file mode 100644 index 0000000000000..b86f705ad6fa3 --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureBlobDataFeedWithAuthentication(Basic).json @@ -0,0 +1,214 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "288", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-f97bbfd3ff6e534c8804a9a62202a936-cfb57ee0f5e5d040-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "0e050b1712011dda7e8e956ad6c97d2a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "container": "mock", + "blobTemplate": "mock" + }, + "dataSourceType": "AzureBlob", + "dataFeedName": "dataFeedDcnvjVhe", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z", + "authenticationType": "Basic" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "3d0a63a6-6458-442e-8c54-f39b983e1002", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:04 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/061b6b2a-5be8-4007-acbb-6e766ae33bc1", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "678", + "x-request-id": "3d0a63a6-6458-442e-8c54-f39b983e1002" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/061b6b2a-5be8-4007-acbb-6e766ae33bc1", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-f97bbfd3ff6e534c8804a9a62202a936-317a1216b25f8446-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "4a71c092f1007b4a3a974f8dda8ec093", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "dcb76e16-f01d-4201-8b25-e3d117f773af", + "Content-Length": "898", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:05 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "167", + "x-request-id": "dcb76e16-f01d-4201-8b25-e3d117f773af" + }, + "ResponseBody": { + "dataFeedId": "061b6b2a-5be8-4007-acbb-6e766ae33bc1", + "dataFeedName": "dataFeedDcnvjVhe", + "metrics": [ + { + "metricId": "5189b080-7347-4ccc-ba82-f000750ea2e3", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureBlob", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:04Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "container": "mock", + "blobTemplate": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/061b6b2a-5be8-4007-acbb-6e766ae33bc1", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-809a6ff4c569444aaf01e6a7369b56ee-027d2413de438346-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "75489e51586ccadc70d347f47b131699", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "8237ce8d-68b8-445b-be25-c3a02d4a57f3", + "Content-Length": "898", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:05 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "181", + "x-request-id": "8237ce8d-68b8-445b-be25-c3a02d4a57f3" + }, + "ResponseBody": { + "dataFeedId": "061b6b2a-5be8-4007-acbb-6e766ae33bc1", + "dataFeedName": "dataFeedDcnvjVhe", + "metrics": [ + { + "metricId": "5189b080-7347-4ccc-ba82-f000750ea2e3", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureBlob", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:04Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "container": "mock", + "blobTemplate": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/061b6b2a-5be8-4007-acbb-6e766ae33bc1", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-dc99c9f7ea9520429762167efa11c806-5f8aa6ae6d6ef14a-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "15dd7fa80ca52578c089d369c34c43ef", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "c6814c8f-2aff-48d9-b7ac-9f523b803626", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:05 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "299", + "x-request-id": "c6814c8f-2aff-48d9-b7ac-9f523b803626" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "1935546542" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureBlobDataFeedWithAuthentication(Basic)Async.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureBlobDataFeedWithAuthentication(Basic)Async.json new file mode 100644 index 0000000000000..9c2020ac5f97f --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureBlobDataFeedWithAuthentication(Basic)Async.json @@ -0,0 +1,214 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "288", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-b2f78848b66b45498b4463680245a4d1-5959c18315250141-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "9f6f6f3d4944bbcc41487987318e3a08", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "container": "mock", + "blobTemplate": "mock" + }, + "dataSourceType": "AzureBlob", + "dataFeedName": "dataFeedHXKLzHTj", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z", + "authenticationType": "Basic" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "9538f742-23ab-43e8-817c-36dc2baf1cc4", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:39 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/543851b2-acaa-419c-8ab3-c1cbeb83a59f", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "537", + "x-request-id": "9538f742-23ab-43e8-817c-36dc2baf1cc4" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/543851b2-acaa-419c-8ab3-c1cbeb83a59f", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-b2f78848b66b45498b4463680245a4d1-8c807d4ce2df174d-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "86411b39b013551c3f089bc3fbdb0d08", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "ed7cc61e-bb51-40d9-8530-04c1ce42cd8c", + "Content-Length": "898", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:39 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "179", + "x-request-id": "ed7cc61e-bb51-40d9-8530-04c1ce42cd8c" + }, + "ResponseBody": { + "dataFeedId": "543851b2-acaa-419c-8ab3-c1cbeb83a59f", + "dataFeedName": "dataFeedHXKLzHTj", + "metrics": [ + { + "metricId": "3e117479-cd56-47fd-8a5c-9d03b190dd1f", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureBlob", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:39Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "container": "mock", + "blobTemplate": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/543851b2-acaa-419c-8ab3-c1cbeb83a59f", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-da8c29a4437eb7498d2f47c0d20cb9e4-a7ddaebeb72a8a4e-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "930cf4472ce6121627a7690171cc8cae", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "35873285-846d-4687-8cba-01e690fce66f", + "Content-Length": "898", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:40 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "158", + "x-request-id": "35873285-846d-4687-8cba-01e690fce66f" + }, + "ResponseBody": { + "dataFeedId": "543851b2-acaa-419c-8ab3-c1cbeb83a59f", + "dataFeedName": "dataFeedHXKLzHTj", + "metrics": [ + { + "metricId": "3e117479-cd56-47fd-8a5c-9d03b190dd1f", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureBlob", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:39Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "container": "mock", + "blobTemplate": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/543851b2-acaa-419c-8ab3-c1cbeb83a59f", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-18fee825853e0c40bb092aa0c6585a31-9849dea52cf02a4f-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "7f00d271ac488dfe521a603bad09c065", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "a5610210-e985-4006-935b-5970a846a500", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:40 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "314", + "x-request-id": "a5610210-e985-4006-935b-5970a846a500" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "1141017231" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureBlobDataFeedWithAuthentication(ManagedIdentity).json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureBlobDataFeedWithAuthentication(ManagedIdentity).json new file mode 100644 index 0000000000000..e67753334d1c7 --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureBlobDataFeedWithAuthentication(ManagedIdentity).json @@ -0,0 +1,214 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "298", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-3d8b9de3f7439340a3db8d65e10a47c7-892487ab632b664d-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "e97f6b54f923b27b204a3dbbb8503e23", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "container": "mock", + "blobTemplate": "mock" + }, + "dataSourceType": "AzureBlob", + "dataFeedName": "dataFeedmkqKCyx8", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z", + "authenticationType": "ManagedIdentity" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "b95f0223-800b-4b6c-857d-b0f7ee5c3d1a", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:06 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/84159bb9-e585-4e8f-9cc9-c82baea258ad", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "421", + "x-request-id": "b95f0223-800b-4b6c-857d-b0f7ee5c3d1a" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/84159bb9-e585-4e8f-9cc9-c82baea258ad", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-3d8b9de3f7439340a3db8d65e10a47c7-a79594c29182be45-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "09b1dc8abb220a7ad9434b1fbaa9670c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "53b5a5e2-9990-4751-bfa5-ec6fc70a6ae1", + "Content-Length": "908", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:06 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "173", + "x-request-id": "53b5a5e2-9990-4751-bfa5-ec6fc70a6ae1" + }, + "ResponseBody": { + "dataFeedId": "84159bb9-e585-4e8f-9cc9-c82baea258ad", + "dataFeedName": "dataFeedmkqKCyx8", + "metrics": [ + { + "metricId": "1430afe0-eef0-4aa8-8106-306b9e6e49eb", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureBlob", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:06Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "container": "mock", + "blobTemplate": "mock" + }, + "authenticationType": "ManagedIdentity" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/84159bb9-e585-4e8f-9cc9-c82baea258ad", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-63a4855a5ee25a43a4a694092aa665a5-29e22ca735aa7d41-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "f01d897549ecba68fc144f31ff151d8a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "e3c370d0-f33e-421a-9944-6d6a769d9c55", + "Content-Length": "908", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:06 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "172", + "x-request-id": "e3c370d0-f33e-421a-9944-6d6a769d9c55" + }, + "ResponseBody": { + "dataFeedId": "84159bb9-e585-4e8f-9cc9-c82baea258ad", + "dataFeedName": "dataFeedmkqKCyx8", + "metrics": [ + { + "metricId": "1430afe0-eef0-4aa8-8106-306b9e6e49eb", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureBlob", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:06Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "container": "mock", + "blobTemplate": "mock" + }, + "authenticationType": "ManagedIdentity" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/84159bb9-e585-4e8f-9cc9-c82baea258ad", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-5328a2006528a94fadd4dc5362264230-20a826699fb47644-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "0efadd8aa2b89824f17410dfad5bf777", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "7af1fcdf-fbe0-4fae-b1b5-bef4c4030014", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:07 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "332", + "x-request-id": "7af1fcdf-fbe0-4fae-b1b5-bef4c4030014" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "408504439" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureBlobDataFeedWithAuthentication(ManagedIdentity)Async.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureBlobDataFeedWithAuthentication(ManagedIdentity)Async.json new file mode 100644 index 0000000000000..9bc3870cf1c7a --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureBlobDataFeedWithAuthentication(ManagedIdentity)Async.json @@ -0,0 +1,214 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "298", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-31254daf71843346a3bcbb7e50626e8f-97e55d86e9924543-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "9a0f0ad70fe63577d2c1bdb9cbacdffb", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "container": "mock", + "blobTemplate": "mock" + }, + "dataSourceType": "AzureBlob", + "dataFeedName": "dataFeedj1MbAJDE", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z", + "authenticationType": "ManagedIdentity" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "4d99e8ad-48b8-41b6-a185-67a5bfb9c474", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:41 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/840ce2df-0cc7-4c5c-b53f-72c7823face1", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "610", + "x-request-id": "4d99e8ad-48b8-41b6-a185-67a5bfb9c474" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/840ce2df-0cc7-4c5c-b53f-72c7823face1", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-31254daf71843346a3bcbb7e50626e8f-c735013391fb604e-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "9a0ef7d1ef7153a540849014f804dab8", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "e799dc67-5ebc-429b-8e6b-5f9f142ad7c1", + "Content-Length": "908", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:41 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "154", + "x-request-id": "e799dc67-5ebc-429b-8e6b-5f9f142ad7c1" + }, + "ResponseBody": { + "dataFeedId": "840ce2df-0cc7-4c5c-b53f-72c7823face1", + "dataFeedName": "dataFeedj1MbAJDE", + "metrics": [ + { + "metricId": "9424915c-1d0f-439f-b5f5-fb0a05d5b977", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureBlob", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:41Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "container": "mock", + "blobTemplate": "mock" + }, + "authenticationType": "ManagedIdentity" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/840ce2df-0cc7-4c5c-b53f-72c7823face1", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-b06a6794b112cd40a9f5175f6cb78f00-176d4a324e5b3a47-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "93b88c5e5d2104f2f6e513ea804ef993", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "9189bab5-38a3-4ac3-8fd7-ed9a7f43d904", + "Content-Length": "908", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:41 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "167", + "x-request-id": "9189bab5-38a3-4ac3-8fd7-ed9a7f43d904" + }, + "ResponseBody": { + "dataFeedId": "840ce2df-0cc7-4c5c-b53f-72c7823face1", + "dataFeedName": "dataFeedj1MbAJDE", + "metrics": [ + { + "metricId": "9424915c-1d0f-439f-b5f5-fb0a05d5b977", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureBlob", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:41Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "container": "mock", + "blobTemplate": "mock" + }, + "authenticationType": "ManagedIdentity" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/840ce2df-0cc7-4c5c-b53f-72c7823face1", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-ea6368ba28a25f4bbf5caf499f2e8909-7d71ee49ba61844e-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "7ca47ed5e9fde8eb65bc5a627e623dcd", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "cdc4562c-32b2-417b-a275-6bb268db7c97", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:41 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "330", + "x-request-id": "cdc4562c-32b2-417b-a275-6bb268db7c97" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "2037955587" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataExplorerDataFeedWithAuthentication(Basic).json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataExplorerDataFeedWithAuthentication(Basic).json new file mode 100644 index 0000000000000..a6334601d879b --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataExplorerDataFeedWithAuthentication(Basic).json @@ -0,0 +1,211 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "270", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-ba7d022f0fe800478705767d4cbb0da2-b3589443f009724b-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "b11d2ecee9e5244c85e353276ed30bee", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "query": "mock" + }, + "dataSourceType": "AzureDataExplorer", + "dataFeedName": "dataFeedfbsFNREu", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z", + "authenticationType": "Basic" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "6376d4f1-4b0f-4512-ba3c-de61412d9b64", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:07 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/f636472e-f4f5-4853-a261-58985daf5b5e", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "604", + "x-request-id": "6376d4f1-4b0f-4512-ba3c-de61412d9b64" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/f636472e-f4f5-4853-a261-58985daf5b5e", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-ba7d022f0fe800478705767d4cbb0da2-d484a2fc169b994d-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "272a6a70b88b24b9e251e589f264a891", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "3a89709a-70b1-4d3f-b324-d619b4e76feb", + "Content-Length": "880", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:07 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "205", + "x-request-id": "3a89709a-70b1-4d3f-b324-d619b4e76feb" + }, + "ResponseBody": { + "dataFeedId": "f636472e-f4f5-4853-a261-58985daf5b5e", + "dataFeedName": "dataFeedfbsFNREu", + "metrics": [ + { + "metricId": "ccba9d73-4fda-4bb4-969c-284e93344f6c", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataExplorer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:07Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/f636472e-f4f5-4853-a261-58985daf5b5e", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-2bebda11a2a28f4bad1cbc3dbe142a49-ca89da6d714b9144-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "2adc528c8e76e6ed2a9d9bea5a2ea99a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "10b83aad-e675-44ef-a0a6-8c40c6e8496c", + "Content-Length": "880", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:08 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "239", + "x-request-id": "10b83aad-e675-44ef-a0a6-8c40c6e8496c" + }, + "ResponseBody": { + "dataFeedId": "f636472e-f4f5-4853-a261-58985daf5b5e", + "dataFeedName": "dataFeedfbsFNREu", + "metrics": [ + { + "metricId": "ccba9d73-4fda-4bb4-969c-284e93344f6c", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataExplorer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:07Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/f636472e-f4f5-4853-a261-58985daf5b5e", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-78d61e69bda990489d872b1d62f9cfa6-d469b2fa281fd548-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "52739b74d526161374f9ce9303c23221", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "acc11f17-b26f-4f3e-a5e0-10016fc6d6be", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:08 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "403", + "x-request-id": "acc11f17-b26f-4f3e-a5e0-10016fc6d6be" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "460039788" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataExplorerDataFeedWithAuthentication(Basic)Async.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataExplorerDataFeedWithAuthentication(Basic)Async.json new file mode 100644 index 0000000000000..af74c83e20a4c --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataExplorerDataFeedWithAuthentication(Basic)Async.json @@ -0,0 +1,211 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "270", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-48d6c300d33e1240ba8a314b4ca6e959-5d4d676492b40448-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "d01fe59513e8638e9ffed1f52653eee4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "query": "mock" + }, + "dataSourceType": "AzureDataExplorer", + "dataFeedName": "dataFeed1kPeGntS", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z", + "authenticationType": "Basic" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "0ee689a1-f7ac-4aa0-b906-db69f7e90188", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:42 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/f1463671-fb46-4ca2-978c-f2cab1ae7e80", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "623", + "x-request-id": "0ee689a1-f7ac-4aa0-b906-db69f7e90188" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/f1463671-fb46-4ca2-978c-f2cab1ae7e80", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-48d6c300d33e1240ba8a314b4ca6e959-560b19f911557942-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "66eccbfc8b32ae601263ae829e9e27c0", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "55b8eb17-1065-4034-9373-be016e6fde20", + "Content-Length": "880", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:42 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "158", + "x-request-id": "55b8eb17-1065-4034-9373-be016e6fde20" + }, + "ResponseBody": { + "dataFeedId": "f1463671-fb46-4ca2-978c-f2cab1ae7e80", + "dataFeedName": "dataFeed1kPeGntS", + "metrics": [ + { + "metricId": "8e9c5149-fce2-48e3-b986-1b3e028821e0", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataExplorer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:42Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/f1463671-fb46-4ca2-978c-f2cab1ae7e80", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-6b7c8524ca443f4283802c4b0c9c1955-b1c1ab84fcf9da45-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "7a436bcce646ca43ba217b0bb82c388f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "ec9d8c16-23e3-44dd-b323-4227cb9bef07", + "Content-Length": "880", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:42 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "162", + "x-request-id": "ec9d8c16-23e3-44dd-b323-4227cb9bef07" + }, + "ResponseBody": { + "dataFeedId": "f1463671-fb46-4ca2-978c-f2cab1ae7e80", + "dataFeedName": "dataFeed1kPeGntS", + "metrics": [ + { + "metricId": "8e9c5149-fce2-48e3-b986-1b3e028821e0", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataExplorer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:42Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/f1463671-fb46-4ca2-978c-f2cab1ae7e80", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-c4b071085d038f4d80e609c720c19b37-432d5f48dfd5554f-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "d2a313b520b309e18471bd85640bc501", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "347a5394-a2d0-4a77-87f1-626bb22745b9", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:43 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "323", + "x-request-id": "347a5394-a2d0-4a77-87f1-626bb22745b9" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "667922688" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataExplorerDataFeedWithAuthentication(ManagedIdentity).json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataExplorerDataFeedWithAuthentication(ManagedIdentity).json new file mode 100644 index 0000000000000..858c8bb8de661 --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataExplorerDataFeedWithAuthentication(ManagedIdentity).json @@ -0,0 +1,211 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "280", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-7d14b8a4936a4046ad9597fc22e6ebd4-53a12adc626ba14b-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "549f10ce01150ea898c365006f9e5ee1", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "query": "mock" + }, + "dataSourceType": "AzureDataExplorer", + "dataFeedName": "dataFeedMCvPOwKa", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z", + "authenticationType": "ManagedIdentity" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "47fe580c-4796-4647-b5ce-216e9fa2d6fc", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:09 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/b568b3c6-ac30-4b94-86a8-62c0f0fdb5ae", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "604", + "x-request-id": "47fe580c-4796-4647-b5ce-216e9fa2d6fc" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/b568b3c6-ac30-4b94-86a8-62c0f0fdb5ae", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-7d14b8a4936a4046ad9597fc22e6ebd4-6968e4627af1ae4a-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "a14385e1f6a3c0f17e0d87faf4dd001e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "024f53a6-4b89-4fd7-8580-aff303c078cf", + "Content-Length": "890", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:09 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "167", + "x-request-id": "024f53a6-4b89-4fd7-8580-aff303c078cf" + }, + "ResponseBody": { + "dataFeedId": "b568b3c6-ac30-4b94-86a8-62c0f0fdb5ae", + "dataFeedName": "dataFeedMCvPOwKa", + "metrics": [ + { + "metricId": "6f4d1df8-e2bc-4012-b705-7e8cd8c4b119", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataExplorer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:09Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "ManagedIdentity" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/b568b3c6-ac30-4b94-86a8-62c0f0fdb5ae", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-03606a34b3ddaf41b9d4053364bce308-a17d47cfe3897745-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "ce3246815c36711c828c40746f03a183", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "f8a5616a-84db-47a7-9c98-09b3dd613ff1", + "Content-Length": "890", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:09 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "186", + "x-request-id": "f8a5616a-84db-47a7-9c98-09b3dd613ff1" + }, + "ResponseBody": { + "dataFeedId": "b568b3c6-ac30-4b94-86a8-62c0f0fdb5ae", + "dataFeedName": "dataFeedMCvPOwKa", + "metrics": [ + { + "metricId": "6f4d1df8-e2bc-4012-b705-7e8cd8c4b119", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataExplorer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:09Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "ManagedIdentity" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/b568b3c6-ac30-4b94-86a8-62c0f0fdb5ae", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-9723b431127e3d498b5af9ddd634fdae-220cba2a735d514b-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "b9f82c4a104bd8101fdfd6077aad1aba", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "04e64e56-6b22-44ab-ada8-ef1f62ad7652", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:10 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "335", + "x-request-id": "04e64e56-6b22-44ab-ada8-ef1f62ad7652" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "1963405935" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataExplorerDataFeedWithAuthentication(ManagedIdentity)Async.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataExplorerDataFeedWithAuthentication(ManagedIdentity)Async.json new file mode 100644 index 0000000000000..236a9f125dab6 --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataExplorerDataFeedWithAuthentication(ManagedIdentity)Async.json @@ -0,0 +1,211 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "280", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-516cb0b19d1c55478740e7d227324a97-e9ddbbc29310da44-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "0a255f6f0ff53510b8374dc37e1a9499", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "query": "mock" + }, + "dataSourceType": "AzureDataExplorer", + "dataFeedName": "dataFeeddORbnfIn", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z", + "authenticationType": "ManagedIdentity" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "bad8d93f-732c-4dfb-8273-e8efc085846a", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:43 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/26e47e33-435a-42e9-9300-db511ac5a13c", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "676", + "x-request-id": "bad8d93f-732c-4dfb-8273-e8efc085846a" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/26e47e33-435a-42e9-9300-db511ac5a13c", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-516cb0b19d1c55478740e7d227324a97-ab2bbaaa7ad8e541-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "807953fc710717caefc3cc294b6b358a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "6e97499e-e6b9-4c94-ab61-f109c57abcfa", + "Content-Length": "890", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:44 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "166", + "x-request-id": "6e97499e-e6b9-4c94-ab61-f109c57abcfa" + }, + "ResponseBody": { + "dataFeedId": "26e47e33-435a-42e9-9300-db511ac5a13c", + "dataFeedName": "dataFeeddORbnfIn", + "metrics": [ + { + "metricId": "70ee877a-14e7-4059-bd92-1a1b98555064", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataExplorer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:44Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "ManagedIdentity" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/26e47e33-435a-42e9-9300-db511ac5a13c", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-a3cf17aec17ec44c9b14b926ec48c2f4-2b01f0e275b85d47-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "765f7086a77a53a010fbffafaaedadbf", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "ea31235e-5280-49ce-b24b-10de552bac32", + "Content-Length": "890", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:44 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "251", + "x-request-id": "ea31235e-5280-49ce-b24b-10de552bac32" + }, + "ResponseBody": { + "dataFeedId": "26e47e33-435a-42e9-9300-db511ac5a13c", + "dataFeedName": "dataFeeddORbnfIn", + "metrics": [ + { + "metricId": "70ee877a-14e7-4059-bd92-1a1b98555064", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataExplorer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:44Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "ManagedIdentity" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/26e47e33-435a-42e9-9300-db511ac5a13c", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-745414574df6bd4b8848b0cdc070b135-949e0c7f6dbf774a-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "0110a927a933fd87940d1a3142e7ea4d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "77d8b707-9061-4d81-a940-2ddba5f73201", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:44 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "414", + "x-request-id": "77d8b707-9061-4d81-a940-2ddba5f73201" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "1864529473" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataExplorerDataFeedWithCredentialAuthentication(ServicePrincipal).json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataExplorerDataFeedWithCredentialAuthentication(ServicePrincipal).json new file mode 100644 index 0000000000000..17f32067d55fa --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataExplorerDataFeedWithCredentialAuthentication(ServicePrincipal).json @@ -0,0 +1,310 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "173", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-434f4d6888faff41b0604f4acca0b256-875a9b9746d4e24e-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "c2a75bc8d4f9e704d9dc0f8bab01dcc2", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "parameters": { + "clientId": "mock", + "clientSecret": "Sanitized", + "tenantId": "mock" + }, + "dataSourceCredentialType": "ServicePrincipal", + "dataSourceCredentialName": "credentialWTyhwOAc" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "b8215b48-153d-4a79-8368-346eca052de5", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:10 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/5f550c5f-9242-4591-b775-2454eb9cfa4f", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "459", + "x-request-id": "b8215b48-153d-4a79-8368-346eca052de5" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/5f550c5f-9242-4591-b775-2454eb9cfa4f", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-434f4d6888faff41b0604f4acca0b256-4a1efad7b9d4a946-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "b22a5a93206d0ea453e800896c189b14", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "26217a15-d8dd-4a33-a2c8-9ce7d3587c52", + "Content-Length": "247", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:10 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "119", + "x-request-id": "26217a15-d8dd-4a33-a2c8-9ce7d3587c52" + }, + "ResponseBody": { + "dataSourceCredentialId": "5f550c5f-9242-4591-b775-2454eb9cfa4f", + "dataSourceCredentialName": "credentialWTyhwOAc", + "dataSourceCredentialDescription": "", + "dataSourceCredentialType": "ServicePrincipal", + "parameters": { + "clientId": "mock", + "tenantId": "mock" + } + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "335", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-d6cd5a02e62ebc459e7e36c4bdf48d9f-fa37ea7967dbaf42-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "48241a79361587f436a78fa10aa2b4a7", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "query": "mock" + }, + "dataSourceType": "AzureDataExplorer", + "dataFeedName": "dataFeeddL8hZRzD", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z", + "authenticationType": "ServicePrincipal", + "credentialId": "5f550c5f-9242-4591-b775-2454eb9cfa4f" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "9d461c84-a5bd-4fbd-9821-d9fb05c88b45", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:11 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/a14d5ba0-8f90-4ad4-a290-2c25449d8aab", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "657", + "x-request-id": "9d461c84-a5bd-4fbd-9821-d9fb05c88b45" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/a14d5ba0-8f90-4ad4-a290-2c25449d8aab", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-d6cd5a02e62ebc459e7e36c4bdf48d9f-aaa7551865e0f444-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "106e99b67bd3c07b40fb4690c541a68a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "8721c95d-5380-4110-9b27-1f312d2a24ae", + "Content-Length": "945", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:11 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "177", + "x-request-id": "8721c95d-5380-4110-9b27-1f312d2a24ae" + }, + "ResponseBody": { + "dataFeedId": "a14d5ba0-8f90-4ad4-a290-2c25449d8aab", + "dataFeedName": "dataFeeddL8hZRzD", + "metrics": [ + { + "metricId": "c59f85fc-bf7d-4afd-8238-c5882916ecc2", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataExplorer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:11Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "ServicePrincipal", + "credentialId": "5f550c5f-9242-4591-b775-2454eb9cfa4f" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/a14d5ba0-8f90-4ad4-a290-2c25449d8aab", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-48c5dd48dbbe154fb5bcbc7c89447665-e18eb5c996e34844-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "53386e805bfb1cf8f47852c488f909a2", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "bf7426b0-5a97-4f81-82d4-2d94e85e06fc", + "Content-Length": "945", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:11 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "168", + "x-request-id": "bf7426b0-5a97-4f81-82d4-2d94e85e06fc" + }, + "ResponseBody": { + "dataFeedId": "a14d5ba0-8f90-4ad4-a290-2c25449d8aab", + "dataFeedName": "dataFeeddL8hZRzD", + "metrics": [ + { + "metricId": "c59f85fc-bf7d-4afd-8238-c5882916ecc2", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataExplorer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:11Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "ServicePrincipal", + "credentialId": "5f550c5f-9242-4591-b775-2454eb9cfa4f" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/a14d5ba0-8f90-4ad4-a290-2c25449d8aab", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-f5ec67d7ecbd5746b9bfa0aff60c8bf4-e0eb1a7615815a49-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "82e49466ca9afee89f64081af064c2f5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "ff9e3f97-ce2b-47ad-8f78-1f22ff47e864", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:17 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "5457", + "x-request-id": "ff9e3f97-ce2b-47ad-8f78-1f22ff47e864" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/5f550c5f-9242-4591-b775-2454eb9cfa4f", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-9f03334049c40e4084a27d34843cd9a9-5bcc7a54162e244b-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "9c210500616a5aaca0511c5b29b63746", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "c3984555-3674-4bfb-8939-c86af9f0ee98", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:18 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "301", + "x-request-id": "c3984555-3674-4bfb-8939-c86af9f0ee98" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "1857932080" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataExplorerDataFeedWithCredentialAuthentication(ServicePrincipal)Async.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataExplorerDataFeedWithCredentialAuthentication(ServicePrincipal)Async.json new file mode 100644 index 0000000000000..538848a860a8a --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataExplorerDataFeedWithCredentialAuthentication(ServicePrincipal)Async.json @@ -0,0 +1,310 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "173", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-21b777905068bf47a058e90dc3820abf-19d47570bca14841-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "dcb46f7206ee83d998f926b2676129e1", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "parameters": { + "clientId": "mock", + "clientSecret": "Sanitized", + "tenantId": "mock" + }, + "dataSourceCredentialType": "ServicePrincipal", + "dataSourceCredentialName": "credentialXfUBOM73" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "7ea4a339-7721-4448-ba12-01af5e44c20d", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:45 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/af0fd995-752b-4779-8c25-da9a037d2252", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "470", + "x-request-id": "7ea4a339-7721-4448-ba12-01af5e44c20d" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/af0fd995-752b-4779-8c25-da9a037d2252", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-21b777905068bf47a058e90dc3820abf-03f2749861c0b941-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "a325094aaaff899e7979c84804205981", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "454b1ae3-456b-4488-bfff-47d1ecbe548b", + "Content-Length": "247", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:45 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "98", + "x-request-id": "454b1ae3-456b-4488-bfff-47d1ecbe548b" + }, + "ResponseBody": { + "dataSourceCredentialId": "af0fd995-752b-4779-8c25-da9a037d2252", + "dataSourceCredentialName": "credentialXfUBOM73", + "dataSourceCredentialDescription": "", + "dataSourceCredentialType": "ServicePrincipal", + "parameters": { + "clientId": "mock", + "tenantId": "mock" + } + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "335", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-07e1a29bd0825e44bb73ee95e573e10b-5fce76cdca030b47-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "e7f7027665ba4952e6355047e39ad2c7", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "query": "mock" + }, + "dataSourceType": "AzureDataExplorer", + "dataFeedName": "dataFeedxeIGeYOT", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z", + "authenticationType": "ServicePrincipal", + "credentialId": "af0fd995-752b-4779-8c25-da9a037d2252" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "423fa752-32a5-4197-9898-0c01c377b3e5", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:46 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/3a976a99-0a50-4d36-ad62-b084c93381cd", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "679", + "x-request-id": "423fa752-32a5-4197-9898-0c01c377b3e5" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/3a976a99-0a50-4d36-ad62-b084c93381cd", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-07e1a29bd0825e44bb73ee95e573e10b-001eb30ac1e32944-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "75622ad1913d787e9fa5665a504f0420", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "9b85adcc-33df-4cf0-a7ec-2d19f62a8253", + "Content-Length": "945", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:46 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "164", + "x-request-id": "9b85adcc-33df-4cf0-a7ec-2d19f62a8253" + }, + "ResponseBody": { + "dataFeedId": "3a976a99-0a50-4d36-ad62-b084c93381cd", + "dataFeedName": "dataFeedxeIGeYOT", + "metrics": [ + { + "metricId": "08d2a504-1e03-4e6b-b3ec-8c0ff1b6a1b4", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataExplorer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:46Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "ServicePrincipal", + "credentialId": "af0fd995-752b-4779-8c25-da9a037d2252" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/3a976a99-0a50-4d36-ad62-b084c93381cd", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-7eb58d61619a904a8ad6d283e68c8fde-8f8456245a2bac4d-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "fd2d31e1b6b214cf267f61cfcf129db1", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "44b2e82e-e064-4959-b080-db7e0c4ac4ea", + "Content-Length": "945", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:46 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "171", + "x-request-id": "44b2e82e-e064-4959-b080-db7e0c4ac4ea" + }, + "ResponseBody": { + "dataFeedId": "3a976a99-0a50-4d36-ad62-b084c93381cd", + "dataFeedName": "dataFeedxeIGeYOT", + "metrics": [ + { + "metricId": "08d2a504-1e03-4e6b-b3ec-8c0ff1b6a1b4", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataExplorer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:46Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "ServicePrincipal", + "credentialId": "af0fd995-752b-4779-8c25-da9a037d2252" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/3a976a99-0a50-4d36-ad62-b084c93381cd", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-cda7f4c33172b84789e5b88daf1f0ce8-0e360e4905ec0040-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "b108493bb3c6e5b6847f4715fef8f897", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "8d999308-81a0-4960-a33c-56fc0a5563ae", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:47 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "311", + "x-request-id": "8d999308-81a0-4960-a33c-56fc0a5563ae" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/af0fd995-752b-4779-8c25-da9a037d2252", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-5793a067cc495146a3a4e911d2fcf7aa-c962ba7a8f04a446-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "b2662f30d46c1b145b4d4ebe2faea88d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "5d43944c-61f4-4e7f-8bf2-17a26cc2c7d7", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:47 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "176", + "x-request-id": "5d43944c-61f4-4e7f-8bf2-17a26cc2c7d7" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "1646658943" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataExplorerDataFeedWithCredentialAuthentication(ServicePrincipalInKeyVault).json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataExplorerDataFeedWithCredentialAuthentication(ServicePrincipalInKeyVault).json new file mode 100644 index 0000000000000..30b02fc639fe2 --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataExplorerDataFeedWithCredentialAuthentication(ServicePrincipalInKeyVault).json @@ -0,0 +1,316 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "308", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-8407548cf4f1f14797f785e84122c4e1-054b59673cf7214f-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "6203676d5c63ad75fe7ea3d3e97280f5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "parameters": { + "keyVaultEndpoint": "https://mock.com/", + "keyVaultClientId": "mock", + "keyVaultClientSecret": "Sanitized", + "servicePrincipalIdNameInKV": "mock", + "servicePrincipalSecretNameInKV": "mock", + "tenantId": "mock" + }, + "dataSourceCredentialType": "ServicePrincipalInKV", + "dataSourceCredentialName": "credentialvSA9Sh7V" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "8caee2fd-7a39-4add-b6fe-5ed5451346c8", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:23 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/ec5bed56-c60d-44d6-8a5e-424ff3e45c18", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "5682", + "x-request-id": "8caee2fd-7a39-4add-b6fe-5ed5451346c8" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/ec5bed56-c60d-44d6-8a5e-424ff3e45c18", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-8407548cf4f1f14797f785e84122c4e1-a06612602ae76747-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "dab7f6ef04953844e27343e6609ea00f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "62e83aca-62a2-41d1-b490-acf61c8cba1e", + "Content-Length": "374", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:29 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "5141", + "x-request-id": "62e83aca-62a2-41d1-b490-acf61c8cba1e" + }, + "ResponseBody": { + "dataSourceCredentialId": "ec5bed56-c60d-44d6-8a5e-424ff3e45c18", + "dataSourceCredentialName": "credentialvSA9Sh7V", + "dataSourceCredentialDescription": "", + "dataSourceCredentialType": "ServicePrincipalInKV", + "parameters": { + "servicePrincipalSecretNameInKV": "mock", + "servicePrincipalIdNameInKV": "mock", + "tenantId": "mock", + "keyVaultClientId": "mock", + "keyVaultEndpoint": "https://mock.com/" + } + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "339", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-68ce3f33c7ef7846afb74bed35264f93-7d2ae0bb24ecac42-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "83e78687904eabf8c2ccb0503367d069", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "query": "mock" + }, + "dataSourceType": "AzureDataExplorer", + "dataFeedName": "dataFeed2FgRqdwx", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z", + "authenticationType": "ServicePrincipalInKV", + "credentialId": "ec5bed56-c60d-44d6-8a5e-424ff3e45c18" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "923bf5ec-32e3-4850-8287-8daa9fd5c17d", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:29 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/40f8d3a6-e593-499f-a497-6d40da750ca8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "600", + "x-request-id": "923bf5ec-32e3-4850-8287-8daa9fd5c17d" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/40f8d3a6-e593-499f-a497-6d40da750ca8", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-68ce3f33c7ef7846afb74bed35264f93-28537752b39a2146-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "ef80cb228e18604ddd9487b51c0dd77a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "de5f8f48-50c0-4f71-9255-60a588751a4a", + "Content-Length": "949", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:29 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "176", + "x-request-id": "de5f8f48-50c0-4f71-9255-60a588751a4a" + }, + "ResponseBody": { + "dataFeedId": "40f8d3a6-e593-499f-a497-6d40da750ca8", + "dataFeedName": "dataFeed2FgRqdwx", + "metrics": [ + { + "metricId": "09285c5d-3024-4383-afa9-1034f10c449a", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataExplorer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:29Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "ServicePrincipalInKV", + "credentialId": "ec5bed56-c60d-44d6-8a5e-424ff3e45c18" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/40f8d3a6-e593-499f-a497-6d40da750ca8", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-5a48f6d511fd184db6dbdd8888fa547e-53b6d802a428914f-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "0f533b61c01d51e97b972493ed50dce4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "827ba7e9-95ca-4eb6-ad29-3b4b87386655", + "Content-Length": "949", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:30 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "178", + "x-request-id": "827ba7e9-95ca-4eb6-ad29-3b4b87386655" + }, + "ResponseBody": { + "dataFeedId": "40f8d3a6-e593-499f-a497-6d40da750ca8", + "dataFeedName": "dataFeed2FgRqdwx", + "metrics": [ + { + "metricId": "09285c5d-3024-4383-afa9-1034f10c449a", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataExplorer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:29Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "ServicePrincipalInKV", + "credentialId": "ec5bed56-c60d-44d6-8a5e-424ff3e45c18" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/40f8d3a6-e593-499f-a497-6d40da750ca8", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-db02de4907efca4486e442389630314c-27951dfcf7055a42-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "5350ed63a5f5f8633887a6ba08428fb5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "886a7276-2e2a-4d09-82e5-aa98525dc7e7", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:30 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "345", + "x-request-id": "886a7276-2e2a-4d09-82e5-aa98525dc7e7" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/ec5bed56-c60d-44d6-8a5e-424ff3e45c18", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-75381937b6cd2949bff0c4232de9b806-ce129f61de35504c-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "f7ee36f5c114624be12e73816ab9728d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "caf4c02a-835f-419e-93f9-83d5dfec14e4", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:30 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "194", + "x-request-id": "caf4c02a-835f-419e-93f9-83d5dfec14e4" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "380022169" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataExplorerDataFeedWithCredentialAuthentication(ServicePrincipalInKeyVault)Async.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataExplorerDataFeedWithCredentialAuthentication(ServicePrincipalInKeyVault)Async.json new file mode 100644 index 0000000000000..1c3dd5a00d8d8 --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataExplorerDataFeedWithCredentialAuthentication(ServicePrincipalInKeyVault)Async.json @@ -0,0 +1,316 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "308", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-825c80c43515374dbd8aee7c5647a66a-2644b9b80f4a8142-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "725d836a4e1f130fa110f41caf53554d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "parameters": { + "keyVaultEndpoint": "https://mock.com/", + "keyVaultClientId": "mock", + "keyVaultClientSecret": "Sanitized", + "servicePrincipalIdNameInKV": "mock", + "servicePrincipalSecretNameInKV": "mock", + "tenantId": "mock" + }, + "dataSourceCredentialType": "ServicePrincipalInKV", + "dataSourceCredentialName": "credentiald1YSc8Cf" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "bedcbd33-962d-4e28-ab8e-e9f7d10983e5", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:47 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/d99408a6-20da-407b-8e1f-362771e7830f", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "422", + "x-request-id": "bedcbd33-962d-4e28-ab8e-e9f7d10983e5" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/d99408a6-20da-407b-8e1f-362771e7830f", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-825c80c43515374dbd8aee7c5647a66a-fa1905d858c6764d-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "9eedcff7b53e35046458cc505796cdb3", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "25ab8122-82da-4cd3-899f-dfb20b234714", + "Content-Length": "374", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:53 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "5170", + "x-request-id": "25ab8122-82da-4cd3-899f-dfb20b234714" + }, + "ResponseBody": { + "dataSourceCredentialId": "d99408a6-20da-407b-8e1f-362771e7830f", + "dataSourceCredentialName": "credentiald1YSc8Cf", + "dataSourceCredentialDescription": "", + "dataSourceCredentialType": "ServicePrincipalInKV", + "parameters": { + "servicePrincipalSecretNameInKV": "mock", + "servicePrincipalIdNameInKV": "mock", + "tenantId": "mock", + "keyVaultClientId": "mock", + "keyVaultEndpoint": "https://mock.com/" + } + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "339", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-95f96efb300f46419b3680872d85555f-e5e209688032774c-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "60c75e263ce5ab5dbba4736f69f2bab4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "query": "mock" + }, + "dataSourceType": "AzureDataExplorer", + "dataFeedName": "dataFeedryxXCmDG", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z", + "authenticationType": "ServicePrincipalInKV", + "credentialId": "d99408a6-20da-407b-8e1f-362771e7830f" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "537a4b9c-631f-4b87-a77f-ed566b96aeed", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:54 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/91a7c158-7a9d-4bbd-800d-533653b34100", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "718", + "x-request-id": "537a4b9c-631f-4b87-a77f-ed566b96aeed" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/91a7c158-7a9d-4bbd-800d-533653b34100", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-95f96efb300f46419b3680872d85555f-1ac044bbacce3249-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "c60d287fbe810abc43419b9ad11223d8", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "3c99af1c-df59-4068-89d1-d50fb4bb2aa4", + "Content-Length": "949", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:59 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "5175", + "x-request-id": "3c99af1c-df59-4068-89d1-d50fb4bb2aa4" + }, + "ResponseBody": { + "dataFeedId": "91a7c158-7a9d-4bbd-800d-533653b34100", + "dataFeedName": "dataFeedryxXCmDG", + "metrics": [ + { + "metricId": "b2a8ef3d-40b2-49a1-8b97-5e2ff9f63b35", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataExplorer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:54Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "ServicePrincipalInKV", + "credentialId": "d99408a6-20da-407b-8e1f-362771e7830f" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/91a7c158-7a9d-4bbd-800d-533653b34100", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-5305bcce1386e0488e439669333ca62e-84b28fa2b8a7214c-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "df77b2afa4ee274ffa2095b2225e498d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "240a7d21-379c-45ca-a3a4-580509651e76", + "Content-Length": "949", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:59 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "222", + "x-request-id": "240a7d21-379c-45ca-a3a4-580509651e76" + }, + "ResponseBody": { + "dataFeedId": "91a7c158-7a9d-4bbd-800d-533653b34100", + "dataFeedName": "dataFeedryxXCmDG", + "metrics": [ + { + "metricId": "b2a8ef3d-40b2-49a1-8b97-5e2ff9f63b35", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataExplorer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:54Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "ServicePrincipalInKV", + "credentialId": "d99408a6-20da-407b-8e1f-362771e7830f" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/91a7c158-7a9d-4bbd-800d-533653b34100", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-0b73f149435b25458d0efa86932cc543-ee34e5f9f4c83547-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "01c4cd5a591067b9a2bd1ca4a1c3daa8", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "9947cd42-16ad-45fc-b62d-9b7dc85b4d93", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:40:00 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "326", + "x-request-id": "9947cd42-16ad-45fc-b62d-9b7dc85b4d93" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/d99408a6-20da-407b-8e1f-362771e7830f", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-5c487954dbf5e74ba083f1316c6de929-34fb00088609db4e-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "b6bf9b81da7bdbc6d8e5cb612909e7e4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "cae05550-5e42-4da6-9c91-447100d3c2ff", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:40:00 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "200", + "x-request-id": "cae05550-5e42-4da6-9c91-447100d3c2ff" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "784839026" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataLakeStorageGen2DataFeedWithAuthentication.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataLakeStorageGen2DataFeedWithAuthentication.json new file mode 100644 index 0000000000000..45a13a9ff68c4 --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataLakeStorageGen2DataFeedWithAuthentication.json @@ -0,0 +1,220 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "350", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-4d1b9dcb1be45144a3bb4de67a31e6b0-17776208a4cdde45-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "9485d9cecc2c663087afeec53e66dfc7", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "accountName": "mock", + "accountKey": "Sanitized", + "fileSystemName": "mock", + "directoryTemplate": "mock", + "fileTemplate": "mock" + }, + "dataSourceType": "AzureDataLakeStorageGen2", + "dataFeedName": "dataFeedVjEYGj5j", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z", + "authenticationType": "Basic" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "170f7a53-f337-4e22-8f19-bc67cd0a220d", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:37:43 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/d9479212-89af-4738-a0e1-bf37646c74a5", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "610", + "x-request-id": "170f7a53-f337-4e22-8f19-bc67cd0a220d" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/d9479212-89af-4738-a0e1-bf37646c74a5", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-4d1b9dcb1be45144a3bb4de67a31e6b0-b2590cef74f8e948-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "b83e5693a68297fd1e12cb8b26a2fb79", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "d152b343-bd19-472a-b64c-403554b12493", + "Content-Length": "966", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:37:43 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "230", + "x-request-id": "d152b343-bd19-472a-b64c-403554b12493" + }, + "ResponseBody": { + "dataFeedId": "d9479212-89af-4738-a0e1-bf37646c74a5", + "dataFeedName": "dataFeedVjEYGj5j", + "metrics": [ + { + "metricId": "c05ccee1-db69-4d93-a1a3-7bdc45852761", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataLakeStorageGen2", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:37:43Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "fileTemplate": "mock", + "accountName": "mock", + "directoryTemplate": "mock", + "fileSystemName": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/d9479212-89af-4738-a0e1-bf37646c74a5", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-563a95b7929f754aae2b67c246643ebc-71151b31640c564b-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "783f2b528553b53fd891ed97bd67bbda", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "108c81a3-2c9d-4c49-b40d-ce86c2720360", + "Content-Length": "966", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:37:48 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "5187", + "x-request-id": "108c81a3-2c9d-4c49-b40d-ce86c2720360" + }, + "ResponseBody": { + "dataFeedId": "d9479212-89af-4738-a0e1-bf37646c74a5", + "dataFeedName": "dataFeedVjEYGj5j", + "metrics": [ + { + "metricId": "c05ccee1-db69-4d93-a1a3-7bdc45852761", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataLakeStorageGen2", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:37:43Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "fileTemplate": "mock", + "accountName": "mock", + "directoryTemplate": "mock", + "fileSystemName": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/d9479212-89af-4738-a0e1-bf37646c74a5", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-fa0c90eb35a7094a8f312e834c20a594-981590cfb1a31a4c-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "04f8b63d496f28c2dced761a00a43fe4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "d2667e8c-da00-4c58-a691-65e7f25eb6bd", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:37:48 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "344", + "x-request-id": "d2667e8c-da00-4c58-a691-65e7f25eb6bd" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "1893960047" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataLakeStorageGen2DataFeedWithAuthenticationAsync.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataLakeStorageGen2DataFeedWithAuthenticationAsync.json new file mode 100644 index 0000000000000..1b3866c8691cf --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataLakeStorageGen2DataFeedWithAuthenticationAsync.json @@ -0,0 +1,220 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "350", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-9202b9b6e895ed46a7a2b1f8bac912c9-b76dbfa279b38a40-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "95bb7591080887911cbeb49e3a0ec23b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "accountName": "mock", + "accountKey": "Sanitized", + "fileSystemName": "mock", + "directoryTemplate": "mock", + "fileTemplate": "mock" + }, + "dataSourceType": "AzureDataLakeStorageGen2", + "dataFeedName": "dataFeedytBAhkbS", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z", + "authenticationType": "Basic" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "f7d8cd05-1582-4db9-897f-98287effcebb", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:34 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/3602504c-d18e-4fee-a3f8-858834189a93", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "642", + "x-request-id": "f7d8cd05-1582-4db9-897f-98287effcebb" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/3602504c-d18e-4fee-a3f8-858834189a93", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-9202b9b6e895ed46a7a2b1f8bac912c9-e523b36b1fdca840-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "5870468ad72ad6e39b5c5b6d54cc7c3f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "d79dee64-f938-45c0-a52b-485533c517f7", + "Content-Length": "966", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:34 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "162", + "x-request-id": "d79dee64-f938-45c0-a52b-485533c517f7" + }, + "ResponseBody": { + "dataFeedId": "3602504c-d18e-4fee-a3f8-858834189a93", + "dataFeedName": "dataFeedytBAhkbS", + "metrics": [ + { + "metricId": "ce963f46-7283-4a6a-b10b-d40c12e5834c", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataLakeStorageGen2", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:34Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "fileTemplate": "mock", + "accountName": "mock", + "directoryTemplate": "mock", + "fileSystemName": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/3602504c-d18e-4fee-a3f8-858834189a93", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-760faaa98b908b4ebfd4d508ccbe6d43-ad533551c755a541-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "2563e380b530a556ca987e40625496ed", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "d9521116-c536-4a68-a5b7-09a7927a0215", + "Content-Length": "966", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:34 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "158", + "x-request-id": "d9521116-c536-4a68-a5b7-09a7927a0215" + }, + "ResponseBody": { + "dataFeedId": "3602504c-d18e-4fee-a3f8-858834189a93", + "dataFeedName": "dataFeedytBAhkbS", + "metrics": [ + { + "metricId": "ce963f46-7283-4a6a-b10b-d40c12e5834c", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataLakeStorageGen2", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:34Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "fileTemplate": "mock", + "accountName": "mock", + "directoryTemplate": "mock", + "fileSystemName": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/3602504c-d18e-4fee-a3f8-858834189a93", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-bb4732b48278bc4e8d14d5a93bbcc811-d79d6183ae7d9747-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "f90328b940b1b9c991e5faacac23324f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "fd9402ff-c139-4661-9854-8bc1ae0c606a", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:35 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "385", + "x-request-id": "fd9402ff-c139-4661-9854-8bc1ae0c606a" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "1757107225" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataLakeStorageGen2DataFeedWithCredentialAuthentication(ServicePrincipal).json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataLakeStorageGen2DataFeedWithCredentialAuthentication(ServicePrincipal).json new file mode 100644 index 0000000000000..cf53113d344f7 --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataLakeStorageGen2DataFeedWithCredentialAuthentication(ServicePrincipal).json @@ -0,0 +1,319 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "173", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-dc440c501bb84b4aa508097ff15a2195-ace2cf3643f28b4a-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "049fe66da55268704a97675007f06d49", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "parameters": { + "clientId": "mock", + "clientSecret": "Sanitized", + "tenantId": "mock" + }, + "dataSourceCredentialType": "ServicePrincipal", + "dataSourceCredentialName": "credentialyvVUrDJN" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "a81d99aa-b767-4459-9993-c51e3465f0c8", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:31 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/8e571b05-517f-492a-9a37-3779c4af9169", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "534", + "x-request-id": "a81d99aa-b767-4459-9993-c51e3465f0c8" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/8e571b05-517f-492a-9a37-3779c4af9169", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-dc440c501bb84b4aa508097ff15a2195-ea456051a5a03c43-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "068ff85b01d42dfbce279522af9ce2bc", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "4c385fea-9a4f-4de1-919c-2214102abac1", + "Content-Length": "247", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:31 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "126", + "x-request-id": "4c385fea-9a4f-4de1-919c-2214102abac1" + }, + "ResponseBody": { + "dataSourceCredentialId": "8e571b05-517f-492a-9a37-3779c4af9169", + "dataSourceCredentialName": "credentialyvVUrDJN", + "dataSourceCredentialDescription": "", + "dataSourceCredentialType": "ServicePrincipal", + "parameters": { + "clientId": "mock", + "tenantId": "mock" + } + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "415", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-475ed796e01c1f4482d11cb9c5f440b1-e0b23dc0f3b2c74a-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "ffc7738de9df3b4c52c1b4967d901b6c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "accountName": "mock", + "accountKey": "Sanitized", + "fileSystemName": "mock", + "directoryTemplate": "mock", + "fileTemplate": "mock" + }, + "dataSourceType": "AzureDataLakeStorageGen2", + "dataFeedName": "dataFeedLupANziW", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z", + "authenticationType": "ServicePrincipal", + "credentialId": "8e571b05-517f-492a-9a37-3779c4af9169" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "61a0644d-91f0-449a-9ad7-34420aeff37f", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:32 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/508a61a8-5cb1-400a-8955-9039eb77d432", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "653", + "x-request-id": "61a0644d-91f0-449a-9ad7-34420aeff37f" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/508a61a8-5cb1-400a-8955-9039eb77d432", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-475ed796e01c1f4482d11cb9c5f440b1-85b7933cc7b3874b-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "2b3572ea4d0faeb8b4ab8ca698c2653d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "7b96746e-ef0e-4fff-b42c-0bbb1b65c90d", + "Content-Length": "1031", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:32 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "160", + "x-request-id": "7b96746e-ef0e-4fff-b42c-0bbb1b65c90d" + }, + "ResponseBody": { + "dataFeedId": "508a61a8-5cb1-400a-8955-9039eb77d432", + "dataFeedName": "dataFeedLupANziW", + "metrics": [ + { + "metricId": "2206de87-7b04-4e44-8bad-49c819024263", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataLakeStorageGen2", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:32Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "fileTemplate": "mock", + "accountName": "mock", + "directoryTemplate": "mock", + "fileSystemName": "mock" + }, + "authenticationType": "ServicePrincipal", + "credentialId": "8e571b05-517f-492a-9a37-3779c4af9169" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/508a61a8-5cb1-400a-8955-9039eb77d432", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-44bb6691d59c0f458dbd5136aa24f685-4262a294397fa446-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "6079eaddfc39e54dda5ad0ede84b3e33", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "3369ea6f-8d6e-4d78-92d9-d60ac2a86280", + "Content-Length": "1031", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:32 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "155", + "x-request-id": "3369ea6f-8d6e-4d78-92d9-d60ac2a86280" + }, + "ResponseBody": { + "dataFeedId": "508a61a8-5cb1-400a-8955-9039eb77d432", + "dataFeedName": "dataFeedLupANziW", + "metrics": [ + { + "metricId": "2206de87-7b04-4e44-8bad-49c819024263", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataLakeStorageGen2", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:32Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "fileTemplate": "mock", + "accountName": "mock", + "directoryTemplate": "mock", + "fileSystemName": "mock" + }, + "authenticationType": "ServicePrincipal", + "credentialId": "8e571b05-517f-492a-9a37-3779c4af9169" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/508a61a8-5cb1-400a-8955-9039eb77d432", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-580e057af48c37428fd6c6b96041a4f8-5d450b42cc034e43-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "71c0ec45f0e83f94ba184b345da6a28f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "bd3c54a9-4fd9-41e2-b27d-8009b848fd04", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:32 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "318", + "x-request-id": "bd3c54a9-4fd9-41e2-b27d-8009b848fd04" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/8e571b05-517f-492a-9a37-3779c4af9169", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-21c0a4961b85b24fbdc2f9e043a0a76e-c1c133e889a76141-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "92b9765cba16ee32245050b47dcac668", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "4a740abf-1e0b-42e6-8c10-ee65175b7f30", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:33 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "209", + "x-request-id": "4a740abf-1e0b-42e6-8c10-ee65175b7f30" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "358630832" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataLakeStorageGen2DataFeedWithCredentialAuthentication(ServicePrincipal)Async.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataLakeStorageGen2DataFeedWithCredentialAuthentication(ServicePrincipal)Async.json new file mode 100644 index 0000000000000..0d137c3c02b44 --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataLakeStorageGen2DataFeedWithCredentialAuthentication(ServicePrincipal)Async.json @@ -0,0 +1,319 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "173", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-6b89914273b2bb4b83c68e3310380c38-f1404e438a289646-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "bcda4cd0ea9e3ebb76908749347ff1a8", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "parameters": { + "clientId": "mock", + "clientSecret": "Sanitized", + "tenantId": "mock" + }, + "dataSourceCredentialType": "ServicePrincipal", + "dataSourceCredentialName": "credentialvathq7ki" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "2f09f0c5-acfa-49b3-b724-110618934423", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:40:00 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/b263593e-ec8c-466c-8c80-1844d4381b2f", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "358", + "x-request-id": "2f09f0c5-acfa-49b3-b724-110618934423" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/b263593e-ec8c-466c-8c80-1844d4381b2f", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-6b89914273b2bb4b83c68e3310380c38-4433521eb0bbdd4d-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "2f1d113cb036c86beb4dccacb2e49b3c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "4f954eea-8e89-41c9-ab82-d0a313fb8977", + "Content-Length": "247", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:40:05 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "5203", + "x-request-id": "4f954eea-8e89-41c9-ab82-d0a313fb8977" + }, + "ResponseBody": { + "dataSourceCredentialId": "b263593e-ec8c-466c-8c80-1844d4381b2f", + "dataSourceCredentialName": "credentialvathq7ki", + "dataSourceCredentialDescription": "", + "dataSourceCredentialType": "ServicePrincipal", + "parameters": { + "clientId": "mock", + "tenantId": "mock" + } + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "415", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-162cceb68fbe2d47878d1452e1f5dfe2-93c9044a794fc54d-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "7d9afcb5de7c3f3bbc73581f1718141f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "accountName": "mock", + "accountKey": "Sanitized", + "fileSystemName": "mock", + "directoryTemplate": "mock", + "fileTemplate": "mock" + }, + "dataSourceType": "AzureDataLakeStorageGen2", + "dataFeedName": "dataFeedblhFxLHq", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z", + "authenticationType": "ServicePrincipal", + "credentialId": "b263593e-ec8c-466c-8c80-1844d4381b2f" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "bb17d482-ce92-4d33-9cb1-5bf22a776dee", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:40:06 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/68461f12-2343-4b7c-866f-02d04ecbb9f8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "712", + "x-request-id": "bb17d482-ce92-4d33-9cb1-5bf22a776dee" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/68461f12-2343-4b7c-866f-02d04ecbb9f8", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-162cceb68fbe2d47878d1452e1f5dfe2-d0c4fbd872093248-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "51d012e00f1d928cf54a7d964fd433d8", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "db8f7e9d-71ca-48d5-867d-03c85acee33e", + "Content-Length": "1031", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:40:06 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "158", + "x-request-id": "db8f7e9d-71ca-48d5-867d-03c85acee33e" + }, + "ResponseBody": { + "dataFeedId": "68461f12-2343-4b7c-866f-02d04ecbb9f8", + "dataFeedName": "dataFeedblhFxLHq", + "metrics": [ + { + "metricId": "2db21ecf-f066-4e77-ad08-6f2c6c1c4456", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataLakeStorageGen2", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:40:06Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "fileTemplate": "mock", + "accountName": "mock", + "directoryTemplate": "mock", + "fileSystemName": "mock" + }, + "authenticationType": "ServicePrincipal", + "credentialId": "b263593e-ec8c-466c-8c80-1844d4381b2f" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/68461f12-2343-4b7c-866f-02d04ecbb9f8", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-d9fc192b22627f4a9925b72ab57e9719-8bcc9d96cb71864a-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "39792c1aed160c4b118cef3e8c7b25b3", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "163af7a4-fc4f-480d-b770-273784e3c9a9", + "Content-Length": "1031", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:40:06 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "175", + "x-request-id": "163af7a4-fc4f-480d-b770-273784e3c9a9" + }, + "ResponseBody": { + "dataFeedId": "68461f12-2343-4b7c-866f-02d04ecbb9f8", + "dataFeedName": "dataFeedblhFxLHq", + "metrics": [ + { + "metricId": "2db21ecf-f066-4e77-ad08-6f2c6c1c4456", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataLakeStorageGen2", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:40:06Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "fileTemplate": "mock", + "accountName": "mock", + "directoryTemplate": "mock", + "fileSystemName": "mock" + }, + "authenticationType": "ServicePrincipal", + "credentialId": "b263593e-ec8c-466c-8c80-1844d4381b2f" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/68461f12-2343-4b7c-866f-02d04ecbb9f8", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-c8aac5ba1649e74686fa18d4dc7c480d-b61600995769bd42-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "623c1089a593a6d27007883261a5efe8", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "ecb4ab30-6261-43a1-9f75-97b565393afb", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:40:07 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "389", + "x-request-id": "ecb4ab30-6261-43a1-9f75-97b565393afb" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/b263593e-ec8c-466c-8c80-1844d4381b2f", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-f59c761d1d59b444909da5cb17dbdb17-058657135d30b248-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "ea057f40db9ef308c7c34091204d057a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "909cd1ec-dbcb-4c8b-9a60-692e665e020f", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:40:07 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "178", + "x-request-id": "909cd1ec-dbcb-4c8b-9a60-692e665e020f" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "1369875480" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataLakeStorageGen2DataFeedWithCredentialAuthentication(ServicePrincipalInKeyVault).json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataLakeStorageGen2DataFeedWithCredentialAuthentication(ServicePrincipalInKeyVault).json new file mode 100644 index 0000000000000..88d4caeb23674 --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataLakeStorageGen2DataFeedWithCredentialAuthentication(ServicePrincipalInKeyVault).json @@ -0,0 +1,325 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "308", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-a0814607a665e64b97151d382b814c0b-f51618d55ab0ff4f-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "7a21a6080ee7149c3cf19a9c974bb6ab", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "parameters": { + "keyVaultEndpoint": "https://mock.com/", + "keyVaultClientId": "mock", + "keyVaultClientSecret": "Sanitized", + "servicePrincipalIdNameInKV": "mock", + "servicePrincipalSecretNameInKV": "mock", + "tenantId": "mock" + }, + "dataSourceCredentialType": "ServicePrincipalInKV", + "dataSourceCredentialName": "credentialBvavNQty" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "858fd9e2-636c-473d-b0fd-72094713a880", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:33 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/c32a44e3-5434-4ad1-a043-79f98f231f73", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "400", + "x-request-id": "858fd9e2-636c-473d-b0fd-72094713a880" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/c32a44e3-5434-4ad1-a043-79f98f231f73", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-a0814607a665e64b97151d382b814c0b-55cc6273b143144b-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "aba5ff699bd56a09564fa16bda0430bb", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "486bf2f7-ebf0-42d0-9748-825299d5f4f5", + "Content-Length": "374", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:33 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "105", + "x-request-id": "486bf2f7-ebf0-42d0-9748-825299d5f4f5" + }, + "ResponseBody": { + "dataSourceCredentialId": "c32a44e3-5434-4ad1-a043-79f98f231f73", + "dataSourceCredentialName": "credentialBvavNQty", + "dataSourceCredentialDescription": "", + "dataSourceCredentialType": "ServicePrincipalInKV", + "parameters": { + "servicePrincipalSecretNameInKV": "mock", + "servicePrincipalIdNameInKV": "mock", + "tenantId": "mock", + "keyVaultClientId": "mock", + "keyVaultEndpoint": "https://mock.com/" + } + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "419", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-d10cdadf98cd6f4fb04e5d7ea53ab12a-8909df9e7ce67645-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "cd18d2fa7d7faaf6a4fd50bb8141c16d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "accountName": "mock", + "accountKey": "Sanitized", + "fileSystemName": "mock", + "directoryTemplate": "mock", + "fileTemplate": "mock" + }, + "dataSourceType": "AzureDataLakeStorageGen2", + "dataFeedName": "dataFeediqL1wKCL", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z", + "authenticationType": "ServicePrincipalInKV", + "credentialId": "c32a44e3-5434-4ad1-a043-79f98f231f73" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "472aa871-9b26-4f82-a74c-a31d93c5016e", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:34 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/88b13522-6f6e-45a0-b1c1-61280b08478a", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "608", + "x-request-id": "472aa871-9b26-4f82-a74c-a31d93c5016e" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/88b13522-6f6e-45a0-b1c1-61280b08478a", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-d10cdadf98cd6f4fb04e5d7ea53ab12a-67d8ed6cff0a6242-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "9724b79d316c373ac1de5adc58103494", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "ff5ff572-2903-4c31-9688-06205092f3dd", + "Content-Length": "1035", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:34 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "153", + "x-request-id": "ff5ff572-2903-4c31-9688-06205092f3dd" + }, + "ResponseBody": { + "dataFeedId": "88b13522-6f6e-45a0-b1c1-61280b08478a", + "dataFeedName": "dataFeediqL1wKCL", + "metrics": [ + { + "metricId": "22cf0765-0367-4d32-8b03-3d8c272aa16b", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataLakeStorageGen2", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:34Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "fileTemplate": "mock", + "accountName": "mock", + "directoryTemplate": "mock", + "fileSystemName": "mock" + }, + "authenticationType": "ServicePrincipalInKV", + "credentialId": "c32a44e3-5434-4ad1-a043-79f98f231f73" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/88b13522-6f6e-45a0-b1c1-61280b08478a", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-d7520f1eb2291f4aaef35eec22f8c55e-b7acc67466629440-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "03b194203b82d9eb58f7c6dcb37439ff", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "c5f9a931-1683-4520-a514-e967d7be5d3f", + "Content-Length": "1035", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:34 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "157", + "x-request-id": "c5f9a931-1683-4520-a514-e967d7be5d3f" + }, + "ResponseBody": { + "dataFeedId": "88b13522-6f6e-45a0-b1c1-61280b08478a", + "dataFeedName": "dataFeediqL1wKCL", + "metrics": [ + { + "metricId": "22cf0765-0367-4d32-8b03-3d8c272aa16b", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataLakeStorageGen2", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:34Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "fileTemplate": "mock", + "accountName": "mock", + "directoryTemplate": "mock", + "fileSystemName": "mock" + }, + "authenticationType": "ServicePrincipalInKV", + "credentialId": "c32a44e3-5434-4ad1-a043-79f98f231f73" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/88b13522-6f6e-45a0-b1c1-61280b08478a", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-f02cc41158b3054aac4c00f5586ab6ca-49dfaa3ffc0ebe47-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "bf0985f847b0c9a497e00ca0221a5194", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "9fbd8d43-8146-4244-8817-326394995dba", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:35 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "318", + "x-request-id": "9fbd8d43-8146-4244-8817-326394995dba" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/c32a44e3-5434-4ad1-a043-79f98f231f73", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-2f3330d3ee5fb64eb194c7fbe590fc4e-9a56b7de075a784b-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "ec9bbbc8be9061eacc4a3f756b5e844c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "ae896330-bc16-498a-bd99-c919f2ec972b", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:35 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "174", + "x-request-id": "ae896330-bc16-498a-bd99-c919f2ec972b" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "1367797750" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataLakeStorageGen2DataFeedWithCredentialAuthentication(ServicePrincipalInKeyVault)Async.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataLakeStorageGen2DataFeedWithCredentialAuthentication(ServicePrincipalInKeyVault)Async.json new file mode 100644 index 0000000000000..ff58879ca53d0 --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataLakeStorageGen2DataFeedWithCredentialAuthentication(ServicePrincipalInKeyVault)Async.json @@ -0,0 +1,325 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "308", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-8bc82272f257314ea636178158817b1b-5aa1e4b931894141-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "c72a8782ff9e242c52bfeb40fcc24018", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "parameters": { + "keyVaultEndpoint": "https://mock.com/", + "keyVaultClientId": "mock", + "keyVaultClientSecret": "Sanitized", + "servicePrincipalIdNameInKV": "mock", + "servicePrincipalSecretNameInKV": "mock", + "tenantId": "mock" + }, + "dataSourceCredentialType": "ServicePrincipalInKV", + "dataSourceCredentialName": "credentialNC6tIWAr" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "82593449-19db-4349-98be-96b498121723", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:40:07 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/eb452bd3-5768-4175-b28c-37b32a22074d", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "552", + "x-request-id": "82593449-19db-4349-98be-96b498121723" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/eb452bd3-5768-4175-b28c-37b32a22074d", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-8bc82272f257314ea636178158817b1b-f603652ad9f4904f-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "2a383814bdf78e1408a862cfd0e51a65", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "8d74df09-fe50-4814-8c81-8170b480298e", + "Content-Length": "374", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:40:09 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "163", + "x-request-id": "8d74df09-fe50-4814-8c81-8170b480298e" + }, + "ResponseBody": { + "dataSourceCredentialId": "eb452bd3-5768-4175-b28c-37b32a22074d", + "dataSourceCredentialName": "credentialNC6tIWAr", + "dataSourceCredentialDescription": "", + "dataSourceCredentialType": "ServicePrincipalInKV", + "parameters": { + "servicePrincipalSecretNameInKV": "mock", + "servicePrincipalIdNameInKV": "mock", + "tenantId": "mock", + "keyVaultClientId": "mock", + "keyVaultEndpoint": "https://mock.com/" + } + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "419", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-d443d558ef87ec4b8ee66248a850b672-e48347d35c1a184c-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "23c72a8667962c821c9752cbdd2be1c4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "accountName": "mock", + "accountKey": "Sanitized", + "fileSystemName": "mock", + "directoryTemplate": "mock", + "fileTemplate": "mock" + }, + "dataSourceType": "AzureDataLakeStorageGen2", + "dataFeedName": "dataFeedFYnKj8sA", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z", + "authenticationType": "ServicePrincipalInKV", + "credentialId": "eb452bd3-5768-4175-b28c-37b32a22074d" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "33fc22dc-6897-4882-859d-da8a1a7eeab6", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:40:09 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/2c2018cf-5dad-4a8a-80ad-9516666c6724", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "798", + "x-request-id": "33fc22dc-6897-4882-859d-da8a1a7eeab6" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/2c2018cf-5dad-4a8a-80ad-9516666c6724", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-d443d558ef87ec4b8ee66248a850b672-e82bb9d2a697a440-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "f6bf9c735d9c6c53a4862007dc96e902", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "242379fb-cf35-4213-b322-a73f43eb1bf1", + "Content-Length": "1035", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:40:10 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "188", + "x-request-id": "242379fb-cf35-4213-b322-a73f43eb1bf1" + }, + "ResponseBody": { + "dataFeedId": "2c2018cf-5dad-4a8a-80ad-9516666c6724", + "dataFeedName": "dataFeedFYnKj8sA", + "metrics": [ + { + "metricId": "04a406c3-0e11-496e-9948-a1beab2abae8", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataLakeStorageGen2", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:40:09Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "fileTemplate": "mock", + "accountName": "mock", + "directoryTemplate": "mock", + "fileSystemName": "mock" + }, + "authenticationType": "ServicePrincipalInKV", + "credentialId": "eb452bd3-5768-4175-b28c-37b32a22074d" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/2c2018cf-5dad-4a8a-80ad-9516666c6724", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-2b0767a585fe9d48bb439a65a1b5bced-95103a06c84a824a-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "cca32fa2f0f6a0f82535b239934f87f4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "4b2f76a9-5de8-47a7-8afd-e58f167ccea8", + "Content-Length": "1035", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:40:10 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "156", + "x-request-id": "4b2f76a9-5de8-47a7-8afd-e58f167ccea8" + }, + "ResponseBody": { + "dataFeedId": "2c2018cf-5dad-4a8a-80ad-9516666c6724", + "dataFeedName": "dataFeedFYnKj8sA", + "metrics": [ + { + "metricId": "04a406c3-0e11-496e-9948-a1beab2abae8", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataLakeStorageGen2", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:40:09Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "fileTemplate": "mock", + "accountName": "mock", + "directoryTemplate": "mock", + "fileSystemName": "mock" + }, + "authenticationType": "ServicePrincipalInKV", + "credentialId": "eb452bd3-5768-4175-b28c-37b32a22074d" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/2c2018cf-5dad-4a8a-80ad-9516666c6724", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-7b663c2485bd224290c508d713e6d85b-3a04ba0fbbcd6748-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "923620139f52296cd75a7f0f467b5086", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "145e8ab3-1a13-4221-9c4f-9966fc3ca494", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:40:10 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "313", + "x-request-id": "145e8ab3-1a13-4221-9c4f-9966fc3ca494" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/eb452bd3-5768-4175-b28c-37b32a22074d", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-03db25cccbdf104da59ba0932ea85b22-19e7c448569f334c-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "ae284fae158783cea31ed067aa1ad955", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "560281ed-6b86-4413-8742-a666b09cf17f", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:40:10 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "202", + "x-request-id": "560281ed-6b86-4413-8742-a666b09cf17f" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "962161926" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataLakeStorageGen2DataFeedWithCredentialAuthentication(SharedKey).json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataLakeStorageGen2DataFeedWithCredentialAuthentication(SharedKey).json new file mode 100644 index 0000000000000..33a76d1ee42ef --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataLakeStorageGen2DataFeedWithCredentialAuthentication(SharedKey).json @@ -0,0 +1,314 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "140", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-5a51123b554cfa44952eeb8824d51e8a-831b54316c4ae64f-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "0bd417e45e090166e90c005ee21d4c40", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "parameters": { + "accountKey": "Sanitized" + }, + "dataSourceCredentialType": "DataLakeGen2SharedKey", + "dataSourceCredentialName": "credentialwKdIAoGT" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "dc616188-29fa-485a-8bdf-cc1ad649095a", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:35 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/9c6533f8-2d8e-40f7-8791-ac5c1ed64677", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "443", + "x-request-id": "dc616188-29fa-485a-8bdf-cc1ad649095a" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/9c6533f8-2d8e-40f7-8791-ac5c1ed64677", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-5a51123b554cfa44952eeb8824d51e8a-eb9ec11dfc305e45-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "58a712405dff06c137ada43a1947e22b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "0af6743b-ef23-4d44-8236-e11e709595cb", + "Content-Length": "217", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:36 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "120", + "x-request-id": "0af6743b-ef23-4d44-8236-e11e709595cb" + }, + "ResponseBody": { + "dataSourceCredentialId": "9c6533f8-2d8e-40f7-8791-ac5c1ed64677", + "dataSourceCredentialName": "credentialwKdIAoGT", + "dataSourceCredentialDescription": "", + "dataSourceCredentialType": "DataLakeGen2SharedKey", + "parameters": {} + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "420", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-6aa7053f1288d2458ec66eddb856b483-1c3230b32cd2d84d-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "c3db921885f0d9d1e78205095347f986", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "accountName": "mock", + "accountKey": "Sanitized", + "fileSystemName": "mock", + "directoryTemplate": "mock", + "fileTemplate": "mock" + }, + "dataSourceType": "AzureDataLakeStorageGen2", + "dataFeedName": "dataFeedRQEDYqmk", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z", + "authenticationType": "DataLakeGen2SharedKey", + "credentialId": "9c6533f8-2d8e-40f7-8791-ac5c1ed64677" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "85cc7cfc-8091-410b-ac42-a1fdaf44e77d", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:36 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/9e4ed0b7-d263-40e3-a1cb-77c91b6e7568", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "550", + "x-request-id": "85cc7cfc-8091-410b-ac42-a1fdaf44e77d" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/9e4ed0b7-d263-40e3-a1cb-77c91b6e7568", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-6aa7053f1288d2458ec66eddb856b483-393fedf2b6ed1f4e-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "5bd4ce562cb9a1e829d521474b4d8baf", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "e5a1475e-0586-444a-a50a-23fc18966e55", + "Content-Length": "1036", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:36 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "160", + "x-request-id": "e5a1475e-0586-444a-a50a-23fc18966e55" + }, + "ResponseBody": { + "dataFeedId": "9e4ed0b7-d263-40e3-a1cb-77c91b6e7568", + "dataFeedName": "dataFeedRQEDYqmk", + "metrics": [ + { + "metricId": "9d273718-d013-4a91-a259-18400f410f29", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataLakeStorageGen2", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:36Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "fileTemplate": "mock", + "accountName": "mock", + "directoryTemplate": "mock", + "fileSystemName": "mock" + }, + "authenticationType": "DataLakeGen2SharedKey", + "credentialId": "9c6533f8-2d8e-40f7-8791-ac5c1ed64677" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/9e4ed0b7-d263-40e3-a1cb-77c91b6e7568", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-a96f1e840d4c644ab78ff9235c41884f-b33dcf1a365ebc4d-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "6d40fa44fe81b116dccb529642d9d7f5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "e607afe5-0a74-41c2-889b-7ff598b14bfd", + "Content-Length": "1036", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:36 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "161", + "x-request-id": "e607afe5-0a74-41c2-889b-7ff598b14bfd" + }, + "ResponseBody": { + "dataFeedId": "9e4ed0b7-d263-40e3-a1cb-77c91b6e7568", + "dataFeedName": "dataFeedRQEDYqmk", + "metrics": [ + { + "metricId": "9d273718-d013-4a91-a259-18400f410f29", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataLakeStorageGen2", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:36Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "fileTemplate": "mock", + "accountName": "mock", + "directoryTemplate": "mock", + "fileSystemName": "mock" + }, + "authenticationType": "DataLakeGen2SharedKey", + "credentialId": "9c6533f8-2d8e-40f7-8791-ac5c1ed64677" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/9e4ed0b7-d263-40e3-a1cb-77c91b6e7568", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-9638527820a6b649bcfc553db723aeff-aa8a0e5c0c33554a-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "e7a84ba172bdecf3aa3a9a1b64898d9a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "42d395ad-b583-4b61-92bc-d88151a33364", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:37 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "308", + "x-request-id": "42d395ad-b583-4b61-92bc-d88151a33364" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/9c6533f8-2d8e-40f7-8791-ac5c1ed64677", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-9266d80e4bf7ad4fa0698197f7323c77-0456f0f0d7508747-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "58c556f78b075705b7237fedd9515f50", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "fa3f6409-67e3-4aac-8589-7f5c2dac96dd", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:37 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "167", + "x-request-id": "fa3f6409-67e3-4aac-8589-7f5c2dac96dd" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "86821796" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataLakeStorageGen2DataFeedWithCredentialAuthentication(SharedKey)Async.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataLakeStorageGen2DataFeedWithCredentialAuthentication(SharedKey)Async.json new file mode 100644 index 0000000000000..6e9ce1139906f --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetAzureDataLakeStorageGen2DataFeedWithCredentialAuthentication(SharedKey)Async.json @@ -0,0 +1,314 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "140", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-713ceb3fe7e1f44aa0d9d5feb252a2cc-8fcd1db7393df644-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "2fcc70c78019e4145623e6c997bdc608", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "parameters": { + "accountKey": "Sanitized" + }, + "dataSourceCredentialType": "DataLakeGen2SharedKey", + "dataSourceCredentialName": "credentialbPAbUZd8" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "46a3176b-7d95-4b71-bbeb-e54ed94e7150", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:40:11 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/9a3daec0-e589-4f9e-a26a-9580a04bd066", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "217", + "x-request-id": "46a3176b-7d95-4b71-bbeb-e54ed94e7150" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/9a3daec0-e589-4f9e-a26a-9580a04bd066", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-713ceb3fe7e1f44aa0d9d5feb252a2cc-5cb7f2f7ab500740-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "e52426a279bb9f1771406d6cd2b5231b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "218e49ce-d277-4b5d-8684-cd243ecc1206", + "Content-Length": "217", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:40:11 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "98", + "x-request-id": "218e49ce-d277-4b5d-8684-cd243ecc1206" + }, + "ResponseBody": { + "dataSourceCredentialId": "9a3daec0-e589-4f9e-a26a-9580a04bd066", + "dataSourceCredentialName": "credentialbPAbUZd8", + "dataSourceCredentialDescription": "", + "dataSourceCredentialType": "DataLakeGen2SharedKey", + "parameters": {} + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "420", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-9f4d18b2c1f557428379e7b144a0f37d-42634e805c35cb44-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "68d0b33b5c080193baf0a3629fe4774d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "accountName": "mock", + "accountKey": "Sanitized", + "fileSystemName": "mock", + "directoryTemplate": "mock", + "fileTemplate": "mock" + }, + "dataSourceType": "AzureDataLakeStorageGen2", + "dataFeedName": "dataFeed6EwwUMen", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z", + "authenticationType": "DataLakeGen2SharedKey", + "credentialId": "9a3daec0-e589-4f9e-a26a-9580a04bd066" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "99d1624a-ea03-4d3d-a43e-c480945b35ad", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:40:11 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/640fad8b-3432-4d89-ae54-d778e8dc816e", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "456", + "x-request-id": "99d1624a-ea03-4d3d-a43e-c480945b35ad" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/640fad8b-3432-4d89-ae54-d778e8dc816e", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-9f4d18b2c1f557428379e7b144a0f37d-4bb65e8e5dde1d47-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "d8bd2d58a812a111ffca09bcf2637480", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "1b28b1e0-2ee9-4b72-9906-af5503b266cc", + "Content-Length": "1036", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:40:11 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "165", + "x-request-id": "1b28b1e0-2ee9-4b72-9906-af5503b266cc" + }, + "ResponseBody": { + "dataFeedId": "640fad8b-3432-4d89-ae54-d778e8dc816e", + "dataFeedName": "dataFeed6EwwUMen", + "metrics": [ + { + "metricId": "8248efd0-1431-4c9d-a9e1-53e22fa5f2b3", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataLakeStorageGen2", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:40:11Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "fileTemplate": "mock", + "accountName": "mock", + "directoryTemplate": "mock", + "fileSystemName": "mock" + }, + "authenticationType": "DataLakeGen2SharedKey", + "credentialId": "9a3daec0-e589-4f9e-a26a-9580a04bd066" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/640fad8b-3432-4d89-ae54-d778e8dc816e", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-4d1f0b6afbe2b445b0e05719bda9bf3e-ab84d09873e37b4e-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "08aadcf8afa91596ad6bb1e211c17cdb", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "7066ed9e-9aa6-4444-989f-182320329f85", + "Content-Length": "1036", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:40:12 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "157", + "x-request-id": "7066ed9e-9aa6-4444-989f-182320329f85" + }, + "ResponseBody": { + "dataFeedId": "640fad8b-3432-4d89-ae54-d778e8dc816e", + "dataFeedName": "dataFeed6EwwUMen", + "metrics": [ + { + "metricId": "8248efd0-1431-4c9d-a9e1-53e22fa5f2b3", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataLakeStorageGen2", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:40:11Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "fileTemplate": "mock", + "accountName": "mock", + "directoryTemplate": "mock", + "fileSystemName": "mock" + }, + "authenticationType": "DataLakeGen2SharedKey", + "credentialId": "9a3daec0-e589-4f9e-a26a-9580a04bd066" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/640fad8b-3432-4d89-ae54-d778e8dc816e", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-816ff7490fe03c458388a769f0b47c39-940658a3dbb38945-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "660a7d6355639235a12e683e52d60f56", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "f6fab14f-aad4-437e-a9c3-ace7799c8c71", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:40:12 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "301", + "x-request-id": "f6fab14f-aad4-437e-a9c3-ace7799c8c71" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/9a3daec0-e589-4f9e-a26a-9580a04bd066", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-7da5b108aee2bd418b9e478d4ca4dd4d-4ddbdacf8a9e4843-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "c26a227c6f39a9a496a82ba6f62f8f3e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "b31ca8a4-8179-46be-b7fa-4531ea3562cc", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:40:12 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "166", + "x-request-id": "b31ca8a4-8179-46be-b7fa-4531ea3562cc" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "713860733" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetSqlServerDataFeedWithAuthentication(Basic).json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetSqlServerDataFeedWithAuthentication(Basic).json new file mode 100644 index 0000000000000..4679a9a15cb76 --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetSqlServerDataFeedWithAuthentication(Basic).json @@ -0,0 +1,211 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "262", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-13b716446cbc5b4593cf9694e5afa4b2-3aa185939e54b64e-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "165c9a2323e6fa7445aa6ea7ac204f86", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "query": "mock" + }, + "dataSourceType": "SqlServer", + "dataFeedName": "dataFeedjAh8CTFY", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z", + "authenticationType": "Basic" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "dfef34f2-7839-4ad3-9915-e9b2a3df4e8f", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:37 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/527aa902-3de0-4357-aac0-d250214a04e8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "573", + "x-request-id": "dfef34f2-7839-4ad3-9915-e9b2a3df4e8f" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/527aa902-3de0-4357-aac0-d250214a04e8", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-13b716446cbc5b4593cf9694e5afa4b2-0298aaffe2fe7e46-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "c167ca1524026c8dc45ffb7aab9e540f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "bc26355c-842e-4fa5-a4b6-2f8f3f099ad0", + "Content-Length": "872", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:38 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "166", + "x-request-id": "bc26355c-842e-4fa5-a4b6-2f8f3f099ad0" + }, + "ResponseBody": { + "dataFeedId": "527aa902-3de0-4357-aac0-d250214a04e8", + "dataFeedName": "dataFeedjAh8CTFY", + "metrics": [ + { + "metricId": "a1c86b04-654d-4ecc-a9f8-f325b5fe6c46", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:38Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/527aa902-3de0-4357-aac0-d250214a04e8", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-e3f6ba2242544b4ea04d328c9fee572e-9c87f9ad3c8c2041-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "44012f4f37d7c6c1b1ea48ae6e48876b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "d963e44d-da51-4d11-b935-ba2167a6993c", + "Content-Length": "872", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:38 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "158", + "x-request-id": "d963e44d-da51-4d11-b935-ba2167a6993c" + }, + "ResponseBody": { + "dataFeedId": "527aa902-3de0-4357-aac0-d250214a04e8", + "dataFeedName": "dataFeedjAh8CTFY", + "metrics": [ + { + "metricId": "a1c86b04-654d-4ecc-a9f8-f325b5fe6c46", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:38Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/527aa902-3de0-4357-aac0-d250214a04e8", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-a83dc2d33598f945ba96711f45719f91-53d6c9dd0047ff42-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "e1dee8b39301fff30cf0528727fa4ea6", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "17e989b2-bac7-4b6c-ad71-c2321a6c07f4", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:38 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "308", + "x-request-id": "17e989b2-bac7-4b6c-ad71-c2321a6c07f4" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "1133510310" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetSqlServerDataFeedWithAuthentication(Basic)Async.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetSqlServerDataFeedWithAuthentication(Basic)Async.json new file mode 100644 index 0000000000000..9b54dac6c95de --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetSqlServerDataFeedWithAuthentication(Basic)Async.json @@ -0,0 +1,211 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "262", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-8e17bf0dad185b4389a58d64c6c12243-94af0872aec9624e-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "dac2c81a18e90d2157158e37b0fb49ab", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "query": "mock" + }, + "dataSourceType": "SqlServer", + "dataFeedName": "dataFeedyAD3wNL5", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z", + "authenticationType": "Basic" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "f8691e08-7b64-430a-86af-d63a0ce14797", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:40:13 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/267e1c99-5b16-4471-8d63-59bf76a77d70", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "398", + "x-request-id": "f8691e08-7b64-430a-86af-d63a0ce14797" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/267e1c99-5b16-4471-8d63-59bf76a77d70", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-8e17bf0dad185b4389a58d64c6c12243-5492da62bcd10d4f-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "89c2afb17ba4ef715398405425c5cec2", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "06440804-76ba-43cc-bb4e-616c7bdd5ab5", + "Content-Length": "872", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:40:13 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "172", + "x-request-id": "06440804-76ba-43cc-bb4e-616c7bdd5ab5" + }, + "ResponseBody": { + "dataFeedId": "267e1c99-5b16-4471-8d63-59bf76a77d70", + "dataFeedName": "dataFeedyAD3wNL5", + "metrics": [ + { + "metricId": "8e0026e2-198e-4437-b20e-8c8a474eaf41", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:40:13Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/267e1c99-5b16-4471-8d63-59bf76a77d70", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-76ba0fe4d3ffa84fb4c02706ee9ebff3-bf6b53e10adcfc48-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "28e3cd282948da66f82f4e73d5c72e41", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "dda4b8a5-da46-4698-84df-4a482d8a9b5c", + "Content-Length": "872", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:40:13 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "177", + "x-request-id": "dda4b8a5-da46-4698-84df-4a482d8a9b5c" + }, + "ResponseBody": { + "dataFeedId": "267e1c99-5b16-4471-8d63-59bf76a77d70", + "dataFeedName": "dataFeedyAD3wNL5", + "metrics": [ + { + "metricId": "8e0026e2-198e-4437-b20e-8c8a474eaf41", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:40:13Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/267e1c99-5b16-4471-8d63-59bf76a77d70", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-fa89e36c80fc3a43ad5d40619244679e-4ba7f520ceb77f4e-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "b642524426349e7b57d38751d7cde891", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "7ea82270-094c-4bc7-ac9b-a48611b1a3fd", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:40:13 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "421", + "x-request-id": "7ea82270-094c-4bc7-ac9b-a48611b1a3fd" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "144618312" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetSqlServerDataFeedWithAuthentication(ManagedIdentity).json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetSqlServerDataFeedWithAuthentication(ManagedIdentity).json new file mode 100644 index 0000000000000..a25bb95a2ab18 --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetSqlServerDataFeedWithAuthentication(ManagedIdentity).json @@ -0,0 +1,211 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "272", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-4f2bf90c5f716c41a6c302111d8e6547-20e58839f6e77044-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "7cf162ca751c941e85b0837fd0119eaf", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "query": "mock" + }, + "dataSourceType": "SqlServer", + "dataFeedName": "dataFeedDGj8KcSJ", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z", + "authenticationType": "ManagedIdentity" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "ef434e76-1bb8-43de-aeb2-49bd0a839c5d", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:39 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/0e70102d-1975-4122-9b88-77ac5715b91b", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "550", + "x-request-id": "ef434e76-1bb8-43de-aeb2-49bd0a839c5d" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/0e70102d-1975-4122-9b88-77ac5715b91b", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-4f2bf90c5f716c41a6c302111d8e6547-697b8a2cc92cbf4e-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "a8b631298cfa061f53aa4291cd439ded", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "ed02cc12-ac5d-4d3a-8d05-097f8635e413", + "Content-Length": "882", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:39 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "164", + "x-request-id": "ed02cc12-ac5d-4d3a-8d05-097f8635e413" + }, + "ResponseBody": { + "dataFeedId": "0e70102d-1975-4122-9b88-77ac5715b91b", + "dataFeedName": "dataFeedDGj8KcSJ", + "metrics": [ + { + "metricId": "a15af789-3a8b-43bf-bb24-a5f01a93df27", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:39Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "ManagedIdentity" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/0e70102d-1975-4122-9b88-77ac5715b91b", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-f3aa3e6159b89c4384d4842098018fc3-c32c6ac4558c3242-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "fb4806beaac81d8443eb65015c033918", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "c1b85dc2-da86-4544-bd15-86212ba8e65b", + "Content-Length": "882", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:39 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "167", + "x-request-id": "c1b85dc2-da86-4544-bd15-86212ba8e65b" + }, + "ResponseBody": { + "dataFeedId": "0e70102d-1975-4122-9b88-77ac5715b91b", + "dataFeedName": "dataFeedDGj8KcSJ", + "metrics": [ + { + "metricId": "a15af789-3a8b-43bf-bb24-a5f01a93df27", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:39Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "ManagedIdentity" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/0e70102d-1975-4122-9b88-77ac5715b91b", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-ca338c4804daab4ab99275d8298d0952-8580d8b192ad084f-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "dc5ba0eb1f603d9143ea2871328dc742", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "c1054596-47a3-48ce-a784-526959dbdd88", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:40 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "364", + "x-request-id": "c1054596-47a3-48ce-a784-526959dbdd88" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "953161376" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetSqlServerDataFeedWithAuthentication(ManagedIdentity)Async.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetSqlServerDataFeedWithAuthentication(ManagedIdentity)Async.json new file mode 100644 index 0000000000000..ae44323137841 --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetSqlServerDataFeedWithAuthentication(ManagedIdentity)Async.json @@ -0,0 +1,211 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "272", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-7a6825e31600a340a756e119b192091d-c8d40e4dda720b41-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "9875515a189b381a19b5d4736d3ee8cf", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "query": "mock" + }, + "dataSourceType": "SqlServer", + "dataFeedName": "dataFeedDAG9E3Df", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z", + "authenticationType": "ManagedIdentity" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "2105ecbe-3228-47ba-ba66-4eb16153a1f8", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:40:14 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/378c1222-075d-46b0-8403-aea1835de266", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "702", + "x-request-id": "2105ecbe-3228-47ba-ba66-4eb16153a1f8" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/378c1222-075d-46b0-8403-aea1835de266", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-7a6825e31600a340a756e119b192091d-72c8fa945540c54e-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "0bc0d8ece3e4eb534897da4b3c198cc2", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "ee977f3e-1d52-47cc-bef9-ad113264bfe0", + "Content-Length": "882", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:40:14 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "243", + "x-request-id": "ee977f3e-1d52-47cc-bef9-ad113264bfe0" + }, + "ResponseBody": { + "dataFeedId": "378c1222-075d-46b0-8403-aea1835de266", + "dataFeedName": "dataFeedDAG9E3Df", + "metrics": [ + { + "metricId": "9ac1951c-b875-4270-a826-59bb4cf66996", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:40:14Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "ManagedIdentity" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/378c1222-075d-46b0-8403-aea1835de266", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-4ca2f0846d5b8548b7cb01b079603163-7927e443696ef142-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "337f48affeb49ccd007f6e25bd2456ea", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "326ebaed-ca2d-4c83-a968-7413ba43f35c", + "Content-Length": "882", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:40:15 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "214", + "x-request-id": "326ebaed-ca2d-4c83-a968-7413ba43f35c" + }, + "ResponseBody": { + "dataFeedId": "378c1222-075d-46b0-8403-aea1835de266", + "dataFeedName": "dataFeedDAG9E3Df", + "metrics": [ + { + "metricId": "9ac1951c-b875-4270-a826-59bb4cf66996", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:40:14Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "ManagedIdentity" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/378c1222-075d-46b0-8403-aea1835de266", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-79a312123efe31429fa030acdf9a8487-6493364ae3f02146-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "47de2f0bb42b7709fe8a50043dcefcff", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "68da93a3-6627-48ca-b4a7-68d161522037", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:40:15 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "435", + "x-request-id": "68da93a3-6627-48ca-b4a7-68d161522037" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "1505325234" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetSqlServerDataFeedWithCredentialAuthentication(ServicePrincipal).json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetSqlServerDataFeedWithCredentialAuthentication(ServicePrincipal).json new file mode 100644 index 0000000000000..1773b15af4a30 --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetSqlServerDataFeedWithCredentialAuthentication(ServicePrincipal).json @@ -0,0 +1,310 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "173", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-bb9fbb616a705d4ab219915e455ff8ff-178b1c1658ff5546-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "130a335b17a59b5c6780983abd4a2b2e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "parameters": { + "clientId": "mock", + "clientSecret": "Sanitized", + "tenantId": "mock" + }, + "dataSourceCredentialType": "ServicePrincipal", + "dataSourceCredentialName": "credentialukm5TQDZ" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "55e148e7-3d67-48f5-b842-0a37ab1e1dd0", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:40 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/000e1dac-4ecb-4724-b8ea-df15c11489b8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "443", + "x-request-id": "55e148e7-3d67-48f5-b842-0a37ab1e1dd0" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/000e1dac-4ecb-4724-b8ea-df15c11489b8", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-bb9fbb616a705d4ab219915e455ff8ff-be67e3419a2bd54d-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "aaa72c26bd2be0879f4bb3517df2e29d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "5d16e69c-36c3-4641-a9aa-b00ce2a445b9", + "Content-Length": "247", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:40 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "98", + "x-request-id": "5d16e69c-36c3-4641-a9aa-b00ce2a445b9" + }, + "ResponseBody": { + "dataSourceCredentialId": "000e1dac-4ecb-4724-b8ea-df15c11489b8", + "dataSourceCredentialName": "credentialukm5TQDZ", + "dataSourceCredentialDescription": "", + "dataSourceCredentialType": "ServicePrincipal", + "parameters": { + "clientId": "mock", + "tenantId": "mock" + } + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "327", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-0238fba375934c4a84980a5d8cbab75a-1c587282b3ac2043-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "870cb1a3540177577d53567b3dfed79d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "query": "mock" + }, + "dataSourceType": "SqlServer", + "dataFeedName": "dataFeedXxcGkiry", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z", + "authenticationType": "ServicePrincipal", + "credentialId": "000e1dac-4ecb-4724-b8ea-df15c11489b8" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "f9dd876e-b17e-4163-89ca-717dcb116413", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:41 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/583e2ee4-b597-4ce1-9b0b-6a10b8eca916", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "626", + "x-request-id": "f9dd876e-b17e-4163-89ca-717dcb116413" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/583e2ee4-b597-4ce1-9b0b-6a10b8eca916", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-0238fba375934c4a84980a5d8cbab75a-f1d22200a5d7e64d-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "5a7329ab0a63741d9efb52e7fec2a720", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "9df4bc77-0a94-4464-bff4-a205b0bd9828", + "Content-Length": "937", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:41 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "166", + "x-request-id": "9df4bc77-0a94-4464-bff4-a205b0bd9828" + }, + "ResponseBody": { + "dataFeedId": "583e2ee4-b597-4ce1-9b0b-6a10b8eca916", + "dataFeedName": "dataFeedXxcGkiry", + "metrics": [ + { + "metricId": "8cf456b5-3b45-4dce-bf02-bb6a0e7f3c66", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:41Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "ServicePrincipal", + "credentialId": "000e1dac-4ecb-4724-b8ea-df15c11489b8" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/583e2ee4-b597-4ce1-9b0b-6a10b8eca916", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-5d69683582fd774d92fe01b3dad9928f-5de3a84ab12a2745-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "7a06d69000b14bdff43cd4299c6660e9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "d7159d95-529b-4fcd-95af-bf10f92379e7", + "Content-Length": "937", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:41 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "160", + "x-request-id": "d7159d95-529b-4fcd-95af-bf10f92379e7" + }, + "ResponseBody": { + "dataFeedId": "583e2ee4-b597-4ce1-9b0b-6a10b8eca916", + "dataFeedName": "dataFeedXxcGkiry", + "metrics": [ + { + "metricId": "8cf456b5-3b45-4dce-bf02-bb6a0e7f3c66", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:41Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "ServicePrincipal", + "credentialId": "000e1dac-4ecb-4724-b8ea-df15c11489b8" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/583e2ee4-b597-4ce1-9b0b-6a10b8eca916", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-aef70fbc89ade341aa182c7c5e0281e5-7cb47b16fdaad64f-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "5cbdadfe4192986d9397e906016f78ba", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "afc021c5-f984-463a-a04b-e9f8395888c1", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:42 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "320", + "x-request-id": "afc021c5-f984-463a-a04b-e9f8395888c1" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/000e1dac-4ecb-4724-b8ea-df15c11489b8", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-3d262a3b93133f4bbce73decb2081c2e-dc613b7d0c754d4c-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "66ea35ac5cf7abec4a28662636f4d837", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "ed350460-b284-443d-ad53-be19f75e67db", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:42 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "177", + "x-request-id": "ed350460-b284-443d-ad53-be19f75e67db" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "1962496407" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetSqlServerDataFeedWithCredentialAuthentication(ServicePrincipal)Async.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetSqlServerDataFeedWithCredentialAuthentication(ServicePrincipal)Async.json new file mode 100644 index 0000000000000..2c005e4eec4da --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetSqlServerDataFeedWithCredentialAuthentication(ServicePrincipal)Async.json @@ -0,0 +1,310 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "173", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-048f1b5b89230344a572c2b7dba79f72-73b5b0f42eaeb141-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "0b733a71e289b5e2a5cae691a6c1fd7b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "parameters": { + "clientId": "mock", + "clientSecret": "Sanitized", + "tenantId": "mock" + }, + "dataSourceCredentialType": "ServicePrincipal", + "dataSourceCredentialName": "credentialhMILDtlo" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "d0221302-c890-4b57-bdad-71c734bf2404", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:40:16 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/64eb7eca-863d-4c31-a43f-a3cde43b07d9", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "511", + "x-request-id": "d0221302-c890-4b57-bdad-71c734bf2404" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/64eb7eca-863d-4c31-a43f-a3cde43b07d9", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-048f1b5b89230344a572c2b7dba79f72-19b6213aa68fa342-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "6a56607457c348b527f35313bb88e87a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "be7787fa-06b5-45be-962a-afb5554bb765", + "Content-Length": "247", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:40:16 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "132", + "x-request-id": "be7787fa-06b5-45be-962a-afb5554bb765" + }, + "ResponseBody": { + "dataSourceCredentialId": "64eb7eca-863d-4c31-a43f-a3cde43b07d9", + "dataSourceCredentialName": "credentialhMILDtlo", + "dataSourceCredentialDescription": "", + "dataSourceCredentialType": "ServicePrincipal", + "parameters": { + "clientId": "mock", + "tenantId": "mock" + } + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "327", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-d801f9fd1c49b344a20aff852f64d1af-6a76279963573f42-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "7d6faa8a3b1c22de89abe409b69a5d1a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "query": "mock" + }, + "dataSourceType": "SqlServer", + "dataFeedName": "dataFeeduo8zIprW", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z", + "authenticationType": "ServicePrincipal", + "credentialId": "64eb7eca-863d-4c31-a43f-a3cde43b07d9" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "218dae83-a638-4135-beb9-13736597b130", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:40:17 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/4e8e3374-d32f-4f15-8889-d88918a5500d", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "754", + "x-request-id": "218dae83-a638-4135-beb9-13736597b130" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/4e8e3374-d32f-4f15-8889-d88918a5500d", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-d801f9fd1c49b344a20aff852f64d1af-a9b0c5265f51c443-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "96e32a85cf8f1df9e26bd162a7e9d390", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "db437a01-6235-4cbf-a40e-ec15973f89a0", + "Content-Length": "937", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:40:17 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "174", + "x-request-id": "db437a01-6235-4cbf-a40e-ec15973f89a0" + }, + "ResponseBody": { + "dataFeedId": "4e8e3374-d32f-4f15-8889-d88918a5500d", + "dataFeedName": "dataFeeduo8zIprW", + "metrics": [ + { + "metricId": "1430d81d-f932-46e9-8021-870de20f28c5", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:40:17Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "ServicePrincipal", + "credentialId": "64eb7eca-863d-4c31-a43f-a3cde43b07d9" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/4e8e3374-d32f-4f15-8889-d88918a5500d", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-2ee19740dbce4e468b82a07824d0e58c-44fa37853339aa4f-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "19dfabc837e7ec2b14308a10a3dfc426", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "c136bb87-62fc-4915-9d2d-5f402ae8fecd", + "Content-Length": "937", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:40:17 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "169", + "x-request-id": "c136bb87-62fc-4915-9d2d-5f402ae8fecd" + }, + "ResponseBody": { + "dataFeedId": "4e8e3374-d32f-4f15-8889-d88918a5500d", + "dataFeedName": "dataFeeduo8zIprW", + "metrics": [ + { + "metricId": "1430d81d-f932-46e9-8021-870de20f28c5", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:40:17Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "ServicePrincipal", + "credentialId": "64eb7eca-863d-4c31-a43f-a3cde43b07d9" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/4e8e3374-d32f-4f15-8889-d88918a5500d", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-b82640735d9f334c8224c3c6e869fecc-a5d680b841f29b40-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "7d8effe50000bb1bb0529bb16a7b7b9f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "142acbea-4dd8-4790-9ec7-bfcdabed4db1", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:40:17 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "320", + "x-request-id": "142acbea-4dd8-4790-9ec7-bfcdabed4db1" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/64eb7eca-863d-4c31-a43f-a3cde43b07d9", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-4843ff09d956fb4da9161c25d163431f-645ca6f307d54a4d-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "0a4054d844ba4d33fff7815e44e97a02", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "0dae6cdd-aa6d-4dbc-b66c-18e5ea104457", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:40:18 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "203", + "x-request-id": "0dae6cdd-aa6d-4dbc-b66c-18e5ea104457" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "1819007416" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetSqlServerDataFeedWithCredentialAuthentication(ServicePrincipalInKeyVault).json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetSqlServerDataFeedWithCredentialAuthentication(ServicePrincipalInKeyVault).json new file mode 100644 index 0000000000000..bdbdca9bd3d74 --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetSqlServerDataFeedWithCredentialAuthentication(ServicePrincipalInKeyVault).json @@ -0,0 +1,316 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "308", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-f1f26d62dfcc774db08ea6ddf32e713f-0d2979f8e3486143-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "7c23eb86089e636a34cbcd7c3812af1d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "parameters": { + "keyVaultEndpoint": "https://mock.com/", + "keyVaultClientId": "mock", + "keyVaultClientSecret": "Sanitized", + "servicePrincipalIdNameInKV": "mock", + "servicePrincipalSecretNameInKV": "mock", + "tenantId": "mock" + }, + "dataSourceCredentialType": "ServicePrincipalInKV", + "dataSourceCredentialName": "credential7dqJ7vTl" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "3fd953bd-244d-4c22-92a7-ef28ae4d392c", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:42 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/0cbcbb13-1905-439c-817d-2a629e642d49", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "430", + "x-request-id": "3fd953bd-244d-4c22-92a7-ef28ae4d392c" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/0cbcbb13-1905-439c-817d-2a629e642d49", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-f1f26d62dfcc774db08ea6ddf32e713f-0b66d2bc72c34f4d-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "d79b12c047465ac5d74b8ee955911bbd", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "eb92eb3e-09c4-433d-88fd-42912923879b", + "Content-Length": "374", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:42 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "104", + "x-request-id": "eb92eb3e-09c4-433d-88fd-42912923879b" + }, + "ResponseBody": { + "dataSourceCredentialId": "0cbcbb13-1905-439c-817d-2a629e642d49", + "dataSourceCredentialName": "credential7dqJ7vTl", + "dataSourceCredentialDescription": "", + "dataSourceCredentialType": "ServicePrincipalInKV", + "parameters": { + "servicePrincipalSecretNameInKV": "mock", + "servicePrincipalIdNameInKV": "mock", + "tenantId": "mock", + "keyVaultClientId": "mock", + "keyVaultEndpoint": "https://mock.com/" + } + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "331", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-0f95d18c13349e4b979870d4de2778de-67f3ea74d12a5143-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "5155e618502f5c278aae6ad8f455c73e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "query": "mock" + }, + "dataSourceType": "SqlServer", + "dataFeedName": "dataFeed9L5XuYoH", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z", + "authenticationType": "ServicePrincipalInKV", + "credentialId": "0cbcbb13-1905-439c-817d-2a629e642d49" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "ab90836d-e5a7-406c-95ce-f0344509680b", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:43 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/f9ca8dce-356c-48ae-8eef-8e5ee5428486", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "564", + "x-request-id": "ab90836d-e5a7-406c-95ce-f0344509680b" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/f9ca8dce-356c-48ae-8eef-8e5ee5428486", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-0f95d18c13349e4b979870d4de2778de-eeb9f1175788e34f-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "52a5c826817aa30eaf0ff52d808b0676", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "3a5b2023-b6a0-44ed-b861-37e0dd719bf2", + "Content-Length": "941", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:43 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "160", + "x-request-id": "3a5b2023-b6a0-44ed-b861-37e0dd719bf2" + }, + "ResponseBody": { + "dataFeedId": "f9ca8dce-356c-48ae-8eef-8e5ee5428486", + "dataFeedName": "dataFeed9L5XuYoH", + "metrics": [ + { + "metricId": "422a17e7-2f18-41c1-94eb-0b2a24b4ff58", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:44Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "ServicePrincipalInKV", + "credentialId": "0cbcbb13-1905-439c-817d-2a629e642d49" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/f9ca8dce-356c-48ae-8eef-8e5ee5428486", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-df2f72269eed834eb90e0ad02b2f6e34-b8cc37e78b45ee49-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "60be3dd674f2872b23315fa62743c931", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "c99b1245-3c6e-497e-8c04-f9fb536d1e4e", + "Content-Length": "941", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:43 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "199", + "x-request-id": "c99b1245-3c6e-497e-8c04-f9fb536d1e4e" + }, + "ResponseBody": { + "dataFeedId": "f9ca8dce-356c-48ae-8eef-8e5ee5428486", + "dataFeedName": "dataFeed9L5XuYoH", + "metrics": [ + { + "metricId": "422a17e7-2f18-41c1-94eb-0b2a24b4ff58", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:44Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "ServicePrincipalInKV", + "credentialId": "0cbcbb13-1905-439c-817d-2a629e642d49" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/f9ca8dce-356c-48ae-8eef-8e5ee5428486", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-dfa717b2b5ba234392769b9ed70e100d-e2019e3cb4f25b4a-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "4efd5343e8a497e3d7b1a21f5bf9dbfe", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "6d9cc8c7-268b-46be-a503-46a4a74109b3", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:45 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "353", + "x-request-id": "6d9cc8c7-268b-46be-a503-46a4a74109b3" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/0cbcbb13-1905-439c-817d-2a629e642d49", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-5076a54370d5d84a8ea7ad7f7b3ee2d0-fd1e71e0707a4f44-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "b701f3a76696b24c9d1e2f4821687c6c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "ee59afbe-f094-4e45-8e0e-68f3898406ae", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:45 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "219", + "x-request-id": "ee59afbe-f094-4e45-8e0e-68f3898406ae" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "330148562" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetSqlServerDataFeedWithCredentialAuthentication(ServicePrincipalInKeyVault)Async.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetSqlServerDataFeedWithCredentialAuthentication(ServicePrincipalInKeyVault)Async.json new file mode 100644 index 0000000000000..29e05e61fd102 --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetSqlServerDataFeedWithCredentialAuthentication(ServicePrincipalInKeyVault)Async.json @@ -0,0 +1,316 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "308", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-dfd44ce17d10654da931e46ba6eaa4cd-e83ae32752815748-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "721511b663ee76ca9a2ee0fc41bc836d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "parameters": { + "keyVaultEndpoint": "https://mock.com/", + "keyVaultClientId": "mock", + "keyVaultClientSecret": "Sanitized", + "servicePrincipalIdNameInKV": "mock", + "servicePrincipalSecretNameInKV": "mock", + "tenantId": "mock" + }, + "dataSourceCredentialType": "ServicePrincipalInKV", + "dataSourceCredentialName": "credentialwZN2PwE5" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "fa8be6ce-4acc-4e4f-bc03-39799e9b7d93", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:40:18 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/24805bf7-d50a-4b42-9c07-893f860e4911", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "502", + "x-request-id": "fa8be6ce-4acc-4e4f-bc03-39799e9b7d93" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/24805bf7-d50a-4b42-9c07-893f860e4911", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-dfd44ce17d10654da931e46ba6eaa4cd-26787d6a5d6d0c42-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "25414e01168759b890a35eb0c457f134", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "54bd4769-99f7-4730-99a0-65ec45cb2c85", + "Content-Length": "374", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:40:18 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "105", + "x-request-id": "54bd4769-99f7-4730-99a0-65ec45cb2c85" + }, + "ResponseBody": { + "dataSourceCredentialId": "24805bf7-d50a-4b42-9c07-893f860e4911", + "dataSourceCredentialName": "credentialwZN2PwE5", + "dataSourceCredentialDescription": "", + "dataSourceCredentialType": "ServicePrincipalInKV", + "parameters": { + "servicePrincipalSecretNameInKV": "mock", + "servicePrincipalIdNameInKV": "mock", + "tenantId": "mock", + "keyVaultClientId": "mock", + "keyVaultEndpoint": "https://mock.com/" + } + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "331", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-704c966c631dfb40a1942a11a376a89e-33965faa4d719540-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "c184323f4d8ff7ec26fc36a07353f39f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "query": "mock" + }, + "dataSourceType": "SqlServer", + "dataFeedName": "dataFeedlUIb43e8", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z", + "authenticationType": "ServicePrincipalInKV", + "credentialId": "24805bf7-d50a-4b42-9c07-893f860e4911" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "d7813f35-0550-489e-9237-6bd83a8bc61f", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:40:19 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/c37fb0ed-9827-4b2e-987b-ffc3533ec251", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "484", + "x-request-id": "d7813f35-0550-489e-9237-6bd83a8bc61f" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/c37fb0ed-9827-4b2e-987b-ffc3533ec251", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-704c966c631dfb40a1942a11a376a89e-9d1c07a809b29c41-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "4be2bc581a0442b23cac7e17bda55f0e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "e98df551-dcef-424a-ad89-07110127c491", + "Content-Length": "941", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:40:19 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "209", + "x-request-id": "e98df551-dcef-424a-ad89-07110127c491" + }, + "ResponseBody": { + "dataFeedId": "c37fb0ed-9827-4b2e-987b-ffc3533ec251", + "dataFeedName": "dataFeedlUIb43e8", + "metrics": [ + { + "metricId": "ef6c3a82-0884-441a-a6a9-8b82f73cc629", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:40:19Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "ServicePrincipalInKV", + "credentialId": "24805bf7-d50a-4b42-9c07-893f860e4911" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/c37fb0ed-9827-4b2e-987b-ffc3533ec251", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-8ae2f7e7bc37b54e976a0d489fb1a388-82630bb5360f834f-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "54e65408f69242c9b66789c72150c12b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "b73d9c14-0a1e-4283-84bc-46bbbd029273", + "Content-Length": "941", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:40:19 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "188", + "x-request-id": "b73d9c14-0a1e-4283-84bc-46bbbd029273" + }, + "ResponseBody": { + "dataFeedId": "c37fb0ed-9827-4b2e-987b-ffc3533ec251", + "dataFeedName": "dataFeedlUIb43e8", + "metrics": [ + { + "metricId": "ef6c3a82-0884-441a-a6a9-8b82f73cc629", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:40:19Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "ServicePrincipalInKV", + "credentialId": "24805bf7-d50a-4b42-9c07-893f860e4911" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/c37fb0ed-9827-4b2e-987b-ffc3533ec251", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-254d63be03c4044983d469e2dae41f0b-96598e1f33e80844-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "51855f35fb1024e8804284e3cfd53a81", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "2af33c09-eef3-4115-966e-785258f62777", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:40:19 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "329", + "x-request-id": "2af33c09-eef3-4115-966e-785258f62777" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/24805bf7-d50a-4b42-9c07-893f860e4911", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-5c74d4bcb5b53f4ea041c8c0554a6495-3ca910cfbd92554e-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "1f98279c9f6c620cf29f959d90ea20ec", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "38632b2b-4bf8-4c0b-90f1-5a5e9b6f0672", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:40:20 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "268", + "x-request-id": "38632b2b-4bf8-4c0b-90f1-5a5e9b6f0672" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "1570706223" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetSqlServerDataFeedWithCredentialAuthentication(SqlConnectionString).json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetSqlServerDataFeedWithCredentialAuthentication(SqlConnectionString).json new file mode 100644 index 0000000000000..336b2e2ce2b4a --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetSqlServerDataFeedWithCredentialAuthentication(SqlConnectionString).json @@ -0,0 +1,305 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "149", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-762647090c364f4c8458cf95256a1389-94bbb6238f812f48-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "17c18a9c48c1980c6fdf03507c247151", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "parameters": { + "connectionString": "Sanitized" + }, + "dataSourceCredentialType": "AzureSQLConnectionString", + "dataSourceCredentialName": "credentialWutVm6FU" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "8c9cfdd3-0541-443a-a358-e97feab82aa9", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:45 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/a97cd796-e701-4976-96af-fb378b4d1793", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "308", + "x-request-id": "8c9cfdd3-0541-443a-a358-e97feab82aa9" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/a97cd796-e701-4976-96af-fb378b4d1793", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-762647090c364f4c8458cf95256a1389-a183023eb17c9048-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "20068b42a09a15daccc3912baf3a51b6", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "98681871-d641-4d3d-8188-ddf1890b146e", + "Content-Length": "220", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:45 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "128", + "x-request-id": "98681871-d641-4d3d-8188-ddf1890b146e" + }, + "ResponseBody": { + "dataSourceCredentialId": "a97cd796-e701-4976-96af-fb378b4d1793", + "dataSourceCredentialName": "credentialWutVm6FU", + "dataSourceCredentialDescription": "", + "dataSourceCredentialType": "AzureSQLConnectionString", + "parameters": {} + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "335", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-333c75b23806d7409495082b03f95d38-9190d4bebd638344-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "4d56df5c3314f267f023fbda4d015ffb", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "query": "mock" + }, + "dataSourceType": "SqlServer", + "dataFeedName": "dataFeedDRXuOUrT", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z", + "authenticationType": "AzureSQLConnectionString", + "credentialId": "a97cd796-e701-4976-96af-fb378b4d1793" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "9ad8d3f8-7aec-4144-b78e-5cc9b09ae566", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:46 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/097a30a2-47f6-4ebf-9d15-78e2b0fc913a", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "630", + "x-request-id": "9ad8d3f8-7aec-4144-b78e-5cc9b09ae566" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/097a30a2-47f6-4ebf-9d15-78e2b0fc913a", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-333c75b23806d7409495082b03f95d38-199b980d5897cc46-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "fd4bacb0e1b635e98e4d1f438fbbdecc", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "7c48be8a-5ac6-4eeb-9d7a-643b428d9f78", + "Content-Length": "945", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:46 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "160", + "x-request-id": "7c48be8a-5ac6-4eeb-9d7a-643b428d9f78" + }, + "ResponseBody": { + "dataFeedId": "097a30a2-47f6-4ebf-9d15-78e2b0fc913a", + "dataFeedName": "dataFeedDRXuOUrT", + "metrics": [ + { + "metricId": "bd97e098-3f4d-44f2-aa32-e9d487e6f06b", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:46Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "AzureSQLConnectionString", + "credentialId": "a97cd796-e701-4976-96af-fb378b4d1793" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/097a30a2-47f6-4ebf-9d15-78e2b0fc913a", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-0a44f2c5cc96904ab398c58b2e18cc14-a1dff119a276b245-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "bbc38e338c4a99005b9f3a8c3e776830", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "ce6e3a32-2980-49de-ba72-4a090dae4508", + "Content-Length": "945", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:46 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "152", + "x-request-id": "ce6e3a32-2980-49de-ba72-4a090dae4508" + }, + "ResponseBody": { + "dataFeedId": "097a30a2-47f6-4ebf-9d15-78e2b0fc913a", + "dataFeedName": "dataFeedDRXuOUrT", + "metrics": [ + { + "metricId": "bd97e098-3f4d-44f2-aa32-e9d487e6f06b", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:46Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "AzureSQLConnectionString", + "credentialId": "a97cd796-e701-4976-96af-fb378b4d1793" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/097a30a2-47f6-4ebf-9d15-78e2b0fc913a", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-5fe45eb5aaff3d4fb3dcde549cfaa7eb-bf5fa144df8fec4e-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "c60598d95a2b7ac1f620bfc613246234", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "f2337a94-f5e5-41dd-8e91-7e903c8ee14b", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:47 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "339", + "x-request-id": "f2337a94-f5e5-41dd-8e91-7e903c8ee14b" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/a97cd796-e701-4976-96af-fb378b4d1793", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-6b9fba356031d14bbbd664a41aa83deb-4f2315168b83694d-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "bfa62f45a43d23b0abb1a116a75df616", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "f18da03e-5407-4abe-b365-cd2b01bbf379", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:47 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "182", + "x-request-id": "f18da03e-5407-4abe-b365-cd2b01bbf379" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "2034968329" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetSqlServerDataFeedWithCredentialAuthentication(SqlConnectionString)Async.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetSqlServerDataFeedWithCredentialAuthentication(SqlConnectionString)Async.json new file mode 100644 index 0000000000000..3a797adfba76d --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/CreateAndGetSqlServerDataFeedWithCredentialAuthentication(SqlConnectionString)Async.json @@ -0,0 +1,305 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "149", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-8bb8a5c66868004ab8bb207b079c19cb-f88bebef86fa6f49-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "0db3c3cba329ab6ced4216f985cd45a5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "parameters": { + "connectionString": "Sanitized" + }, + "dataSourceCredentialType": "AzureSQLConnectionString", + "dataSourceCredentialName": "credentialLqRE570n" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "419793dc-ff18-4328-a9ea-d4b245acf9ac", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:40:20 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/5393b2f7-955a-4cc9-8549-e8f641e6d7d6", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "227", + "x-request-id": "419793dc-ff18-4328-a9ea-d4b245acf9ac" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/5393b2f7-955a-4cc9-8549-e8f641e6d7d6", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-8bb8a5c66868004ab8bb207b079c19cb-dab2d969d80dc043-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "6eb9c7846bda13cc850362f11e002629", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "6a7cffcb-6f22-4414-9798-4e8c3b8668c4", + "Content-Length": "220", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:40:20 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "117", + "x-request-id": "6a7cffcb-6f22-4414-9798-4e8c3b8668c4" + }, + "ResponseBody": { + "dataSourceCredentialId": "5393b2f7-955a-4cc9-8549-e8f641e6d7d6", + "dataSourceCredentialName": "credentialLqRE570n", + "dataSourceCredentialDescription": "", + "dataSourceCredentialType": "AzureSQLConnectionString", + "parameters": {} + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "335", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-9ad716ecc1655d4ba63fee7f93164039-9c9d8d1f63363047-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "be712c8208738d2d8c6dc7a2c4fe8b5f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "query": "mock" + }, + "dataSourceType": "SqlServer", + "dataFeedName": "dataFeedpakxYzhL", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z", + "authenticationType": "AzureSQLConnectionString", + "credentialId": "5393b2f7-955a-4cc9-8549-e8f641e6d7d6" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "1314c42a-f7fa-4046-a38f-f6a389126043", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:40:21 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/bddb2b58-0545-4e43-ba55-79795bffd5b4", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "666", + "x-request-id": "1314c42a-f7fa-4046-a38f-f6a389126043" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/bddb2b58-0545-4e43-ba55-79795bffd5b4", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-9ad716ecc1655d4ba63fee7f93164039-e9c0ee1b905b224b-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "25879ff67a41ec8c1bedf82dcce93a64", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "f0ee61c8-018c-4571-a67e-569e24c550bd", + "Content-Length": "945", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:40:21 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "183", + "x-request-id": "f0ee61c8-018c-4571-a67e-569e24c550bd" + }, + "ResponseBody": { + "dataFeedId": "bddb2b58-0545-4e43-ba55-79795bffd5b4", + "dataFeedName": "dataFeedpakxYzhL", + "metrics": [ + { + "metricId": "a641d735-d9ad-4ce7-a7a8-7649912661f7", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:40:22Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "AzureSQLConnectionString", + "credentialId": "5393b2f7-955a-4cc9-8549-e8f641e6d7d6" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/bddb2b58-0545-4e43-ba55-79795bffd5b4", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-87c5e6ec1d481243bd0c4497eb4cd8bd-91ba0f323c5cf048-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "aeebc17d0efa7c9fd6d564b139846402", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "0d09764d-7533-40e6-8140-f97d7f65b480", + "Content-Length": "945", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:40:21 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "202", + "x-request-id": "0d09764d-7533-40e6-8140-f97d7f65b480" + }, + "ResponseBody": { + "dataFeedId": "bddb2b58-0545-4e43-ba55-79795bffd5b4", + "dataFeedName": "dataFeedpakxYzhL", + "metrics": [ + { + "metricId": "a641d735-d9ad-4ce7-a7a8-7649912661f7", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:40:22Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "AzureSQLConnectionString", + "credentialId": "5393b2f7-955a-4cc9-8549-e8f641e6d7d6" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/bddb2b58-0545-4e43-ba55-79795bffd5b4", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-de64ae51f1071a4ca3575deb63431057-15f16e24b8a75742-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "ca66a1cb249707b69f84a28610ffc0a3", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "d6db168a-c7cc-4646-ba39-2f01faac52bc", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:40:22 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "334", + "x-request-id": "d6db168a-c7cc-4646-ba39-2f01faac52bc" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/5393b2f7-955a-4cc9-8549-e8f641e6d7d6", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-74e9ed14c0a76c4480a6ed62e3f21fa5-5b7966faef51fd45-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "02256332dd13e765000a4f6b16dbb396", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "3aeba3c6-0e01-4912-a106-ec5636ab4159", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:40:22 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "177", + "x-request-id": "3aeba3c6-0e01-4912-a106-ec5636ab4159" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "1128042343" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureBlobDataFeedWithAuthentication(Basic).json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureBlobDataFeedWithAuthentication(Basic).json new file mode 100644 index 0000000000000..b75cc63e000d9 --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureBlobDataFeedWithAuthentication(Basic).json @@ -0,0 +1,307 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "259", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-689c1f07daeb8a4e93752d3a8de3dc82-43e09fffec038c40-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "8ac5760129c2a9f3c62308a4f02c21d5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "container": "mock", + "blobTemplate": "mock" + }, + "dataSourceType": "AzureBlob", + "dataFeedName": "dataFeedOfxYJOvt", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "48c85862-f3a9-4792-a9ed-1a6d6eac98d4", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:48 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/1ba02539-8b3a-4f64-bd6a-aea65b0fcb11", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "372", + "x-request-id": "48c85862-f3a9-4792-a9ed-1a6d6eac98d4" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/1ba02539-8b3a-4f64-bd6a-aea65b0fcb11", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-689c1f07daeb8a4e93752d3a8de3dc82-ff98f0f74b416347-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "e952d687c0dfad7418d16c35963d0d5c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "3f3af65a-8091-4308-aef9-c883904092ff", + "Content-Length": "898", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:48 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "165", + "x-request-id": "3f3af65a-8091-4308-aef9-c883904092ff" + }, + "ResponseBody": { + "dataFeedId": "1ba02539-8b3a-4f64-bd6a-aea65b0fcb11", + "dataFeedName": "dataFeedOfxYJOvt", + "metrics": [ + { + "metricId": "bf01238b-da14-46a3-b262-12750d1a078b", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureBlob", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:48Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "container": "mock", + "blobTemplate": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/1ba02539-8b3a-4f64-bd6a-aea65b0fcb11", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-6cda488d2bca31488b69d96f147f0a7c-527142292c444c49-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "a4febc7e2921941cf74de31eb509a23d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "18338d5b-54b7-464a-8b29-f59f2adc4e08", + "Content-Length": "898", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:48 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "156", + "x-request-id": "18338d5b-54b7-464a-8b29-f59f2adc4e08" + }, + "ResponseBody": { + "dataFeedId": "1ba02539-8b3a-4f64-bd6a-aea65b0fcb11", + "dataFeedName": "dataFeedOfxYJOvt", + "metrics": [ + { + "metricId": "bf01238b-da14-46a3-b262-12750d1a078b", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureBlob", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:48Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "container": "mock", + "blobTemplate": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/1ba02539-8b3a-4f64-bd6a-aea65b0fcb11", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "538", + "Content-Type": "application/merge-patch\u002Bjson", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-8774a7b8cf119247baa2246ab03e0dcc-d60b8f5967984440-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "eaeb8420fd9f41b0011872f0bdbe1288", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "container": "mock", + "blobTemplate": "mock" + }, + "dataSourceType": "AzureBlob", + "dataFeedName": "dataFeedOfxYJOvt", + "dataFeedDescription": "", + "timestampColumn": "", + "dataStartFrom": "2020-08-01T00:00:00Z", + "startOffsetInSeconds": 0, + "maxConcurrency": -1, + "minRetryIntervalInSeconds": -1, + "stopRetryAfterInSeconds": -1, + "needRollup": "NoRollup", + "rollUpMethod": "None", + "fillMissingPointType": "PreviousValue", + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "status": "Active", + "actionLinkTemplate": "", + "authenticationType": "Basic" + }, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "725f4be6-34ca-4f54-838a-b07d502704dc", + "Content-Length": "898", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:49 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "714", + "x-request-id": "725f4be6-34ca-4f54-838a-b07d502704dc" + }, + "ResponseBody": { + "dataFeedId": "1ba02539-8b3a-4f64-bd6a-aea65b0fcb11", + "dataFeedName": "dataFeedOfxYJOvt", + "metrics": [ + { + "metricId": "bf01238b-da14-46a3-b262-12750d1a078b", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureBlob", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:48Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "container": "mock", + "blobTemplate": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/1ba02539-8b3a-4f64-bd6a-aea65b0fcb11", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-1562dde72f8dcf4d86f6d551054f9877-f6be5be96fd52b4e-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "3426ab167d2e5db4babef191dd56f70f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "60272ffb-1f26-458a-8f07-cceed881e03a", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:49 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "317", + "x-request-id": "60272ffb-1f26-458a-8f07-cceed881e03a" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "1240932558" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureBlobDataFeedWithAuthentication(Basic)Async.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureBlobDataFeedWithAuthentication(Basic)Async.json new file mode 100644 index 0000000000000..fe349cbd558b3 --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureBlobDataFeedWithAuthentication(Basic)Async.json @@ -0,0 +1,307 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "259", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-3d92e5c16cf8e94d90c9c477a25d6344-3f777c36bef29e4c-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "a75169e0e356e00e2c564cd7c9df08d4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "container": "mock", + "blobTemplate": "mock" + }, + "dataSourceType": "AzureBlob", + "dataFeedName": "dataFeedl7UQkHnV", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "56d43897-d667-4d12-a970-ca7ee596ff3f", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:40:22 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/f0377d32-6ec7-45b0-b76f-a5a97ab46548", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "433", + "x-request-id": "56d43897-d667-4d12-a970-ca7ee596ff3f" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/f0377d32-6ec7-45b0-b76f-a5a97ab46548", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-3d92e5c16cf8e94d90c9c477a25d6344-4a12422a6e3f3e41-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "b61e4006c22ecde17a70653272a95c1f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "866587f5-24e5-4657-b909-dee2aae6a2b0", + "Content-Length": "898", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:40:23 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "193", + "x-request-id": "866587f5-24e5-4657-b909-dee2aae6a2b0" + }, + "ResponseBody": { + "dataFeedId": "f0377d32-6ec7-45b0-b76f-a5a97ab46548", + "dataFeedName": "dataFeedl7UQkHnV", + "metrics": [ + { + "metricId": "872112a5-a2de-457f-8822-dd6769141e96", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureBlob", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:40:23Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "container": "mock", + "blobTemplate": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/f0377d32-6ec7-45b0-b76f-a5a97ab46548", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-005dd50c47f89d41a936adf5f60b3ae4-1cfff31646912a4d-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "e70485a04cc6155cc62570ba58e16f23", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "2e281b01-38c3-4a70-8efa-4c0a966584a0", + "Content-Length": "898", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:40:23 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "205", + "x-request-id": "2e281b01-38c3-4a70-8efa-4c0a966584a0" + }, + "ResponseBody": { + "dataFeedId": "f0377d32-6ec7-45b0-b76f-a5a97ab46548", + "dataFeedName": "dataFeedl7UQkHnV", + "metrics": [ + { + "metricId": "872112a5-a2de-457f-8822-dd6769141e96", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureBlob", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:40:23Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "container": "mock", + "blobTemplate": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/f0377d32-6ec7-45b0-b76f-a5a97ab46548", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "538", + "Content-Type": "application/merge-patch\u002Bjson", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-06af68d85d9bc4478e0e576d59e6bb39-87b8ee95878bbf49-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "a359ebf2a9251e2488832de67ddb6d82", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "container": "mock", + "blobTemplate": "mock" + }, + "dataSourceType": "AzureBlob", + "dataFeedName": "dataFeedl7UQkHnV", + "dataFeedDescription": "", + "timestampColumn": "", + "dataStartFrom": "2020-08-01T00:00:00Z", + "startOffsetInSeconds": 0, + "maxConcurrency": -1, + "minRetryIntervalInSeconds": -1, + "stopRetryAfterInSeconds": -1, + "needRollup": "NoRollup", + "rollUpMethod": "None", + "fillMissingPointType": "PreviousValue", + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "status": "Active", + "actionLinkTemplate": "", + "authenticationType": "Basic" + }, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "1fa92070-7399-4a1b-b4e7-de7ca82bd105", + "Content-Length": "898", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:40:29 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "5765", + "x-request-id": "1fa92070-7399-4a1b-b4e7-de7ca82bd105" + }, + "ResponseBody": { + "dataFeedId": "f0377d32-6ec7-45b0-b76f-a5a97ab46548", + "dataFeedName": "dataFeedl7UQkHnV", + "metrics": [ + { + "metricId": "872112a5-a2de-457f-8822-dd6769141e96", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureBlob", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:40:23Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "container": "mock", + "blobTemplate": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/f0377d32-6ec7-45b0-b76f-a5a97ab46548", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-85fdf35dd4f91f4aafab419850b8043f-8d409c2c12f8f84d-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "43362dfa21dbba0de408f00852277499", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "56c3088a-f7d5-4164-a64a-4b788fa11e6a", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:40:29 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "309", + "x-request-id": "56c3088a-f7d5-4164-a64a-4b788fa11e6a" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "685378463" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureBlobDataFeedWithAuthentication(ManagedIdentity).json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureBlobDataFeedWithAuthentication(ManagedIdentity).json new file mode 100644 index 0000000000000..ed10f1fbfda9c --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureBlobDataFeedWithAuthentication(ManagedIdentity).json @@ -0,0 +1,307 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "259", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-894dce38135fd9428072f736c6c9e002-3bf93edf80798044-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "866d20ea0686b6bd35cb3f2ac6d061a9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "container": "mock", + "blobTemplate": "mock" + }, + "dataSourceType": "AzureBlob", + "dataFeedName": "dataFeedCh1f2sme", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "06d8468d-1fcc-4abd-9ce2-7794c2240be9", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:50 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/12579013-77bb-4b92-8b4f-9824dc2fa02f", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "581", + "x-request-id": "06d8468d-1fcc-4abd-9ce2-7794c2240be9" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/12579013-77bb-4b92-8b4f-9824dc2fa02f", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-894dce38135fd9428072f736c6c9e002-87b702d4f323bc48-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "68e876dba9a3e63587f4c2c900fc3bf8", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "16d22d40-3779-4fba-bd43-6bbec85c5f9f", + "Content-Length": "898", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:50 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "158", + "x-request-id": "16d22d40-3779-4fba-bd43-6bbec85c5f9f" + }, + "ResponseBody": { + "dataFeedId": "12579013-77bb-4b92-8b4f-9824dc2fa02f", + "dataFeedName": "dataFeedCh1f2sme", + "metrics": [ + { + "metricId": "0516f0b3-7328-4925-a8bc-25ace804ac4d", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureBlob", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:50Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "container": "mock", + "blobTemplate": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/12579013-77bb-4b92-8b4f-9824dc2fa02f", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-b39820da2c232c4ca4aacc229f4c3923-ff377942efe7c746-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "a678dbb2281680e4d7d0067f062dbf35", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "e509dc41-2820-4086-aedf-0dee9ab4eb24", + "Content-Length": "898", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:50 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "159", + "x-request-id": "e509dc41-2820-4086-aedf-0dee9ab4eb24" + }, + "ResponseBody": { + "dataFeedId": "12579013-77bb-4b92-8b4f-9824dc2fa02f", + "dataFeedName": "dataFeedCh1f2sme", + "metrics": [ + { + "metricId": "0516f0b3-7328-4925-a8bc-25ace804ac4d", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureBlob", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:50Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "container": "mock", + "blobTemplate": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/12579013-77bb-4b92-8b4f-9824dc2fa02f", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "548", + "Content-Type": "application/merge-patch\u002Bjson", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-ff9b7b30f259db44a2031f9c1ffb9d97-de1d10e827d2c749-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "35790637510b4199ea86ff9243f3b639", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "container": "mock", + "blobTemplate": "mock" + }, + "dataSourceType": "AzureBlob", + "dataFeedName": "dataFeedCh1f2sme", + "dataFeedDescription": "", + "timestampColumn": "", + "dataStartFrom": "2020-08-01T00:00:00Z", + "startOffsetInSeconds": 0, + "maxConcurrency": -1, + "minRetryIntervalInSeconds": -1, + "stopRetryAfterInSeconds": -1, + "needRollup": "NoRollup", + "rollUpMethod": "None", + "fillMissingPointType": "PreviousValue", + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "status": "Active", + "actionLinkTemplate": "", + "authenticationType": "ManagedIdentity" + }, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "0c1ee37c-8a23-4321-9618-3fa0f7c740da", + "Content-Length": "908", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:51 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "952", + "x-request-id": "0c1ee37c-8a23-4321-9618-3fa0f7c740da" + }, + "ResponseBody": { + "dataFeedId": "12579013-77bb-4b92-8b4f-9824dc2fa02f", + "dataFeedName": "dataFeedCh1f2sme", + "metrics": [ + { + "metricId": "0516f0b3-7328-4925-a8bc-25ace804ac4d", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureBlob", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:50Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "container": "mock", + "blobTemplate": "mock" + }, + "authenticationType": "ManagedIdentity" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/12579013-77bb-4b92-8b4f-9824dc2fa02f", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-e011300da08ba942a069595bbe694063-353d3f5d14f00447-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "ea774690bb57b292916790d3a2b6df59", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "bcfd5e33-b857-4e5c-9fae-58a5d76da42d", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:52 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "376", + "x-request-id": "bcfd5e33-b857-4e5c-9fae-58a5d76da42d" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "1030152961" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureBlobDataFeedWithAuthentication(ManagedIdentity)Async.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureBlobDataFeedWithAuthentication(ManagedIdentity)Async.json new file mode 100644 index 0000000000000..6622f752f58bb --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureBlobDataFeedWithAuthentication(ManagedIdentity)Async.json @@ -0,0 +1,307 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "259", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-d7a0fc54f662354f929abbbfc1ffbffb-e9fd458034ea2a40-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "8d7ebaca0aa8a9ebe79cbafca1e64198", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "container": "mock", + "blobTemplate": "mock" + }, + "dataSourceType": "AzureBlob", + "dataFeedName": "dataFeeddug0WHvH", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "af31988c-6e91-4460-8f7a-a969a832f7e5", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:40:30 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/eefd2c87-8092-4c96-bb98-ebe236abe8df", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "614", + "x-request-id": "af31988c-6e91-4460-8f7a-a969a832f7e5" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/eefd2c87-8092-4c96-bb98-ebe236abe8df", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-d7a0fc54f662354f929abbbfc1ffbffb-4ddcb21cedc28d41-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "a32831ad6738db4abcd4a21af9d39362", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "1150d8b1-1a09-4927-ae2a-08b0102c1355", + "Content-Length": "898", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:40:36 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "5254", + "x-request-id": "1150d8b1-1a09-4927-ae2a-08b0102c1355" + }, + "ResponseBody": { + "dataFeedId": "eefd2c87-8092-4c96-bb98-ebe236abe8df", + "dataFeedName": "dataFeeddug0WHvH", + "metrics": [ + { + "metricId": "b0502fae-d28b-4deb-90dd-4db1b8779803", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureBlob", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:40:31Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "container": "mock", + "blobTemplate": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/eefd2c87-8092-4c96-bb98-ebe236abe8df", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-0ec45734c9e76b449f6f45f5e7703c3c-b3b9052d8c80054b-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "d98381a0b5fc7ab4af756cb9ea6f6dd6", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "ddd08987-83f9-4b06-a099-9794d65f3a18", + "Content-Length": "898", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:40:41 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "5173", + "x-request-id": "ddd08987-83f9-4b06-a099-9794d65f3a18" + }, + "ResponseBody": { + "dataFeedId": "eefd2c87-8092-4c96-bb98-ebe236abe8df", + "dataFeedName": "dataFeeddug0WHvH", + "metrics": [ + { + "metricId": "b0502fae-d28b-4deb-90dd-4db1b8779803", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureBlob", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:40:31Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "container": "mock", + "blobTemplate": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/eefd2c87-8092-4c96-bb98-ebe236abe8df", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "548", + "Content-Type": "application/merge-patch\u002Bjson", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-a44521ecc6a7924090cd3a08620e571a-e81bac3dc1f8fb46-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "2374f48cabd363046fa3d0d367d0b013", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "container": "mock", + "blobTemplate": "mock" + }, + "dataSourceType": "AzureBlob", + "dataFeedName": "dataFeeddug0WHvH", + "dataFeedDescription": "", + "timestampColumn": "", + "dataStartFrom": "2020-08-01T00:00:00Z", + "startOffsetInSeconds": 0, + "maxConcurrency": -1, + "minRetryIntervalInSeconds": -1, + "stopRetryAfterInSeconds": -1, + "needRollup": "NoRollup", + "rollUpMethod": "None", + "fillMissingPointType": "PreviousValue", + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "status": "Active", + "actionLinkTemplate": "", + "authenticationType": "ManagedIdentity" + }, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "a3acd902-0367-402f-9018-79193eddfedf", + "Content-Length": "908", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:40:46 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "6038", + "x-request-id": "a3acd902-0367-402f-9018-79193eddfedf" + }, + "ResponseBody": { + "dataFeedId": "eefd2c87-8092-4c96-bb98-ebe236abe8df", + "dataFeedName": "dataFeeddug0WHvH", + "metrics": [ + { + "metricId": "b0502fae-d28b-4deb-90dd-4db1b8779803", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureBlob", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:40:31Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "container": "mock", + "blobTemplate": "mock" + }, + "authenticationType": "ManagedIdentity" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/eefd2c87-8092-4c96-bb98-ebe236abe8df", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-b1b6fb859b45e245bf0770124dc347b1-fcb61939fad1d041-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "205c57096863f89c7caef4c3fa90f14d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "7003441a-6f99-4450-bb70-740a9b200aad", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:40:52 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "5373", + "x-request-id": "7003441a-6f99-4450-bb70-740a9b200aad" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "689730013" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureBlobDataFeedWithEveryMemberAndGetInstance.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureBlobDataFeedWithEveryMemberAndGetInstance.json index d4f85ac705cad..26710a5f38085 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureBlobDataFeedWithEveryMemberAndGetInstance.json +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureBlobDataFeedWithEveryMemberAndGetInstance.json @@ -8,8 +8,8 @@ "Content-Length": "268", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-5cdaa9c7c2dc6542b4350542b4ba284e-bed9ee1b8762554a-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-a91dd0c16e0d5241af8f13ad27ef6025-fc45a84465be9241-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "0a5b4a8664674b4d84b6e59e1cac69eb", "x-ms-return-client-request-id": "true" @@ -32,25 +32,25 @@ }, "StatusCode": 201, "ResponseHeaders": { - "apim-request-id": "812977b6-597c-46ba-8b6a-8cc296c70e39", + "apim-request-id": "51f64c88-75e0-4ad9-9ce8-39e1d798ff23", "Content-Length": "0", - "Date": "Thu, 03 Jun 2021 21:39:58 GMT", - "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/91468491-5f07-4f14-b0d0-d42497c751e7", + "Date": "Sat, 05 Jun 2021 03:30:48 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/3d8be0ed-ee42-4bfe-a69f-9f127d647be6", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "459", - "x-request-id": "812977b6-597c-46ba-8b6a-8cc296c70e39" + "x-envoy-upstream-service-time": "999", + "x-request-id": "51f64c88-75e0-4ad9-9ce8-39e1d798ff23" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/91468491-5f07-4f14-b0d0-d42497c751e7", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/3d8be0ed-ee42-4bfe-a69f-9f127d647be6", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-5cdaa9c7c2dc6542b4350542b4ba284e-03baf2c51471c14c-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-a91dd0c16e0d5241af8f13ad27ef6025-816150c8863be348-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "8b6b5643f6bf9f17b20018c8a28e73db", "x-ms-return-client-request-id": "true" @@ -58,21 +58,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "5f496b24-90e4-48c6-93c7-c64de80b7e6f", + "apim-request-id": "d346e92d-6538-439b-b651-3a7783a1dd1e", "Content-Length": "907", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:39:58 GMT", + "Date": "Sat, 05 Jun 2021 03:30:48 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "175", - "x-request-id": "5f496b24-90e4-48c6-93c7-c64de80b7e6f" + "x-envoy-upstream-service-time": "317", + "x-request-id": "d346e92d-6538-439b-b651-3a7783a1dd1e" }, "ResponseBody": { - "dataFeedId": "91468491-5f07-4f14-b0d0-d42497c751e7", + "dataFeedId": "3d8be0ed-ee42-4bfe-a69f-9f127d647be6", "dataFeedName": "dataFeedqF5usX2A", "metrics": [ { - "metricId": "f53a5be1-e1b9-4717-9a54-953073f0fac9", + "metricId": "44cb48d1-a1ce-409c-838d-ea021f900ddf", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -100,7 +100,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:39:57Z", + "createdTime": "2021-06-05T03:30:48Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -111,13 +111,13 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/91468491-5f07-4f14-b0d0-d42497c751e7", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/3d8be0ed-ee42-4bfe-a69f-9f127d647be6", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-08d0b92124c23448a8aaea9a07d9592a-ee33309cf3cebf47-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-303871f373813f4db2ed0da5067eb693-90c376cd5b8cdc40-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "1ea565a5a90e8ad51b1b6c75ccd07a83", "x-ms-return-client-request-id": "true" @@ -125,21 +125,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "078fbc37-79ab-4974-8211-7d3caa971ce8", + "apim-request-id": "2a0eac1b-7831-4b1f-8bd0-812b73f9709e", "Content-Length": "907", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:39:58 GMT", + "Date": "Sat, 05 Jun 2021 03:30:53 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "186", - "x-request-id": "078fbc37-79ab-4974-8211-7d3caa971ce8" + "x-envoy-upstream-service-time": "5196", + "x-request-id": "2a0eac1b-7831-4b1f-8bd0-812b73f9709e" }, "ResponseBody": { - "dataFeedId": "91468491-5f07-4f14-b0d0-d42497c751e7", + "dataFeedId": "3d8be0ed-ee42-4bfe-a69f-9f127d647be6", "dataFeedName": "dataFeedqF5usX2A", "metrics": [ { - "metricId": "f53a5be1-e1b9-4717-9a54-953073f0fac9", + "metricId": "44cb48d1-a1ce-409c-838d-ea021f900ddf", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -167,7 +167,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:39:57Z", + "createdTime": "2021-06-05T03:30:48Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -178,15 +178,15 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/91468491-5f07-4f14-b0d0-d42497c751e7", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/3d8be0ed-ee42-4bfe-a69f-9f127d647be6", "RequestMethod": "PATCH", "RequestHeaders": { "Accept": "application/json", - "Content-Length": "661", + "Content-Length": "690", "Content-Type": "application/merge-patch\u002Bjson", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-0b342648624ba14eaf4acbd84b9db6a0-d1f060c047f29944-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-ce7ab14b643bf24493660745eff351e5-ac39e69e8b763c45-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "f929830a6e5a8f1c32bb57664c85a8f5", "x-ms-return-client-request-id": "true" @@ -217,95 +217,26 @@ "fake@viewer.com" ], "status": "Active", - "actionLinkTemplate": "https://fakeurl.com/%datafeed/%metric" - }, - "StatusCode": 200, - "ResponseHeaders": { - "apim-request-id": "62478249-f609-4fc9-a537-0826557620b0", - "Content-Length": "1050", - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:39:59 GMT", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "1065", - "x-request-id": "62478249-f609-4fc9-a537-0826557620b0" - }, - "ResponseBody": { - "dataFeedId": "91468491-5f07-4f14-b0d0-d42497c751e7", - "dataFeedName": "dataFeed7de3uXf1", - "metrics": [ - { - "metricId": "f53a5be1-e1b9-4717-9a54-953073f0fac9", - "metricName": "cost", - "metricDisplayName": "cost", - "metricDescription": "" - } - ], - "dimension": [], - "dataStartFrom": "2020-09-21T00:00:00Z", - "dataSourceType": "AzureBlob", - "timestampColumn": "updatedTimestampColumn", - "startOffsetInSeconds": 2400, - "maxQueryPerMinute": 30.0, - "granularityName": "Daily", - "needRollup": "NoRollup", - "fillMissingPointType": "NoFilling", - "fillMissingPointValue": 0.0, - "rollUpMethod": "None", - "dataFeedDescription": "This data feed was updated to test the .NET client.", - "stopRetryAfterInSeconds": 1200, - "minRetryIntervalInSeconds": 90, - "maxConcurrency": 6, - "viewMode": "Public", - "admins": [ - "fake@admin.com", - "foo@contoso.com" - ], - "viewers": [ - "fake@viewer.com" - ], - "creator": "foo@contoso.com", - "status": "Active", - "createdTime": "2021-06-03T21:39:57Z", - "isAdmin": true, "actionLinkTemplate": "https://fakeurl.com/%datafeed/%metric", - "dataSourceParameter": { - "container": "container", - "blobTemplate": "template" - }, "authenticationType": "Basic" - } - }, - { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/91468491-5f07-4f14-b0d0-d42497c751e7", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-23c42c7b7ae01949b1bbff0b7c463af8-c757bee4f7edf64f-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-api-key": "Sanitized", - "x-ms-client-request-id": "b7f909424b069adc80e070a48aa1d2e2", - "x-ms-return-client-request-id": "true" }, - "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "817af943-d3d4-48da-85c6-65dd4fdcb036", + "apim-request-id": "7f634d83-ce89-4855-a43e-cb8294c745e9", "Content-Length": "1050", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:40:00 GMT", + "Date": "Sat, 05 Jun 2021 03:30:54 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "185", - "x-request-id": "817af943-d3d4-48da-85c6-65dd4fdcb036" + "x-envoy-upstream-service-time": "1041", + "x-request-id": "7f634d83-ce89-4855-a43e-cb8294c745e9" }, "ResponseBody": { - "dataFeedId": "91468491-5f07-4f14-b0d0-d42497c751e7", + "dataFeedId": "3d8be0ed-ee42-4bfe-a69f-9f127d647be6", "dataFeedName": "dataFeed7de3uXf1", "metrics": [ { - "metricId": "f53a5be1-e1b9-4717-9a54-953073f0fac9", + "metricId": "44cb48d1-a1ce-409c-838d-ea021f900ddf", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -336,7 +267,7 @@ ], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:39:57Z", + "createdTime": "2021-06-05T03:30:48Z", "isAdmin": true, "actionLinkTemplate": "https://fakeurl.com/%datafeed/%metric", "dataSourceParameter": { @@ -347,33 +278,33 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/91468491-5f07-4f14-b0d0-d42497c751e7", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/3d8be0ed-ee42-4bfe-a69f-9f127d647be6", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-d319e1e1544a7d4eb73dd60a8be78009-636f570a3184f54e-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-0d7710803f83604491f591aaf71665a5-67d1a7a5916bc94f-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", - "x-ms-client-request-id": "1ebd9486796436804816eb53526e3e95", + "x-ms-client-request-id": "b7f909424b069adc80e070a48aa1d2e2", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "apim-request-id": "cb191d80-50df-4bff-9b51-24009bd031a5", + "apim-request-id": "c36316eb-fe21-41f5-97c5-32677e4a98f3", "Content-Length": "0", - "Date": "Thu, 03 Jun 2021 21:40:00 GMT", + "Date": "Sat, 05 Jun 2021 03:30:54 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "376", - "x-request-id": "cb191d80-50df-4bff-9b51-24009bd031a5" + "x-envoy-upstream-service-time": "361", + "x-request-id": "c36316eb-fe21-41f5-97c5-32677e4a98f3" }, "ResponseBody": [] } ], "Variables": { - "DateTimeOffsetNow": "2021-06-03T14:39:59.9144642-07:00", + "DateTimeOffsetNow": "2021-06-04T20:30:54.1383341-07:00", "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", "METRICSADVISOR_ENDPOINT_SUFFIX": null, "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureBlobDataFeedWithEveryMemberAndGetInstanceAsync.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureBlobDataFeedWithEveryMemberAndGetInstanceAsync.json index 35d66940b7d70..3fe0a1a414bfc 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureBlobDataFeedWithEveryMemberAndGetInstanceAsync.json +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureBlobDataFeedWithEveryMemberAndGetInstanceAsync.json @@ -8,8 +8,8 @@ "Content-Length": "268", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-f5ef8dd8990a39469c44e12af1d9ec17-8dabb888538c7b45-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-8a3d6faeb62b2f4981832174023e716e-d7e4bfcef7f93b41-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "7e1c6ce63737eeaf575fcef6e9d4d0b4", "x-ms-return-client-request-id": "true" @@ -32,25 +32,25 @@ }, "StatusCode": 201, "ResponseHeaders": { - "apim-request-id": "44f9b61c-1106-47ca-a206-ee9bb127434c", + "apim-request-id": "c0f345ae-bc04-413b-a824-d63954793788", "Content-Length": "0", - "Date": "Thu, 03 Jun 2021 21:41:40 GMT", - "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/2e03ea3d-63d6-4024-9ef9-a482b25fb45a", + "Date": "Sat, 05 Jun 2021 03:32:48 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/69f361ee-b80c-4c70-ac15-0f0581ad12d2", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "411", - "x-request-id": "44f9b61c-1106-47ca-a206-ee9bb127434c" + "x-envoy-upstream-service-time": "5830", + "x-request-id": "c0f345ae-bc04-413b-a824-d63954793788" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/2e03ea3d-63d6-4024-9ef9-a482b25fb45a", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/69f361ee-b80c-4c70-ac15-0f0581ad12d2", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-f5ef8dd8990a39469c44e12af1d9ec17-e778c72f1e7c4949-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-8a3d6faeb62b2f4981832174023e716e-0fa6ea58e56c7247-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "29d55a24d0c54e0b7b2730d1e42e11c8", "x-ms-return-client-request-id": "true" @@ -58,21 +58,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "13922d8d-7274-4f44-b3b9-4ef231dbc15b", + "apim-request-id": "7a3417a0-74d7-45b0-87ad-4c8edf03fd0c", "Content-Length": "907", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:41:40 GMT", + "Date": "Sat, 05 Jun 2021 03:32:48 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "175", - "x-request-id": "13922d8d-7274-4f44-b3b9-4ef231dbc15b" + "x-envoy-upstream-service-time": "215", + "x-request-id": "7a3417a0-74d7-45b0-87ad-4c8edf03fd0c" }, "ResponseBody": { - "dataFeedId": "2e03ea3d-63d6-4024-9ef9-a482b25fb45a", + "dataFeedId": "69f361ee-b80c-4c70-ac15-0f0581ad12d2", "dataFeedName": "dataFeedUKzatqz4", "metrics": [ { - "metricId": "a2b5c570-177e-49f4-ac48-ff4790e26731", + "metricId": "01465325-3c77-4bbd-8dae-11492e19cb76", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -100,7 +100,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:41:40Z", + "createdTime": "2021-06-05T03:32:48Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -111,13 +111,13 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/2e03ea3d-63d6-4024-9ef9-a482b25fb45a", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/69f361ee-b80c-4c70-ac15-0f0581ad12d2", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-a4cf7e9ebeabd348b7cf9d971b2d6888-49028162a086a14a-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-2c864ce536727142b5511fa95393d870-b35015f84429bc44-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "592497f65097693efe6c75b37b8de1c9", "x-ms-return-client-request-id": "true" @@ -125,21 +125,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "03c7df26-11eb-4bd8-816f-57fd00abb6fe", + "apim-request-id": "eeca4242-c475-4b9e-a748-6e3e212fe602", "Content-Length": "907", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:41:40 GMT", + "Date": "Sat, 05 Jun 2021 03:32:49 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "164", - "x-request-id": "03c7df26-11eb-4bd8-816f-57fd00abb6fe" + "x-envoy-upstream-service-time": "188", + "x-request-id": "eeca4242-c475-4b9e-a748-6e3e212fe602" }, "ResponseBody": { - "dataFeedId": "2e03ea3d-63d6-4024-9ef9-a482b25fb45a", + "dataFeedId": "69f361ee-b80c-4c70-ac15-0f0581ad12d2", "dataFeedName": "dataFeedUKzatqz4", "metrics": [ { - "metricId": "a2b5c570-177e-49f4-ac48-ff4790e26731", + "metricId": "01465325-3c77-4bbd-8dae-11492e19cb76", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -167,7 +167,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:41:40Z", + "createdTime": "2021-06-05T03:32:48Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -178,15 +178,15 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/2e03ea3d-63d6-4024-9ef9-a482b25fb45a", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/69f361ee-b80c-4c70-ac15-0f0581ad12d2", "RequestMethod": "PATCH", "RequestHeaders": { "Accept": "application/json", - "Content-Length": "661", + "Content-Length": "690", "Content-Type": "application/merge-patch\u002Bjson", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-00253c33d929044dae81619d221c3f36-be447d8e70b4574b-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-81b4f6aaa766bd40a95de0f86e3b5d0e-935de6887d58b94d-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "a1d409f79e2d167b60cd020f07dd0928", "x-ms-return-client-request-id": "true" @@ -217,95 +217,26 @@ "fake@viewer.com" ], "status": "Active", - "actionLinkTemplate": "https://fakeurl.com/%datafeed/%metric" - }, - "StatusCode": 200, - "ResponseHeaders": { - "apim-request-id": "f32d955b-d607-4715-b794-a390cdca2516", - "Content-Length": "1050", - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:41:41 GMT", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "1066", - "x-request-id": "f32d955b-d607-4715-b794-a390cdca2516" - }, - "ResponseBody": { - "dataFeedId": "2e03ea3d-63d6-4024-9ef9-a482b25fb45a", - "dataFeedName": "dataFeedbDwhM6EP", - "metrics": [ - { - "metricId": "a2b5c570-177e-49f4-ac48-ff4790e26731", - "metricName": "cost", - "metricDisplayName": "cost", - "metricDescription": "" - } - ], - "dimension": [], - "dataStartFrom": "2020-09-21T00:00:00Z", - "dataSourceType": "AzureBlob", - "timestampColumn": "updatedTimestampColumn", - "startOffsetInSeconds": 2400, - "maxQueryPerMinute": 30.0, - "granularityName": "Daily", - "needRollup": "NoRollup", - "fillMissingPointType": "NoFilling", - "fillMissingPointValue": 0.0, - "rollUpMethod": "None", - "dataFeedDescription": "This data feed was updated to test the .NET client.", - "stopRetryAfterInSeconds": 1200, - "minRetryIntervalInSeconds": 90, - "maxConcurrency": 6, - "viewMode": "Public", - "admins": [ - "fake@admin.com", - "foo@contoso.com" - ], - "viewers": [ - "fake@viewer.com" - ], - "creator": "foo@contoso.com", - "status": "Active", - "createdTime": "2021-06-03T21:41:40Z", - "isAdmin": true, "actionLinkTemplate": "https://fakeurl.com/%datafeed/%metric", - "dataSourceParameter": { - "container": "container", - "blobTemplate": "template" - }, "authenticationType": "Basic" - } - }, - { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/2e03ea3d-63d6-4024-9ef9-a482b25fb45a", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-3a2effa5cb93a9439864b270221cbab0-ca5d955e10022544-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-api-key": "Sanitized", - "x-ms-client-request-id": "5200054d77b0d31d1b6c2a595b58d3ee", - "x-ms-return-client-request-id": "true" }, - "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "aa70b7c3-cd42-4dcf-b67a-521a60b7ace8", + "apim-request-id": "d13d83b3-74a3-439e-a04a-242bde99470c", "Content-Length": "1050", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:41:41 GMT", + "Date": "Sat, 05 Jun 2021 03:32:50 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "181", - "x-request-id": "aa70b7c3-cd42-4dcf-b67a-521a60b7ace8" + "x-envoy-upstream-service-time": "1157", + "x-request-id": "d13d83b3-74a3-439e-a04a-242bde99470c" }, "ResponseBody": { - "dataFeedId": "2e03ea3d-63d6-4024-9ef9-a482b25fb45a", + "dataFeedId": "69f361ee-b80c-4c70-ac15-0f0581ad12d2", "dataFeedName": "dataFeedbDwhM6EP", "metrics": [ { - "metricId": "a2b5c570-177e-49f4-ac48-ff4790e26731", + "metricId": "01465325-3c77-4bbd-8dae-11492e19cb76", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -336,7 +267,7 @@ ], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:41:40Z", + "createdTime": "2021-06-05T03:32:48Z", "isAdmin": true, "actionLinkTemplate": "https://fakeurl.com/%datafeed/%metric", "dataSourceParameter": { @@ -347,33 +278,33 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/2e03ea3d-63d6-4024-9ef9-a482b25fb45a", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/69f361ee-b80c-4c70-ac15-0f0581ad12d2", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-a81ff4eee38650479591f6ff7c70b571-794fb46b47c44846-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-14e0bf9e079ee44b857fcdbeafd7ad09-c3c3b77bbc528741-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", - "x-ms-client-request-id": "dbda66456f59579a1b0ef8c94e2e6121", + "x-ms-client-request-id": "5200054d77b0d31d1b6c2a595b58d3ee", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "apim-request-id": "b205e0f6-8e7e-4711-989b-605d84c366a2", + "apim-request-id": "f7ec5ce0-1c84-4c48-a636-10ec668603a2", "Content-Length": "0", - "Date": "Thu, 03 Jun 2021 21:41:42 GMT", + "Date": "Sat, 05 Jun 2021 03:32:55 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "346", - "x-request-id": "b205e0f6-8e7e-4711-989b-605d84c366a2" + "x-envoy-upstream-service-time": "5332", + "x-request-id": "f7ec5ce0-1c84-4c48-a636-10ec668603a2" }, "ResponseBody": [] } ], "Variables": { - "DateTimeOffsetNow": "2021-06-03T14:41:42.0648692-07:00", + "DateTimeOffsetNow": "2021-06-04T20:32:49.6699144-07:00", "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", "METRICSADVISOR_ENDPOINT_SUFFIX": null, "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureBlobDataFeedWithMinimumSetupAndGetInstance(False).json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureBlobDataFeedWithMinimumSetupAndGetInstance(False).json index e1454bbd9619b..57454fb4f20bb 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureBlobDataFeedWithMinimumSetupAndGetInstance(False).json +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureBlobDataFeedWithMinimumSetupAndGetInstance(False).json @@ -8,8 +8,8 @@ "Content-Length": "268", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-2f120705e77b3d4da20737a46c8f67eb-53ba62f55992b546-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-5468a0ce9c897a47b8ce83ac01abf8e3-db9c8bb1e5914645-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "ea4ed28b9ebfb36c040e35deeb7e0fb8", "x-ms-return-client-request-id": "true" @@ -32,25 +32,25 @@ }, "StatusCode": 201, "ResponseHeaders": { - "apim-request-id": "1b83c49a-be8c-4df4-bb93-c23c81e6711a", + "apim-request-id": "f9725804-c22d-49e7-b1f4-1e23187d536f", "Content-Length": "0", - "Date": "Thu, 03 Jun 2021 21:41:26 GMT", - "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/754ca7ac-7018-46d8-b475-c41f1f71d8bf", + "Date": "Sat, 05 Jun 2021 03:32:27 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/78037318-d5bf-4572-aac4-4f9fdd4e7dc9", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "704", - "x-request-id": "1b83c49a-be8c-4df4-bb93-c23c81e6711a" + "x-envoy-upstream-service-time": "5645", + "x-request-id": "f9725804-c22d-49e7-b1f4-1e23187d536f" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/754ca7ac-7018-46d8-b475-c41f1f71d8bf", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/78037318-d5bf-4572-aac4-4f9fdd4e7dc9", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-2f120705e77b3d4da20737a46c8f67eb-e6a055b412db1442-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-5468a0ce9c897a47b8ce83ac01abf8e3-1d94107029115a4c-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "d1f36c28391f199fcf8db42b49de2a45", "x-ms-return-client-request-id": "true" @@ -58,21 +58,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "f9da52c7-d7d5-41fd-8061-33a6172f37c1", + "apim-request-id": "16b1204a-07c6-4f0d-aa50-1c991a696593", "Content-Length": "907", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:41:27 GMT", + "Date": "Sat, 05 Jun 2021 03:32:27 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "173", - "x-request-id": "f9da52c7-d7d5-41fd-8061-33a6172f37c1" + "x-envoy-upstream-service-time": "183", + "x-request-id": "16b1204a-07c6-4f0d-aa50-1c991a696593" }, "ResponseBody": { - "dataFeedId": "754ca7ac-7018-46d8-b475-c41f1f71d8bf", + "dataFeedId": "78037318-d5bf-4572-aac4-4f9fdd4e7dc9", "dataFeedName": "dataFeed0ppyfHby", "metrics": [ { - "metricId": "defc46c7-3ee5-4b86-adc3-7e6536bdc973", + "metricId": "d039a209-0378-497b-887d-bfc43d5f012a", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -100,7 +100,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:41:26Z", + "createdTime": "2021-06-05T03:32:27Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -111,13 +111,13 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/754ca7ac-7018-46d8-b475-c41f1f71d8bf", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/78037318-d5bf-4572-aac4-4f9fdd4e7dc9", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-bc117912ac0295438d184d82d2215e43-4c492de71d33ac43-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-9cfaf7aa129aaf4da91b8aa25dc3e323-ff8e54197890e846-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "1eb14278c0cabc195111b3d621354203", "x-ms-return-client-request-id": "true" @@ -125,21 +125,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "c026e795-bc66-4f71-8e18-c80fd4a0c935", + "apim-request-id": "a6f37ca3-2bae-4c8c-a46f-a1a11bc0190b", "Content-Length": "907", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:41:32 GMT", + "Date": "Sat, 05 Jun 2021 03:32:28 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "5219", - "x-request-id": "c026e795-bc66-4f71-8e18-c80fd4a0c935" + "x-envoy-upstream-service-time": "240", + "x-request-id": "a6f37ca3-2bae-4c8c-a46f-a1a11bc0190b" }, "ResponseBody": { - "dataFeedId": "754ca7ac-7018-46d8-b475-c41f1f71d8bf", + "dataFeedId": "78037318-d5bf-4572-aac4-4f9fdd4e7dc9", "dataFeedName": "dataFeed0ppyfHby", "metrics": [ { - "metricId": "defc46c7-3ee5-4b86-adc3-7e6536bdc973", + "metricId": "d039a209-0378-497b-887d-bfc43d5f012a", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -167,7 +167,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:41:26Z", + "createdTime": "2021-06-05T03:32:27Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -178,15 +178,15 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/754ca7ac-7018-46d8-b475-c41f1f71d8bf", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/78037318-d5bf-4572-aac4-4f9fdd4e7dc9", "RequestMethod": "PATCH", "RequestHeaders": { "Accept": "application/json", - "Content-Length": "569", + "Content-Length": "598", "Content-Type": "application/merge-patch\u002Bjson", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-07bc64d45182f14993220018222c99ad-728f2a2e19eb7f4e-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-b8e212a60bb31943b70199ac67069e92-ac71bd5ba6bcd943-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "4eff48b54e10516c33351a32ea416925", "x-ms-return-client-request-id": "true" @@ -214,92 +214,26 @@ ], "viewers": [], "status": "Active", - "actionLinkTemplate": "" - }, - "StatusCode": 200, - "ResponseHeaders": { - "apim-request-id": "e3d8458b-e11d-4f1f-af01-af9c546ead38", - "Content-Length": "958", - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:41:33 GMT", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "864", - "x-request-id": "e3d8458b-e11d-4f1f-af01-af9c546ead38" - }, - "ResponseBody": { - "dataFeedId": "754ca7ac-7018-46d8-b475-c41f1f71d8bf", - "dataFeedName": "dataFeed0ppyfHby", - "metrics": [ - { - "metricId": "defc46c7-3ee5-4b86-adc3-7e6536bdc973", - "metricName": "cost", - "metricDisplayName": "cost", - "metricDescription": "" - } - ], - "dimension": [], - "dataStartFrom": "2020-08-01T00:00:00Z", - "dataSourceType": "AzureBlob", - "timestampColumn": "", - "startOffsetInSeconds": 0, - "maxQueryPerMinute": 30.0, - "granularityName": "Daily", - "needRollup": "NoRollup", - "fillMissingPointType": "PreviousValue", - "fillMissingPointValue": 0.0, - "rollUpMethod": "None", - "dataFeedDescription": "This data feed was created to test the .NET client.", - "stopRetryAfterInSeconds": -1, - "minRetryIntervalInSeconds": -1, - "maxConcurrency": -1, - "viewMode": "Private", - "admins": [ - "foo@contoso.com" - ], - "viewers": [], - "creator": "foo@contoso.com", - "status": "Active", - "createdTime": "2021-06-03T21:41:26Z", - "isAdmin": true, "actionLinkTemplate": "", - "dataSourceParameter": { - "container": "container", - "blobTemplate": "template" - }, "authenticationType": "Basic" - } - }, - { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/754ca7ac-7018-46d8-b475-c41f1f71d8bf", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-ed16f0d476de5a4890fe5625bd6dd5ea-6f826c16c36b2645-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-api-key": "Sanitized", - "x-ms-client-request-id": "a965f0e4f1cd67ee53367f0e86c9f89a", - "x-ms-return-client-request-id": "true" }, - "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "d1ffbcb5-d5b6-4495-b04a-cf656ffcf897", + "apim-request-id": "7ee9b31b-087a-45ff-a1ad-ca5bb332d6d5", "Content-Length": "958", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:41:33 GMT", + "Date": "Sat, 05 Jun 2021 03:32:30 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "180", - "x-request-id": "d1ffbcb5-d5b6-4495-b04a-cf656ffcf897" + "x-envoy-upstream-service-time": "952", + "x-request-id": "7ee9b31b-087a-45ff-a1ad-ca5bb332d6d5" }, "ResponseBody": { - "dataFeedId": "754ca7ac-7018-46d8-b475-c41f1f71d8bf", + "dataFeedId": "78037318-d5bf-4572-aac4-4f9fdd4e7dc9", "dataFeedName": "dataFeed0ppyfHby", "metrics": [ { - "metricId": "defc46c7-3ee5-4b86-adc3-7e6536bdc973", + "metricId": "d039a209-0378-497b-887d-bfc43d5f012a", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -327,7 +261,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:41:26Z", + "createdTime": "2021-06-05T03:32:27Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -338,33 +272,33 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/754ca7ac-7018-46d8-b475-c41f1f71d8bf", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/78037318-d5bf-4572-aac4-4f9fdd4e7dc9", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-4dbf27a453de584b8b24368a25c0fa9e-0953af8095ff404e-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-ece276db2784814983ec9003bce61fc4-0123ad77ff64e240-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", - "x-ms-client-request-id": "0075b04bdbdf2a34d65feb94a5e7d20f", + "x-ms-client-request-id": "a965f0e4f1cd67ee53367f0e86c9f89a", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "apim-request-id": "28e214a9-704a-4896-8fb6-cdbc406e52b1", + "apim-request-id": "66c41f00-8874-4732-bf21-dadcc3fa451c", "Content-Length": "0", - "Date": "Thu, 03 Jun 2021 21:41:33 GMT", + "Date": "Sat, 05 Jun 2021 03:32:35 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "313", - "x-request-id": "28e214a9-704a-4896-8fb6-cdbc406e52b1" + "x-envoy-upstream-service-time": "5388", + "x-request-id": "66c41f00-8874-4732-bf21-dadcc3fa451c" }, "ResponseBody": [] } ], "Variables": { - "DateTimeOffsetNow": "2021-06-03T14:41:33.3565354-07:00", + "DateTimeOffsetNow": "2021-06-04T20:32:29.9229323-07:00", "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", "METRICSADVISOR_ENDPOINT_SUFFIX": null, "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureBlobDataFeedWithMinimumSetupAndGetInstance(False)Async.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureBlobDataFeedWithMinimumSetupAndGetInstance(False)Async.json index b600958de9bc2..96739c2709e19 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureBlobDataFeedWithMinimumSetupAndGetInstance(False)Async.json +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureBlobDataFeedWithMinimumSetupAndGetInstance(False)Async.json @@ -8,8 +8,8 @@ "Content-Length": "268", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-0a0a09f47b98f041af8a57668c2924b5-9ddb6f13bdf02647-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-8875a9b95134464d844ac953890c19aa-5d09e4308ded734c-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "3ec8125165b7b09911fba127d5c0f6c2", "x-ms-return-client-request-id": "true" @@ -32,25 +32,25 @@ }, "StatusCode": 201, "ResponseHeaders": { - "apim-request-id": "29a34e6d-1958-4e55-8eae-d25551da0aaa", + "apim-request-id": "1a4438cb-5a53-4045-ac73-a7743f67416b", "Content-Length": "0", - "Date": "Thu, 03 Jun 2021 21:42:58 GMT", - "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/c19938d0-5cd4-43b6-bca3-302239025e66", + "Date": "Sat, 05 Jun 2021 03:34:14 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/82dcb95d-c94f-4146-9403-6f1cf9c3ecc4", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "621", - "x-request-id": "29a34e6d-1958-4e55-8eae-d25551da0aaa" + "x-envoy-upstream-service-time": "441", + "x-request-id": "1a4438cb-5a53-4045-ac73-a7743f67416b" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/c19938d0-5cd4-43b6-bca3-302239025e66", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/82dcb95d-c94f-4146-9403-6f1cf9c3ecc4", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-0a0a09f47b98f041af8a57668c2924b5-05e193d4b437e541-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-8875a9b95134464d844ac953890c19aa-86bcf94381b8154c-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "09a50511a9b7078bced7617cde7a6413", "x-ms-return-client-request-id": "true" @@ -58,21 +58,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "ef36fabe-a594-4c6c-913b-df66ff8ac096", + "apim-request-id": "f468e7eb-4507-4729-a635-d1ca836c4129", "Content-Length": "907", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:42:59 GMT", + "Date": "Sat, 05 Jun 2021 03:34:14 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "181", - "x-request-id": "ef36fabe-a594-4c6c-913b-df66ff8ac096" + "x-envoy-upstream-service-time": "161", + "x-request-id": "f468e7eb-4507-4729-a635-d1ca836c4129" }, "ResponseBody": { - "dataFeedId": "c19938d0-5cd4-43b6-bca3-302239025e66", + "dataFeedId": "82dcb95d-c94f-4146-9403-6f1cf9c3ecc4", "dataFeedName": "dataFeedJUUoOyzs", "metrics": [ { - "metricId": "eb02bda8-29bd-4d9f-b7ea-a52b84371b46", + "metricId": "078f6b1e-ec2c-4e88-b78c-1a5f2aa7d3e7", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -100,7 +100,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:42:59Z", + "createdTime": "2021-06-05T03:34:14Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -111,13 +111,13 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/c19938d0-5cd4-43b6-bca3-302239025e66", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/82dcb95d-c94f-4146-9403-6f1cf9c3ecc4", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-b879e5e39bbe4543b915ae940d38a5cc-2f2290dc3f998348-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-6a341cc10825c14499169c6af3183936-4d78baec31705d43-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "c08bc879a8e6257e25eaa9541d2a870d", "x-ms-return-client-request-id": "true" @@ -125,21 +125,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "5688322c-c570-4cd4-8ef7-a98f1b3af80e", + "apim-request-id": "c806d389-ee75-4523-a40e-e65807657e31", "Content-Length": "907", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:42:59 GMT", + "Date": "Sat, 05 Jun 2021 03:34:15 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "179", - "x-request-id": "5688322c-c570-4cd4-8ef7-a98f1b3af80e" + "x-envoy-upstream-service-time": "176", + "x-request-id": "c806d389-ee75-4523-a40e-e65807657e31" }, "ResponseBody": { - "dataFeedId": "c19938d0-5cd4-43b6-bca3-302239025e66", + "dataFeedId": "82dcb95d-c94f-4146-9403-6f1cf9c3ecc4", "dataFeedName": "dataFeedJUUoOyzs", "metrics": [ { - "metricId": "eb02bda8-29bd-4d9f-b7ea-a52b84371b46", + "metricId": "078f6b1e-ec2c-4e88-b78c-1a5f2aa7d3e7", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -167,7 +167,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:42:59Z", + "createdTime": "2021-06-05T03:34:14Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -178,15 +178,15 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/c19938d0-5cd4-43b6-bca3-302239025e66", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/82dcb95d-c94f-4146-9403-6f1cf9c3ecc4", "RequestMethod": "PATCH", "RequestHeaders": { "Accept": "application/json", - "Content-Length": "569", + "Content-Length": "598", "Content-Type": "application/merge-patch\u002Bjson", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-a132c0de3ab00743b33a536ee07960d2-5f236cab1ccb4e44-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-a5654d622737984a9650fdcc01195b39-ee3d5f6f95108044-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "541e67037f47a7c186c070df041cd196", "x-ms-return-client-request-id": "true" @@ -214,92 +214,26 @@ ], "viewers": [], "status": "Active", - "actionLinkTemplate": "" - }, - "StatusCode": 200, - "ResponseHeaders": { - "apim-request-id": "dcd94abe-2d3c-4ab6-9737-2757db784e45", - "Content-Length": "958", - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:43:00 GMT", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "1014", - "x-request-id": "dcd94abe-2d3c-4ab6-9737-2757db784e45" - }, - "ResponseBody": { - "dataFeedId": "c19938d0-5cd4-43b6-bca3-302239025e66", - "dataFeedName": "dataFeedJUUoOyzs", - "metrics": [ - { - "metricId": "eb02bda8-29bd-4d9f-b7ea-a52b84371b46", - "metricName": "cost", - "metricDisplayName": "cost", - "metricDescription": "" - } - ], - "dimension": [], - "dataStartFrom": "2020-08-01T00:00:00Z", - "dataSourceType": "AzureBlob", - "timestampColumn": "", - "startOffsetInSeconds": 0, - "maxQueryPerMinute": 30.0, - "granularityName": "Daily", - "needRollup": "NoRollup", - "fillMissingPointType": "PreviousValue", - "fillMissingPointValue": 0.0, - "rollUpMethod": "None", - "dataFeedDescription": "This data feed was created to test the .NET client.", - "stopRetryAfterInSeconds": -1, - "minRetryIntervalInSeconds": -1, - "maxConcurrency": -1, - "viewMode": "Private", - "admins": [ - "foo@contoso.com" - ], - "viewers": [], - "creator": "foo@contoso.com", - "status": "Active", - "createdTime": "2021-06-03T21:42:59Z", - "isAdmin": true, "actionLinkTemplate": "", - "dataSourceParameter": { - "container": "container", - "blobTemplate": "template" - }, "authenticationType": "Basic" - } - }, - { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/c19938d0-5cd4-43b6-bca3-302239025e66", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-6e9b52ca5bdb5345ba6fda39147d28bf-61ac2f1978f24945-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-api-key": "Sanitized", - "x-ms-client-request-id": "0dad8d96353569db8680e3cd0037eaa4", - "x-ms-return-client-request-id": "true" }, - "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "0978d800-e2c2-42d1-b22d-5243596e8a5b", + "apim-request-id": "e847bf8b-2dee-4e7b-a967-2c650d60c8e5", "Content-Length": "958", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:43:00 GMT", + "Date": "Sat, 05 Jun 2021 03:34:16 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "162", - "x-request-id": "0978d800-e2c2-42d1-b22d-5243596e8a5b" + "x-envoy-upstream-service-time": "1170", + "x-request-id": "e847bf8b-2dee-4e7b-a967-2c650d60c8e5" }, "ResponseBody": { - "dataFeedId": "c19938d0-5cd4-43b6-bca3-302239025e66", + "dataFeedId": "82dcb95d-c94f-4146-9403-6f1cf9c3ecc4", "dataFeedName": "dataFeedJUUoOyzs", "metrics": [ { - "metricId": "eb02bda8-29bd-4d9f-b7ea-a52b84371b46", + "metricId": "078f6b1e-ec2c-4e88-b78c-1a5f2aa7d3e7", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -327,7 +261,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:42:59Z", + "createdTime": "2021-06-05T03:34:14Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -338,33 +272,33 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/c19938d0-5cd4-43b6-bca3-302239025e66", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/82dcb95d-c94f-4146-9403-6f1cf9c3ecc4", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-baee14c186485745a32c2a55f8cfbb61-33cc24abb2a56048-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-f694f36d9de8b84db12bba87e6aa137c-81fff0320adc4243-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", - "x-ms-client-request-id": "7779544f105cfacc07e33a25389e2108", + "x-ms-client-request-id": "0dad8d96353569db8680e3cd0037eaa4", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "apim-request-id": "e3414c79-1791-4278-bba2-1183b10e0bae", + "apim-request-id": "3bb5657b-4bc5-4b4e-8a2b-2f67e9a4b688", "Content-Length": "0", - "Date": "Thu, 03 Jun 2021 21:43:01 GMT", + "Date": "Sat, 05 Jun 2021 03:34:21 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "302", - "x-request-id": "e3414c79-1791-4278-bba2-1183b10e0bae" + "x-envoy-upstream-service-time": "5364", + "x-request-id": "3bb5657b-4bc5-4b4e-8a2b-2f67e9a4b688" }, "ResponseBody": [] } ], "Variables": { - "DateTimeOffsetNow": "2021-06-03T14:43:01.5108831-07:00", + "DateTimeOffsetNow": "2021-06-04T20:34:15.9922309-07:00", "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", "METRICSADVISOR_ENDPOINT_SUFFIX": null, "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureBlobDataFeedWithMinimumSetupAndGetInstance(True).json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureBlobDataFeedWithMinimumSetupAndGetInstance(True).json index 7854500a095a6..ff98b8b51d4c0 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureBlobDataFeedWithMinimumSetupAndGetInstance(True).json +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureBlobDataFeedWithMinimumSetupAndGetInstance(True).json @@ -8,8 +8,8 @@ "Authorization": "Sanitized", "Content-Length": "268", "Content-Type": "application/json", - "traceparent": "00-03330299fb4e984ca08917c76bb4932a-53eb573897e5294d-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-ad9ce330e4d88e4a81795e2edc1ac95b-d12e0076e435d446-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-ms-client-request-id": "304ca13cb81bf305729e6779b2901acf", "x-ms-return-client-request-id": "true" }, @@ -31,46 +31,46 @@ }, "StatusCode": 201, "ResponseHeaders": { - "apim-request-id": "97dd2167-dd58-4b44-ac1e-f2f95fe1558f", + "apim-request-id": "755c6ad9-c63b-4c0a-ad1d-701c8615ab4a", "Content-Length": "0", - "Date": "Thu, 03 Jun 2021 21:41:13 GMT", - "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/e2f30864-22ee-4863-b72a-5d1f4bb1e9b3", + "Date": "Sat, 05 Jun 2021 03:32:04 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/9930bf60-db82-4b5b-a974-64256ea2a188", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "1222", - "x-request-id": "97dd2167-dd58-4b44-ac1e-f2f95fe1558f" + "x-envoy-upstream-service-time": "742", + "x-request-id": "755c6ad9-c63b-4c0a-ad1d-701c8615ab4a" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/e2f30864-22ee-4863-b72a-5d1f4bb1e9b3", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/9930bf60-db82-4b5b-a974-64256ea2a188", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-03330299fb4e984ca08917c76bb4932a-c834ad43cab58940-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-ad9ce330e4d88e4a81795e2edc1ac95b-11f8e082685fe741-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-ms-client-request-id": "5a80e04d07e916d69a4896caeb3b7b6e", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "3882055e-0eea-4dfe-b98e-835cf09f4f50", + "apim-request-id": "e9e19f77-2f3e-4c46-951e-61f81f536626", "Content-Length": "949", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:41:18 GMT", + "Date": "Sat, 05 Jun 2021 03:32:04 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "5140", - "x-request-id": "3882055e-0eea-4dfe-b98e-835cf09f4f50" + "x-envoy-upstream-service-time": "151", + "x-request-id": "e9e19f77-2f3e-4c46-951e-61f81f536626" }, "ResponseBody": { - "dataFeedId": "e2f30864-22ee-4863-b72a-5d1f4bb1e9b3", + "dataFeedId": "9930bf60-db82-4b5b-a974-64256ea2a188", "dataFeedName": "dataFeed0RtRApf2", "metrics": [ { - "metricId": "37f055fd-c8c1-4f0a-a4c4-c8bc7a163f46", + "metricId": "309c4c54-0b48-49e4-85c1-a359e85e8735", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -98,7 +98,7 @@ "viewers": [], "creator": "94dc466b-52e4-4678-892d-70a0c45c5f42", "status": "Active", - "createdTime": "2021-06-03T21:41:13Z", + "createdTime": "2021-06-05T03:32:05Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -109,34 +109,34 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/e2f30864-22ee-4863-b72a-5d1f4bb1e9b3", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/9930bf60-db82-4b5b-a974-64256ea2a188", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-1f385514096aed429a7028f86807dff5-9e98d1322500d643-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-30d54d9b45978642a0658315d669dfb8-c6df75d6598be24c-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-ms-client-request-id": "4e8fa3088d90b06ff0ab5f720a017dc1", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "cd4b8135-b6e9-4aa3-9e4f-cbf188444340", + "apim-request-id": "91a1761f-809e-4bf0-aeb9-b383242f1148", "Content-Length": "949", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:41:18 GMT", + "Date": "Sat, 05 Jun 2021 03:32:05 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "139", - "x-request-id": "cd4b8135-b6e9-4aa3-9e4f-cbf188444340" + "x-envoy-upstream-service-time": "412", + "x-request-id": "91a1761f-809e-4bf0-aeb9-b383242f1148" }, "ResponseBody": { - "dataFeedId": "e2f30864-22ee-4863-b72a-5d1f4bb1e9b3", + "dataFeedId": "9930bf60-db82-4b5b-a974-64256ea2a188", "dataFeedName": "dataFeed0RtRApf2", "metrics": [ { - "metricId": "37f055fd-c8c1-4f0a-a4c4-c8bc7a163f46", + "metricId": "309c4c54-0b48-49e4-85c1-a359e85e8735", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -164,7 +164,7 @@ "viewers": [], "creator": "94dc466b-52e4-4678-892d-70a0c45c5f42", "status": "Active", - "createdTime": "2021-06-03T21:41:13Z", + "createdTime": "2021-06-05T03:32:05Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -175,15 +175,15 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/e2f30864-22ee-4863-b72a-5d1f4bb1e9b3", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/9930bf60-db82-4b5b-a974-64256ea2a188", "RequestMethod": "PATCH", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "590", + "Content-Length": "619", "Content-Type": "application/merge-patch\u002Bjson", - "traceparent": "00-acfe70d75055bb46858becb8d04e7339-ffdbc7fea15c7848-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-27edcf5c4a81b142995d49471cb9ac6d-309d28e3f55f284c-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-ms-client-request-id": "cd1d79afab82356aca3595d3223a0737", "x-ms-return-client-request-id": "true" }, @@ -210,91 +210,26 @@ ], "viewers": [], "status": "Active", - "actionLinkTemplate": "" - }, - "StatusCode": 200, - "ResponseHeaders": { - "apim-request-id": "ebfc526e-6b4e-4db3-b15d-de9162a29c10", - "Content-Length": "1000", - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:41:25 GMT", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "5937", - "x-request-id": "ebfc526e-6b4e-4db3-b15d-de9162a29c10" - }, - "ResponseBody": { - "dataFeedId": "e2f30864-22ee-4863-b72a-5d1f4bb1e9b3", - "dataFeedName": "dataFeed0RtRApf2", - "metrics": [ - { - "metricId": "37f055fd-c8c1-4f0a-a4c4-c8bc7a163f46", - "metricName": "cost", - "metricDisplayName": "cost", - "metricDescription": "" - } - ], - "dimension": [], - "dataStartFrom": "2020-08-01T00:00:00Z", - "dataSourceType": "AzureBlob", - "timestampColumn": "", - "startOffsetInSeconds": 0, - "maxQueryPerMinute": 30.0, - "granularityName": "Daily", - "needRollup": "NoRollup", - "fillMissingPointType": "PreviousValue", - "fillMissingPointValue": 0.0, - "rollUpMethod": "None", - "dataFeedDescription": "This data feed was created to test the .NET client.", - "stopRetryAfterInSeconds": -1, - "minRetryIntervalInSeconds": -1, - "maxConcurrency": -1, - "viewMode": "Private", - "admins": [ - "94dc466b-52e4-4678-892d-70a0c45c5f42" - ], - "viewers": [], - "creator": "94dc466b-52e4-4678-892d-70a0c45c5f42", - "status": "Active", - "createdTime": "2021-06-03T21:41:13Z", - "isAdmin": true, "actionLinkTemplate": "", - "dataSourceParameter": { - "container": "container", - "blobTemplate": "template" - }, "authenticationType": "Basic" - } - }, - { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/e2f30864-22ee-4863-b72a-5d1f4bb1e9b3", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "traceparent": "00-7c22b82ca0e4bd47bbb38aa38fd45ea2-50c15dbbb0a8474a-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-client-request-id": "0e70f923cc00bf3f71d06a3da8640c99", - "x-ms-return-client-request-id": "true" }, - "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "2dc656da-c5b5-49d5-a600-9a4a25a25406", + "apim-request-id": "fb5892d5-f6cb-42c8-a7aa-5d0af8e01415", "Content-Length": "1000", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:41:25 GMT", + "Date": "Sat, 05 Jun 2021 03:32:11 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "96", - "x-request-id": "2dc656da-c5b5-49d5-a600-9a4a25a25406" + "x-envoy-upstream-service-time": "5863", + "x-request-id": "fb5892d5-f6cb-42c8-a7aa-5d0af8e01415" }, "ResponseBody": { - "dataFeedId": "e2f30864-22ee-4863-b72a-5d1f4bb1e9b3", + "dataFeedId": "9930bf60-db82-4b5b-a974-64256ea2a188", "dataFeedName": "dataFeed0RtRApf2", "metrics": [ { - "metricId": "37f055fd-c8c1-4f0a-a4c4-c8bc7a163f46", + "metricId": "309c4c54-0b48-49e4-85c1-a359e85e8735", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -322,7 +257,7 @@ "viewers": [], "creator": "94dc466b-52e4-4678-892d-70a0c45c5f42", "status": "Active", - "createdTime": "2021-06-03T21:41:13Z", + "createdTime": "2021-06-05T03:32:05Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -333,32 +268,32 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/e2f30864-22ee-4863-b72a-5d1f4bb1e9b3", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/9930bf60-db82-4b5b-a974-64256ea2a188", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-e707a836cb5fbd4a8b8853462f08b439-3292a428e6dc224e-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-client-request-id": "721ad4caad1d5deb395a835af89b8db5", + "traceparent": "00-0f2c8e8eb478274dafa52d31f43a979e-d441708e988d2945-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "0e70f923cc00bf3f71d06a3da8640c99", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "apim-request-id": "c339362e-ccc9-4f46-bda2-10f1e6a6ef2d", + "apim-request-id": "31278ed0-6a83-4a49-9583-28c45ff8b1f6", "Content-Length": "0", - "Date": "Thu, 03 Jun 2021 21:41:26 GMT", + "Date": "Sat, 05 Jun 2021 03:32:21 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "249", - "x-request-id": "c339362e-ccc9-4f46-bda2-10f1e6a6ef2d" + "x-envoy-upstream-service-time": "10305", + "x-request-id": "31278ed0-6a83-4a49-9583-28c45ff8b1f6" }, "ResponseBody": [] } ], "Variables": { - "DateTimeOffsetNow": "2021-06-03T14:41:25.2682779-07:00", + "DateTimeOffsetNow": "2021-06-04T20:32:10.9675876-07:00", "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", "METRICSADVISOR_ENDPOINT_SUFFIX": null, "RandomSeed": "675060581" diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureBlobDataFeedWithMinimumSetupAndGetInstance(True)Async.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureBlobDataFeedWithMinimumSetupAndGetInstance(True)Async.json index 2fc4ce52ce4ce..74e49535d14f5 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureBlobDataFeedWithMinimumSetupAndGetInstance(True)Async.json +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureBlobDataFeedWithMinimumSetupAndGetInstance(True)Async.json @@ -8,8 +8,8 @@ "Authorization": "Sanitized", "Content-Length": "268", "Content-Type": "application/json", - "traceparent": "00-3fbd77eb30c70a43af16041ef34c16a4-f57ff9747c66284a-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-f07f0e2956548547a7c61b6eb7323a18-5055438c4086e446-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-ms-client-request-id": "e74690bd8dfdd07f3d060ec80e327b64", "x-ms-return-client-request-id": "true" }, @@ -31,46 +31,46 @@ }, "StatusCode": 201, "ResponseHeaders": { - "apim-request-id": "e4c3feff-1cca-43b5-a0af-3c8c5760b93e", + "apim-request-id": "38e07783-303a-4716-90d4-c18b9ee78c46", "Content-Length": "0", - "Date": "Thu, 03 Jun 2021 21:42:56 GMT", - "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/116b047b-95c3-4d6a-b098-654da780d71f", + "Date": "Sat, 05 Jun 2021 03:33:51 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/3ffd6e78-3e22-4239-893a-eb948b4d2920", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "593", - "x-request-id": "e4c3feff-1cca-43b5-a0af-3c8c5760b93e" + "x-envoy-upstream-service-time": "728", + "x-request-id": "38e07783-303a-4716-90d4-c18b9ee78c46" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/116b047b-95c3-4d6a-b098-654da780d71f", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/3ffd6e78-3e22-4239-893a-eb948b4d2920", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-3fbd77eb30c70a43af16041ef34c16a4-669587621ff21a41-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-f07f0e2956548547a7c61b6eb7323a18-c83d251891361d4d-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-ms-client-request-id": "3b359614de49edaae1d3656a5bbcde52", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "ec1fd7e5-d487-44f4-92c2-e574f70cfb86", + "apim-request-id": "ab353512-d50a-4257-b04e-15880a9570d5", "Content-Length": "949", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:42:56 GMT", + "Date": "Sat, 05 Jun 2021 03:33:51 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "103", - "x-request-id": "ec1fd7e5-d487-44f4-92c2-e574f70cfb86" + "x-envoy-upstream-service-time": "174", + "x-request-id": "ab353512-d50a-4257-b04e-15880a9570d5" }, "ResponseBody": { - "dataFeedId": "116b047b-95c3-4d6a-b098-654da780d71f", + "dataFeedId": "3ffd6e78-3e22-4239-893a-eb948b4d2920", "dataFeedName": "dataFeedhYXjOKuv", "metrics": [ { - "metricId": "3917c923-abfc-4bff-9b3f-72a403972bb5", + "metricId": "b8d55325-f3f9-42dd-9e77-d54fc148b5db", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -98,7 +98,7 @@ "viewers": [], "creator": "94dc466b-52e4-4678-892d-70a0c45c5f42", "status": "Active", - "createdTime": "2021-06-03T21:42:57Z", + "createdTime": "2021-06-05T03:33:51Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -109,34 +109,34 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/116b047b-95c3-4d6a-b098-654da780d71f", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/3ffd6e78-3e22-4239-893a-eb948b4d2920", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-6211980a2d54654d8cdff8abc8af9363-29bee29cadf8b949-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-6258833e636c2440ae8e716d0ae31c0f-256933e77367aa4c-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-ms-client-request-id": "8e436af77c6f71bb21b9f1da2ea2633d", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "58374c12-cce2-41a6-a0a0-2c79d61a1d56", + "apim-request-id": "fc020401-84aa-45a0-bbc2-63f370dbfb9a", "Content-Length": "949", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:42:57 GMT", + "Date": "Sat, 05 Jun 2021 03:33:56 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "98", - "x-request-id": "58374c12-cce2-41a6-a0a0-2c79d61a1d56" + "x-envoy-upstream-service-time": "5208", + "x-request-id": "fc020401-84aa-45a0-bbc2-63f370dbfb9a" }, "ResponseBody": { - "dataFeedId": "116b047b-95c3-4d6a-b098-654da780d71f", + "dataFeedId": "3ffd6e78-3e22-4239-893a-eb948b4d2920", "dataFeedName": "dataFeedhYXjOKuv", "metrics": [ { - "metricId": "3917c923-abfc-4bff-9b3f-72a403972bb5", + "metricId": "b8d55325-f3f9-42dd-9e77-d54fc148b5db", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -164,7 +164,7 @@ "viewers": [], "creator": "94dc466b-52e4-4678-892d-70a0c45c5f42", "status": "Active", - "createdTime": "2021-06-03T21:42:57Z", + "createdTime": "2021-06-05T03:33:51Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -175,15 +175,15 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/116b047b-95c3-4d6a-b098-654da780d71f", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/3ffd6e78-3e22-4239-893a-eb948b4d2920", "RequestMethod": "PATCH", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "590", + "Content-Length": "619", "Content-Type": "application/merge-patch\u002Bjson", - "traceparent": "00-a132140442ee23489f49e79c87b224ad-c3fa7e484f4de14f-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-f41bec77b3c22b4682288d48b0eaa57c-a57d1a41a616b04f-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-ms-client-request-id": "e2fbc91d23eade6ae658052a27157581", "x-ms-return-client-request-id": "true" }, @@ -210,91 +210,26 @@ ], "viewers": [], "status": "Active", - "actionLinkTemplate": "" - }, - "StatusCode": 200, - "ResponseHeaders": { - "apim-request-id": "ace17618-d212-41d8-9b94-a82def104fcb", - "Content-Length": "1000", - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:42:57 GMT", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "882", - "x-request-id": "ace17618-d212-41d8-9b94-a82def104fcb" - }, - "ResponseBody": { - "dataFeedId": "116b047b-95c3-4d6a-b098-654da780d71f", - "dataFeedName": "dataFeedhYXjOKuv", - "metrics": [ - { - "metricId": "3917c923-abfc-4bff-9b3f-72a403972bb5", - "metricName": "cost", - "metricDisplayName": "cost", - "metricDescription": "" - } - ], - "dimension": [], - "dataStartFrom": "2020-08-01T00:00:00Z", - "dataSourceType": "AzureBlob", - "timestampColumn": "", - "startOffsetInSeconds": 0, - "maxQueryPerMinute": 30.0, - "granularityName": "Daily", - "needRollup": "NoRollup", - "fillMissingPointType": "PreviousValue", - "fillMissingPointValue": 0.0, - "rollUpMethod": "None", - "dataFeedDescription": "This data feed was created to test the .NET client.", - "stopRetryAfterInSeconds": -1, - "minRetryIntervalInSeconds": -1, - "maxConcurrency": -1, - "viewMode": "Private", - "admins": [ - "94dc466b-52e4-4678-892d-70a0c45c5f42" - ], - "viewers": [], - "creator": "94dc466b-52e4-4678-892d-70a0c45c5f42", - "status": "Active", - "createdTime": "2021-06-03T21:42:57Z", - "isAdmin": true, "actionLinkTemplate": "", - "dataSourceParameter": { - "container": "container", - "blobTemplate": "template" - }, "authenticationType": "Basic" - } - }, - { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/116b047b-95c3-4d6a-b098-654da780d71f", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "traceparent": "00-b132b1641124e7499f36fb7d9a2d0ed5-5961ec596a9d7e41-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-client-request-id": "a3d1bc27edee98f4dbc3198fedd0be3f", - "x-ms-return-client-request-id": "true" }, - "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "2254244d-0f99-4581-bab0-dda32a01ef71", + "apim-request-id": "511ab3cc-2b92-4ea4-b27a-972b04207bf8", "Content-Length": "1000", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:42:58 GMT", + "Date": "Sat, 05 Jun 2021 03:34:08 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "108", - "x-request-id": "2254244d-0f99-4581-bab0-dda32a01ef71" + "x-envoy-upstream-service-time": "10754", + "x-request-id": "511ab3cc-2b92-4ea4-b27a-972b04207bf8" }, "ResponseBody": { - "dataFeedId": "116b047b-95c3-4d6a-b098-654da780d71f", + "dataFeedId": "3ffd6e78-3e22-4239-893a-eb948b4d2920", "dataFeedName": "dataFeedhYXjOKuv", "metrics": [ { - "metricId": "3917c923-abfc-4bff-9b3f-72a403972bb5", + "metricId": "b8d55325-f3f9-42dd-9e77-d54fc148b5db", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -322,7 +257,7 @@ "viewers": [], "creator": "94dc466b-52e4-4678-892d-70a0c45c5f42", "status": "Active", - "createdTime": "2021-06-03T21:42:57Z", + "createdTime": "2021-06-05T03:33:51Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -333,32 +268,32 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/116b047b-95c3-4d6a-b098-654da780d71f", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/3ffd6e78-3e22-4239-893a-eb948b4d2920", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-6b663f8bcb118b458c9e0c78b779b1fe-57347144232b6f41-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-client-request-id": "924c2770fbc0d3670064a8177690490c", + "traceparent": "00-325f65140086ef42b11a4b0b6a6bd9e9-3c6886dd490c7641-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "a3d1bc27edee98f4dbc3198fedd0be3f", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "apim-request-id": "a932f504-8109-424a-9ed3-33a0044ed151", + "apim-request-id": "87b3e324-11f6-487d-af4c-cca76bb3de5f", "Content-Length": "0", - "Date": "Thu, 03 Jun 2021 21:42:58 GMT", + "Date": "Sat, 05 Jun 2021 03:34:13 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "235", - "x-request-id": "a932f504-8109-424a-9ed3-33a0044ed151" + "x-envoy-upstream-service-time": "5420", + "x-request-id": "87b3e324-11f6-487d-af4c-cca76bb3de5f" }, "ResponseBody": [] } ], "Variables": { - "DateTimeOffsetNow": "2021-06-03T14:42:58.7106730-07:00", + "DateTimeOffsetNow": "2021-06-04T20:34:07.5537291-07:00", "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", "METRICSADVISOR_ENDPOINT_SUFFIX": null, "RandomSeed": "853461122" diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataExplorerDataFeedWithAuthentication(Basic).json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataExplorerDataFeedWithAuthentication(Basic).json new file mode 100644 index 0000000000000..b619d9d7e5466 --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataExplorerDataFeedWithAuthentication(Basic).json @@ -0,0 +1,302 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "241", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-96a16815ad9c564480d8b3be384f6de4-fc640ce87c8a1348-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "f8f94068770ebe7dd32809d9590b143a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "query": "mock" + }, + "dataSourceType": "AzureDataExplorer", + "dataFeedName": "dataFeed5l5B7if8", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "ae366833-c2ee-4cea-82e3-5af81ec2e027", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:52 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/f2ae65fa-acce-414c-aee3-7cbd27dd71ad", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "597", + "x-request-id": "ae366833-c2ee-4cea-82e3-5af81ec2e027" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/f2ae65fa-acce-414c-aee3-7cbd27dd71ad", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-96a16815ad9c564480d8b3be384f6de4-4451edc4c6a9d64d-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "bf43c913f9901495049acdd91d31c735", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "5d06e614-e227-424f-9559-8b6223b2e20a", + "Content-Length": "880", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:53 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "168", + "x-request-id": "5d06e614-e227-424f-9559-8b6223b2e20a" + }, + "ResponseBody": { + "dataFeedId": "f2ae65fa-acce-414c-aee3-7cbd27dd71ad", + "dataFeedName": "dataFeed5l5B7if8", + "metrics": [ + { + "metricId": "9f6632e7-8cd0-4b9f-8ded-f8d08cbb1694", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataExplorer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:53Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/f2ae65fa-acce-414c-aee3-7cbd27dd71ad", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-6e3fc683a66cf047b8b5a488a6360a8a-35223170ec04924d-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "8f810eeda79a359db29243caece73671", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "89f460d6-462e-4672-a0c4-0c2a079a0e3f", + "Content-Length": "880", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:53 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "155", + "x-request-id": "89f460d6-462e-4672-a0c4-0c2a079a0e3f" + }, + "ResponseBody": { + "dataFeedId": "f2ae65fa-acce-414c-aee3-7cbd27dd71ad", + "dataFeedName": "dataFeed5l5B7if8", + "metrics": [ + { + "metricId": "9f6632e7-8cd0-4b9f-8ded-f8d08cbb1694", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataExplorer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:53Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/f2ae65fa-acce-414c-aee3-7cbd27dd71ad", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "520", + "Content-Type": "application/merge-patch\u002Bjson", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-8445be80343abd44a85f5771a2839128-81b1d768239bf44d-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "80a84cf8b04f6e8faae5f373a9a3a1a2", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "query": "mock" + }, + "dataSourceType": "AzureDataExplorer", + "dataFeedName": "dataFeed5l5B7if8", + "dataFeedDescription": "", + "timestampColumn": "", + "dataStartFrom": "2020-08-01T00:00:00Z", + "startOffsetInSeconds": 0, + "maxConcurrency": -1, + "minRetryIntervalInSeconds": -1, + "stopRetryAfterInSeconds": -1, + "needRollup": "NoRollup", + "rollUpMethod": "None", + "fillMissingPointType": "PreviousValue", + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "status": "Active", + "actionLinkTemplate": "", + "authenticationType": "Basic" + }, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "79b07939-8527-4474-9d53-a7cc518d39c6", + "Content-Length": "880", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:54 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "845", + "x-request-id": "79b07939-8527-4474-9d53-a7cc518d39c6" + }, + "ResponseBody": { + "dataFeedId": "f2ae65fa-acce-414c-aee3-7cbd27dd71ad", + "dataFeedName": "dataFeed5l5B7if8", + "metrics": [ + { + "metricId": "9f6632e7-8cd0-4b9f-8ded-f8d08cbb1694", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataExplorer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:53Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/f2ae65fa-acce-414c-aee3-7cbd27dd71ad", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-a0adbba8e0506e4980d62e1d5fff374d-5a1049f390ec1948-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "4aecd46185896ca02c0e0cfeb6cb281c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "031d25c3-1cfa-40fe-91cb-2c67a14fefa3", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:54 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "301", + "x-request-id": "031d25c3-1cfa-40fe-91cb-2c67a14fefa3" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "1620163842" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataExplorerDataFeedWithAuthentication(Basic)Async.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataExplorerDataFeedWithAuthentication(Basic)Async.json new file mode 100644 index 0000000000000..9700d8527013f --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataExplorerDataFeedWithAuthentication(Basic)Async.json @@ -0,0 +1,302 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "241", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-9ad2e25aaf629d44af862cf5d1063f66-00b78ee33d1cdc44-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "6f0a8ca1133b0365eb69b03c3e072b20", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "query": "mock" + }, + "dataSourceType": "AzureDataExplorer", + "dataFeedName": "dataFeedoZHtYfYr", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "79758d21-a578-4544-b18a-ba79f0b66d49", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:40:53 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/f7ced7f4-5169-40b4-aa6c-eecf48b46915", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "705", + "x-request-id": "79758d21-a578-4544-b18a-ba79f0b66d49" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/f7ced7f4-5169-40b4-aa6c-eecf48b46915", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-9ad2e25aaf629d44af862cf5d1063f66-9a255006d891bd4a-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "8eadfbcde707c26437013b2e9e33d1c2", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "4d64e053-7fdc-459e-b2e3-3f80aa96c6b5", + "Content-Length": "880", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:40:53 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "239", + "x-request-id": "4d64e053-7fdc-459e-b2e3-3f80aa96c6b5" + }, + "ResponseBody": { + "dataFeedId": "f7ced7f4-5169-40b4-aa6c-eecf48b46915", + "dataFeedName": "dataFeedoZHtYfYr", + "metrics": [ + { + "metricId": "d0d9080b-6fb0-4efb-934f-25098b7b9be1", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataExplorer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:40:53Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/f7ced7f4-5169-40b4-aa6c-eecf48b46915", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-7727dde74cf7e542973c755308b50a6e-e6dfad0b9cf95243-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "87331c012e303811996422ef52d33b52", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "3b2dc9d3-d031-499c-9cb4-28b2a27650d7", + "Content-Length": "880", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:40:53 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "166", + "x-request-id": "3b2dc9d3-d031-499c-9cb4-28b2a27650d7" + }, + "ResponseBody": { + "dataFeedId": "f7ced7f4-5169-40b4-aa6c-eecf48b46915", + "dataFeedName": "dataFeedoZHtYfYr", + "metrics": [ + { + "metricId": "d0d9080b-6fb0-4efb-934f-25098b7b9be1", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataExplorer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:40:53Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/f7ced7f4-5169-40b4-aa6c-eecf48b46915", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "520", + "Content-Type": "application/merge-patch\u002Bjson", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-34fa434e5d81554c8a741d589ee4c4ce-30fb065e05c6604d-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "f498839f9766b9b32847383ad73664b7", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "query": "mock" + }, + "dataSourceType": "AzureDataExplorer", + "dataFeedName": "dataFeedoZHtYfYr", + "dataFeedDescription": "", + "timestampColumn": "", + "dataStartFrom": "2020-08-01T00:00:00Z", + "startOffsetInSeconds": 0, + "maxConcurrency": -1, + "minRetryIntervalInSeconds": -1, + "stopRetryAfterInSeconds": -1, + "needRollup": "NoRollup", + "rollUpMethod": "None", + "fillMissingPointType": "PreviousValue", + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "status": "Active", + "actionLinkTemplate": "", + "authenticationType": "Basic" + }, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "46652d1a-fb71-4453-a0bb-f69166c721e9", + "Content-Length": "880", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:40:54 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "955", + "x-request-id": "46652d1a-fb71-4453-a0bb-f69166c721e9" + }, + "ResponseBody": { + "dataFeedId": "f7ced7f4-5169-40b4-aa6c-eecf48b46915", + "dataFeedName": "dataFeedoZHtYfYr", + "metrics": [ + { + "metricId": "d0d9080b-6fb0-4efb-934f-25098b7b9be1", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataExplorer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:40:53Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/f7ced7f4-5169-40b4-aa6c-eecf48b46915", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-a9fd84dda77ab34c952d468b9dd934cc-72a7d26df0cfcc45-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "223aed97a3d39ef0e975f4a3c5747063", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "e085a87c-d931-46b0-9c78-25e99458426a", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:40:54 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "346", + "x-request-id": "e085a87c-d931-46b0-9c78-25e99458426a" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "1314404569" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataExplorerDataFeedWithAuthentication(ManagedIdentity).json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataExplorerDataFeedWithAuthentication(ManagedIdentity).json new file mode 100644 index 0000000000000..12b8addbfd0ea --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataExplorerDataFeedWithAuthentication(ManagedIdentity).json @@ -0,0 +1,302 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "241", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-b0cb82f8fc48ad41bf6251b35aae826e-43064f928008b147-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "9297e07eb733f31f163d3fb79d1cd773", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "query": "mock" + }, + "dataSourceType": "AzureDataExplorer", + "dataFeedName": "dataFeedU29NmsRq", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "f5cffa9f-80f9-4ecd-944d-2c4c3dd61bcb", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:55 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/a0194c77-c5d4-49c5-83c1-1b449895ae08", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "382", + "x-request-id": "f5cffa9f-80f9-4ecd-944d-2c4c3dd61bcb" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/a0194c77-c5d4-49c5-83c1-1b449895ae08", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-b0cb82f8fc48ad41bf6251b35aae826e-c8185f16ac72e24d-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "07bb429652e3cea9f913d11a7ddafc2d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "7522f23c-9a48-4418-9248-f61f8821f124", + "Content-Length": "880", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:55 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "161", + "x-request-id": "7522f23c-9a48-4418-9248-f61f8821f124" + }, + "ResponseBody": { + "dataFeedId": "a0194c77-c5d4-49c5-83c1-1b449895ae08", + "dataFeedName": "dataFeedU29NmsRq", + "metrics": [ + { + "metricId": "afcce29d-ea10-4113-ab15-1253167779e8", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataExplorer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:55Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/a0194c77-c5d4-49c5-83c1-1b449895ae08", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-83c677a4d7f47d40a8ada462bec72f6c-4fe5cf5c0336224c-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "1f843c8dd4f644b7f68b3cc6d0c07407", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "fc4ccd65-8d7e-443f-a55b-aa1dd5287a05", + "Content-Length": "880", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:55 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "172", + "x-request-id": "fc4ccd65-8d7e-443f-a55b-aa1dd5287a05" + }, + "ResponseBody": { + "dataFeedId": "a0194c77-c5d4-49c5-83c1-1b449895ae08", + "dataFeedName": "dataFeedU29NmsRq", + "metrics": [ + { + "metricId": "afcce29d-ea10-4113-ab15-1253167779e8", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataExplorer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:55Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/a0194c77-c5d4-49c5-83c1-1b449895ae08", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "530", + "Content-Type": "application/merge-patch\u002Bjson", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-04459fbc4e3a524b8631e96726603171-60e5e9135e89a94e-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "8139b55e5b9c2b2736c99920e504763c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "query": "mock" + }, + "dataSourceType": "AzureDataExplorer", + "dataFeedName": "dataFeedU29NmsRq", + "dataFeedDescription": "", + "timestampColumn": "", + "dataStartFrom": "2020-08-01T00:00:00Z", + "startOffsetInSeconds": 0, + "maxConcurrency": -1, + "minRetryIntervalInSeconds": -1, + "stopRetryAfterInSeconds": -1, + "needRollup": "NoRollup", + "rollUpMethod": "None", + "fillMissingPointType": "PreviousValue", + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "status": "Active", + "actionLinkTemplate": "", + "authenticationType": "ManagedIdentity" + }, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "f10344ac-309d-4b50-a83c-384b5a9aad91", + "Content-Length": "890", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:56 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "802", + "x-request-id": "f10344ac-309d-4b50-a83c-384b5a9aad91" + }, + "ResponseBody": { + "dataFeedId": "a0194c77-c5d4-49c5-83c1-1b449895ae08", + "dataFeedName": "dataFeedU29NmsRq", + "metrics": [ + { + "metricId": "afcce29d-ea10-4113-ab15-1253167779e8", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataExplorer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:55Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "ManagedIdentity" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/a0194c77-c5d4-49c5-83c1-1b449895ae08", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-03d864c3c4a1e9489445062e06c99d92-577c9fb019f0524e-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "602a1240b798c27d8b77115816e3fd38", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "aae55e6b-5d8f-4770-808e-612fa57237e9", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:56 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "311", + "x-request-id": "aae55e6b-5d8f-4770-808e-612fa57237e9" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "1177499962" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataExplorerDataFeedWithAuthentication(ManagedIdentity)Async.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataExplorerDataFeedWithAuthentication(ManagedIdentity)Async.json new file mode 100644 index 0000000000000..ff20dd3648f80 --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataExplorerDataFeedWithAuthentication(ManagedIdentity)Async.json @@ -0,0 +1,302 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "241", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-e289491916ba9649ae21fab1e5dd865a-1689634cea6b8145-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "073069cfe2f030e07996ab80a14bf063", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "query": "mock" + }, + "dataSourceType": "AzureDataExplorer", + "dataFeedName": "dataFeedF9MYlMXe", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "4b535fd9-e345-4e6b-917b-db0583b0048b", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:40:55 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/a0ef0c04-cc64-4d0e-b1fb-55e5dab93f76", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "399", + "x-request-id": "4b535fd9-e345-4e6b-917b-db0583b0048b" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/a0ef0c04-cc64-4d0e-b1fb-55e5dab93f76", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-e289491916ba9649ae21fab1e5dd865a-e3cfe71bf9cdd945-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "652e7c436f03133e5d0670752e0dd64e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "69c408cc-54df-43e5-b87f-71e49fa7bede", + "Content-Length": "880", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:40:55 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "183", + "x-request-id": "69c408cc-54df-43e5-b87f-71e49fa7bede" + }, + "ResponseBody": { + "dataFeedId": "a0ef0c04-cc64-4d0e-b1fb-55e5dab93f76", + "dataFeedName": "dataFeedF9MYlMXe", + "metrics": [ + { + "metricId": "e593f479-9e6f-4354-a69f-f662c13cfbfb", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataExplorer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:40:56Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/a0ef0c04-cc64-4d0e-b1fb-55e5dab93f76", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-ba552a54f77a2a4289686f66602c99d7-cb2faca242070d4c-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "0ad5fa852662e3161cb1c8667b86b8d8", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "4b702fba-10f3-45fd-bcc4-94f94527ed0b", + "Content-Length": "880", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:40:55 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "161", + "x-request-id": "4b702fba-10f3-45fd-bcc4-94f94527ed0b" + }, + "ResponseBody": { + "dataFeedId": "a0ef0c04-cc64-4d0e-b1fb-55e5dab93f76", + "dataFeedName": "dataFeedF9MYlMXe", + "metrics": [ + { + "metricId": "e593f479-9e6f-4354-a69f-f662c13cfbfb", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataExplorer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:40:56Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/a0ef0c04-cc64-4d0e-b1fb-55e5dab93f76", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "530", + "Content-Type": "application/merge-patch\u002Bjson", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-6c6cd4143854244bb87bc8afd208a780-4389331b1626004a-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "3067da96a4ad5ff12a1daaea726b016c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "query": "mock" + }, + "dataSourceType": "AzureDataExplorer", + "dataFeedName": "dataFeedF9MYlMXe", + "dataFeedDescription": "", + "timestampColumn": "", + "dataStartFrom": "2020-08-01T00:00:00Z", + "startOffsetInSeconds": 0, + "maxConcurrency": -1, + "minRetryIntervalInSeconds": -1, + "stopRetryAfterInSeconds": -1, + "needRollup": "NoRollup", + "rollUpMethod": "None", + "fillMissingPointType": "PreviousValue", + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "status": "Active", + "actionLinkTemplate": "", + "authenticationType": "ManagedIdentity" + }, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "ba4052e8-c7a1-49e3-afc2-1e6be5aac6c6", + "Content-Length": "890", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:40:56 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "770", + "x-request-id": "ba4052e8-c7a1-49e3-afc2-1e6be5aac6c6" + }, + "ResponseBody": { + "dataFeedId": "a0ef0c04-cc64-4d0e-b1fb-55e5dab93f76", + "dataFeedName": "dataFeedF9MYlMXe", + "metrics": [ + { + "metricId": "e593f479-9e6f-4354-a69f-f662c13cfbfb", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataExplorer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:40:56Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "ManagedIdentity" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/a0ef0c04-cc64-4d0e-b1fb-55e5dab93f76", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-b1b74d52bd06f64598b817bd0d376d6c-08ff5d51ba343746-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "a7fb5cbfe6761c00654a4852a6d797d6", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "65b6ee6e-1dd6-4e7f-98f3-3f9803c6f1f2", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:40:57 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "329", + "x-request-id": "65b6ee6e-1dd6-4e7f-98f3-3f9803c6f1f2" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "108303694" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataExplorerDataFeedWithCredentialAuthentication(ServicePrincipal).json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataExplorerDataFeedWithCredentialAuthentication(ServicePrincipal).json new file mode 100644 index 0000000000000..6093b70d554f6 --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataExplorerDataFeedWithCredentialAuthentication(ServicePrincipal).json @@ -0,0 +1,400 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "173", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-8fe5a5beef95284c87eb36ae173e36bf-9c887f8619c81044-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "8e3f806694eb00e87ae4762973c01745", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "parameters": { + "clientId": "mock", + "clientSecret": "Sanitized", + "tenantId": "mock" + }, + "dataSourceCredentialType": "ServicePrincipal", + "dataSourceCredentialName": "credentialI4DTVMIb" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "4f98f2b1-6597-41f8-ae46-2b49cb92859e", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:57 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/ab33bc2b-62bb-494e-bc5c-2b65cc9d100b", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "299", + "x-request-id": "4f98f2b1-6597-41f8-ae46-2b49cb92859e" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/ab33bc2b-62bb-494e-bc5c-2b65cc9d100b", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-8fe5a5beef95284c87eb36ae173e36bf-13702cd697552c49-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "864ae2ea3da7076b674128afe7992acb", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "eed4f392-3184-4783-a1ac-dd08d9d82e03", + "Content-Length": "247", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:57 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "108", + "x-request-id": "eed4f392-3184-4783-a1ac-dd08d9d82e03" + }, + "ResponseBody": { + "dataSourceCredentialId": "ab33bc2b-62bb-494e-bc5c-2b65cc9d100b", + "dataSourceCredentialName": "credentialI4DTVMIb", + "dataSourceCredentialDescription": "", + "dataSourceCredentialType": "ServicePrincipal", + "parameters": { + "clientId": "mock", + "tenantId": "mock" + } + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "241", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-9ea12688dda37a4cb4c93d6e81e60c47-60f6c56ef26a6040-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "276a0dd6f821ff92753ac7cd0caf1029", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "query": "mock" + }, + "dataSourceType": "AzureDataExplorer", + "dataFeedName": "dataFeedNZcWlZ4C", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "d385ca62-5139-4a25-8ee5-3933ee27799a", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:57 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/c5e2c589-b5e8-4d7e-b86b-2188de3c968f", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "428", + "x-request-id": "d385ca62-5139-4a25-8ee5-3933ee27799a" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/c5e2c589-b5e8-4d7e-b86b-2188de3c968f", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-9ea12688dda37a4cb4c93d6e81e60c47-b3d12fb56841d747-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "a9263715396ce119baab5316c2ea5917", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "00bf0f30-33be-4ca7-8a8e-2bbcfbfeaba9", + "Content-Length": "880", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:57 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "177", + "x-request-id": "00bf0f30-33be-4ca7-8a8e-2bbcfbfeaba9" + }, + "ResponseBody": { + "dataFeedId": "c5e2c589-b5e8-4d7e-b86b-2188de3c968f", + "dataFeedName": "dataFeedNZcWlZ4C", + "metrics": [ + { + "metricId": "344f4578-bf10-4db6-9eb5-aae24d096f3a", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataExplorer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:58Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/c5e2c589-b5e8-4d7e-b86b-2188de3c968f", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-e4ff3fdd7401524fa5aaf126e9f4e6e5-6eb30062539f824a-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "99b0125644d36fe5af2839add15dbe26", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "aa9fc120-6127-4de3-8bb7-4e096cf0b1aa", + "Content-Length": "880", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:58 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "166", + "x-request-id": "aa9fc120-6127-4de3-8bb7-4e096cf0b1aa" + }, + "ResponseBody": { + "dataFeedId": "c5e2c589-b5e8-4d7e-b86b-2188de3c968f", + "dataFeedName": "dataFeedNZcWlZ4C", + "metrics": [ + { + "metricId": "344f4578-bf10-4db6-9eb5-aae24d096f3a", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataExplorer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:58Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/c5e2c589-b5e8-4d7e-b86b-2188de3c968f", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "585", + "Content-Type": "application/merge-patch\u002Bjson", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-0dfb364760b3464bb0e2fd97c80d6de8-0da9b06eac639049-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "b416d54be2ac9ccbf4886c76a47b3d8a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "query": "mock" + }, + "dataSourceType": "AzureDataExplorer", + "dataFeedName": "dataFeedNZcWlZ4C", + "dataFeedDescription": "", + "timestampColumn": "", + "dataStartFrom": "2020-08-01T00:00:00Z", + "startOffsetInSeconds": 0, + "maxConcurrency": -1, + "minRetryIntervalInSeconds": -1, + "stopRetryAfterInSeconds": -1, + "needRollup": "NoRollup", + "rollUpMethod": "None", + "fillMissingPointType": "PreviousValue", + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "status": "Active", + "actionLinkTemplate": "", + "authenticationType": "ServicePrincipal", + "credentialId": "ab33bc2b-62bb-494e-bc5c-2b65cc9d100b" + }, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "a57c91bf-7e63-4881-8624-c400ea5b0fcb", + "Content-Length": "945", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:58 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "758", + "x-request-id": "a57c91bf-7e63-4881-8624-c400ea5b0fcb" + }, + "ResponseBody": { + "dataFeedId": "c5e2c589-b5e8-4d7e-b86b-2188de3c968f", + "dataFeedName": "dataFeedNZcWlZ4C", + "metrics": [ + { + "metricId": "344f4578-bf10-4db6-9eb5-aae24d096f3a", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataExplorer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:38:58Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "ServicePrincipal", + "credentialId": "ab33bc2b-62bb-494e-bc5c-2b65cc9d100b" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/c5e2c589-b5e8-4d7e-b86b-2188de3c968f", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-b5aee80e2d8bf141acd7f0149ff13efb-866b6e38b0d2254d-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "fa76b0e076ffd15551b7fa43006b0f5d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "23130537-0622-4e5c-ad6d-ddec76ebb905", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:59 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "306", + "x-request-id": "23130537-0622-4e5c-ad6d-ddec76ebb905" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/ab33bc2b-62bb-494e-bc5c-2b65cc9d100b", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-31b2ef8d71c3374abbebe13633a776cb-798fabb04dcd2846-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "ecca2ceca5d4746a4613a54ad76eca33", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "14e3b1d5-58cb-4326-a50c-31178dc57c96", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:59 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "221", + "x-request-id": "14e3b1d5-58cb-4326-a50c-31178dc57c96" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "966720365" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataExplorerDataFeedWithCredentialAuthentication(ServicePrincipal)Async.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataExplorerDataFeedWithCredentialAuthentication(ServicePrincipal)Async.json new file mode 100644 index 0000000000000..df5ceeefe0afd --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataExplorerDataFeedWithCredentialAuthentication(ServicePrincipal)Async.json @@ -0,0 +1,400 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "173", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-7a4d284f64150b4fb75441549a9671d8-a30e38a1c2dd1548-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "d748a2eb696275828e7149acaac688b0", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "parameters": { + "clientId": "mock", + "clientSecret": "Sanitized", + "tenantId": "mock" + }, + "dataSourceCredentialType": "ServicePrincipal", + "dataSourceCredentialName": "credentialBjQcuaZz" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "1c9be66c-9e33-4f11-91fd-fc7b6dd67f9c", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:40:57 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/36986c27-7a5c-4ede-be27-da69a52d6f62", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "300", + "x-request-id": "1c9be66c-9e33-4f11-91fd-fc7b6dd67f9c" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/36986c27-7a5c-4ede-be27-da69a52d6f62", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-7a4d284f64150b4fb75441549a9671d8-6e06123a995b1a4e-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "17d73b84dca31bd719609d9918f4c9dd", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "86b633a4-a53c-47e9-9740-5c6e9d6177d1", + "Content-Length": "247", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:40:57 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "115", + "x-request-id": "86b633a4-a53c-47e9-9740-5c6e9d6177d1" + }, + "ResponseBody": { + "dataSourceCredentialId": "36986c27-7a5c-4ede-be27-da69a52d6f62", + "dataSourceCredentialName": "credentialBjQcuaZz", + "dataSourceCredentialDescription": "", + "dataSourceCredentialType": "ServicePrincipal", + "parameters": { + "clientId": "mock", + "tenantId": "mock" + } + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "241", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-3f0838451f24974f90b970a6b0de6751-a0be9221e1e8f64e-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "18820bc100cf539ce65ae6b05ff7e10f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "query": "mock" + }, + "dataSourceType": "AzureDataExplorer", + "dataFeedName": "dataFeed8ITGmsAO", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "61b4bf24-1015-4422-8b52-b0c1f94f263e", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:40:58 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/82085014-ad57-47f8-ac58-dfcc5fbf240d", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "440", + "x-request-id": "61b4bf24-1015-4422-8b52-b0c1f94f263e" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/82085014-ad57-47f8-ac58-dfcc5fbf240d", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-3f0838451f24974f90b970a6b0de6751-0b5c377841856343-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "02be2dcae9cb995ca76c5662a014150f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "96b90821-b85d-4a25-b46e-a88d6cdb43ae", + "Content-Length": "880", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:40:58 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "155", + "x-request-id": "96b90821-b85d-4a25-b46e-a88d6cdb43ae" + }, + "ResponseBody": { + "dataFeedId": "82085014-ad57-47f8-ac58-dfcc5fbf240d", + "dataFeedName": "dataFeed8ITGmsAO", + "metrics": [ + { + "metricId": "5b77a855-baf1-4ca5-9c5e-f7455bcf86cc", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataExplorer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:40:58Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/82085014-ad57-47f8-ac58-dfcc5fbf240d", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-30aceb1554f88b4f95ddaadad2e2e052-7585cbfdd67b774b-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "9755a59abe59184bc44ab3be0e197d5e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "03664dc3-87c4-4c82-b60e-7a35bdb435d5", + "Content-Length": "880", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:40:58 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "155", + "x-request-id": "03664dc3-87c4-4c82-b60e-7a35bdb435d5" + }, + "ResponseBody": { + "dataFeedId": "82085014-ad57-47f8-ac58-dfcc5fbf240d", + "dataFeedName": "dataFeed8ITGmsAO", + "metrics": [ + { + "metricId": "5b77a855-baf1-4ca5-9c5e-f7455bcf86cc", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataExplorer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:40:58Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/82085014-ad57-47f8-ac58-dfcc5fbf240d", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "585", + "Content-Type": "application/merge-patch\u002Bjson", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-590aac9b7f338f4587c4421619b5e854-af2131090769ee4c-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "6da915669fb5d866afe87163aa39b2d1", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "query": "mock" + }, + "dataSourceType": "AzureDataExplorer", + "dataFeedName": "dataFeed8ITGmsAO", + "dataFeedDescription": "", + "timestampColumn": "", + "dataStartFrom": "2020-08-01T00:00:00Z", + "startOffsetInSeconds": 0, + "maxConcurrency": -1, + "minRetryIntervalInSeconds": -1, + "stopRetryAfterInSeconds": -1, + "needRollup": "NoRollup", + "rollUpMethod": "None", + "fillMissingPointType": "PreviousValue", + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "status": "Active", + "actionLinkTemplate": "", + "authenticationType": "ServicePrincipal", + "credentialId": "36986c27-7a5c-4ede-be27-da69a52d6f62" + }, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "912c1a2d-bb14-4eaa-8773-59d499108a16", + "Content-Length": "945", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:41:00 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "1026", + "x-request-id": "912c1a2d-bb14-4eaa-8773-59d499108a16" + }, + "ResponseBody": { + "dataFeedId": "82085014-ad57-47f8-ac58-dfcc5fbf240d", + "dataFeedName": "dataFeed8ITGmsAO", + "metrics": [ + { + "metricId": "5b77a855-baf1-4ca5-9c5e-f7455bcf86cc", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataExplorer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:40:58Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "ServicePrincipal", + "credentialId": "36986c27-7a5c-4ede-be27-da69a52d6f62" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/82085014-ad57-47f8-ac58-dfcc5fbf240d", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-a36851dec7cb8d43a5ded2fcf734efd2-855cad733d82614a-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "ba16d6444aa10cb5e1a63d81369e8b8e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "71cb4580-022b-4b66-8198-ce53c08d23a4", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:41:00 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "307", + "x-request-id": "71cb4580-022b-4b66-8198-ce53c08d23a4" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/36986c27-7a5c-4ede-be27-da69a52d6f62", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-e7a30ccdc39d7c4d97eb1c4c41269959-36d9d5613b0d4a46-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "8afcf7efa86bfb593f7de8714de86e8a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "725813fe-7f32-4ecd-ae59-399ec69bbe5f", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:41:01 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "174", + "x-request-id": "725813fe-7f32-4ecd-ae59-399ec69bbe5f" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "1274479816" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataExplorerDataFeedWithCredentialAuthentication(ServicePrincipalInKeyVault).json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataExplorerDataFeedWithCredentialAuthentication(ServicePrincipalInKeyVault).json new file mode 100644 index 0000000000000..0dffb75b95f9c --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataExplorerDataFeedWithCredentialAuthentication(ServicePrincipalInKeyVault).json @@ -0,0 +1,406 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "308", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-0ccd684ebd2d52418be5cd59daf25c1b-a9fe9f781b9d1240-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "d7ba224e35d7dcc67c8ad5b25525bb33", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "parameters": { + "keyVaultEndpoint": "https://mock.com/", + "keyVaultClientId": "mock", + "keyVaultClientSecret": "Sanitized", + "servicePrincipalIdNameInKV": "mock", + "servicePrincipalSecretNameInKV": "mock", + "tenantId": "mock" + }, + "dataSourceCredentialType": "ServicePrincipalInKV", + "dataSourceCredentialName": "credentialevIKzqHr" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "d4fab2bd-b0b8-4300-bc54-fb9739051522", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:59 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/6317e180-0806-4e2e-b4dc-ca3f35397817", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "258", + "x-request-id": "d4fab2bd-b0b8-4300-bc54-fb9739051522" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/6317e180-0806-4e2e-b4dc-ca3f35397817", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-0ccd684ebd2d52418be5cd59daf25c1b-11f741cbf507c047-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "ec9610d8862ea9166e163b8cc75a0c4c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "923f3f98-1208-4783-adf3-34d5efcaf696", + "Content-Length": "374", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:59 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "107", + "x-request-id": "923f3f98-1208-4783-adf3-34d5efcaf696" + }, + "ResponseBody": { + "dataSourceCredentialId": "6317e180-0806-4e2e-b4dc-ca3f35397817", + "dataSourceCredentialName": "credentialevIKzqHr", + "dataSourceCredentialDescription": "", + "dataSourceCredentialType": "ServicePrincipalInKV", + "parameters": { + "servicePrincipalSecretNameInKV": "mock", + "servicePrincipalIdNameInKV": "mock", + "tenantId": "mock", + "keyVaultClientId": "mock", + "keyVaultEndpoint": "https://mock.com/" + } + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "241", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-3bf3d7bc00cfb749b13bb6b4b5cbac17-e2c9ab0e8a774843-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "c1e298478b08e13f915192603bc165c8", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "query": "mock" + }, + "dataSourceType": "AzureDataExplorer", + "dataFeedName": "dataFeedhrbhZtWq", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "c37adbfc-c4fd-49d6-a53f-898ee52a7687", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:00 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/29582c87-7bb6-4aeb-800d-b502807ea237", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "425", + "x-request-id": "c37adbfc-c4fd-49d6-a53f-898ee52a7687" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/29582c87-7bb6-4aeb-800d-b502807ea237", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-3bf3d7bc00cfb749b13bb6b4b5cbac17-4f2ded14b49e9f4e-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "c169100c3afa21157e8912c0174f9d35", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "aeeb86b4-4783-4827-bc6a-e20694d472a1", + "Content-Length": "880", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:00 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "173", + "x-request-id": "aeeb86b4-4783-4827-bc6a-e20694d472a1" + }, + "ResponseBody": { + "dataFeedId": "29582c87-7bb6-4aeb-800d-b502807ea237", + "dataFeedName": "dataFeedhrbhZtWq", + "metrics": [ + { + "metricId": "9751cc4c-9f81-49aa-a863-30f6a09849fb", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataExplorer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:01Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/29582c87-7bb6-4aeb-800d-b502807ea237", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-1e5f9276e15d93408e9932a92afb75c4-2ef05c31292dac48-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "95a40e2e54a3e3a1d659fa75c8ab10de", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "012844f9-e478-4956-8ccc-9864f68a0611", + "Content-Length": "880", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:06 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "5254", + "x-request-id": "012844f9-e478-4956-8ccc-9864f68a0611" + }, + "ResponseBody": { + "dataFeedId": "29582c87-7bb6-4aeb-800d-b502807ea237", + "dataFeedName": "dataFeedhrbhZtWq", + "metrics": [ + { + "metricId": "9751cc4c-9f81-49aa-a863-30f6a09849fb", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataExplorer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:01Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/29582c87-7bb6-4aeb-800d-b502807ea237", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "589", + "Content-Type": "application/merge-patch\u002Bjson", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-099a2a67a898284ab11830bda13e6131-f61448dd9479e345-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "855e452f203a0d8d83c0427f797ec942", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "query": "mock" + }, + "dataSourceType": "AzureDataExplorer", + "dataFeedName": "dataFeedhrbhZtWq", + "dataFeedDescription": "", + "timestampColumn": "", + "dataStartFrom": "2020-08-01T00:00:00Z", + "startOffsetInSeconds": 0, + "maxConcurrency": -1, + "minRetryIntervalInSeconds": -1, + "stopRetryAfterInSeconds": -1, + "needRollup": "NoRollup", + "rollUpMethod": "None", + "fillMissingPointType": "PreviousValue", + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "status": "Active", + "actionLinkTemplate": "", + "authenticationType": "ServicePrincipalInKV", + "credentialId": "6317e180-0806-4e2e-b4dc-ca3f35397817" + }, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "51ac5972-460e-4680-b7b6-a95a81f43488", + "Content-Length": "949", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:07 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "722", + "x-request-id": "51ac5972-460e-4680-b7b6-a95a81f43488" + }, + "ResponseBody": { + "dataFeedId": "29582c87-7bb6-4aeb-800d-b502807ea237", + "dataFeedName": "dataFeedhrbhZtWq", + "metrics": [ + { + "metricId": "9751cc4c-9f81-49aa-a863-30f6a09849fb", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataExplorer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:01Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "ServicePrincipalInKV", + "credentialId": "6317e180-0806-4e2e-b4dc-ca3f35397817" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/29582c87-7bb6-4aeb-800d-b502807ea237", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-0bca4f3c5588dd4b8909151c4947b01a-5e5cb95132f6bf4d-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "2d325db4cf1cb7246f85eba13f9f59d3", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "a237d632-3f25-4a0e-82b2-0d88e201bd42", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:07 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "319", + "x-request-id": "a237d632-3f25-4a0e-82b2-0d88e201bd42" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/6317e180-0806-4e2e-b4dc-ca3f35397817", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-25d2e3043adc9c499a15906c87db0be2-31883c9ddd28d444-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "d291337817f00dfa809712e312216a58", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "417715b4-ff18-4f8f-84b1-610dd2a946b7", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:07 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "190", + "x-request-id": "417715b4-ff18-4f8f-84b1-610dd2a946b7" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "441922360" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataExplorerDataFeedWithCredentialAuthentication(ServicePrincipalInKeyVault)Async.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataExplorerDataFeedWithCredentialAuthentication(ServicePrincipalInKeyVault)Async.json new file mode 100644 index 0000000000000..0d7d883f8cfef --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataExplorerDataFeedWithCredentialAuthentication(ServicePrincipalInKeyVault)Async.json @@ -0,0 +1,406 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "308", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-e9ce3d9136611342808d131a273d4eae-aff59732ea0b1c45-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "844b0edc2f69c4cd3fc0d7ad3a0f4312", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "parameters": { + "keyVaultEndpoint": "https://mock.com/", + "keyVaultClientId": "mock", + "keyVaultClientSecret": "Sanitized", + "servicePrincipalIdNameInKV": "mock", + "servicePrincipalSecretNameInKV": "mock", + "tenantId": "mock" + }, + "dataSourceCredentialType": "ServicePrincipalInKV", + "dataSourceCredentialName": "credentialIaVlRIWT" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "142fd0a5-23e4-4015-96fb-06f73e79339a", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:41:01 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/bf7f489c-e133-48a9-87f2-0c49c0a5b596", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "453", + "x-request-id": "142fd0a5-23e4-4015-96fb-06f73e79339a" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/bf7f489c-e133-48a9-87f2-0c49c0a5b596", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-e9ce3d9136611342808d131a273d4eae-e33980f1a74c594a-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "8f004a0d3358e1a2d4103407452f345e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "9da37bcc-d506-4875-b17e-f5876113ca47", + "Content-Length": "374", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:41:02 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "106", + "x-request-id": "9da37bcc-d506-4875-b17e-f5876113ca47" + }, + "ResponseBody": { + "dataSourceCredentialId": "bf7f489c-e133-48a9-87f2-0c49c0a5b596", + "dataSourceCredentialName": "credentialIaVlRIWT", + "dataSourceCredentialDescription": "", + "dataSourceCredentialType": "ServicePrincipalInKV", + "parameters": { + "servicePrincipalSecretNameInKV": "mock", + "servicePrincipalIdNameInKV": "mock", + "tenantId": "mock", + "keyVaultClientId": "mock", + "keyVaultEndpoint": "https://mock.com/" + } + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "241", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-052d0e666c1b4f4a95e7d8e5c74d3a12-d39a6252be099344-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "14fd0fa1c421ba98d56b59a16766dda8", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "query": "mock" + }, + "dataSourceType": "AzureDataExplorer", + "dataFeedName": "dataFeedk0v1kUrX", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "8b93f2c5-86db-467c-91e3-270658b23384", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:41:02 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/4a8d3cf5-a456-4c1e-97e1-2b8fd6cf2ac7", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "523", + "x-request-id": "8b93f2c5-86db-467c-91e3-270658b23384" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/4a8d3cf5-a456-4c1e-97e1-2b8fd6cf2ac7", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-052d0e666c1b4f4a95e7d8e5c74d3a12-d00674846d788e40-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "58af6a6cc6fb0f7f8c799ff132fc4ff2", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "e31b859a-097e-45d2-ac79-a66a883deeef", + "Content-Length": "880", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:41:02 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "168", + "x-request-id": "e31b859a-097e-45d2-ac79-a66a883deeef" + }, + "ResponseBody": { + "dataFeedId": "4a8d3cf5-a456-4c1e-97e1-2b8fd6cf2ac7", + "dataFeedName": "dataFeedk0v1kUrX", + "metrics": [ + { + "metricId": "4295a856-dadb-4faa-8ee7-0f7262a851dc", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataExplorer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:41:02Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/4a8d3cf5-a456-4c1e-97e1-2b8fd6cf2ac7", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-0070d1f5ffc03e4db54ff7d3fd64c539-4c6d8ad77b0fda42-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "48ed3f8e8d3510c0787932dad592f6a6", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "f8cc5b40-157c-4283-b18b-835fded85840", + "Content-Length": "880", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:41:03 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "156", + "x-request-id": "f8cc5b40-157c-4283-b18b-835fded85840" + }, + "ResponseBody": { + "dataFeedId": "4a8d3cf5-a456-4c1e-97e1-2b8fd6cf2ac7", + "dataFeedName": "dataFeedk0v1kUrX", + "metrics": [ + { + "metricId": "4295a856-dadb-4faa-8ee7-0f7262a851dc", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataExplorer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:41:02Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/4a8d3cf5-a456-4c1e-97e1-2b8fd6cf2ac7", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "589", + "Content-Type": "application/merge-patch\u002Bjson", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-3a5e7970464de046ad3c88f3abaafcd4-7a7f0d13eaae964b-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "58da336b646adbc690ee88a724a687d9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "query": "mock" + }, + "dataSourceType": "AzureDataExplorer", + "dataFeedName": "dataFeedk0v1kUrX", + "dataFeedDescription": "", + "timestampColumn": "", + "dataStartFrom": "2020-08-01T00:00:00Z", + "startOffsetInSeconds": 0, + "maxConcurrency": -1, + "minRetryIntervalInSeconds": -1, + "stopRetryAfterInSeconds": -1, + "needRollup": "NoRollup", + "rollUpMethod": "None", + "fillMissingPointType": "PreviousValue", + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "status": "Active", + "actionLinkTemplate": "", + "authenticationType": "ServicePrincipalInKV", + "credentialId": "bf7f489c-e133-48a9-87f2-0c49c0a5b596" + }, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "9f446c52-7f16-4ecd-bc0d-302201cdb4e1", + "Content-Length": "949", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:41:04 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "1042", + "x-request-id": "9f446c52-7f16-4ecd-bc0d-302201cdb4e1" + }, + "ResponseBody": { + "dataFeedId": "4a8d3cf5-a456-4c1e-97e1-2b8fd6cf2ac7", + "dataFeedName": "dataFeedk0v1kUrX", + "metrics": [ + { + "metricId": "4295a856-dadb-4faa-8ee7-0f7262a851dc", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataExplorer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:41:02Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "ServicePrincipalInKV", + "credentialId": "bf7f489c-e133-48a9-87f2-0c49c0a5b596" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/4a8d3cf5-a456-4c1e-97e1-2b8fd6cf2ac7", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-2e36bf247bf00c49b950da097fcd5177-ce2d5f8495eb854c-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "2713661b9479de73a99fdf8193a439f9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "ce4b3adc-b718-4ce7-a409-e19bd5a1bdc2", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:41:04 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "375", + "x-request-id": "ce4b3adc-b718-4ce7-a409-e19bd5a1bdc2" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/bf7f489c-e133-48a9-87f2-0c49c0a5b596", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-3918b90db137104580ac9a68a23bf9b5-e129641a6d6e1149-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "fe86f982f72129887911b7470419ecd2", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "ee2c6f7a-9867-479c-906e-dc8fa789bc68", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:41:04 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "193", + "x-request-id": "ee2c6f7a-9867-479c-906e-dc8fa789bc68" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "637285136" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataExplorerDataFeedWithEveryMemberAndGetInstance.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataExplorerDataFeedWithEveryMemberAndGetInstance.json index a2bdef078fdb3..3ed1c300697e7 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataExplorerDataFeedWithEveryMemberAndGetInstance.json +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataExplorerDataFeedWithEveryMemberAndGetInstance.json @@ -8,8 +8,8 @@ "Content-Length": "242", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-72e843172499dd4880abf360e2e94504-08d2174a68d2a146-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-2bdaeec76b2fee44924749c74fa30f9e-dedb4664a4199e43-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "bb42a6ff61c1d04c47b502a9f9908d07", "x-ms-return-client-request-id": "true" @@ -31,25 +31,25 @@ }, "StatusCode": 201, "ResponseHeaders": { - "apim-request-id": "fd17d609-6ccf-435d-aa2d-5205651239d8", + "apim-request-id": "01198446-5afa-475c-8e48-abc1e6d051db", "Content-Length": "0", - "Date": "Thu, 03 Jun 2021 21:40:06 GMT", - "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/e063aa8d-4973-42a3-b20f-4e0c98af216a", + "Date": "Sat, 05 Jun 2021 03:30:55 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/bff46635-1969-4bca-8476-287203442b77", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "521", - "x-request-id": "fd17d609-6ccf-435d-aa2d-5205651239d8" + "x-envoy-upstream-service-time": "837", + "x-request-id": "01198446-5afa-475c-8e48-abc1e6d051db" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/e063aa8d-4973-42a3-b20f-4e0c98af216a", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/bff46635-1969-4bca-8476-287203442b77", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-72e843172499dd4880abf360e2e94504-1d95e21bfacf9444-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-2bdaeec76b2fee44924749c74fa30f9e-0c7f852339587347-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "b7c7289856f53e5974f48c02cfe5d9e9", "x-ms-return-client-request-id": "true" @@ -57,21 +57,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "e5462b83-b1ac-4a1e-bc56-5a3c89df101d", + "apim-request-id": "07e8ff0c-52b7-4359-82ba-8f251acceff9", "Content-Length": "881", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:40:06 GMT", + "Date": "Sat, 05 Jun 2021 03:31:00 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "165", - "x-request-id": "e5462b83-b1ac-4a1e-bc56-5a3c89df101d" + "x-envoy-upstream-service-time": "5227", + "x-request-id": "07e8ff0c-52b7-4359-82ba-8f251acceff9" }, "ResponseBody": { - "dataFeedId": "e063aa8d-4973-42a3-b20f-4e0c98af216a", + "dataFeedId": "bff46635-1969-4bca-8476-287203442b77", "dataFeedName": "dataFeedlyX8Vr5E", "metrics": [ { - "metricId": "25ae7a49-899d-4807-a908-bd5a34834589", + "metricId": "3f88c743-4bfe-4f7e-9703-b0e6450ca8f4", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -99,7 +99,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:40:06Z", + "createdTime": "2021-06-05T03:30:56Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -109,13 +109,13 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/e063aa8d-4973-42a3-b20f-4e0c98af216a", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/bff46635-1969-4bca-8476-287203442b77", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-5e3dd8ea92229546a2b10b95e25d2fa6-d3fc6da78b05894d-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-feaebae1a008e743ab4da8f33349cce5-4657edd7c1acc14f-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "5b541f8011c8015fb179311ce068f4b2", "x-ms-return-client-request-id": "true" @@ -123,21 +123,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "4a47e1e4-afff-48c1-9868-1496443ef641", + "apim-request-id": "9d2505b1-473e-4fb3-ab89-5b738b10243e", "Content-Length": "881", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:40:06 GMT", + "Date": "Sat, 05 Jun 2021 03:31:06 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "172", - "x-request-id": "4a47e1e4-afff-48c1-9868-1496443ef641" + "x-envoy-upstream-service-time": "5224", + "x-request-id": "9d2505b1-473e-4fb3-ab89-5b738b10243e" }, "ResponseBody": { - "dataFeedId": "e063aa8d-4973-42a3-b20f-4e0c98af216a", + "dataFeedId": "bff46635-1969-4bca-8476-287203442b77", "dataFeedName": "dataFeedlyX8Vr5E", "metrics": [ { - "metricId": "25ae7a49-899d-4807-a908-bd5a34834589", + "metricId": "3f88c743-4bfe-4f7e-9703-b0e6450ca8f4", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -165,7 +165,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:40:06Z", + "createdTime": "2021-06-05T03:30:56Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -175,15 +175,15 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/e063aa8d-4973-42a3-b20f-4e0c98af216a", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/bff46635-1969-4bca-8476-287203442b77", "RequestMethod": "PATCH", "RequestHeaders": { "Accept": "application/json", - "Content-Length": "635", + "Content-Length": "664", "Content-Type": "application/merge-patch\u002Bjson", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-1b09292f17d0984ba646e0a75aca076f-47678af8528f0b42-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-6517bd210e81d14ea520f9aa1c14fbee-d2d6dfec79cfd84a-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "e1e175c0bce3a8684c0346cdd5490162", "x-ms-return-client-request-id": "true" @@ -213,94 +213,26 @@ "fake@viewer.com" ], "status": "Active", - "actionLinkTemplate": "https://fakeurl.com/%datafeed/%metric" - }, - "StatusCode": 200, - "ResponseHeaders": { - "apim-request-id": "08a9e4c3-7084-4f7c-a8ac-dd42aeca439e", - "Content-Length": "1024", - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:40:08 GMT", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "1061", - "x-request-id": "08a9e4c3-7084-4f7c-a8ac-dd42aeca439e" - }, - "ResponseBody": { - "dataFeedId": "e063aa8d-4973-42a3-b20f-4e0c98af216a", - "dataFeedName": "dataFeedOwA4fUul", - "metrics": [ - { - "metricId": "25ae7a49-899d-4807-a908-bd5a34834589", - "metricName": "cost", - "metricDisplayName": "cost", - "metricDescription": "" - } - ], - "dimension": [], - "dataStartFrom": "2020-09-21T00:00:00Z", - "dataSourceType": "AzureDataExplorer", - "timestampColumn": "updatedTimestampColumn", - "startOffsetInSeconds": 2400, - "maxQueryPerMinute": 30.0, - "granularityName": "Daily", - "needRollup": "NoRollup", - "fillMissingPointType": "NoFilling", - "fillMissingPointValue": 0.0, - "rollUpMethod": "None", - "dataFeedDescription": "This data feed was updated to test the .NET client.", - "stopRetryAfterInSeconds": 1200, - "minRetryIntervalInSeconds": 90, - "maxConcurrency": 6, - "viewMode": "Public", - "admins": [ - "fake@admin.com", - "foo@contoso.com" - ], - "viewers": [ - "fake@viewer.com" - ], - "creator": "foo@contoso.com", - "status": "Active", - "createdTime": "2021-06-03T21:40:06Z", - "isAdmin": true, "actionLinkTemplate": "https://fakeurl.com/%datafeed/%metric", - "dataSourceParameter": { - "query": "query" - }, "authenticationType": "Basic" - } - }, - { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/e063aa8d-4973-42a3-b20f-4e0c98af216a", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-efa6ad3368afb148b7d6c3b727fcc92e-881615cca628eb4e-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-api-key": "Sanitized", - "x-ms-client-request-id": "da2819dc313b873fc9c5067b253d5e0c", - "x-ms-return-client-request-id": "true" }, - "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "f1123a98-1911-4c5f-8f64-836ac3640bad", + "apim-request-id": "e3f148d5-91b2-49df-b056-3f93e22e352c", "Content-Length": "1024", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:40:08 GMT", + "Date": "Sat, 05 Jun 2021 03:31:13 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "164", - "x-request-id": "f1123a98-1911-4c5f-8f64-836ac3640bad" + "x-envoy-upstream-service-time": "5845", + "x-request-id": "e3f148d5-91b2-49df-b056-3f93e22e352c" }, "ResponseBody": { - "dataFeedId": "e063aa8d-4973-42a3-b20f-4e0c98af216a", + "dataFeedId": "bff46635-1969-4bca-8476-287203442b77", "dataFeedName": "dataFeedOwA4fUul", "metrics": [ { - "metricId": "25ae7a49-899d-4807-a908-bd5a34834589", + "metricId": "3f88c743-4bfe-4f7e-9703-b0e6450ca8f4", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -331,7 +263,7 @@ ], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:40:06Z", + "createdTime": "2021-06-05T03:30:56Z", "isAdmin": true, "actionLinkTemplate": "https://fakeurl.com/%datafeed/%metric", "dataSourceParameter": { @@ -341,33 +273,33 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/e063aa8d-4973-42a3-b20f-4e0c98af216a", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/bff46635-1969-4bca-8476-287203442b77", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-3b78a5360d0fd94ca069c10768ac63e3-53e3db6ef28d1646-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-5f200233f2315d49b67491929e5912d4-b544d72ce33dd94f-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", - "x-ms-client-request-id": "5942da00f803c405b7ab0fc4ca912c67", + "x-ms-client-request-id": "da2819dc313b873fc9c5067b253d5e0c", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "apim-request-id": "eb2af2d9-fe24-4192-80bc-04256ed1820c", + "apim-request-id": "b20e359d-fc68-437a-b19f-ddc1a4019baf", "Content-Length": "0", - "Date": "Thu, 03 Jun 2021 21:40:08 GMT", + "Date": "Sat, 05 Jun 2021 03:31:18 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "337", - "x-request-id": "eb2af2d9-fe24-4192-80bc-04256ed1820c" + "x-envoy-upstream-service-time": "5368", + "x-request-id": "b20e359d-fc68-437a-b19f-ddc1a4019baf" }, "ResponseBody": [] } ], "Variables": { - "DateTimeOffsetNow": "2021-06-03T14:40:08.4330418-07:00", + "DateTimeOffsetNow": "2021-06-04T20:31:12.7548560-07:00", "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", "METRICSADVISOR_ENDPOINT_SUFFIX": null, "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataExplorerDataFeedWithEveryMemberAndGetInstanceAsync.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataExplorerDataFeedWithEveryMemberAndGetInstanceAsync.json index 53198aed4b642..7a0c7a3e026b4 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataExplorerDataFeedWithEveryMemberAndGetInstanceAsync.json +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataExplorerDataFeedWithEveryMemberAndGetInstanceAsync.json @@ -8,8 +8,8 @@ "Content-Length": "242", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-2233a5b8399b3f489ac5d275dc949b7b-96a0711f1b6add47-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-2e80418483af244c8eaedaf10668fb4c-2dfdd673e1ad6d49-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "d0fa0538560779237dfa6eee3f178f42", "x-ms-return-client-request-id": "true" @@ -31,25 +31,25 @@ }, "StatusCode": 201, "ResponseHeaders": { - "apim-request-id": "e5cb0aab-04f9-4c46-80bb-d72cdeaea4ce", + "apim-request-id": "3c929e23-9279-471a-b430-a51e30f7db3a", "Content-Length": "0", - "Date": "Thu, 03 Jun 2021 21:41:48 GMT", - "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/75f54a26-bda3-4e46-9bb2-61403d87d1e4", + "Date": "Sat, 05 Jun 2021 03:33:02 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/a3db3649-2619-40ee-a412-6db43530d6bd", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "503", - "x-request-id": "e5cb0aab-04f9-4c46-80bb-d72cdeaea4ce" + "x-envoy-upstream-service-time": "5661", + "x-request-id": "3c929e23-9279-471a-b430-a51e30f7db3a" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/75f54a26-bda3-4e46-9bb2-61403d87d1e4", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/a3db3649-2619-40ee-a412-6db43530d6bd", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-2233a5b8399b3f489ac5d275dc949b7b-5041fa81abbfb34a-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-2e80418483af244c8eaedaf10668fb4c-9d1a63c7201b0941-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "82b85caba0fd6bd9f89afdf736cd17d4", "x-ms-return-client-request-id": "true" @@ -57,21 +57,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "139f540e-bde9-4267-bbd4-dda6dbdfb79f", + "apim-request-id": "cf9edb15-44b3-4ba3-85e9-7c8c21be3434", "Content-Length": "881", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:41:48 GMT", + "Date": "Sat, 05 Jun 2021 03:33:03 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "172", - "x-request-id": "139f540e-bde9-4267-bbd4-dda6dbdfb79f" + "x-envoy-upstream-service-time": "187", + "x-request-id": "cf9edb15-44b3-4ba3-85e9-7c8c21be3434" }, "ResponseBody": { - "dataFeedId": "75f54a26-bda3-4e46-9bb2-61403d87d1e4", + "dataFeedId": "a3db3649-2619-40ee-a412-6db43530d6bd", "dataFeedName": "dataFeedqtqXRYM8", "metrics": [ { - "metricId": "2f32a241-c207-42eb-a84b-f40420fa6cc9", + "metricId": "ba76162b-30fc-45fb-b4cd-9887c06c314a", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -99,7 +99,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:41:48Z", + "createdTime": "2021-06-05T03:33:03Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -109,13 +109,13 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/75f54a26-bda3-4e46-9bb2-61403d87d1e4", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/a3db3649-2619-40ee-a412-6db43530d6bd", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-49909426a464664180ac83a5ee229eac-b29bc9078b410449-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-8cc67099ad14564c931c3f5478ea9094-3bdddab2b7de0d42-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "1396621345368f35cf02576a6654f41d", "x-ms-return-client-request-id": "true" @@ -123,21 +123,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "06acedfd-c9f1-4970-93bb-9ee25cd1a4ac", + "apim-request-id": "8c8bde18-cb50-488f-8a92-db40c6915972", "Content-Length": "881", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:41:48 GMT", + "Date": "Sat, 05 Jun 2021 03:33:03 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "167", - "x-request-id": "06acedfd-c9f1-4970-93bb-9ee25cd1a4ac" + "x-envoy-upstream-service-time": "166", + "x-request-id": "8c8bde18-cb50-488f-8a92-db40c6915972" }, "ResponseBody": { - "dataFeedId": "75f54a26-bda3-4e46-9bb2-61403d87d1e4", + "dataFeedId": "a3db3649-2619-40ee-a412-6db43530d6bd", "dataFeedName": "dataFeedqtqXRYM8", "metrics": [ { - "metricId": "2f32a241-c207-42eb-a84b-f40420fa6cc9", + "metricId": "ba76162b-30fc-45fb-b4cd-9887c06c314a", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -165,7 +165,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:41:48Z", + "createdTime": "2021-06-05T03:33:03Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -175,15 +175,15 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/75f54a26-bda3-4e46-9bb2-61403d87d1e4", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/a3db3649-2619-40ee-a412-6db43530d6bd", "RequestMethod": "PATCH", "RequestHeaders": { "Accept": "application/json", - "Content-Length": "635", + "Content-Length": "664", "Content-Type": "application/merge-patch\u002Bjson", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-d41fc066504edc40937160aac7b7340b-2fcefccd0787db4d-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-7924289df906be4c91c40d09595abbd1-46cff3bd9c9bcf49-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "2da42c57792f97982b8fd86d592b43b0", "x-ms-return-client-request-id": "true" @@ -213,94 +213,26 @@ "fake@viewer.com" ], "status": "Active", - "actionLinkTemplate": "https://fakeurl.com/%datafeed/%metric" - }, - "StatusCode": 200, - "ResponseHeaders": { - "apim-request-id": "cbeeccab-cbd6-47ad-b1f9-29919122081b", - "Content-Length": "1024", - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:41:49 GMT", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "921", - "x-request-id": "cbeeccab-cbd6-47ad-b1f9-29919122081b" - }, - "ResponseBody": { - "dataFeedId": "75f54a26-bda3-4e46-9bb2-61403d87d1e4", - "dataFeedName": "dataFeedCBL3dSPT", - "metrics": [ - { - "metricId": "2f32a241-c207-42eb-a84b-f40420fa6cc9", - "metricName": "cost", - "metricDisplayName": "cost", - "metricDescription": "" - } - ], - "dimension": [], - "dataStartFrom": "2020-09-21T00:00:00Z", - "dataSourceType": "AzureDataExplorer", - "timestampColumn": "updatedTimestampColumn", - "startOffsetInSeconds": 2400, - "maxQueryPerMinute": 30.0, - "granularityName": "Daily", - "needRollup": "NoRollup", - "fillMissingPointType": "NoFilling", - "fillMissingPointValue": 0.0, - "rollUpMethod": "None", - "dataFeedDescription": "This data feed was updated to test the .NET client.", - "stopRetryAfterInSeconds": 1200, - "minRetryIntervalInSeconds": 90, - "maxConcurrency": 6, - "viewMode": "Public", - "admins": [ - "fake@admin.com", - "foo@contoso.com" - ], - "viewers": [ - "fake@viewer.com" - ], - "creator": "foo@contoso.com", - "status": "Active", - "createdTime": "2021-06-03T21:41:48Z", - "isAdmin": true, "actionLinkTemplate": "https://fakeurl.com/%datafeed/%metric", - "dataSourceParameter": { - "query": "query" - }, "authenticationType": "Basic" - } - }, - { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/75f54a26-bda3-4e46-9bb2-61403d87d1e4", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-5abca4338100e74cb3aba7f29d16fe78-d61f02b611aa7243-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-api-key": "Sanitized", - "x-ms-client-request-id": "dcda9ae27c80650b2728b3fa486f04a4", - "x-ms-return-client-request-id": "true" }, - "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "47db9abe-3964-49b3-9206-1470e2ff392c", + "apim-request-id": "b1b0b7eb-492f-4a85-992c-6dc68b982d1b", "Content-Length": "1024", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:41:49 GMT", + "Date": "Sat, 05 Jun 2021 03:33:04 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "164", - "x-request-id": "47db9abe-3964-49b3-9206-1470e2ff392c" + "x-envoy-upstream-service-time": "987", + "x-request-id": "b1b0b7eb-492f-4a85-992c-6dc68b982d1b" }, "ResponseBody": { - "dataFeedId": "75f54a26-bda3-4e46-9bb2-61403d87d1e4", + "dataFeedId": "a3db3649-2619-40ee-a412-6db43530d6bd", "dataFeedName": "dataFeedCBL3dSPT", "metrics": [ { - "metricId": "2f32a241-c207-42eb-a84b-f40420fa6cc9", + "metricId": "ba76162b-30fc-45fb-b4cd-9887c06c314a", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -331,7 +263,7 @@ ], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:41:48Z", + "createdTime": "2021-06-05T03:33:03Z", "isAdmin": true, "actionLinkTemplate": "https://fakeurl.com/%datafeed/%metric", "dataSourceParameter": { @@ -341,33 +273,33 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/75f54a26-bda3-4e46-9bb2-61403d87d1e4", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/a3db3649-2619-40ee-a412-6db43530d6bd", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-a552f3c815b5984ebb9bce14b8ddbcb3-c8082d35c4f93e42-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-16e3246f2bfe7e44b06689593b5453fc-5d0a8504e97fe04c-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", - "x-ms-client-request-id": "09a0dfa5ea2899a4c9fee8a76dc836a4", + "x-ms-client-request-id": "dcda9ae27c80650b2728b3fa486f04a4", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "apim-request-id": "90457313-58ec-4e0d-9e57-2d29c8f6491a", + "apim-request-id": "cb2bad48-a512-4b88-8a97-4f58f505fece", "Content-Length": "0", - "Date": "Thu, 03 Jun 2021 21:41:50 GMT", + "Date": "Sat, 05 Jun 2021 03:33:04 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "319", - "x-request-id": "90457313-58ec-4e0d-9e57-2d29c8f6491a" + "x-envoy-upstream-service-time": "355", + "x-request-id": "cb2bad48-a512-4b88-8a97-4f58f505fece" }, "ResponseBody": [] } ], "Variables": { - "DateTimeOffsetNow": "2021-06-03T14:41:50.2066899-07:00", + "DateTimeOffsetNow": "2021-06-04T20:33:04.0062076-07:00", "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", "METRICSADVISOR_ENDPOINT_SUFFIX": null, "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataExplorerDataFeedWithMinimumSetupAndGetInstance.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataExplorerDataFeedWithMinimumSetupAndGetInstance.json index 849738753b12d..54651a4996b59 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataExplorerDataFeedWithMinimumSetupAndGetInstance.json +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataExplorerDataFeedWithMinimumSetupAndGetInstance.json @@ -8,8 +8,8 @@ "Content-Length": "242", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-2ed16f5bcb8e1741b6ab0c0cf961b5ed-10db51511921a645-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-1e35c7ead5ee3e498d34595f6227a0d4-f91d76745dbda348-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "a0dd92e75fba1fc38e2c3546eee3b13e", "x-ms-return-client-request-id": "true" @@ -31,25 +31,25 @@ }, "StatusCode": 201, "ResponseHeaders": { - "apim-request-id": "f1f8fb24-7e57-4211-9a02-3eac9d29c7fa", + "apim-request-id": "d1b2eccb-ade3-41ff-b566-16464bfb4b93", "Content-Length": "0", - "Date": "Thu, 03 Jun 2021 21:40:09 GMT", - "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/3975c2ce-9f93-404b-bd48-225a81c3b2ce", + "Date": "Sat, 05 Jun 2021 03:31:19 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/d3662f90-f34b-4bc9-a138-caa8280e3fe4", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "627", - "x-request-id": "f1f8fb24-7e57-4211-9a02-3eac9d29c7fa" + "x-envoy-upstream-service-time": "678", + "x-request-id": "d1b2eccb-ade3-41ff-b566-16464bfb4b93" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/3975c2ce-9f93-404b-bd48-225a81c3b2ce", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/d3662f90-f34b-4bc9-a138-caa8280e3fe4", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-2ed16f5bcb8e1741b6ab0c0cf961b5ed-e1771d409f4fcb41-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-1e35c7ead5ee3e498d34595f6227a0d4-06db3988e97de741-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "8f983f325c579a28501c43527918f4cb", "x-ms-return-client-request-id": "true" @@ -57,21 +57,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "65c34ff6-b6f8-4f95-bb93-5c4b0d32c2ef", + "apim-request-id": "068de200-a15c-4631-968a-85713f97dfdc", "Content-Length": "881", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:40:09 GMT", + "Date": "Sat, 05 Jun 2021 03:31:19 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "172", - "x-request-id": "65c34ff6-b6f8-4f95-bb93-5c4b0d32c2ef" + "x-envoy-upstream-service-time": "304", + "x-request-id": "068de200-a15c-4631-968a-85713f97dfdc" }, "ResponseBody": { - "dataFeedId": "3975c2ce-9f93-404b-bd48-225a81c3b2ce", + "dataFeedId": "d3662f90-f34b-4bc9-a138-caa8280e3fe4", "dataFeedName": "dataFeed2YQEJy4o", "metrics": [ { - "metricId": "8d2e4b1a-ec80-4118-8205-d62ec86ad2b7", + "metricId": "d9af1f89-5b16-410d-899d-533c7b8f1d75", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -99,7 +99,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:40:09Z", + "createdTime": "2021-06-05T03:31:19Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -109,13 +109,13 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/3975c2ce-9f93-404b-bd48-225a81c3b2ce", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/d3662f90-f34b-4bc9-a138-caa8280e3fe4", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-7de607860b34a847a667cda59afa1078-0a89edc659d8674a-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-1b1cc5d0e6a7214abc944bdaefe1d336-13fe1e6eacc78d4a-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "530c1391f175805c426c2ebff6d4c4f5", "x-ms-return-client-request-id": "true" @@ -123,21 +123,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "52ba0816-df9d-402e-a383-a2d89f9256dc", + "apim-request-id": "5f9cf8f9-833f-447e-8347-20d554d9768d", "Content-Length": "881", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:40:09 GMT", + "Date": "Sat, 05 Jun 2021 03:31:20 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "184", - "x-request-id": "52ba0816-df9d-402e-a383-a2d89f9256dc" + "x-envoy-upstream-service-time": "283", + "x-request-id": "5f9cf8f9-833f-447e-8347-20d554d9768d" }, "ResponseBody": { - "dataFeedId": "3975c2ce-9f93-404b-bd48-225a81c3b2ce", + "dataFeedId": "d3662f90-f34b-4bc9-a138-caa8280e3fe4", "dataFeedName": "dataFeed2YQEJy4o", "metrics": [ { - "metricId": "8d2e4b1a-ec80-4118-8205-d62ec86ad2b7", + "metricId": "d9af1f89-5b16-410d-899d-533c7b8f1d75", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -165,7 +165,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:40:09Z", + "createdTime": "2021-06-05T03:31:19Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -175,15 +175,15 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/3975c2ce-9f93-404b-bd48-225a81c3b2ce", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/d3662f90-f34b-4bc9-a138-caa8280e3fe4", "RequestMethod": "PATCH", "RequestHeaders": { "Accept": "application/json", - "Content-Length": "543", + "Content-Length": "572", "Content-Type": "application/merge-patch\u002Bjson", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-f6d394a6f3cb33458b77b3fb64c7df99-591973f74c965d4d-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-8a61e37a178bcf4f837560c2b63f965e-a86082f7efed604d-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "c3d99495c9808a096a434f9e1b70a675", "x-ms-return-client-request-id": "true" @@ -210,91 +210,26 @@ ], "viewers": [], "status": "Active", - "actionLinkTemplate": "" - }, - "StatusCode": 200, - "ResponseHeaders": { - "apim-request-id": "b44518f4-55ea-409a-aeb2-6743b6c41784", - "Content-Length": "932", - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:40:11 GMT", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "1445", - "x-request-id": "b44518f4-55ea-409a-aeb2-6743b6c41784" - }, - "ResponseBody": { - "dataFeedId": "3975c2ce-9f93-404b-bd48-225a81c3b2ce", - "dataFeedName": "dataFeed2YQEJy4o", - "metrics": [ - { - "metricId": "8d2e4b1a-ec80-4118-8205-d62ec86ad2b7", - "metricName": "cost", - "metricDisplayName": "cost", - "metricDescription": "" - } - ], - "dimension": [], - "dataStartFrom": "2020-08-01T00:00:00Z", - "dataSourceType": "AzureDataExplorer", - "timestampColumn": "", - "startOffsetInSeconds": 0, - "maxQueryPerMinute": 30.0, - "granularityName": "Daily", - "needRollup": "NoRollup", - "fillMissingPointType": "PreviousValue", - "fillMissingPointValue": 0.0, - "rollUpMethod": "None", - "dataFeedDescription": "This data feed was created to test the .NET client.", - "stopRetryAfterInSeconds": -1, - "minRetryIntervalInSeconds": -1, - "maxConcurrency": -1, - "viewMode": "Private", - "admins": [ - "foo@contoso.com" - ], - "viewers": [], - "creator": "foo@contoso.com", - "status": "Active", - "createdTime": "2021-06-03T21:40:09Z", - "isAdmin": true, "actionLinkTemplate": "", - "dataSourceParameter": { - "query": "query" - }, "authenticationType": "Basic" - } - }, - { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/3975c2ce-9f93-404b-bd48-225a81c3b2ce", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-8f6a37618b660542b0dd6bdd81d4650a-85845402ccf31d47-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-api-key": "Sanitized", - "x-ms-client-request-id": "dbb46a385ed741c8e3184cea2e68a37c", - "x-ms-return-client-request-id": "true" }, - "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "fbe492b8-33ab-4c8b-bc01-5b78a0551255", + "apim-request-id": "2a5b940b-756e-4d04-8ead-cbb98ef224bc", "Content-Length": "932", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:40:11 GMT", + "Date": "Sat, 05 Jun 2021 03:31:25 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "158", - "x-request-id": "fbe492b8-33ab-4c8b-bc01-5b78a0551255" + "x-envoy-upstream-service-time": "5784", + "x-request-id": "2a5b940b-756e-4d04-8ead-cbb98ef224bc" }, "ResponseBody": { - "dataFeedId": "3975c2ce-9f93-404b-bd48-225a81c3b2ce", + "dataFeedId": "d3662f90-f34b-4bc9-a138-caa8280e3fe4", "dataFeedName": "dataFeed2YQEJy4o", "metrics": [ { - "metricId": "8d2e4b1a-ec80-4118-8205-d62ec86ad2b7", + "metricId": "d9af1f89-5b16-410d-899d-533c7b8f1d75", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -322,7 +257,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:40:09Z", + "createdTime": "2021-06-05T03:31:19Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -332,33 +267,33 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/3975c2ce-9f93-404b-bd48-225a81c3b2ce", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/d3662f90-f34b-4bc9-a138-caa8280e3fe4", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-275f905091f2d54c92b237a2dd204062-64810f66495e1a43-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-e2ae7a5b8dcbed48813f6f74cddb3b6c-e66afec200213442-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", - "x-ms-client-request-id": "e5bd4e57303fc74b0981e932a1bd64d1", + "x-ms-client-request-id": "dbb46a385ed741c8e3184cea2e68a37c", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "apim-request-id": "d53d7b55-c57a-486d-97f7-e73a97edb2f9", + "apim-request-id": "9628acd0-1e30-41d6-8921-534483a4dd8a", "Content-Length": "0", - "Date": "Thu, 03 Jun 2021 21:40:12 GMT", + "Date": "Sat, 05 Jun 2021 03:31:26 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "397", - "x-request-id": "d53d7b55-c57a-486d-97f7-e73a97edb2f9" + "x-envoy-upstream-service-time": "424", + "x-request-id": "9628acd0-1e30-41d6-8921-534483a4dd8a" }, "ResponseBody": [] } ], "Variables": { - "DateTimeOffsetNow": "2021-06-03T14:40:11.6689998-07:00", + "DateTimeOffsetNow": "2021-06-04T20:31:25.4274775-07:00", "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", "METRICSADVISOR_ENDPOINT_SUFFIX": null, "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataExplorerDataFeedWithMinimumSetupAndGetInstanceAsync.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataExplorerDataFeedWithMinimumSetupAndGetInstanceAsync.json index 5a692678bb41d..d501479233e1e 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataExplorerDataFeedWithMinimumSetupAndGetInstanceAsync.json +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataExplorerDataFeedWithMinimumSetupAndGetInstanceAsync.json @@ -8,8 +8,8 @@ "Content-Length": "242", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-c62e74822415544db4307bad45471d24-8ab924bff90b7d41-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-bf3068696f760f49b9d0ea9a924ff62b-ff093c50d1d6ea45-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "a4dc4ddc7bf6bbb9816eb4531c54ca33", "x-ms-return-client-request-id": "true" @@ -31,25 +31,25 @@ }, "StatusCode": 201, "ResponseHeaders": { - "apim-request-id": "186f62a2-cef0-4d3e-8627-9020c15510ae", + "apim-request-id": "fabd9553-dfda-46d1-9864-fc75c8495761", "Content-Length": "0", - "Date": "Thu, 03 Jun 2021 21:41:50 GMT", - "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/e3507308-16a1-4b8c-b9e8-7e25a770c017", + "Date": "Sat, 05 Jun 2021 03:33:10 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/4838879d-3b97-407c-b195-9d30345c4886", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "550", - "x-request-id": "186f62a2-cef0-4d3e-8627-9020c15510ae" + "x-envoy-upstream-service-time": "5693", + "x-request-id": "fabd9553-dfda-46d1-9864-fc75c8495761" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/e3507308-16a1-4b8c-b9e8-7e25a770c017", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/4838879d-3b97-407c-b195-9d30345c4886", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-c62e74822415544db4307bad45471d24-2f265e366f1e114c-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-bf3068696f760f49b9d0ea9a924ff62b-b930b5875edf8143-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "7d851f44e07caac650558fcc339f4064", "x-ms-return-client-request-id": "true" @@ -57,21 +57,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "6b390446-7074-4b38-b343-42965dcf9401", + "apim-request-id": "2b08f343-2603-45df-8b50-c4ae1f0695b3", "Content-Length": "881", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:41:51 GMT", + "Date": "Sat, 05 Jun 2021 03:33:15 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "177", - "x-request-id": "6b390446-7074-4b38-b343-42965dcf9401" + "x-envoy-upstream-service-time": "5189", + "x-request-id": "2b08f343-2603-45df-8b50-c4ae1f0695b3" }, "ResponseBody": { - "dataFeedId": "e3507308-16a1-4b8c-b9e8-7e25a770c017", + "dataFeedId": "4838879d-3b97-407c-b195-9d30345c4886", "dataFeedName": "dataFeedMAk4pq4J", "metrics": [ { - "metricId": "ab46b974-40b5-4703-8630-ad18094d251c", + "metricId": "f6b4f009-582c-412b-9739-d52448ea091a", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -99,7 +99,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:41:51Z", + "createdTime": "2021-06-05T03:33:11Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -109,13 +109,13 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/e3507308-16a1-4b8c-b9e8-7e25a770c017", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/4838879d-3b97-407c-b195-9d30345c4886", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-4bb80512e9f42341834ce4f5c083cb9c-e1dec26eb8b05445-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-f8a79d59f0c9914ab589a3e1aba20c74-d35ce72ddba8ba49-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "13d861048d7e9601e2c6d5245fc94a24", "x-ms-return-client-request-id": "true" @@ -123,21 +123,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "1f7daef2-f75b-4663-be99-4a3640df2928", + "apim-request-id": "4748830d-b4cb-4fda-b960-2f55f8cddcfa", "Content-Length": "881", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:41:51 GMT", + "Date": "Sat, 05 Jun 2021 03:33:15 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "180", - "x-request-id": "1f7daef2-f75b-4663-be99-4a3640df2928" + "x-envoy-upstream-service-time": "212", + "x-request-id": "4748830d-b4cb-4fda-b960-2f55f8cddcfa" }, "ResponseBody": { - "dataFeedId": "e3507308-16a1-4b8c-b9e8-7e25a770c017", + "dataFeedId": "4838879d-3b97-407c-b195-9d30345c4886", "dataFeedName": "dataFeedMAk4pq4J", "metrics": [ { - "metricId": "ab46b974-40b5-4703-8630-ad18094d251c", + "metricId": "f6b4f009-582c-412b-9739-d52448ea091a", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -165,7 +165,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:41:51Z", + "createdTime": "2021-06-05T03:33:11Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -175,15 +175,15 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/e3507308-16a1-4b8c-b9e8-7e25a770c017", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/4838879d-3b97-407c-b195-9d30345c4886", "RequestMethod": "PATCH", "RequestHeaders": { "Accept": "application/json", - "Content-Length": "543", + "Content-Length": "572", "Content-Type": "application/merge-patch\u002Bjson", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-26ecb901fe9e024c892924e6966e2807-aa0f79fa5c725347-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-efc5d8849d40624884c4e0195106bf98-745f4a868f0e664f-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "f1bc269c6ba1fb58863253a0ecec88e1", "x-ms-return-client-request-id": "true" @@ -210,91 +210,26 @@ ], "viewers": [], "status": "Active", - "actionLinkTemplate": "" - }, - "StatusCode": 200, - "ResponseHeaders": { - "apim-request-id": "99226976-096c-47fa-be0d-b77c4daa635e", - "Content-Length": "932", - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:41:52 GMT", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "934", - "x-request-id": "99226976-096c-47fa-be0d-b77c4daa635e" - }, - "ResponseBody": { - "dataFeedId": "e3507308-16a1-4b8c-b9e8-7e25a770c017", - "dataFeedName": "dataFeedMAk4pq4J", - "metrics": [ - { - "metricId": "ab46b974-40b5-4703-8630-ad18094d251c", - "metricName": "cost", - "metricDisplayName": "cost", - "metricDescription": "" - } - ], - "dimension": [], - "dataStartFrom": "2020-08-01T00:00:00Z", - "dataSourceType": "AzureDataExplorer", - "timestampColumn": "", - "startOffsetInSeconds": 0, - "maxQueryPerMinute": 30.0, - "granularityName": "Daily", - "needRollup": "NoRollup", - "fillMissingPointType": "PreviousValue", - "fillMissingPointValue": 0.0, - "rollUpMethod": "None", - "dataFeedDescription": "This data feed was created to test the .NET client.", - "stopRetryAfterInSeconds": -1, - "minRetryIntervalInSeconds": -1, - "maxConcurrency": -1, - "viewMode": "Private", - "admins": [ - "foo@contoso.com" - ], - "viewers": [], - "creator": "foo@contoso.com", - "status": "Active", - "createdTime": "2021-06-03T21:41:51Z", - "isAdmin": true, "actionLinkTemplate": "", - "dataSourceParameter": { - "query": "query" - }, "authenticationType": "Basic" - } - }, - { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/e3507308-16a1-4b8c-b9e8-7e25a770c017", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-7a4032e6f8de4c4b9c1feb7c45aad712-a43c9a4084735b4e-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-api-key": "Sanitized", - "x-ms-client-request-id": "ba4f4f2eb67cb6b51eef9ab50ba24b86", - "x-ms-return-client-request-id": "true" }, - "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "91992d01-6e7b-46f5-876b-328429c12198", + "apim-request-id": "fd4bc4d6-6465-4edf-9e2a-44c1439cc9fe", "Content-Length": "932", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:41:52 GMT", + "Date": "Sat, 05 Jun 2021 03:33:16 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "166", - "x-request-id": "91992d01-6e7b-46f5-876b-328429c12198" + "x-envoy-upstream-service-time": "954", + "x-request-id": "fd4bc4d6-6465-4edf-9e2a-44c1439cc9fe" }, "ResponseBody": { - "dataFeedId": "e3507308-16a1-4b8c-b9e8-7e25a770c017", + "dataFeedId": "4838879d-3b97-407c-b195-9d30345c4886", "dataFeedName": "dataFeedMAk4pq4J", "metrics": [ { - "metricId": "ab46b974-40b5-4703-8630-ad18094d251c", + "metricId": "f6b4f009-582c-412b-9739-d52448ea091a", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -322,7 +257,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:41:51Z", + "createdTime": "2021-06-05T03:33:11Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -332,33 +267,33 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/e3507308-16a1-4b8c-b9e8-7e25a770c017", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/4838879d-3b97-407c-b195-9d30345c4886", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-cdbb875e38b64f428089496774a92fb9-f729713d94be564b-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-7587bdb5b6d2f64a9f50f4a6487cd5af-6850f1b56f252b40-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", - "x-ms-client-request-id": "0d2f6a0b4fe298c209dc8c4c3a61a9f6", + "x-ms-client-request-id": "ba4f4f2eb67cb6b51eef9ab50ba24b86", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "apim-request-id": "754f2b14-5820-4770-af73-79073e3f22b5", + "apim-request-id": "70c25d13-9c87-42fd-9a3c-a073f14e7d59", "Content-Length": "0", - "Date": "Thu, 03 Jun 2021 21:41:52 GMT", + "Date": "Sat, 05 Jun 2021 03:33:17 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "309", - "x-request-id": "754f2b14-5820-4770-af73-79073e3f22b5" + "x-envoy-upstream-service-time": "363", + "x-request-id": "70c25d13-9c87-42fd-9a3c-a073f14e7d59" }, "ResponseBody": [] } ], "Variables": { - "DateTimeOffsetNow": "2021-06-03T14:41:52.8804848-07:00", + "DateTimeOffsetNow": "2021-06-04T20:33:16.9157355-07:00", "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", "METRICSADVISOR_ENDPOINT_SUFFIX": null, "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataLakeStorageGen2DataFeedWithAuthentication.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataLakeStorageGen2DataFeedWithAuthentication.json new file mode 100644 index 0000000000000..1b8386560897b --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataLakeStorageGen2DataFeedWithAuthentication.json @@ -0,0 +1,317 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "321", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-640a6d8d055f3e41adfe08fe915faa7c-b93a3e877e89c74c-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "a5d1c4ecf059832c9309aead3e4e60e9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "accountName": "mock", + "accountKey": "Sanitized", + "fileSystemName": "mock", + "directoryTemplate": "mock", + "fileTemplate": "mock" + }, + "dataSourceType": "AzureDataLakeStorageGen2", + "dataFeedName": "dataFeedepRWizMF", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "8eba0245-661b-4e82-92fa-1e8e253df1fc", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:37:50 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/2438d9a9-1bdf-4fe8-ad5c-1d416e6b3f49", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "588", + "x-request-id": "8eba0245-661b-4e82-92fa-1e8e253df1fc" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/2438d9a9-1bdf-4fe8-ad5c-1d416e6b3f49", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-640a6d8d055f3e41adfe08fe915faa7c-0596c19c5e19c94d-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "6adcf3fda6bea78cb294c42bbf6b9c50", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "715f9615-2074-464b-8093-338449292d3a", + "Content-Length": "966", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:37:55 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "5187", + "x-request-id": "715f9615-2074-464b-8093-338449292d3a" + }, + "ResponseBody": { + "dataFeedId": "2438d9a9-1bdf-4fe8-ad5c-1d416e6b3f49", + "dataFeedName": "dataFeedepRWizMF", + "metrics": [ + { + "metricId": "002ab15f-e0f5-47bc-b159-3adf9d1ef81c", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataLakeStorageGen2", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:37:51Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "fileTemplate": "mock", + "accountName": "mock", + "directoryTemplate": "mock", + "fileSystemName": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/2438d9a9-1bdf-4fe8-ad5c-1d416e6b3f49", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-26bfec15210ae04c9a0c3ecbd6ae0165-b01523ad18757644-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "1a56310739d67fd44da0a938d26be50e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "89de4aa5-0bdc-44db-82eb-a8de895b92ce", + "Content-Length": "966", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:00 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "5186", + "x-request-id": "89de4aa5-0bdc-44db-82eb-a8de895b92ce" + }, + "ResponseBody": { + "dataFeedId": "2438d9a9-1bdf-4fe8-ad5c-1d416e6b3f49", + "dataFeedName": "dataFeedepRWizMF", + "metrics": [ + { + "metricId": "002ab15f-e0f5-47bc-b159-3adf9d1ef81c", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataLakeStorageGen2", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:37:51Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "fileTemplate": "mock", + "accountName": "mock", + "directoryTemplate": "mock", + "fileSystemName": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/2438d9a9-1bdf-4fe8-ad5c-1d416e6b3f49", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "606", + "Content-Type": "application/merge-patch\u002Bjson", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-a5a2c205f887e248874cf16a20ee54bf-ddb1167391113846-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "d84aa6e1c6ac463b3729f3c52c01c328", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "accountName": "mock", + "fileSystemName": "mock", + "directoryTemplate": "mock", + "fileTemplate": "mock" + }, + "dataSourceType": "AzureDataLakeStorageGen2", + "dataFeedName": "dataFeedepRWizMF", + "dataFeedDescription": "", + "timestampColumn": "", + "dataStartFrom": "2020-08-01T00:00:00Z", + "startOffsetInSeconds": 0, + "maxConcurrency": -1, + "minRetryIntervalInSeconds": -1, + "stopRetryAfterInSeconds": -1, + "needRollup": "NoRollup", + "rollUpMethod": "None", + "fillMissingPointType": "PreviousValue", + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "status": "Active", + "actionLinkTemplate": "", + "authenticationType": "Basic" + }, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "b96428a7-d70d-4e8e-9032-841b0a0dd80b", + "Content-Length": "966", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:38:01 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "812", + "x-request-id": "b96428a7-d70d-4e8e-9032-841b0a0dd80b" + }, + "ResponseBody": { + "dataFeedId": "2438d9a9-1bdf-4fe8-ad5c-1d416e6b3f49", + "dataFeedName": "dataFeedepRWizMF", + "metrics": [ + { + "metricId": "002ab15f-e0f5-47bc-b159-3adf9d1ef81c", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataLakeStorageGen2", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:37:51Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "fileTemplate": "mock", + "accountName": "mock", + "directoryTemplate": "mock", + "fileSystemName": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/2438d9a9-1bdf-4fe8-ad5c-1d416e6b3f49", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-11238e6b3127be429bd57420ae5b4ab1-301fb66e8f1ef24d-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "0da65d6d45f8c3121e5d1d1efd54d547", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "cc5bdb94-0909-4660-9412-c14fdec65c63", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:38:01 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "324", + "x-request-id": "cc5bdb94-0909-4660-9412-c14fdec65c63" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "797684577" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataLakeStorageGen2DataFeedWithAuthenticationAsync.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataLakeStorageGen2DataFeedWithAuthenticationAsync.json new file mode 100644 index 0000000000000..aea3cd052fa7f --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataLakeStorageGen2DataFeedWithAuthenticationAsync.json @@ -0,0 +1,317 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "321", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-ec39e16f1bffd34ea9ee3ea481dd61b9-4b897449f4a9134e-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "d1ce0408334d7f51ed54160908e0a0b5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "accountName": "mock", + "accountKey": "Sanitized", + "fileSystemName": "mock", + "directoryTemplate": "mock", + "fileTemplate": "mock" + }, + "dataSourceType": "AzureDataLakeStorageGen2", + "dataFeedName": "dataFeedKeFpIWFJ", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "0c7192ca-083b-409c-b918-4b0933d3e148", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:37 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/7957d6cf-4c95-41bd-9ec0-cc37dbf00c91", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "571", + "x-request-id": "0c7192ca-083b-409c-b918-4b0933d3e148" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/7957d6cf-4c95-41bd-9ec0-cc37dbf00c91", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-ec39e16f1bffd34ea9ee3ea481dd61b9-3d5536b23dfb4343-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "4694540512cab6be51153d9ae2c34ae4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "e22bddbe-5a70-421d-a87e-35203ae9ed86", + "Content-Length": "966", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:37 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "180", + "x-request-id": "e22bddbe-5a70-421d-a87e-35203ae9ed86" + }, + "ResponseBody": { + "dataFeedId": "7957d6cf-4c95-41bd-9ec0-cc37dbf00c91", + "dataFeedName": "dataFeedKeFpIWFJ", + "metrics": [ + { + "metricId": "30230a43-947a-47b3-8f6a-9d5ba23c2592", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataLakeStorageGen2", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:37Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "fileTemplate": "mock", + "accountName": "mock", + "directoryTemplate": "mock", + "fileSystemName": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/7957d6cf-4c95-41bd-9ec0-cc37dbf00c91", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-41af4580ae97ac45a86d172d3a8296ba-a5caa643d622594f-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "2d1df67f13d81e9543f8f8d5d8636a44", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "a784b2dd-50f3-41b2-926d-6781e91423c8", + "Content-Length": "966", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:37 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "182", + "x-request-id": "a784b2dd-50f3-41b2-926d-6781e91423c8" + }, + "ResponseBody": { + "dataFeedId": "7957d6cf-4c95-41bd-9ec0-cc37dbf00c91", + "dataFeedName": "dataFeedKeFpIWFJ", + "metrics": [ + { + "metricId": "30230a43-947a-47b3-8f6a-9d5ba23c2592", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataLakeStorageGen2", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:37Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "fileTemplate": "mock", + "accountName": "mock", + "directoryTemplate": "mock", + "fileSystemName": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/7957d6cf-4c95-41bd-9ec0-cc37dbf00c91", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "606", + "Content-Type": "application/merge-patch\u002Bjson", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-45985611719409409c82f9cecdca32fc-17a63f3f2d508643-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "c5446190f799f66746178038f5b79d29", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "accountName": "mock", + "fileSystemName": "mock", + "directoryTemplate": "mock", + "fileTemplate": "mock" + }, + "dataSourceType": "AzureDataLakeStorageGen2", + "dataFeedName": "dataFeedKeFpIWFJ", + "dataFeedDescription": "", + "timestampColumn": "", + "dataStartFrom": "2020-08-01T00:00:00Z", + "startOffsetInSeconds": 0, + "maxConcurrency": -1, + "minRetryIntervalInSeconds": -1, + "stopRetryAfterInSeconds": -1, + "needRollup": "NoRollup", + "rollUpMethod": "None", + "fillMissingPointType": "PreviousValue", + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "status": "Active", + "actionLinkTemplate": "", + "authenticationType": "Basic" + }, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "da4d8df0-d041-4cd3-879c-511129ea9826", + "Content-Length": "966", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:38 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "983", + "x-request-id": "da4d8df0-d041-4cd3-879c-511129ea9826" + }, + "ResponseBody": { + "dataFeedId": "7957d6cf-4c95-41bd-9ec0-cc37dbf00c91", + "dataFeedName": "dataFeedKeFpIWFJ", + "metrics": [ + { + "metricId": "30230a43-947a-47b3-8f6a-9d5ba23c2592", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataLakeStorageGen2", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:37Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "fileTemplate": "mock", + "accountName": "mock", + "directoryTemplate": "mock", + "fileSystemName": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/7957d6cf-4c95-41bd-9ec0-cc37dbf00c91", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-39ea6b818fedfa4282511e880f7a8907-4657b762f681c645-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "128a310973c2f1dcbe7502d119e8dded", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "7bfd918d-19a8-4e46-9cae-f52a3f43cbe3", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:38 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "304", + "x-request-id": "7bfd918d-19a8-4e46-9cae-f52a3f43cbe3" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "738278104" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataLakeStorageGen2DataFeedWithCredentialAuthentication(ServicePrincipal).json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataLakeStorageGen2DataFeedWithCredentialAuthentication(ServicePrincipal).json new file mode 100644 index 0000000000000..7890567c3cb09 --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataLakeStorageGen2DataFeedWithCredentialAuthentication(ServicePrincipal).json @@ -0,0 +1,415 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "173", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-6e144effef2e1b4f9c090235cf0b1580-0524dc435ebcc04a-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "11188003299225a4119c00a106e44bef", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "parameters": { + "clientId": "mock", + "clientSecret": "Sanitized", + "tenantId": "mock" + }, + "dataSourceCredentialType": "ServicePrincipal", + "dataSourceCredentialName": "credentialKEUx1RRb" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "570e8068-09b0-4e4e-a4ee-2b67e4e21d74", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:07 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/6dabf2cc-2acb-4255-9ef6-a8f1ab0b2d98", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "311", + "x-request-id": "570e8068-09b0-4e4e-a4ee-2b67e4e21d74" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/6dabf2cc-2acb-4255-9ef6-a8f1ab0b2d98", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-6e144effef2e1b4f9c090235cf0b1580-e66e41cfbbbbe34b-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "9032d28d90d0465a79762b5d979756e1", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "56ba9d83-0fb2-4ffd-be59-5a2a357ccd1a", + "Content-Length": "247", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:08 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "108", + "x-request-id": "56ba9d83-0fb2-4ffd-be59-5a2a357ccd1a" + }, + "ResponseBody": { + "dataSourceCredentialId": "6dabf2cc-2acb-4255-9ef6-a8f1ab0b2d98", + "dataSourceCredentialName": "credentialKEUx1RRb", + "dataSourceCredentialDescription": "", + "dataSourceCredentialType": "ServicePrincipal", + "parameters": { + "clientId": "mock", + "tenantId": "mock" + } + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "321", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-65ddde10948c3349bedc003a281830a5-0392e6171ff06148-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "1474de25d41c6f35da7e48eb9d8a8072", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "accountName": "mock", + "accountKey": "Sanitized", + "fileSystemName": "mock", + "directoryTemplate": "mock", + "fileTemplate": "mock" + }, + "dataSourceType": "AzureDataLakeStorageGen2", + "dataFeedName": "dataFeed1bNCGB2O", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "2468ca60-21d7-480d-b46d-54239beb20a8", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:08 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/9f2d1c80-8e4d-4205-9e66-827fff636146", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "420", + "x-request-id": "2468ca60-21d7-480d-b46d-54239beb20a8" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/9f2d1c80-8e4d-4205-9e66-827fff636146", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-65ddde10948c3349bedc003a281830a5-2a8da8d3c603fc4a-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "1c97d22546fd7a8e451fbf71c688fd87", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "49e17a3f-e233-4ac9-a70b-81eddee476ad", + "Content-Length": "966", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:08 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "150", + "x-request-id": "49e17a3f-e233-4ac9-a70b-81eddee476ad" + }, + "ResponseBody": { + "dataFeedId": "9f2d1c80-8e4d-4205-9e66-827fff636146", + "dataFeedName": "dataFeed1bNCGB2O", + "metrics": [ + { + "metricId": "508da52d-901d-4a44-8f4c-5df863286c59", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataLakeStorageGen2", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:08Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "fileTemplate": "mock", + "accountName": "mock", + "directoryTemplate": "mock", + "fileSystemName": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/9f2d1c80-8e4d-4205-9e66-827fff636146", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-63426a4045c7e045bd5c0f538333f89b-73eace034b55864e-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "f26a67ea461ba42941bb82194f6b4358", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "c9c6e4f0-5084-4dd0-8de0-1fb45a74c0ed", + "Content-Length": "966", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:09 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "188", + "x-request-id": "c9c6e4f0-5084-4dd0-8de0-1fb45a74c0ed" + }, + "ResponseBody": { + "dataFeedId": "9f2d1c80-8e4d-4205-9e66-827fff636146", + "dataFeedName": "dataFeed1bNCGB2O", + "metrics": [ + { + "metricId": "508da52d-901d-4a44-8f4c-5df863286c59", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataLakeStorageGen2", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:08Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "fileTemplate": "mock", + "accountName": "mock", + "directoryTemplate": "mock", + "fileSystemName": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/9f2d1c80-8e4d-4205-9e66-827fff636146", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "671", + "Content-Type": "application/merge-patch\u002Bjson", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-a2e50f01b4b9dc45ae42e28c1c2583eb-690dd03b7efd574a-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "209dab14cb6edfcd50facefd15c3a952", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "accountName": "mock", + "fileSystemName": "mock", + "directoryTemplate": "mock", + "fileTemplate": "mock" + }, + "dataSourceType": "AzureDataLakeStorageGen2", + "dataFeedName": "dataFeed1bNCGB2O", + "dataFeedDescription": "", + "timestampColumn": "", + "dataStartFrom": "2020-08-01T00:00:00Z", + "startOffsetInSeconds": 0, + "maxConcurrency": -1, + "minRetryIntervalInSeconds": -1, + "stopRetryAfterInSeconds": -1, + "needRollup": "NoRollup", + "rollUpMethod": "None", + "fillMissingPointType": "PreviousValue", + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "status": "Active", + "actionLinkTemplate": "", + "authenticationType": "ServicePrincipal", + "credentialId": "6dabf2cc-2acb-4255-9ef6-a8f1ab0b2d98" + }, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "a6542632-6829-41ce-aebb-5da70d1b04ab", + "Content-Length": "1031", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:09 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "837", + "x-request-id": "a6542632-6829-41ce-aebb-5da70d1b04ab" + }, + "ResponseBody": { + "dataFeedId": "9f2d1c80-8e4d-4205-9e66-827fff636146", + "dataFeedName": "dataFeed1bNCGB2O", + "metrics": [ + { + "metricId": "508da52d-901d-4a44-8f4c-5df863286c59", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataLakeStorageGen2", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:08Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "fileTemplate": "mock", + "accountName": "mock", + "directoryTemplate": "mock", + "fileSystemName": "mock" + }, + "authenticationType": "ServicePrincipal", + "credentialId": "6dabf2cc-2acb-4255-9ef6-a8f1ab0b2d98" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/9f2d1c80-8e4d-4205-9e66-827fff636146", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-8adb961f30ef8e4b803c1079c7c657b3-67025e297e1be24e-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "3600c0808e1fde57a8f3da41c3752bd9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "1b1becce-713b-4160-b8d3-fd7e0961b03a", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:10 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "324", + "x-request-id": "1b1becce-713b-4160-b8d3-fd7e0961b03a" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/6dabf2cc-2acb-4255-9ef6-a8f1ab0b2d98", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-fd0bd87cef2d43499977f3e892b0529c-a44e0ca4f7488d40-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "1a5c66dbddea1e19998ba220772c8e7d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "b0b72969-d0a8-4a1b-b56f-7a2667a73d24", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:10 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "193", + "x-request-id": "b0b72969-d0a8-4a1b-b56f-7a2667a73d24" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "460455776" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataLakeStorageGen2DataFeedWithCredentialAuthentication(ServicePrincipal)Async.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataLakeStorageGen2DataFeedWithCredentialAuthentication(ServicePrincipal)Async.json new file mode 100644 index 0000000000000..4a9d7f8311952 --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataLakeStorageGen2DataFeedWithCredentialAuthentication(ServicePrincipal)Async.json @@ -0,0 +1,415 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "173", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-0ea8c3300f885e4ba7d2c783b4c02240-edd7be7c721c0946-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "24758bc52549bbf2b94720f8117ed6e1", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "parameters": { + "clientId": "mock", + "clientSecret": "Sanitized", + "tenantId": "mock" + }, + "dataSourceCredentialType": "ServicePrincipal", + "dataSourceCredentialName": "credentialnDb2AISu" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "2a72407c-d6a4-4a64-8dec-f49c85278ef6", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:41:05 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/c62a592d-35cf-4698-8044-4378b24a7f68", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "569", + "x-request-id": "2a72407c-d6a4-4a64-8dec-f49c85278ef6" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/c62a592d-35cf-4698-8044-4378b24a7f68", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-0ea8c3300f885e4ba7d2c783b4c02240-dc389cfaea16b442-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "88bb05d25e33b79bdf072c0cbd67ba8a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "a02c27b1-49f9-4cfe-9100-ba781ec628de", + "Content-Length": "247", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:41:05 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "106", + "x-request-id": "a02c27b1-49f9-4cfe-9100-ba781ec628de" + }, + "ResponseBody": { + "dataSourceCredentialId": "c62a592d-35cf-4698-8044-4378b24a7f68", + "dataSourceCredentialName": "credentialnDb2AISu", + "dataSourceCredentialDescription": "", + "dataSourceCredentialType": "ServicePrincipal", + "parameters": { + "clientId": "mock", + "tenantId": "mock" + } + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "321", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-674dfd6108b10e4e92e83f1ca483fa62-dfad55f86781464d-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "00ca81dad0879ba9c26b6b53e7f4c266", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "accountName": "mock", + "accountKey": "Sanitized", + "fileSystemName": "mock", + "directoryTemplate": "mock", + "fileTemplate": "mock" + }, + "dataSourceType": "AzureDataLakeStorageGen2", + "dataFeedName": "dataFeedUlDJ4UkW", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "f6d3dc18-7b41-47d8-878c-e98a96c6b3eb", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:41:11 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/b5657023-953a-4f9e-b50f-6f56adc82214", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "5911", + "x-request-id": "f6d3dc18-7b41-47d8-878c-e98a96c6b3eb" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/b5657023-953a-4f9e-b50f-6f56adc82214", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-674dfd6108b10e4e92e83f1ca483fa62-a57f7eca09890343-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "4244beefe5f852fd8d96adb4d0d869ea", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "c51806aa-80e7-49f8-9d06-ac85befe4c08", + "Content-Length": "966", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:41:11 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "162", + "x-request-id": "c51806aa-80e7-49f8-9d06-ac85befe4c08" + }, + "ResponseBody": { + "dataFeedId": "b5657023-953a-4f9e-b50f-6f56adc82214", + "dataFeedName": "dataFeedUlDJ4UkW", + "metrics": [ + { + "metricId": "38120a98-ec75-4070-a13b-c70c8b5acbe9", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataLakeStorageGen2", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:41:11Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "fileTemplate": "mock", + "accountName": "mock", + "directoryTemplate": "mock", + "fileSystemName": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/b5657023-953a-4f9e-b50f-6f56adc82214", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-6530e9f5a611904cb272d31e75fec02c-1de08a8d0bf1d24c-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "b2ae8a3d9b930e2f5d904a51fb66a256", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "727b8212-4251-4186-a2f4-3757307c1b24", + "Content-Length": "966", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:41:11 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "169", + "x-request-id": "727b8212-4251-4186-a2f4-3757307c1b24" + }, + "ResponseBody": { + "dataFeedId": "b5657023-953a-4f9e-b50f-6f56adc82214", + "dataFeedName": "dataFeedUlDJ4UkW", + "metrics": [ + { + "metricId": "38120a98-ec75-4070-a13b-c70c8b5acbe9", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataLakeStorageGen2", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:41:11Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "fileTemplate": "mock", + "accountName": "mock", + "directoryTemplate": "mock", + "fileSystemName": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/b5657023-953a-4f9e-b50f-6f56adc82214", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "671", + "Content-Type": "application/merge-patch\u002Bjson", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-f7c7491a9a390b4f83254fd097f61f68-52ff36f276fed141-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "b90e479985a2f437837873f123f4caea", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "accountName": "mock", + "fileSystemName": "mock", + "directoryTemplate": "mock", + "fileTemplate": "mock" + }, + "dataSourceType": "AzureDataLakeStorageGen2", + "dataFeedName": "dataFeedUlDJ4UkW", + "dataFeedDescription": "", + "timestampColumn": "", + "dataStartFrom": "2020-08-01T00:00:00Z", + "startOffsetInSeconds": 0, + "maxConcurrency": -1, + "minRetryIntervalInSeconds": -1, + "stopRetryAfterInSeconds": -1, + "needRollup": "NoRollup", + "rollUpMethod": "None", + "fillMissingPointType": "PreviousValue", + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "status": "Active", + "actionLinkTemplate": "", + "authenticationType": "ServicePrincipal", + "credentialId": "c62a592d-35cf-4698-8044-4378b24a7f68" + }, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "d34f7760-4cc7-4817-a2da-d89f0d1ba7cc", + "Content-Length": "1031", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:41:12 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "911", + "x-request-id": "d34f7760-4cc7-4817-a2da-d89f0d1ba7cc" + }, + "ResponseBody": { + "dataFeedId": "b5657023-953a-4f9e-b50f-6f56adc82214", + "dataFeedName": "dataFeedUlDJ4UkW", + "metrics": [ + { + "metricId": "38120a98-ec75-4070-a13b-c70c8b5acbe9", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataLakeStorageGen2", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:41:11Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "fileTemplate": "mock", + "accountName": "mock", + "directoryTemplate": "mock", + "fileSystemName": "mock" + }, + "authenticationType": "ServicePrincipal", + "credentialId": "c62a592d-35cf-4698-8044-4378b24a7f68" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/b5657023-953a-4f9e-b50f-6f56adc82214", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-243eb8ff8f0e084c91afd78a106bedc4-e3a7d3f9fa2f5146-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "5d158002104654d38e35e4679bac5626", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "cdc5a54f-03bb-401e-9164-0c79e8fad814", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:41:12 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "337", + "x-request-id": "cdc5a54f-03bb-401e-9164-0c79e8fad814" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/c62a592d-35cf-4698-8044-4378b24a7f68", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-118c13250673e34d92d07944a8a9cf62-c6ca1233504f1b42-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "891b56f3afc9b84852b92f1b283eeb69", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "4c30fb00-eed1-4c99-8c12-89f1cbc38c6a", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:41:12 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "206", + "x-request-id": "4c30fb00-eed1-4c99-8c12-89f1cbc38c6a" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "1929871686" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataLakeStorageGen2DataFeedWithCredentialAuthentication(ServicePrincipalInKeyVault).json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataLakeStorageGen2DataFeedWithCredentialAuthentication(ServicePrincipalInKeyVault).json new file mode 100644 index 0000000000000..9f9a6d245c873 --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataLakeStorageGen2DataFeedWithCredentialAuthentication(ServicePrincipalInKeyVault).json @@ -0,0 +1,421 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "308", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-4df66d6aad12a34d966bda924db3df33-ef8d96106a85ef4f-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "acbc2d6780d6ee652bdf29c9867ba904", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "parameters": { + "keyVaultEndpoint": "https://mock.com/", + "keyVaultClientId": "mock", + "keyVaultClientSecret": "Sanitized", + "servicePrincipalIdNameInKV": "mock", + "servicePrincipalSecretNameInKV": "mock", + "tenantId": "mock" + }, + "dataSourceCredentialType": "ServicePrincipalInKV", + "dataSourceCredentialName": "credential73ZzE3La" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "6e37d0db-db3a-4085-884e-8ced080bd98b", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:10 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/c30e32a6-8bbe-4fb6-bdd6-4f836139c869", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "339", + "x-request-id": "6e37d0db-db3a-4085-884e-8ced080bd98b" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/c30e32a6-8bbe-4fb6-bdd6-4f836139c869", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-4df66d6aad12a34d966bda924db3df33-d8454f02cd576541-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "43660fcc92893ba7db9591e25ed5ecc5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "1da37a32-61a0-43b0-9bae-716369d4247d", + "Content-Length": "374", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:10 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "130", + "x-request-id": "1da37a32-61a0-43b0-9bae-716369d4247d" + }, + "ResponseBody": { + "dataSourceCredentialId": "c30e32a6-8bbe-4fb6-bdd6-4f836139c869", + "dataSourceCredentialName": "credential73ZzE3La", + "dataSourceCredentialDescription": "", + "dataSourceCredentialType": "ServicePrincipalInKV", + "parameters": { + "servicePrincipalSecretNameInKV": "mock", + "servicePrincipalIdNameInKV": "mock", + "tenantId": "mock", + "keyVaultClientId": "mock", + "keyVaultEndpoint": "https://mock.com/" + } + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "321", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-c1978a0cc2215743a2b2be193886d034-8c594189cd55da48-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "88ef1b7a59431926f3c9c33bad4c14d4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "accountName": "mock", + "accountKey": "Sanitized", + "fileSystemName": "mock", + "directoryTemplate": "mock", + "fileTemplate": "mock" + }, + "dataSourceType": "AzureDataLakeStorageGen2", + "dataFeedName": "dataFeedj10Ktbyc", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "4fa7d0a9-ce90-4e79-8fdd-19ebb816da7f", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:11 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/1464fe1f-5804-4b82-be4d-3abe8e79f69d", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "419", + "x-request-id": "4fa7d0a9-ce90-4e79-8fdd-19ebb816da7f" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/1464fe1f-5804-4b82-be4d-3abe8e79f69d", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-c1978a0cc2215743a2b2be193886d034-fef928d3f492004b-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "41d1818583ee558ff2631f3b8b52fbcb", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "c9813e7b-db90-47d3-b847-12b56ee1adb6", + "Content-Length": "966", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:11 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "172", + "x-request-id": "c9813e7b-db90-47d3-b847-12b56ee1adb6" + }, + "ResponseBody": { + "dataFeedId": "1464fe1f-5804-4b82-be4d-3abe8e79f69d", + "dataFeedName": "dataFeedj10Ktbyc", + "metrics": [ + { + "metricId": "d7e2e4bf-f2b2-4cda-b906-a9917405d11c", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataLakeStorageGen2", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:11Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "fileTemplate": "mock", + "accountName": "mock", + "directoryTemplate": "mock", + "fileSystemName": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/1464fe1f-5804-4b82-be4d-3abe8e79f69d", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-b343a5c7a37eaf41a95c8044adb1defc-7f6f5835b9671b44-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "6ec8861f1fa381f86f77ee9511b1175d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "63a08cb9-ee72-4959-97f0-57eeac90ec8f", + "Content-Length": "966", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:11 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "168", + "x-request-id": "63a08cb9-ee72-4959-97f0-57eeac90ec8f" + }, + "ResponseBody": { + "dataFeedId": "1464fe1f-5804-4b82-be4d-3abe8e79f69d", + "dataFeedName": "dataFeedj10Ktbyc", + "metrics": [ + { + "metricId": "d7e2e4bf-f2b2-4cda-b906-a9917405d11c", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataLakeStorageGen2", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:11Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "fileTemplate": "mock", + "accountName": "mock", + "directoryTemplate": "mock", + "fileSystemName": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/1464fe1f-5804-4b82-be4d-3abe8e79f69d", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "675", + "Content-Type": "application/merge-patch\u002Bjson", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-de5eeec368a2504887d861e579f48c04-3ec5935a1801ae42-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "87d11b36ae2ff7f08c9a96df3aea8da1", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "accountName": "mock", + "fileSystemName": "mock", + "directoryTemplate": "mock", + "fileTemplate": "mock" + }, + "dataSourceType": "AzureDataLakeStorageGen2", + "dataFeedName": "dataFeedj10Ktbyc", + "dataFeedDescription": "", + "timestampColumn": "", + "dataStartFrom": "2020-08-01T00:00:00Z", + "startOffsetInSeconds": 0, + "maxConcurrency": -1, + "minRetryIntervalInSeconds": -1, + "stopRetryAfterInSeconds": -1, + "needRollup": "NoRollup", + "rollUpMethod": "None", + "fillMissingPointType": "PreviousValue", + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "status": "Active", + "actionLinkTemplate": "", + "authenticationType": "ServicePrincipalInKV", + "credentialId": "c30e32a6-8bbe-4fb6-bdd6-4f836139c869" + }, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "50b2b275-fa09-46c2-a1fe-ded9518e1fc3", + "Content-Length": "1035", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:12 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "774", + "x-request-id": "50b2b275-fa09-46c2-a1fe-ded9518e1fc3" + }, + "ResponseBody": { + "dataFeedId": "1464fe1f-5804-4b82-be4d-3abe8e79f69d", + "dataFeedName": "dataFeedj10Ktbyc", + "metrics": [ + { + "metricId": "d7e2e4bf-f2b2-4cda-b906-a9917405d11c", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataLakeStorageGen2", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:11Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "fileTemplate": "mock", + "accountName": "mock", + "directoryTemplate": "mock", + "fileSystemName": "mock" + }, + "authenticationType": "ServicePrincipalInKV", + "credentialId": "c30e32a6-8bbe-4fb6-bdd6-4f836139c869" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/1464fe1f-5804-4b82-be4d-3abe8e79f69d", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-9d04eb3215a9b84e8ab305b1c318eed0-9af50432c1e2a146-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "271bf8cda6846631894fd27794f94341", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "d4fe4b96-4499-4a15-9f32-d844c770e2cd", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:12 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "351", + "x-request-id": "d4fe4b96-4499-4a15-9f32-d844c770e2cd" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/c30e32a6-8bbe-4fb6-bdd6-4f836139c869", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-b1bb15c84708ee429a1d9213ea0e4cca-3983c8bd0a350743-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "7004c14c7480709b96d0e10988194784", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "d355372b-a9d8-4a50-9ac0-1c6a12a1b33c", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:13 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "184", + "x-request-id": "d355372b-a9d8-4a50-9ac0-1c6a12a1b33c" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "1057557590" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataLakeStorageGen2DataFeedWithCredentialAuthentication(ServicePrincipalInKeyVault)Async.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataLakeStorageGen2DataFeedWithCredentialAuthentication(ServicePrincipalInKeyVault)Async.json new file mode 100644 index 0000000000000..cdffda9d21f8d --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataLakeStorageGen2DataFeedWithCredentialAuthentication(ServicePrincipalInKeyVault)Async.json @@ -0,0 +1,421 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "308", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-d62dbfaf96bc2d459d80d5960fa1f0e9-778bb534e7250d4a-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "994f3a3b8498de7933790179fad2094d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "parameters": { + "keyVaultEndpoint": "https://mock.com/", + "keyVaultClientId": "mock", + "keyVaultClientSecret": "Sanitized", + "servicePrincipalIdNameInKV": "mock", + "servicePrincipalSecretNameInKV": "mock", + "tenantId": "mock" + }, + "dataSourceCredentialType": "ServicePrincipalInKV", + "dataSourceCredentialName": "credential3rq8BEpt" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "23f9d830-3a18-4b00-af3e-207aebe10854", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:41:14 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/a5d0f092-34da-47cc-85bb-2d43dc9f99af", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "535", + "x-request-id": "23f9d830-3a18-4b00-af3e-207aebe10854" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/a5d0f092-34da-47cc-85bb-2d43dc9f99af", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-d62dbfaf96bc2d459d80d5960fa1f0e9-81d25e035b573249-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "b8e646931a02268495230a800a3f4451", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "519ec2ac-887b-4c4c-a283-db62e46c67a7", + "Content-Length": "374", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:41:14 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "115", + "x-request-id": "519ec2ac-887b-4c4c-a283-db62e46c67a7" + }, + "ResponseBody": { + "dataSourceCredentialId": "a5d0f092-34da-47cc-85bb-2d43dc9f99af", + "dataSourceCredentialName": "credential3rq8BEpt", + "dataSourceCredentialDescription": "", + "dataSourceCredentialType": "ServicePrincipalInKV", + "parameters": { + "servicePrincipalSecretNameInKV": "mock", + "servicePrincipalIdNameInKV": "mock", + "tenantId": "mock", + "keyVaultClientId": "mock", + "keyVaultEndpoint": "https://mock.com/" + } + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "321", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-99990f3133e5944b9fd350425145c0d7-fc48ade3e1ddb049-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "7c204ccfd84869d4ec3b51d3c8e5de20", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "accountName": "mock", + "accountKey": "Sanitized", + "fileSystemName": "mock", + "directoryTemplate": "mock", + "fileTemplate": "mock" + }, + "dataSourceType": "AzureDataLakeStorageGen2", + "dataFeedName": "dataFeedsLtZGFao", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "4d8e98d8-e33c-42c4-93b6-ba90415262a2", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:41:15 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/a6e78d8a-4a7c-4c3b-a8ac-a9cc9993eba5", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "585", + "x-request-id": "4d8e98d8-e33c-42c4-93b6-ba90415262a2" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/a6e78d8a-4a7c-4c3b-a8ac-a9cc9993eba5", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-99990f3133e5944b9fd350425145c0d7-d32963688e9a3745-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "740428b5f97af4d435b03c4895be1b54", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "6be3fb80-d98f-4bb2-8326-0e4ed49b39fb", + "Content-Length": "966", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:41:15 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "156", + "x-request-id": "6be3fb80-d98f-4bb2-8326-0e4ed49b39fb" + }, + "ResponseBody": { + "dataFeedId": "a6e78d8a-4a7c-4c3b-a8ac-a9cc9993eba5", + "dataFeedName": "dataFeedsLtZGFao", + "metrics": [ + { + "metricId": "65e43f06-653f-437f-bf09-f996fbda9304", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataLakeStorageGen2", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:41:15Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "fileTemplate": "mock", + "accountName": "mock", + "directoryTemplate": "mock", + "fileSystemName": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/a6e78d8a-4a7c-4c3b-a8ac-a9cc9993eba5", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-6f9173a3338c2448b66d687773cfc1e6-ecaf75a435c38049-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "b6e8971f07fabcde4ea093cfee718957", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "0490d3bc-d615-4392-a0d5-81696a8ed833", + "Content-Length": "966", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:41:15 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "150", + "x-request-id": "0490d3bc-d615-4392-a0d5-81696a8ed833" + }, + "ResponseBody": { + "dataFeedId": "a6e78d8a-4a7c-4c3b-a8ac-a9cc9993eba5", + "dataFeedName": "dataFeedsLtZGFao", + "metrics": [ + { + "metricId": "65e43f06-653f-437f-bf09-f996fbda9304", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataLakeStorageGen2", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:41:15Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "fileTemplate": "mock", + "accountName": "mock", + "directoryTemplate": "mock", + "fileSystemName": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/a6e78d8a-4a7c-4c3b-a8ac-a9cc9993eba5", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "675", + "Content-Type": "application/merge-patch\u002Bjson", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-aa571a524cb52740908d9755817db3a5-5ce6cc4ff045da4e-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "09951cd3b23ad6d4782b47989c8cd42e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "accountName": "mock", + "fileSystemName": "mock", + "directoryTemplate": "mock", + "fileTemplate": "mock" + }, + "dataSourceType": "AzureDataLakeStorageGen2", + "dataFeedName": "dataFeedsLtZGFao", + "dataFeedDescription": "", + "timestampColumn": "", + "dataStartFrom": "2020-08-01T00:00:00Z", + "startOffsetInSeconds": 0, + "maxConcurrency": -1, + "minRetryIntervalInSeconds": -1, + "stopRetryAfterInSeconds": -1, + "needRollup": "NoRollup", + "rollUpMethod": "None", + "fillMissingPointType": "PreviousValue", + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "status": "Active", + "actionLinkTemplate": "", + "authenticationType": "ServicePrincipalInKV", + "credentialId": "a5d0f092-34da-47cc-85bb-2d43dc9f99af" + }, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "635fec84-ea65-4778-9aaf-b657769787ce", + "Content-Length": "1035", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:41:16 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "1022", + "x-request-id": "635fec84-ea65-4778-9aaf-b657769787ce" + }, + "ResponseBody": { + "dataFeedId": "a6e78d8a-4a7c-4c3b-a8ac-a9cc9993eba5", + "dataFeedName": "dataFeedsLtZGFao", + "metrics": [ + { + "metricId": "65e43f06-653f-437f-bf09-f996fbda9304", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataLakeStorageGen2", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:41:15Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "fileTemplate": "mock", + "accountName": "mock", + "directoryTemplate": "mock", + "fileSystemName": "mock" + }, + "authenticationType": "ServicePrincipalInKV", + "credentialId": "a5d0f092-34da-47cc-85bb-2d43dc9f99af" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/a6e78d8a-4a7c-4c3b-a8ac-a9cc9993eba5", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-bb0911b659d2c745ad27228e8497d1ea-3f4c5dd1e05b014c-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "30b4fc1f28fdad254a4826d9660405c4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "34fe910f-88f3-4963-9dd6-d779c2286f67", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:41:17 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "342", + "x-request-id": "34fe910f-88f3-4963-9dd6-d779c2286f67" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/a5d0f092-34da-47cc-85bb-2d43dc9f99af", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-8df4a2c79462e74ea93c297358f94de3-46be6fd6776cb44b-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "7974e52712286c1ac3123dcec0451fc1", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "ee55773f-8bc8-45e7-8a69-9417f868eb72", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:41:17 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "204", + "x-request-id": "ee55773f-8bc8-45e7-8a69-9417f868eb72" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "1760965235" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataLakeStorageGen2DataFeedWithCredentialAuthentication(SharedKey).json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataLakeStorageGen2DataFeedWithCredentialAuthentication(SharedKey).json new file mode 100644 index 0000000000000..bcb5791bb9348 --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataLakeStorageGen2DataFeedWithCredentialAuthentication(SharedKey).json @@ -0,0 +1,410 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "140", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-3edecff8e2e13d459ff16db80d0da15c-7bd3e7de877a3e45-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "a96ad29f74a38e4d60b5537a96a485b4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "parameters": { + "accountKey": "Sanitized" + }, + "dataSourceCredentialType": "DataLakeGen2SharedKey", + "dataSourceCredentialName": "credentialIdewU0Jb" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "cd0103dc-1039-4582-a90e-ddad16e83457", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:13 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/81fcc45d-1e0c-4cc9-8e5e-ee462b35a428", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "626", + "x-request-id": "cd0103dc-1039-4582-a90e-ddad16e83457" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/81fcc45d-1e0c-4cc9-8e5e-ee462b35a428", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-3edecff8e2e13d459ff16db80d0da15c-eaf8e146632bf84c-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "2cb771dd29b3afa2b67549b9362a7a51", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "b352022d-3d63-4464-a5f3-bc7bd1276c57", + "Content-Length": "217", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:13 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "113", + "x-request-id": "b352022d-3d63-4464-a5f3-bc7bd1276c57" + }, + "ResponseBody": { + "dataSourceCredentialId": "81fcc45d-1e0c-4cc9-8e5e-ee462b35a428", + "dataSourceCredentialName": "credentialIdewU0Jb", + "dataSourceCredentialDescription": "", + "dataSourceCredentialType": "DataLakeGen2SharedKey", + "parameters": {} + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "321", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-9083d186bc32cf41b49804053b3046ad-194219b1246e4440-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "62a1e16c47d625f3bd263cd4d9b7f975", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "accountName": "mock", + "accountKey": "Sanitized", + "fileSystemName": "mock", + "directoryTemplate": "mock", + "fileTemplate": "mock" + }, + "dataSourceType": "AzureDataLakeStorageGen2", + "dataFeedName": "dataFeedKncbAD6d", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "cd7f99cf-544e-4d75-818c-3af3cec0fa07", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:14 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/a7d0a372-d6a1-4419-befe-95b0344206d2", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "450", + "x-request-id": "cd7f99cf-544e-4d75-818c-3af3cec0fa07" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/a7d0a372-d6a1-4419-befe-95b0344206d2", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-9083d186bc32cf41b49804053b3046ad-612e646415a31243-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "2ef2ba30932a36583b0155a56b15fc0e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "990e3824-34a3-4420-9286-7645c378bab0", + "Content-Length": "966", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:14 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "169", + "x-request-id": "990e3824-34a3-4420-9286-7645c378bab0" + }, + "ResponseBody": { + "dataFeedId": "a7d0a372-d6a1-4419-befe-95b0344206d2", + "dataFeedName": "dataFeedKncbAD6d", + "metrics": [ + { + "metricId": "15853c7b-a690-4040-811b-efc560dd75c1", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataLakeStorageGen2", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:14Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "fileTemplate": "mock", + "accountName": "mock", + "directoryTemplate": "mock", + "fileSystemName": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/a7d0a372-d6a1-4419-befe-95b0344206d2", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-0630a3c72623ae4da38b7989a0fb784c-4957e3c7953b3b42-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "d1bfe2b53f886fd98124fc0feea5786d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "6ecc80dd-91f6-4acb-b2e4-21137e53e250", + "Content-Length": "966", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:14 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "178", + "x-request-id": "6ecc80dd-91f6-4acb-b2e4-21137e53e250" + }, + "ResponseBody": { + "dataFeedId": "a7d0a372-d6a1-4419-befe-95b0344206d2", + "dataFeedName": "dataFeedKncbAD6d", + "metrics": [ + { + "metricId": "15853c7b-a690-4040-811b-efc560dd75c1", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataLakeStorageGen2", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:14Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "fileTemplate": "mock", + "accountName": "mock", + "directoryTemplate": "mock", + "fileSystemName": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/a7d0a372-d6a1-4419-befe-95b0344206d2", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "676", + "Content-Type": "application/merge-patch\u002Bjson", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-72199ce0d580c44d801822ec5233ecab-c8ef7543fe425147-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "fd3ec4f88ddcd8aa896a26d4f14eb9a7", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "accountName": "mock", + "fileSystemName": "mock", + "directoryTemplate": "mock", + "fileTemplate": "mock" + }, + "dataSourceType": "AzureDataLakeStorageGen2", + "dataFeedName": "dataFeedKncbAD6d", + "dataFeedDescription": "", + "timestampColumn": "", + "dataStartFrom": "2020-08-01T00:00:00Z", + "startOffsetInSeconds": 0, + "maxConcurrency": -1, + "minRetryIntervalInSeconds": -1, + "stopRetryAfterInSeconds": -1, + "needRollup": "NoRollup", + "rollUpMethod": "None", + "fillMissingPointType": "PreviousValue", + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "status": "Active", + "actionLinkTemplate": "", + "authenticationType": "DataLakeGen2SharedKey", + "credentialId": "81fcc45d-1e0c-4cc9-8e5e-ee462b35a428" + }, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "fdcb751f-05d8-4d2f-8587-aaf8df4bafc1", + "Content-Length": "1036", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:15 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "1059", + "x-request-id": "fdcb751f-05d8-4d2f-8587-aaf8df4bafc1" + }, + "ResponseBody": { + "dataFeedId": "a7d0a372-d6a1-4419-befe-95b0344206d2", + "dataFeedName": "dataFeedKncbAD6d", + "metrics": [ + { + "metricId": "15853c7b-a690-4040-811b-efc560dd75c1", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataLakeStorageGen2", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:14Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "fileTemplate": "mock", + "accountName": "mock", + "directoryTemplate": "mock", + "fileSystemName": "mock" + }, + "authenticationType": "DataLakeGen2SharedKey", + "credentialId": "81fcc45d-1e0c-4cc9-8e5e-ee462b35a428" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/a7d0a372-d6a1-4419-befe-95b0344206d2", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-2acde43e90c8e349af3ff478d37f502a-cf8cdb06f0dbbb4c-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "f61f2d2927f7f0ece183ac0697484896", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "f8e1b001-134c-4676-9ea0-7cbecab1546f", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:17 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "318", + "x-request-id": "f8e1b001-134c-4676-9ea0-7cbecab1546f" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/81fcc45d-1e0c-4cc9-8e5e-ee462b35a428", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-581afc12935e2a45b4bc05df2081e0b2-788b84f58fc08440-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "a7ace889ffd7273237e7471e18057d32", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "57ee80af-1502-435b-86bf-d75dec0e9ecf", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:17 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "168", + "x-request-id": "57ee80af-1502-435b-86bf-d75dec0e9ecf" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "1886543687" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataLakeStorageGen2DataFeedWithCredentialAuthentication(SharedKey)Async.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataLakeStorageGen2DataFeedWithCredentialAuthentication(SharedKey)Async.json new file mode 100644 index 0000000000000..1d4e8d2cbc0ca --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataLakeStorageGen2DataFeedWithCredentialAuthentication(SharedKey)Async.json @@ -0,0 +1,410 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "140", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-5ba5956563dcf940b4cdf178accd16b0-ffeaceaed4ed1148-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "628a4abb492b028062b7b6118118acc2", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "parameters": { + "accountKey": "Sanitized" + }, + "dataSourceCredentialType": "DataLakeGen2SharedKey", + "dataSourceCredentialName": "credential5gw4WZfY" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "6ef1b2fd-0fb7-4aaf-ba80-b9956e378d9c", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:41:17 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/fc527c27-4a83-463e-b2c6-76a1617aca1b", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "284", + "x-request-id": "6ef1b2fd-0fb7-4aaf-ba80-b9956e378d9c" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/fc527c27-4a83-463e-b2c6-76a1617aca1b", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-5ba5956563dcf940b4cdf178accd16b0-1906e8ff19e7234d-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "a2bc26a34a44883316d4fbb7bfeb7435", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "b95ff0a8-9ea2-4e4b-995e-1b39aa0f942e", + "Content-Length": "217", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:41:17 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "112", + "x-request-id": "b95ff0a8-9ea2-4e4b-995e-1b39aa0f942e" + }, + "ResponseBody": { + "dataSourceCredentialId": "fc527c27-4a83-463e-b2c6-76a1617aca1b", + "dataSourceCredentialName": "credential5gw4WZfY", + "dataSourceCredentialDescription": "", + "dataSourceCredentialType": "DataLakeGen2SharedKey", + "parameters": {} + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "321", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-425a34283b18a543b17b234fff8aa119-2fd3279b0c10114a-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "199df571e5aea4af7f65c63c56c06671", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "accountName": "mock", + "accountKey": "Sanitized", + "fileSystemName": "mock", + "directoryTemplate": "mock", + "fileTemplate": "mock" + }, + "dataSourceType": "AzureDataLakeStorageGen2", + "dataFeedName": "dataFeedV0uSQXHZ", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "ebd7e356-802b-4713-903b-331160664eae", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:41:18 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/1446e5a0-5651-4365-ada4-f700a8e80a24", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "442", + "x-request-id": "ebd7e356-802b-4713-903b-331160664eae" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/1446e5a0-5651-4365-ada4-f700a8e80a24", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-425a34283b18a543b17b234fff8aa119-de212bf200508340-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "574b0117c94e774243804fc0101402e8", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "5048a999-ff08-4068-a3dc-82fae04a0883", + "Content-Length": "966", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:41:18 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "168", + "x-request-id": "5048a999-ff08-4068-a3dc-82fae04a0883" + }, + "ResponseBody": { + "dataFeedId": "1446e5a0-5651-4365-ada4-f700a8e80a24", + "dataFeedName": "dataFeedV0uSQXHZ", + "metrics": [ + { + "metricId": "54c51bfb-6253-48b5-ac03-46dbefe36f42", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataLakeStorageGen2", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:41:18Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "fileTemplate": "mock", + "accountName": "mock", + "directoryTemplate": "mock", + "fileSystemName": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/1446e5a0-5651-4365-ada4-f700a8e80a24", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-9dd486f5ca7f1447aad24bae531ba45e-997eeb673e1cc844-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "4f30a9a919ac31da245638592437df02", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "fee11d99-54fa-4e78-a700-21cc87cd03b4", + "Content-Length": "966", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:41:18 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "196", + "x-request-id": "fee11d99-54fa-4e78-a700-21cc87cd03b4" + }, + "ResponseBody": { + "dataFeedId": "1446e5a0-5651-4365-ada4-f700a8e80a24", + "dataFeedName": "dataFeedV0uSQXHZ", + "metrics": [ + { + "metricId": "54c51bfb-6253-48b5-ac03-46dbefe36f42", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataLakeStorageGen2", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:41:18Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "fileTemplate": "mock", + "accountName": "mock", + "directoryTemplate": "mock", + "fileSystemName": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/1446e5a0-5651-4365-ada4-f700a8e80a24", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "676", + "Content-Type": "application/merge-patch\u002Bjson", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-13fecebb4b9c9e48a7802a7038f43335-ed8fc3bb37e04a4c-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "be81965a256fa8c3b226d52d95ee946b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "accountName": "mock", + "fileSystemName": "mock", + "directoryTemplate": "mock", + "fileTemplate": "mock" + }, + "dataSourceType": "AzureDataLakeStorageGen2", + "dataFeedName": "dataFeedV0uSQXHZ", + "dataFeedDescription": "", + "timestampColumn": "", + "dataStartFrom": "2020-08-01T00:00:00Z", + "startOffsetInSeconds": 0, + "maxConcurrency": -1, + "minRetryIntervalInSeconds": -1, + "stopRetryAfterInSeconds": -1, + "needRollup": "NoRollup", + "rollUpMethod": "None", + "fillMissingPointType": "PreviousValue", + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "status": "Active", + "actionLinkTemplate": "", + "authenticationType": "DataLakeGen2SharedKey", + "credentialId": "fc527c27-4a83-463e-b2c6-76a1617aca1b" + }, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "b9da57e7-acd1-4140-b5b0-4f6cdea5b97f", + "Content-Length": "1036", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:41:19 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "1028", + "x-request-id": "b9da57e7-acd1-4140-b5b0-4f6cdea5b97f" + }, + "ResponseBody": { + "dataFeedId": "1446e5a0-5651-4365-ada4-f700a8e80a24", + "dataFeedName": "dataFeedV0uSQXHZ", + "metrics": [ + { + "metricId": "54c51bfb-6253-48b5-ac03-46dbefe36f42", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "AzureDataLakeStorageGen2", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:41:18Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "fileTemplate": "mock", + "accountName": "mock", + "directoryTemplate": "mock", + "fileSystemName": "mock" + }, + "authenticationType": "DataLakeGen2SharedKey", + "credentialId": "fc527c27-4a83-463e-b2c6-76a1617aca1b" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/1446e5a0-5651-4365-ada4-f700a8e80a24", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-03fd0963be4ffb4e90583b0fdc068955-87a002322847804f-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "ac93dd63178ffdc4271933f890e8520b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "5c1bcd73-b229-4f9b-bf82-7733c584e5f5", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:41:24 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "5359", + "x-request-id": "5c1bcd73-b229-4f9b-bf82-7733c584e5f5" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/fc527c27-4a83-463e-b2c6-76a1617aca1b", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-ca714059b2538b4e9b8d2b7ea64b2c09-74eff7d45c0afd45-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "79664da144928379e5889c8644ac9b35", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "0b581604-ccc8-43e7-aab8-ca158ac1e416", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:41:30 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "5257", + "x-request-id": "0b581604-ccc8-43e7-aab8-ca158ac1e416" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "2020877024" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataLakeStorageGen2DataFeedWithEveryMemberAndGetInstance.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataLakeStorageGen2DataFeedWithEveryMemberAndGetInstance.json index f3aee8084aaee..e99ec87cded8b 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataLakeStorageGen2DataFeedWithEveryMemberAndGetInstance.json +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataLakeStorageGen2DataFeedWithEveryMemberAndGetInstance.json @@ -8,8 +8,8 @@ "Content-Length": "329", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-2d831b9e21a8d74086af891412dc7eda-315dd4d5c054f64b-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-395669654f1335489d739046eb0031e6-f70883806077814b-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "e72f20c5a0ce98fbbae70d74c7e6051c", "x-ms-return-client-request-id": "true" @@ -34,25 +34,25 @@ }, "StatusCode": 201, "ResponseHeaders": { - "apim-request-id": "5b74b2f4-ec73-49eb-9598-f57aef104bb8", + "apim-request-id": "10416a6d-9f51-4249-b20b-66b965e9784b", "Content-Length": "0", - "Date": "Thu, 03 Jun 2021 21:40:12 GMT", - "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/2bf21f22-a95d-410c-afcc-d5493283dee7", + "Date": "Sat, 05 Jun 2021 03:31:26 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/d66cf11f-15ae-441d-aecf-1e23b56b6cf6", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "619", - "x-request-id": "5b74b2f4-ec73-49eb-9598-f57aef104bb8" + "x-envoy-upstream-service-time": "383", + "x-request-id": "10416a6d-9f51-4249-b20b-66b965e9784b" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/2bf21f22-a95d-410c-afcc-d5493283dee7", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/d66cf11f-15ae-441d-aecf-1e23b56b6cf6", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-2d831b9e21a8d74086af891412dc7eda-3d660b0cb9ab6d4c-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-395669654f1335489d739046eb0031e6-48f2949ccd01bc49-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "f9a73fccd5a38eb920b21084429bc302", "x-ms-return-client-request-id": "true" @@ -60,21 +60,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "e9fc7549-eb09-4fd4-af9a-5f81e354d172", + "apim-request-id": "f3b1615f-1fa6-43d8-90d5-52b8c32d3d12", "Content-Length": "974", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:40:13 GMT", + "Date": "Sat, 05 Jun 2021 03:31:26 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "165", - "x-request-id": "e9fc7549-eb09-4fd4-af9a-5f81e354d172" + "x-envoy-upstream-service-time": "196", + "x-request-id": "f3b1615f-1fa6-43d8-90d5-52b8c32d3d12" }, "ResponseBody": { - "dataFeedId": "2bf21f22-a95d-410c-afcc-d5493283dee7", + "dataFeedId": "d66cf11f-15ae-441d-aecf-1e23b56b6cf6", "dataFeedName": "dataFeedoowhDb3K", "metrics": [ { - "metricId": "feb81b0a-f107-44ad-8f82-67eaf6c507c1", + "metricId": "3134da3f-c12e-47d3-b497-20145b022fbf", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -102,7 +102,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:40:12Z", + "createdTime": "2021-06-05T03:31:27Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -115,13 +115,13 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/2bf21f22-a95d-410c-afcc-d5493283dee7", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/d66cf11f-15ae-441d-aecf-1e23b56b6cf6", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-fcb941b231c1e44b96bfd8a6413080b7-d2deba27b8af0a43-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-7fa9e1ef71b71c46a250bff3543ac929-5cc1180c2f69954a-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "6f6f07206169a8f7db957b041b0e8e3c", "x-ms-return-client-request-id": "true" @@ -129,21 +129,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "e9027b32-dd14-4cf2-8e9e-d06a557a39d5", + "apim-request-id": "bd7a9788-9567-4e8c-9183-0a7441a92a67", "Content-Length": "974", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:40:13 GMT", + "Date": "Sat, 05 Jun 2021 03:31:27 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "174", - "x-request-id": "e9027b32-dd14-4cf2-8e9e-d06a557a39d5" + "x-envoy-upstream-service-time": "219", + "x-request-id": "bd7a9788-9567-4e8c-9183-0a7441a92a67" }, "ResponseBody": { - "dataFeedId": "2bf21f22-a95d-410c-afcc-d5493283dee7", + "dataFeedId": "d66cf11f-15ae-441d-aecf-1e23b56b6cf6", "dataFeedName": "dataFeedoowhDb3K", "metrics": [ { - "metricId": "feb81b0a-f107-44ad-8f82-67eaf6c507c1", + "metricId": "3134da3f-c12e-47d3-b497-20145b022fbf", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -171,7 +171,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:40:12Z", + "createdTime": "2021-06-05T03:31:27Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -184,15 +184,15 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/2bf21f22-a95d-410c-afcc-d5493283dee7", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/d66cf11f-15ae-441d-aecf-1e23b56b6cf6", "RequestMethod": "PATCH", "RequestHeaders": { "Accept": "application/json", - "Content-Length": "728", + "Content-Length": "757", "Content-Type": "application/merge-patch\u002Bjson", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-5cef7da1289fbf418c16d80ffac40b27-8489f2f670ff064c-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-ccf095e5dfb741409d8800c60d5e0ecd-fffc75f5745dc14c-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "a12436d114d2efa566a0c61c9077551f", "x-ms-return-client-request-id": "true" @@ -225,97 +225,26 @@ "fake@viewer.com" ], "status": "Active", - "actionLinkTemplate": "https://fakeurl.com/%datafeed/%metric" - }, - "StatusCode": 200, - "ResponseHeaders": { - "apim-request-id": "a209df3a-d1e5-4330-93b0-3f17d64eff33", - "Content-Length": "1117", - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:40:14 GMT", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "1043", - "x-request-id": "a209df3a-d1e5-4330-93b0-3f17d64eff33" - }, - "ResponseBody": { - "dataFeedId": "2bf21f22-a95d-410c-afcc-d5493283dee7", - "dataFeedName": "dataFeedXGc3Uzmk", - "metrics": [ - { - "metricId": "feb81b0a-f107-44ad-8f82-67eaf6c507c1", - "metricName": "cost", - "metricDisplayName": "cost", - "metricDescription": "" - } - ], - "dimension": [], - "dataStartFrom": "2020-09-21T00:00:00Z", - "dataSourceType": "AzureDataLakeStorageGen2", - "timestampColumn": "updatedTimestampColumn", - "startOffsetInSeconds": 2400, - "maxQueryPerMinute": 30.0, - "granularityName": "Daily", - "needRollup": "NoRollup", - "fillMissingPointType": "NoFilling", - "fillMissingPointValue": 0.0, - "rollUpMethod": "None", - "dataFeedDescription": "This data feed was updated to test the .NET client.", - "stopRetryAfterInSeconds": 1200, - "minRetryIntervalInSeconds": 90, - "maxConcurrency": 6, - "viewMode": "Public", - "admins": [ - "fake@admin.com", - "foo@contoso.com" - ], - "viewers": [ - "fake@viewer.com" - ], - "creator": "foo@contoso.com", - "status": "Active", - "createdTime": "2021-06-03T21:40:12Z", - "isAdmin": true, "actionLinkTemplate": "https://fakeurl.com/%datafeed/%metric", - "dataSourceParameter": { - "fileTemplate": "file", - "accountName": "account", - "directoryTemplate": "dir", - "fileSystemName": "fileSystem" - }, "authenticationType": "Basic" - } - }, - { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/2bf21f22-a95d-410c-afcc-d5493283dee7", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-423f2ccd65392347a41d061302c810fc-7065803f6afddd41-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-api-key": "Sanitized", - "x-ms-client-request-id": "c0540b2495776ab348fe1d0d5ab57312", - "x-ms-return-client-request-id": "true" }, - "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "db77a216-3170-4146-84f6-dac9c1cf9343", + "apim-request-id": "ced1febe-4ec7-4eb2-994e-9315fff8d023", "Content-Length": "1117", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:40:14 GMT", + "Date": "Sat, 05 Jun 2021 03:31:33 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "182", - "x-request-id": "db77a216-3170-4146-84f6-dac9c1cf9343" + "x-envoy-upstream-service-time": "5991", + "x-request-id": "ced1febe-4ec7-4eb2-994e-9315fff8d023" }, "ResponseBody": { - "dataFeedId": "2bf21f22-a95d-410c-afcc-d5493283dee7", + "dataFeedId": "d66cf11f-15ae-441d-aecf-1e23b56b6cf6", "dataFeedName": "dataFeedXGc3Uzmk", "metrics": [ { - "metricId": "feb81b0a-f107-44ad-8f82-67eaf6c507c1", + "metricId": "3134da3f-c12e-47d3-b497-20145b022fbf", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -346,7 +275,7 @@ ], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:40:12Z", + "createdTime": "2021-06-05T03:31:27Z", "isAdmin": true, "actionLinkTemplate": "https://fakeurl.com/%datafeed/%metric", "dataSourceParameter": { @@ -359,33 +288,33 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/2bf21f22-a95d-410c-afcc-d5493283dee7", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/d66cf11f-15ae-441d-aecf-1e23b56b6cf6", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-42f46b64a468e54ab145dc725d691fb0-2334357305a5e642-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-af411b3fee9fe84e87bfd4a5c099b3d0-7523fb7cb42d4545-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", - "x-ms-client-request-id": "0bb2d42421760b2f617f09c89bdb1863", + "x-ms-client-request-id": "c0540b2495776ab348fe1d0d5ab57312", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "apim-request-id": "02347266-7a9d-449e-810a-9ba7802711cf", + "apim-request-id": "f1e2e56e-9427-4a08-bbc9-ad0d68c2d903", "Content-Length": "0", - "Date": "Thu, 03 Jun 2021 21:40:15 GMT", + "Date": "Sat, 05 Jun 2021 03:31:39 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "343", - "x-request-id": "02347266-7a9d-449e-810a-9ba7802711cf" + "x-envoy-upstream-service-time": "5341", + "x-request-id": "f1e2e56e-9427-4a08-bbc9-ad0d68c2d903" }, "ResponseBody": [] } ], "Variables": { - "DateTimeOffsetNow": "2021-06-03T14:40:14.8378843-07:00", + "DateTimeOffsetNow": "2021-06-04T20:31:33.0665536-07:00", "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", "METRICSADVISOR_ENDPOINT_SUFFIX": null, "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataLakeStorageGen2DataFeedWithEveryMemberAndGetInstanceAsync.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataLakeStorageGen2DataFeedWithEveryMemberAndGetInstanceAsync.json index 495006509094f..2c76325661a11 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataLakeStorageGen2DataFeedWithEveryMemberAndGetInstanceAsync.json +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataLakeStorageGen2DataFeedWithEveryMemberAndGetInstanceAsync.json @@ -8,8 +8,8 @@ "Content-Length": "329", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-2d6380a1c7609d4ca522575c522e8731-c1ec515d440f2446-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-837c406ca72063468fc8f0c639ced617-c676dc8da3be414a-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "fb5f737e09fa12de336ebc6b076ee5ca", "x-ms-return-client-request-id": "true" @@ -34,25 +34,25 @@ }, "StatusCode": 201, "ResponseHeaders": { - "apim-request-id": "715f2e93-01f5-4ca6-838d-0d5e89ab273e", + "apim-request-id": "70a72023-3476-4aa9-9152-b95d0f526b64", "Content-Length": "0", - "Date": "Thu, 03 Jun 2021 21:41:53 GMT", - "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/caab9fef-f1b2-4f54-ba41-beee8e89e565", + "Date": "Sat, 05 Jun 2021 03:33:24 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/d6dbe2ee-6f64-4089-bd37-51b8d8f1b81b", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "320", - "x-request-id": "715f2e93-01f5-4ca6-838d-0d5e89ab273e" + "x-envoy-upstream-service-time": "5714", + "x-request-id": "70a72023-3476-4aa9-9152-b95d0f526b64" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/caab9fef-f1b2-4f54-ba41-beee8e89e565", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/d6dbe2ee-6f64-4089-bd37-51b8d8f1b81b", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-2d6380a1c7609d4ca522575c522e8731-b6c97e96ce63a340-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-837c406ca72063468fc8f0c639ced617-0d2e820369f1ed40-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "29bbcfb31b45cd18e05ed06d3fb33207", "x-ms-return-client-request-id": "true" @@ -60,21 +60,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "09fa7aa3-b3aa-4e49-bd20-ba710856a94f", + "apim-request-id": "f061ec0a-d339-4ae5-9db6-e19937e9d3e0", "Content-Length": "974", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:41:53 GMT", + "Date": "Sat, 05 Jun 2021 03:33:24 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "168", - "x-request-id": "09fa7aa3-b3aa-4e49-bd20-ba710856a94f" + "x-envoy-upstream-service-time": "180", + "x-request-id": "f061ec0a-d339-4ae5-9db6-e19937e9d3e0" }, "ResponseBody": { - "dataFeedId": "caab9fef-f1b2-4f54-ba41-beee8e89e565", + "dataFeedId": "d6dbe2ee-6f64-4089-bd37-51b8d8f1b81b", "dataFeedName": "dataFeeddTt9Ks3M", "metrics": [ { - "metricId": "9617b205-1ce9-485a-9004-7297fde958ce", + "metricId": "b2526f60-fc3d-400d-bd08-8a884314dd7d", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -102,7 +102,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:41:53Z", + "createdTime": "2021-06-05T03:33:24Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -115,13 +115,13 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/caab9fef-f1b2-4f54-ba41-beee8e89e565", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/d6dbe2ee-6f64-4089-bd37-51b8d8f1b81b", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-aa1d257d8cf37e47895cf7b076193c2a-8b7f42c43613234d-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-4b80eb3d73a49d49b01c7caeb9f0fc03-195a3d5a9fcb7048-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "faad1aa766db7bf63c6e5964a7c04035", "x-ms-return-client-request-id": "true" @@ -129,21 +129,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "63818906-29e6-4e34-8f81-d6b0f53acecb", + "apim-request-id": "13a0ade8-46a0-4565-9b9f-6eb618ec774d", "Content-Length": "974", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:41:53 GMT", + "Date": "Sat, 05 Jun 2021 03:33:29 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "153", - "x-request-id": "63818906-29e6-4e34-8f81-d6b0f53acecb" + "x-envoy-upstream-service-time": "5206", + "x-request-id": "13a0ade8-46a0-4565-9b9f-6eb618ec774d" }, "ResponseBody": { - "dataFeedId": "caab9fef-f1b2-4f54-ba41-beee8e89e565", + "dataFeedId": "d6dbe2ee-6f64-4089-bd37-51b8d8f1b81b", "dataFeedName": "dataFeeddTt9Ks3M", "metrics": [ { - "metricId": "9617b205-1ce9-485a-9004-7297fde958ce", + "metricId": "b2526f60-fc3d-400d-bd08-8a884314dd7d", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -171,7 +171,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:41:53Z", + "createdTime": "2021-06-05T03:33:24Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -184,15 +184,15 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/caab9fef-f1b2-4f54-ba41-beee8e89e565", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/d6dbe2ee-6f64-4089-bd37-51b8d8f1b81b", "RequestMethod": "PATCH", "RequestHeaders": { "Accept": "application/json", - "Content-Length": "728", + "Content-Length": "757", "Content-Type": "application/merge-patch\u002Bjson", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-32964e70c464434b8bd65678b5f027c5-b61a63a853d7bc40-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-2f9e509f554c08499c336baf42fc67ac-b4c8e4a34ee9114f-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "0a3469a9e65d62385b921a9b3970d27f", "x-ms-return-client-request-id": "true" @@ -225,97 +225,26 @@ "fake@viewer.com" ], "status": "Active", - "actionLinkTemplate": "https://fakeurl.com/%datafeed/%metric" - }, - "StatusCode": 200, - "ResponseHeaders": { - "apim-request-id": "033b8702-f805-4ac1-ac8a-dcf4e214818b", - "Content-Length": "1117", - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:41:54 GMT", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "905", - "x-request-id": "033b8702-f805-4ac1-ac8a-dcf4e214818b" - }, - "ResponseBody": { - "dataFeedId": "caab9fef-f1b2-4f54-ba41-beee8e89e565", - "dataFeedName": "dataFeedh9eW4KWH", - "metrics": [ - { - "metricId": "9617b205-1ce9-485a-9004-7297fde958ce", - "metricName": "cost", - "metricDisplayName": "cost", - "metricDescription": "" - } - ], - "dimension": [], - "dataStartFrom": "2020-09-21T00:00:00Z", - "dataSourceType": "AzureDataLakeStorageGen2", - "timestampColumn": "updatedTimestampColumn", - "startOffsetInSeconds": 2400, - "maxQueryPerMinute": 30.0, - "granularityName": "Daily", - "needRollup": "NoRollup", - "fillMissingPointType": "NoFilling", - "fillMissingPointValue": 0.0, - "rollUpMethod": "None", - "dataFeedDescription": "This data feed was updated to test the .NET client.", - "stopRetryAfterInSeconds": 1200, - "minRetryIntervalInSeconds": 90, - "maxConcurrency": 6, - "viewMode": "Public", - "admins": [ - "fake@admin.com", - "foo@contoso.com" - ], - "viewers": [ - "fake@viewer.com" - ], - "creator": "foo@contoso.com", - "status": "Active", - "createdTime": "2021-06-03T21:41:53Z", - "isAdmin": true, "actionLinkTemplate": "https://fakeurl.com/%datafeed/%metric", - "dataSourceParameter": { - "fileTemplate": "file", - "accountName": "account", - "directoryTemplate": "dir", - "fileSystemName": "fileSystem" - }, "authenticationType": "Basic" - } - }, - { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/caab9fef-f1b2-4f54-ba41-beee8e89e565", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-af50a407b9bf4a4891995862e170e739-fcc1ac14d9881442-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-api-key": "Sanitized", - "x-ms-client-request-id": "edc4b53beac14ceed83fedd7c2b32620", - "x-ms-return-client-request-id": "true" }, - "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "9cae016e-d543-4ee2-b6d5-c1ba849e259e", + "apim-request-id": "801db2e3-9164-4c2f-b008-2d1d8df611c9", "Content-Length": "1117", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:41:54 GMT", + "Date": "Sat, 05 Jun 2021 03:33:35 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "167", - "x-request-id": "9cae016e-d543-4ee2-b6d5-c1ba849e259e" + "x-envoy-upstream-service-time": "6134", + "x-request-id": "801db2e3-9164-4c2f-b008-2d1d8df611c9" }, "ResponseBody": { - "dataFeedId": "caab9fef-f1b2-4f54-ba41-beee8e89e565", + "dataFeedId": "d6dbe2ee-6f64-4089-bd37-51b8d8f1b81b", "dataFeedName": "dataFeedh9eW4KWH", "metrics": [ { - "metricId": "9617b205-1ce9-485a-9004-7297fde958ce", + "metricId": "b2526f60-fc3d-400d-bd08-8a884314dd7d", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -346,7 +275,7 @@ ], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:41:53Z", + "createdTime": "2021-06-05T03:33:24Z", "isAdmin": true, "actionLinkTemplate": "https://fakeurl.com/%datafeed/%metric", "dataSourceParameter": { @@ -359,33 +288,33 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/caab9fef-f1b2-4f54-ba41-beee8e89e565", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/d6dbe2ee-6f64-4089-bd37-51b8d8f1b81b", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-c45ef13faefee545979a0a8a0103302f-449c835c06d00747-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-4ff28bc2e5f39e4e934ecbdd561f4f5a-8118cb76202d6648-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", - "x-ms-client-request-id": "d6c39a1e277fc0a9e14a9e494c5a42cb", + "x-ms-client-request-id": "edc4b53beac14ceed83fedd7c2b32620", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "apim-request-id": "292e578e-887d-43c9-b1f1-688af17aea0e", + "apim-request-id": "f447242d-333f-48d6-aca8-4d94a1d993db", "Content-Length": "0", - "Date": "Thu, 03 Jun 2021 21:41:55 GMT", + "Date": "Sat, 05 Jun 2021 03:33:36 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "325", - "x-request-id": "292e578e-887d-43c9-b1f1-688af17aea0e" + "x-envoy-upstream-service-time": "340", + "x-request-id": "f447242d-333f-48d6-aca8-4d94a1d993db" }, "ResponseBody": [] } ], "Variables": { - "DateTimeOffsetNow": "2021-06-03T14:41:55.2168381-07:00", + "DateTimeOffsetNow": "2021-06-04T20:33:35.5220231-07:00", "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", "METRICSADVISOR_ENDPOINT_SUFFIX": null, "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataLakeStorageGen2DataFeedWithMinimumSetupAndGetInstance.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataLakeStorageGen2DataFeedWithMinimumSetupAndGetInstance.json index a5626c27f782e..727e43afd587e 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataLakeStorageGen2DataFeedWithMinimumSetupAndGetInstance.json +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataLakeStorageGen2DataFeedWithMinimumSetupAndGetInstance.json @@ -8,8 +8,8 @@ "Content-Length": "329", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-3ab257a9577d224d81cd74ce0c2b44b7-e551dc2b6c6edf4c-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-c2fda9c243206a409e88dabc78d8f649-d638e227c614eb4f-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "ef6a38f46e3d405c07e5d21c5bef1e20", "x-ms-return-client-request-id": "true" @@ -34,25 +34,25 @@ }, "StatusCode": 201, "ResponseHeaders": { - "apim-request-id": "0b315bf6-aa7f-433e-bfb9-aa7fd2730660", + "apim-request-id": "2548b6ee-13a9-49c7-a483-6c1dd5f1dc73", "Content-Length": "0", - "Date": "Thu, 03 Jun 2021 21:40:15 GMT", - "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/9dca4efa-4eb1-4bbc-ad2c-1296b74385a6", + "Date": "Sat, 05 Jun 2021 03:31:40 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/e6f2bf94-89c9-4b0b-8154-d9da74805624", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "654", - "x-request-id": "0b315bf6-aa7f-433e-bfb9-aa7fd2730660" + "x-envoy-upstream-service-time": "666", + "x-request-id": "2548b6ee-13a9-49c7-a483-6c1dd5f1dc73" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/9dca4efa-4eb1-4bbc-ad2c-1296b74385a6", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/e6f2bf94-89c9-4b0b-8154-d9da74805624", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-3ab257a9577d224d81cd74ce0c2b44b7-dcd9ae11b02f604b-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-c2fda9c243206a409e88dabc78d8f649-23b7a5b735e68c4c-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "d29262a6135476791ae87432158d46fb", "x-ms-return-client-request-id": "true" @@ -60,21 +60,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "45aa34cb-d007-4f01-ab14-57e1863c1efc", + "apim-request-id": "8d6baad4-3286-454e-b39d-f57c9937201d", "Content-Length": "974", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:40:16 GMT", + "Date": "Sat, 05 Jun 2021 03:31:40 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "154", - "x-request-id": "45aa34cb-d007-4f01-ab14-57e1863c1efc" + "x-envoy-upstream-service-time": "256", + "x-request-id": "8d6baad4-3286-454e-b39d-f57c9937201d" }, "ResponseBody": { - "dataFeedId": "9dca4efa-4eb1-4bbc-ad2c-1296b74385a6", + "dataFeedId": "e6f2bf94-89c9-4b0b-8154-d9da74805624", "dataFeedName": "dataFeed4bG4Zh90", "metrics": [ { - "metricId": "0e43a261-63d4-407e-91cf-53f44ba99a5f", + "metricId": "f9d8457e-193a-433c-9326-abd32cf0981e", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -102,7 +102,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:40:16Z", + "createdTime": "2021-06-05T03:31:39Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -115,13 +115,13 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/9dca4efa-4eb1-4bbc-ad2c-1296b74385a6", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/e6f2bf94-89c9-4b0b-8154-d9da74805624", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-ed89554f86d6814e9e78b6dfe4588855-ac61ef83700bf845-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-ec0f13a23382fc40a6c24ecbc94314a5-6e3aacc9451e4e45-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "9dd43809802bb06671c505ee62e31306", "x-ms-return-client-request-id": "true" @@ -129,21 +129,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "d071add4-e82b-46c0-a51a-6adee798b2ee", + "apim-request-id": "565930e4-0a50-43e0-aa69-335077758ed8", "Content-Length": "974", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:40:16 GMT", + "Date": "Sat, 05 Jun 2021 03:31:40 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "164", - "x-request-id": "d071add4-e82b-46c0-a51a-6adee798b2ee" + "x-envoy-upstream-service-time": "274", + "x-request-id": "565930e4-0a50-43e0-aa69-335077758ed8" }, "ResponseBody": { - "dataFeedId": "9dca4efa-4eb1-4bbc-ad2c-1296b74385a6", + "dataFeedId": "e6f2bf94-89c9-4b0b-8154-d9da74805624", "dataFeedName": "dataFeed4bG4Zh90", "metrics": [ { - "metricId": "0e43a261-63d4-407e-91cf-53f44ba99a5f", + "metricId": "f9d8457e-193a-433c-9326-abd32cf0981e", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -171,7 +171,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:40:16Z", + "createdTime": "2021-06-05T03:31:39Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -184,15 +184,15 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/9dca4efa-4eb1-4bbc-ad2c-1296b74385a6", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/e6f2bf94-89c9-4b0b-8154-d9da74805624", "RequestMethod": "PATCH", "RequestHeaders": { "Accept": "application/json", - "Content-Length": "636", + "Content-Length": "665", "Content-Type": "application/merge-patch\u002Bjson", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-603d16ec04b3ed4ca7001a2ecb1bec98-7b9385def17a3f45-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-682d09075f03d34a9f50efd3947d2ca6-9517f9dc38f33f48-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "c41b455b6183e04dbef3d455f92a2a79", "x-ms-return-client-request-id": "true" @@ -222,94 +222,26 @@ ], "viewers": [], "status": "Active", - "actionLinkTemplate": "" - }, - "StatusCode": 200, - "ResponseHeaders": { - "apim-request-id": "1c71111e-873d-49b7-b073-c91b85562dba", - "Content-Length": "1025", - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:40:17 GMT", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "1028", - "x-request-id": "1c71111e-873d-49b7-b073-c91b85562dba" - }, - "ResponseBody": { - "dataFeedId": "9dca4efa-4eb1-4bbc-ad2c-1296b74385a6", - "dataFeedName": "dataFeed4bG4Zh90", - "metrics": [ - { - "metricId": "0e43a261-63d4-407e-91cf-53f44ba99a5f", - "metricName": "cost", - "metricDisplayName": "cost", - "metricDescription": "" - } - ], - "dimension": [], - "dataStartFrom": "2020-08-01T00:00:00Z", - "dataSourceType": "AzureDataLakeStorageGen2", - "timestampColumn": "", - "startOffsetInSeconds": 0, - "maxQueryPerMinute": 30.0, - "granularityName": "Daily", - "needRollup": "NoRollup", - "fillMissingPointType": "PreviousValue", - "fillMissingPointValue": 0.0, - "rollUpMethod": "None", - "dataFeedDescription": "This data feed was created to test the .NET client.", - "stopRetryAfterInSeconds": -1, - "minRetryIntervalInSeconds": -1, - "maxConcurrency": -1, - "viewMode": "Private", - "admins": [ - "foo@contoso.com" - ], - "viewers": [], - "creator": "foo@contoso.com", - "status": "Active", - "createdTime": "2021-06-03T21:40:16Z", - "isAdmin": true, "actionLinkTemplate": "", - "dataSourceParameter": { - "fileTemplate": "file", - "accountName": "account", - "directoryTemplate": "dir", - "fileSystemName": "fileSystem" - }, "authenticationType": "Basic" - } - }, - { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/9dca4efa-4eb1-4bbc-ad2c-1296b74385a6", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-243718e4365da14bbf61f4c8fd610692-9e1bda2453c9cb42-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-api-key": "Sanitized", - "x-ms-client-request-id": "2212d69f811a25f5fce1618f0e8a1337", - "x-ms-return-client-request-id": "true" }, - "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "9d6869a4-746d-4fb4-8925-ca2ca6efddc1", + "apim-request-id": "a02f76f8-d027-4777-a245-a3fcc5742f6c", "Content-Length": "1025", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:40:17 GMT", + "Date": "Sat, 05 Jun 2021 03:31:41 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "154", - "x-request-id": "9d6869a4-746d-4fb4-8925-ca2ca6efddc1" + "x-envoy-upstream-service-time": "830", + "x-request-id": "a02f76f8-d027-4777-a245-a3fcc5742f6c" }, "ResponseBody": { - "dataFeedId": "9dca4efa-4eb1-4bbc-ad2c-1296b74385a6", + "dataFeedId": "e6f2bf94-89c9-4b0b-8154-d9da74805624", "dataFeedName": "dataFeed4bG4Zh90", "metrics": [ { - "metricId": "0e43a261-63d4-407e-91cf-53f44ba99a5f", + "metricId": "f9d8457e-193a-433c-9326-abd32cf0981e", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -337,7 +269,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:40:16Z", + "createdTime": "2021-06-05T03:31:39Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -350,33 +282,33 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/9dca4efa-4eb1-4bbc-ad2c-1296b74385a6", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/e6f2bf94-89c9-4b0b-8154-d9da74805624", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-aae4b7cb03d1af40962a8edb3ea36cea-eb9a67db0e5fcb42-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-411b7b137750d94a961528c287539168-f2a93455905c394f-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", - "x-ms-client-request-id": "cfd76ed48171a877ebf4de37ab10b746", + "x-ms-client-request-id": "2212d69f811a25f5fce1618f0e8a1337", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "apim-request-id": "1f0cbb98-50dd-440f-a1ff-483e00abcbdc", + "apim-request-id": "997beb93-b596-4ece-a326-ffb706839bbb", "Content-Length": "0", - "Date": "Thu, 03 Jun 2021 21:40:17 GMT", + "Date": "Sat, 05 Jun 2021 03:31:41 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "310", - "x-request-id": "1f0cbb98-50dd-440f-a1ff-483e00abcbdc" + "x-envoy-upstream-service-time": "416", + "x-request-id": "997beb93-b596-4ece-a326-ffb706839bbb" }, "ResponseBody": [] } ], "Variables": { - "DateTimeOffsetNow": "2021-06-03T14:40:17.8905592-07:00", + "DateTimeOffsetNow": "2021-06-04T20:31:40.6677634-07:00", "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", "METRICSADVISOR_ENDPOINT_SUFFIX": null, "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataLakeStorageGen2DataFeedWithMinimumSetupAndGetInstanceAsync.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataLakeStorageGen2DataFeedWithMinimumSetupAndGetInstanceAsync.json index 9897b98ea8405..337e1ce95581f 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataLakeStorageGen2DataFeedWithMinimumSetupAndGetInstanceAsync.json +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateAzureDataLakeStorageGen2DataFeedWithMinimumSetupAndGetInstanceAsync.json @@ -8,8 +8,8 @@ "Content-Length": "329", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-5ed1c0e3166a5044ab3d603b83a12fbb-cbb65640302a6146-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-10393108f3199b4c8566b3649c494a6e-e6f65dade3c09f4c-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "05a5a7780861b4c465ad1d806ed158b9", "x-ms-return-client-request-id": "true" @@ -34,25 +34,25 @@ }, "StatusCode": 201, "ResponseHeaders": { - "apim-request-id": "c7a79e7c-95aa-44be-995e-7bb4c85563ce", + "apim-request-id": "b7c761ad-2f75-4a02-b132-9a0fbe6cef99", "Content-Length": "0", - "Date": "Thu, 03 Jun 2021 21:41:55 GMT", - "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/d1aec3ad-5aff-44f7-b5a3-1d91526b4a86", + "Date": "Sat, 05 Jun 2021 03:33:37 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/86deb8af-34dd-494e-8d30-23e8e2089e30", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "327", - "x-request-id": "c7a79e7c-95aa-44be-995e-7bb4c85563ce" + "x-envoy-upstream-service-time": "731", + "x-request-id": "b7c761ad-2f75-4a02-b132-9a0fbe6cef99" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/d1aec3ad-5aff-44f7-b5a3-1d91526b4a86", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/86deb8af-34dd-494e-8d30-23e8e2089e30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-5ed1c0e3166a5044ab3d603b83a12fbb-60030419ad21914a-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-10393108f3199b4c8566b3649c494a6e-99539ea6be987a43-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "df0dcbbb0833cc40ef60347ba3a6db8b", "x-ms-return-client-request-id": "true" @@ -60,21 +60,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "a7692a6f-e24e-4117-9bab-bba9f8c74c0c", + "apim-request-id": "2f4363a3-72fb-4de9-aca2-e36b6b8e4f6d", "Content-Length": "974", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:41:55 GMT", + "Date": "Sat, 05 Jun 2021 03:33:37 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "153", - "x-request-id": "a7692a6f-e24e-4117-9bab-bba9f8c74c0c" + "x-envoy-upstream-service-time": "295", + "x-request-id": "2f4363a3-72fb-4de9-aca2-e36b6b8e4f6d" }, "ResponseBody": { - "dataFeedId": "d1aec3ad-5aff-44f7-b5a3-1d91526b4a86", + "dataFeedId": "86deb8af-34dd-494e-8d30-23e8e2089e30", "dataFeedName": "dataFeedMwrVGTPj", "metrics": [ { - "metricId": "be1c9019-8a1a-42e8-9c47-01d95feb3593", + "metricId": "1f342aaa-2a05-4486-914f-f1040e7938e0", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -102,7 +102,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:41:56Z", + "createdTime": "2021-06-05T03:33:38Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -115,13 +115,13 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/d1aec3ad-5aff-44f7-b5a3-1d91526b4a86", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/86deb8af-34dd-494e-8d30-23e8e2089e30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-be13409a7dd48f4583005f1b22fde136-0c6a22baf3a0d24d-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-c94619e1f390e7458ec4d291797d26bb-53ff4bce7ea99041-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "180857cb4ad2d9526d4f3a16a3eb5403", "x-ms-return-client-request-id": "true" @@ -129,21 +129,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "b7b6495f-b196-4a7f-8f73-693e3fcefca3", + "apim-request-id": "f558895d-3bae-4d92-b37e-a835aff18ae9", "Content-Length": "974", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:41:55 GMT", + "Date": "Sat, 05 Jun 2021 03:33:37 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "275", - "x-request-id": "b7b6495f-b196-4a7f-8f73-693e3fcefca3" + "x-envoy-upstream-service-time": "164", + "x-request-id": "f558895d-3bae-4d92-b37e-a835aff18ae9" }, "ResponseBody": { - "dataFeedId": "d1aec3ad-5aff-44f7-b5a3-1d91526b4a86", + "dataFeedId": "86deb8af-34dd-494e-8d30-23e8e2089e30", "dataFeedName": "dataFeedMwrVGTPj", "metrics": [ { - "metricId": "be1c9019-8a1a-42e8-9c47-01d95feb3593", + "metricId": "1f342aaa-2a05-4486-914f-f1040e7938e0", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -171,7 +171,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:41:56Z", + "createdTime": "2021-06-05T03:33:38Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -184,15 +184,15 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/d1aec3ad-5aff-44f7-b5a3-1d91526b4a86", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/86deb8af-34dd-494e-8d30-23e8e2089e30", "RequestMethod": "PATCH", "RequestHeaders": { "Accept": "application/json", - "Content-Length": "636", + "Content-Length": "665", "Content-Type": "application/merge-patch\u002Bjson", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-7bc888fa1aed864bbf061438f1ff21a4-e0fbd09278239242-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-80df2dcc5604e341952c0b6002ddee4a-88e82e6ebf95014a-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "8f8a611b9a5c6f2366d91500d44910be", "x-ms-return-client-request-id": "true" @@ -222,94 +222,26 @@ ], "viewers": [], "status": "Active", - "actionLinkTemplate": "" - }, - "StatusCode": 200, - "ResponseHeaders": { - "apim-request-id": "c3dc8c37-467f-44fa-993d-37f2d18445f5", - "Content-Length": "1025", - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:41:56 GMT", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "722", - "x-request-id": "c3dc8c37-467f-44fa-993d-37f2d18445f5" - }, - "ResponseBody": { - "dataFeedId": "d1aec3ad-5aff-44f7-b5a3-1d91526b4a86", - "dataFeedName": "dataFeedMwrVGTPj", - "metrics": [ - { - "metricId": "be1c9019-8a1a-42e8-9c47-01d95feb3593", - "metricName": "cost", - "metricDisplayName": "cost", - "metricDescription": "" - } - ], - "dimension": [], - "dataStartFrom": "2020-08-01T00:00:00Z", - "dataSourceType": "AzureDataLakeStorageGen2", - "timestampColumn": "", - "startOffsetInSeconds": 0, - "maxQueryPerMinute": 30.0, - "granularityName": "Daily", - "needRollup": "NoRollup", - "fillMissingPointType": "PreviousValue", - "fillMissingPointValue": 0.0, - "rollUpMethod": "None", - "dataFeedDescription": "This data feed was created to test the .NET client.", - "stopRetryAfterInSeconds": -1, - "minRetryIntervalInSeconds": -1, - "maxConcurrency": -1, - "viewMode": "Private", - "admins": [ - "foo@contoso.com" - ], - "viewers": [], - "creator": "foo@contoso.com", - "status": "Active", - "createdTime": "2021-06-03T21:41:56Z", - "isAdmin": true, "actionLinkTemplate": "", - "dataSourceParameter": { - "fileTemplate": "file", - "accountName": "account", - "directoryTemplate": "dir", - "fileSystemName": "fileSystem" - }, "authenticationType": "Basic" - } - }, - { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/d1aec3ad-5aff-44f7-b5a3-1d91526b4a86", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-e8c8b62e0557064c91acc43bc9cae787-ece34008f30f2545-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-api-key": "Sanitized", - "x-ms-client-request-id": "16b492d240c970e7783471e3cd292803", - "x-ms-return-client-request-id": "true" }, - "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "14b6ffe1-acb7-41d6-8be2-61da51a0c890", + "apim-request-id": "31c19366-88c7-4200-85e9-3c2c1843a2a1", "Content-Length": "1025", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:41:56 GMT", + "Date": "Sat, 05 Jun 2021 03:33:38 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "158", - "x-request-id": "14b6ffe1-acb7-41d6-8be2-61da51a0c890" + "x-envoy-upstream-service-time": "894", + "x-request-id": "31c19366-88c7-4200-85e9-3c2c1843a2a1" }, "ResponseBody": { - "dataFeedId": "d1aec3ad-5aff-44f7-b5a3-1d91526b4a86", + "dataFeedId": "86deb8af-34dd-494e-8d30-23e8e2089e30", "dataFeedName": "dataFeedMwrVGTPj", "metrics": [ { - "metricId": "be1c9019-8a1a-42e8-9c47-01d95feb3593", + "metricId": "1f342aaa-2a05-4486-914f-f1040e7938e0", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -337,7 +269,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:41:56Z", + "createdTime": "2021-06-05T03:33:38Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -350,33 +282,33 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/d1aec3ad-5aff-44f7-b5a3-1d91526b4a86", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/86deb8af-34dd-494e-8d30-23e8e2089e30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-187a199adf6a674094e85352b412c7f1-b11411dca756104b-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-bc7ff8d31d48cc418b98353b041043d9-2778db14454e684c-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", - "x-ms-client-request-id": "415f300b4c1b302e3498b1f834520524", + "x-ms-client-request-id": "16b492d240c970e7783471e3cd292803", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "apim-request-id": "1efa0e58-9cce-4d5a-ba1f-5a2ab89f160a", + "apim-request-id": "90013bd4-6e83-4a9c-b6b8-1f54d08d039c", "Content-Length": "0", - "Date": "Thu, 03 Jun 2021 21:41:57 GMT", + "Date": "Sat, 05 Jun 2021 03:33:39 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "320", - "x-request-id": "1efa0e58-9cce-4d5a-ba1f-5a2ab89f160a" + "x-envoy-upstream-service-time": "377", + "x-request-id": "90013bd4-6e83-4a9c-b6b8-1f54d08d039c" }, "ResponseBody": [] } ], "Variables": { - "DateTimeOffsetNow": "2021-06-03T14:41:57.3762258-07:00", + "DateTimeOffsetNow": "2021-06-04T20:33:38.8491512-07:00", "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", "METRICSADVISOR_ENDPOINT_SUFFIX": null, "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithAuthentication(Basic).json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithAuthentication(Basic).json new file mode 100644 index 0000000000000..cf0bc2c2cad22 --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithAuthentication(Basic).json @@ -0,0 +1,302 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "233", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-4f18f6ca2aed8b4b8338fa1cbab6424e-bf947889882cb941-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "897003af1073e57126e40e1a0b8a173a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "query": "mock" + }, + "dataSourceType": "SqlServer", + "dataFeedName": "dataFeedw7kR2Ijn", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "ca03ebf1-f5b6-48b4-bad8-33f361935aef", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:17 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/7d3d6a52-9bec-484b-a76a-f8f6aa0a4eb5", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "728", + "x-request-id": "ca03ebf1-f5b6-48b4-bad8-33f361935aef" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/7d3d6a52-9bec-484b-a76a-f8f6aa0a4eb5", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-4f18f6ca2aed8b4b8338fa1cbab6424e-38372b1a3f8a774b-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "9c28cf18c75d5ab76aac3a0f28d37100", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "551a5e07-f8ee-465e-80e2-8098d790c952", + "Content-Length": "872", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:18 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "160", + "x-request-id": "551a5e07-f8ee-465e-80e2-8098d790c952" + }, + "ResponseBody": { + "dataFeedId": "7d3d6a52-9bec-484b-a76a-f8f6aa0a4eb5", + "dataFeedName": "dataFeedw7kR2Ijn", + "metrics": [ + { + "metricId": "7afb6b64-8439-4e01-a6de-15f0e64cd2c8", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:17Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/7d3d6a52-9bec-484b-a76a-f8f6aa0a4eb5", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-475fc1a485342e499f9e385877e1730d-a7b6e95055c4b44f-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "1dddc20460903a46ed9a8e8edb9ad061", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "b62c5548-37f0-41ff-b363-c378ff29cfc3", + "Content-Length": "872", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:18 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "168", + "x-request-id": "b62c5548-37f0-41ff-b363-c378ff29cfc3" + }, + "ResponseBody": { + "dataFeedId": "7d3d6a52-9bec-484b-a76a-f8f6aa0a4eb5", + "dataFeedName": "dataFeedw7kR2Ijn", + "metrics": [ + { + "metricId": "7afb6b64-8439-4e01-a6de-15f0e64cd2c8", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:17Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/7d3d6a52-9bec-484b-a76a-f8f6aa0a4eb5", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "512", + "Content-Type": "application/merge-patch\u002Bjson", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-820b6cbbccda694a95a92cfb784538f3-7b1b5aa0bc224645-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "7ed92927302fe7f24c151ec7d562bc52", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "query": "mock" + }, + "dataSourceType": "SqlServer", + "dataFeedName": "dataFeedw7kR2Ijn", + "dataFeedDescription": "", + "timestampColumn": "", + "dataStartFrom": "2020-08-01T00:00:00Z", + "startOffsetInSeconds": 0, + "maxConcurrency": -1, + "minRetryIntervalInSeconds": -1, + "stopRetryAfterInSeconds": -1, + "needRollup": "NoRollup", + "rollUpMethod": "None", + "fillMissingPointType": "PreviousValue", + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "status": "Active", + "actionLinkTemplate": "", + "authenticationType": "Basic" + }, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "b5913b14-dd64-46f4-b648-7f8ff508244c", + "Content-Length": "872", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:19 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "1105", + "x-request-id": "b5913b14-dd64-46f4-b648-7f8ff508244c" + }, + "ResponseBody": { + "dataFeedId": "7d3d6a52-9bec-484b-a76a-f8f6aa0a4eb5", + "dataFeedName": "dataFeedw7kR2Ijn", + "metrics": [ + { + "metricId": "7afb6b64-8439-4e01-a6de-15f0e64cd2c8", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:17Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/7d3d6a52-9bec-484b-a76a-f8f6aa0a4eb5", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-9a611d6705d3384d98fb37e59586eddf-82b1aed74ce6ac42-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "49150e72faacb7a988eeaec239287fd0", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "644191e0-febe-4607-ae7b-036d53c2b072", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:19 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "312", + "x-request-id": "644191e0-febe-4607-ae7b-036d53c2b072" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "2094752014" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithAuthentication(Basic)Async.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithAuthentication(Basic)Async.json new file mode 100644 index 0000000000000..f4a7e3405b7ef --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithAuthentication(Basic)Async.json @@ -0,0 +1,302 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "233", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-0b3991c5b81e67448f0412cd85337a1a-ffcb56508442a142-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "a323e0360cb37873706c6c584989b75b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "query": "mock" + }, + "dataSourceType": "SqlServer", + "dataFeedName": "dataFeed6wILODue", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "299143a5-df9e-4e49-b8de-8f005ea52e5c", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:41:31 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/e7c36c25-2170-41f4-96e7-87baab161dc9", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "514", + "x-request-id": "299143a5-df9e-4e49-b8de-8f005ea52e5c" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/e7c36c25-2170-41f4-96e7-87baab161dc9", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-0b3991c5b81e67448f0412cd85337a1a-93b59ee928659940-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "023ec6fa5c783976f76c5ce36c691f26", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "50b6cb01-028b-4353-aba6-1052d8bf748f", + "Content-Length": "872", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:41:31 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "167", + "x-request-id": "50b6cb01-028b-4353-aba6-1052d8bf748f" + }, + "ResponseBody": { + "dataFeedId": "e7c36c25-2170-41f4-96e7-87baab161dc9", + "dataFeedName": "dataFeed6wILODue", + "metrics": [ + { + "metricId": "1af2be45-be04-4b2b-9f18-82af4911e377", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:41:31Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/e7c36c25-2170-41f4-96e7-87baab161dc9", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-6a201ae1a15b0048a70ccd1bfa763125-456e282e304c134f-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "4d6183a55fa7532bec9dbfa81477d8e5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "9210177c-d4d6-4467-90f2-968ce2fa89a2", + "Content-Length": "872", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:41:31 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "170", + "x-request-id": "9210177c-d4d6-4467-90f2-968ce2fa89a2" + }, + "ResponseBody": { + "dataFeedId": "e7c36c25-2170-41f4-96e7-87baab161dc9", + "dataFeedName": "dataFeed6wILODue", + "metrics": [ + { + "metricId": "1af2be45-be04-4b2b-9f18-82af4911e377", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:41:31Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/e7c36c25-2170-41f4-96e7-87baab161dc9", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "512", + "Content-Type": "application/merge-patch\u002Bjson", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-3c91ba3684ca48478d6a9c212e520d16-67939d3712edea4e-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "88b81f10573cda5b69eaac47b08f0b07", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "query": "mock" + }, + "dataSourceType": "SqlServer", + "dataFeedName": "dataFeed6wILODue", + "dataFeedDescription": "", + "timestampColumn": "", + "dataStartFrom": "2020-08-01T00:00:00Z", + "startOffsetInSeconds": 0, + "maxConcurrency": -1, + "minRetryIntervalInSeconds": -1, + "stopRetryAfterInSeconds": -1, + "needRollup": "NoRollup", + "rollUpMethod": "None", + "fillMissingPointType": "PreviousValue", + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "status": "Active", + "actionLinkTemplate": "", + "authenticationType": "Basic" + }, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "6dce8942-4fd5-4695-8486-a93f832bdda6", + "Content-Length": "872", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:41:32 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "895", + "x-request-id": "6dce8942-4fd5-4695-8486-a93f832bdda6" + }, + "ResponseBody": { + "dataFeedId": "e7c36c25-2170-41f4-96e7-87baab161dc9", + "dataFeedName": "dataFeed6wILODue", + "metrics": [ + { + "metricId": "1af2be45-be04-4b2b-9f18-82af4911e377", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:41:31Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/e7c36c25-2170-41f4-96e7-87baab161dc9", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-4b0976071c412a4ab55a08a678e91bea-a4651e7beb03cd4b-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "c5b2454d69289bb49aeb16da9ccd247f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "71763f25-b5e2-48fa-b20b-892c18a41523", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:41:33 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "344", + "x-request-id": "71763f25-b5e2-48fa-b20b-892c18a41523" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "659883451" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithAuthentication(ManagedIdentity).json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithAuthentication(ManagedIdentity).json new file mode 100644 index 0000000000000..0e3f7012fed73 --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithAuthentication(ManagedIdentity).json @@ -0,0 +1,302 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "233", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-be259cac29daad41920c8783dfd7443b-142aad34d54d9a44-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "e727acbaa1d75d808d4d3a73ad45718e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "query": "mock" + }, + "dataSourceType": "SqlServer", + "dataFeedName": "dataFeedXSoJLYlq", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "cca83415-2714-4f59-a214-d6b877669b88", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:20 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/57ff47d3-a816-40e7-95f9-78262a6afd03", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "684", + "x-request-id": "cca83415-2714-4f59-a214-d6b877669b88" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/57ff47d3-a816-40e7-95f9-78262a6afd03", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-be259cac29daad41920c8783dfd7443b-c6d8ed1a39881a4f-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "bbaa57faf0f74e5ebf414539153df732", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "143245f1-173c-4d54-9ae2-c3fd4b81c7b8", + "Content-Length": "872", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:20 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "180", + "x-request-id": "143245f1-173c-4d54-9ae2-c3fd4b81c7b8" + }, + "ResponseBody": { + "dataFeedId": "57ff47d3-a816-40e7-95f9-78262a6afd03", + "dataFeedName": "dataFeedXSoJLYlq", + "metrics": [ + { + "metricId": "d8ea0fd0-6618-47b1-87c3-b86335241ce5", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:20Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/57ff47d3-a816-40e7-95f9-78262a6afd03", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-111f0a65da377741935b3fa333b4d432-d579a2d7405a204a-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "ae9e5a1400d8fec97be965ccdad378cf", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "bd0a24c0-b246-491d-a942-dcc366c871f2", + "Content-Length": "872", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:20 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "173", + "x-request-id": "bd0a24c0-b246-491d-a942-dcc366c871f2" + }, + "ResponseBody": { + "dataFeedId": "57ff47d3-a816-40e7-95f9-78262a6afd03", + "dataFeedName": "dataFeedXSoJLYlq", + "metrics": [ + { + "metricId": "d8ea0fd0-6618-47b1-87c3-b86335241ce5", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:20Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/57ff47d3-a816-40e7-95f9-78262a6afd03", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "522", + "Content-Type": "application/merge-patch\u002Bjson", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-86b8adb1d64418408ea49db7a1d6fbcd-fae5b27ae8a8634d-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "624e8aa14366c9274ed928955c47484f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "query": "mock" + }, + "dataSourceType": "SqlServer", + "dataFeedName": "dataFeedXSoJLYlq", + "dataFeedDescription": "", + "timestampColumn": "", + "dataStartFrom": "2020-08-01T00:00:00Z", + "startOffsetInSeconds": 0, + "maxConcurrency": -1, + "minRetryIntervalInSeconds": -1, + "stopRetryAfterInSeconds": -1, + "needRollup": "NoRollup", + "rollUpMethod": "None", + "fillMissingPointType": "PreviousValue", + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "status": "Active", + "actionLinkTemplate": "", + "authenticationType": "ManagedIdentity" + }, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "13fe2a47-6a0f-4b50-a23e-15bad55fa0c9", + "Content-Length": "882", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:21 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "903", + "x-request-id": "13fe2a47-6a0f-4b50-a23e-15bad55fa0c9" + }, + "ResponseBody": { + "dataFeedId": "57ff47d3-a816-40e7-95f9-78262a6afd03", + "dataFeedName": "dataFeedXSoJLYlq", + "metrics": [ + { + "metricId": "d8ea0fd0-6618-47b1-87c3-b86335241ce5", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:20Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "ManagedIdentity" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/57ff47d3-a816-40e7-95f9-78262a6afd03", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-38693b6f33447b4481f54e026ace395a-82f9f6b4ac53694d-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "535f0756c3a6fab58eac400d8b9173ec", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "e39a8a2d-3dc5-4c01-92ea-4a7aff425899", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:22 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "315", + "x-request-id": "e39a8a2d-3dc5-4c01-92ea-4a7aff425899" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "1008138747" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithAuthentication(ManagedIdentity)Async.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithAuthentication(ManagedIdentity)Async.json new file mode 100644 index 0000000000000..a1805a69fe44f --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithAuthentication(ManagedIdentity)Async.json @@ -0,0 +1,302 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "233", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-cc223dc33bd66d49baece9d8ef0deac6-955fc9d52618fb45-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "dcb88e78af57d4ee93eda1adfb08fcef", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "query": "mock" + }, + "dataSourceType": "SqlServer", + "dataFeedName": "dataFeed7SMc14dJ", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "9087757c-ed16-48dc-96d4-517543bf5429", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:41:33 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/883c513c-cbba-4606-a052-7a7b939f0152", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "358", + "x-request-id": "9087757c-ed16-48dc-96d4-517543bf5429" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/883c513c-cbba-4606-a052-7a7b939f0152", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-cc223dc33bd66d49baece9d8ef0deac6-189d752ca5d0804d-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "148518ab1e5b74dd72170dd2b1fc5c75", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "0bfe2bdd-320b-4c85-883b-e7a9d161a2f2", + "Content-Length": "872", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:41:33 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "180", + "x-request-id": "0bfe2bdd-320b-4c85-883b-e7a9d161a2f2" + }, + "ResponseBody": { + "dataFeedId": "883c513c-cbba-4606-a052-7a7b939f0152", + "dataFeedName": "dataFeed7SMc14dJ", + "metrics": [ + { + "metricId": "7b5358c0-44e8-40ee-afe5-9a46a7a502fc", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:41:33Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/883c513c-cbba-4606-a052-7a7b939f0152", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-5276f51bad701e47916847fddb1e5ac8-8e1de1ec5bcbfa44-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "53ebc092b96b8f79930e87408ce63d19", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "507fd438-012f-469c-988c-03fff31ea1b7", + "Content-Length": "872", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:41:34 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "169", + "x-request-id": "507fd438-012f-469c-988c-03fff31ea1b7" + }, + "ResponseBody": { + "dataFeedId": "883c513c-cbba-4606-a052-7a7b939f0152", + "dataFeedName": "dataFeed7SMc14dJ", + "metrics": [ + { + "metricId": "7b5358c0-44e8-40ee-afe5-9a46a7a502fc", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:41:33Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/883c513c-cbba-4606-a052-7a7b939f0152", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "522", + "Content-Type": "application/merge-patch\u002Bjson", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-93dacf495ef6ac4da0c2180fe2a71bf7-3a02e10231e1bc42-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "3f4d8bc55a8259a3b0446a40a21b2396", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "query": "mock" + }, + "dataSourceType": "SqlServer", + "dataFeedName": "dataFeed7SMc14dJ", + "dataFeedDescription": "", + "timestampColumn": "", + "dataStartFrom": "2020-08-01T00:00:00Z", + "startOffsetInSeconds": 0, + "maxConcurrency": -1, + "minRetryIntervalInSeconds": -1, + "stopRetryAfterInSeconds": -1, + "needRollup": "NoRollup", + "rollUpMethod": "None", + "fillMissingPointType": "PreviousValue", + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "status": "Active", + "actionLinkTemplate": "", + "authenticationType": "ManagedIdentity" + }, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "715036ad-d94a-49a5-8a27-60fa54b3fdcc", + "Content-Length": "882", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:41:34 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "723", + "x-request-id": "715036ad-d94a-49a5-8a27-60fa54b3fdcc" + }, + "ResponseBody": { + "dataFeedId": "883c513c-cbba-4606-a052-7a7b939f0152", + "dataFeedName": "dataFeed7SMc14dJ", + "metrics": [ + { + "metricId": "7b5358c0-44e8-40ee-afe5-9a46a7a502fc", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:41:33Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "ManagedIdentity" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/883c513c-cbba-4606-a052-7a7b939f0152", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-484e7a15e36f3745ac7ed8a7bf537ceb-42f1ea88b446b648-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "3b1a2b91a81df1849ff5814d979de78b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "c802b9ab-e639-49fd-8d9d-88812fa5aa63", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:41:35 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "319", + "x-request-id": "c802b9ab-e639-49fd-8d9d-88812fa5aa63" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "2132818935" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithCredentialAuthentication(ServicePrincipal).json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithCredentialAuthentication(ServicePrincipal).json new file mode 100644 index 0000000000000..03a4cd1ff33dc --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithCredentialAuthentication(ServicePrincipal).json @@ -0,0 +1,400 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "173", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-d037baf50fa2df4db89127ebcaae1aab-f09511f55ed27046-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "1a4feef8dcf50e68a4eacc8683d8225d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "parameters": { + "clientId": "mock", + "clientSecret": "Sanitized", + "tenantId": "mock" + }, + "dataSourceCredentialType": "ServicePrincipal", + "dataSourceCredentialName": "credentialFMt84XyU" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "6ce8165f-81a2-4c7d-b7a9-edd517487eb4", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:22 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/c470217f-61d4-4859-9aba-0b894c523b66", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "483", + "x-request-id": "6ce8165f-81a2-4c7d-b7a9-edd517487eb4" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/c470217f-61d4-4859-9aba-0b894c523b66", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-d037baf50fa2df4db89127ebcaae1aab-865d16477ee3c949-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "0e4500ca9b6d10dc620427f382cf4254", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "6d0839ca-4007-4267-a1f9-9e41c32c94b7", + "Content-Length": "247", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:23 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "104", + "x-request-id": "6d0839ca-4007-4267-a1f9-9e41c32c94b7" + }, + "ResponseBody": { + "dataSourceCredentialId": "c470217f-61d4-4859-9aba-0b894c523b66", + "dataSourceCredentialName": "credentialFMt84XyU", + "dataSourceCredentialDescription": "", + "dataSourceCredentialType": "ServicePrincipal", + "parameters": { + "clientId": "mock", + "tenantId": "mock" + } + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "233", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-e6475701e0e2eb40949b6b321ddd5126-b1801bdb7e3bae4e-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "5bc710ce4eddc0e855e6b27ade55645d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "query": "mock" + }, + "dataSourceType": "SqlServer", + "dataFeedName": "dataFeedYdWmPGiX", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "6f568d9f-c01b-4d95-b177-63f91007450e", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:23 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/5277a071-bd5f-40cd-82d8-92cd2aca5e3d", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "563", + "x-request-id": "6f568d9f-c01b-4d95-b177-63f91007450e" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/5277a071-bd5f-40cd-82d8-92cd2aca5e3d", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-e6475701e0e2eb40949b6b321ddd5126-fa45fd26d6e87141-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "f1b73e1174b4d48ba878da63a186fada", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "254af807-43c1-4e4a-92b1-d265c343a752", + "Content-Length": "872", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:24 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "176", + "x-request-id": "254af807-43c1-4e4a-92b1-d265c343a752" + }, + "ResponseBody": { + "dataFeedId": "5277a071-bd5f-40cd-82d8-92cd2aca5e3d", + "dataFeedName": "dataFeedYdWmPGiX", + "metrics": [ + { + "metricId": "c1a2647c-7ac3-4356-bd4b-3cec3743b19b", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:24Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/5277a071-bd5f-40cd-82d8-92cd2aca5e3d", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-6b082d60f1610b4eb2619e72d5a9d3da-f69ce2930409ab4e-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "5d3f29fe80d313321c679d9b1cc77555", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "2d8f2cad-b169-40e1-b137-bf7a18beb849", + "Content-Length": "872", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:24 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "153", + "x-request-id": "2d8f2cad-b169-40e1-b137-bf7a18beb849" + }, + "ResponseBody": { + "dataFeedId": "5277a071-bd5f-40cd-82d8-92cd2aca5e3d", + "dataFeedName": "dataFeedYdWmPGiX", + "metrics": [ + { + "metricId": "c1a2647c-7ac3-4356-bd4b-3cec3743b19b", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:24Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/5277a071-bd5f-40cd-82d8-92cd2aca5e3d", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "577", + "Content-Type": "application/merge-patch\u002Bjson", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-6f8d851483ba6c41b3fccc2d552dba94-1d3d43c9dac0504a-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "2489d8bb1037596784f3b36573841ece", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "query": "mock" + }, + "dataSourceType": "SqlServer", + "dataFeedName": "dataFeedYdWmPGiX", + "dataFeedDescription": "", + "timestampColumn": "", + "dataStartFrom": "2020-08-01T00:00:00Z", + "startOffsetInSeconds": 0, + "maxConcurrency": -1, + "minRetryIntervalInSeconds": -1, + "stopRetryAfterInSeconds": -1, + "needRollup": "NoRollup", + "rollUpMethod": "None", + "fillMissingPointType": "PreviousValue", + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "status": "Active", + "actionLinkTemplate": "", + "authenticationType": "ServicePrincipal", + "credentialId": "c470217f-61d4-4859-9aba-0b894c523b66" + }, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "66abd6d2-5308-4ee0-ab72-fca69dab92fe", + "Content-Length": "937", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:25 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "935", + "x-request-id": "66abd6d2-5308-4ee0-ab72-fca69dab92fe" + }, + "ResponseBody": { + "dataFeedId": "5277a071-bd5f-40cd-82d8-92cd2aca5e3d", + "dataFeedName": "dataFeedYdWmPGiX", + "metrics": [ + { + "metricId": "c1a2647c-7ac3-4356-bd4b-3cec3743b19b", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:24Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "ServicePrincipal", + "credentialId": "c470217f-61d4-4859-9aba-0b894c523b66" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/5277a071-bd5f-40cd-82d8-92cd2aca5e3d", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-84dff7a7e18c8542b69fd5863fc28db6-0e08432f0dba6342-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "b47cd8ec0716908a0ba4d54dd7f0b7e0", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "07a18179-631d-47ee-9739-774843d2f049", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:25 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "343", + "x-request-id": "07a18179-631d-47ee-9739-774843d2f049" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/c470217f-61d4-4859-9aba-0b894c523b66", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-1b1d25f4e0d77f49adf1e1e3d58cc4ce-98068f98fe977e40-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "c8a78502d5fdeea3c2e5d8e0cdcda097", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "23dfc9ff-dace-41b2-803b-21b58f97bc3c", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:25 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "178", + "x-request-id": "23dfc9ff-dace-41b2-803b-21b58f97bc3c" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "1298481199" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithCredentialAuthentication(ServicePrincipal)Async.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithCredentialAuthentication(ServicePrincipal)Async.json new file mode 100644 index 0000000000000..354eec0b2a1ae --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithCredentialAuthentication(ServicePrincipal)Async.json @@ -0,0 +1,400 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "173", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-b72320c9ba9c174b976bec367ae2ff54-d03a7c11540e6c4f-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "52334ac401d6edfbb218e0b94fdea973", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "parameters": { + "clientId": "mock", + "clientSecret": "Sanitized", + "tenantId": "mock" + }, + "dataSourceCredentialType": "ServicePrincipal", + "dataSourceCredentialName": "credentialwtPB0p6e" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "572b4511-8a39-4279-a0a2-90dd13d91522", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:41:35 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/eabdbc15-7532-41eb-a640-923966648c1a", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "263", + "x-request-id": "572b4511-8a39-4279-a0a2-90dd13d91522" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/eabdbc15-7532-41eb-a640-923966648c1a", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-b72320c9ba9c174b976bec367ae2ff54-b51bdbb95e218942-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "4fd95cfc0cf775b28c8db7d76ece4986", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "6fc4dd91-53a2-46a5-b61e-b82abc82fbd3", + "Content-Length": "247", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:41:35 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "104", + "x-request-id": "6fc4dd91-53a2-46a5-b61e-b82abc82fbd3" + }, + "ResponseBody": { + "dataSourceCredentialId": "eabdbc15-7532-41eb-a640-923966648c1a", + "dataSourceCredentialName": "credentialwtPB0p6e", + "dataSourceCredentialDescription": "", + "dataSourceCredentialType": "ServicePrincipal", + "parameters": { + "clientId": "mock", + "tenantId": "mock" + } + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "233", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-53b475ffadcbed4fa0cc501dbc23d62a-bfecd201cfb5274d-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "965529efc4e9743765efff15caf44eb7", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "query": "mock" + }, + "dataSourceType": "SqlServer", + "dataFeedName": "dataFeedRw32ilDZ", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "ef41fbe3-8c2c-4bd2-a00b-c81b08acb29a", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:41:36 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/18f442ce-8c16-47a1-ac10-fa2854178352", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "594", + "x-request-id": "ef41fbe3-8c2c-4bd2-a00b-c81b08acb29a" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/18f442ce-8c16-47a1-ac10-fa2854178352", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-53b475ffadcbed4fa0cc501dbc23d62a-963c85931e235941-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "49c5bd97234ae37fcf5adbbd27652f5a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "cc387577-aa9c-413a-8918-03feb0942ff0", + "Content-Length": "872", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:41:36 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "162", + "x-request-id": "cc387577-aa9c-413a-8918-03feb0942ff0" + }, + "ResponseBody": { + "dataFeedId": "18f442ce-8c16-47a1-ac10-fa2854178352", + "dataFeedName": "dataFeedRw32ilDZ", + "metrics": [ + { + "metricId": "0e3ef3fb-9c70-44d6-ad70-c0e83ec6f10d", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:41:36Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/18f442ce-8c16-47a1-ac10-fa2854178352", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-ac8012561ec58c42831f713cbabb3500-48139dd89652df47-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "ce60df171cb7c88b5542727ecf33bbe9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "63701b74-33a0-429d-99a5-a0770976e542", + "Content-Length": "872", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:41:36 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "160", + "x-request-id": "63701b74-33a0-429d-99a5-a0770976e542" + }, + "ResponseBody": { + "dataFeedId": "18f442ce-8c16-47a1-ac10-fa2854178352", + "dataFeedName": "dataFeedRw32ilDZ", + "metrics": [ + { + "metricId": "0e3ef3fb-9c70-44d6-ad70-c0e83ec6f10d", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:41:36Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/18f442ce-8c16-47a1-ac10-fa2854178352", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "577", + "Content-Type": "application/merge-patch\u002Bjson", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-12eaa2e2e2f737499a6c2dcf360778fe-52684b99bcdfbe4f-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "85acff44fbdccbb0a971c68fe97a4dff", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "query": "mock" + }, + "dataSourceType": "SqlServer", + "dataFeedName": "dataFeedRw32ilDZ", + "dataFeedDescription": "", + "timestampColumn": "", + "dataStartFrom": "2020-08-01T00:00:00Z", + "startOffsetInSeconds": 0, + "maxConcurrency": -1, + "minRetryIntervalInSeconds": -1, + "stopRetryAfterInSeconds": -1, + "needRollup": "NoRollup", + "rollUpMethod": "None", + "fillMissingPointType": "PreviousValue", + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "status": "Active", + "actionLinkTemplate": "", + "authenticationType": "ServicePrincipal", + "credentialId": "eabdbc15-7532-41eb-a640-923966648c1a" + }, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "8f2a98ee-d117-4115-8d08-e7ef1e6178af", + "Content-Length": "937", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:41:37 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "948", + "x-request-id": "8f2a98ee-d117-4115-8d08-e7ef1e6178af" + }, + "ResponseBody": { + "dataFeedId": "18f442ce-8c16-47a1-ac10-fa2854178352", + "dataFeedName": "dataFeedRw32ilDZ", + "metrics": [ + { + "metricId": "0e3ef3fb-9c70-44d6-ad70-c0e83ec6f10d", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:41:36Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "ServicePrincipal", + "credentialId": "eabdbc15-7532-41eb-a640-923966648c1a" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/18f442ce-8c16-47a1-ac10-fa2854178352", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-44e8ad81675e104f81b187c9f1468399-80b643395d6a0b44-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "ebfea5bf80947aff31fdf307b000149b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "88094e70-7aa7-4413-95d1-d8ed6cbf8655", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:41:38 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "345", + "x-request-id": "88094e70-7aa7-4413-95d1-d8ed6cbf8655" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/eabdbc15-7532-41eb-a640-923966648c1a", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-9d90cf28936c2d44a4c1f7c18cb2c0d9-b54961dc286abb4a-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "2878f19fa9b91b7e2f94244655fcdedb", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "859fca45-0250-4331-9cd7-c900b8b5e736", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:41:38 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "209", + "x-request-id": "859fca45-0250-4331-9cd7-c900b8b5e736" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "2102220159" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithCredentialAuthentication(ServicePrincipalInKeyVault).json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithCredentialAuthentication(ServicePrincipalInKeyVault).json new file mode 100644 index 0000000000000..d87ffafb9cea4 --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithCredentialAuthentication(ServicePrincipalInKeyVault).json @@ -0,0 +1,406 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "308", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-bd7bab7b1b3bd1449cae8ce860d5e261-c534143e6d63c344-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "fdd3e83e004a00d2f02eb50013104eb9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "parameters": { + "keyVaultEndpoint": "https://mock.com/", + "keyVaultClientId": "mock", + "keyVaultClientSecret": "Sanitized", + "servicePrincipalIdNameInKV": "mock", + "servicePrincipalSecretNameInKV": "mock", + "tenantId": "mock" + }, + "dataSourceCredentialType": "ServicePrincipalInKV", + "dataSourceCredentialName": "credentialE4z0blIr" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "3cbeefb3-5125-4151-aa9c-16adf685194f", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:26 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/5ad5ede9-5bfb-489a-ac46-c1db45fb4767", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "453", + "x-request-id": "3cbeefb3-5125-4151-aa9c-16adf685194f" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/5ad5ede9-5bfb-489a-ac46-c1db45fb4767", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-bd7bab7b1b3bd1449cae8ce860d5e261-420b62f4524b6246-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "596f18cdb5d4606552604987b1ddca5d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "019ce5cf-81dd-49fc-a1be-871e2ca2551e", + "Content-Length": "374", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:26 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "109", + "x-request-id": "019ce5cf-81dd-49fc-a1be-871e2ca2551e" + }, + "ResponseBody": { + "dataSourceCredentialId": "5ad5ede9-5bfb-489a-ac46-c1db45fb4767", + "dataSourceCredentialName": "credentialE4z0blIr", + "dataSourceCredentialDescription": "", + "dataSourceCredentialType": "ServicePrincipalInKV", + "parameters": { + "servicePrincipalSecretNameInKV": "mock", + "servicePrincipalIdNameInKV": "mock", + "tenantId": "mock", + "keyVaultClientId": "mock", + "keyVaultEndpoint": "https://mock.com/" + } + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "233", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-1b4d026059efd24a8475769ce32636b4-ebba62424339824d-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "868bb9217de01f36e1d2fd38f683b488", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "query": "mock" + }, + "dataSourceType": "SqlServer", + "dataFeedName": "dataFeedQ6vTmBd0", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "49ab655c-1d49-4129-9df6-009a6dac3b83", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:27 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/61c6ac0e-afef-4ba1-b37b-3502d8bab30c", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "621", + "x-request-id": "49ab655c-1d49-4129-9df6-009a6dac3b83" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/61c6ac0e-afef-4ba1-b37b-3502d8bab30c", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-1b4d026059efd24a8475769ce32636b4-91b911cc1736ce46-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "e9ab72834ab6134e6458264b05ea9849", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "6db78230-263b-41e5-be4b-12371f3ee624", + "Content-Length": "872", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:27 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "164", + "x-request-id": "6db78230-263b-41e5-be4b-12371f3ee624" + }, + "ResponseBody": { + "dataFeedId": "61c6ac0e-afef-4ba1-b37b-3502d8bab30c", + "dataFeedName": "dataFeedQ6vTmBd0", + "metrics": [ + { + "metricId": "77698642-0200-42c4-b861-47c57760adb3", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:27Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/61c6ac0e-afef-4ba1-b37b-3502d8bab30c", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-89310a1edb4fc445840297b6428e410f-a141febbaa556547-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "1b38897fde2ad47f2a29a5dfe0916755", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "afcc6e03-95ef-48be-9028-4f4f3c9180fd", + "Content-Length": "872", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:27 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "166", + "x-request-id": "afcc6e03-95ef-48be-9028-4f4f3c9180fd" + }, + "ResponseBody": { + "dataFeedId": "61c6ac0e-afef-4ba1-b37b-3502d8bab30c", + "dataFeedName": "dataFeedQ6vTmBd0", + "metrics": [ + { + "metricId": "77698642-0200-42c4-b861-47c57760adb3", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:27Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/61c6ac0e-afef-4ba1-b37b-3502d8bab30c", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "581", + "Content-Type": "application/merge-patch\u002Bjson", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-f587146de7c64a43b938cc87bb07fa36-01a17b81f593ac4f-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "addf8113afd8d72f6a78218856ea1af7", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "query": "mock" + }, + "dataSourceType": "SqlServer", + "dataFeedName": "dataFeedQ6vTmBd0", + "dataFeedDescription": "", + "timestampColumn": "", + "dataStartFrom": "2020-08-01T00:00:00Z", + "startOffsetInSeconds": 0, + "maxConcurrency": -1, + "minRetryIntervalInSeconds": -1, + "stopRetryAfterInSeconds": -1, + "needRollup": "NoRollup", + "rollUpMethod": "None", + "fillMissingPointType": "PreviousValue", + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "status": "Active", + "actionLinkTemplate": "", + "authenticationType": "ServicePrincipalInKV", + "credentialId": "5ad5ede9-5bfb-489a-ac46-c1db45fb4767" + }, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "1167140f-1cc7-4d5f-9cbf-e3c80d476607", + "Content-Length": "941", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:28 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "934", + "x-request-id": "1167140f-1cc7-4d5f-9cbf-e3c80d476607" + }, + "ResponseBody": { + "dataFeedId": "61c6ac0e-afef-4ba1-b37b-3502d8bab30c", + "dataFeedName": "dataFeedQ6vTmBd0", + "metrics": [ + { + "metricId": "77698642-0200-42c4-b861-47c57760adb3", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:27Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "ServicePrincipalInKV", + "credentialId": "5ad5ede9-5bfb-489a-ac46-c1db45fb4767" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/61c6ac0e-afef-4ba1-b37b-3502d8bab30c", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-53fb77747423614c8466e1985168b237-913fd34787bf4248-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "6cb9b339984ba45ef3d6bf8da46f32d2", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "36cc278f-f568-4e00-b9f8-a4e025cfaf93", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:28 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "305", + "x-request-id": "36cc278f-f568-4e00-b9f8-a4e025cfaf93" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/5ad5ede9-5bfb-489a-ac46-c1db45fb4767", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-b5ae4f801c6f8c4b9c9c20cddbeae01b-32dd62223fe2de42-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "8338d0f1eb0acf715a60b0b1bdf77e40", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "4b06a37f-fbce-4f65-8b6c-b1e7d6464acc", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:29 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "176", + "x-request-id": "4b06a37f-fbce-4f65-8b6c-b1e7d6464acc" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "1162408568" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithCredentialAuthentication(ServicePrincipalInKeyVault)Async.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithCredentialAuthentication(ServicePrincipalInKeyVault)Async.json new file mode 100644 index 0000000000000..e9b899c1c37df --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithCredentialAuthentication(ServicePrincipalInKeyVault)Async.json @@ -0,0 +1,406 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "308", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-8287870a002c974b86c371368c32f448-26f1951b59a2ee46-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "7c775b1763ffe92909ea96ef68b6c986", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "parameters": { + "keyVaultEndpoint": "https://mock.com/", + "keyVaultClientId": "mock", + "keyVaultClientSecret": "Sanitized", + "servicePrincipalIdNameInKV": "mock", + "servicePrincipalSecretNameInKV": "mock", + "tenantId": "mock" + }, + "dataSourceCredentialType": "ServicePrincipalInKV", + "dataSourceCredentialName": "credentialNUV3NU1L" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "6929441b-1964-45a4-a439-5772d6101923", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:41:39 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/030ef655-899b-414a-a0c0-4fd4f390da77", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "467", + "x-request-id": "6929441b-1964-45a4-a439-5772d6101923" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/030ef655-899b-414a-a0c0-4fd4f390da77", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-8287870a002c974b86c371368c32f448-af6f72d0d3b1ba46-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "6fd362ddceaa560e88f3fa623390710f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "cf9e4811-38b8-4751-8c2f-a058f485bfd6", + "Content-Length": "374", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:41:39 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "119", + "x-request-id": "cf9e4811-38b8-4751-8c2f-a058f485bfd6" + }, + "ResponseBody": { + "dataSourceCredentialId": "030ef655-899b-414a-a0c0-4fd4f390da77", + "dataSourceCredentialName": "credentialNUV3NU1L", + "dataSourceCredentialDescription": "", + "dataSourceCredentialType": "ServicePrincipalInKV", + "parameters": { + "servicePrincipalSecretNameInKV": "mock", + "servicePrincipalIdNameInKV": "mock", + "tenantId": "mock", + "keyVaultClientId": "mock", + "keyVaultEndpoint": "https://mock.com/" + } + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "233", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-a53a3bc39de05b40966092ee0b8606e4-065738dc99b70e42-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "97ff5b2d25bb11efa82a71c96f772649", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "query": "mock" + }, + "dataSourceType": "SqlServer", + "dataFeedName": "dataFeedyy26WG57", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "bcf67e62-a044-440f-aae3-10402c9319a9", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:41:39 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/350dd54e-c363-436c-ae78-9c9c3c50d937", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "406", + "x-request-id": "bcf67e62-a044-440f-aae3-10402c9319a9" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/350dd54e-c363-436c-ae78-9c9c3c50d937", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-a53a3bc39de05b40966092ee0b8606e4-2aa2cf43c2963a4c-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "0cf3214dc76879b67886edd5bcbf1bee", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "e022326f-25c7-45ff-800f-2c2ed7467f0e", + "Content-Length": "872", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:41:39 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "174", + "x-request-id": "e022326f-25c7-45ff-800f-2c2ed7467f0e" + }, + "ResponseBody": { + "dataFeedId": "350dd54e-c363-436c-ae78-9c9c3c50d937", + "dataFeedName": "dataFeedyy26WG57", + "metrics": [ + { + "metricId": "87aa3476-9431-4ad8-8692-40b3416da0a1", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:41:40Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/350dd54e-c363-436c-ae78-9c9c3c50d937", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-29f6f4e113e35340ad4fda1738e89f85-e44f1cc64b0ae245-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "4f423b0f76ce629a04e8b9091ea8a08a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "459adbf5-7931-443f-853a-2bf0cd08fabc", + "Content-Length": "872", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:41:40 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "169", + "x-request-id": "459adbf5-7931-443f-853a-2bf0cd08fabc" + }, + "ResponseBody": { + "dataFeedId": "350dd54e-c363-436c-ae78-9c9c3c50d937", + "dataFeedName": "dataFeedyy26WG57", + "metrics": [ + { + "metricId": "87aa3476-9431-4ad8-8692-40b3416da0a1", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:41:40Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/350dd54e-c363-436c-ae78-9c9c3c50d937", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "581", + "Content-Type": "application/merge-patch\u002Bjson", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-06135457728c0746961c58208be3e53f-91c91a230cb6a34b-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "49bdb06c46fb652fa4861e35381955e9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "query": "mock" + }, + "dataSourceType": "SqlServer", + "dataFeedName": "dataFeedyy26WG57", + "dataFeedDescription": "", + "timestampColumn": "", + "dataStartFrom": "2020-08-01T00:00:00Z", + "startOffsetInSeconds": 0, + "maxConcurrency": -1, + "minRetryIntervalInSeconds": -1, + "stopRetryAfterInSeconds": -1, + "needRollup": "NoRollup", + "rollUpMethod": "None", + "fillMissingPointType": "PreviousValue", + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "status": "Active", + "actionLinkTemplate": "", + "authenticationType": "ServicePrincipalInKV", + "credentialId": "030ef655-899b-414a-a0c0-4fd4f390da77" + }, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "cbbabde3-94be-4871-815f-1ec9a659e733", + "Content-Length": "941", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:41:40 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "959", + "x-request-id": "cbbabde3-94be-4871-815f-1ec9a659e733" + }, + "ResponseBody": { + "dataFeedId": "350dd54e-c363-436c-ae78-9c9c3c50d937", + "dataFeedName": "dataFeedyy26WG57", + "metrics": [ + { + "metricId": "87aa3476-9431-4ad8-8692-40b3416da0a1", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:41:40Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "ServicePrincipalInKV", + "credentialId": "030ef655-899b-414a-a0c0-4fd4f390da77" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/350dd54e-c363-436c-ae78-9c9c3c50d937", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-d554d4319508f84aa095d7c1b5d2ff68-8a7b2087d35e464b-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "33b9830ed735d67a8691077f0dad5ad0", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "6331e1c5-ab71-48ca-afd3-e69ba802407a", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:41:41 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "330", + "x-request-id": "6331e1c5-ab71-48ca-afd3-e69ba802407a" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/030ef655-899b-414a-a0c0-4fd4f390da77", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-73c3a22032b0634d81c0a42ef53534a3-219cf8883e211d4b-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "0c6962e6d201c8f20cdcaa48586529eb", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "046285c6-eea9-4200-a391-16fbdcc7ea83", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:41:41 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "177", + "x-request-id": "046285c6-eea9-4200-a391-16fbdcc7ea83" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "446532584" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithCredentialAuthentication(SqlConnectionString).json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithCredentialAuthentication(SqlConnectionString).json new file mode 100644 index 0000000000000..e330bbe23e8e0 --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithCredentialAuthentication(SqlConnectionString).json @@ -0,0 +1,395 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "149", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-ec7a1456a48100458411dc542cd84092-bb1bb1bfa9657f4a-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "5f0f5bce2f44a845a0dc015e0da4dcb5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "parameters": { + "connectionString": "Sanitized" + }, + "dataSourceCredentialType": "AzureSQLConnectionString", + "dataSourceCredentialName": "credentialXD57ROMM" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "d10ef51a-b2cb-4f54-8863-4695adedba3f", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:29 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/6d095a37-78c2-4b54-86ed-c5a0b8b226f1", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "498", + "x-request-id": "d10ef51a-b2cb-4f54-8863-4695adedba3f" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/6d095a37-78c2-4b54-86ed-c5a0b8b226f1", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-ec7a1456a48100458411dc542cd84092-c8c7ce1e5f158145-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "bf541f36079133b850cee7323d4041d7", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "f816e4d6-da7a-43af-825c-b99f060b64cf", + "Content-Length": "220", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:30 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "114", + "x-request-id": "f816e4d6-da7a-43af-825c-b99f060b64cf" + }, + "ResponseBody": { + "dataSourceCredentialId": "6d095a37-78c2-4b54-86ed-c5a0b8b226f1", + "dataSourceCredentialName": "credentialXD57ROMM", + "dataSourceCredentialDescription": "", + "dataSourceCredentialType": "AzureSQLConnectionString", + "parameters": {} + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "233", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-0b89f416903c904a8a1c4bd4e78fda31-0e8b66a83d758741-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "3acc3c935b20c505310d077ec1623ac7", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "query": "mock" + }, + "dataSourceType": "SqlServer", + "dataFeedName": "dataFeedycA6NZtZ", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "4e6a8453-b42a-45c1-be6e-e1395594adf4", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:30 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/94e68685-c65d-46f6-9f03-87b89f76d983", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "573", + "x-request-id": "4e6a8453-b42a-45c1-be6e-e1395594adf4" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/94e68685-c65d-46f6-9f03-87b89f76d983", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-0b89f416903c904a8a1c4bd4e78fda31-51c08b9171e23242-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "760fdba312485f6a9b29e14ed8bfae40", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "c2f8dac2-fdb5-4b96-8582-ffd9c18df2b6", + "Content-Length": "872", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:30 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "151", + "x-request-id": "c2f8dac2-fdb5-4b96-8582-ffd9c18df2b6" + }, + "ResponseBody": { + "dataFeedId": "94e68685-c65d-46f6-9f03-87b89f76d983", + "dataFeedName": "dataFeedycA6NZtZ", + "metrics": [ + { + "metricId": "b48a4a84-e73e-4569-b40e-2173fbfeb337", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:31Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/94e68685-c65d-46f6-9f03-87b89f76d983", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-75a40ef397bccf44aea6fd76c8547a1a-9c24226cc5ec1c4b-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "542b2bfa7d3af413c921013038c2161a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "54b49a96-197f-4947-b6fc-8cb46731a43a", + "Content-Length": "872", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:32 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "164", + "x-request-id": "54b49a96-197f-4947-b6fc-8cb46731a43a" + }, + "ResponseBody": { + "dataFeedId": "94e68685-c65d-46f6-9f03-87b89f76d983", + "dataFeedName": "dataFeedycA6NZtZ", + "metrics": [ + { + "metricId": "b48a4a84-e73e-4569-b40e-2173fbfeb337", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:31Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/94e68685-c65d-46f6-9f03-87b89f76d983", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "585", + "Content-Type": "application/merge-patch\u002Bjson", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-305670c0eded6f4a82ed8bbfe0e6be6c-0bc2de69bdfeaa49-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "2c790483aee581dfd26d9ef67ab6ed71", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "query": "mock" + }, + "dataSourceType": "SqlServer", + "dataFeedName": "dataFeedycA6NZtZ", + "dataFeedDescription": "", + "timestampColumn": "", + "dataStartFrom": "2020-08-01T00:00:00Z", + "startOffsetInSeconds": 0, + "maxConcurrency": -1, + "minRetryIntervalInSeconds": -1, + "stopRetryAfterInSeconds": -1, + "needRollup": "NoRollup", + "rollUpMethod": "None", + "fillMissingPointType": "PreviousValue", + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "status": "Active", + "actionLinkTemplate": "", + "authenticationType": "AzureSQLConnectionString", + "credentialId": "6d095a37-78c2-4b54-86ed-c5a0b8b226f1" + }, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "568a8fe7-158b-4bc4-8830-c859f815b020", + "Content-Length": "945", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:39:33 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "1107", + "x-request-id": "568a8fe7-158b-4bc4-8830-c859f815b020" + }, + "ResponseBody": { + "dataFeedId": "94e68685-c65d-46f6-9f03-87b89f76d983", + "dataFeedName": "dataFeedycA6NZtZ", + "metrics": [ + { + "metricId": "b48a4a84-e73e-4569-b40e-2173fbfeb337", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:39:31Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "AzureSQLConnectionString", + "credentialId": "6d095a37-78c2-4b54-86ed-c5a0b8b226f1" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/94e68685-c65d-46f6-9f03-87b89f76d983", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-57e7734038416d4dbf7859b155e55d7a-60f7fef449b3b245-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "9583c75ee636258cc71bad26113a26d9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "7ea99417-60b4-424b-a925-52e419734463", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:33 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "326", + "x-request-id": "7ea99417-60b4-424b-a925-52e419734463" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/6d095a37-78c2-4b54-86ed-c5a0b8b226f1", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-357279ba614bf940a6d07f8c9f7ac663-6317324915bde848-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "d3cbc71382454c5a4baa82ccde1d7a13", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "91c41e54-0844-4439-80a3-c297d572f12d", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:39:33 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "176", + "x-request-id": "91c41e54-0844-4439-80a3-c297d572f12d" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "771280037" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithCredentialAuthentication(SqlConnectionString)Async.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithCredentialAuthentication(SqlConnectionString)Async.json new file mode 100644 index 0000000000000..54e1da55e4b5d --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithCredentialAuthentication(SqlConnectionString)Async.json @@ -0,0 +1,395 @@ +{ + "Entries": [ + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "149", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-361f2c8d18460d42acef60f7d5b0fb6f-d1db473b69ec3f48-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "ee0b76e5eb9084086e7653ca377718f3", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "parameters": { + "connectionString": "Sanitized" + }, + "dataSourceCredentialType": "AzureSQLConnectionString", + "dataSourceCredentialName": "credentiald6aP0l15" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "ef0f1b99-e9fd-4b84-ae2f-c658fb190a37", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:41:41 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/6742b619-405a-420a-858c-a9c683c701a4", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "270", + "x-request-id": "ef0f1b99-e9fd-4b84-ae2f-c658fb190a37" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/6742b619-405a-420a-858c-a9c683c701a4", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-361f2c8d18460d42acef60f7d5b0fb6f-decd44dba645274d-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "31eb79d2ccfcbfa6725867b4bd5a5d3c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "271ceafc-b013-4ef5-b82a-1f68b9ef0dd2", + "Content-Length": "220", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:41:41 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "107", + "x-request-id": "271ceafc-b013-4ef5-b82a-1f68b9ef0dd2" + }, + "ResponseBody": { + "dataSourceCredentialId": "6742b619-405a-420a-858c-a9c683c701a4", + "dataSourceCredentialName": "credentiald6aP0l15", + "dataSourceCredentialDescription": "", + "dataSourceCredentialType": "AzureSQLConnectionString", + "parameters": {} + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "233", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-8eeab5e5aa47654e83c2d82f44fccd1f-f1e9f68d84779940-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "5ac96019aae361161c4a8a6172ed1818", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "connectionString": "Sanitized", + "query": "mock" + }, + "dataSourceType": "SqlServer", + "dataFeedName": "dataFeednTwcJNDZ", + "granularityName": "Daily", + "metrics": [ + { + "metricName": "cost" + } + ], + "dataStartFrom": "2020-08-01T00:00:00Z" + }, + "StatusCode": 201, + "ResponseHeaders": { + "apim-request-id": "f3cec1b6-3e92-49f9-a4c9-dd0cd038d768", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:41:42 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/d728dff9-5e1b-4048-aa79-662cb0eb97b7", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "463", + "x-request-id": "f3cec1b6-3e92-49f9-a4c9-dd0cd038d768" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/d728dff9-5e1b-4048-aa79-662cb0eb97b7", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-8eeab5e5aa47654e83c2d82f44fccd1f-910f9d899487664b-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "387b4bd0548313c7181747e9a50f4b96", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "cc0fb441-bd17-44cf-bdc1-9aac919d89ec", + "Content-Length": "872", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:41:42 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "157", + "x-request-id": "cc0fb441-bd17-44cf-bdc1-9aac919d89ec" + }, + "ResponseBody": { + "dataFeedId": "d728dff9-5e1b-4048-aa79-662cb0eb97b7", + "dataFeedName": "dataFeednTwcJNDZ", + "metrics": [ + { + "metricId": "24c71ac5-b9c6-4d7e-a370-0d2ca1cefa3c", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:41:43Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/d728dff9-5e1b-4048-aa79-662cb0eb97b7", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-06d5042bd5abc54985e792000fbcda78-1046d413d5a5d845-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "9c1794694b03c8dc41069872d0fbc995", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "a7ed86e5-549d-4eab-a6c3-40122f945675", + "Content-Length": "872", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:41:43 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "158", + "x-request-id": "a7ed86e5-549d-4eab-a6c3-40122f945675" + }, + "ResponseBody": { + "dataFeedId": "d728dff9-5e1b-4048-aa79-662cb0eb97b7", + "dataFeedName": "dataFeednTwcJNDZ", + "metrics": [ + { + "metricId": "24c71ac5-b9c6-4d7e-a370-0d2ca1cefa3c", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:41:43Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "Basic" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/d728dff9-5e1b-4048-aa79-662cb0eb97b7", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "585", + "Content-Type": "application/merge-patch\u002Bjson", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-8ba841fd2e929146b5564b76900ec2c2-449ce1f1dfec634f-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "5c39b934d7c0c5d499b641cc632cbc0c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "dataSourceParameter": { + "query": "mock" + }, + "dataSourceType": "SqlServer", + "dataFeedName": "dataFeednTwcJNDZ", + "dataFeedDescription": "", + "timestampColumn": "", + "dataStartFrom": "2020-08-01T00:00:00Z", + "startOffsetInSeconds": 0, + "maxConcurrency": -1, + "minRetryIntervalInSeconds": -1, + "stopRetryAfterInSeconds": -1, + "needRollup": "NoRollup", + "rollUpMethod": "None", + "fillMissingPointType": "PreviousValue", + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "status": "Active", + "actionLinkTemplate": "", + "authenticationType": "AzureSQLConnectionString", + "credentialId": "6742b619-405a-420a-858c-a9c683c701a4" + }, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "fbb3982a-59fa-4203-8124-1343169349c1", + "Content-Length": "945", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Jun 2021 13:41:44 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "1005", + "x-request-id": "fbb3982a-59fa-4203-8124-1343169349c1" + }, + "ResponseBody": { + "dataFeedId": "d728dff9-5e1b-4048-aa79-662cb0eb97b7", + "dataFeedName": "dataFeednTwcJNDZ", + "metrics": [ + { + "metricId": "24c71ac5-b9c6-4d7e-a370-0d2ca1cefa3c", + "metricName": "cost", + "metricDisplayName": "cost", + "metricDescription": "" + } + ], + "dimension": [], + "dataStartFrom": "2020-08-01T00:00:00Z", + "dataSourceType": "SqlServer", + "timestampColumn": "", + "startOffsetInSeconds": 0, + "maxQueryPerMinute": 30.0, + "granularityName": "Daily", + "needRollup": "NoRollup", + "fillMissingPointType": "PreviousValue", + "fillMissingPointValue": 0.0, + "rollUpMethod": "None", + "dataFeedDescription": "", + "stopRetryAfterInSeconds": -1, + "minRetryIntervalInSeconds": -1, + "maxConcurrency": -1, + "viewMode": "Private", + "admins": [ + "foo@contoso.com" + ], + "viewers": [], + "creator": "foo@contoso.com", + "status": "Active", + "createdTime": "2021-06-07T13:41:43Z", + "isAdmin": true, + "actionLinkTemplate": "", + "dataSourceParameter": { + "query": "mock" + }, + "authenticationType": "AzureSQLConnectionString", + "credentialId": "6742b619-405a-420a-858c-a9c683c701a4" + } + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/d728dff9-5e1b-4048-aa79-662cb0eb97b7", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-c4e8de0fb5dbe34a911e24e690e06f8a-ec69de087ad75847-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "def8f4fe7cd584156fb3f67cbb54421d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "f43395b6-e271-42ca-8754-37bc46f6f82a", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:41:44 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "325", + "x-request-id": "f43395b6-e271-42ca-8754-37bc46f6f82a" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/credentials/6742b619-405a-420a-858c-a9c683c701a4", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-1da8f16871b67240a7d009e80824fb7f-3049ec3956d8d246-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-api-key": "Sanitized", + "x-ms-client-request-id": "ecb5b24defd691d5c052024c0a0f6415", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "apim-request-id": "382480e2-9512-4c14-9800-84d3b4ac4b48", + "Content-Length": "0", + "Date": "Mon, 07 Jun 2021 13:41:44 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "178", + "x-request-id": "382480e2-9512-4c14-9800-84d3b4ac4b48" + }, + "ResponseBody": [] + } + ], + "Variables": { + "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", + "METRICSADVISOR_ENDPOINT_SUFFIX": null, + "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", + "METRICSADVISOR_SUBSCRIPTION_KEY": "Sanitized", + "RandomSeed": "2076309159" + } +} \ No newline at end of file diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithEveryMemberAndGetInstance.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithEveryMemberAndGetInstance.json index 0d7c87a4d8d24..abe003ecadf90 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithEveryMemberAndGetInstance.json +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithEveryMemberAndGetInstance.json @@ -8,8 +8,8 @@ "Content-Length": "234", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-ee3a71819793e14a8c8df18dbd3c29e5-7bad1fdc9707164d-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-b793e53c7331914fafaeab8a85b8cd67-14951a792e34b540-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "e1ef91bf7abb24ca32035fd5a4cba737", "x-ms-return-client-request-id": "true" @@ -31,25 +31,25 @@ }, "StatusCode": 201, "ResponseHeaders": { - "apim-request-id": "9cb855b7-c5f3-40d6-9923-9ccbf751096f", + "apim-request-id": "06631c67-7183-4b3a-806f-3cfb0b7e6be0", "Content-Length": "0", - "Date": "Thu, 03 Jun 2021 21:41:05 GMT", - "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/31e39087-b7bb-4906-9aae-445dce19cc2d", + "Date": "Sat, 05 Jun 2021 03:31:42 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/aff7a6e4-7f30-4a39-bd78-392ac48863d4", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "615", - "x-request-id": "9cb855b7-c5f3-40d6-9923-9ccbf751096f" + "x-envoy-upstream-service-time": "431", + "x-request-id": "06631c67-7183-4b3a-806f-3cfb0b7e6be0" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/31e39087-b7bb-4906-9aae-445dce19cc2d", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/aff7a6e4-7f30-4a39-bd78-392ac48863d4", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-ee3a71819793e14a8c8df18dbd3c29e5-95437d1783e2f645-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-b793e53c7331914fafaeab8a85b8cd67-fd80586a925cc24f-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "e5ddb4185581fd38f5aac7f7acc03db0", "x-ms-return-client-request-id": "true" @@ -57,21 +57,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "80038e28-efab-4662-97c7-2ba948d8583b", + "apim-request-id": "097a946f-8b6c-4664-95ea-4ce511aeaf15", "Content-Length": "873", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:41:05 GMT", + "Date": "Sat, 05 Jun 2021 03:31:42 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "160", - "x-request-id": "80038e28-efab-4662-97c7-2ba948d8583b" + "x-envoy-upstream-service-time": "179", + "x-request-id": "097a946f-8b6c-4664-95ea-4ce511aeaf15" }, "ResponseBody": { - "dataFeedId": "31e39087-b7bb-4906-9aae-445dce19cc2d", + "dataFeedId": "aff7a6e4-7f30-4a39-bd78-392ac48863d4", "dataFeedName": "dataFeeddo7sgZHb", "metrics": [ { - "metricId": "820ae915-7ce8-4f50-8e6a-0b1ef869c277", + "metricId": "c9f6b405-6722-4ca4-a34c-1ffa19c04267", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -99,7 +99,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:41:06Z", + "createdTime": "2021-06-05T03:31:42Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -109,13 +109,13 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/31e39087-b7bb-4906-9aae-445dce19cc2d", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/aff7a6e4-7f30-4a39-bd78-392ac48863d4", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-c59eae454373ea46af80b37ad3031a0e-65e89cdf7121db4d-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-f4cc13629dccce428863cafc04bd491b-6bacc19db555494f-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "d52f2610d119c8f45c530690f036c21a", "x-ms-return-client-request-id": "true" @@ -123,21 +123,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "1822fad7-e591-4a46-933e-e7b4879e42dd", + "apim-request-id": "00bd54a1-5620-451c-a52b-3706aa442fa4", "Content-Length": "873", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:41:06 GMT", + "Date": "Sat, 05 Jun 2021 03:31:48 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "153", - "x-request-id": "1822fad7-e591-4a46-933e-e7b4879e42dd" + "x-envoy-upstream-service-time": "5192", + "x-request-id": "00bd54a1-5620-451c-a52b-3706aa442fa4" }, "ResponseBody": { - "dataFeedId": "31e39087-b7bb-4906-9aae-445dce19cc2d", + "dataFeedId": "aff7a6e4-7f30-4a39-bd78-392ac48863d4", "dataFeedName": "dataFeeddo7sgZHb", "metrics": [ { - "metricId": "820ae915-7ce8-4f50-8e6a-0b1ef869c277", + "metricId": "c9f6b405-6722-4ca4-a34c-1ffa19c04267", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -165,7 +165,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:41:06Z", + "createdTime": "2021-06-05T03:31:42Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -175,15 +175,15 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/31e39087-b7bb-4906-9aae-445dce19cc2d", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/aff7a6e4-7f30-4a39-bd78-392ac48863d4", "RequestMethod": "PATCH", "RequestHeaders": { "Accept": "application/json", - "Content-Length": "627", + "Content-Length": "656", "Content-Type": "application/merge-patch\u002Bjson", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-897d354ca54ce442b381838b5ec03e0e-37ff58528b6e6144-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-cafc823d4990de4589d724c11cc8ab8f-80ba0a5441517f4d-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "b01bb70f939e6acd59f2ec11b3d27771", "x-ms-return-client-request-id": "true" @@ -213,94 +213,26 @@ "fake@viewer.com" ], "status": "Active", - "actionLinkTemplate": "https://fakeurl.com/%datafeed/%metric" - }, - "StatusCode": 200, - "ResponseHeaders": { - "apim-request-id": "93123879-3daf-44b0-9362-cc86a21257d5", - "Content-Length": "1016", - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:41:07 GMT", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "983", - "x-request-id": "93123879-3daf-44b0-9362-cc86a21257d5" - }, - "ResponseBody": { - "dataFeedId": "31e39087-b7bb-4906-9aae-445dce19cc2d", - "dataFeedName": "dataFeedCfLcmpX8", - "metrics": [ - { - "metricId": "820ae915-7ce8-4f50-8e6a-0b1ef869c277", - "metricName": "cost", - "metricDisplayName": "cost", - "metricDescription": "" - } - ], - "dimension": [], - "dataStartFrom": "2020-09-21T00:00:00Z", - "dataSourceType": "SqlServer", - "timestampColumn": "updatedTimestampColumn", - "startOffsetInSeconds": 2400, - "maxQueryPerMinute": 30.0, - "granularityName": "Daily", - "needRollup": "NoRollup", - "fillMissingPointType": "NoFilling", - "fillMissingPointValue": 0.0, - "rollUpMethod": "None", - "dataFeedDescription": "This data feed was updated to test the .NET client.", - "stopRetryAfterInSeconds": 1200, - "minRetryIntervalInSeconds": 90, - "maxConcurrency": 6, - "viewMode": "Public", - "admins": [ - "fake@admin.com", - "foo@contoso.com" - ], - "viewers": [ - "fake@viewer.com" - ], - "creator": "foo@contoso.com", - "status": "Active", - "createdTime": "2021-06-03T21:41:06Z", - "isAdmin": true, "actionLinkTemplate": "https://fakeurl.com/%datafeed/%metric", - "dataSourceParameter": { - "query": "query" - }, "authenticationType": "Basic" - } - }, - { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/31e39087-b7bb-4906-9aae-445dce19cc2d", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-bd16465a982f894a90379cf597e9b700-46ec7124e2ff6d45-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-api-key": "Sanitized", - "x-ms-client-request-id": "7ec5afc6d29c471dbf14892e4ea70cbe", - "x-ms-return-client-request-id": "true" }, - "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "54d9e9fc-f44f-449f-8545-294c142978df", + "apim-request-id": "5be82321-fe32-44ec-a01a-359ca68c565c", "Content-Length": "1016", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:41:07 GMT", + "Date": "Sat, 05 Jun 2021 03:31:49 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "156", - "x-request-id": "54d9e9fc-f44f-449f-8545-294c142978df" + "x-envoy-upstream-service-time": "811", + "x-request-id": "5be82321-fe32-44ec-a01a-359ca68c565c" }, "ResponseBody": { - "dataFeedId": "31e39087-b7bb-4906-9aae-445dce19cc2d", + "dataFeedId": "aff7a6e4-7f30-4a39-bd78-392ac48863d4", "dataFeedName": "dataFeedCfLcmpX8", "metrics": [ { - "metricId": "820ae915-7ce8-4f50-8e6a-0b1ef869c277", + "metricId": "c9f6b405-6722-4ca4-a34c-1ffa19c04267", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -331,7 +263,7 @@ ], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:41:06Z", + "createdTime": "2021-06-05T03:31:42Z", "isAdmin": true, "actionLinkTemplate": "https://fakeurl.com/%datafeed/%metric", "dataSourceParameter": { @@ -341,33 +273,33 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/31e39087-b7bb-4906-9aae-445dce19cc2d", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/aff7a6e4-7f30-4a39-bd78-392ac48863d4", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-917658be5a43f948817d3a04b20f38a5-a72c2a9343e6f74b-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-5fdd8049e507a642835a4de0e4833ab7-bb7324f5fe2ec448-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", - "x-ms-client-request-id": "f5e7ace78da57d1259c47b27e4e31489", + "x-ms-client-request-id": "7ec5afc6d29c471dbf14892e4ea70cbe", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "apim-request-id": "8c0ba8d0-2bc3-46e4-a6c3-1074ff6a64e5", + "apim-request-id": "cc77a52a-0dee-487c-bd0c-ed2354e9f33f", "Content-Length": "0", - "Date": "Thu, 03 Jun 2021 21:41:07 GMT", + "Date": "Sat, 05 Jun 2021 03:31:54 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "297", - "x-request-id": "8c0ba8d0-2bc3-46e4-a6c3-1074ff6a64e5" + "x-envoy-upstream-service-time": "5442", + "x-request-id": "cc77a52a-0dee-487c-bd0c-ed2354e9f33f" }, "ResponseBody": [] } ], "Variables": { - "DateTimeOffsetNow": "2021-06-03T14:41:07.6213917-07:00", + "DateTimeOffsetNow": "2021-06-04T20:31:48.4280661-07:00", "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", "METRICSADVISOR_ENDPOINT_SUFFIX": null, "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithEveryMemberAndGetInstanceAsync.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithEveryMemberAndGetInstanceAsync.json index d44d4eff4c437..9f111a498399b 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithEveryMemberAndGetInstanceAsync.json +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithEveryMemberAndGetInstanceAsync.json @@ -8,8 +8,8 @@ "Content-Length": "234", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-5f1435d46633444ba255ec43a4522bc6-e0990f6e29cc4c44-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-b28237d363d6fe4b8b829c49cd8565db-883c5cae26bad54a-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "7dc4f0e1f5e6ae3b308120f93192ca5c", "x-ms-return-client-request-id": "true" @@ -31,25 +31,25 @@ }, "StatusCode": 201, "ResponseHeaders": { - "apim-request-id": "fc279fb4-4a4d-4606-8307-5b592ccaa918", + "apim-request-id": "306d8dd2-434c-4395-9bdb-8c774701642c", "Content-Length": "0", - "Date": "Thu, 03 Jun 2021 21:42:35 GMT", - "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/48e50e3e-03f8-41cc-b78a-48cce19f45af", + "Date": "Sat, 05 Jun 2021 03:33:41 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/ac8ff887-3f14-496e-9771-bd66b7c94861", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "555", - "x-request-id": "fc279fb4-4a4d-4606-8307-5b592ccaa918" + "x-envoy-upstream-service-time": "525", + "x-request-id": "306d8dd2-434c-4395-9bdb-8c774701642c" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/48e50e3e-03f8-41cc-b78a-48cce19f45af", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/ac8ff887-3f14-496e-9771-bd66b7c94861", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-5f1435d46633444ba255ec43a4522bc6-f26c22d14dd2704c-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-b28237d363d6fe4b8b829c49cd8565db-bf8408d58ad6b149-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "f065a3cbc82db6783faf6af214e9396b", "x-ms-return-client-request-id": "true" @@ -57,21 +57,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "f5346d78-272e-412d-9dbf-40b2af06f3f5", + "apim-request-id": "6ab04bf7-402e-46f3-8742-8094a8fbadfb", "Content-Length": "873", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:42:40 GMT", + "Date": "Sat, 05 Jun 2021 03:33:41 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "5190", - "x-request-id": "f5346d78-272e-412d-9dbf-40b2af06f3f5" + "x-envoy-upstream-service-time": "158", + "x-request-id": "6ab04bf7-402e-46f3-8742-8094a8fbadfb" }, "ResponseBody": { - "dataFeedId": "48e50e3e-03f8-41cc-b78a-48cce19f45af", + "dataFeedId": "ac8ff887-3f14-496e-9771-bd66b7c94861", "dataFeedName": "dataFeedYc3bmMvk", "metrics": [ { - "metricId": "afda4e8e-0b39-4f75-9b82-771100789655", + "metricId": "55cbd058-fb16-4b1c-a0a1-8ae17441cbe3", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -99,7 +99,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:42:36Z", + "createdTime": "2021-06-05T03:33:41Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -109,13 +109,13 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/48e50e3e-03f8-41cc-b78a-48cce19f45af", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/ac8ff887-3f14-496e-9771-bd66b7c94861", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-d35b1e07422892428c0b4120ad66aee6-3754aec626d9254b-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-f10c3b53498e854490b67b93a93a860e-7986447d7652fa4a-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "311f94256adaa39d1f3b0d24582a207f", "x-ms-return-client-request-id": "true" @@ -123,21 +123,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "13a326ee-8a62-4f94-bc6a-efdbaa823c02", + "apim-request-id": "306a1811-6dcb-410f-a51c-8a2d0fadddf9", "Content-Length": "873", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:42:41 GMT", + "Date": "Sat, 05 Jun 2021 03:33:42 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "174", - "x-request-id": "13a326ee-8a62-4f94-bc6a-efdbaa823c02" + "x-envoy-upstream-service-time": "162", + "x-request-id": "306a1811-6dcb-410f-a51c-8a2d0fadddf9" }, "ResponseBody": { - "dataFeedId": "48e50e3e-03f8-41cc-b78a-48cce19f45af", + "dataFeedId": "ac8ff887-3f14-496e-9771-bd66b7c94861", "dataFeedName": "dataFeedYc3bmMvk", "metrics": [ { - "metricId": "afda4e8e-0b39-4f75-9b82-771100789655", + "metricId": "55cbd058-fb16-4b1c-a0a1-8ae17441cbe3", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -165,7 +165,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:42:36Z", + "createdTime": "2021-06-05T03:33:41Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -175,15 +175,15 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/48e50e3e-03f8-41cc-b78a-48cce19f45af", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/ac8ff887-3f14-496e-9771-bd66b7c94861", "RequestMethod": "PATCH", "RequestHeaders": { "Accept": "application/json", - "Content-Length": "627", + "Content-Length": "656", "Content-Type": "application/merge-patch\u002Bjson", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-152c8c2a0667ee4c87c91c500c425215-d91808e7004b9e4c-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-4ba487a9e9cbbe469261c9e6799cb17d-8c2b8ce9c84b694a-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "6328f2116c5719b4770e3e378b499a46", "x-ms-return-client-request-id": "true" @@ -213,94 +213,26 @@ "fake@viewer.com" ], "status": "Active", - "actionLinkTemplate": "https://fakeurl.com/%datafeed/%metric" - }, - "StatusCode": 200, - "ResponseHeaders": { - "apim-request-id": "4ce81820-f340-4653-82da-10c29d5d1a39", - "Content-Length": "1016", - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:42:42 GMT", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "877", - "x-request-id": "4ce81820-f340-4653-82da-10c29d5d1a39" - }, - "ResponseBody": { - "dataFeedId": "48e50e3e-03f8-41cc-b78a-48cce19f45af", - "dataFeedName": "dataFeedxwec9cgU", - "metrics": [ - { - "metricId": "afda4e8e-0b39-4f75-9b82-771100789655", - "metricName": "cost", - "metricDisplayName": "cost", - "metricDescription": "" - } - ], - "dimension": [], - "dataStartFrom": "2020-09-21T00:00:00Z", - "dataSourceType": "SqlServer", - "timestampColumn": "updatedTimestampColumn", - "startOffsetInSeconds": 2400, - "maxQueryPerMinute": 30.0, - "granularityName": "Daily", - "needRollup": "NoRollup", - "fillMissingPointType": "NoFilling", - "fillMissingPointValue": 0.0, - "rollUpMethod": "None", - "dataFeedDescription": "This data feed was updated to test the .NET client.", - "stopRetryAfterInSeconds": 1200, - "minRetryIntervalInSeconds": 90, - "maxConcurrency": 6, - "viewMode": "Public", - "admins": [ - "fake@admin.com", - "foo@contoso.com" - ], - "viewers": [ - "fake@viewer.com" - ], - "creator": "foo@contoso.com", - "status": "Active", - "createdTime": "2021-06-03T21:42:36Z", - "isAdmin": true, "actionLinkTemplate": "https://fakeurl.com/%datafeed/%metric", - "dataSourceParameter": { - "query": "query" - }, "authenticationType": "Basic" - } - }, - { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/48e50e3e-03f8-41cc-b78a-48cce19f45af", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-903e76d23922894198c6571ea649ab15-589c93fa79d94344-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-api-key": "Sanitized", - "x-ms-client-request-id": "9cd4b5489872608106c2d0f2ba545d14", - "x-ms-return-client-request-id": "true" }, - "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "fcd6a270-e939-47fe-9c79-d6a0fff8a069", + "apim-request-id": "7690a55c-0587-477d-9b4f-1f13f530eb1c", "Content-Length": "1016", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:42:42 GMT", + "Date": "Sat, 05 Jun 2021 03:33:43 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "245", - "x-request-id": "fcd6a270-e939-47fe-9c79-d6a0fff8a069" + "x-envoy-upstream-service-time": "985", + "x-request-id": "7690a55c-0587-477d-9b4f-1f13f530eb1c" }, "ResponseBody": { - "dataFeedId": "48e50e3e-03f8-41cc-b78a-48cce19f45af", + "dataFeedId": "ac8ff887-3f14-496e-9771-bd66b7c94861", "dataFeedName": "dataFeedxwec9cgU", "metrics": [ { - "metricId": "afda4e8e-0b39-4f75-9b82-771100789655", + "metricId": "55cbd058-fb16-4b1c-a0a1-8ae17441cbe3", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -331,7 +263,7 @@ ], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:42:36Z", + "createdTime": "2021-06-05T03:33:41Z", "isAdmin": true, "actionLinkTemplate": "https://fakeurl.com/%datafeed/%metric", "dataSourceParameter": { @@ -341,33 +273,33 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/48e50e3e-03f8-41cc-b78a-48cce19f45af", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/ac8ff887-3f14-496e-9771-bd66b7c94861", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-982c914744054842a76aa8ace4a0d6fc-9e34a28300eea246-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-0da00b9fd7c1c5408d5d7101ee3529e2-4d52dc8a76ccd246-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", - "x-ms-client-request-id": "21e0ea8fd5c0b813e006bacc2c6518d6", + "x-ms-client-request-id": "9cd4b5489872608106c2d0f2ba545d14", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "apim-request-id": "e5e6382d-8480-4fa5-a82c-fdbc80a44d53", + "apim-request-id": "be35869f-f6ef-46b8-99d8-917d4d0c026b", "Content-Length": "0", - "Date": "Thu, 03 Jun 2021 21:42:47 GMT", + "Date": "Sat, 05 Jun 2021 03:33:43 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "5344", - "x-request-id": "e5e6382d-8480-4fa5-a82c-fdbc80a44d53" + "x-envoy-upstream-service-time": "330", + "x-request-id": "be35869f-f6ef-46b8-99d8-917d4d0c026b" }, "ResponseBody": [] } ], "Variables": { - "DateTimeOffsetNow": "2021-06-03T14:42:42.7289005-07:00", + "DateTimeOffsetNow": "2021-06-04T20:33:42.2668632-07:00", "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", "METRICSADVISOR_ENDPOINT_SUFFIX": null, "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithMinimumSetupAndGetInstance.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithMinimumSetupAndGetInstance.json index 479f37facfa12..84f0d62428fdc 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithMinimumSetupAndGetInstance.json +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithMinimumSetupAndGetInstance.json @@ -8,8 +8,8 @@ "Content-Length": "234", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-fb27d07de24c0e4aaab457b75ed931d2-8f33de8a654b8647-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-72577326202b3d448eb8cbb24fda5b7f-abce61a1f7634541-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "25a30d960f30f6c8ab7688426fbcc21c", "x-ms-return-client-request-id": "true" @@ -31,25 +31,25 @@ }, "StatusCode": 201, "ResponseHeaders": { - "apim-request-id": "00b6fdd5-189d-40d3-b51b-d73bd78447e6", + "apim-request-id": "25c6a228-a3f8-474b-92bc-c4ee048c5951", "Content-Length": "0", - "Date": "Thu, 03 Jun 2021 21:41:08 GMT", - "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/f9da07ab-7664-4c2f-b5cf-5490d454fd5b", + "Date": "Sat, 05 Jun 2021 03:31:54 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/1bbb3ca8-d178-43b8-aafc-7f00c12b9cc6", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "706", - "x-request-id": "00b6fdd5-189d-40d3-b51b-d73bd78447e6" + "x-envoy-upstream-service-time": "468", + "x-request-id": "25c6a228-a3f8-474b-92bc-c4ee048c5951" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/f9da07ab-7664-4c2f-b5cf-5490d454fd5b", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/1bbb3ca8-d178-43b8-aafc-7f00c12b9cc6", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-fb27d07de24c0e4aaab457b75ed931d2-7fa2d0f8fefdf54d-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-72577326202b3d448eb8cbb24fda5b7f-5537704cfa619e4b-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "268a216697b00a8483f3dbb014d8107b", "x-ms-return-client-request-id": "true" @@ -57,21 +57,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "d05b8353-e756-4f54-b170-afd4c25d4914", + "apim-request-id": "f53a9b21-eb54-4db2-9538-88b9d4250fe4", "Content-Length": "873", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:41:08 GMT", + "Date": "Sat, 05 Jun 2021 03:31:55 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "164", - "x-request-id": "d05b8353-e756-4f54-b170-afd4c25d4914" + "x-envoy-upstream-service-time": "185", + "x-request-id": "f53a9b21-eb54-4db2-9538-88b9d4250fe4" }, "ResponseBody": { - "dataFeedId": "f9da07ab-7664-4c2f-b5cf-5490d454fd5b", + "dataFeedId": "1bbb3ca8-d178-43b8-aafc-7f00c12b9cc6", "dataFeedName": "dataFeedG3RthPA9", "metrics": [ { - "metricId": "3be53a9f-0380-4209-9a6a-20a362773f3c", + "metricId": "ac258985-0c5c-4744-84dd-7a426c059139", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -99,7 +99,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:41:08Z", + "createdTime": "2021-06-05T03:31:55Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -109,13 +109,13 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/f9da07ab-7664-4c2f-b5cf-5490d454fd5b", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/1bbb3ca8-d178-43b8-aafc-7f00c12b9cc6", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-403b07d61627084e8beb81b58cf73bde-456ad101c042d84f-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-6fdaf5c977a3ce419bd6796b9c74c23c-5cfdac6b7244ef4f-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "e206933a014c7dbf7aff43c7e47ae5af", "x-ms-return-client-request-id": "true" @@ -123,21 +123,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "663b3e74-a1bb-4925-8362-0c355fd17631", + "apim-request-id": "a8ae05a4-57f4-491a-82b2-15d5f41e936a", "Content-Length": "873", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:41:08 GMT", + "Date": "Sat, 05 Jun 2021 03:31:55 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "173", - "x-request-id": "663b3e74-a1bb-4925-8362-0c355fd17631" + "x-envoy-upstream-service-time": "232", + "x-request-id": "a8ae05a4-57f4-491a-82b2-15d5f41e936a" }, "ResponseBody": { - "dataFeedId": "f9da07ab-7664-4c2f-b5cf-5490d454fd5b", + "dataFeedId": "1bbb3ca8-d178-43b8-aafc-7f00c12b9cc6", "dataFeedName": "dataFeedG3RthPA9", "metrics": [ { - "metricId": "3be53a9f-0380-4209-9a6a-20a362773f3c", + "metricId": "ac258985-0c5c-4744-84dd-7a426c059139", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -165,7 +165,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:41:08Z", + "createdTime": "2021-06-05T03:31:55Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -175,15 +175,15 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/f9da07ab-7664-4c2f-b5cf-5490d454fd5b", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/1bbb3ca8-d178-43b8-aafc-7f00c12b9cc6", "RequestMethod": "PATCH", "RequestHeaders": { "Accept": "application/json", - "Content-Length": "535", + "Content-Length": "564", "Content-Type": "application/merge-patch\u002Bjson", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-d8c5c152204fa647ba4bbb74ec3506b7-ca466d08ecfa1343-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-477100796916274aa7eccd0b87ae6451-d273591e00ce1143-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "d708f14845c0ffc68899a23d3417e1d2", "x-ms-return-client-request-id": "true" @@ -210,91 +210,26 @@ ], "viewers": [], "status": "Active", - "actionLinkTemplate": "" - }, - "StatusCode": 200, - "ResponseHeaders": { - "apim-request-id": "6339d3d2-58fe-49d1-8595-29d364824ade", - "Content-Length": "924", - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:41:09 GMT", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "902", - "x-request-id": "6339d3d2-58fe-49d1-8595-29d364824ade" - }, - "ResponseBody": { - "dataFeedId": "f9da07ab-7664-4c2f-b5cf-5490d454fd5b", - "dataFeedName": "dataFeedG3RthPA9", - "metrics": [ - { - "metricId": "3be53a9f-0380-4209-9a6a-20a362773f3c", - "metricName": "cost", - "metricDisplayName": "cost", - "metricDescription": "" - } - ], - "dimension": [], - "dataStartFrom": "2020-08-01T00:00:00Z", - "dataSourceType": "SqlServer", - "timestampColumn": "", - "startOffsetInSeconds": 0, - "maxQueryPerMinute": 30.0, - "granularityName": "Daily", - "needRollup": "NoRollup", - "fillMissingPointType": "PreviousValue", - "fillMissingPointValue": 0.0, - "rollUpMethod": "None", - "dataFeedDescription": "This data feed was created to test the .NET client.", - "stopRetryAfterInSeconds": -1, - "minRetryIntervalInSeconds": -1, - "maxConcurrency": -1, - "viewMode": "Private", - "admins": [ - "foo@contoso.com" - ], - "viewers": [], - "creator": "foo@contoso.com", - "status": "Active", - "createdTime": "2021-06-03T21:41:08Z", - "isAdmin": true, "actionLinkTemplate": "", - "dataSourceParameter": { - "query": "query" - }, "authenticationType": "Basic" - } - }, - { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/f9da07ab-7664-4c2f-b5cf-5490d454fd5b", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-f4e1d515153f4f449752bfbd12c42dfa-0dcf940e076bcd4b-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-api-key": "Sanitized", - "x-ms-client-request-id": "db070c65e0b665cf620dabb153bc2508", - "x-ms-return-client-request-id": "true" }, - "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "56eae817-90bc-4e7c-b576-3d40fd82cd00", + "apim-request-id": "c4ef0f8e-49d7-4427-a86c-21deaf9e1238", "Content-Length": "924", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:41:09 GMT", + "Date": "Sat, 05 Jun 2021 03:31:56 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "162", - "x-request-id": "56eae817-90bc-4e7c-b576-3d40fd82cd00" + "x-envoy-upstream-service-time": "752", + "x-request-id": "c4ef0f8e-49d7-4427-a86c-21deaf9e1238" }, "ResponseBody": { - "dataFeedId": "f9da07ab-7664-4c2f-b5cf-5490d454fd5b", + "dataFeedId": "1bbb3ca8-d178-43b8-aafc-7f00c12b9cc6", "dataFeedName": "dataFeedG3RthPA9", "metrics": [ { - "metricId": "3be53a9f-0380-4209-9a6a-20a362773f3c", + "metricId": "ac258985-0c5c-4744-84dd-7a426c059139", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -322,7 +257,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:41:08Z", + "createdTime": "2021-06-05T03:31:55Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -332,33 +267,33 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/f9da07ab-7664-4c2f-b5cf-5490d454fd5b", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/1bbb3ca8-d178-43b8-aafc-7f00c12b9cc6", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-432ea6b2a05626478d612813b01cf80a-2c77ee92b7cc2246-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-8a04bc8a7439d94ea027a4e8966a283c-bca8cf22687e9947-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", - "x-ms-client-request-id": "23672b0e39d0f5bbcd075ab35f814963", + "x-ms-client-request-id": "db070c65e0b665cf620dabb153bc2508", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "apim-request-id": "b54400ee-be19-4cfe-99fa-a7345dbdcbb0", + "apim-request-id": "58faaf32-d050-497b-aa0c-8812a185fe09", "Content-Length": "0", - "Date": "Thu, 03 Jun 2021 21:41:10 GMT", + "Date": "Sat, 05 Jun 2021 03:32:01 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "376", - "x-request-id": "b54400ee-be19-4cfe-99fa-a7345dbdcbb0" + "x-envoy-upstream-service-time": "5448", + "x-request-id": "58faaf32-d050-497b-aa0c-8812a185fe09" }, "ResponseBody": [] } ], "Variables": { - "DateTimeOffsetNow": "2021-06-03T14:41:10.2623138-07:00", + "DateTimeOffsetNow": "2021-06-04T20:31:55.8722519-07:00", "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", "METRICSADVISOR_ENDPOINT_SUFFIX": null, "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized", diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithMinimumSetupAndGetInstanceAsync.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithMinimumSetupAndGetInstanceAsync.json index 895d9474490bc..e34b1ab122474 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithMinimumSetupAndGetInstanceAsync.json +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/DataFeedLiveTests/UpdateSqlServerDataFeedWithMinimumSetupAndGetInstanceAsync.json @@ -8,8 +8,8 @@ "Content-Length": "234", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-bc7261f150a54c4e80420ffaa5269a15-d2cbde5151879c4c-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-536b08495d88894ea446d0b92d3125da-6ec670c7e38d4843-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "da77991cfe05878e95a430b25c8ff92d", "x-ms-return-client-request-id": "true" @@ -31,25 +31,25 @@ }, "StatusCode": 201, "ResponseHeaders": { - "apim-request-id": "7f96102d-3ea5-4c87-a180-7d039545f91f", + "apim-request-id": "ceae59b4-a68b-4016-bb39-ddc8567a169a", "Content-Length": "0", - "Date": "Thu, 03 Jun 2021 21:42:48 GMT", - "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/2c5a8863-99c9-43c9-9ed6-fbece8404f44", + "Date": "Sat, 05 Jun 2021 03:33:44 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/9dd40186-2d5b-42c2-b953-ab7fb889eb71", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "589", - "x-request-id": "7f96102d-3ea5-4c87-a180-7d039545f91f" + "x-envoy-upstream-service-time": "1051", + "x-request-id": "ceae59b4-a68b-4016-bb39-ddc8567a169a" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/2c5a8863-99c9-43c9-9ed6-fbece8404f44", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/9dd40186-2d5b-42c2-b953-ab7fb889eb71", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-bc7261f150a54c4e80420ffaa5269a15-3085c766e577ac40-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-536b08495d88894ea446d0b92d3125da-3471862d49f60845-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "070b663926eb738a43f71339fbd611ab", "x-ms-return-client-request-id": "true" @@ -57,21 +57,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "88de6436-b28d-4b79-a264-607080445d10", + "apim-request-id": "75c5c421-97b5-48d1-ae51-6d95ba34017e", "Content-Length": "873", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:42:48 GMT", + "Date": "Sat, 05 Jun 2021 03:33:45 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "170", - "x-request-id": "88de6436-b28d-4b79-a264-607080445d10" + "x-envoy-upstream-service-time": "256", + "x-request-id": "75c5c421-97b5-48d1-ae51-6d95ba34017e" }, "ResponseBody": { - "dataFeedId": "2c5a8863-99c9-43c9-9ed6-fbece8404f44", + "dataFeedId": "9dd40186-2d5b-42c2-b953-ab7fb889eb71", "dataFeedName": "dataFeedjQqsIhT9", "metrics": [ { - "metricId": "9cdff838-0fec-4cca-907e-0d19871bad32", + "metricId": "7bea9214-eae6-468c-8ea6-3c2b9bc5ec65", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -99,7 +99,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:42:48Z", + "createdTime": "2021-06-05T03:33:44Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -109,13 +109,13 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/2c5a8863-99c9-43c9-9ed6-fbece8404f44", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/9dd40186-2d5b-42c2-b953-ab7fb889eb71", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-a085df9942b2464eb75584e63d6d434a-43385304f5986640-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-17ab12bcd2937a4c82bb96dd9a769dc2-10de766500f9544f-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "74fe3d9a89791549414fb76454e519d7", "x-ms-return-client-request-id": "true" @@ -123,21 +123,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "e9fb9c23-a534-4c84-9fae-77ccd043ebee", + "apim-request-id": "6d3c87b5-ccfc-47c6-be41-19d41e90d96b", "Content-Length": "873", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:42:53 GMT", + "Date": "Sat, 05 Jun 2021 03:33:45 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "5179", - "x-request-id": "e9fb9c23-a534-4c84-9fae-77ccd043ebee" + "x-envoy-upstream-service-time": "198", + "x-request-id": "6d3c87b5-ccfc-47c6-be41-19d41e90d96b" }, "ResponseBody": { - "dataFeedId": "2c5a8863-99c9-43c9-9ed6-fbece8404f44", + "dataFeedId": "9dd40186-2d5b-42c2-b953-ab7fb889eb71", "dataFeedName": "dataFeedjQqsIhT9", "metrics": [ { - "metricId": "9cdff838-0fec-4cca-907e-0d19871bad32", + "metricId": "7bea9214-eae6-468c-8ea6-3c2b9bc5ec65", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -165,7 +165,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:42:48Z", + "createdTime": "2021-06-05T03:33:44Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -175,15 +175,15 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/2c5a8863-99c9-43c9-9ed6-fbece8404f44", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/9dd40186-2d5b-42c2-b953-ab7fb889eb71", "RequestMethod": "PATCH", "RequestHeaders": { "Accept": "application/json", - "Content-Length": "535", + "Content-Length": "564", "Content-Type": "application/merge-patch\u002Bjson", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-e32906b6028b0144812ad93cce21a404-0ed6667cc4626c40-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-d7a59d178db530459da7a089a0b572d3-96b532e5c6603c48-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", "x-ms-client-request-id": "af4898ce80edf6db0e04960eeb558bbf", "x-ms-return-client-request-id": "true" @@ -210,91 +210,26 @@ ], "viewers": [], "status": "Active", - "actionLinkTemplate": "" - }, - "StatusCode": 200, - "ResponseHeaders": { - "apim-request-id": "5c735004-9d34-4bf2-b382-e85edfef28b0", - "Content-Length": "924", - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:42:54 GMT", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "1035", - "x-request-id": "5c735004-9d34-4bf2-b382-e85edfef28b0" - }, - "ResponseBody": { - "dataFeedId": "2c5a8863-99c9-43c9-9ed6-fbece8404f44", - "dataFeedName": "dataFeedjQqsIhT9", - "metrics": [ - { - "metricId": "9cdff838-0fec-4cca-907e-0d19871bad32", - "metricName": "cost", - "metricDisplayName": "cost", - "metricDescription": "" - } - ], - "dimension": [], - "dataStartFrom": "2020-08-01T00:00:00Z", - "dataSourceType": "SqlServer", - "timestampColumn": "", - "startOffsetInSeconds": 0, - "maxQueryPerMinute": 30.0, - "granularityName": "Daily", - "needRollup": "NoRollup", - "fillMissingPointType": "PreviousValue", - "fillMissingPointValue": 0.0, - "rollUpMethod": "None", - "dataFeedDescription": "This data feed was created to test the .NET client.", - "stopRetryAfterInSeconds": -1, - "minRetryIntervalInSeconds": -1, - "maxConcurrency": -1, - "viewMode": "Private", - "admins": [ - "foo@contoso.com" - ], - "viewers": [], - "creator": "foo@contoso.com", - "status": "Active", - "createdTime": "2021-06-03T21:42:48Z", - "isAdmin": true, "actionLinkTemplate": "", - "dataSourceParameter": { - "query": "query" - }, "authenticationType": "Basic" - } - }, - { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/2c5a8863-99c9-43c9-9ed6-fbece8404f44", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-f5c63e25990b4341969d6f352d7bd5c5-33dbbf88186a3d41-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-api-key": "Sanitized", - "x-ms-client-request-id": "1e1885928490afb41cf5c69c6f261e5d", - "x-ms-return-client-request-id": "true" }, - "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "dae87718-f904-4b35-b47d-9fbdff19dc56", + "apim-request-id": "46882b88-840b-46d0-a5ff-34627b063f4a", "Content-Length": "924", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 03 Jun 2021 21:42:55 GMT", + "Date": "Sat, 05 Jun 2021 03:33:46 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "166", - "x-request-id": "dae87718-f904-4b35-b47d-9fbdff19dc56" + "x-envoy-upstream-service-time": "916", + "x-request-id": "46882b88-840b-46d0-a5ff-34627b063f4a" }, "ResponseBody": { - "dataFeedId": "2c5a8863-99c9-43c9-9ed6-fbece8404f44", + "dataFeedId": "9dd40186-2d5b-42c2-b953-ab7fb889eb71", "dataFeedName": "dataFeedjQqsIhT9", "metrics": [ { - "metricId": "9cdff838-0fec-4cca-907e-0d19871bad32", + "metricId": "7bea9214-eae6-468c-8ea6-3c2b9bc5ec65", "metricName": "cost", "metricDisplayName": "cost", "metricDescription": "" @@ -322,7 +257,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-03T21:42:48Z", + "createdTime": "2021-06-05T03:33:44Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -332,33 +267,33 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/2c5a8863-99c9-43c9-9ed6-fbece8404f44", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/9dd40186-2d5b-42c2-b953-ab7fb889eb71", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-a2816be5306573498c760ba1d7b12d34-a926e5c3de291c49-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210603.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-3718969301c2754c99602124124b484b-2fbbfb25dc0c024e-00", + "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", - "x-ms-client-request-id": "636a3bdd628e19be62086675f23b29eb", + "x-ms-client-request-id": "1e1885928490afb41cf5c69c6f261e5d", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "apim-request-id": "87965d98-d667-416f-90aa-02099ab80d64", + "apim-request-id": "142fee00-d344-4025-8e3c-f74c7f505305", "Content-Length": "0", - "Date": "Thu, 03 Jun 2021 21:42:55 GMT", + "Date": "Sat, 05 Jun 2021 03:33:47 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "332", - "x-request-id": "87965d98-d667-416f-90aa-02099ab80d64" + "x-envoy-upstream-service-time": "419", + "x-request-id": "142fee00-d344-4025-8e3c-f74c7f505305" }, "ResponseBody": [] } ], "Variables": { - "DateTimeOffsetNow": "2021-06-03T14:42:55.6082967-07:00", + "DateTimeOffsetNow": "2021-06-04T20:33:45.9671252-07:00", "METRICSADVISOR_ACCOUNT_NAME": "js-metrics-advisor", "METRICSADVISOR_ENDPOINT_SUFFIX": null, "METRICSADVISOR_PRIMARY_API_KEY": "Sanitized",