diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/examples/NatGatewayCreateOrUpdate.json b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/examples/NatGatewayCreateOrUpdate.json new file mode 100644 index 000000000000..d4c96a7f45b2 --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/examples/NatGatewayCreateOrUpdate.json @@ -0,0 +1,90 @@ +{ + "parameters":{ + "api-version":"2019-02-01", + "subscriptionId":"subid", + "resourceGroupName":"rg1", + "natGatewayName":"test-natgateway", + "parameters":{ + "properties":{ + "publicIpAddresses":[ + { + "id":"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1" + } + ], + "publicIpPrefixes":[ + { + "id":"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1" + } + ], + "subnets":[ + { + "id":"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1" + } + ] + } + } + }, + "responses":{ + "200":{ + "body":{ + "name":"test-natGateway", + "sku":{ + "name":"Standard" + }, + "id":"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/natGateways/test-natGateway", + "location":"westus", + "properties":{ + "idleTimeoutInMinutes":5, + "provisioningState":"Succeeded", + "publicIpAddresses":[ + { + "id":"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1" + } + ], + "publicIpPrefixes":[ + { + "id":"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1" + } + ], + "subnets":[ + { + "id":"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1" + } + ] + }, + "type":"Microsoft.Network/natGateways" + } + }, + "202" : { }, + "201":{ + "body":{ + "name":"test-natGateway", + "sku":{ + "name":"Standard" + }, + "id":"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/natGateways/test-natGateway", + "location":"westus", + "properties":{ + "idleTimeoutInMinutes":5, + "provisioningState":"Succeeded", + "publicIpAddresses":[ + { + "id":"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1" + } + ], + "publicIpPrefixes":[ + { + "id":"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1" + } + ], + "subnets":[ + { + "id":"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1" + } + ] + }, + "type":"Microsoft.Network/natGateways" + } + } + } +} diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/examples/NatGatewayDelete.json b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/examples/NatGatewayDelete.json new file mode 100644 index 000000000000..4d4a578acb80 --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/examples/NatGatewayDelete.json @@ -0,0 +1,13 @@ +{ + "parameters" : { + "api-version": "2019-02-01", + "subscriptionId" : "subid", + "resourceGroupName": "rg1", + "natGatewayName": "test-natGateway" + }, + "responses" : { + "200" : { }, + "202" : { }, + "204" : { } + } + } diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/examples/NatGatewayGet.json b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/examples/NatGatewayGet.json new file mode 100644 index 000000000000..d54318e2d601 --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/examples/NatGatewayGet.json @@ -0,0 +1,41 @@ +{ + "parameters" : { + "api-version": "2019-02-01", + "subscriptionId" : "subid", + "resourceGroupName": "rg1", + "natGatewayName": "test-natGateway" + }, + "responses" : { + "200" : { + "body" : { + "name" : "test-natGateway", + "sku": { + "name": "Standard" + }, + "id" : "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/natGateways/test-natGateway", + "location" : "westus", + "properties" : { + "idleTimeoutInMinutes" : 5, + "provisioningState": "Succeeded", + "publicIpAddresses": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1" + } + ], + "publicIpPrefixes": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1" + } + ], + "subnets": [ + { + "id" : "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1" + } + ] + }, + "type" : "Microsoft.Network/natGateways" + } + } + } + } + diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/examples/NatGatewayList.json b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/examples/NatGatewayList.json new file mode 100644 index 000000000000..880e9a9fbd63 --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/examples/NatGatewayList.json @@ -0,0 +1,72 @@ +{ + "parameters" : { + "api-version": "2019-02-01", + "subscriptionId" : "subid", + "resourceGroupName" : "rg1" + }, + "responses" : { + "200" : { + "body" : { + "value" : [ + { + "name" : "test-natGateway", + "sku": { + "name": "Standard" + }, + "id" : "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/natGateway/test-natGateway", + "location" : "westus", + "properties" : { + "idleTimeoutInMinutes" : 5, + "provisioningState": "Succeeded", + "publicIpAddresses": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1" + } + ], + "publicIpPrefixes": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1" + } + ], + "subnets": [ + { + "id" : "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1" + } + ] + }, + "type" : "Microsoft.Network/natGateways" + }, + { + "name" : "test-natGateway2", + "sku": { + "name": "Standard" + }, + "id" : "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/natGateway/test-natGateway2", + "location" : "westus", + "properties" : { + "idleTimeoutInMinutes" : 5, + "provisioningState": "Succeeded", + "publicIpAddresses": [ + { + "id": "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1" + } + ], + "publicIpPrefixes": [ + { + "id": "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1" + } + ], + "subnets": [ + { + "id" : "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1" + } + ] + }, + "type" : "Microsoft.Network/natGateways" + } + ] + } + } + } + } + diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/examples/NatGatewayListAll.json b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/examples/NatGatewayListAll.json new file mode 100644 index 000000000000..11f326beac4f --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/examples/NatGatewayListAll.json @@ -0,0 +1,71 @@ +{ + "parameters" : { + "api-version": "2019-02-01", + "subscriptionId" : "subid" + }, + "responses" : { + "200" : { + "body" : { + "value" : [ + { + "name" : "test-natGateway", + "sku": { + "name": "Standard" + }, + "id" : "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/natGateways/test-natGateway", + "location" : "westus", + "properties" : { + "idleTimeoutInMinutes" : 5, + "provisioningState": "Succeeded", + "publicIpAddresses": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1" + } + ], + "publicIpPrefixes": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1" + } + ], + "subnets": [ + { + "id" : "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1" + } + ] + }, + "type" : "Microsoft.Network/natGateways" + }, + { + "name" : "test-natGateway2", + "sku": { + "name": "Standard" + }, + "id" : "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/natGatewayes/test-natGateway2", + "location" : "westus", + "properties" : { + "idleTimeoutInMinutes" : 5, + "provisioningState": "Succeeded", + "publicIpAddresses": [ + { + "id": "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1" + } + ], + "publicIpPrefixes": [ + { + "id": "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1" + } + ], + "subnets": [ + { + "id" : "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1" + } + ] + }, + "type" : "Microsoft.Network/natGateways" + } + ] + } + } + } + } + diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/examples/NatGatewayUpdateTags.json b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/examples/NatGatewayUpdateTags.json new file mode 100644 index 000000000000..9e2ec4314ea3 --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/examples/NatGatewayUpdateTags.json @@ -0,0 +1,50 @@ +{ + "parameters" : { + "api-version": "2019-02-01", + "subscriptionId" : "subid", + "resourceGroupName": "rg1", + "natGatewayName": "test-natGateway", + "parameters": { + "tags": { + "tag1": "value1", + "tag2": "value2" + } + } + }, + "responses" : { + "200" : { + "body" : { + "name" : "test-natGateway", + "sku": { + "name": "Standard" + }, + "id" : "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/natGateways/test-natGateway", + "location" : "westus", + "properties" : { + "idleTimeoutInMinutes" : 5, + "provisioningState": "Succeeded", + "publicIpAddresses": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1" + } + ], + "publicIpPrefixes": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1" + } + ], + "subnets": [ + { + "id" : "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1" + } + ] + }, + "tags": { + "tag1": "value1", + "tag2": "value2" + }, + "type" : "Microsoft.Network/natGateways" + } + } + } +} diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/natGateway.json b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/natGateway.json new file mode 100644 index 000000000000..460187282935 --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/natGateway.json @@ -0,0 +1,414 @@ +{ + "swagger": "2.0", + "info": { + "title": "NetworkManagementClient", + "description": "The Microsoft Azure Network management API provides a RESTful set of web services that interact with Microsoft Azure Networks service to manage your network resources. The API has entities that capture the relationship between an end user and the Microsoft Azure Networks service.", + "version": "2019-02-01" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}": { + "delete": { + "tags": [ + "NatGateways" + ], + "operationId": "NatGateways_Delete", + "description": "Deletes the specified nat gateway.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "natGatewayName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the nat gateway." + }, + { + "$ref": "./network.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./network.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "204": { + "description": "Request successful. Resource does not exist." + }, + "202": { + "description": "Accepted and the operation will complete asynchronously." + }, + "200": { + "description": "Delete successful." + } + }, + "x-ms-examples": { + "Delete nat gateway": { "$ref": "./examples/NatGatewayDelete.json" } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + } + }, + "get": { + "tags": [ + "NatGateways" + ], + "operationId": "NatGateways_Get", + "description": "Gets the specified nat gateway in a specified resource group.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "natGatewayName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the nat gateway." + }, + { + "$ref": "./network.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./network.json#/parameters/SubscriptionIdParameter" + }, + { + "name": "$expand", + "in": "query", + "required": false, + "type": "string", + "description": "Expands referenced resources." + } + ], + "responses": { + "200": { + "description": "Request successful. The operation returns the resulting NatGateway resource.", + "schema": { + "$ref": "#/definitions/NatGateway" + } + } + }, + "x-ms-examples": { + "Get nat gateway": { "$ref": "./examples/NatGatewayGet.json" } + } + }, + "put": { + "tags": [ + "NatGateways" + ], + "operationId": "NatGateways_CreateOrUpdate", + "description": "Creates or updates a nat gateway.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "natGatewayName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the nat gateway." + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/NatGateway" + }, + "description": "Parameters supplied to the create or update nat gateway operation." + }, + { + "$ref": "./network.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./network.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "201": { + "description": "Create successful. The operation returns the resulting NatGateway resource.", + "schema": { + "$ref": "#/definitions/NatGateway" + } + }, + "200": { + "description": "Update successful. The operation returns the resulting NatGateway resource.", + "schema": { + "$ref": "#/definitions/NatGateway" + } + }, + "202": { + "description": "Accepted and the operation will complete asynchronously.", + "schema": { + "$ref": "#/definitions/NatGateway" + } + } + }, + "x-ms-examples": { + "Create nat gateway": { "$ref": "./examples/NatGatewayCreateOrUpdate.json" } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + } + }, + "patch": { + "tags": [ + "NatGateways" + ], + "operationId": "NatGateways_UpdateTags", + "description": "Updates nat gateway tags.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "natGatewayName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the nat gateway." + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "./network.json#/definitions/TagsObject" + }, + "description": "Parameters supplied to update nat gateway tags." + }, + { + "$ref": "./network.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./network.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Update successful. The operation returns the resulting NatGateway resource.", + "schema": { + "$ref": "#/definitions/NatGateway" + } + } + }, + "x-ms-examples": { + "Update nat gateway tags": { "$ref": "./examples/NatGatewayUpdateTags.json" } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/natGateways": { + "get": { + "tags": [ + "NatGateways" + ], + "operationId": "NatGateways_ListAll", + "description": "Gets all the Nat Gateways in a subscription.", + "parameters": [ + { + "$ref": "./network.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./network.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Request successful. The operation returns a list of NatGateway resources.", + "schema": { + "$ref": "#/definitions/NatGatewayListResult" + } + } + }, + "x-ms-examples": { + "List all nat gateways": { "$ref": "./examples/NatGatewayListAll.json" } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways": { + "get": { + "tags": [ + "NatGateways" + ], + "operationId": "NatGateways_List", + "description": "Gets all nat gateways in a resource group.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "$ref": "./network.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./network.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Request successful. The operation returns a list of NatGateway resources.", + "schema": { + "$ref": "#/definitions/NatGatewayListResult" + } + } + }, + "x-ms-examples": { + "List nat gateways in resource group": { "$ref": "./examples/NatGatewayList.json" } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "NatGatewaySku": { + "properties": { + "name": { + "type": "string", + "description": "Name of Nat Gateway SKU.", + "enum": [ + "Standard" + ], + "x-ms-enum": { + "name": "NatGatewaySkuName", + "modelAsString": true + } + } + }, + "description": "SKU of nat gateway" + }, + "NatGatewayPropertiesFormat": { + "properties": { + "idleTimeoutInMinutes": { + "type": "integer", + "format": "int32", + "description": "The idle timeout of the nat gateway." + }, + "publicIpAddresses": { + "type": "array", + "items": { + "$ref": "./network.json#/definitions/SubResource" + }, + "description": "An array of public ip addresses associated with the nat gateway resource." + }, + "publicIpPrefixes": { + "type": "array", + "items": { + "$ref": "./network.json#/definitions/SubResource" + }, + "description": "An array of public ip prefixes associated with the nat gateway resource." + }, + "subnets": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "./network.json#/definitions/SubResource" + }, + "description": "An array of references to the subnets using this nat gateway resource." + }, + "resourceGuid": { + "type": "string", + "description": "The resource GUID property of the nat gateway resource." + }, + "provisioningState": { + "type": "string", + "description": "The provisioning state of the NatGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'." + } + }, + "description": "Nat Gateway properties." + }, + "NatGateway": { + "properties": { + "sku": { + "$ref": "#/definitions/NatGatewaySku", + "description": "The nat gateway SKU." + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/NatGatewayPropertiesFormat", + "description": "Nat Gateway properties." + }, + "etag": { + "type": "string", + "description": "A unique read-only string that changes whenever the resource is updated." + } + }, + "allOf": [ + { + "$ref": "./network.json#/definitions/Resource" + } + ], + "description": "Nat Gateway resource." + }, + "NatGatewayListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/NatGateway" + }, + "description": "A list of Nat Gateways that exists in a resource group." + }, + "nextLink": { + "type": "string", + "description": "The URL to get the next set of results." + } + }, + "description": "Response for ListNatGateways API service call." + } + } +} \ No newline at end of file diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/virtualNetwork.json b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/virtualNetwork.json index e848c6f760eb..31b34cad37a1 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/virtualNetwork.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/virtualNetwork.json @@ -1029,6 +1029,10 @@ "$ref": "./routeTable.json#/definitions/RouteTable", "description": "The reference of the RouteTable resource." }, + "natGateway": { + "$ref":"./network.json#/definitions/SubResource", + "description": "Nat gateway associated with this subnet." + }, "serviceEndpoints": { "type": "array", "items": { diff --git a/specification/network/resource-manager/readme.md b/specification/network/resource-manager/readme.md index c2a83ca2ed22..62d2f67387b4 100644 --- a/specification/network/resource-manager/readme.md +++ b/specification/network/resource-manager/readme.md @@ -53,6 +53,7 @@ input-file: - Microsoft.Network/stable/2019-02-01/expressRoutePort.json - Microsoft.Network/stable/2019-02-01/interfaceEndpoint.json - Microsoft.Network/stable/2019-02-01/loadBalancer.json + - Microsoft.Network/stable/2019-02-01/natGateway.json - Microsoft.Network/stable/2019-02-01/network.json - Microsoft.Network/stable/2019-02-01/networkInterface.json - Microsoft.Network/stable/2019-02-01/networkProfile.json @@ -876,6 +877,9 @@ directive: - suppress: RequiredPropertiesMissingInResourceModel from: loadBalancer.json reason: name, id and type properties are inherited from the upper level + - suppress: RequiredPropertiesMissingInResourceModel + from: natGateway.json + reason: name, id and type properties are inherited from the upper level - suppress: RequiredPropertiesMissingInResourceModel from: networkInterface.json reason: name, id and type properties are inherited from the upper level