azure-native.network.IpAllocation
Explore with Pulumi AI
IpAllocation resource. Azure REST API version: 2023-02-01. Prior API version in Azure Native 1.x: 2020-11-01.
Other available API versions: 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01, 2023-11-01, 2024-01-01, 2024-03-01, 2024-05-01.
Example Usage
Create IpAllocation
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() => 
{
    var ipAllocation = new AzureNative.Network.IpAllocation("ipAllocation", new()
    {
        AllocationTags = 
        {
            { "VNetID", "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/HypernetVnet1" },
        },
        IpAllocationName = "test-ipallocation",
        Location = "centraluseuap",
        Prefix = "3.2.5.0/24",
        ResourceGroupName = "rg1",
        Type = AzureNative.Network.IpAllocationType.Hypernet,
    });
});
package main
import (
	network "github.com/pulumi/pulumi-azure-native-sdk/network/v2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := network.NewIpAllocation(ctx, "ipAllocation", &network.IpAllocationArgs{
			AllocationTags: pulumi.StringMap{
				"VNetID": pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/HypernetVnet1"),
			},
			IpAllocationName:  pulumi.String("test-ipallocation"),
			Location:          pulumi.String("centraluseuap"),
			Prefix:            pulumi.String("3.2.5.0/24"),
			ResourceGroupName: pulumi.String("rg1"),
			Type:              pulumi.String(network.IpAllocationTypeHypernet),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.network.IpAllocation;
import com.pulumi.azurenative.network.IpAllocationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        var ipAllocation = new IpAllocation("ipAllocation", IpAllocationArgs.builder()
            .allocationTags(Map.of("VNetID", "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/HypernetVnet1"))
            .ipAllocationName("test-ipallocation")
            .location("centraluseuap")
            .prefix("3.2.5.0/24")
            .resourceGroupName("rg1")
            .type("Hypernet")
            .build());
    }
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const ipAllocation = new azure_native.network.IpAllocation("ipAllocation", {
    allocationTags: {
        VNetID: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/HypernetVnet1",
    },
    ipAllocationName: "test-ipallocation",
    location: "centraluseuap",
    prefix: "3.2.5.0/24",
    resourceGroupName: "rg1",
    type: azure_native.network.IpAllocationType.Hypernet,
});
import pulumi
import pulumi_azure_native as azure_native
ip_allocation = azure_native.network.IpAllocation("ipAllocation",
    allocation_tags={
        "VNetID": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/HypernetVnet1",
    },
    ip_allocation_name="test-ipallocation",
    location="centraluseuap",
    prefix="3.2.5.0/24",
    resource_group_name="rg1",
    type=azure_native.network.IpAllocationType.HYPERNET)
resources:
  ipAllocation:
    type: azure-native:network:IpAllocation
    properties:
      allocationTags:
        VNetID: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/HypernetVnet1
      ipAllocationName: test-ipallocation
      location: centraluseuap
      prefix: 3.2.5.0/24
      resourceGroupName: rg1
      type: Hypernet
Create IpAllocation Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new IpAllocation(name: string, args: IpAllocationArgs, opts?: CustomResourceOptions);@overload
def IpAllocation(resource_name: str,
                 args: IpAllocationArgs,
                 opts: Optional[ResourceOptions] = None)
@overload
def IpAllocation(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 resource_group_name: Optional[str] = None,
                 allocation_tags: Optional[Mapping[str, str]] = None,
                 id: Optional[str] = None,
                 ip_allocation_name: Optional[str] = None,
                 ipam_allocation_id: Optional[str] = None,
                 location: Optional[str] = None,
                 prefix: Optional[str] = None,
                 prefix_length: Optional[int] = None,
                 prefix_type: Optional[Union[str, IPVersion]] = None,
                 tags: Optional[Mapping[str, str]] = None,
                 type: Optional[Union[str, IpAllocationType]] = None)func NewIpAllocation(ctx *Context, name string, args IpAllocationArgs, opts ...ResourceOption) (*IpAllocation, error)public IpAllocation(string name, IpAllocationArgs args, CustomResourceOptions? opts = null)
