Nsp Access Rules - Create Or Update
Creates or updates a network access rule.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/profiles/{profileName}/accessRules/{accessRuleName}?api-version=2023-07-01-preview
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
access
|
path | True |
string |
The name of the NSP access rule. |
network
|
path | True |
string |
The name of the network security perimeter. |
profile
|
path | True |
string |
The name of the NSP profile. |
resource
|
path | True |
string |
The name of the resource group. |
subscription
|
path | True |
string |
The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. |
api-version
|
query | True |
string |
Client API version. |
Request Body
Name | Type | Description |
---|---|---|
location |
string |
Resource location. |
name |
string |
The name of the access rule that is unique within a profile. This name can be used to access the resource. |
properties.addressPrefixes |
string[] |
Inbound address prefixes (IPv4/IPv6) |
properties.direction |
Direction that specifies whether the access rules is inbound/outbound. |
|
properties.emailAddresses |
string[] |
Outbound rules email address format. |
properties.fullyQualifiedDomainNames |
string[] |
Outbound rules fully qualified domain name format. |
properties.phoneNumbers |
string[] |
Outbound rules phone number format. |
properties.subscriptions |
List of subscription ids |
|
tags |
object |
Resource tags. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Updated - Existing access rule is updated. Returns the resource. |
|
201 Created |
Create - Returns the NspAccessRule resource created. |
|
Other Status Codes |
Error response describing why the operation failed. |
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
NspAccessRulePut
Sample request
PUT https://management.azure.com/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/profile1/accessRules/accessRule1?api-version=2023-07-01-preview
{
"properties": {
"direction": "Inbound",
"addressPrefixes": [
"10.11.0.0/16",
"10.10.1.0/24"
]
}
}
Sample response
{
"name": "accessRule1",
"id": "/subscriptions/subId/resourceGroup/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/profile1/accessRules/accessRule1",
"type": "Microsoft.Network/networkSecurityPerimeters/profiles/accessRules",
"properties": {
"provisioningState": "Succeeded",
"direction": "Inbound",
"addressPrefixes": [
"10.11.0.0/16",
"10.10.1.0/24"
],
"fullyQualifiedDomainNames": [],
"subscriptions": [],
"networkSecurityPerimeters": [],
"emailAddresses": [],
"phoneNumbers": []
}
}
{
"name": "accessRule1",
"id": "/subscriptions/subId/resourceGroup/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/profile1/accessRules/accessRule1",
"type": "Microsoft.Network/networkSecurityPerimeters/profiles/accessRules",
"properties": {
"provisioningState": "Succeeded",
"direction": "Inbound",
"addressPrefixes": [
"10.11.0.0/16",
"10.10.1.0/24"
],
"fullyQualifiedDomainNames": [],
"subscriptions": [],
"networkSecurityPerimeters": [],
"emailAddresses": [],
"phoneNumbers": []
}
}
Definitions
Name | Description |
---|---|
Access |
Direction that specifies whether the access rules is inbound/outbound. |
Cloud |
An error response from the service. |
Cloud |
An error response from the service. |
Nsp |
The NSP access rule resource |
nsp |
The provisioning state of the scope assignment resource. |
Perimeter |
|
Subscription |
AccessRuleDirection
Direction that specifies whether the access rules is inbound/outbound.
Name | Type | Description |
---|---|---|
Inbound |
string |
|
Outbound |
string |
CloudError
An error response from the service.
Name | Type | Description |
---|---|---|
error |
Cloud error body. |
CloudErrorBody
An error response from the service.
Name | Type | Description |
---|---|---|
code |
string |
An identifier for the error. Codes are invariant and are intended to be consumed programmatically. |
details |
A list of additional details about the error. |
|
message |
string |
A message describing the error, intended to be suitable for display in a user interface. |
target |
string |
The target of the particular error. For example, the name of the property in error. |
NspAccessRule
The NSP access rule resource
Name | Type | Description |
---|---|---|
id |
string |
NSP access rule identifier. |
location |
string |
Resource location. |
name |
string |
The name of the access rule that is unique within a profile. This name can be used to access the resource. |
properties.addressPrefixes |
string[] |
Inbound address prefixes (IPv4/IPv6) |
properties.direction |
Direction that specifies whether the access rules is inbound/outbound. |
|
properties.emailAddresses |
string[] |
Outbound rules email address format. |
properties.fullyQualifiedDomainNames |
string[] |
Outbound rules fully qualified domain name format. |
properties.networkSecurityPerimeters |
Rule specified by the perimeter id. |
|
properties.phoneNumbers |
string[] |
Outbound rules phone number format. |
properties.provisioningState |
The provisioning state of the scope assignment resource. |
|
properties.subscriptions |
List of subscription ids |
|
tags |
object |
Resource tags. |
type |
string |
Resource type. |
nspProvisioningState
The provisioning state of the scope assignment resource.
Name | Type | Description |
---|---|---|
Accepted |
string |
|
Creating |
string |
|
Deleting |
string |
|
Failed |
string |
|
Succeeded |
string |
|
Updating |
string |
PerimeterBasedAccessRule
Name | Type | Description |
---|---|---|
id |
string |
NSP id in the ARM id format. |
location |
string |
Location of the NSP supplied. |
perimeterGuid |
string |
Resource guid of the NSP supplied. |
SubscriptionId
Name | Type | Description |
---|---|---|
id |
string |
Subscription id in the ARM id format. |