@pulumi/azure-native
Version:
[](https://slack.pulumi.com) [](https://npmjs.com/package/@pulumi/azure-native) [ • 10.3 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
import * as enums from "../types/enums";
/**
* Subnet in a virtual network resource.
*
* Uses Azure REST API version 2024-05-01. In version 2.x of the Azure Native provider, it used API version 2023-02-01.
*
* Other available API versions: 2018-06-01, 2018-07-01, 2018-08-01, 2018-10-01, 2018-11-01, 2018-12-01, 2019-02-01, 2019-04-01, 2019-06-01, 2019-07-01, 2019-08-01, 2019-09-01, 2019-11-01, 2019-12-01, 2020-03-01, 2020-04-01, 2020-05-01, 2020-06-01, 2020-07-01, 2020-08-01, 2020-11-01, 2021-02-01, 2021-03-01, 2021-05-01, 2021-08-01, 2022-01-01, 2022-05-01, 2022-07-01, 2022-09-01, 2022-11-01, 2023-02-01, 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01, 2023-11-01, 2024-01-01, 2024-03-01, 2024-07-01. These can be accessed by generating a local SDK package using the CLI command `pulumi package add azure-native network [ApiVersion]`. See the [version guide](../../../version-guide/#accessing-any-api-version-via-local-packages) for details.
*/
export declare class Subnet extends pulumi.CustomResource {
/**
* Get an existing Subnet resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): Subnet;
/**
* Returns true if the given object is an instance of Subnet. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is Subnet;
/**
* The address prefix for the subnet.
*/
readonly addressPrefix: pulumi.Output<string | undefined>;
/**
* List of address prefixes for the subnet.
*/
readonly addressPrefixes: pulumi.Output<string[] | undefined>;
/**
* Application gateway IP configurations of virtual network resource.
*/
readonly applicationGatewayIPConfigurations: pulumi.Output<outputs.network.ApplicationGatewayIPConfigurationResponse[] | undefined>;
/**
* The Azure API version of the resource.
*/
readonly azureApiVersion: pulumi.Output<string>;
/**
* 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.
*/
readonly defaultOutboundAccess: pulumi.Output<boolean | undefined>;
/**
* An array of references to the delegations on the subnet.
*/
readonly delegations: pulumi.Output<outputs.network.DelegationResponse[] | undefined>;
/**
* A unique read-only string that changes whenever the resource is updated.
*/
readonly etag: pulumi.Output<string>;
/**
* Array of IpAllocation which reference this subnet.
*/
readonly ipAllocations: pulumi.Output<outputs.network.SubResourceResponse[] | undefined>;
/**
* Array of IP configuration profiles which reference this subnet.
*/
readonly ipConfigurationProfiles: pulumi.Output<outputs.network.IPConfigurationProfileResponse[]>;
/**
* An array of references to the network interface IP configurations using subnet.
*/
readonly ipConfigurations: pulumi.Output<outputs.network.IPConfigurationResponse[]>;
/**
* A list of IPAM Pools for allocating IP address prefixes.
*/
readonly ipamPoolPrefixAllocations: pulumi.Output<outputs.network.IpamPoolPrefixAllocationResponse[] | undefined>;
/**
* The name of the resource that is unique within a resource group. This name can be used to access the resource.
*/
readonly name: pulumi.Output<string | undefined>;
/**
* Nat gateway associated with this subnet.
*/
readonly natGateway: pulumi.Output<outputs.network.SubResourceResponse | undefined>;
/**
* The reference to the NetworkSecurityGroup resource.
*/
readonly networkSecurityGroup: pulumi.Output<outputs.network.NetworkSecurityGroupResponse | undefined>;
/**
* Enable or Disable apply network policies on private end point in the subnet.
*/
readonly privateEndpointNetworkPolicies: pulumi.Output<string | undefined>;
/**
* An array of references to private endpoints.
*/
readonly privateEndpoints: pulumi.Output<outputs.network.PrivateEndpointResponse[]>;
/**
* Enable or Disable apply network policies on private link service in the subnet.
*/
readonly privateLinkServiceNetworkPolicies: pulumi.Output<string | undefined>;
/**
* The provisioning state of the subnet resource.
*/
readonly provisioningState: pulumi.Output<string>;
/**
* A read-only string identifying the intention of use for this subnet based on delegations and other user-defined properties.
*/
readonly purpose: pulumi.Output<string>;
/**
* An array of references to the external resources using subnet.
*/
readonly resourceNavigationLinks: pulumi.Output<outputs.network.ResourceNavigationLinkResponse[]>;
/**
* The reference to the RouteTable resource.
*/
readonly routeTable: pulumi.Output<outputs.network.RouteTableResponse | undefined>;
/**
* An array of references to services injecting into this subnet.
*/
readonly serviceAssociationLinks: pulumi.Output<outputs.network.ServiceAssociationLinkResponse[]>;
/**
* An array of service endpoint policies.
*/
readonly serviceEndpointPolicies: pulumi.Output<outputs.network.ServiceEndpointPolicyResponse[] | undefined>;
/**
* An array of service endpoints.
*/
readonly serviceEndpoints: pulumi.Output<outputs.network.ServiceEndpointPropertiesFormatResponse[] | undefined>;
/**
* 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.
*/
readonly sharingScope: pulumi.Output<string | undefined>;
/**
* Resource type.
*/
readonly type: pulumi.Output<string | undefined>;
/**
* Create a Subnet resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: SubnetArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* The set of arguments for constructing a Subnet resource.
*/
export interface SubnetArgs {
/**
* The address prefix for the subnet.
*/
addressPrefix?: pulumi.Input<string>;
/**
* List of address prefixes for the subnet.
*/
addressPrefixes?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Application gateway IP configurations of virtual network resource.
*/
applicationGatewayIPConfigurations?: pulumi.Input<pulumi.Input<inputs.network.ApplicationGatewayIPConfigurationArgs>[]>;
/**
* 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.
*/
defaultOutboundAccess?: pulumi.Input<boolean>;
/**
* An array of references to the delegations on the subnet.
*/
delegations?: pulumi.Input<pulumi.Input<inputs.network.DelegationArgs>[]>;
/**
* Resource ID.
*/
id?: pulumi.Input<string>;
/**
* Array of IpAllocation which reference this subnet.
*/
ipAllocations?: pulumi.Input<pulumi.Input<inputs.network.SubResourceArgs>[]>;
/**
* A list of IPAM Pools for allocating IP address prefixes.
*/
ipamPoolPrefixAllocations?: pulumi.Input<pulumi.Input<inputs.network.IpamPoolPrefixAllocationArgs>[]>;
/**
* The name of the resource that is unique within a resource group. This name can be used to access the resource.
*/
name?: pulumi.Input<string>;
/**
* Nat gateway associated with this subnet.
*/
natGateway?: pulumi.Input<inputs.network.SubResourceArgs>;
/**
* The reference to the NetworkSecurityGroup resource.
*/
networkSecurityGroup?: pulumi.Input<inputs.network.NetworkSecurityGroupArgs>;
/**
* Enable or Disable apply network policies on private end point in the subnet.
*/
privateEndpointNetworkPolicies?: pulumi.Input<string | enums.network.VirtualNetworkPrivateEndpointNetworkPolicies>;
/**
* Enable or Disable apply network policies on private link service in the subnet.
*/
privateLinkServiceNetworkPolicies?: pulumi.Input<string | enums.network.VirtualNetworkPrivateLinkServiceNetworkPolicies>;
/**
* The name of the resource group.
*/
resourceGroupName: pulumi.Input<string>;
/**
* The reference to the RouteTable resource.
*/
routeTable?: pulumi.Input<inputs.network.RouteTableArgs>;
/**
* An array of service endpoint policies.
*/
serviceEndpointPolicies?: pulumi.Input<pulumi.Input<inputs.network.ServiceEndpointPolicyArgs>[]>;
/**
* An array of service endpoints.
*/
serviceEndpoints?: pulumi.Input<pulumi.Input<inputs.network.ServiceEndpointPropertiesFormatArgs>[]>;
/**
* 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.
*/
sharingScope?: pulumi.Input<string | enums.network.SharingScope>;
/**
* The name of the subnet.
*/
subnetName?: pulumi.Input<string>;
/**
* Resource type.
*/
type?: pulumi.Input<string>;
/**
* The name of the virtual network.
*/
virtualNetworkName: pulumi.Input<string>;
}