Class SqlServerDataFeedSource
java.lang.Object
com.azure.ai.metricsadvisor.administration.models.DataFeedSource
com.azure.ai.metricsadvisor.administration.models.SqlServerDataFeedSource
The SQLServerDataFeedSource model.
-
Method Summary
Modifier and TypeMethodDescriptionstatic SqlServerDataFeedSourcefromBasicCredential(String connectionString, String query) Create a SQLServerDataFeedSource with credential included in theconnectionStringas plain text.static SqlServerDataFeedSourcefromConnectionStringCredential(String query, String credentialId) Create a SQLServerDataFeedSource with thecredentialIdidentifying a credential entity of typeDataSourceSqlServerConnectionStringthat contains the SQL connection string.static SqlServerDataFeedSourcefromManagedIdentityCredential(String connectionString, String query) Create a SQLServerDataFeedSource with theconnectionStringcontaining the resource id of the SQL server on which metrics advisor has MSI access.static SqlServerDataFeedSourcefromServicePrincipalCredential(String connectionString, String query, String credentialId) Create a SQLServerDataFeedSource with thecredentialIdidentifying a credential entity of typeDataSourceServicePrincipal, the entity contains Service Principal to access the SQL Server.static SqlServerDataFeedSourcefromServicePrincipalInKeyVaultCredential(String connectionString, String query, String credentialId) Create a SQLServerDataFeedSource with thecredentialIdidentifying a credential entity of typeDataSourceServicePrincipalInKeyVault, the entity contains details of the KeyVault holding the Service Principal to access the SQL Server.Gets the authentication type to access the data source.Gets the id of thecredential resourceto authenticate the data source.getQuery()Get the query that retrieves the values to be analyzed for anomalies.
-
Method Details
-
fromBasicCredential
Create a SQLServerDataFeedSource with credential included in theconnectionStringas plain text.- Parameters:
connectionString- The SQL server connection string.query- The query that retrieves the values to be analyzed for anomalies.- Returns:
- The SQLServerDataFeedSource.
-
fromManagedIdentityCredential
public static SqlServerDataFeedSource fromManagedIdentityCredential(String connectionString, String query) Create a SQLServerDataFeedSource with theconnectionStringcontaining the resource id of the SQL server on which metrics advisor has MSI access.- Parameters:
connectionString- The SQL server connection string.query- The query that retrieves the values to be analyzed for anomalies.- Returns:
- The SQLServerDataFeedSource.
-
fromConnectionStringCredential
public static SqlServerDataFeedSource fromConnectionStringCredential(String query, String credentialId) Create a SQLServerDataFeedSource with thecredentialIdidentifying a credential entity of typeDataSourceSqlServerConnectionStringthat contains the SQL connection string.- Parameters:
query- The query that retrieves the values to be analyzed for anomalies.credentialId- The unique id of a credential entity of typeDataSourceSqlServerConnectionString.- Returns:
- The SQLServerDataFeedSource.
-
fromServicePrincipalCredential
public static SqlServerDataFeedSource fromServicePrincipalCredential(String connectionString, String query, String credentialId) Create a SQLServerDataFeedSource with thecredentialIdidentifying a credential entity of typeDataSourceServicePrincipal, the entity contains Service Principal to access the SQL Server.- Parameters:
connectionString- The SQL server connection string.query- The query that retrieves the values to be analyzed for anomalies.credentialId- The unique id of a credential entity of typeDataSourceServicePrincipal.- Returns:
- The SQLServerDataFeedSource.
-
fromServicePrincipalInKeyVaultCredential
public static SqlServerDataFeedSource fromServicePrincipalInKeyVaultCredential(String connectionString, String query, String credentialId) Create a SQLServerDataFeedSource with thecredentialIdidentifying a credential entity of typeDataSourceServicePrincipalInKeyVault, the entity contains details of the KeyVault holding the Service Principal to access the SQL Server.- Parameters:
connectionString- The SQL server connection string.query- The query that retrieves the values to be analyzed for anomalies.credentialId- The unique id of a credential entity of typeDataSourceServicePrincipalInKeyVault.- Returns:
- The SQLServerDataFeedSource.
-
getQuery
Get the query that retrieves the values to be analyzed for anomalies.- Returns:
- the query.
-
getCredentialId
Gets the id of thecredential resourceto authenticate the data source.- Returns:
- The credential resource id.
-
getAuthenticationType
Gets the authentication type to access the data source.- Returns:
- The authentication type.
-