Namespaces - Get Network Rule Set
取得命名空間的 NetworkRuleSet。
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/networkRuleSets/default?api-version=2026-01-01
URI 參數
| 名稱 | 位於 | 必要 | 類型 | Description |
|---|---|---|---|---|
|
namespace
|
path | True |
string minLength: 6maxLength: 50 |
命名空間名稱 |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
資源群組的名稱。 名稱不區分大小寫。 |
|
subscription
|
path | True |
string minLength: 1 |
目標訂用帳戶的標識碼。 |
|
api-version
|
query | True |
string minLength: 1 |
用於此作業的 API 版本。 |
回應
| 名稱 | 類型 | Description |
|---|---|---|
| 200 OK |
Azure 作業已順利完成。 |
|
| Other Status Codes |
未預期的錯誤回應。 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow。
類型:
oauth2
Flow:
implicit
授權 URL:
https://login.microsoftonline.com/common/oauth2/authorize
範圍
| 名稱 | Description |
|---|---|
| user_impersonation | 冒用您的使用者帳戶 |
範例
NameSpaceNetworkRuleSetGet
範例要求
GET https://management.azure.com/subscriptions/Subscription/resourceGroups/ResourceGroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-6019/networkRuleSets/default?api-version=2026-01-01
範例回覆
{
"name": "default",
"type": "Microsoft.Relay/Namespaces/NetworkRuleSet",
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroupid/providers/Microsoft.Relay/namespaces/example-RelayNamespace-9659/networkruleset/default",
"properties": {
"defaultAction": "Deny",
"ipRules": [
{
"action": "Allow",
"ipMask": "1.1.1.1"
},
{
"action": "Allow",
"ipMask": "1.1.1.2"
},
{
"action": "Allow",
"ipMask": "1.1.1.3"
},
{
"action": "Allow",
"ipMask": "1.1.1.4"
},
{
"action": "Allow",
"ipMask": "1.1.1.5"
}
],
"trustedServiceAccessEnabled": false
}
}
定義
| 名稱 | Description |
|---|---|
|
created |
建立此資源的身分識別類型。 |
|
Default |
網路規則集的預設動作 |
|
Error |
資源管理錯誤其他資訊。 |
|
Error |
錯誤詳細資料。 |
|
Error |
錯誤回應 |
|
Network |
IP 篩選動作 |
|
Network |
主題資源的描述。 |
|
NWRule |
List 命名空間作業的回應。 |
|
Public |
這會判斷是否允許透過公用網路傳輸流量。 默認會啟用。 |
|
system |
與建立和上次修改資源相關的元數據。 |
createdByType
建立此資源的身分識別類型。
| 值 | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
DefaultAction
網路規則集的預設動作
| 值 | Description |
|---|---|
| Allow | |
| Deny |
ErrorAdditionalInfo
資源管理錯誤其他資訊。
| 名稱 | 類型 | Description |
|---|---|---|
| info |
object |
其他資訊。 |
| type |
string |
其他信息類型。 |
ErrorDetail
錯誤詳細資料。
| 名稱 | 類型 | Description |
|---|---|---|
| additionalInfo |
錯誤的其他資訊。 |
|
| code |
string |
錯誤碼。 |
| details |
錯誤詳情 |
|
| message |
string |
錯誤訊息。 |
| target |
string |
錯誤目標。 |
ErrorResponse
錯誤回應
| 名稱 | 類型 | Description |
|---|---|---|
| error |
error 物件。 |
NetworkRuleIPAction
IP 篩選動作
| 值 | Description |
|---|---|
| Allow |
NetworkRuleSet
主題資源的描述。
| 名稱 | 類型 | Description |
|---|---|---|
| id |
string |
資源的完整資源標識碼。 範例 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
| name |
string |
資源的名稱 |
| properties.defaultAction |
網路規則集的預設動作 |
|
| properties.ipRules |
IpRules 清單 |
|
| properties.publicNetworkAccess |
這會判斷是否允許透過公用網路傳輸流量。 默認會啟用 |
|
| properties.trustedServiceAccessEnabled |
boolean |
值,指出是否啟用信任的服務存取。 |
| systemData |
包含 createdBy 和 modifiedBy 資訊的 Azure Resource Manager 元數據。 |
|
| type |
string |
資源的類型。 例如:「Microsoft.Compute/virtualMachines」或「Microsoft.Storage/storageAccounts」 |
NWRuleSetIpRules
List 命名空間作業的回應。
| 名稱 | 類型 | Description |
|---|---|---|
| action |
IP 篩選動作 |
|
| ipMask |
string |
IP 遮罩 |
PublicNetworkAccess
這會判斷是否允許透過公用網路傳輸流量。 默認會啟用。
| 值 | Description |
|---|---|
| Enabled | |
| Disabled | |
| SecuredByPerimeter |
systemData
與建立和上次修改資源相關的元數據。
| 名稱 | 類型 | Description |
|---|---|---|
| createdAt |
string (date-time) |
資源建立的時間戳(UTC)。 |
| createdBy |
string |
建立此資源的身分。 |
| createdByType |
建立此資源的身分識別類型。 |
|
| lastModifiedAt |
string (date-time) |
上次修改的資源時間戳 (UTC) |
| lastModifiedBy |
string |
上次修改資源的身分識別。 |
| lastModifiedByType |
上次修改資源的身分識別類型。 |