你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Get-AzNetworkManagerSecurityAdminRule

获取网络管理器中的安全管理规则。

语法

Get-AzNetworkManagerSecurityAdminRule
   [-Name <String>]
   -RuleCollectionName <String>
   -SecurityAdminConfigurationName <String>
   -NetworkManagerName <String>
   -ResourceGroupName <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzNetworkManagerSecurityAdminRule
   -Name <String>
   -RuleCollectionName <String>
   -SecurityAdminConfigurationName <String>
   -NetworkManagerName <String>
   -ResourceGroupName <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

说明

Get-AzNetworkManagerSecurityAdminRule cmdlet 在网络管理器中获取安全管理规则。

示例

示例 1

Get-AzNetworkManagerSecurityAdminRule  -Name "testRule" -RuleCollectionName "TestRC" -SecurityAdminConfigurationName "TestSecConfig" -NetworkManagerName "TestNMName" -ResourceGroupName "TestRG"

Name                  : testRule
Description           : Description
Type                  : Microsoft.Network/networkManagers/securityAdminConfigurations/ruleCollections/rules
Id                    : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/TestRG/providers/Microsoft.Network/networkManagers/TestNMName/securityAdminConfigurations/TestSecConfig/ruleCollections/TestRC/rules/testRule
Etag                  : "00000000-0000-0000-0000-000000000000"
ProvisioningState     : Succeeded
Protocol              : Tcp
Direction             : Inbound
Sources               : [
                          {
                            "AddressPrefix": "Internet",
                            "AddressPrefixType": "ServiceTag"
                          }
                        ]
Destinations          : [
                          {
                            "AddressPrefix": "10.0.0.1",
                            "AddressPrefixType": "IPPrefix"
                          }
                        ]
SourcePortRanges      : [
                          "100"
                        ]
DestinationPortRanges : [
                          "99"
                        ]
Access                : Allow
Priority              : 100
SystemData            : {
                          "CreatedBy": "00000000-0000-0000-0000-000000000000",
                          "CreatedByType": "Application",
                          "CreatedAt": "2021-10-18T04:06:05",
                          "LastModifiedBy": "00000000-0000-0000-0000-000000000000",
                          "LastModifiedByType": "Application",
                          "LastModifiedAt": "2021-10-18T04:06:06"
                        }

获取规则汇总中的安全管理规则。

示例 2

Get-AzNetworkManagerSecurityAdminRule  -RuleCollectionName "TestRC" -SecurityAdminConfigurationName "TestSecConfig" -NetworkManagerName "TestNMName" -ResourceGroupName "TestRG"

Name                  : testRule
Description           : Description
Type                  : Microsoft.Network/networkManagers/securityAdminConfigurations/ruleCollections/rules
Id                    : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/TestRG/providers/Microsoft.Network/networkManagers/TestNMName/securityAdminConfigurations/TestSecConfig/ruleCollections/TestRC/rules/testRule
Etag                  : "00000000-0000-0000-0000-000000000000"
ProvisioningState     : Succeeded
Protocol              : Tcp
Direction             : Inbound
Sources               : [
                          {
                            "AddressPrefix": "Internet",
                            "AddressPrefixType": "ServiceTag"
                          }
                        ]
Destinations          : [
                          {
                            "AddressPrefix": "10.0.0.1",
                            "AddressPrefixType": "IPPrefix"
                          }
                        ]
SourcePortRanges      : [
                          "100"
                        ]
DestinationPortRanges : [
                          "99"
                        ]
Access                : Allow
Priority              : 100
SystemData            : {
                          "CreatedBy": "00000000-0000-0000-0000-000000000000",
                          "CreatedByType": "Application",
                          "CreatedAt": "2021-10-18T04:06:05",
                          "LastModifiedBy": "00000000-0000-0000-0000-000000000000",
                          "LastModifiedByType": "Application",
                          "LastModifiedAt": "2021-10-18T04:06:06"
                        }

                        Name                  : testRule2
Description           : Description
Type                  : Microsoft.Network/networkManagers/securityAdminConfigurations/ruleCollections/rules
Id                    : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/TestRG/providers/Microsoft.Network/networkManagers/TestNMName/securityAdminConfigurations/TestSecConfig/ruleCollections/TestRC/rules/testRule2
Etag                  : "00000000-0000-0000-0000-000000000000"
ProvisioningState     : Succeeded
Protocol              : Tcp
Direction             : Inbound
Sources               : [
                          {
                            "AddressPrefix": "Internet",
                            "AddressPrefixType": "ServiceTag"
                          }
                        ]
Destinations          : [
                          {
                            "AddressPrefix": "10.0.0.1",
                            "AddressPrefixType": "IPPrefix"
                          }
                        ]
SourcePortRanges      : [
                          "100"
                        ]
DestinationPortRanges : [
                          "99"
                        ]
Access                : Allow
Priority              : 100
SystemData            : {
                          "CreatedBy": "00000000-0000-0000-0000-000000000000",
                          "CreatedByType": "Application",
                          "CreatedAt": "2021-10-18T04:06:05",
                          "LastModifiedBy": "00000000-0000-0000-0000-000000000000",
                          "LastModifiedByType": "Application",
                          "LastModifiedAt": "2021-10-18T04:06:06"
                        }

获取安全管理规则集合中的所有规则。

参数

-DefaultProfile

用于与 Azure 通信的凭据、帐户、租户和订阅。

类型:IAzureContextContainer
别名:AzContext, AzureRmContext, AzureCredential
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

-Name

资源名称。

类型:String
别名:ResourceName
Position:Named
默认值:None
必需:True
接受管道输入:True
接受通配符:True

-NetworkManagerName

网络管理器名称。

类型:String
Position:Named
默认值:None
必需:True
接受管道输入:True
接受通配符:True

-ResourceGroupName

资源组名称。

类型:String
Position:Named
默认值:None
必需:True
接受管道输入:True
接受通配符:False

-RuleCollectionName

网络管理器安全管理规则集合名称。

类型:String
Position:Named
默认值:None
必需:True
接受管道输入:True
接受通配符:True

-SecurityAdminConfigurationName

网络管理器安全管理员配置名称。

类型:String
别名:ConfigName
Position:Named
默认值:None
必需:True
接受管道输入:True
接受通配符:True

输入

String

输出

PSNetworkManagerSecurityBaseAdminRule