azure-native.network.CustomIPPrefix
Explore with Pulumi AI
Custom IP prefix resource. API Version: 2020-11-01.
Example Usage
Create custom IP prefix allocation method
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var customIPPrefix = new AzureNative.Network.CustomIPPrefix("customIPPrefix", new()
{
Cidr = "0.0.0.0/24",
CustomIpPrefixName = "test-customipprefix",
Location = "westus",
ResourceGroupName = "rg1",
});
});
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.NewCustomIPPrefix(ctx, "customIPPrefix", &network.CustomIPPrefixArgs{
Cidr: pulumi.String("0.0.0.0/24"),
CustomIpPrefixName: pulumi.String("test-customipprefix"),
Location: pulumi.String("westus"),
ResourceGroupName: pulumi.String("rg1"),
})
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.CustomIPPrefix;
import com.pulumi.azurenative.network.CustomIPPrefixArgs;
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 customIPPrefix = new CustomIPPrefix("customIPPrefix", CustomIPPrefixArgs.builder()
.cidr("0.0.0.0/24")
.customIpPrefixName("test-customipprefix")
.location("westus")
.resourceGroupName("rg1")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
custom_ip_prefix = azure_native.network.CustomIPPrefix("customIPPrefix",
cidr="0.0.0.0/24",
custom_ip_prefix_name="test-customipprefix",
location="westus",
resource_group_name="rg1")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const customIPPrefix = new azure_native.network.CustomIPPrefix("customIPPrefix", {
cidr: "0.0.0.0/24",
customIpPrefixName: "test-customipprefix",
location: "westus",
resourceGroupName: "rg1",
});
resources:
customIPPrefix:
type: azure-native:network:CustomIPPrefix
properties:
cidr: 0.0.0.0/24
customIpPrefixName: test-customipprefix
location: westus
resourceGroupName: rg1
Create CustomIPPrefix Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CustomIPPrefix(name: string, args: CustomIPPrefixArgs, opts?: CustomResourceOptions);
@overload
def CustomIPPrefix(resource_name: str,
args: CustomIPPrefixArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CustomIPPrefix(resource_name: str,
opts: Optional[ResourceOptions] = None,
resource_group_name: Optional[str] = None,
cidr: Optional[str] = None,
commissioned_state: Optional[Union[str, CommissionedState]] = None,
custom_ip_prefix_name: Optional[str] = None,
extended_location: Optional[ExtendedLocationArgs] = None,
id: Optional[str] = None,
location: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
zones: Optional[Sequence[str]] = None)
func NewCustomIPPrefix(ctx *Context, name string, args CustomIPPrefixArgs, opts ...ResourceOption) (*CustomIPPrefix, error)
public CustomIPPrefix(string name, CustomIPPrefixArgs args, CustomResourceOptions? opts = null)
public CustomIPPrefix(String name, CustomIPPrefixArgs args)
public CustomIPPrefix(String name, CustomIPPrefixArgs args, CustomResourceOptions options)
type: azure-native:network:CustomIPPrefix
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 CustomIPPrefixArgs
- 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 CustomIPPrefixArgs
- 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 CustomIPPrefixArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CustomIPPrefixArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CustomIPPrefixArgs
- 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 customIPPrefixResource = new AzureNative.Network.CustomIPPrefix("customIPPrefixResource", new()
{
ResourceGroupName = "string",
Cidr = "string",
CommissionedState = "string",
CustomIpPrefixName = "string",
ExtendedLocation =
{
{ "name", "string" },
{ "type", "string" },
},
Id = "string",
Location = "string",
Tags =
{
{ "string", "string" },
},
Zones = new[]
{
"string",
},
});
example, err := network.NewCustomIPPrefix(ctx, "customIPPrefixResource", &network.CustomIPPrefixArgs{
ResourceGroupName: "string",
Cidr: "string",
CommissionedState: "string",
CustomIpPrefixName: "string",
ExtendedLocation: map[string]interface{}{
"name": "string",
"type": "string",
},
Id: "string",
Location: "string",
Tags: map[string]interface{}{
"string": "string",
},
Zones: []string{
"string",
},
})
var customIPPrefixResource = new CustomIPPrefix("customIPPrefixResource", CustomIPPrefixArgs.builder()
.resourceGroupName("string")
.cidr("string")
.commissionedState("string")
.customIpPrefixName("string")
.extendedLocation(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.id("string")
.location("string")
.tags(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.zones("string")
.build());
custom_ip_prefix_resource = azure_native.network.CustomIPPrefix("customIPPrefixResource",
resource_group_name=string,
cidr=string,
commissioned_state=string,
custom_ip_prefix_name=string,
extended_location={
name: string,
type: string,
},
id=string,
location=string,
tags={
string: string,
},
zones=[string])
const customIPPrefixResource = new azure_native.network.CustomIPPrefix("customIPPrefixResource", {
resourceGroupName: "string",
cidr: "string",
commissionedState: "string",
customIpPrefixName: "string",
extendedLocation: {
name: "string",
type: "string",
},
id: "string",
location: "string",
tags: {
string: "string",
},
zones: ["string"],
});
type: azure-native:network:CustomIPPrefix
properties:
cidr: string
commissionedState: string
customIpPrefixName: string
extendedLocation:
name: string
type: string
id: string
location: string
resourceGroupName: string
tags:
string: string
zones:
- string
CustomIPPrefix Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The CustomIPPrefix resource accepts the following input properties:
- Resource
Group stringName - The name of the resource group.
- Cidr string
- The prefix range in CIDR notation. Should include the start address and the prefix length.
- Commissioned
State string | Pulumi.Azure Native. Network. Commissioned State - The commissioned state of the Custom IP Prefix.
- Custom
Ip stringPrefix Name - The name of the custom IP prefix.
- Extended
Location Pulumi.Azure Native. Network. Inputs. Extended Location - The extended location of the custom IP prefix.
- Id string
- Resource ID.
- Location string
- Resource location.
- Dictionary<string, string>
- Resource tags.
- Zones List<string>
- A list of availability zones denoting the IP allocated for the resource needs to come from.
- Resource
Group stringName - The name of the resource group.
- Cidr string
- The prefix range in CIDR notation. Should include the start address and the prefix length.
- Commissioned
State string | CommissionedState - The commissioned state of the Custom IP Prefix.
- Custom
Ip stringPrefix Name - The name of the custom IP prefix.
- Extended
Location ExtendedLocation Args - The extended location of the custom IP prefix.
- Id string
- Resource ID.
- Location string
- Resource location.
- map[string]string
- Resource tags.
- Zones []string
- A list of availability zones denoting the IP allocated for the resource needs to come from.
- resource
Group StringName - The name of the resource group.
- cidr String
- The prefix range in CIDR notation. Should include the start address and the prefix length.
- commissioned
State String | CommissionedState - The commissioned state of the Custom IP Prefix.
- custom
Ip StringPrefix Name - The name of the custom IP prefix.
- extended
Location ExtendedLocation - The extended location of the custom IP prefix.
- id String
- Resource ID.
- location String
- Resource location.
- Map<String,String>
- Resource tags.
- zones List<String>
- A list of availability zones denoting the IP allocated for the resource needs to come from.
- resource
Group stringName - The name of the resource group.
- cidr string
- The prefix range in CIDR notation. Should include the start address and the prefix length.
- commissioned
State string | CommissionedState - The commissioned state of the Custom IP Prefix.
- custom
Ip stringPrefix Name - The name of the custom IP prefix.
- extended
Location ExtendedLocation - The extended location of the custom IP prefix.
- id string
- Resource ID.
- location string
- Resource location.
- {[key: string]: string}
- Resource tags.
- zones string[]
- A list of availability zones denoting the IP allocated for the resource needs to come from.
- resource_
group_ strname - The name of the resource group.
- cidr str
- The prefix range in CIDR notation. Should include the start address and the prefix length.
- commissioned_
state str | CommissionedState - The commissioned state of the Custom IP Prefix.
- custom_
ip_ strprefix_ name - The name of the custom IP prefix.
- extended_
location ExtendedLocation Args - The extended location of the custom IP prefix.
- id str
- Resource ID.
- location str
- Resource location.
- Mapping[str, str]
- Resource tags.
- zones Sequence[str]
- A list of availability zones denoting the IP allocated for the resource needs to come from.
- resource
Group StringName - The name of the resource group.
- cidr String
- The prefix range in CIDR notation. Should include the start address and the prefix length.
- commissioned
State String | "Provisioning" | "Provisioned" | "Commissioning" | "Commissioned" | "Decommissioning" | "Deprovisioning" - The commissioned state of the Custom IP Prefix.
- custom
Ip StringPrefix Name - The name of the custom IP prefix.
- extended
Location Property Map - The extended location of the custom IP prefix.
- id String
- Resource ID.
- location String
- Resource location.
- Map<String>
- Resource tags.
- zones List<String>
- A list of availability zones denoting the IP allocated for the resource needs to come from.
Outputs
All input properties are implicitly available as output properties. Additionally, the CustomIPPrefix 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.
- Provisioning
State string - The provisioning state of the custom IP prefix resource.
- Public
Ip List<Pulumi.Prefixes Azure Native. Network. Outputs. Sub Resource Response> - The list of all referenced PublicIpPrefixes.
- Resource
Guid string - The resource GUID property of the custom IP prefix resource.
- Type string
- Resource type.
- 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.
- Provisioning
State string - The provisioning state of the custom IP prefix resource.
- Public
Ip []SubPrefixes Resource Response - The list of all referenced PublicIpPrefixes.
- Resource
Guid string - The resource GUID property of the custom IP prefix resource.
- Type string
- Resource type.
- 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.
- provisioning
State String - The provisioning state of the custom IP prefix resource.
- public
Ip List<SubPrefixes Resource Response> - The list of all referenced PublicIpPrefixes.
- resource
Guid String - The resource GUID property of the custom IP prefix resource.
- type String
- Resource type.
- 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.
- provisioning
State string - The provisioning state of the custom IP prefix resource.
- public
Ip SubPrefixes Resource Response[] - The list of all referenced PublicIpPrefixes.
- resource
Guid string - The resource GUID property of the custom IP prefix resource.
- type string
- Resource type.
- 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.
- provisioning_
state str - The provisioning state of the custom IP prefix resource.
- public_
ip_ Sequence[Subprefixes Resource Response] - The list of all referenced PublicIpPrefixes.
- resource_
guid str - The resource GUID property of the custom IP prefix resource.
- type str
- Resource type.
- 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.
- provisioning
State String - The provisioning state of the custom IP prefix resource.
- public
Ip List<Property Map>Prefixes - The list of all referenced PublicIpPrefixes.
- resource
Guid String - The resource GUID property of the custom IP prefix resource.
- type String
- Resource type.
Supporting Types
CommissionedState, CommissionedStateArgs
- Provisioning
- Provisioning
- Provisioned
- Provisioned
- Commissioning
- Commissioning
- Commissioned
- Commissioned
- Decommissioning
- Decommissioning
- Deprovisioning
- Deprovisioning
- Commissioned
State Provisioning - Provisioning
- Commissioned
State Provisioned - Provisioned
- Commissioned
State Commissioning - Commissioning
- Commissioned
State Commissioned - Commissioned
- Commissioned
State Decommissioning - Decommissioning
- Commissioned
State Deprovisioning - Deprovisioning
- Provisioning
- Provisioning
- Provisioned
- Provisioned
- Commissioning
- Commissioning
- Commissioned
- Commissioned
- Decommissioning
- Decommissioning
- Deprovisioning
- Deprovisioning
- Provisioning
- Provisioning
- Provisioned
- Provisioned
- Commissioning
- Commissioning
- Commissioned
- Commissioned
- Decommissioning
- Decommissioning
- Deprovisioning
- Deprovisioning
- PROVISIONING
- Provisioning
- PROVISIONED
- Provisioned
- COMMISSIONING
- Commissioning
- COMMISSIONED
- Commissioned
- DECOMMISSIONING
- Decommissioning
- DEPROVISIONING
- Deprovisioning
- "Provisioning"
- Provisioning
- "Provisioned"
- Provisioned
- "Commissioning"
- Commissioning
- "Commissioned"
- Commissioned
- "Decommissioning"
- Decommissioning
- "Deprovisioning"
- Deprovisioning
ExtendedLocation, ExtendedLocationArgs
- Name string
- The name of the extended location.
- Type
string | Pulumi.
Azure Native. Network. Extended Location Types - The type of the extended location.
- Name string
- The name of the extended location.
- Type
string | Extended
Location Types - The type of the extended location.
- name String
- The name of the extended location.
- type
String | Extended
Location Types - The type of the extended location.
- name string
- The name of the extended location.
- type
string | Extended
Location Types - The type of the extended location.
- name str
- The name of the extended location.
- type
str | Extended
Location Types - The type of the extended location.
- name String
- The name of the extended location.
- type
String | "Edge
Zone" - The type of the extended location.
ExtendedLocationResponse, ExtendedLocationResponseArgs
ExtendedLocationTypes, ExtendedLocationTypesArgs
- Edge
Zone - EdgeZone
- Extended
Location Types Edge Zone - EdgeZone
- Edge
Zone - EdgeZone
- Edge
Zone - EdgeZone
- EDGE_ZONE
- EdgeZone
- "Edge
Zone" - EdgeZone
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:CustomIPPrefix test-customipprefix /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/customIpPrefixes/test-customipprefix
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