public IpAllocation(String name, IpAllocationArgs args)
public IpAllocation(String name, IpAllocationArgs args, CustomResourceOptions options)
type: azure-native:network:IpAllocation
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args IpAllocationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args IpAllocationArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args IpAllocationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args IpAllocationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args IpAllocationArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var ipAllocationResource = new AzureNative.Network.IpAllocation("ipAllocationResource", new()
{
    ResourceGroupName = "string",
    AllocationTags = 
    {
        { "string", "string" },
    },
    Id = "string",
    IpAllocationName = "string",
    IpamAllocationId = "string",
    Location = "string",
    Prefix = "string",
    PrefixLength = 0,
    PrefixType = "string",
    Tags = 
    {
        { "string", "string" },
    },
    Type = "string",
});
example, err := network.NewIpAllocation(ctx, "ipAllocationResource", &network.IpAllocationArgs{
	ResourceGroupName: pulumi.String("string"),
	AllocationTags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Id:               pulumi.String("string"),
	IpAllocationName: pulumi.String("string"),
	IpamAllocationId: pulumi.String("string"),
	Location:         pulumi.String("string"),
	Prefix:           pulumi.String("string"),
	PrefixLength:     pulumi.Int(0),
	PrefixType:       pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Type: pulumi.String("string"),
})
var ipAllocationResource = new IpAllocation("ipAllocationResource", IpAllocationArgs.builder()
    .resourceGroupName("string")
    .allocationTags(Map.of("string", "string"))
    .id("string")
    .ipAllocationName("string")
    .ipamAllocationId("string")
    .location("string")
    .prefix("string")
    .prefixLength(0)
    .prefixType("string")
    .tags(Map.of("string", "string"))
    .type("string")
    .build());
ip_allocation_resource = azure_native.network.IpAllocation("ipAllocationResource",
    resource_group_name="string",
    allocation_tags={
        "string": "string",
    },
    id="string",
    ip_allocation_name="string",
    ipam_allocation_id="string",
    location="string",
    prefix="string",
    prefix_length=0,
    prefix_type="string",
    tags={
        "string": "string",
    },
    type="string")
const ipAllocationResource = new azure_native.network.IpAllocation("ipAllocationResource", {
    resourceGroupName: "string",
    allocationTags: {
        string: "string",
    },
    id: "string",
    ipAllocationName: "string",
    ipamAllocationId: "string",
    location: "string",
    prefix: "string",
    prefixLength: 0,
    prefixType: "string",
    tags: {
        string: "string",
    },
    type: "string",
});
type: azure-native:network:IpAllocation
properties:
    allocationTags:
        string: string
    id: string
    ipAllocationName: string
    ipamAllocationId: string
    location: string
    prefix: string
    prefixLength: 0
    prefixType: string
    resourceGroupName: string
    tags:
        string: string
    type: string
