Invoke-AzKustoDataConnectionValidation

Checks that the data connection parameters are valid.

Syntax

Invoke-AzKustoDataConnectionValidation
      -ClusterName <String>
      -DatabaseName <String>
      -ResourceGroupName <String>
      [-SubscriptionId <String>]
      -Kind <Kind>
      -DataConnectionName <String>
      -ConsumerGroup <String>
      -Location <String>
      -EventHubResourceId <String>
      [-DataFormat <String>]
      [-EventSystemProperty <String[]>]
      [-MappingRuleName <String>]
      [-TableName <String>]
      [-Compression <Compression>]
      [-ManagedIdentityResourceId <String>]
      [-DatabaseRouting <DatabaseRouting>]
      [-RetrievalStartDate <DateTime>]
      [-DefaultProfile <PSObject>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Invoke-AzKustoDataConnectionValidation
      -ClusterName <String>
      -DatabaseName <String>
      -ResourceGroupName <String>
      [-SubscriptionId <String>]
      -Kind <Kind>
      -DataConnectionName <String>
      -ConsumerGroup <String>
      -Location <String>
      -EventHubResourceId <String>
      [-DataFormat <String>]
      [-MappingRuleName <String>]
      [-TableName <String>]
      [-ManagedIdentityResourceId <String>]
      [-DatabaseRouting <DatabaseRouting>]
      -StorageAccountResourceId <String>
      [-EventGridResourceId <String>]
      [-DefaultProfile <PSObject>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Invoke-AzKustoDataConnectionValidation
      -ClusterName <String>
      -DatabaseName <String>
      -ResourceGroupName <String>
      [-SubscriptionId <String>]
      -Kind <Kind>
      -DataConnectionName <String>
      -ConsumerGroup <String>
      -Location <String>
      [-DataFormat <String>]
      [-EventSystemProperty <String[]>]
      [-MappingRuleName <String>]
      [-TableName <String>]
      [-DatabaseRouting <DatabaseRouting>]
      [-RetrievalStartDate <DateTime>]
      -IotHubResourceId <String>
      -SharedAccessPolicyName <String>
      [-DefaultProfile <PSObject>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Invoke-AzKustoDataConnectionValidation
      -InputObject <IKustoIdentity>
      -Kind <Kind>
      -DataConnectionName <String>
      -ConsumerGroup <String>
      -Location <String>
      -EventHubResourceId <String>
      [-DataFormat <String>]
      [-EventSystemProperty <String[]>]
      [-MappingRuleName <String>]
      [-TableName <String>]
      [-Compression <Compression>]
      [-ManagedIdentityResourceId <String>]
      [-DatabaseRouting <DatabaseRouting>]
      [-RetrievalStartDate <DateTime>]
      [-DefaultProfile <PSObject>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Invoke-AzKustoDataConnectionValidation
      -InputObject <IKustoIdentity>
      -Kind <Kind>
      -DataConnectionName <String>
      -ConsumerGroup <String>
      -Location <String>
      -EventHubResourceId <String>
      [-DataFormat <String>]
      [-MappingRuleName <String>]
      [-TableName <String>]
      [-ManagedIdentityResourceId <String>]
      [-DatabaseRouting <DatabaseRouting>]
      -StorageAccountResourceId <String>
      [-EventGridResourceId <String>]
      [-DefaultProfile <PSObject>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Invoke-AzKustoDataConnectionValidation
      -InputObject <IKustoIdentity>
      -Kind <Kind>
      -DataConnectionName <String>
      -ConsumerGroup <String>
      -Location <String>
      [-DataFormat <String>]
      [-EventSystemProperty <String[]>]
      [-MappingRuleName <String>]
      [-TableName <String>]
      [-DatabaseRouting <DatabaseRouting>]
      [-RetrievalStartDate <DateTime>]
      -IotHubResourceId <String>
      -SharedAccessPolicyName <String>
      [-DefaultProfile <PSObject>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Invoke-AzKustoDataConnectionValidation
      -Kind <Kind>
      -DataConnectionName <String>
      -ConsumerGroup <String>
      -Location <String>
      [-DataFormat <String>]
      [-MappingRuleName <String>]
      [-TableName <String>]
      [-BlobStorageEventType <BlobStorageEventType>]
      [-IgnoreFirstRecord]
      [-DefaultProfile <PSObject>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Invoke-AzKustoDataConnectionValidation
      -Kind <Kind>
      -DataConnectionName <String>
      -ConsumerGroup <String>
      -Location <String>
      [-DataFormat <String>]
      [-MappingRuleName <String>]
      [-TableName <String>]
      [-BlobStorageEventType <BlobStorageEventType>]
      [-IgnoreFirstRecord]
      [-DefaultProfile <PSObject>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

Checks that the data connection parameters are valid.

Examples

Example 1: Validate EventHub data connection parameters

Invoke-AzKustoDataConnectionValidation -ResourceGroupName "testrg" -ClusterName "testnewkustocluster" -DatabaseName "mykustodatabase" -DataConnectionName "myeventhubdc" -Location "East US" -Kind "EventHub" -EventHubResourceId "/subscriptions/$subscriptionId/resourcegroups/testrg/providers/Microsoft.EventHub/namespaces/myeventhubns/eventhubs/myeventhub" -DataFormat "JSON" -ConsumerGroup 'Default' -Compression "None" -TableName "Events" -MappingRuleName "NewEventsMapping"

ErrorMessage
------------
event hub resource id and consumer group tuple provided are already used

The above command validates EventHub data connection named "myeventhubdc" for the database "mykustodatabase" in the cluster "testnewkustocluster".

Example 2: Validate EventGrid data connection parameters

Invoke-AzKustoDataConnectionValidation -ResourceGroupName "testrg" -ClusterName "testnewkustocluster" -DatabaseName "mykustodatabase" -DataConnectionName "myeventgriddc" -Location "East US" -Kind "EventGrid" -EventHubResourceId "/subscriptions/$subscriptionId/resourcegroups/testrg/providers/Microsoft.EventHub/namespaces/myeventhubns/eventhubs/myeventhub" -StorageAccountResourceId "/subscriptions/$subscriptionId/resourcegroups/testrg/providers/Microsoft.Storage/storageAccounts/mystorage" -DataFormat "JSON" -ConsumerGroup 'Default' -TableName "Events" -MappingRuleName "NewEventsMapping"

ErrorMessage
------------
event hub resource id and consumer group tuple provided are already used

The above command validates EventGrid data connection named "myeventgriddc" for the database "mykustodatabase" in the cluster "testnewkustocluster".

Example 3: Validate IotHub data connection parameters

Invoke-AzKustoDataConnectionValidation -ResourceGroupName "testrg" -ClusterName "testnewkustocluster" -DatabaseName "mykustodatabase" -DataConnectionName "myiothubdc" -Location "East US" -Kind "IotHub" -IotHubResourceId "/subscriptions/$subscriptionId/resourcegroups/testrg/providers/Microsoft.Devices/IotHubs/myiothub" -SharedAccessPolicyName "myiothubpolicy" -DataFormat "JSON" -ConsumerGroup 'Default' -TableName "Events" -MappingRuleName "NewEventsMapping"

ErrorMessage
------------
event hub resource id and consumer group tuple provided are already used

The above command validates IotHub data connection named "myiothubdc" for the database "mykustodatabase" in the cluster "testnewkustocluster".

Example 4: Validate EventHub data connection parameters via identity

$database = Get-AzKustoDatabase -ResourceGroupName "testrg" -ClusterName "testnewkustocluster" -DatabaseName "mykustodatabase" 
Invoke-AzKustoDataConnectionValidation -InputObject $database -DataConnectionName "myeventhubdc" -Location "East US" -Kind "EventHub" -EventHubResourceId "/subscriptions/$subscriptionId/resourcegroups/testrg/providers/Microsoft.EventHub/namespaces/myeventhubns/eventhubs/myeventhub" -DataFormat "JSON" -ConsumerGroup 'Default' -Compression "None" -TableName "Events" -MappingRuleName "NewEventsMapping"

ErrorMessage
------------
event hub resource id and consumer group tuple provided are already used

The above command validates EventHub data connection named "myeventhubdc" for the database "mykustodatabase" in the cluster "testnewkustocluster".

Example 5: Validate EventGrid data connection parameters via identity

$database = Get-AzKustoDatabase -ResourceGroupName "testrg" -ClusterName "testnewkustocluster" -DatabaseName "mykustodatabase"
Invoke-AzKustoDataConnectionValidation -InputObject $database -DataConnectionName "myeventgriddc" -Location "East US" -Kind "EventGrid" -EventHubResourceId "/subscriptions/$subscriptionId/resourcegroups/testrg/providers/Microsoft.EventHub/namespaces/myeventhubns/eventhubs/myeventhub" -StorageAccountResourceId "/subscriptions/$subscriptionId/resourcegroups/testrg/providers/Microsoft.Storage/storageAccounts/mystorage" -DataFormat "JSON" -ConsumerGroup 'Default' -TableName "Events" -MappingRuleName "NewEventsMapping"

ErrorMessage
------------
event hub resource id and consumer group tuple provided are already used

The above command validates EventGrid data connection named "myeventgriddc" for the database "mykustodatabase" in the cluster "testnewkustocluster".

Example 6: Validate IotHub data connection parameters via identity

$database = Get-AzKustoDatabase -ResourceGroupName "testrg" -ClusterName "testnewkustocluster" -DatabaseName "mykustodatabase" 
Invoke-AzKustoDataConnectionValidation -InputObject $database -DataConnectionName "myiothubdc" -Location "East US" -Kind "IotHub" -IotHubResourceId "/subscriptions/$subscriptionId/resourcegroups/testrg/providers/Microsoft.Devices/IotHubs/myiothub" -SharedAccessPolicyName "myiothubpolicy" -DataFormat "JSON" -ConsumerGroup 'Default' -TableName "Events" -MappingRuleName "NewEventsMapping"

ErrorMessage
------------
event hub resource id and consumer group tuple provided are already used

The above command validates IotHub data connection named "myiothubdc" for the database "mykustodatabase" in the cluster "testnewkustocluster".

Parameters

-BlobStorageEventType

The name of blob storage event type to process.

Type:BlobStorageEventType
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ClusterName

The name of the Kusto cluster.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Compression

The event hub messages compression type.

Type:Compression
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ConsumerGroup

The event/iot hub consumer group.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-DatabaseName

The name of the database in the Kusto cluster.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-DatabaseRouting

Indication for database routing information from the data connection, by default only database routing information is allowed.

Type:DatabaseRouting
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DataConnectionName

The name of the data connection.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-DataFormat

The data format of the message. Optionally the data format can be added to each message.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-EventGridResourceId

The resource ID of the event grid that is subscribed to the storage account events.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-EventHubResourceId

The resource ID of the event hub to be used to create a data connection / event grid is configured to send events.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-EventSystemProperty

System properties of the event/iot hub.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-IgnoreFirstRecord

If set to true, indicates that ingestion should ignore the first record of every file.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

Type:IKustoIdentity
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-IotHubResourceId

The resource ID of the Iot hub to be used to create a data connection.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Kind

Kind of the endpoint for the data connection

Type:Kind
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Location

Resource location.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ManagedIdentityResourceId

The resource ID of a managed identity (system or user assigned) to be used to authenticate with external resources.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-MappingRuleName

The mapping rule to be used to ingest the data. Optionally the mapping information can be added to each message.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

The name of the resource group containing the Kusto cluster.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-RetrievalStartDate

When defined, the data connection retrieves existing Event hub events created since the Retrieval start date. It can only retrieve events retained by the Event hub, based on its retention period.

Type:DateTime
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SharedAccessPolicyName

The name of the share access policy.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-StorageAccountResourceId

The resource ID of the storage account where the data resides.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SubscriptionId

Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

Type:String
Position:Named
Default value:(Get-AzContext).Subscription.Id
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-TableName

The table where the data should be ingested. Optionally the table information can be added to each message.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

IKustoIdentity

Outputs

IDataConnectionValidationResult