New-AzApplicationInsightsWorkbookTemplate
Buat templat buku kerja baru.
Sintaks
New-AzApplicationInsightsWorkbookTemplate
-Name <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
-Location <String>
[-Author <String>]
[-Gallery <IWorkbookTemplateGallery[]>]
[-Localized <Hashtable>]
[-Priority <Int32>]
[-Tag <Hashtable>]
[-TemplateData <Hashtable>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Deskripsi
Buat templat buku kerja baru.
Contoh
Contoh 1: Membuat templat buku kerja baru
$gallery = New-AzApplicationInsightsWorkbookTemplateGalleryObject -Category "Failures" -Name "Simple Template" -Type 'tsg' -ResourceType "microsoft.insights/components" -Order 100
$data = @{
"version"= "Notebook/1.0";
"items"= @(
@{
"type"= 1;
"content"= @{
"json"= "## New workbook\n---\n\nWelcome to your new workbook. This area will display text formatted as markdown.\n\n\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections."
};
"name"= "text - 2"
},
@{
"type"= 3;
"content"= @{
"version"= "KqlItem/1.0";
"query"= "union withsource=TableName *\n| summarize Count=count() by TableName\n| render barchart";
"size"= 1;
"exportToExcelOptions"= "visible";
"queryType"= 0;
"resourceType"= "microsoft.operationalinsights/workspaces"
};
"name"= "query - 2"
}
);
"styleSettings"= @{};
"$schema"= "https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json"
}
New-AzApplicationInsightsWorkbookTemplate -ResourceGroupName resourceGroup -Name 'workbooktemplate-pwsh01' -Location 'westus2' -Gallery $gallery -TemplateData $data -Priority 1
ResourceGroupName Name Location
----------------- ---- --------
appinsights-hkrs2v-test workbooktemplate-pwsh01 westus2
Buat templat buku kerja baru.
Parameter
-Author
Informasi tentang penulis templat buku kerja.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-Confirm
Meminta Anda mengonfirmasi sebelum menjalankan cmdlet.
Jenis: | SwitchParameter |
Alias: | cf |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-DefaultProfile
Parameter DefaultProfile tidak berfungsi. Gunakan parameter SubscriptionId saat tersedia jika menjalankan cmdlet terhadap langganan yang berbeda.
Jenis: | PSObject |
Alias: | AzureRMContext, AzureCredential |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-Gallery
Galeri buku kerja yang didukung oleh templat. Untuk membuat, lihat bagian CATATAN untuk properti GALERI dan membuat tabel hash.
Jenis: | IWorkbookTemplateGallery[] |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-Localized
Pasangan nilai kunci galeri yang dilokalkan. Setiap kunci adalah kode lokal bahasa yang didukung oleh portal Azure.
Jenis: | Hashtable |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-Location
Lokasi sumber daya
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | False |
Terima karakter wildcard: | False |
-Name
Nama sumber daya komponen Application Insights.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | False |
Terima karakter wildcard: | False |
-Priority
Prioritas templat. Menentukan templat mana yang akan dibuka saat galeri buku kerja dibuka dalam mode penampil.
Jenis: | Int32 |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-ResourceGroupName
Nama grup sumber daya. Nama tidak peka huruf besar/kecil.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | False |
Terima karakter wildcard: | False |
-SubscriptionId
ID langganan target.
Jenis: | String |
Position: | Named |
Nilai default: | (Get-AzContext).Subscription.Id |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-Tag
Tag sumber daya
Jenis: | Hashtable |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-TemplateData
Objek JSON yang valid berisi payload templat buku kerja.
Jenis: | Hashtable |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-WhatIf
Menunjukkan apa yang akan terjadi jika cmdlet berjalan. Cmdlet tidak dijalankan.
Jenis: | SwitchParameter |
Alias: | wi |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |