Redgate Monitor 14

New-RedgateMonitorAzureSqlDatabase

Creates a new temporary object that holds information about a Azure SQL Database instance.

Syntax

New-RedgateMonitorAzureSqlDatabase -AzureSqlDatabaseCredential <CredentialsTransferObject> [-Group <Group>] [-AutoDiscoveryEnabled <bool>] [-Databases <string[]>] [<CommonParameters>]

New-RedgateMonitorAzureSqlDatabase -FullName <string> -BaseMonitor <BaseMonitor> [-Group <Group>] [-UserName <string>] [-Password <string>] [-AzureAuthenticationMode <string>] [-AutoDiscoveryEnabled <bool>] [-Databases <string[]>] [<CommonParameters>]

Description

The New-RedgateMonitorAzureSqlDatabase cmdlet creates a new temporary object that holds information about a Azure SQL Database instance. The returned object needs to be passed to Add-RedgateMonitorMonitoredObject, as it does not add anything to Redgate Monitor on its own.

Parameters

-AzureSqlDatabaseCredential <CredentialsTransferObject>

Definitions of the monitored objects to be created, as returned by the New-RedgateMonitorAzureSqlDatabaseCredential cmdlet.

Aliases None
Required? true
Position? named
Default Value None
Accept Pipeline Input True (ByValue)
Accept Wildcard Characters false

-FullName <String>

The full address of the Azure SQL Database server to be monitored, e.g. "sample.database.windows.net".

Aliases None
Required? true
Position? named
Default Value None
Accept Pipeline Input True (ByValue)
Accept Wildcard Characters false

-BaseMonitor <BaseMonitor>

The base monitor to add the monitored object to. For more informatiom, see https://documentation.red-gate.com/monitor14/api/powershell-api/powershell-cmdlet-reference/get-redgatemonitorbasemonitor.

Aliases None
Required? true
Position? named
Default Value None
Accept Pipeline Input False
Accept Wildcard Characters false

-Group <Group>

Group object - use Get-Group or related methods to find the group.

Aliases None
Required? false
Position? named
Default Value None
Accept Pipeline Input False
Accept Wildcard Characters false

-UserName <String>

Username to connect to Azure SQL Database instance with. For a Microsoft Entra ID Managed Identity, this can also be used to specify the client ID for a user-assigned identity, for which the -ClientId alias can help improve readability.

Aliases None
Required? false
Position? named
Default Value None
Accept Pipeline Input False
Accept Wildcard Characters false

-Password <String>

Password to connect to Azure SQL Database instance with.

Aliases None
Required? false
Position? named
Default Value None
Accept Pipeline Input False
Accept Wildcard Characters false

-AzureAuthenticationMode <String>

"SqlServerAuthentication", "MicrosoftEntraIdPassword", "MicrosoftEntraIdIntegrated" or "MicrosoftEntraIdManagedIdentity", the authentication mode which is used to connect to an Azure SQL Database. "AzureActiveDirectoryPassword", "AzureActiveDirectoryIntegrated" and "AzureActiveDirectoryManagedIdentity" are supported aliases for the Microsoft Entra ID authentication modes.

Aliases None
Required? false
Position? named
Default Value SqlServerAuthentication
Accept Pipeline Input False
Accept Wildcard Characters false

-AutoDiscoveryEnabled <Boolean>

Flag to set automatic database discovery.

Aliases None
Required? false
Position? named
Default Value True
Accept Pipeline Input False
Accept Wildcard Characters false

-Databases <String[]>

List of database names that need to be monitored, required if AutoDiscoveryEnabled is false.

Aliases None
Required? false
Position? named
Default Value @()
Accept Pipeline Input False
Accept Wildcard Characters false

-ProgressAction <ActionPreference>

{{ Fill ProgressAction Description }}

Aliases None
Required? false
Position? named
Default Value None
Accept Pipeline Input False
Accept Wildcard Characters false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see http://technet.microsoft.com/en-us/library/hh847884.aspx.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • None.
    You cannot pipe input to this cmdlet.

Examples

-------------------------- EXAMPLE 1 --------------------------

$instance = New-RedgateMonitorAzureSqlDatabase -FullName "sample.database.windows.net" -BaseMonitor $BaseMonitor -UserName "sql_username" -Password "sql_pass" -AzureAuthenticationMode SqlServerAuthentication
$instance | Add-RedgateMonitorMonitoredObject

-------------------------- EXAMPLE 2 --------------------------

$azureCredentials = New-RedgateMonitorAzureSqlDatabaseCredential -FullName "sample.database.windows.net" -BaseMonitor $BaseMonitor -UserName "sql_username" -Password "sql_pass" -AzureAuthenticationMode SqlServerAuthentication
$instance = New-RedgateMonitorAzureSqlDatabase -AzureSqlDatabaseCredential $azureCredentials
$instance | Add-RedgateMonitorMonitoredObject

-------------------------- EXAMPLE 3 --------------------------

$instance = New-RedgateMonitorAzureSqlDatabase -FullName "sample.database.windows.net" -BaseMonitor $BaseMonitor -UserName "ad_username" -Password "ad_password" -AzureAuthenticationMode AzureActiveDirectoryPassword
$instance | Add-RedgateMonitorMonitoredObject


Didn't find what you were looking for?