Azure DevTest Labs VirtualNetworks API
The VirtualNetworks API from Azure DevTest Labs — 2 operation(s) for virtualnetworks.
The VirtualNetworks API from Azure DevTest Labs — 2 operation(s) for virtualnetworks.
swagger: '2.0'
info:
description: The DevTest Labs Client.
title: DevTestLabsClient ArmTemplates VirtualNetworks API
version: '2018-09-15'
x-apisguru-categories:
- cloud
x-logo:
url: https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png
x-origin:
- format: swagger
url: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/DTL.json
version: '2.0'
x-preferred: true
x-providerName: azure.com
x-serviceName: devtestlabs-DTL
x-tags:
- Azure
- Microsoft
host: management.azure.com
schemes:
- https
consumes:
- application/json
produces:
- application/json
security:
- azure_auth:
- user_impersonation
tags:
- name: VirtualNetworks
paths:
? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks
: get:
description: List virtual networks in a given lab.
operationId: VirtualNetworks_List
parameters:
- $ref: '#/parameters/subscriptionId'
- $ref: '#/parameters/resourceGroupName'
- description: The name of the lab.
in: path
name: labName
required: true
type: string
example: example-value
- description: 'Specify the $expand query. Example: ''properties($expand=externalSubnets)'''
in: query
name: $expand
type: string
example: example-value
- description: 'The filter to apply to the operation. Example: ''$filter=contains(name,''myName'')'
in: query
name: $filter
type: string
example: example-value
- description: 'The maximum number of resources to return from the operation. Example: ''$top=10'''
format: int32
in: query
name: $top
type: integer
example: example-value
- description: 'The ordering expression for the results, using OData notation. Example: ''$orderby=name desc'''
in: query
name: $orderby
type: string
example: example-value
- $ref: '#/parameters/api-version'
responses:
'200':
description: OK
schema:
$ref: '#/definitions/VirtualNetworkList'
default:
description: BadRequest
schema:
$ref: '#/definitions/CloudError'
tags:
- VirtualNetworks
x-ms-examples:
VirtualNetworks_List:
parameters:
api-version: '2018-09-15'
labName: '{devtestlab-name}'
resourceGroupName: myResourceGroup
subscriptionId: '{subscription-id}'
responses:
'200':
body:
value:
- id: /subscriptions/{subscription-id}/resourcegroups/myResourceGroup/providers/microsoft.devtestlab/labs/{devtestlab-name}/virtualnetworks/{virtualnetwork-name}
name: '{virtualnetwork-name}'
properties:
allowedSubnets:
- allowPublicIp: Allow
labSubnetName: '{virtualnetwork-name}Subnet'
resourceId: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{virtualnetwork-name}/subnets/{virtualnetwork-name}Subnet
createdDate: '2018-10-01T13:01:44.6005134-07:00'
externalProviderResourceId: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{virtualnetwork-name}
provisioningState: Succeeded
subnetOverrides:
- labSubnetName: '{virtualnetwork-name}Subnet'
resourceId: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{virtualnetwork-name}/subnets/{virtualnetwork-name}Subnet
sharedPublicIpAddressConfiguration:
allowedPorts:
- backendPort: 3389
transportProtocol: Tcp
- backendPort: 22
transportProtocol: Tcp
useInVmCreationPermission: Allow
usePublicIpAddressPermission: Allow
uniqueIdentifier: '{unique-identifier}'
tags:
MyTag: MyValue
type: Microsoft.DevTestLab/labs/virtualNetworks
x-ms-odata: '#/definitions/VirtualNetwork'
x-ms-pageable:
nextLinkName: nextLink
summary: Azure DevTest Labs Virtual Networks_ List
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks/{name}
: delete:
description: Delete virtual network. This operation can take a while to complete.
operationId: VirtualNetworks_Delete
parameters:
- $ref: '#/parameters/subscriptionId'
- $ref: '#/parameters/resourceGroupName'
- description: The name of the lab.
in: path
name: labName
required: true
type: string
example: example-value
- description: The name of the virtual network.
in: path
name: name
required: true
type: string
example: example-value
- $ref: '#/parameters/api-version'
responses:
'200':
description: OK
'202':
description: Accepted
'204':
description: No Content
default:
description: BadRequest
schema:
$ref: '#/definitions/CloudError'
tags:
- VirtualNetworks
x-ms-examples:
VirtualNetworks_Delete:
parameters:
api-version: '2018-09-15'
labName: '{devtestlab-name}'
name: '{virtualnetwork-name}'
resourceGroupName: myResourceGroup
subscriptionId: '{subscription-id}'
responses:
'200': {}
'202': {}
'204': {}
x-ms-long-running-operation: true
summary: Azure DevTest Labs Virtual Networks_ Delete
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
get:
description: Get virtual network.
operationId: VirtualNetworks_Get
parameters:
- $ref: '#/parameters/subscriptionId'
- $ref: '#/parameters/resourceGroupName'
- description: The name of the lab.
in: path
name: labName
required: true
type: string
example: example-value
- description: The name of the virtual network.
in: path
name: name
required: true
type: string
example: example-value
- description: 'Specify the $expand query. Example: ''properties($expand=externalSubnets)'''
in: query
name: $expand
type: string
example: example-value
- $ref: '#/parameters/api-version'
responses:
'200':
description: OK
schema:
$ref: '#/definitions/VirtualNetwork'
default:
description: BadRequest
schema:
$ref: '#/definitions/CloudError'
tags:
- VirtualNetworks
x-ms-examples:
VirtualNetworks_Get:
parameters:
api-version: '2018-09-15'
labName: '{devtestlab-name}'
name: '{virtualnetwork-name}'
resourceGroupName: myResourceGroup
subscriptionId: '{subscription-id}'
responses:
'200':
body:
id: /subscriptions/{subscription-id}/resourcegroups/myResourceGroup/providers/microsoft.devtestlab/labs/{devtestlab-name}/virtualnetworks/{virtualnetwork-name}
name: '{virtualnetwork-name}'
properties:
allowedSubnets:
- allowPublicIp: Allow
labSubnetName: '{virtualnetwork-name}Subnet'
resourceId: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{virtualnetwork-name}/subnets/{virtualnetwork-name}Subnet
createdDate: '2018-10-01T13:01:44.6005134-07:00'
externalProviderResourceId: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{virtualnetwork-name}
provisioningState: Succeeded
subnetOverrides:
- labSubnetName: '{virtualnetwork-name}Subnet'
resourceId: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{virtualnetwork-name}/subnets/{virtualnetwork-name}Subnet
sharedPublicIpAddressConfiguration:
allowedPorts:
- backendPort: 3389
transportProtocol: Tcp
- backendPort: 22
transportProtocol: Tcp
useInVmCreationPermission: Allow
usePublicIpAddressPermission: Allow
uniqueIdentifier: '{unique-identifier}'
tags:
MyTag: MyValue
type: Microsoft.DevTestLab/labs/virtualNetworks
summary: Azure DevTest Labs Virtual Networks_ Get
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
patch:
description: Allows modifying tags of virtual networks. All other properties will be ignored.
operationId: VirtualNetworks_Update
parameters:
- $ref: '#/parameters/subscriptionId'
- $ref: '#/parameters/resourceGroupName'
- description: The name of the lab.
in: path
name: labName
required: true
type: string
example: example-value
- description: The name of the virtual network.
in: path
name: name
required: true
type: string
example: example-value
- description: A virtual network.
in: body
name: virtualNetwork
required: true
schema:
$ref: '#/definitions/VirtualNetworkFragment'
example: example-value
- $ref: '#/parameters/api-version'
responses:
'200':
description: OK
schema:
$ref: '#/definitions/VirtualNetwork'
default:
description: BadRequest
schema:
$ref: '#/definitions/CloudError'
tags:
- VirtualNetworks
x-ms-examples:
VirtualNetworks_Update:
parameters:
api-version: '2018-09-15'
labName: '{devtestlab-name}'
name: '{virtualnetwork-name}'
resourceGroupName: myResourceGroup
subscriptionId: '{subscription-id}'
virtualNetwork:
properties:
subnetOverrides:
- resourceId: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{virtualnetwork-name}/subnets/{virtualnetwork-name}Subnet
sharedPublicIpAddressConfiguration:
allowedPorts:
- backendPort: 3389
transportProtocol: Tcp
- backendPort: 22
transportProtocol: Tcp
useInVmCreationPermission: Allow
usePublicIpAddressPermission: Deny
responses:
'200':
body:
id: /subscriptions/{subscription-id}/resourcegroups/myResourceGroup/providers/microsoft.devtestlab/labs/{devtestlab-name}/virtualnetworks/{virtualnetwork-name}
name: '{virtualnetwork-name}'
properties:
createdDate: '2018-10-01T13:01:44.6005134-07:00'
externalProviderResourceId: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{virtualnetwork-name}
provisioningState: Succeeded
subnetOverrides:
- labSubnetName: '{virtualnetwork-name}Subnet'
resourceId: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{virtualnetwork-name}/subnets/{virtualnetwork-name}Subnet
sharedPublicIpAddressConfiguration:
allowedPorts:
- backendPort: 3389
transportProtocol: Tcp
- backendPort: 22
transportProtocol: Tcp
useInVmCreationPermission: Allow
usePublicIpAddressPermission: Allow
uniqueIdentifier: '{unique-identifier}'
tags:
MyTag: MyValue
type: Microsoft.DevTestLab/labs/virtualNetworks
summary: Azure DevTest Labs Virtual Networks_ Update
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
put:
description: Create or replace an existing virtual network. This operation can take a while to complete.
operationId: VirtualNetworks_CreateOrUpdate
parameters:
- $ref: '#/parameters/subscriptionId'
- $ref: '#/parameters/resourceGroupName'
- description: The name of the lab.
in: path
name: labName
required: true
type: string
example: example-value
- description: The name of the virtual network.
in: path
name: name
required: true
type: string
example: example-value
- description: A virtual network.
in: body
name: virtualNetwork
required: true
schema:
$ref: '#/definitions/VirtualNetwork'
example: example-value
- $ref: '#/parameters/api-version'
responses:
'200':
description: OK
schema:
$ref: '#/definitions/VirtualNetwork'
'201':
description: Created
schema:
$ref: '#/definitions/VirtualNetwork'
default:
description: BadRequest
schema:
$ref: '#/definitions/CloudError'
tags:
- VirtualNetworks
x-ms-examples:
VirtualNetworks_CreateOrUpdate:
parameters:
api-version: '2018-09-15'
labName: '{devtestlab-name}'
name: '{virtualnetwork-name}'
resourceGroupName: myResourceGroup
subscriptionId: '{subscription-id}'
virtualNetwork:
location: '{azure-location}'
tags:
MyTag: MyValue
responses:
'200':
body:
id: /subscriptions/{subscription-id}/resourcegroups/myResourceGroup/providers/microsoft.devtestlab/labs/{devtestlab-name}/virtualnetworks/{virtualnetwork-name}
name: '{virtualnetwork-name}'
properties:
createdDate: '2018-10-01T13:01:44.6005134-07:00'
provisioningState: Creating
uniqueIdentifier: '{unique-identifier}'
tags:
MyTag: MyValue
type: Microsoft.DevTestLab/labs/virtualNetworks
'201':
body:
id: /subscriptions/{subscription-id}/resourcegroups/myResourceGroup/providers/microsoft.devtestlab/labs/{devtestlab-name}/virtualnetworks/{virtualnetwork-name}
name: '{virtualnetwork-name}'
properties:
createdDate: '2018-10-01T13:01:44.6005134-07:00'
provisioningState: Creating
uniqueIdentifier: '{unique-identifier}'
tags:
MyTag: MyValue
type: Microsoft.DevTestLab/labs/virtualNetworks
x-ms-long-running-operation: true
summary: Azure DevTest Labs Virtual Networks_ Create or Update
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
definitions:
PortFragment:
description: Properties of a network port.
properties:
backendPort:
description: Backend port of the target virtual machine.
format: int32
type: integer
transportProtocol:
description: Protocol type of the port.
enum:
- Tcp
- Udp
type: string
x-ms-enum:
modelAsString: true
name: TransportProtocol
type: object
SubnetOverrideFragment:
description: Property overrides on a subnet of a virtual network.
properties:
labSubnetName:
description: The name given to the subnet within the lab.
type: string
resourceId:
description: The resource ID of the subnet.
type: string
sharedPublicIpAddressConfiguration:
$ref: '#/definitions/SubnetSharedPublicIpAddressConfigurationFragment'
description: Properties that virtual machines on this subnet will share.
useInVmCreationPermission:
description: Indicates whether this subnet can be used during virtual machine creation (i.e. Allow, Deny).
enum:
- Default
- Deny
- Allow
type: string
x-ms-enum:
modelAsString: true
name: UsagePermissionType
usePublicIpAddressPermission:
description: Indicates whether public IP addresses can be assigned to virtual machines on this subnet (i.e. Allow, Deny).
enum:
- Default
- Deny
- Allow
type: string
x-ms-enum:
modelAsString: true
name: UsagePermissionType
virtualNetworkPoolName:
description: The virtual network pool associated with this subnet.
type: string
type: object
CloudErrorBody:
description: Body of an error from a REST request.
properties:
code:
description: The error code.
type: string
details:
description: Inner errors.
items:
$ref: '#/definitions/CloudErrorBody'
type: array
message:
description: The error message.
type: string
target:
description: The error target.
type: string
type: object
x-ms-external: true
SubnetSharedPublicIpAddressConfiguration:
description: Configuration for public IP address sharing.
properties:
allowedPorts:
description: Backend ports that virtual machines on this subnet are allowed to expose
items:
$ref: '#/definitions/Port'
type: array
type: object
VirtualNetworkPropertiesFragment:
description: Properties of a virtual network.
properties:
allowedSubnets:
description: The allowed subnets of the virtual network.
items:
$ref: '#/definitions/SubnetFragment'
type: array
description:
description: The description of the virtual network.
type: string
externalProviderResourceId:
description: The Microsoft.Network resource identifier of the virtual network.
type: string
subnetOverrides:
description: The subnet overrides of the virtual network.
items:
$ref: '#/definitions/SubnetOverrideFragment'
type: array
type: object
VirtualNetworkProperties:
description: Properties of a virtual network.
properties:
allowedSubnets:
description: The allowed subnets of the virtual network.
items:
$ref: '#/definitions/Subnet'
type: array
createdDate:
description: The creation date of the virtual network.
format: date-time
readOnly: true
type: string
description:
description: The description of the virtual network.
type: string
externalProviderResourceId:
description: The Microsoft.Network resource identifier of the virtual network.
type: string
externalSubnets:
description: The external subnet properties.
items:
$ref: '#/definitions/ExternalSubnet'
readOnly: true
type: array
provisioningState:
description: The provisioning status of the resource.
readOnly: true
type: string
subnetOverrides:
description: The subnet overrides of the virtual network.
items:
$ref: '#/definitions/SubnetOverride'
type: array
uniqueIdentifier:
description: The unique immutable identifier of a resource (Guid).
readOnly: true
type: string
type: object
Resource:
description: An Azure resource.
properties:
id:
description: The identifier of the resource.
readOnly: true
type: string
location:
description: The location of the resource.
type: string
name:
description: The name of the resource.
readOnly: true
type: string
tags:
additionalProperties:
type: string
description: The tags of the resource.
type: object
type:
description: The type of the resource.
readOnly: true
type: string
type: object
x-ms-azure-resource: true
ExternalSubnet:
description: Subnet information as returned by the Microsoft.Network API.
properties:
id:
description: Gets or sets the identifier.
type: string
name:
description: Gets or sets the name.
type: string
type: object
VirtualNetworkList:
description: The response of a list operation.
properties:
nextLink:
description: Link for next set of results.
type: string
value:
description: Results of the list operation.
items:
$ref: '#/definitions/VirtualNetwork'
type: array
type: object
Subnet:
description: Subnet information.
properties:
allowPublicIp:
description: The permission policy of the subnet for allowing public IP addresses (i.e. Allow, Deny)).
enum:
- Default
- Deny
- Allow
type: string
x-ms-enum:
modelAsString: true
name: UsagePermissionType
labSubnetName:
description: The name of the subnet as seen in the lab.
type: string
resourceId:
description: The resource ID of the subnet.
type: string
type: object
Port:
description: Properties of a network port.
properties:
backendPort:
description: Backend port of the target virtual machine.
format: int32
type: integer
transportProtocol:
description: Protocol type of the port.
enum:
- Tcp
- Udp
type: string
x-ms-enum:
modelAsString: true
name: TransportProtocol
type: object
VirtualNetwork:
allOf:
- $ref: '#/definitions/Resource'
description: A virtual network.
properties:
properties:
$ref: '#/definitions/VirtualNetworkProperties'
description: The properties of the resource.
x-ms-client-flatten: true
type: object
SubnetFragment:
description: Subnet information.
properties:
allowPublicIp:
description: The permission policy of the subnet for allowing public IP addresses (i.e. Allow, Deny)).
enum:
- Default
- Deny
- Allow
type: string
x-ms-enum:
modelAsString: true
name: UsagePermissionType
labSubnetName:
description: The name of the subnet as seen in the lab.
type: string
resourceId:
description: The resource ID of the subnet.
type: string
type: object
SubnetSharedPublicIpAddressConfigurationFragment:
description: Configuration for public IP address sharing.
properties:
allowedPorts:
description: Backend ports that virtual machines on this subnet are allowed to expose
items:
$ref: '#/definitions/PortFragment'
type: array
type: object
SubnetOverride:
description: Property overrides on a subnet of a virtual network.
properties:
labSubnetName:
description: The name given to the subnet within the lab.
type: string
resourceId:
description: The resource ID of the subnet.
type: string
sharedPublicIpAddressConfiguration:
$ref: '#/definitions/SubnetSharedPublicIpAddressConfiguration'
description: Properties that virtual machines on this subnet will share.
useInVmCreationPermission:
description: Indicates whether this subnet can be used during virtual machine creation (i.e. Allow, Deny).
enum:
- Default
- Deny
- Allow
type: string
x-ms-enum:
modelAsString: true
name: UsagePermissionType
usePublicIpAddressPermission:
description: Indicates whether public IP addresses can be assigned to virtual machines on this subnet (i.e. Allow, Deny).
enum:
- Default
- Deny
- Allow
type: string
x-ms-enum:
modelAsString: true
name: UsagePermissionType
virtualNetworkPoolName:
description: The virtual network pool associated with this subnet.
type: string
type: object
CloudError:
description: Error from a REST request.
properties:
error:
$ref: '#/definitions/CloudErrorBody'
description: The cloud error that occurred
type: object
x-ms-external: true
VirtualNetworkFragment:
allOf:
- $ref: '#/definitions/UpdateResource'
description: A virtual network.
properties:
properties:
$ref: '#/definitions/VirtualNetworkPropertiesFragment'
description: The properties of the resource.
x-ms-client-flatten: true
type: object
UpdateResource:
description: Represents an update resource
properties:
tags:
additionalProperties:
type: string
description: The tags of the resource.
type: object
type: object
parameters:
resourceGroupName:
description: The name of the resource group.
in: path
name: resourceGroupName
required: true
type: string
x-ms-parameter-location: method
api-version:
default: '2018-09-15'
description: Client API version.
in: query
name: api-version
required: true
type: string
subscriptionId:
description: The subscription ID.
in: path
name: subscriptionId
required: true
type: string
securityDefinitions:
azure_auth:
authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
description: OAuth2 Implicit Grant
flow: implicit
scopes:
user_impersonation: Access Microsoft Azure
type: oauth2