subnets
Creates, updates, deletes, gets or lists a subnets resource.
Overview
| Name | subnets |
| Type | Resource |
| Id | azure.network.subnets |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Resource ID. |
name | string | Name of the resource. |
addressPrefix | string | The address prefix for the subnet. |
addressPrefixes | array | List of address prefixes for the subnet. |
applicationGatewayIPConfigurations | array | Application gateway IP configurations of virtual network resource. |
defaultOutboundAccess | boolean | Set this property to false to disable default outbound connectivity for all VMs in the subnet. |
delegations | array | An array of references to the delegations on the subnet. |
etag | string | A unique read-only string that changes whenever the resource is updated. |
ipAllocations | array | Array of IpAllocation which reference this subnet. |
ipConfigurationProfiles | array | Array of IP configuration profiles which reference this subnet. |
ipConfigurations | array | An array of references to the network interface IP configurations using subnet. |
ipamPoolPrefixAllocations | array | A list of IPAM Pools for allocating IP address prefixes. |
natGateway | object | Reference to another subresource. |
networkSecurityGroup | object | The reference to the NetworkSecurityGroup resource. |
privateEndpointNetworkPolicies | string | Enable or Disable apply network policies on private end point in the subnet. Known values are: "Enabled", "Disabled", "NetworkSecurityGroupEnabled", and "RouteTableEnabled". (Enabled, Disabled, NetworkSecurityGroupEnabled, RouteTableEnabled) |
privateEndpoints | array | An array of references to private endpoints. |
privateLinkServiceNetworkPolicies | string | Enable or Disable apply network policies on private link service in the subnet. Known values are: "Enabled" and "Disabled". (Enabled, Disabled) |
provisioningState | string | The provisioning state of the subnet resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". (Failed, Succeeded, Canceled, Creating, Updating, Deleting) |
purpose | string | A read-only string identifying the intention of use for this subnet based on delegations and other user-defined properties. |
resourceNavigationLinks | array | An array of references to the external resources using subnet. |
routeTable | object | The reference to the RouteTable resource. |
serviceAssociationLinks | array | An array of references to services injecting into this subnet. |
serviceEndpointPolicies | array | An array of service endpoint policies. |
serviceEndpoints | array | An array of service endpoints. |
serviceGateway | object | Reference to another subresource. |
sharingScope | string | Set this property to Tenant to allow sharing subnet with other subscriptions in your AAD tenant. This property can only be set if defaultOutboundAccess is set to false, both properties can only be set if subnet is empty. Known values are: "Tenant" and "DelegatedServices". (Tenant, DelegatedServices) |
type | string | Resource type. |
| Name | Datatype | Description |
|---|---|---|
id | string | Resource ID. |
name | string | Name of the resource. |
addressPrefix | string | The address prefix for the subnet. |
addressPrefixes | array | List of address prefixes for the subnet. |
applicationGatewayIPConfigurations | array | Application gateway IP configurations of virtual network resource. |
defaultOutboundAccess | boolean | Set this property to false to disable default outbound connectivity for all VMs in the subnet. |
delegations | array | An array of references to the delegations on the subnet. |
etag | string | A unique read-only string that changes whenever the resource is updated. |
ipAllocations | array | Array of IpAllocation which reference this subnet. |
ipConfigurationProfiles | array | Array of IP configuration profiles which reference this subnet. |
ipConfigurations | array | An array of references to the network interface IP configurations using subnet. |
ipamPoolPrefixAllocations | array | A list of IPAM Pools for allocating IP address prefixes. |
natGateway | object | Reference to another subresource. |
networkSecurityGroup | object | The reference to the NetworkSecurityGroup resource. |
privateEndpointNetworkPolicies | string | Enable or Disable apply network policies on private end point in the subnet. Known values are: "Enabled", "Disabled", "NetworkSecurityGroupEnabled", and "RouteTableEnabled". (Enabled, Disabled, NetworkSecurityGroupEnabled, RouteTableEnabled) |
privateEndpoints | array | An array of references to private endpoints. |
privateLinkServiceNetworkPolicies | string | Enable or Disable apply network policies on private link service in the subnet. Known values are: "Enabled" and "Disabled". (Enabled, Disabled) |
provisioningState | string | The provisioning state of the subnet resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". (Failed, Succeeded, Canceled, Creating, Updating, Deleting) |
purpose | string | A read-only string identifying the intention of use for this subnet based on delegations and other user-defined properties. |
resourceNavigationLinks | array | An array of references to the external resources using subnet. |
routeTable | object | The reference to the RouteTable resource. |
serviceAssociationLinks | array | An array of references to services injecting into this subnet. |
serviceEndpointPolicies | array | An array of service endpoint policies. |
serviceEndpoints | array | An array of service endpoints. |
serviceGateway | object | Reference to another subresource. |
sharingScope | string | Set this property to Tenant to allow sharing subnet with other subscriptions in your AAD tenant. This property can only be set if defaultOutboundAccess is set to false, both properties can only be set if subnet is empty. Known values are: "Tenant" and "DelegatedServices". (Tenant, DelegatedServices) |
type | string | Resource type. |
Methods
The following methods are available for this resource:
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subnet_name | string | The name of the subnet. Required. |
subscription_id | string | |
virtual_network_name | string | The name of the virtual network. Required. |
$expand | string | Expands referenced resources. Default value is None. |
SELECT examples
- get
- list
Gets the specified subnet by virtual network and resource group.
SELECT
id,
name,
addressPrefix,
addressPrefixes,
applicationGatewayIPConfigurations,
defaultOutboundAccess,
delegations,
etag,
ipAllocations,
ipConfigurationProfiles,
ipConfigurations,
ipamPoolPrefixAllocations,
natGateway,
networkSecurityGroup,
privateEndpointNetworkPolicies,
privateEndpoints,
privateLinkServiceNetworkPolicies,
provisioningState,
purpose,
resourceNavigationLinks,
routeTable,
serviceAssociationLinks,
serviceEndpointPolicies,
serviceEndpoints,
serviceGateway,
sharingScope,
type
FROM azure.network.subnets
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND virtual_network_name = '{{ virtual_network_name }}' -- required
AND subnet_name = '{{ subnet_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $expand = '{{ $expand }}'
;
Gets all subnets in a virtual network.
SELECT
id,
name,
addressPrefix,
addressPrefixes,
applicationGatewayIPConfigurations,
defaultOutboundAccess,
delegations,
etag,
ipAllocations,
ipConfigurationProfiles,
ipConfigurations,
ipamPoolPrefixAllocations,
natGateway,
networkSecurityGroup,
privateEndpointNetworkPolicies,
privateEndpoints,
privateLinkServiceNetworkPolicies,
provisioningState,
purpose,
resourceNavigationLinks,
routeTable,
serviceAssociationLinks,
serviceEndpointPolicies,
serviceEndpoints,
serviceGateway,
sharingScope,
type
FROM azure.network.subnets
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND virtual_network_name = '{{ virtual_network_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
Creates or updates a subnet in the specified virtual network.
INSERT INTO azure.network.subnets (
id,
name,
properties,
resource_group_name,
virtual_network_name,
subnet_name,
subscription_id
)
SELECT
'{{ id }}',
'{{ name }}',
'{{ properties }}',
'{{ resource_group_name }}',
'{{ virtual_network_name }}',
'{{ subnet_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
properties,
type
;
# Description fields are for documentation purposes
- name: subnets
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the subnets resource.
- name: virtual_network_name
value: "{{ virtual_network_name }}"
description: Required parameter for the subnets resource.
- name: subnet_name
value: "{{ subnet_name }}"
description: Required parameter for the subnets resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the subnets resource.
- name: id
value: "{{ id }}"
description: |
Resource ID.
- name: name
value: "{{ name }}"
description: |
Name of the resource.
- name: properties
description: |
Properties of the subnet.
value:
addressPrefix: "{{ addressPrefix }}"
addressPrefixes:
- "{{ addressPrefixes }}"
networkSecurityGroup:
id: "{{ id }}"
name: "{{ name }}"
type: "{{ type }}"
location: "{{ location }}"
tags: "{{ tags }}"
properties:
flushConnection: {{ flushConnection }}
securityRules:
- id: "{{ id }}"
name: "{{ name }}"
type: "{{ type }}"
properties:
description: "{{ description }}"
protocol: "{{ protocol }}"
sourcePortRange: "{{ sourcePortRange }}"
destinationPortRange: "{{ destinationPortRange }}"
sourceAddressPrefix: "{{ sourceAddressPrefix }}"
sourceAddressPrefixes: "{{ sourceAddressPrefixes }}"
sourceApplicationSecurityGroups: "{{ sourceApplicationSecurityGroups }}"
destinationAddressPrefix: "{{ destinationAddressPrefix }}"
destinationAddressPrefixes: "{{ destinationAddressPrefixes }}"
destinationApplicationSecurityGroups: "{{ destinationApplicationSecurityGroups }}"
sourcePortRanges: "{{ sourcePortRanges }}"
destinationPortRanges: "{{ destinationPortRanges }}"
access: "{{ access }}"
priority: {{ priority }}
direction: "{{ direction }}"
provisioningState: "{{ provisioningState }}"
etag: "{{ etag }}"
defaultSecurityRules:
- id: "{{ id }}"
name: "{{ name }}"
type: "{{ type }}"
properties:
description: "{{ description }}"
protocol: "{{ protocol }}"
sourcePortRange: "{{ sourcePortRange }}"
destinationPortRange: "{{ destinationPortRange }}"
sourceAddressPrefix: "{{ sourceAddressPrefix }}"
sourceAddressPrefixes: "{{ sourceAddressPrefixes }}"
sourceApplicationSecurityGroups: "{{ sourceApplicationSecurityGroups }}"
destinationAddressPrefix: "{{ destinationAddressPrefix }}"
destinationAddressPrefixes: "{{ destinationAddressPrefixes }}"
destinationApplicationSecurityGroups: "{{ destinationApplicationSecurityGroups }}"
sourcePortRanges: "{{ sourcePortRanges }}"
destinationPortRanges: "{{ destinationPortRanges }}"
access: "{{ access }}"
priority: {{ priority }}
direction: "{{ direction }}"
provisioningState: "{{ provisioningState }}"
etag: "{{ etag }}"
networkInterfaces:
- id: "{{ id }}"
name: "{{ name }}"
type: "{{ type }}"
location: "{{ location }}"
tags: "{{ tags }}"
properties:
virtualMachine: "{{ virtualMachine }}"
networkSecurityGroup: "{{ networkSecurityGroup }}"
privateEndpoint: "{{ privateEndpoint }}"
ipConfigurations: "{{ ipConfigurations }}"
tapConfigurations: "{{ tapConfigurations }}"
dnsSettings: "{{ dnsSettings }}"
macAddress: "{{ macAddress }}"
primary: {{ primary }}
vnetEncryptionSupported: {{ vnetEncryptionSupported }}
defaultOutboundConnectivityEnabled: {{ defaultOutboundConnectivityEnabled }}
enableAcceleratedNetworking: {{ enableAcceleratedNetworking }}
disableTcpStateTracking: {{ disableTcpStateTracking }}
enableIPForwarding: {{ enableIPForwarding }}
hostedWorkloads: "{{ hostedWorkloads }}"
dscpConfiguration: "{{ dscpConfiguration }}"
resourceGuid: "{{ resourceGuid }}"
provisioningState: "{{ provisioningState }}"
workloadType: "{{ workloadType }}"
nicType: "{{ nicType }}"
privateLinkService: "{{ privateLinkService }}"
migrationPhase: "{{ migrationPhase }}"
auxiliaryMode: "{{ auxiliaryMode }}"
auxiliarySku: "{{ auxiliarySku }}"
extendedLocation:
name: "{{ name }}"
type: "{{ type }}"
etag: "{{ etag }}"
subnets:
- id: "{{ id }}"
name: "{{ name }}"
type: "{{ type }}"
properties:
addressPrefix: "{{ addressPrefix }}"
addressPrefixes: "{{ addressPrefixes }}"
networkSecurityGroup: "{{ networkSecurityGroup }}"
routeTable: "{{ routeTable }}"
natGateway: "{{ natGateway }}"
serviceEndpoints: "{{ serviceEndpoints }}"
serviceEndpointPolicies: "{{ serviceEndpointPolicies }}"
privateEndpoints: "{{ privateEndpoints }}"
ipConfigurations: "{{ ipConfigurations }}"
ipConfigurationProfiles: "{{ ipConfigurationProfiles }}"
ipAllocations: "{{ ipAllocations }}"
resourceNavigationLinks: "{{ resourceNavigationLinks }}"
serviceAssociationLinks: "{{ serviceAssociationLinks }}"
delegations: "{{ delegations }}"
purpose: "{{ purpose }}"
provisioningState: "{{ provisioningState }}"
privateEndpointNetworkPolicies: "{{ privateEndpointNetworkPolicies }}"
privateLinkServiceNetworkPolicies: "{{ privateLinkServiceNetworkPolicies }}"
applicationGatewayIPConfigurations: "{{ applicationGatewayIPConfigurations }}"
sharingScope: "{{ sharingScope }}"
defaultOutboundAccess: {{ defaultOutboundAccess }}
ipamPoolPrefixAllocations: "{{ ipamPoolPrefixAllocations }}"
serviceGateway: "{{ serviceGateway }}"
etag: "{{ etag }}"
flowLogs:
- id: "{{ id }}"
name: "{{ name }}"
type: "{{ type }}"
location: "{{ location }}"
tags: "{{ tags }}"
properties:
targetResourceId: "{{ targetResourceId }}"
targetResourceGuid: "{{ targetResourceGuid }}"
storageId: "{{ storageId }}"
enabledFilteringCriteria: "{{ enabledFilteringCriteria }}"
recordTypes: "{{ recordTypes }}"
enabled: {{ enabled }}
retentionPolicy: "{{ retentionPolicy }}"
format: "{{ format }}"
flowAnalyticsConfiguration: "{{ flowAnalyticsConfiguration }}"
provisioningState: "{{ provisioningState }}"
etag: "{{ etag }}"
identity:
principalId: "{{ principalId }}"
tenantId: "{{ tenantId }}"
type: "{{ type }}"
userAssignedIdentities: "{{ userAssignedIdentities }}"
resourceGuid: "{{ resourceGuid }}"
provisioningState: "{{ provisioningState }}"
etag: "{{ etag }}"
routeTable:
id: "{{ id }}"
name: "{{ name }}"
type: "{{ type }}"
location: "{{ location }}"
tags: "{{ tags }}"
properties:
routes:
- id: "{{ id }}"
name: "{{ name }}"
type: "{{ type }}"
properties:
addressPrefix: "{{ addressPrefix }}"
nextHopType: "{{ nextHopType }}"
nextHopIpAddress: "{{ nextHopIpAddress }}"
nextHop: "{{ nextHop }}"
provisioningState: "{{ provisioningState }}"
hasBgpOverride: {{ hasBgpOverride }}
etag: "{{ etag }}"
subnets:
- id: "{{ id }}"
name: "{{ name }}"
type: "{{ type }}"
properties:
addressPrefix: "{{ addressPrefix }}"
addressPrefixes: "{{ addressPrefixes }}"
networkSecurityGroup: "{{ networkSecurityGroup }}"
routeTable: "{{ routeTable }}"
natGateway: "{{ natGateway }}"
serviceEndpoints: "{{ serviceEndpoints }}"
serviceEndpointPolicies: "{{ serviceEndpointPolicies }}"
privateEndpoints: "{{ privateEndpoints }}"
ipConfigurations: "{{ ipConfigurations }}"
ipConfigurationProfiles: "{{ ipConfigurationProfiles }}"
ipAllocations: "{{ ipAllocations }}"
resourceNavigationLinks: "{{ resourceNavigationLinks }}"
serviceAssociationLinks: "{{ serviceAssociationLinks }}"
delegations: "{{ delegations }}"
purpose: "{{ purpose }}"
provisioningState: "{{ provisioningState }}"
privateEndpointNetworkPolicies: "{{ privateEndpointNetworkPolicies }}"
privateLinkServiceNetworkPolicies: "{{ privateLinkServiceNetworkPolicies }}"
applicationGatewayIPConfigurations: "{{ applicationGatewayIPConfigurations }}"
sharingScope: "{{ sharingScope }}"
defaultOutboundAccess: {{ defaultOutboundAccess }}
ipamPoolPrefixAllocations: "{{ ipamPoolPrefixAllocations }}"
serviceGateway: "{{ serviceGateway }}"
etag: "{{ etag }}"
disableBgpRoutePropagation: {{ disableBgpRoutePropagation }}
disablePeeringRoute: "{{ disablePeeringRoute }}"
provisioningState: "{{ provisioningState }}"
resourceGuid: "{{ resourceGuid }}"
etag: "{{ etag }}"
natGateway:
id: "{{ id }}"
serviceEndpoints:
- service: "{{ service }}"
networkIdentifier:
id: "{{ id }}"
locations: "{{ locations }}"
provisioningState: "{{ provisioningState }}"
serviceEndpointPolicies:
- id: "{{ id }}"
name: "{{ name }}"
type: "{{ type }}"
location: "{{ location }}"
tags: "{{ tags }}"
properties:
serviceEndpointPolicyDefinitions:
- id: "{{ id }}"
name: "{{ name }}"
type: "{{ type }}"
properties:
description: "{{ description }}"
service: "{{ service }}"
serviceResources: "{{ serviceResources }}"
provisioningState: "{{ provisioningState }}"
etag: "{{ etag }}"
subnets:
- id: "{{ id }}"
name: "{{ name }}"
type: "{{ type }}"
properties:
addressPrefix: "{{ addressPrefix }}"
addressPrefixes: "{{ addressPrefixes }}"
networkSecurityGroup: "{{ networkSecurityGroup }}"
routeTable: "{{ routeTable }}"
natGateway: "{{ natGateway }}"
serviceEndpoints: "{{ serviceEndpoints }}"
serviceEndpointPolicies: "{{ serviceEndpointPolicies }}"
privateEndpoints: "{{ privateEndpoints }}"
ipConfigurations: "{{ ipConfigurations }}"
ipConfigurationProfiles: "{{ ipConfigurationProfiles }}"
ipAllocations: "{{ ipAllocations }}"
resourceNavigationLinks: "{{ resourceNavigationLinks }}"
serviceAssociationLinks: "{{ serviceAssociationLinks }}"
delegations: "{{ delegations }}"
purpose: "{{ purpose }}"
provisioningState: "{{ provisioningState }}"
privateEndpointNetworkPolicies: "{{ privateEndpointNetworkPolicies }}"
privateLinkServiceNetworkPolicies: "{{ privateLinkServiceNetworkPolicies }}"
applicationGatewayIPConfigurations: "{{ applicationGatewayIPConfigurations }}"
sharingScope: "{{ sharingScope }}"
defaultOutboundAccess: {{ defaultOutboundAccess }}
ipamPoolPrefixAllocations: "{{ ipamPoolPrefixAllocations }}"
serviceGateway: "{{ serviceGateway }}"
etag: "{{ etag }}"
resourceGuid: "{{ resourceGuid }}"
provisioningState: "{{ provisioningState }}"
serviceAlias: "{{ serviceAlias }}"
contextualServiceEndpointPolicies:
- "{{ contextualServiceEndpointPolicies }}"
etag: "{{ etag }}"
kind: "{{ kind }}"
privateEndpoints:
- id: "{{ id }}"
name: "{{ name }}"
type: "{{ type }}"
location: "{{ location }}"
tags: "{{ tags }}"
properties:
subnet:
id: "{{ id }}"
name: "{{ name }}"
type: "{{ type }}"
properties:
addressPrefix: "{{ addressPrefix }}"
addressPrefixes: "{{ addressPrefixes }}"
networkSecurityGroup: "{{ networkSecurityGroup }}"
routeTable: "{{ routeTable }}"
natGateway: "{{ natGateway }}"
serviceEndpoints: "{{ serviceEndpoints }}"
serviceEndpointPolicies: "{{ serviceEndpointPolicies }}"
privateEndpoints: "{{ privateEndpoints }}"
ipConfigurations: "{{ ipConfigurations }}"
ipConfigurationProfiles: "{{ ipConfigurationProfiles }}"
ipAllocations: "{{ ipAllocations }}"
resourceNavigationLinks: "{{ resourceNavigationLinks }}"
serviceAssociationLinks: "{{ serviceAssociationLinks }}"
delegations: "{{ delegations }}"
purpose: "{{ purpose }}"
provisioningState: "{{ provisioningState }}"
privateEndpointNetworkPolicies: "{{ privateEndpointNetworkPolicies }}"
privateLinkServiceNetworkPolicies: "{{ privateLinkServiceNetworkPolicies }}"
applicationGatewayIPConfigurations: "{{ applicationGatewayIPConfigurations }}"
sharingScope: "{{ sharingScope }}"
defaultOutboundAccess: {{ defaultOutboundAccess }}
ipamPoolPrefixAllocations: "{{ ipamPoolPrefixAllocations }}"
serviceGateway: "{{ serviceGateway }}"
etag: "{{ etag }}"
networkInterfaces:
- id: "{{ id }}"
name: "{{ name }}"
type: "{{ type }}"
location: "{{ location }}"
tags: "{{ tags }}"
properties:
virtualMachine: "{{ virtualMachine }}"
networkSecurityGroup: "{{ networkSecurityGroup }}"
privateEndpoint: "{{ privateEndpoint }}"
ipConfigurations: "{{ ipConfigurations }}"
tapConfigurations: "{{ tapConfigurations }}"
dnsSettings: "{{ dnsSettings }}"
macAddress: "{{ macAddress }}"
primary: {{ primary }}
vnetEncryptionSupported: {{ vnetEncryptionSupported }}
defaultOutboundConnectivityEnabled: {{ defaultOutboundConnectivityEnabled }}
enableAcceleratedNetworking: {{ enableAcceleratedNetworking }}
disableTcpStateTracking: {{ disableTcpStateTracking }}
enableIPForwarding: {{ enableIPForwarding }}
hostedWorkloads: "{{ hostedWorkloads }}"
dscpConfiguration: "{{ dscpConfiguration }}"
resourceGuid: "{{ resourceGuid }}"
provisioningState: "{{ provisioningState }}"
workloadType: "{{ workloadType }}"
nicType: "{{ nicType }}"
privateLinkService: "{{ privateLinkService }}"
migrationPhase: "{{ migrationPhase }}"
auxiliaryMode: "{{ auxiliaryMode }}"
auxiliarySku: "{{ auxiliarySku }}"
extendedLocation:
name: "{{ name }}"
type: "{{ type }}"
etag: "{{ etag }}"
provisioningState: "{{ provisioningState }}"
ipVersionType: "{{ ipVersionType }}"
privateLinkServiceConnections:
- id: "{{ id }}"
properties:
provisioningState: "{{ provisioningState }}"
privateLinkServiceId: "{{ privateLinkServiceId }}"
groupIds: "{{ groupIds }}"
requestMessage: "{{ requestMessage }}"
privateLinkServiceConnectionState: "{{ privateLinkServiceConnectionState }}"
name: "{{ name }}"
type: "{{ type }}"
etag: "{{ etag }}"
manualPrivateLinkServiceConnections:
- id: "{{ id }}"
properties:
provisioningState: "{{ provisioningState }}"
privateLinkServiceId: "{{ privateLinkServiceId }}"
groupIds: "{{ groupIds }}"
requestMessage: "{{ requestMessage }}"
privateLinkServiceConnectionState: "{{ privateLinkServiceConnectionState }}"
name: "{{ name }}"
type: "{{ type }}"
etag: "{{ etag }}"
customDnsConfigs:
- fqdn: "{{ fqdn }}"
ipAddresses: "{{ ipAddresses }}"
applicationSecurityGroups:
- id: "{{ id }}"
name: "{{ name }}"
type: "{{ type }}"
location: "{{ location }}"
tags: "{{ tags }}"
properties:
resourceGuid: "{{ resourceGuid }}"
provisioningState: "{{ provisioningState }}"
etag: "{{ etag }}"
ipConfigurations:
- properties:
groupId: "{{ groupId }}"
memberName: "{{ memberName }}"
privateIPAddress: "{{ privateIPAddress }}"
name: "{{ name }}"
type: "{{ type }}"
etag: "{{ etag }}"
customNetworkInterfaceName: "{{ customNetworkInterfaceName }}"
billingSku: "{{ billingSku }}"
extendedLocation:
name: "{{ name }}"
type: "{{ type }}"
etag: "{{ etag }}"
ipConfigurations:
- id: "{{ id }}"
properties:
privateIPAddress: "{{ privateIPAddress }}"
privateIPAllocationMethod: "{{ privateIPAllocationMethod }}"
subnet:
id: "{{ id }}"
name: "{{ name }}"
type: "{{ type }}"
properties:
addressPrefix: "{{ addressPrefix }}"
addressPrefixes: "{{ addressPrefixes }}"
networkSecurityGroup: "{{ networkSecurityGroup }}"
routeTable: "{{ routeTable }}"
natGateway: "{{ natGateway }}"
serviceEndpoints: "{{ serviceEndpoints }}"
serviceEndpointPolicies: "{{ serviceEndpointPolicies }}"
privateEndpoints: "{{ privateEndpoints }}"
ipConfigurations: "{{ ipConfigurations }}"
ipConfigurationProfiles: "{{ ipConfigurationProfiles }}"
ipAllocations: "{{ ipAllocations }}"
resourceNavigationLinks: "{{ resourceNavigationLinks }}"
serviceAssociationLinks: "{{ serviceAssociationLinks }}"
delegations: "{{ delegations }}"
purpose: "{{ purpose }}"
provisioningState: "{{ provisioningState }}"
privateEndpointNetworkPolicies: "{{ privateEndpointNetworkPolicies }}"
privateLinkServiceNetworkPolicies: "{{ privateLinkServiceNetworkPolicies }}"
applicationGatewayIPConfigurations: "{{ applicationGatewayIPConfigurations }}"
sharingScope: "{{ sharingScope }}"
defaultOutboundAccess: {{ defaultOutboundAccess }}
ipamPoolPrefixAllocations: "{{ ipamPoolPrefixAllocations }}"
serviceGateway: "{{ serviceGateway }}"
etag: "{{ etag }}"
publicIPAddress:
id: "{{ id }}"
name: "{{ name }}"
type: "{{ type }}"
location: "{{ location }}"
tags: "{{ tags }}"
properties:
publicIPAllocationMethod: "{{ publicIPAllocationMethod }}"
publicIPAddressVersion: "{{ publicIPAddressVersion }}"
ipConfiguration: "{{ ipConfiguration }}"
dnsSettings: "{{ dnsSettings }}"
ddosSettings: "{{ ddosSettings }}"
ipTags: "{{ ipTags }}"
ipAddress: "{{ ipAddress }}"
publicIPPrefix: "{{ publicIPPrefix }}"
idleTimeoutInMinutes: {{ idleTimeoutInMinutes }}
resourceGuid: "{{ resourceGuid }}"
provisioningState: "{{ provisioningState }}"
servicePublicIPAddress: "{{ servicePublicIPAddress }}"
natGateway: "{{ natGateway }}"
migrationPhase: "{{ migrationPhase }}"
linkedPublicIPAddress: "{{ linkedPublicIPAddress }}"
deleteOption: "{{ deleteOption }}"
extendedLocation:
name: "{{ name }}"
type: "{{ type }}"
sku:
name: "{{ name }}"
tier: "{{ tier }}"
etag: "{{ etag }}"
zones:
- "{{ zones }}"
provisioningState: "{{ provisioningState }}"
name: "{{ name }}"
etag: "{{ etag }}"
ipConfigurationProfiles:
- id: "{{ id }}"
properties:
subnet:
id: "{{ id }}"
name: "{{ name }}"
type: "{{ type }}"
properties:
addressPrefix: "{{ addressPrefix }}"
addressPrefixes: "{{ addressPrefixes }}"
networkSecurityGroup: "{{ networkSecurityGroup }}"
routeTable: "{{ routeTable }}"
natGateway: "{{ natGateway }}"
serviceEndpoints: "{{ serviceEndpoints }}"
serviceEndpointPolicies: "{{ serviceEndpointPolicies }}"
privateEndpoints: "{{ privateEndpoints }}"
ipConfigurations: "{{ ipConfigurations }}"
ipConfigurationProfiles: "{{ ipConfigurationProfiles }}"
ipAllocations: "{{ ipAllocations }}"
resourceNavigationLinks: "{{ resourceNavigationLinks }}"
serviceAssociationLinks: "{{ serviceAssociationLinks }}"
delegations: "{{ delegations }}"
purpose: "{{ purpose }}"
provisioningState: "{{ provisioningState }}"
privateEndpointNetworkPolicies: "{{ privateEndpointNetworkPolicies }}"
privateLinkServiceNetworkPolicies: "{{ privateLinkServiceNetworkPolicies }}"
applicationGatewayIPConfigurations: "{{ applicationGatewayIPConfigurations }}"
sharingScope: "{{ sharingScope }}"
defaultOutboundAccess: {{ defaultOutboundAccess }}
ipamPoolPrefixAllocations: "{{ ipamPoolPrefixAllocations }}"
serviceGateway: "{{ serviceGateway }}"
etag: "{{ etag }}"
provisioningState: "{{ provisioningState }}"
name: "{{ name }}"
type: "{{ type }}"
etag: "{{ etag }}"
ipAllocations:
- id: "{{ id }}"
resourceNavigationLinks:
- id: "{{ id }}"
properties:
linkedResourceType: "{{ linkedResourceType }}"
link: "{{ link }}"
provisioningState: "{{ provisioningState }}"
name: "{{ name }}"
etag: "{{ etag }}"
type: "{{ type }}"
serviceAssociationLinks:
- id: "{{ id }}"
properties:
linkedResourceType: "{{ linkedResourceType }}"
link: "{{ link }}"
provisioningState: "{{ provisioningState }}"
allowDelete: {{ allowDelete }}
locations:
- "{{ locations }}"
name: "{{ name }}"
etag: "{{ etag }}"
type: "{{ type }}"
delegations:
- id: "{{ id }}"
properties:
serviceName: "{{ serviceName }}"
actions:
- "{{ actions }}"
provisioningState: "{{ provisioningState }}"
name: "{{ name }}"
etag: "{{ etag }}"
type: "{{ type }}"
purpose: "{{ purpose }}"
provisioningState: "{{ provisioningState }}"
privateEndpointNetworkPolicies: "{{ privateEndpointNetworkPolicies }}"
privateLinkServiceNetworkPolicies: "{{ privateLinkServiceNetworkPolicies }}"
applicationGatewayIPConfigurations:
- id: "{{ id }}"
properties:
subnet:
id: "{{ id }}"
provisioningState: "{{ provisioningState }}"
name: "{{ name }}"
etag: "{{ etag }}"
type: "{{ type }}"
sharingScope: "{{ sharingScope }}"
defaultOutboundAccess: {{ defaultOutboundAccess }}
ipamPoolPrefixAllocations:
- pool:
id: "{{ id }}"
numberOfIpAddresses: "{{ numberOfIpAddresses }}"
allocatedAddressPrefixes: "{{ allocatedAddressPrefixes }}"
serviceGateway:
id: "{{ id }}"
REPLACE examples
- create_or_update
Creates or updates a subnet in the specified virtual network.
REPLACE azure.network.subnets
SET
id = '{{ id }}',
name = '{{ name }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND virtual_network_name = '{{ virtual_network_name }}' --required
AND subnet_name = '{{ subnet_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
properties,
type;
DELETE examples
- delete
Deletes the specified subnet.
DELETE FROM azure.network.subnets
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND virtual_network_name = '{{ virtual_network_name }}' --required
AND subnet_name = '{{ subnet_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- prepare_network_policies
- unprepare_network_policies
Prepares a subnet by applying network intent policies.
EXEC azure.network.subnets.prepare_network_policies
@resource_group_name='{{ resource_group_name }}' --required,
@virtual_network_name='{{ virtual_network_name }}' --required,
@subnet_name='{{ subnet_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"serviceName": "{{ serviceName }}",
"networkIntentPolicyConfigurations": "{{ networkIntentPolicyConfigurations }}"
}'
;
Unprepares a subnet by removing network intent policies.
EXEC azure.network.subnets.unprepare_network_policies
@resource_group_name='{{ resource_group_name }}' --required,
@virtual_network_name='{{ virtual_network_name }}' --required,
@subnet_name='{{ subnet_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"serviceName": "{{ serviceName }}"
}'
;