SubnetInner Class

public final class SubnetInner
extends SubResource

Subnet in a virtual network resource.

Constructor Summary

Constructor Description
SubnetInner()

Creates an instance of SubnetInner class.

Method Summary

Modifier and Type Method and Description
String addressPrefix()

Get the addressPrefix property: The address prefix for the subnet.

List<String> addressPrefixes()

Get the addressPrefixes property: List of address prefixes for the subnet.

List<ApplicationGatewayIpConfigurationInner> applicationGatewayIpConfigurations()

Get the applicationGatewayIpConfigurations property: Application gateway IP configurations of virtual network resource.

Boolean defaultOutboundAccess()

Get the defaultOutboundAccess property: Set this property to false to disable default outbound connectivity for all VMs in the subnet.

List<Delegation> delegations()

Get the delegations property: An array of references to the delegations on the subnet.

String etag()

Get the etag property: A unique read-only string that changes whenever the resource is updated.

static SubnetInner fromJson(JsonReader jsonReader)

Reads an instance of SubnetInner from the JsonReader.

List<SubResource> ipAllocations()

Get the ipAllocations property: Array of IpAllocation which reference this subnet.

List<IpConfigurationProfileInner> ipConfigurationProfiles()

Get the ipConfigurationProfiles property: Array of IP configuration profiles which reference this subnet.

List<IpConfigurationInner> ipConfigurations()

Get the ipConfigurations property: An array of references to the network interface IP configurations using subnet.

String name()

Get the name property: The name of the resource that is unique within a resource group.

SubResource natGateway()

Get the natGateway property: Nat gateway associated with this subnet.

NetworkSecurityGroupInner networkSecurityGroup()

Get the networkSecurityGroup property: The reference to the NetworkSecurityGroup resource.

VirtualNetworkPrivateEndpointNetworkPolicies privateEndpointNetworkPolicies()

Get the privateEndpointNetworkPolicies property: Enable or Disable apply network policies on private end point in the subnet.

List<PrivateEndpointInner> privateEndpoints()

Get the privateEndpoints property: An array of references to private endpoints.

VirtualNetworkPrivateLinkServiceNetworkPolicies privateLinkServiceNetworkPolicies()

Get the privateLinkServiceNetworkPolicies property: Enable or Disable apply network policies on private link service in the subnet.

ProvisioningState provisioningState()

Get the provisioningState property: The provisioning state of the subnet resource.

String purpose()

Get the purpose property: A read-only string identifying the intention of use for this subnet based on delegations and other user-defined properties.

List<ResourceNavigationLink> resourceNavigationLinks()

Get the resourceNavigationLinks property: An array of references to the external resources using subnet.

RouteTableInner routeTable()

Get the routeTable property: The reference to the RouteTable resource.

List<ServiceAssociationLink> serviceAssociationLinks()

Get the serviceAssociationLinks property: An array of references to services injecting into this subnet.

List<ServiceEndpointPolicyInner> serviceEndpointPolicies()

Get the serviceEndpointPolicies property: An array of service endpoint policies.

List<ServiceEndpointPropertiesFormat> serviceEndpoints()

Get the serviceEndpoints property: An array of service endpoints.

SharingScope sharingScope()

Get the sharingScope property: Set this property to Tenant to allow sharing subnet with other subscriptions in your AAD tenant.

JsonWriter toJson(JsonWriter jsonWriter)
String type()

Get the type property: Resource type.

void validate()

Validates the instance.

SubnetInner withAddressPrefix(String addressPrefix)

Set the addressPrefix property: The address prefix for the subnet.

SubnetInner withAddressPrefixes(List<String> addressPrefixes)

Set the addressPrefixes property: List of address prefixes for the subnet.

SubnetInner withApplicationGatewayIpConfigurations(List<ApplicationGatewayIpConfigurationInner> applicationGatewayIpConfigurations)

Set the applicationGatewayIpConfigurations property: Application gateway IP configurations of virtual network resource.

SubnetInner withDefaultOutboundAccess(Boolean defaultOutboundAccess)

Set the defaultOutboundAccess property: Set this property to false to disable default outbound connectivity for all VMs in the subnet.

SubnetInner withDelegations(List<Delegation> delegations)

Set the delegations property: An array of references to the delegations on the subnet.

SubnetInner withId(String id)
SubnetInner withIpAllocations(List<SubResource> ipAllocations)

Set the ipAllocations property: Array of IpAllocation which reference this subnet.

SubnetInner withName(String name)

Set the name property: The name of the resource that is unique within a resource group.

SubnetInner withNatGateway(SubResource natGateway)

Set the natGateway property: Nat gateway associated with this subnet.

SubnetInner withNetworkSecurityGroup(NetworkSecurityGroupInner networkSecurityGroup)

Set the networkSecurityGroup property: The reference to the NetworkSecurityGroup resource.

SubnetInner withPrivateEndpointNetworkPolicies(VirtualNetworkPrivateEndpointNetworkPolicies privateEndpointNetworkPolicies)

Set the privateEndpointNetworkPolicies property: Enable or Disable apply network policies on private end point in the subnet.

SubnetInner withPrivateLinkServiceNetworkPolicies(VirtualNetworkPrivateLinkServiceNetworkPolicies privateLinkServiceNetworkPolicies)

Set the privateLinkServiceNetworkPolicies property: Enable or Disable apply network policies on private link service in the subnet.

SubnetInner withRouteTable(RouteTableInner routeTable)

Set the routeTable property: The reference to the RouteTable resource.

SubnetInner withServiceEndpointPolicies(List<ServiceEndpointPolicyInner> serviceEndpointPolicies)

Set the serviceEndpointPolicies property: An array of service endpoint policies.

SubnetInner withServiceEndpoints(List<ServiceEndpointPropertiesFormat> serviceEndpoints)

Set the serviceEndpoints property: An array of service endpoints.

SubnetInner withSharingScope(SharingScope sharingScope)

Set the sharingScope property: Set this property to Tenant to allow sharing subnet with other subscriptions in your AAD tenant.

SubnetInner withType(String type)

Set the type property: Resource type.

Methods inherited from SubResource

Methods inherited from java.lang.Object

Constructor Details

SubnetInner

public SubnetInner()

Creates an instance of SubnetInner class.

Method Details

addressPrefix

public String addressPrefix()

Get the addressPrefix property: The address prefix for the subnet.

Returns:

the addressPrefix value.

addressPrefixes

public List addressPrefixes()

Get the addressPrefixes property: List of address prefixes for the subnet.

Returns:

the addressPrefixes value.

applicationGatewayIpConfigurations

public List applicationGatewayIpConfigurations()

Get the applicationGatewayIpConfigurations property: Application gateway IP configurations of virtual network resource.

Returns:

the applicationGatewayIpConfigurations value.

defaultOutboundAccess

public Boolean defaultOutboundAccess()

Get the defaultOutboundAccess property: Set this property to false to disable default outbound connectivity for all VMs in the subnet. This property can only be set at the time of subnet creation and cannot be updated for an existing subnet.

Returns:

the defaultOutboundAccess value.

delegations

public List delegations()

Get the delegations property: An array of references to the delegations on the subnet.

Returns:

the delegations value.

etag

public String etag()

Get the etag property: A unique read-only string that changes whenever the resource is updated.

Returns:

the etag value.

fromJson

public static SubnetInner fromJson(JsonReader jsonReader)

Reads an instance of SubnetInner from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of SubnetInner if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the SubnetInner.

ipAllocations

public List ipAllocations()

Get the ipAllocations property: Array of IpAllocation which reference this subnet.

Returns:

the ipAllocations value.

ipConfigurationProfiles

public List ipConfigurationProfiles()

Get the ipConfigurationProfiles property: Array of IP configuration profiles which reference this subnet.

Returns:

the ipConfigurationProfiles value.

ipConfigurations

public List ipConfigurations()

Get the ipConfigurations property: An array of references to the network interface IP configurations using subnet.

Returns:

the ipConfigurations value.

name

public String name()

Get the name property: The name of the resource that is unique within a resource group. This name can be used to access the resource.

Returns:

the name value.

natGateway

public SubResource natGateway()

Get the natGateway property: Nat gateway associated with this subnet.

Returns:

the natGateway value.

networkSecurityGroup

public NetworkSecurityGroupInner networkSecurityGroup()

Get the networkSecurityGroup property: The reference to the NetworkSecurityGroup resource.

Returns:

the networkSecurityGroup value.

privateEndpointNetworkPolicies

public VirtualNetworkPrivateEndpointNetworkPolicies privateEndpointNetworkPolicies()

Get the privateEndpointNetworkPolicies property: Enable or Disable apply network policies on private end point in the subnet.

Returns:

the privateEndpointNetworkPolicies value.

privateEndpoints

public List privateEndpoints()

Get the privateEndpoints property: An array of references to private endpoints.

Returns:

the privateEndpoints value.

privateLinkServiceNetworkPolicies

public VirtualNetworkPrivateLinkServiceNetworkPolicies privateLinkServiceNetworkPolicies()

Get the privateLinkServiceNetworkPolicies property: Enable or Disable apply network policies on private link service in the subnet.

Returns:

the privateLinkServiceNetworkPolicies value.

provisioningState

public ProvisioningState provisioningState()

Get the provisioningState property: The provisioning state of the subnet resource.

Returns:

the provisioningState value.

purpose

public String purpose()

Get the purpose property: A read-only string identifying the intention of use for this subnet based on delegations and other user-defined properties.

Returns:

the purpose value.

resourceNavigationLinks

public List resourceNavigationLinks()

Get the resourceNavigationLinks property: An array of references to the external resources using subnet.

Returns:

the resourceNavigationLinks value.

routeTable

public RouteTableInner routeTable()

Get the routeTable property: The reference to the RouteTable resource.

Returns:

the routeTable value.

serviceAssociationLinks

public List serviceAssociationLinks()

Get the serviceAssociationLinks property: An array of references to services injecting into this subnet.

Returns:

the serviceAssociationLinks value.

serviceEndpointPolicies

public List serviceEndpointPolicies()

Get the serviceEndpointPolicies property: An array of service endpoint policies.

Returns:

the serviceEndpointPolicies value.

serviceEndpoints

public List serviceEndpoints()

Get the serviceEndpoints property: An array of service endpoints.

Returns:

the serviceEndpoints value.

sharingScope

public SharingScope sharingScope()

Get the sharingScope property: 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.

Returns:

the sharingScope value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

SubnetInner.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public String type()

Get the type property: Resource type.

Returns:

the type value.

validate

public void validate()

Validates the instance.

withAddressPrefix

public SubnetInner withAddressPrefix(String addressPrefix)

Set the addressPrefix property: The address prefix for the subnet.

Parameters:

addressPrefix - the addressPrefix value to set.

Returns:

the SubnetInner object itself.

withAddressPrefixes

public SubnetInner withAddressPrefixes(List addressPrefixes)

Set the addressPrefixes property: List of address prefixes for the subnet.

Parameters:

addressPrefixes - the addressPrefixes value to set.

Returns:

the SubnetInner object itself.

withApplicationGatewayIpConfigurations

public SubnetInner withApplicationGatewayIpConfigurations(List applicationGatewayIpConfigurations)

Set the applicationGatewayIpConfigurations property: Application gateway IP configurations of virtual network resource.

Parameters:

applicationGatewayIpConfigurations - the applicationGatewayIpConfigurations value to set.

Returns:

the SubnetInner object itself.

withDefaultOutboundAccess

public SubnetInner withDefaultOutboundAccess(Boolean defaultOutboundAccess)

Set the defaultOutboundAccess property: Set this property to false to disable default outbound connectivity for all VMs in the subnet. This property can only be set at the time of subnet creation and cannot be updated for an existing subnet.

Parameters:

defaultOutboundAccess - the defaultOutboundAccess value to set.

Returns:

the SubnetInner object itself.

withDelegations

public SubnetInner withDelegations(List delegations)

Set the delegations property: An array of references to the delegations on the subnet.

Parameters:

delegations - the delegations value to set.

Returns:

the SubnetInner object itself.

withId

public SubnetInner withId(String id)

Overrides:

SubnetInner.withId(String id)

Parameters:

id

withIpAllocations

public SubnetInner withIpAllocations(List ipAllocations)

Set the ipAllocations property: Array of IpAllocation which reference this subnet.

Parameters:

ipAllocations - the ipAllocations value to set.

Returns:

the SubnetInner object itself.

withName

public SubnetInner withName(String name)

Set the name property: The name of the resource that is unique within a resource group. This name can be used to access the resource.

Parameters:

name - the name value to set.

Returns:

the SubnetInner object itself.

withNatGateway

public SubnetInner withNatGateway(SubResource natGateway)

Set the natGateway property: Nat gateway associated with this subnet.

Parameters:

natGateway - the natGateway value to set.

Returns:

the SubnetInner object itself.

withNetworkSecurityGroup

public SubnetInner withNetworkSecurityGroup(NetworkSecurityGroupInner networkSecurityGroup)

Set the networkSecurityGroup property: The reference to the NetworkSecurityGroup resource.

Parameters:

networkSecurityGroup - the networkSecurityGroup value to set.

Returns:

the SubnetInner object itself.

withPrivateEndpointNetworkPolicies

public SubnetInner withPrivateEndpointNetworkPolicies(VirtualNetworkPrivateEndpointNetworkPolicies privateEndpointNetworkPolicies)

Set the privateEndpointNetworkPolicies property: Enable or Disable apply network policies on private end point in the subnet.

Parameters:

privateEndpointNetworkPolicies - the privateEndpointNetworkPolicies value to set.

Returns:

the SubnetInner object itself.

withPrivateLinkServiceNetworkPolicies

public SubnetInner withPrivateLinkServiceNetworkPolicies(VirtualNetworkPrivateLinkServiceNetworkPolicies privateLinkServiceNetworkPolicies)

Set the privateLinkServiceNetworkPolicies property: Enable or Disable apply network policies on private link service in the subnet.

Parameters:

privateLinkServiceNetworkPolicies - the privateLinkServiceNetworkPolicies value to set.

Returns:

the SubnetInner object itself.

withRouteTable

public SubnetInner withRouteTable(RouteTableInner routeTable)

Set the routeTable property: The reference to the RouteTable resource.

Parameters:

routeTable - the routeTable value to set.

Returns:

the SubnetInner object itself.

withServiceEndpointPolicies

public SubnetInner withServiceEndpointPolicies(List serviceEndpointPolicies)

Set the serviceEndpointPolicies property: An array of service endpoint policies.

Parameters:

serviceEndpointPolicies - the serviceEndpointPolicies value to set.

Returns:

the SubnetInner object itself.

withServiceEndpoints

public SubnetInner withServiceEndpoints(List serviceEndpoints)

Set the serviceEndpoints property: An array of service endpoints.

Parameters:

serviceEndpoints - the serviceEndpoints value to set.

Returns:

the SubnetInner object itself.

withSharingScope

public SubnetInner withSharingScope(SharingScope sharingScope)

Set the sharingScope property: 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.

Parameters:

sharingScope - the sharingScope value to set.

Returns:

the SubnetInner object itself.

withType

public SubnetInner withType(String type)

Set the type property: Resource type.

Parameters:

type - the type value to set.

Returns:

the SubnetInner object itself.

Applies to