1. Packages
  2. Azure Native v1
  3. API Docs
  4. network
  5. IpAllocation
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi

azure-native.network.IpAllocation

Explore with Pulumi AI

These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi

IpAllocation resource. API Version: 2020-11-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 = "Hypernet",
    });

});
Copy
package main

import (
	network "github.com/pulumi/pulumi-azure-native-sdk/network"
	"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("Hypernet"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
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());

    }
}
Copy
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: "Hypernet",
});
Copy
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="Hypernet")
Copy
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
Copy

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 This property is required. string
The unique name of the resource.
args This property is required. IpAllocationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. IpAllocationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. IpAllocationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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",
});
Copy
example, err := network.NewIpAllocation(ctx, "ipAllocationResource", &network.IpAllocationArgs{
	ResourceGroupName: "string",
	AllocationTags: map[string]interface{}{
		"string": "string",
	},
	Id:               "string",
	IpAllocationName: "string",
	IpamAllocationId: "string",
	Location:         "string",
	Prefix:           "string",
	PrefixLength:     0,
	PrefixType:       "string",
	Tags: map[string]interface{}{
		"string": "string",
	},
	Type: "string",
})
Copy
var ipAllocationResource = new IpAllocation("ipAllocationResource", IpAllocationArgs.builder()
    .resourceGroupName("string")
    .allocationTags(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    .id("string")
    .ipAllocationName("string")
    .ipamAllocationId("string")
    .location("string")
    .prefix("string")
    .prefixLength(0)
    .prefixType("string")
    .tags(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    .type("string")
    .build());
Copy
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)
Copy
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",
});
Copy
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
Copy

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:

ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
AllocationTags Dictionary<string, string>
IpAllocation tags.
Id string
Resource ID.
IpAllocationName Changes to this property will trigger replacement. string
The name of the IpAllocation.
IpamAllocationId string
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.AzureNative.Network.IPVersion
The address prefix Type for the IpAllocation.
Tags Dictionary<string, string>
Resource tags.
Type string | Pulumi.AzureNative.Network.IpAllocationType
The type for the IpAllocation.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
AllocationTags map[string]string
IpAllocation tags.
Id string
Resource ID.
IpAllocationName Changes to this property will trigger replacement. string
The name of the IpAllocation.
IpamAllocationId string
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.
Tags map[string]string
Resource tags.
Type string | IpAllocationType
The type for the IpAllocation.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group.
allocationTags Map<String,String>
IpAllocation tags.
id String
Resource ID.
ipAllocationName Changes to this property will trigger replacement. String
The name of the IpAllocation.
ipamAllocationId String
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.
tags Map<String,String>
Resource tags.
type String | IpAllocationType
The type for the IpAllocation.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
allocationTags {[key: string]: string}
IpAllocation tags.
id string
Resource ID.
ipAllocationName Changes to this property will trigger replacement. string
The name of the IpAllocation.
ipamAllocationId string
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.
tags {[key: string]: string}
Resource tags.
type string | IpAllocationType
The type for the IpAllocation.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group.
allocation_tags Mapping[str, str]
IpAllocation tags.
id str
Resource ID.
ip_allocation_name Changes to this property will trigger replacement. str
The name of the IpAllocation.
ipam_allocation_id str
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.
tags Mapping[str, str]
Resource tags.
type str | IpAllocationType
The type for the IpAllocation.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group.
allocationTags Map<String>
IpAllocation tags.
id String
Resource ID.
ipAllocationName Changes to this property will trigger replacement. String
The name of the IpAllocation.
ipamAllocationId String
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.
tags 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.AzureNative.Network.Outputs.SubResourceResponse
The Subnet that using the prefix of this IpAllocation resource.
VirtualNetwork Pulumi.AzureNative.Network.Outputs.SubResourceResponse
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 SubResourceResponse
The Subnet that using the prefix of this IpAllocation resource.
VirtualNetwork SubResourceResponse
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 SubResourceResponse
The Subnet that using the prefix of this IpAllocation resource.
virtualNetwork SubResourceResponse
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 SubResourceResponse
The Subnet that using the prefix of this IpAllocation resource.
virtualNetwork SubResourceResponse
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 SubResourceResponse
The Subnet that using the prefix of this IpAllocation resource.
virtual_network SubResourceResponse
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
IpAllocationTypeUndefined
Undefined
IpAllocationTypeHypernet
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/subid/resourceGroups/rg1/providers/Microsoft.Network/IpAllocations/test-ipallocation 
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
azure-native-v1 pulumi/pulumi-azure-native
License
Apache-2.0
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi