Create Network Security Group

 

Updated: July 10, 2015

The Create Network Security Group operation creates a new network security group within the context of the specified subscription.

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

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.

The format of the request body is as follows:


<NetworkSecurityGroup xmlns="http://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.

The response includes an HTTP status code, a response body, and a set of response headers.

A successful operation returns status code 202 (Accepted).

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.

Show: