Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The Create Network Security Group operation creates a new network security group within the context of the specified subscription.
Request
The Create Network Security Group request may be specified as follows. Replace <subscription-id> with the subscription ID.
Method |
Request URI |
|---|---|
POST |
https://management.core.windows.net/<subscription-id>/services/networking/networksecuritygroups |
URI Parameters
None.
Request Headers
The following table describes the request headers.
Request Header |
Description |
|---|---|
Content-Type |
Required. Specifies that the the type of the request content. The value should be set to application/xml. |
x-ms-version |
Required. Specifies the version of the operation to use for this request. The value for this header should be set to 2014-10-01 or higher. |
Request Body
The format of the request body is as follows:
<NetworkSecurityGroup xmlns="https://schemas.microsoft.com/windowsazure">
<Name>network-security-group-name</Name>
<Label>label-of-network-security-group</Label>
<Location>network-security-group-location</Location>
</NetworkSecurityGroup>
The following table describes the elements in the request body.
Element name |
Description |
|---|---|
Name |
Required. Specifies the name of the network security group. |
Label |
Optional. Specifies an identifier for the network security group. The label can be up to 1024 characters long. The label can be used for tracking purposes. |
Location |
Required. Specifies the location where the network security group is created. To see the available locations, you can use List Locations. |
Response
The response includes an HTTP status code, a response body, and a set of response headers.
Status Code
A successful operation returns status code 202 (Accepted).
Response Headers
The response for this operation includes the following headers. The response may also include additional standard HTTP headers.
Response Header |
Description |
|---|---|
x-ms-request-id |
A value that uniquely identifies a request made against the management service. |
Response Body
None.