你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
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>]
说明
创建管道组实例。
示例
示例 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
目标订阅的 ID。 该值必须是 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 |