1. Packages
  2. Netaddr Provider
  3. API Docs
  4. RangeMac
netaddr 0.5.1 published on Tuesday, Apr 15, 2025 by ferlab-ste-justine

netaddr.RangeMac

Explore with Pulumi AI

netaddr logo
netaddr 0.5.1 published on Tuesday, Apr 15, 2025 by ferlab-ste-justine

    Address range to create mac addresses on.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as netaddr from "@pulumi/netaddr";
    
    const test = new netaddr.RangeMac("test", {
        firstAddress: "52:54:00:00:00:00",
        keyPrefix: "/test/mac/",
        lastAddress: "52:54:00:ff:ff:ff",
    });
    
    import pulumi
    import pulumi_netaddr as netaddr
    
    test = netaddr.RangeMac("test",
        first_address="52:54:00:00:00:00",
        key_prefix="/test/mac/",
        last_address="52:54:00:ff:ff:ff")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/netaddr/netaddr"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := netaddr.NewRangeMac(ctx, "test", &netaddr.RangeMacArgs{
    			FirstAddress: pulumi.String("52:54:00:00:00:00"),
    			KeyPrefix:    pulumi.String("/test/mac/"),
    			LastAddress:  pulumi.String("52:54:00:ff:ff:ff"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Netaddr = Pulumi.Netaddr;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Netaddr.RangeMac("test", new()
        {
            FirstAddress = "52:54:00:00:00:00",
            KeyPrefix = "/test/mac/",
            LastAddress = "52:54:00:ff:ff:ff",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.netaddr.RangeMac;
    import com.pulumi.netaddr.RangeMacArgs;
    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 test = new RangeMac("test", RangeMacArgs.builder()
                .firstAddress("52:54:00:00:00:00")
                .keyPrefix("/test/mac/")
                .lastAddress("52:54:00:ff:ff:ff")
                .build());
    
        }
    }
    
    resources:
      test:
        type: netaddr:RangeMac
        properties:
          firstAddress: 52:54:00:00:00:00
          keyPrefix: /test/mac/
          lastAddress: 52:54:00:ff:ff:ff
    

    Create RangeMac Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new RangeMac(name: string, args: RangeMacArgs, opts?: CustomResourceOptions);
    @overload
    def RangeMac(resource_name: str,
                 args: RangeMacArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def RangeMac(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 first_address: Optional[str] = None,
                 key_prefix: Optional[str] = None,
                 last_address: Optional[str] = None,
                 range_mac_id: Optional[str] = None)
    func NewRangeMac(ctx *Context, name string, args RangeMacArgs, opts ...ResourceOption) (*RangeMac, error)
    public RangeMac(string name, RangeMacArgs args, CustomResourceOptions? opts = null)
    public RangeMac(String name, RangeMacArgs args)
    public RangeMac(String name, RangeMacArgs args, CustomResourceOptions options)
    
    type: netaddr:RangeMac
    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 RangeMacArgs
    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 RangeMacArgs
    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 RangeMacArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RangeMacArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RangeMacArgs
    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 rangeMacResource = new Netaddr.RangeMac("rangeMacResource", new()
    {
        FirstAddress = "string",
        KeyPrefix = "string",
        LastAddress = "string",
        RangeMacId = "string",
    });
    
    example, err := netaddr.NewRangeMac(ctx, "rangeMacResource", &netaddr.RangeMacArgs{
    	FirstAddress: pulumi.String("string"),
    	KeyPrefix:    pulumi.String("string"),
    	LastAddress:  pulumi.String("string"),
    	RangeMacId:   pulumi.String("string"),
    })
    
    var rangeMacResource = new RangeMac("rangeMacResource", RangeMacArgs.builder()
        .firstAddress("string")
        .keyPrefix("string")
        .lastAddress("string")
        .rangeMacId("string")
        .build());
    
    range_mac_resource = netaddr.RangeMac("rangeMacResource",
        first_address="string",
        key_prefix="string",
        last_address="string",
        range_mac_id="string")
    
    const rangeMacResource = new netaddr.RangeMac("rangeMacResource", {
        firstAddress: "string",
        keyPrefix: "string",
        lastAddress: "string",
        rangeMacId: "string",
    });
    
    type: netaddr:RangeMac
    properties:
        firstAddress: string
        keyPrefix: string
        lastAddress: string
        rangeMacId: string
    

    RangeMac 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 RangeMac resource accepts the following input properties:

    FirstAddress string
    First assignable address in the range.
    KeyPrefix string
    Etcd key prefix for all the keys related to the range.
    LastAddress string
    Last assignable address in the range.
    RangeMacId string
    The ID of this resource.
    FirstAddress string
    First assignable address in the range.
    KeyPrefix string
    Etcd key prefix for all the keys related to the range.
    LastAddress string
    Last assignable address in the range.
    RangeMacId string
    The ID of this resource.
    firstAddress String
    First assignable address in the range.
    keyPrefix String
    Etcd key prefix for all the keys related to the range.
    lastAddress String
    Last assignable address in the range.
    rangeMacId String
    The ID of this resource.
    firstAddress string
    First assignable address in the range.
    keyPrefix string
    Etcd key prefix for all the keys related to the range.
    lastAddress string
    Last assignable address in the range.
    rangeMacId string
    The ID of this resource.
    first_address str
    First assignable address in the range.
    key_prefix str
    Etcd key prefix for all the keys related to the range.
    last_address str
    Last assignable address in the range.
    range_mac_id str
    The ID of this resource.
    firstAddress String
    First assignable address in the range.
    keyPrefix String
    Etcd key prefix for all the keys related to the range.
    lastAddress String
    Last assignable address in the range.
    rangeMacId String
    The ID of this resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the RangeMac resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing RangeMac Resource

    Get an existing RangeMac resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: RangeMacState, opts?: CustomResourceOptions): RangeMac
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            first_address: Optional[str] = None,
            key_prefix: Optional[str] = None,
            last_address: Optional[str] = None,
            range_mac_id: Optional[str] = None) -> RangeMac
    func GetRangeMac(ctx *Context, name string, id IDInput, state *RangeMacState, opts ...ResourceOption) (*RangeMac, error)
    public static RangeMac Get(string name, Input<string> id, RangeMacState? state, CustomResourceOptions? opts = null)
    public static RangeMac get(String name, Output<String> id, RangeMacState state, CustomResourceOptions options)
    resources:  _:    type: netaddr:RangeMac    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    FirstAddress string
    First assignable address in the range.
    KeyPrefix string
    Etcd key prefix for all the keys related to the range.
    LastAddress string
    Last assignable address in the range.
    RangeMacId string
    The ID of this resource.
    FirstAddress string
    First assignable address in the range.
    KeyPrefix string
    Etcd key prefix for all the keys related to the range.
    LastAddress string
    Last assignable address in the range.
    RangeMacId string
    The ID of this resource.
    firstAddress String
    First assignable address in the range.
    keyPrefix String
    Etcd key prefix for all the keys related to the range.
    lastAddress String
    Last assignable address in the range.
    rangeMacId String
    The ID of this resource.
    firstAddress string
    First assignable address in the range.
    keyPrefix string
    Etcd key prefix for all the keys related to the range.
    lastAddress string
    Last assignable address in the range.
    rangeMacId string
    The ID of this resource.
    first_address str
    First assignable address in the range.
    key_prefix str
    Etcd key prefix for all the keys related to the range.
    last_address str
    Last assignable address in the range.
    range_mac_id str
    The ID of this resource.
    firstAddress String
    First assignable address in the range.
    keyPrefix String
    Etcd key prefix for all the keys related to the range.
    lastAddress String
    Last assignable address in the range.
    rangeMacId String
    The ID of this resource.

    Package Details

    Repository
    netaddr ferlab-ste-justine/terraform-provider-netaddr
    License
    Notes
    This Pulumi package is based on the netaddr Terraform Provider.
    netaddr logo
    netaddr 0.5.1 published on Tuesday, Apr 15, 2025 by ferlab-ste-justine