netaddr.RangeMac
Explore with Pulumi AI
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:
- First
Address string - First assignable address in the range.
- Key
Prefix string - Etcd key prefix for all the keys related to the range.
- Last
Address string - Last assignable address in the range.
- Range
Mac stringId - The ID of this resource.
- First
Address string - First assignable address in the range.
- Key
Prefix string - Etcd key prefix for all the keys related to the range.
- Last
Address string - Last assignable address in the range.
- Range
Mac stringId - The ID of this resource.
- first
Address String - First assignable address in the range.
- key
Prefix String - Etcd key prefix for all the keys related to the range.
- last
Address String - Last assignable address in the range.
- range
Mac StringId - The ID of this resource.
- first
Address string - First assignable address in the range.
- key
Prefix string - Etcd key prefix for all the keys related to the range.
- last
Address string - Last assignable address in the range.
- range
Mac stringId - 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_ strid - The ID of this resource.
- first
Address String - First assignable address in the range.
- key
Prefix String - Etcd key prefix for all the keys related to the range.
- last
Address String - Last assignable address in the range.
- range
Mac StringId - 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.
- First
Address string - First assignable address in the range.
- Key
Prefix string - Etcd key prefix for all the keys related to the range.
- Last
Address string - Last assignable address in the range.
- Range
Mac stringId - The ID of this resource.
- First
Address string - First assignable address in the range.
- Key
Prefix string - Etcd key prefix for all the keys related to the range.
- Last
Address string - Last assignable address in the range.
- Range
Mac stringId - The ID of this resource.
- first
Address String - First assignable address in the range.
- key
Prefix String - Etcd key prefix for all the keys related to the range.
- last
Address String - Last assignable address in the range.
- range
Mac StringId - The ID of this resource.
- first
Address string - First assignable address in the range.
- key
Prefix string - Etcd key prefix for all the keys related to the range.
- last
Address string - Last assignable address in the range.
- range
Mac stringId - 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_ strid - The ID of this resource.
- first
Address String - First assignable address in the range.
- key
Prefix String - Etcd key prefix for all the keys related to the range.
- last
Address String - Last assignable address in the range.
- range
Mac StringId - 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.