你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
New-AzDataCollectionEndpoint
创建数据收集终结点。
语法
New-AzDataCollectionEndpoint
-Name <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
-Location <String>
[-Description <String>]
[-EnableSystemAssignedIdentity]
[-ImmutableId <String>]
[-Kind <String>]
[-NetworkAclsPublicNetworkAccess <String>]
[-Tag <Hashtable>]
[-UserAssignedIdentity <String[]>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzDataCollectionEndpoint
-Name <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
-JsonFilePath <String>
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzDataCollectionEndpoint
-Name <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
-JsonString <String>
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
说明
创建数据收集终结点。
示例
示例 1:创建终结点
New-AzDataCollectionEndpoint -Name myCollectionEndpoint -ResourceGroupName AMCS-TEST -Location eastus -NetworkAclsPublicNetworkAccess Enabled
ConfigurationAccessEndpoint : https://mycollectionendpoint-bthd.eastus-1.handler.control.monitor.azure.com
Description :
Etag : "b9029ae7-0000-0100-0000-65016d2a0000"
FailoverConfigurationActiveLocation :
FailoverConfigurationLocation :
Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/AMCS-TEST/providers/Microsoft.Insights/dataCollectionEndpoints/myCollectionEndpoint
IdentityPrincipalId :
IdentityTenantId :
IdentityType :
IdentityUserAssignedIdentity : {
}
ImmutableId : dce-014e59a439e04f44af4b97b16b7614df
Kind :
Location : eastus
LogIngestionEndpoint : https://mycollectionendpoint-bthd.eastus-1.ingest.monitor.azure.com
MetadataProvisionedBy :
MetadataProvisionedByResourceId :
MetricIngestionEndpoint : https://mycollectionendpoint-bthd.eastus-1.metrics.ingest.monitor.azure.com
Name : myCollectionEndpoint
NetworkAclsPublicNetworkAccess : Enabled
PrivateLinkScopedResource :
ProvisioningState : Succeeded
ResourceGroupName : AMCS-TEST
SystemDataCreatedAt : 9/13/2023 8:04:55 AM
SystemDataCreatedBy : v-jiaji@microsoft.com
SystemDataCreatedByType : User
SystemDataLastModifiedAt : 9/13/2023 8:04:55 AM
SystemDataLastModifiedBy : v-jiaji@microsoft.com
SystemDataLastModifiedByType : User
Tag : {
}
Type : Microsoft.Insights/dataCollectionEndpoints
此命令使用给定值创建 endpiont。
示例 2:使用 json 文件创建 enpoint
New-AzDataCollectionEndpoint -Name myCollectionEndpoint2 -ResourceGroupName AMCS-TEST -JsonFilePath .\test\jsonfile\endpointTest1.json
# Note: content of .\test\jsonfile\endpointTest1.json
#{
# "location": "eastus",
# "properties": {
# "networkAcls": {
# "publicNetworkAccess": "Enabled"
# }
# }
# }
ConfigurationAccessEndpoint : https://mycollectionendpoint2-0e77.eastus-1.handler.control.monitor.azure.com
Description :
Etag : "ba021b4b-0000-0100-0000-650170c20000"
FailoverConfigurationActiveLocation :
FailoverConfigurationLocation :
Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/AMCS-TEST/providers/Microsoft.Insights/dataCollectionEndpoints/myCollectionEndpoint2
IdentityPrincipalId :
IdentityTenantId :
IdentityType :
IdentityUserAssignedIdentity : {
}
ImmutableId : dce-ab8aec1ea24a41c0a175a5692c173b76
Kind :
Location : eastus
LogIngestionEndpoint : https://mycollectionendpoint2-0e77.eastus-1.ingest.monitor.azure.com
MetadataProvisionedBy :
MetadataProvisionedByResourceId :
MetricIngestionEndpoint : https://mycollectionendpoint2-0e77.eastus-1.metrics.ingest.monitor.azure.com
Name : myCollectionEndpoint2
NetworkAclsPublicNetworkAccess : Enabled
PrivateLinkScopedResource :
ProvisioningState : Succeeded
ResourceGroupName : AMCS-TEST
SystemDataCreatedAt : 9/13/2023 8:20:16 AM
SystemDataCreatedBy : v-jiaji@microsoft.com
SystemDataCreatedByType : User
SystemDataLastModifiedAt : 9/13/2023 8:20:16 AM
SystemDataLastModifiedBy : v-jiaji@microsoft.com
SystemDataLastModifiedByType : User
Tag : {
}
Type : Microsoft.Insights/dataCollectionEndpoints
此命令使用给定的 json 文件路径创建 enpoint。
参数
-Confirm
在运行 cmdlet 之前,提示你进行确认。
类型: | SwitchParameter |
别名: | cf |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-DefaultProfile
DefaultProfile 参数不起作用。 如果对其他订阅执行 cmdlet,请使用 SubscriptionId 参数。
类型: | PSObject |
别名: | AzureRMContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Description
数据收集终结点的说明。
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-EnableSystemAssignedIdentity
确定是否为资源启用系统分配的标识。
类型: | SwitchParameter |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-ImmutableId
此数据收集终结点资源的不可变 ID。 此属性为 READ-ONLY。
类型: | 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 |
-Kind
资源的种类。
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Location
资源所在的地理位置。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-Name
数据收集终结点的名称。 名称不区分大小写。
类型: | String |
别名: | DataCollectionEndpointName |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-NetworkAclsPublicNetworkAccess
用于设置是否允许从公共 Internet 访问终结点的网络访问的配置。
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-ResourceGroupName
资源组的名称。 名称不区分大小写。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-SubscriptionId
目标订阅的 ID。
类型: | String |
Position: | Named |
默认值: | (Get-AzContext).Subscription.Id |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Tag
资源标记。
类型: | Hashtable |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-UserAssignedIdentity
与资源关联的用户分配标识的数组。 数组中的元素将为 ARM 资源 ID,格式为:“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}”。
类型: | String[] |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-WhatIf
显示 cmdlet 运行时会发生什么情况。 cmdlet 未运行。
类型: | SwitchParameter |
别名: | wi |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |