你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

New-AzKustoScript

Creates a Kusto database script.

Syntax

New-AzKustoScript
   -ClusterName <String>
   -DatabaseName <String>
   -Name <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String>]
   [-ContinueOnError]
   [-ForceUpdateTag <String>]
   [-ScriptContent <String>]
   [-ScriptUrl <String>]
   [-ScriptUrlSasToken <String>]
   [-DefaultProfile <PSObject>]
   [-AsJob]
   [-NoWait]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]
New-AzKustoScript
   -ClusterName <String>
   -DatabaseName <String>
   -Name <String>
   -ResourceGroupName <String>
   -Parameter <IScript>
   [-SubscriptionId <String>]
   [-DefaultProfile <PSObject>]
   [-AsJob]
   [-NoWait]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]

Description

Creates a Kusto database script.

Examples

Example 1: Create a Kusto database script

New-AzKustoScript -ClusterName testnewkustocluster -DatabaseName mykustodatabase -Name newkustoscript -ResourceGroupName testrg -ScriptUrl $BlobSASURL -ScriptUrlSasToken $BlobSASToken

Name                                               Type
----                                               ----
testnewkustocluster/mykustodatabase/newkustoscript Microsoft.Kusto/Clusters/Databases/Scripts

The above command creates a Kusto database script named "newkustocript" in the resource group "testrg".

Parameters

-AsJob

Run the command as a job

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

-ClusterName

The name of the Kusto cluster.

Type:String
Position:Named
Default value:None
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
Accept pipeline input:False
Accept wildcard characters:False

-ContinueOnError

Flag that indicates whether to continue if one of the command fails.

Type:SwitchParameter
Position:Named
Default value:None
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
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
Accept pipeline input:False
Accept wildcard characters:False

-ForceUpdateTag

A unique string. If changed the script will be applied again.

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

-Name

The name of the Kusto database script.

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

-NoWait

Run the command asynchronously

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

-Parameter

Class representing a database script. To construct, see NOTES section for PARAMETER properties and create a hash table.

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

-ResourceGroupName

The name of the resource group containing the Kusto cluster.

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

-ScriptContent

The script content. This property should be used when the script is provide inline and not through file in a SA. Must not be used together with scriptUrl and scriptUrlSasToken properties.

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

-ScriptUrl

The url to the KQL script blob file. Must not be used together with scriptContent property

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

-ScriptUrlSasToken

The SaS token that provide read access to the file which contain the script. Must be provided when using scriptUrl property.

Type:String
Position:Named
Default value:None
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
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
Accept pipeline input:False
Accept wildcard characters:False

Inputs

IScript

Outputs

IScript

Notes

ALIASES

COMPLEX PARAMETER PROPERTIES

To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.

PARAMETER <IScript>: Class representing a database script.

  • [AzureAsyncOperation <String>]:
  • [Content <String>]: The script content. This property should be used when the script is provide inline and not through file in a SA. Must not be used together with scriptUrl and scriptUrlSasToken properties.
  • [ContinueOnError <Boolean?>]: Flag that indicates whether to continue if one of the command fails.
  • [ForceUpdateTag <String>]: A unique string. If changed the script will be applied again.
  • [SystemDataCreatedAt <DateTime?>]: The timestamp of resource creation (UTC).
  • [SystemDataCreatedBy <String>]: The identity that created the resource.
  • [SystemDataCreatedByType <CreatedByType?>]: The type of identity that created the resource.
  • [SystemDataLastModifiedAt <DateTime?>]: The timestamp of resource last modification (UTC)
  • [SystemDataLastModifiedBy <String>]: The identity that last modified the resource.
  • [SystemDataLastModifiedByType <CreatedByType?>]: The type of identity that last modified the resource.
  • [Url <String>]: The url to the KQL script blob file. Must not be used together with scriptContent property
  • [UrlSasToken <String>]: The SaS token that provide read access to the file which contain the script. Must be provided when using scriptUrl property.