subnets
Creates, updates, deletes, gets or lists a subnets
resource.
Overview
Name | subnets |
Type | Resource |
Id | azure.network.subnets |
Fields
- vw_subnets
- subnets
Name | Datatype | Description |
---|---|---|
id | text | Resource ID. |
name | text | The name of the resource that is unique within a resource group. This name can be used to access the resource. |
address_prefix | text | field from the properties object |
address_prefixes | text | field from the properties object |
application_gateway_ip_configurations | text | field from the properties object |
default_outbound_access | text | field from the properties object |
delegations | text | field from the properties object |
etag | text | A unique read-only string that changes whenever the resource is updated. |
ip_allocations | text | field from the properties object |
ip_configuration_profiles | text | field from the properties object |
ip_configurations | text | field from the properties object |
nat_gateway | text | field from the properties object |
network_security_group | text | field from the properties object |
private_endpoint_network_policies | text | field from the properties object |
private_endpoints | text | field from the properties object |
private_link_service_network_policies | text | field from the properties object |
provisioning_state | text | field from the properties object |
purpose | text | field from the properties object |
resourceGroupName | text | field from the properties object |
resource_navigation_links | text | field from the properties object |
route_table | text | field from the properties object |
service_association_links | text | field from the properties object |
service_endpoint_policies | text | field from the properties object |
service_endpoints | text | field from the properties object |
sharing_scope | text | field from the properties object |
subnetName | text | field from the properties object |
subscriptionId | text | field from the properties object |
type | text | Resource type. |
virtualNetworkName | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
id | string | Resource ID. |
name | string | The name of the resource that is unique within a resource group. This name can be used to access the resource. |
etag | string | A unique read-only string that changes whenever the resource is updated. |
properties | object | Properties of the subnet. |
type | string | Resource type. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | resourceGroupName, subnetName, subscriptionId, virtualNetworkName | Gets the specified subnet by virtual network and resource group. |
list | SELECT | resourceGroupName, subscriptionId, virtualNetworkName | Gets all subnets in a virtual network. |
create_or_update | INSERT | resourceGroupName, subnetName, subscriptionId, virtualNetworkName | Creates or updates a subnet in the specified virtual network. |
delete | DELETE | resourceGroupName, subnetName, subscriptionId, virtualNetworkName | Deletes the specified subnet. |
prepare_network_policies | EXEC | resourceGroupName, subnetName, subscriptionId, virtualNetworkName | Prepares a subnet by applying network intent policies. |
unprepare_network_policies | EXEC | resourceGroupName, subnetName, subscriptionId, virtualNetworkName | Unprepares a subnet by removing network intent policies. |
SELECT
examples
Gets all subnets in a virtual network.
- vw_subnets
- subnets
SELECT
id,
name,
address_prefix,
address_prefixes,
application_gateway_ip_configurations,
default_outbound_access,
delegations,
etag,
ip_allocations,
ip_configuration_profiles,
ip_configurations,
nat_gateway,
network_security_group,
private_endpoint_network_policies,
private_endpoints,
private_link_service_network_policies,
provisioning_state,
purpose,
resourceGroupName,
resource_navigation_links,
route_table,
service_association_links,
service_endpoint_policies,
service_endpoints,
sharing_scope,
subnetName,
subscriptionId,
type,
virtualNetworkName
FROM azure.network.vw_subnets
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND virtualNetworkName = '{{ virtualNetworkName }}';
SELECT
id,
name,
etag,
properties,
type
FROM azure.network.subnets
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND virtualNetworkName = '{{ virtualNetworkName }}';
INSERT
example
Use the following StackQL query and manifest file to create a new subnets
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.network.subnets (
resourceGroupName,
subnetName,
subscriptionId,
virtualNetworkName,
properties,
name,
type,
id
)
SELECT
'{{ resourceGroupName }}',
'{{ subnetName }}',
'{{ subscriptionId }}',
'{{ virtualNetworkName }}',
'{{ properties }}',
'{{ name }}',
'{{ type }}',
'{{ id }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: addressPrefix
value: string
- name: addressPrefixes
value:
- string
- name: networkSecurityGroup
value:
- name: properties
value:
- name: flushConnection
value: boolean
- name: securityRules
value:
- - name: properties
value:
- name: description
value: string
- name: protocol
value: string
- name: sourcePortRange
value: string
- name: destinationPortRange
value: string
- name: sourceAddressPrefix
value: string
- name: sourceAddressPrefixes
value:
- string
- name: sourceApplicationSecurityGroups
value:
- - name: properties
value:
- name: resourceGuid
value: string
- name: provisioningState
value: []
- name: etag
value: string
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: location
value: string
- name: tags
value: object
- name: destinationAddressPrefix
value: string
- name: destinationAddressPrefixes
value:
- string
- name: destinationApplicationSecurityGroups
value:
- - name: etag
value: string
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: location
value: string
- name: tags
value: object
- name: sourcePortRanges
value:
- string
- name: destinationPortRanges
value:
- string
- name: access
value: []
- name: priority
value: integer
- name: direction
value: []
- name: name
value: string
- name: etag
value: string
- name: type
value: string
- name: id
value: string
- name: defaultSecurityRules
value:
- - name: name
value: string
- name: etag
value: string
- name: type
value: string
- name: id
value: string
- name: networkInterfaces
value:
- - name: extendedLocation
value:
- name: name
value: string
- name: type
value: []
- name: properties
value:
- name: virtualMachine
value:
- name: id
value: string
- name: privateEndpoint
value:
- name: properties
value:
- name: subnet
value:
- name: name
value: string
- name: etag
value: string
- name: type
value: string
- name: id
value: string
- name: networkInterfaces
value:
- - name: etag
value: string
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: location
value: string
- name: tags
value: object
- name: privateLinkServiceConnections
value:
- - name: properties
value:
- name: privateLinkServiceId
value: string
- name: groupIds
value:
- string
- name: requestMessage
value: string
- name: privateLinkServiceConnectionState
value:
- name: status
value: string
- name: description
value: string
- name: actionsRequired
value: string
- name: name
value: string
- name: type
value: string
- name: etag
value: string
- name: id
value: string
- name: manualPrivateLinkServiceConnections
value:
- - name: name
value: string
- name: type
value: string
- name: etag
value: string
- name: id
value: string
- name: customDnsConfigs
value:
- - name: fqdn
value: string
- name: ipAddresses
value:
- string
- name: applicationSecurityGroups
value:
- - name: etag
value: string
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: location
value: string
- name: tags
value: object
- name: ipConfigurations
value:
- - name: properties
value:
- name: groupId
value: string
- name: memberName
value: string
- name: privateIPAddress
value: string
- name: name
value: string
- name: type
value: string
- name: etag
value: string
- name: customNetworkInterfaceName
value: string
- name: etag
value: string
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: location
value: string
- name: tags
value: object
- name: ipConfigurations
value:
- - name: properties
value:
- name: virtualNetworkTaps
value:
- - name: properties
value:
- name: networkInterfaceTapConfigurations
value:
- - name: properties
value: []
- name: name
value: string
- name: etag
value: string
- name: type
value: string
- name: id
value: string
- name: resourceGuid
value: string
- name: destinationNetworkInterfaceIPConfiguration
value:
- name: name
value: string
- name: etag
value: string
- name: type
value: string
- name: id
value: string
- name: destinationLoadBalancerFrontEndIPConfiguration
value:
- name: properties
value: []
- name: name
value: string
- name: etag
value: string
- name: type
value: string
- name: zones
value:
- string
- name: id
value: string
- name: destinationPort
value: integer
- name: etag
value: string
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: location
value: string
- name: tags
value: object
- name: applicationGatewayBackendAddressPools
value:
- - name: properties
value:
- name: backendIPConfigurations
value:
- - name: name
value: string
- name: etag
value: string
- name: type
value: string
- name: id
value: string
- name: backendAddresses
value:
- - name: fqdn
value: string
- name: ipAddress
value: string
- name: name
value: string
- name: etag
value: string
- name: type
value: string
- name: id
value: string
- name: loadBalancerBackendAddressPools
value:
- - name: properties
value:
- name: location
value: string
- name: tunnelInterfaces
value:
- - name: port
value: integer
- name: identifier
value: integer
- name: protocol
value: string
- name: type
value: string
- name: loadBalancerBackendAddresses
value:
- - name: properties
value: []
- name: name
value: string
- name: backendIPConfigurations
value:
- - name: name
value: string
- name: etag
value: string
- name: type
value: string
- name: id
value: string
- name: loadBalancingRules
value:
- - name: id
value: string
- name: outboundRules
value:
- - name: id
value: string
- name: inboundNatRules
value:
- - name: id
value: string
- name: drainPeriodInSeconds
value: integer
- name: syncMode
value: string
- name: name
value: string
- name: etag
value: string
- name: type
value: string
- name: id
value: string
- name: loadBalancerInboundNatRules
value:
- - name: properties
value:
- name: protocol
value: []
- name: frontendPort
value: integer
- name: backendPort
value: integer
- name: idleTimeoutInMinutes
value: integer
- name: enableFloatingIP
value: boolean
- name: enableTcpReset
value: boolean
- name: frontendPortRangeStart
value: integer
- name: frontendPortRangeEnd
value: integer
- name: name
value: string
- name: etag
value: string
- name: type
value: string
- name: id
value: string
- name: privateIPAddress
value: string
- name: privateIPAddressPrefixLength
value: integer
- name: privateIPAllocationMethod
value: []
- name: privateIPAddressVersion
value: []
- name: primary
value: boolean
- name: publicIPAddress
value:
- name: sku
value:
- name: name
value: string
- name: tier
value: string
- name: properties
value:
- name: ipConfiguration
value:
- name: properties
value: []
- name: name
value: string
- name: etag
value: string
- name: id
value: string
- name: dnsSettings
value:
- name: domainNameLabel
value: string
- name: domainNameLabelScope
value: string
- name: fqdn
value: string
- name: reverseFqdn
value: string
- name: ddosSettings
value:
- name: protectionMode
value: string
- name: ipTags
value:
- - name: ipTagType
value: string
- name: tag
value: string
- name: ipAddress
value: string
- name: idleTimeoutInMinutes
value: integer
- name: resourceGuid
value: string
- name: natGateway
value:
- name: sku
value: []
- name: properties
value: []
- name: zones
value:
- string
- name: etag
value: string
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: location
value: string
- name: tags
value: object
- name: migrationPhase
value: string
- name: deleteOption
value: string
- name: etag
value: string
- name: zones
value:
- string
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: location
value: string
- name: tags
value: object
- name: applicationSecurityGroups
value:
- - name: etag
value: string
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: location
value: string
- name: tags
value: object
- name: privateLinkConnectionProperties
value:
- name: groupId
value: string
- name: requiredMemberName
value: string
- name: fqdns
value:
- string
- name: name
value: string
- name: etag
value: string
- name: type
value: string
- name: id
value: string
- name: tapConfigurations
value:
- - name: name
value: string
- name: etag
value: string
- name: type
value: string
- name: id
value: string
- name: dnsSettings
value:
- name: dnsServers
value:
- string
- name: appliedDnsServers
value:
- string
- name: internalDnsNameLabel
value: string
- name: internalFqdn
value: string
- name: internalDomainNameSuffix
value: string
- name: macAddress
value: string
- name: primary
value: boolean
- name: vnetEncryptionSupported
value: boolean
- name: enableAcceleratedNetworking
value: boolean
- name: disableTcpStateTracking
value: boolean
- name: enableIPForwarding
value: boolean
- name: hostedWorkloads
value:
- string
- name: resourceGuid
value: string
- name: workloadType
value: string
- name: nicType
value: string
- name: privateLinkService
value:
- name: properties
value:
- name: loadBalancerFrontendIpConfigurations
value:
- - name: name
value: string
- name: etag
value: string
- name: type
value: string
- name: zones
value:
- string
- name: id
value: string
- name: ipConfigurations
value:
- - name: properties
value:
- name: privateIPAddress
value: string
- name: primary
value: boolean
- name: name
value: string
- name: etag
value: string
- name: type
value: string
- name: id
value: string
- name: destinationIPAddress
value: string
- name: networkInterfaces
value:
- - name: etag
value: string
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: location
value: string
- name: tags
value: object
- name: privateEndpointConnections
value:
- - name: properties
value:
- name: linkIdentifier
value: string
- name: privateEndpointLocation
value: string
- name: name
value: string
- name: type
value: string
- name: etag
value: string
- name: id
value: string
- name: visibility
value: string
- name: autoApproval
value: string
- name: fqdns
value:
- string
- name: alias
value: string
- name: enableProxyProtocol
value: boolean
- name: etag
value: string
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: location
value: string
- name: tags
value: object
- name: migrationPhase
value: string
- name: auxiliaryMode
value: string
- name: auxiliarySku
value: string
- name: etag
value: string
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: location
value: string
- name: tags
value: object
- name: subnets
value:
- - name: name
value: string
- name: etag
value: string
- name: type
value: string
- name: id
value: string
- name: flowLogs
value:
- - name: properties
value:
- name: targetResourceId
value: string
- name: targetResourceGuid
value: string
- name: storageId
value: string
- name: enabledFilteringCriteria
value: string
- name: enabled
value: boolean
- name: retentionPolicy
value:
- name: days
value: integer
- name: enabled
value: boolean
- name: format
value:
- name: type
value: string
- name: version
value: integer
- name: flowAnalyticsConfiguration
value:
- name: networkWatcherFlowAnalyticsConfiguration
value:
- name: enabled
value: boolean
- name: workspaceId
value: string
- name: workspaceRegion
value: string
- name: workspaceResourceId
value: string
- name: trafficAnalyticsInterval
value: integer
- name: etag
value: string
- name: identity
value:
- name: principalId
value: string
- name: tenantId
value: string
- name: type
value: string
- name: userAssignedIdentities
value: object
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: location
value: string
- name: tags
value: object
- name: resourceGuid
value: string
- name: etag
value: string
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: location
value: string
- name: tags
value: object
- name: routeTable
value:
- name: properties
value:
- name: routes
value:
- - name: properties
value:
- name: addressPrefix
value: string
- name: nextHopType
value: []
- name: nextHopIpAddress
value: string
- name: hasBgpOverride
value: boolean
- name: name
value: string
- name: etag
value: string
- name: type
value: string
- name: id
value: string
- name: subnets
value:
- - name: name
value: string
- name: etag
value: string
- name: type
value: string
- name: id
value: string
- name: disableBgpRoutePropagation
value: boolean
- name: resourceGuid
value: string
- name: etag
value: string
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: location
value: string
- name: tags
value: object
- name: serviceEndpoints
value:
- - name: service
value: string
- name: locations
value:
- string
- name: serviceEndpointPolicies
value:
- - name: properties
value:
- name: serviceEndpointPolicyDefinitions
value:
- - name: properties
value:
- name: description
value: string
- name: service
value: string
- name: serviceResources
value:
- string
- name: name
value: string
- name: etag
value: string
- name: type
value: string
- name: id
value: string
- name: subnets
value:
- - name: name
value: string
- name: etag
value: string
- name: type
value: string
- name: id
value: string
- name: resourceGuid
value: string
- name: serviceAlias
value: string
- name: contextualServiceEndpointPolicies
value:
- string
- name: etag
value: string
- name: kind
value: string
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: location
value: string
- name: tags
value: object
- name: privateEndpoints
value:
- - name: etag
value: string
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: location
value: string
- name: tags
value: object
- name: ipConfigurations
value:
- - name: name
value: string
- name: etag
value: string
- name: id
value: string
- name: ipConfigurationProfiles
value:
- - name: properties
value: []
- name: name
value: string
- name: type
value: string
- name: etag
value: string
- name: id
value: string
- name: ipAllocations
value:
- - name: id
value: string
- name: resourceNavigationLinks
value:
- - name: properties
value:
- name: linkedResourceType
value: string
- name: link
value: string
- name: name
value: string
- name: id
value: string
- name: etag
value: string
- name: type
value: string
- name: serviceAssociationLinks
value:
- - name: properties
value:
- name: linkedResourceType
value: string
- name: link
value: string
- name: allowDelete
value: boolean
- name: locations
value:
- string
- name: name
value: string
- name: etag
value: string
- name: type
value: string
- name: id
value: string
- name: delegations
value:
- - name: properties
value:
- name: serviceName
value: string
- name: actions
value:
- string
- name: name
value: string
- name: etag
value: string
- name: type
value: string
- name: id
value: string
- name: purpose
value: string
- name: privateEndpointNetworkPolicies
value: string
- name: privateLinkServiceNetworkPolicies
value: string
- name: applicationGatewayIPConfigurations
value:
- - name: properties
value: []
- name: name
value: string
- name: etag
value: string
- name: type
value: string
- name: id
value: string
- name: sharingScope
value: string
- name: defaultOutboundAccess
value: boolean
- name: name
value: string
- name: etag
value: string
- name: type
value: string
- name: id
value: string
DELETE
example
Deletes the specified subnets
resource.
/*+ delete */
DELETE FROM azure.network.subnets
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND subnetName = '{{ subnetName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND virtualNetworkName = '{{ virtualNetworkName }}';