Custom IPPrefix Args
data class CustomIPPrefixArgs(val cidr: Output<String>? = null, val commissionedState: Output<Either<String, CommissionedState>>? = null, val customIpPrefixName: Output<String>? = null, val extendedLocation: Output<ExtendedLocationArgs>? = null, val id: Output<String>? = null, val location: Output<String>? = null, val resourceGroupName: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val zones: Output<List<String>>? = null) : ConvertibleToJava<CustomIPPrefixArgs>
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",
});
});
Content copied to clipboard
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
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
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
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(cidr: Output<String>? = null, commissionedState: Output<Either<String, CommissionedState>>? = null, customIpPrefixName: Output<String>? = null, extendedLocation: Output<ExtendedLocationArgs>? = null, id: Output<String>? = null, location: Output<String>? = null, resourceGroupName: Output<String>? = null, tags: Output<Map<String, String>>? = null, zones: Output<List<String>>? = null)