IpAllocation Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The IpAllocation resource accepts the following input properties:
- ResourceGroup stringName 
- The name of the resource group.
- Dictionary<string, string>
- IpAllocation tags.
- Id string
- Resource ID.
- IpAllocation stringName 
- The name of the IpAllocation.
- IpamAllocation stringId 
- The IPAM allocation ID.
- Location string
- Resource location.
- Prefix string
- The address prefix for the IpAllocation.
- PrefixLength int
- The address prefix length for the IpAllocation.
- PrefixType string | Pulumi.Azure Native. Network. IPVersion 
- The address prefix Type for the IpAllocation.
- Dictionary<string, string>
- Resource tags.
- Type
string | Pulumi.Azure Native. Network. Ip Allocation Type 
- The type for the IpAllocation.
- ResourceGroup stringName 
- The name of the resource group.
- map[string]string
- IpAllocation tags.
- Id string
- Resource ID.
- IpAllocation stringName 
- The name of the IpAllocation.
- IpamAllocation stringId 
- The IPAM allocation ID.
- Location string
- Resource location.
- Prefix string
- The address prefix for the IpAllocation.
- PrefixLength int
- The address prefix length for the IpAllocation.
- PrefixType string | IPVersion
- The address prefix Type for the IpAllocation.
- map[string]string
- Resource tags.
- Type
string | IpAllocation Type 
- The type for the IpAllocation.
- resourceGroup StringName 
- The name of the resource group.
- Map<String,String>
- IpAllocation tags.
- id String
- Resource ID.
- ipAllocation StringName 
- The name of the IpAllocation.
- ipamAllocation StringId 
- The IPAM allocation ID.
- location String
- Resource location.
- prefix String
- The address prefix for the IpAllocation.
- prefixLength Integer
- The address prefix length for the IpAllocation.
- prefixType String | IPVersion
- The address prefix Type for the IpAllocation.
- Map<String,String>
- Resource tags.
- type
String | IpAllocation Type 
- The type for the IpAllocation.
- resourceGroup stringName 
- The name of the resource group.
- {[key: string]: string}
- IpAllocation tags.
- id string
- Resource ID.
- ipAllocation stringName 
- The name of the IpAllocation.
- ipamAllocation stringId 
- The IPAM allocation ID.
- location string
- Resource location.
- prefix string
- The address prefix for the IpAllocation.
- prefixLength number
- The address prefix length for the IpAllocation.
- prefixType string | IPVersion
- The address prefix Type for the IpAllocation.
- {[key: string]: string}
- Resource tags.
- type
string | IpAllocation Type 
- The type for the IpAllocation.
- resource_group_ strname 
- The name of the resource group.
- Mapping[str, str]
- IpAllocation tags.
- id str
- Resource ID.
- ip_allocation_ strname 
- The name of the IpAllocation.
- ipam_allocation_ strid 
- The IPAM allocation ID.
- location str
- Resource location.
- prefix str
- The address prefix for the IpAllocation.
- prefix_length int
- The address prefix length for the IpAllocation.
- prefix_type str | IPVersion
- The address prefix Type for the IpAllocation.
- Mapping[str, str]
- Resource tags.
- type
str | IpAllocation Type 
- The type for the IpAllocation.
- resourceGroup StringName 
- The name of the resource group.
- Map<String>
- IpAllocation tags.
- id String
- Resource ID.
- ipAllocation StringName 
- The name of the IpAllocation.
- ipamAllocation StringId 
- The IPAM allocation ID.
- location String
- Resource location.
- prefix String
- The address prefix for the IpAllocation.
- prefixLength Number
- The address prefix length for the IpAllocation.
- prefixType String | "IPv4" | "IPv6"
- The address prefix Type for the IpAllocation.
- Map<String>
- Resource tags.
- type String | "Undefined" | "Hypernet"
- The type for the IpAllocation.
Outputs
All input properties are implicitly available as output properties. Additionally, the IpAllocation resource produces the following output properties:
- Etag string
- A unique read-only string that changes whenever the resource is updated.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Resource name.
- Subnet
Pulumi.Azure Native. Network. Outputs. Sub Resource Response 
- The Subnet that using the prefix of this IpAllocation resource.
- VirtualNetwork Pulumi.Azure Native. Network. Outputs. Sub Resource Response 
- The VirtualNetwork that using the prefix of this IpAllocation resource.
- Etag string
- A unique read-only string that changes whenever the resource is updated.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Resource name.
- Subnet
SubResource Response 
- The Subnet that using the prefix of this IpAllocation resource.
- VirtualNetwork SubResource Response 
- The VirtualNetwork that using the prefix of this IpAllocation resource.
- etag String
- A unique read-only string that changes whenever the resource is updated.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Resource name.
- subnet
SubResource Response 
- The Subnet that using the prefix of this IpAllocation resource.
- virtualNetwork SubResource Response 
- The VirtualNetwork that using the prefix of this IpAllocation resource.
- etag string
- A unique read-only string that changes whenever the resource is updated.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- Resource name.
- subnet
SubResource Response 
- The Subnet that using the prefix of this IpAllocation resource.
- virtualNetwork SubResource Response 
- The VirtualNetwork that using the prefix of this IpAllocation resource.
- etag str
- A unique read-only string that changes whenever the resource is updated.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- Resource name.
- subnet
SubResource Response 
- The Subnet that using the prefix of this IpAllocation resource.
- virtual_network SubResource Response 
- The VirtualNetwork that using the prefix of this IpAllocation resource.
- etag String
- A unique read-only string that changes whenever the resource is updated.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Resource name.
- subnet Property Map
- The Subnet that using the prefix of this IpAllocation resource.
- virtualNetwork Property Map
- The VirtualNetwork that using the prefix of this IpAllocation resource.
Supporting Types
IPVersion, IPVersionArgs  
- IPv4
- IPv4
- IPv6
- IPv6
- IPVersionIPv4 
- IPv4
- IPVersionIPv6 
- IPv6
- IPv4
- IPv4
- IPv6
- IPv6
- IPv4
- IPv4
- IPv6
- IPv6
- I_PV4
- IPv4
- I_PV6
- IPv6
- "IPv4"
- IPv4
- "IPv6"
- IPv6
IpAllocationType, IpAllocationTypeArgs      
- Undefined
- Undefined
- Hypernet
- Hypernet
- IpAllocation Type Undefined 
- Undefined
- IpAllocation Type Hypernet 
- Hypernet
- Undefined
- Undefined
- Hypernet
- Hypernet
- Undefined
- Undefined
- Hypernet
- Hypernet
- UNDEFINED
- Undefined
- HYPERNET
- Hypernet
- "Undefined"
- Undefined
- "Hypernet"
- Hypernet
SubResourceResponse, SubResourceResponseArgs      
- Id string
- Resource ID.
- Id string
- Resource ID.
- id String
- Resource ID.
- id string
- Resource ID.
- id str
- Resource ID.
- id String
- Resource ID.
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:network:IpAllocation test-ipallocation /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName} 
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0