New-AzDataCollectionRule
语法
CreateExpanded (默认值)
New-AzDataCollectionRule
-Name <String>
-ResourceGroupName <String>
-Location <String>
[-SubscriptionId <String>]
[-DataCollectionEndpointId <String>]
[-DataFlow <IDataFlow[]>]
[-DataSourceDataImportEventHubConsumerGroup <String>]
[-DataSourceDataImportEventHubName <String>]
[-DataSourceDataImportEventHubStream <String>]
[-DataSourceExtension <IExtensionDataSource[]>]
[-DataSourceIisLog <IIisLogsDataSource[]>]
[-DataSourceLogFile <ILogFilesDataSource[]>]
[-DataSourcePerformanceCounter <IPerfCounterDataSource[]>]
[-DataSourcePlatformTelemetry <IPlatformTelemetryDataSource[]>]
[-DataSourcePrometheusForwarder <IPrometheusForwarderDataSource[]>]
[-DataSourceSyslog <ISyslogDataSource[]>]
[-DataSourceWindowsEventLog <IWindowsEventLogDataSource[]>]
[-DataSourceWindowsFirewallLog <IWindowsFirewallLogsDataSource[]>]
[-Description <String>]
[-DestinationAzureMonitorMetricName <String>]
[-DestinationEventHub <IEventHubDestination[]>]
[-DestinationEventHubsDirect <IEventHubDirectDestination[]>]
[-DestinationLogAnalytic <ILogAnalyticsDestination[]>]
[-DestinationMonitoringAccount <IMonitoringAccountDestination[]>]
[-DestinationStorageAccount <IStorageBlobDestination[]>]
[-DestinationStorageBlobsDirect <IStorageBlobDestination[]>]
[-DestinationStorageTablesDirect <IStorageTableDestination[]>]
[-EnableSystemAssignedIdentity]
[-Kind <String>]
[-StreamDeclaration <Hashtable>]
[-Tag <Hashtable>]
[-UserAssignedIdentity <String[]>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
CreateViaJsonFilePath
New-AzDataCollectionRule
-Name <String>
-ResourceGroupName <String>
-JsonFilePath <String>
[-SubscriptionId <String>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
CreateViaJsonString
New-AzDataCollectionRule
-Name <String>
-ResourceGroupName <String>
-JsonString <String>
[-SubscriptionId <String>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
说明
示例
示例 1:使用 json 文件创建数据收集规则
New-AzDataCollectionRule -Name myCollectionRule1 -ResourceGroupName AMCS-TEST -JsonFilePath .\test\jsonfile\ruleTest1.json
# Note: content of .\test\jsonfile\ruleTest1.json
# {
# "location": "eastus",
# "properties": {
# "dataSources": {
# "performanceCounters": [
# {
# "streams": [
# "Microsoft-InsightsMetrics"
# ],
# "samplingFrequencyInSeconds": 60,
# "counterSpecifiers": [
# "\\Processor(_Total)\\% Processor Time"
# ],
# "name": "perfCounter01"
# },
# {
# "name": "cloudTeamCoreCounters",
# "streams": [
# "Microsoft-Perf"
# ],
# "samplingFrequencyInSeconds": 15,
# "counterSpecifiers": [
# "\\Processor(_Total)\\% Processor Time",
# "\\Memory\\Committed Bytes",
# "\\LogicalDisk(_Total)\\Free Megabytes",
# "\\PhysicalDisk(_Total)\\Avg. Disk Queue Length"
# ]
# }
# ]
# },
# "destinations": {
# "azureMonitorMetrics": {
# "name": "azureMonitorMetrics-default"
# }
# },
# "dataFlows": [
# {
# "streams": [
# "Microsoft-InsightsMetrics"
# ],
# "destinations": [
# "azureMonitorMetrics-default"
# ]
# }
# ]
# }
# }
DataCollectionEndpointId :
DataFlow : {{
"streams": [ "Microsoft-InsightsMetrics" ],
"destinations": [ "azureMonitorMetrics-default" ]
}}
DataSourceDataImportEventHubConsumerGroup :
DataSourceDataImportEventHubName :
DataSourceDataImportEventHubStream :
DataSourceExtension :
DataSourceIisLog :
DataSourceLogFile :
DataSourcePerformanceCounter : {{
"streams": [ "Microsoft-InsightsMetrics" ],
"samplingFrequencyInSeconds": 60,
"counterSpecifiers": [ "\\Processor(_Total)\\% Processor Time" ],
"name": "perfCounter01"
}, {
"streams": [ "Microsoft-Perf" ],
"samplingFrequencyInSeconds": 15,
"counterSpecifiers": [ "\\Processor(_Total)\\% Processor Time", "\\Memory\\Committed Bytes", "\\LogicalDisk(_Total)\\Free Megabytes",
"\\PhysicalDisk(_Total)\\Avg. Disk Queue Length" ],
"name": "cloudTeamCoreCounters"
}}
DataSourcePlatformTelemetry :
DataSourcePrometheusForwarder :
DataSourceSyslog :
DataSourceWindowsEventLog :
DataSourceWindowsFirewallLog :
Description :
DestinationAzureMonitorMetricName : azureMonitorMetrics-default
DestinationEventHub :
DestinationEventHubsDirect :
DestinationLogAnalytic :
DestinationMonitoringAccount :
DestinationStorageAccount :
DestinationStorageBlobsDirect :
DestinationStorageTablesDirect :
Etag : "bb02d25d-0000-0100-0000-65017aed0000"
Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/AMCS-TEST/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule1
IdentityPrincipalId :
IdentityTenantId :
IdentityType :
IdentityUserAssignedIdentity : {
}
ImmutableId : dcr-2eebbe7e7a974226b2ef938194ada574
Kind :
Location : eastus
MetadataProvisionedBy :
MetadataProvisionedByResourceId :
Name : myCollectionRule1
ProvisioningState : Succeeded
ResourceGroupName : AMCS-TEST
StreamDeclaration : {
}
SystemDataCreatedAt : 9/13/2023 9:03:39 AM
SystemDataCreatedBy : v-jiaji@microsoft.com
SystemDataCreatedByType : User
SystemDataLastModifiedAt : 9/13/2023 9:03:39 AM
SystemDataLastModifiedBy : v-jiaji@microsoft.com
SystemDataLastModifiedByType : User
Tag : {
}
Type : Microsoft.Insights/dataCollectionRules
此命令为当前订阅创建数据收集规则。
示例 2:使用对象创建数据收集规则
$dataflow = New-AzDataFlowObject -Stream Microsoft-InsightsMetrics -Destination azureMonitorMetrics-default
$windowsEvent = New-AzWindowsEventLogDataSourceObject -Name appTeam1AppEvents -Stream Microsoft-WindowsEvent -XPathQuery "System![System[(Level = 1 or Level = 2 or Level = 3)]]","Application!*[System[(Level = 1 or Level = 2 or Level = 3)]]"
$performanceCounter1 = New-AzPerfCounterDataSourceObject -CounterSpecifier "\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. Disk Queue Length" -Name cloudTeamCoreCounters -SamplingFrequencyInSecond 15 -Stream Microsoft-Perf
$performanceCounter2 = New-AzPerfCounterDataSourceObject -CounterSpecifier "\\Process(_Total)\\Thread Count" -Name appTeamExtraCounters -SamplingFrequencyInSecond 30 -Stream Microsoft-Perf
New-AzDataCollectionRule -Name myCollectionRule1 -ResourceGroupName AMCS-TEST -Location eastus -DataFlow $dataflow -DataSourcePerformanceCounter $performanceCounter1,$performanceCounter2 -DataSourceWindowsEventLog $windowsEvent -DestinationAzureMonitorMetricName "azureMonitorMetrics-default"
DataCollectionEndpointId :
DataFlow : {{
"streams": [ "Microsoft-InsightsMetrics" ],
"destinations": [ "azureMonitorMetrics-default" ]
}}
DataSourceDataImportEventHubConsumerGroup :
DataSourceDataImportEventHubName :
DataSourceDataImportEventHubStream :
DataSourceExtension :
DataSourceIisLog :
DataSourceLogFile :
DataSourcePerformanceCounter : {{
"streams": [ "Microsoft-Perf" ],
"samplingFrequencyInSeconds": 15,
"counterSpecifiers": [ "\\\\Processor(_Total)\\\\% Processor Time", "\\\\Memory\\\\Committed Bytes",
"\\\\LogicalDisk(_Total)\\\\Free Megabytes", "\\\\PhysicalDisk(_Total)\\\\Avg. Disk Queue Length" ],
"name": "cloudTeamCoreCounters"
}, {
"streams": [ "Microsoft-Perf" ],
"samplingFrequencyInSeconds": 30,
"counterSpecifiers": [ "\\\\Process(_Total)\\\\Thread Count" ],
"name": "appTeamExtraCounters"
}}
DataSourcePlatformTelemetry :
DataSourcePrometheusForwarder :
DataSourceSyslog :
DataSourceWindowsEventLog : {{
"streams": [ "Microsoft-WindowsEvent" ],
"xPathQueries": [ "System![System[(Level = 1 or Level = 2 or Level = 3)]]", "Application!*[System[(Level = 1 or Level = 2 or
Level = 3)]]" ],
"name": "appTeam1AppEvents"
}}
DataSourceWindowsFirewallLog :
Description :
DestinationAzureMonitorMetricName : azureMonitorMetrics-default
DestinationEventHub :
DestinationEventHubsDirect :
DestinationLogAnalytic :
DestinationMonitoringAccount :
DestinationStorageAccount :
DestinationStorageBlobsDirect :
DestinationStorageTablesDirect :
Etag : "d400a6a6-0000-0100-0000-650d5bf20000"
Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/AMCS-TEST/providers/Microsoft.Insights/dataCollectionRules/my
CollectionRule1
IdentityPrincipalId :
IdentityTenantId :
IdentityType :
IdentityUserAssignedIdentity : {
}
ImmutableId : dcr-9a6169afee634c13baa880dee8c5eb97
Kind :
Location : eastus
MetadataProvisionedBy :
MetadataProvisionedByResourceId :
Name : myCollectionRule1
ProvisioningState : Succeeded
ResourceGroupName : AMCS-TEST
StreamDeclaration : {
}
SystemDataCreatedAt : 9/22/2023 9:18:41 AM
SystemDataCreatedBy : v-jiaji@microsoft.com
SystemDataCreatedByType : User
SystemDataLastModifiedAt : 9/22/2023 9:18:41 AM
SystemDataLastModifiedBy : v-jiaji@microsoft.com
SystemDataLastModifiedByType : User
Tag : {
}
Type : Microsoft.Insights/dataCollectionRules
此命令为当前订阅创建数据收集规则。
示例 3:使用 syslog 创建数据收集规则
$dataflow2 = New-AzDataFlowObject -Stream Microsoft-Perf,Microsoft-Syslog -Destination centralWorkspace
$performanceCounter3 = New-AzPerfCounterDataSourceObject -CounterSpecifier "\\Processor(_Total)\\% Processor Time","\\Memory\\Committed Bytes","\\LogicalDisk(_Total)\\Free Megabytes","\\PhysicalDisk(_Total)\\Avg. Disk Queue Length" -Name cloudTeamCoreCounters -SamplingFrequencyInSecond 15 -Stream Microsoft-Perf
$performanceCounter4 = New-AzPerfCounterDataSourceObject -CounterSpecifier "\\Process(_Total)\\Thread Count" -Name appTeamExtraCounters -SamplingFrequencyInSecond 30 -Stream Microsoft-Perf
$windowsEvent1 = New-AzWindowsEventLogDataSourceObject -Name cloudSecurityTeamEvents -Stream Microsoft-WindowsEvent -XPathQuery "Security!*"
$windowsEvent2 = New-AzWindowsEventLogDataSourceObject -Name appTeam1AppEvents -Stream Microsoft-WindowsEvent -XPathQuery "System![System[(Level = 1 or Level = 2 or Level = 3)]]", "Application!*[System[(Level = 1 or Level = 2 or Level = 3)]]"
$logAnalytics = New-AzLogAnalyticsDestinationObject -Name centralWorkspace -WorkspaceResourceId /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/amcs-test/providers/microsoft.operationalinsights/workspaces/amcs-logtest-ws
$cronlog = New-AzSyslogDataSourceObject -FacilityName cron -LogLevel Debug,Critical,Emergency -Name cronSyslog -Stream Microsoft-Syslog
$syslog = New-AzSyslogDataSourceObject -FacilityName syslog -LogLevel Alert,Critical,Emergency -Name syslogBase -Stream Microsoft-Syslog
New-AzDataCollectionRule -Name myCollectionRule2 -ResourceGroupName AMCS-TEST -Location eastus -DataFlow $dataflow2 -DataSourcePerformanceCounter $performanceCounter3,$performanceCounter4 -DataSourceWindowsEventLog $windowsEvent1,$windowsEvent2 -DestinationLogAnalytic $logAnalytics -DataSourceSyslog $cronlog,$syslog
DataCollectionEndpointId :
DataFlow : {{
"streams": [ "Microsoft-Perf", "Microsoft-Syslog" ],
"destinations": [ "centralWorkspace" ]
}}
DataSourceDataImportEventHubConsumerGroup :
DataSourceDataImportEventHubName :
DataSourceDataImportEventHubStream :
DataSourceExtension :
DataSourceIisLog :
DataSourceLogFile :
DataSourcePerformanceCounter : {{
"streams": [ "Microsoft-Perf" ],
"samplingFrequencyInSeconds": 15,
"counterSpecifiers": [ "\\\\Processor(_Total)\\\\% Processor Time", "\\\\Memory\\\\Committed Bytes",
"\\\\LogicalDisk(_Total)\\\\Free Megabytes", "\\\\PhysicalDisk(_Total)\\\\Avg. Disk Queue Length" ],
"name": "cloudTeamCoreCounters"
}, {
"streams": [ "Microsoft-Perf" ],
"samplingFrequencyInSeconds": 30,
"counterSpecifiers": [ "\\\\Process(_Total)\\\\Thread Count" ],
"name": "appTeamExtraCounters"
}}
DataSourcePlatformTelemetry :
DataSourcePrometheusForwarder :
DataSourceSyslog : {{
"streams": [ "Microsoft-Syslog" ],
"facilityNames": [ "cron" ],
"logLevels": [ "Debug", "Critical", "Emergency" ],
"name": "cronSyslog"
}, {
"streams": [ "Microsoft-Syslog" ],
"facilityNames": [ "syslog" ],
"logLevels": [ "Alert", "Critical", "Emergency" ],
"name": "syslogBase"
}}
DataSourceWindowsEventLog : {{
"streams": [ "Microsoft-WindowsEvent" ],
"xPathQueries": [ "Security!*" ],
"name": "cloudSecurityTeamEvents"
}, {
"streams": [ "Microsoft-WindowsEvent" ],
"xPathQueries": [ "System![System[(Level = 1 or Level = 2 or Level = 3)]]", "Application!*[System[(Level = 1 or Level = 2 or
Level = 3)]]" ],
"name": "appTeam1AppEvents"
}}
DataSourceWindowsFirewallLog :
Description :
DestinationAzureMonitorMetricName :
DestinationEventHub :
DestinationEventHubsDirect :
DestinationLogAnalytic : {{
"workspaceResourceId": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/amcs-test/providers/microsoft.opera
tionalinsights/workspaces/amcs-logtest-ws",
"workspaceId": "a7393094-14a9-4674-8cec-ca9eb7213f44",
"name": "centralWorkspace"
}}
DestinationMonitoringAccount :
DestinationStorageAccount :
DestinationStorageBlobsDirect :
DestinationStorageTablesDirect :
Etag : "d50031d9-0000-0100-0000-650d6b1f0000"
Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/AMCS-TEST/providers/Microsoft.Insights/dataCollectionRules/my
CollectionRule2
IdentityPrincipalId :
IdentityTenantId :
IdentityType :
IdentityUserAssignedIdentity : {
}
ImmutableId : dcr-498912db79844083aef3aef50d8429ac
Kind :
Location : eastus
MetadataProvisionedBy :
MetadataProvisionedByResourceId :
Name : myCollectionRule2
ProvisioningState : Succeeded
ResourceGroupName : AMCS-TEST
StreamDeclaration : {
}
SystemDataCreatedAt : 9/22/2023 10:23:26 AM
SystemDataCreatedBy : v-jiaji@microsoft.com
SystemDataCreatedByType : User
SystemDataLastModifiedAt : 9/22/2023 10:23:26 AM
SystemDataLastModifiedBy : v-jiaji@microsoft.com
SystemDataLastModifiedByType : User
Tag : {
}
Type : Microsoft.Insights/dataCollectionRules
此命令为当前订阅创建数据收集规则。
参数
-Confirm
在运行 cmdlet 之前,提示你进行确认。
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-DataCollectionEndpointId
此规则可用于的数据收集终结点的资源 ID。
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
CreateExpanded
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-DataFlow
数据流的规范。
参数属性
类型: IDataFlow [ ]
默认值: None
支持通配符: False
不显示: False
参数集
CreateExpanded
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-DataSourceDataImportEventHubConsumerGroup
事件中心使用者组名称
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
CreateExpanded
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-DataSourceDataImportEventHubName
数据源的友好名称。
此名称应在数据收集规则中的所有数据源(无论类型)中是唯一的。
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
CreateExpanded
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-DataSourceDataImportEventHubStream
要从 EventHub 收集的流
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
CreateExpanded
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-DataSourceExtension
Azure VM 扩展数据源配置的列表。
参数属性
参数集
CreateExpanded
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-DataSourceIisLog
IIS 日志源配置的列表。
参数属性
参数集
CreateExpanded
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-DataSourceLogFile
日志文件源配置的列表。
参数属性
参数集
CreateExpanded
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
性能计数器数据源配置的列表。
CreateExpanded
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
平台遥测配置列表
CreateExpanded
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-DataSourcePrometheusForwarder
Prometheus 转发器数据源配置的列表。
参数属性
参数集
CreateExpanded
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-DataSourceSyslog
Syslog 数据源配置的列表。
参数属性
参数集
CreateExpanded
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-DataSourceWindowsEventLog
Windows 事件日志数据源配置的列表。
参数属性
参数集
CreateExpanded
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-DataSourceWindowsFirewallLog
Windows 防火墙日志源配置的列表。
参数属性
参数集
CreateExpanded
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-DefaultProfile
DefaultProfile 参数不起作用。
如果对其他订阅执行 cmdlet,请使用 SubscriptionId 参数。
参数属性
类型: PSObject
默认值: None
支持通配符: False
不显示: False
别名: AzureRMContext, AzureCredential
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-Description
数据收集规则的说明。
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
CreateExpanded
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-DestinationAzureMonitorMetricName
目标的友好名称。
此名称应在数据收集规则中的所有目标(无论类型是什么)中是唯一的。
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
CreateExpanded
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-DestinationEventHub
事件中心目标列表。
参数属性
参数集
CreateExpanded
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-DestinationEventHubsDirect
事件中心直接目标列表。
参数属性
参数集
CreateExpanded
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-DestinationLogAnalytic
Log Analytics 目标列表。
参数属性
参数集
CreateExpanded
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-DestinationMonitoringAccount
监视帐户目标列表。
参数属性
参数集
CreateExpanded
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-DestinationStorageAccount
存储帐户目标列表。
参数属性
参数集
CreateExpanded
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-DestinationStorageBlobsDirect
存储 Blob Direct 目标的列表。
仅用于将数据直接从代理发送到存储。
参数属性
参数集
CreateExpanded
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-DestinationStorageTablesDirect
存储表直接目标的列表。
参数属性
参数集
CreateExpanded
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-EnableSystemAssignedIdentity
确定是否为资源启用系统分配的标识。
参数属性
参数集
CreateExpanded
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-JsonFilePath
提供给“创建”操作的 Json 文件的路径
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
CreateViaJsonFilePath
Position: Named
必需: True
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-JsonString
提供给“创建”操作的 Json 字符串
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
CreateViaJsonString
Position: Named
必需: True
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-Kind
资源的种类。
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
CreateExpanded
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-Location
资源所在的地理位置。
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
CreateExpanded
Position: Named
必需: True
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-Name
数据收集规则的名称。
此名称不区分大小写。
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
别名: DataCollectionRuleName, 规则名称
参数集
(All)
Position: Named
必需: True
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-ResourceGroupName
资源组的名称。
此名称不区分大小写。
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: True
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-StreamDeclaration
此规则中使用的自定义流的声明。
参数属性
参数集
CreateExpanded
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-SubscriptionId
目标订阅的 ID。
参数属性
类型: String
默认值: (Get-AzContext).Subscription.Id
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-Tag
资源标记。
参数属性
参数集
CreateExpanded
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-UserAssignedIdentity
与资源关联的用户分配标识的数组。
数组中的元素将为 ARM 资源 ID,格式为:“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}”。
参数属性
类型: String [ ]
默认值: None
支持通配符: False
不显示: False
参数集
CreateExpanded
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-WhatIf
显示 cmdlet 运行时会发生什么情况。
命令脚本未运行。
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
CommonParameters
此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters 。
输出