New-AzPipelineGroup
建立管線群組實例。
語法
New-AzPipelineGroup
-Name <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
-Location <String>
[-Exporter <IExporter[]>]
[-ExtendedLocationName <String>]
[-ExtendedLocationType <String>]
[-NetworkingConfiguration <INetworkingConfiguration[]>]
[-PersistencePersistentVolumeName <String>]
[-Processor <IProcessor[]>]
[-Receiver <IReceiver[]>]
[-Replica <Int32>]
[-ServicePipeline <IPipeline[]>]
[-Tag <Hashtable>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzPipelineGroup
-Name <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
-JsonFilePath <String>
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzPipelineGroup
-Name <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
-JsonString <String>
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
建立管線群組實例。
範例
範例 1:使用 JSON 檔案建立管線群組
New-AzPipelineGroup -JsonFilePath CreatePipelineGroupBody.json -Name testgroup -ResourceGroupName kubetest -SubscriptionId 00000000-0000-0000-0000-000000000000
Exporter : {{
"azureMonitorWorkspaceLogs": {
"api": {
"schema": {
"recordMap": [
{
"from": "body",
"to": "Body"
},
{
"from": "severity_text",
"to": "SeverityText"
},
{
"from": "time_unix_nano",
"to": "TimeGenerated"
}
]
},
"dataCollectionEndpointUrl":
"https://myexporter.eastus-1.ingest.monitor.azure.com",
"stream": "Custom-MyTableRawData",
"dataCollectionRule": "dcr-00000000000000000000000000000000"
}
},
"type": "AzureMonitorWorkspaceLogs",
"name": "gigla1"
}}
ExtendedLocationName : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/kubetest/prov
iders/Microsoft.ExtendedLocation/customLocations/myloc
ExtendedLocationType : CustomLocation
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/kubetest/prov
iders/Microsoft.Monitor/pipelineGroups/testgroup
Location : centraluseuap
Name : testgroup
NetworkingConfiguration :
PersistencePersistentVolumeName :
Processor : {{
"batch": {
"batchSize": 10
},
"type": "Batch",
"name": "batchproc1"
}}
ProvisioningState : Succeeded
Receiver : {{
"otlp": {
"endpoint": "0.0.0.0:7778"
},
"type": "OTLP",
"name": "otlp1"
}, {
"udp": {
"endpoint": "0.0.0.0:5556"
},
"type": "UDP",
"name": "myudpreceiveralittlelong26283032"
}, {
"syslog": {
"endpoint": "0.0.0.0:4445"
},
"type": "Syslog",
"name": "mysyslog1"
}}
Replica :
ResourceGroupName : kubetest
RetryAfter :
ServicePipeline : {{
"name": "MyPipeline1",
"type": "logs",
"receivers": [ "otlp1", "myudpreceiveralittlelong26283032", "mysyslog1" ],
"processors": [ "batchproc1" ],
"exporters": [ "gigla1" ]
}}
SystemDataCreatedAt : 9/26/2024 6:50:55 AM
SystemDataCreatedBy : xxxxxxxx@microsoft.com
SystemDataCreatedByType : User
SystemDataLastModifiedAt : 9/26/2024 6:51:30 AM
SystemDataLastModifiedBy : 319f651f-7ddb-4fc6-9857-7aef9250bd05
SystemDataLastModifiedByType : Application
Tag : {
}
Type : microsoft.monitor/pipelinegroups
使用 JSON 檔案建立管線群組
範例 2:使用展開的參數建立管線群組
New-AzPipelineGroup -Name testgroup -ResourceGroupName kubetest -SubscriptionId 00000000-0000-0000-0000-000000000000 -Location centraluseuap -ExtendedLocationName "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/kubetest/providers/Microsoft.ExtendedLocation/customLocations/myloc" -ExtendedLocationType CustomLocation -NetworkingConfiguration @() -Replica 1 -Exporter @{name="gigla1"; type="AzureMonitorWorkspaceLogs"; azureMonitorWorkspaceLog=@{api=@{dataCollectionEndpointUrl="https://myexporter.eastus-1.ingest.monitor.azure.com"; dataCollectionRule="dcr-00000000000000000000000000000000"; stream="Custom-MyTableRawData"; schema=@{recordMap=@(@{from="body"; to="Body"},@{from="severity_text"; to="SeverityText"},@{from="time_unix_nano"; to="TimeGenerated"})}}}} -Processor @{name="batchproc1"; type="Batch"; batch=@{batchSize=10}} -Receiver @(@{name="otlp1"; type="OTLP"; otlp=@{endpoint="0.0.0.0:7777"}}, @{name="myudpreceiveralittlelong26283032"; type="UDP"; udp=@{endpoint="0.0.0.0:5555"}}, @{name="mysyslog1"; type="Syslog"; syslog=@{endpoint="0.0.0.0:4444"}}) -ServicePipeline @{name="MyPipeline1"; type="logs"; receiver=@("otlp1", "myudpreceiveralittlelong26283032", "mysyslog1"); processor=@("batchproc1"); exporter=@("gigla1")}
Exporter : {{
"azureMonitorWorkspaceLogs": {
"api": {
"schema": {
"recordMap": [
{
"from": "body",
"to": "Body"
},
{
"from": "severity_text",
"to": "SeverityText"
},
{
"from": "time_unix_nano",
"to": "TimeGenerated"
}
]
},
"dataCollectionEndpointUrl":
"https://myexporter.eastus-1.ingest.monitor.azure.com",
"stream": "Custom-MyTableRawData",
"dataCollectionRule": "dcr-00000000000000000000000000000000"
}
},
"type": "AzureMonitorWorkspaceLogs",
"name": "gigla1"
}}
ExtendedLocationName : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/kubetest/prov
iders/Microsoft.ExtendedLocation/customLocations/myloc
ExtendedLocationType : CustomLocation
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/kubetest/prov
iders/Microsoft.Monitor/pipelineGroups/testgroup
Location : centraluseuap
Name : testgroup
NetworkingConfiguration : {}
PersistencePersistentVolumeName :
Processor : {{
"batch": {
"batchSize": 10
},
"type": "Batch",
"name": "batchproc1"
}}
ProvisioningState : Succeeded
Receiver : {{
"otlp": {
"endpoint": "0.0.0.0:7777"
},
"type": "OTLP",
"name": "otlp1"
}, {
"udp": {
"endpoint": "0.0.0.0:5555"
},
"type": "UDP",
"name": "myudpreceiveralittlelong26283032"
}, {
"syslog": {
"endpoint": "0.0.0.0:4444"
},
"type": "Syslog",
"name": "mysyslog1"
}}
Replica : 1
ResourceGroupName : kubetest
RetryAfter :
ServicePipeline : {{
"name": "MyPipeline1",
"type": "logs",
"receivers": [ "otlp1", "myudpreceiveralittlelong26283032", "mysyslog1" ],
"processors": [ "batchproc1" ],
"exporters": [ "gigla1" ]
}}
SystemDataCreatedAt : 9/26/2024 8:18:42 AM
SystemDataCreatedBy : xxxxxxxx@microsoft.com
SystemDataCreatedByType : User
SystemDataLastModifiedAt : 9/26/2024 8:19:11 AM
SystemDataLastModifiedBy : 319f651f-7ddb-4fc6-9857-7aef9250bd05
SystemDataLastModifiedByType : Application
Tag : {
}
Type : microsoft.monitor/pipelinegroups
使用展開的參數建立管線群組
參數
-AsJob
以作業身分執行命令
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Confirm
在執行 Cmdlet 之前,提示您進行確認。
類型: | SwitchParameter |
別名: | cf |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-DefaultProfile
DefaultProfile 參數無法運作。 如果針對不同的訂用帳戶執行 Cmdlet,請使用 SubscriptionId 參數。
類型: | PSObject |
別名: | AzureRMContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Exporter
為管線群組實例指定的導出工具。
類型: | IExporter[] |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ExtendedLocationName
擴充位置的名稱。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ExtendedLocationType
擴充位置的類型。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-JsonFilePath
提供給建立作業的 Json 檔案路徑
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-JsonString
提供給建立作業的 Json 字串
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-Location
資源所在的地理位置
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-Name
管線群組的名稱。 名稱不區分大小寫。
類型: | String |
別名: | PipelineGroupName |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-NetworkingConfiguration
管線群組實例的網路設定。
類型: | INetworkingConfiguration[] |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-NoWait
以異步方式執行命令
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-PersistencePersistentVolumeName
掛接的永續性磁碟區名稱。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Processor
為管線群組實例指定的處理器。
類型: | IProcessor[] |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Receiver
為管線群組實例指定的接收者。
類型: | IReceiver[] |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Replica
定義管線群組實例的複本數量。
類型: | Int32 |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ResourceGroupName
資源群組的名稱。 名稱不區分大小寫。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-ServicePipeline
屬於指定管線群組的管線。
類型: | IPipeline[] |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-SubscriptionId
目標訂用帳戶的標識碼。 此值必須是 UUID。
類型: | String |
Position: | Named |
預設值: | (Get-AzContext).Subscription.Id |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Tag
資源標籤。
類型: | Hashtable |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-WhatIf
顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。
類型: | SwitchParameter |
別名: | wi |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |