netbox.MacAddress
Explore with Pulumi AI
From the official documentation:
A MAC address object in NetBox comprises a single Ethernet link layer address, and represents a MAC address as reported by or assigned to a network interface. MAC addresses can be assigned to device and virtual machine interfaces. A MAC address can be specified as the primary MAC address for a given device or VM interface.
Example Usage
Creating a MAC address that is assigned to a virtual machine interface
With virtual_machine_interface_id
:
import * as pulumi from "@pulumi/pulumi";
import * as netbox from "@pulumi/netbox";
// Assuming a virtual machine with the id `123` exists
const thisInterface = new netbox.Interface("thisInterface", {virtualMachineId: 123});
const thisMacAddress = new netbox.MacAddress("thisMacAddress", {
macAddress: "00:1A:2B:3C:4D:5E",
virtualMachineInterfaceId: thisInterface.interfaceId,
});
import pulumi
import pulumi_netbox as netbox
# Assuming a virtual machine with the id `123` exists
this_interface = netbox.Interface("thisInterface", virtual_machine_id=123)
this_mac_address = netbox.MacAddress("thisMacAddress",
mac_address="00:1A:2B:3C:4D:5E",
virtual_machine_interface_id=this_interface.interface_id)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/netbox/v4/netbox"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Assuming a virtual machine with the id `123` exists
thisInterface, err := netbox.NewInterface(ctx, "thisInterface", &netbox.InterfaceArgs{
VirtualMachineId: pulumi.Float64(123),
})
if err != nil {
return err
}
_, err = netbox.NewMacAddress(ctx, "thisMacAddress", &netbox.MacAddressArgs{
MacAddress: pulumi.String("00:1A:2B:3C:4D:5E"),
VirtualMachineInterfaceId: thisInterface.InterfaceId,
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Netbox = Pulumi.Netbox;
return await Deployment.RunAsync(() =>
{
// Assuming a virtual machine with the id `123` exists
var thisInterface = new Netbox.Interface("thisInterface", new()
{
VirtualMachineId = 123,
});
var thisMacAddress = new Netbox.MacAddress("thisMacAddress", new()
{
MacAddress = "00:1A:2B:3C:4D:5E",
VirtualMachineInterfaceId = thisInterface.InterfaceId,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.netbox.Interface;
import com.pulumi.netbox.InterfaceArgs;
import com.pulumi.netbox.MacAddress;
import com.pulumi.netbox.MacAddressArgs;
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) {
// Assuming a virtual machine with the id `123` exists
var thisInterface = new Interface("thisInterface", InterfaceArgs.builder()
.virtualMachineId(123)
.build());
var thisMacAddress = new MacAddress("thisMacAddress", MacAddressArgs.builder()
.macAddress("00:1A:2B:3C:4D:5E")
.virtualMachineInterfaceId(thisInterface.interfaceId())
.build());
}
}
resources:
# Assuming a virtual machine with the id `123` exists
thisInterface:
type: netbox:Interface
properties:
virtualMachineId: 123
thisMacAddress:
type: netbox:MacAddress
properties:
macAddress: 00:1A:2B:3C:4D:5E
virtualMachineInterfaceId: ${thisInterface.interfaceId}
With object_type
and interface_id
:
import * as pulumi from "@pulumi/pulumi";
import * as netbox from "@pulumi/netbox";
// Assuming a virtual machine with the id `123` exists
const thisInterface = new netbox.Interface("thisInterface", {virtualMachineId: 123});
const thisMacAddress = new netbox.MacAddress("thisMacAddress", {
macAddress: "00:1A:2B:3C:4D:5E",
interfaceId: thisInterface.interfaceId,
objectType: "virtualization.vminterface",
});
import pulumi
import pulumi_netbox as netbox
# Assuming a virtual machine with the id `123` exists
this_interface = netbox.Interface("thisInterface", virtual_machine_id=123)
this_mac_address = netbox.MacAddress("thisMacAddress",
mac_address="00:1A:2B:3C:4D:5E",
interface_id=this_interface.interface_id,
object_type="virtualization.vminterface")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/netbox/v4/netbox"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Assuming a virtual machine with the id `123` exists
thisInterface, err := netbox.NewInterface(ctx, "thisInterface", &netbox.InterfaceArgs{
VirtualMachineId: pulumi.Float64(123),
})
if err != nil {
return err
}
_, err = netbox.NewMacAddress(ctx, "thisMacAddress", &netbox.MacAddressArgs{
MacAddress: pulumi.String("00:1A:2B:3C:4D:5E"),
InterfaceId: thisInterface.InterfaceId,
ObjectType: pulumi.String("virtualization.vminterface"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Netbox = Pulumi.Netbox;
return await Deployment.RunAsync(() =>
{
// Assuming a virtual machine with the id `123` exists
var thisInterface = new Netbox.Interface("thisInterface", new()
{
VirtualMachineId = 123,
});
var thisMacAddress = new Netbox.MacAddress("thisMacAddress", new()
{
MacAddress = "00:1A:2B:3C:4D:5E",
InterfaceId = thisInterface.InterfaceId,
ObjectType = "virtualization.vminterface",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.netbox.Interface;
import com.pulumi.netbox.InterfaceArgs;
import com.pulumi.netbox.MacAddress;
import com.pulumi.netbox.MacAddressArgs;
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) {
// Assuming a virtual machine with the id `123` exists
var thisInterface = new Interface("thisInterface", InterfaceArgs.builder()
.virtualMachineId(123)
.build());
var thisMacAddress = new MacAddress("thisMacAddress", MacAddressArgs.builder()
.macAddress("00:1A:2B:3C:4D:5E")
.interfaceId(thisInterface.interfaceId())
.objectType("virtualization.vminterface")
.build());
}
}
resources:
# Assuming a virtual machine with the id `123` exists
thisInterface:
type: netbox:Interface
properties:
virtualMachineId: 123
thisMacAddress:
type: netbox:MacAddress
properties:
macAddress: 00:1A:2B:3C:4D:5E
interfaceId: ${thisInterface.interfaceId}
objectType: virtualization.vminterface
Creating a MAC address that is assigned to a device interface
With device_interface_id
:
import * as pulumi from "@pulumi/pulumi";
import * as netbox from "@pulumi/netbox";
// Assuming a device with the id `123` exists
const thisDeviceInterface = new netbox.DeviceInterface("thisDeviceInterface", {
deviceId: 123,
type: "1000base-t",
});
const thisMacAddress = new netbox.MacAddress("thisMacAddress", {
macAddress: "00:1A:2B:3C:4D:5E",
deviceInterfaceId: thisDeviceInterface.deviceInterfaceId,
});
import pulumi
import pulumi_netbox as netbox
# Assuming a device with the id `123` exists
this_device_interface = netbox.DeviceInterface("thisDeviceInterface",
device_id=123,
type="1000base-t")
this_mac_address = netbox.MacAddress("thisMacAddress",
mac_address="00:1A:2B:3C:4D:5E",
device_interface_id=this_device_interface.device_interface_id)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/netbox/v4/netbox"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Assuming a device with the id `123` exists
thisDeviceInterface, err := netbox.NewDeviceInterface(ctx, "thisDeviceInterface", &netbox.DeviceInterfaceArgs{
DeviceId: pulumi.Float64(123),
Type: pulumi.String("1000base-t"),
})
if err != nil {
return err
}
_, err = netbox.NewMacAddress(ctx, "thisMacAddress", &netbox.MacAddressArgs{
MacAddress: pulumi.String("00:1A:2B:3C:4D:5E"),
DeviceInterfaceId: thisDeviceInterface.DeviceInterfaceId,
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Netbox = Pulumi.Netbox;
return await Deployment.RunAsync(() =>
{
// Assuming a device with the id `123` exists
var thisDeviceInterface = new Netbox.DeviceInterface("thisDeviceInterface", new()
{
DeviceId = 123,
Type = "1000base-t",
});
var thisMacAddress = new Netbox.MacAddress("thisMacAddress", new()
{
MacAddress = "00:1A:2B:3C:4D:5E",
DeviceInterfaceId = thisDeviceInterface.DeviceInterfaceId,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.netbox.DeviceInterface;
import com.pulumi.netbox.DeviceInterfaceArgs;
import com.pulumi.netbox.MacAddress;
import com.pulumi.netbox.MacAddressArgs;
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) {
// Assuming a device with the id `123` exists
var thisDeviceInterface = new DeviceInterface("thisDeviceInterface", DeviceInterfaceArgs.builder()
.deviceId(123)
.type("1000base-t")
.build());
var thisMacAddress = new MacAddress("thisMacAddress", MacAddressArgs.builder()
.macAddress("00:1A:2B:3C:4D:5E")
.deviceInterfaceId(thisDeviceInterface.deviceInterfaceId())
.build());
}
}
resources:
# Assuming a device with the id `123` exists
thisDeviceInterface:
type: netbox:DeviceInterface
properties:
deviceId: 123
type: 1000base-t
thisMacAddress:
type: netbox:MacAddress
properties:
macAddress: 00:1A:2B:3C:4D:5E
deviceInterfaceId: ${thisDeviceInterface.deviceInterfaceId}
With object_type
and interface_id
:
import * as pulumi from "@pulumi/pulumi";
import * as netbox from "@pulumi/netbox";
// Assuming a device with the id `123` exists
const thisDeviceInterface = new netbox.DeviceInterface("thisDeviceInterface", {
deviceId: 123,
type: "1000base-t",
});
const thisMacAddress = new netbox.MacAddress("thisMacAddress", {
macAddress: "00:1A:2B:3C:4D:5E",
interfaceId: thisDeviceInterface.deviceInterfaceId,
objectType: "dcim.interface",
});
import pulumi
import pulumi_netbox as netbox
# Assuming a device with the id `123` exists
this_device_interface = netbox.DeviceInterface("thisDeviceInterface",
device_id=123,
type="1000base-t")
this_mac_address = netbox.MacAddress("thisMacAddress",
mac_address="00:1A:2B:3C:4D:5E",
interface_id=this_device_interface.device_interface_id,
object_type="dcim.interface")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/netbox/v4/netbox"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Assuming a device with the id `123` exists
thisDeviceInterface, err := netbox.NewDeviceInterface(ctx, "thisDeviceInterface", &netbox.DeviceInterfaceArgs{
DeviceId: pulumi.Float64(123),
Type: pulumi.String("1000base-t"),
})
if err != nil {
return err
}
_, err = netbox.NewMacAddress(ctx, "thisMacAddress", &netbox.MacAddressArgs{
MacAddress: pulumi.String("00:1A:2B:3C:4D:5E"),
InterfaceId: thisDeviceInterface.DeviceInterfaceId,
ObjectType: pulumi.String("dcim.interface"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Netbox = Pulumi.Netbox;
return await Deployment.RunAsync(() =>
{
// Assuming a device with the id `123` exists
var thisDeviceInterface = new Netbox.DeviceInterface("thisDeviceInterface", new()
{
DeviceId = 123,
Type = "1000base-t",
});
var thisMacAddress = new Netbox.MacAddress("thisMacAddress", new()
{
MacAddress = "00:1A:2B:3C:4D:5E",
InterfaceId = thisDeviceInterface.DeviceInterfaceId,
ObjectType = "dcim.interface",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.netbox.DeviceInterface;
import com.pulumi.netbox.DeviceInterfaceArgs;
import com.pulumi.netbox.MacAddress;
import com.pulumi.netbox.MacAddressArgs;
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) {
// Assuming a device with the id `123` exists
var thisDeviceInterface = new DeviceInterface("thisDeviceInterface", DeviceInterfaceArgs.builder()
.deviceId(123)
.type("1000base-t")
.build());
var thisMacAddress = new MacAddress("thisMacAddress", MacAddressArgs.builder()
.macAddress("00:1A:2B:3C:4D:5E")
.interfaceId(thisDeviceInterface.deviceInterfaceId())
.objectType("dcim.interface")
.build());
}
}
resources:
# Assuming a device with the id `123` exists
thisDeviceInterface:
type: netbox:DeviceInterface
properties:
deviceId: 123
type: 1000base-t
thisMacAddress:
type: netbox:MacAddress
properties:
macAddress: 00:1A:2B:3C:4D:5E
interfaceId: ${thisDeviceInterface.deviceInterfaceId}
objectType: dcim.interface
Creating a MAC address that is not assigned to anything
You can create a MAC address that is not assigned to anything by omitting the attributes mentioned above.
import * as pulumi from "@pulumi/pulumi";
import * as netbox from "@pulumi/netbox";
const _this = new netbox.MacAddress("this", {macAddress: "00:1A:2B:3C:4D:5E"});
import pulumi
import pulumi_netbox as netbox
this = netbox.MacAddress("this", mac_address="00:1A:2B:3C:4D:5E")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/netbox/v4/netbox"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := netbox.NewMacAddress(ctx, "this", &netbox.MacAddressArgs{
MacAddress: pulumi.String("00:1A:2B:3C:4D:5E"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Netbox = Pulumi.Netbox;
return await Deployment.RunAsync(() =>
{
var @this = new Netbox.MacAddress("this", new()
{
MacAddress = "00:1A:2B:3C:4D:5E",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.netbox.MacAddress;
import com.pulumi.netbox.MacAddressArgs;
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 this_ = new MacAddress("this", MacAddressArgs.builder()
.macAddress("00:1A:2B:3C:4D:5E")
.build());
}
}
resources:
this:
type: netbox:MacAddress
properties:
macAddress: 00:1A:2B:3C:4D:5E
Create MacAddress Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new MacAddress(name: string, args: MacAddressArgs, opts?: CustomResourceOptions);
@overload
def MacAddress(resource_name: str,
args: MacAddressArgs,
opts: Optional[ResourceOptions] = None)
@overload
def MacAddress(resource_name: str,
opts: Optional[ResourceOptions] = None,
mac_address: Optional[str] = None,
comments: Optional[str] = None,
custom_fields: Optional[Mapping[str, str]] = None,
description: Optional[str] = None,
device_interface_id: Optional[float] = None,
interface_id: Optional[float] = None,
mac_address_id: Optional[str] = None,
object_type: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
virtual_machine_interface_id: Optional[float] = None)
func NewMacAddress(ctx *Context, name string, args MacAddressArgs, opts ...ResourceOption) (*MacAddress, error)
public MacAddress(string name, MacAddressArgs args, CustomResourceOptions? opts = null)
public MacAddress(String name, MacAddressArgs args)
public MacAddress(String name, MacAddressArgs args, CustomResourceOptions options)
type: netbox:MacAddress
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 MacAddressArgs
- 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 MacAddressArgs
- 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 MacAddressArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MacAddressArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MacAddressArgs
- 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 macAddressResource = new Netbox.MacAddress("macAddressResource", new()
{
MacAddress = "string",
Comments = "string",
CustomFields =
{
{ "string", "string" },
},
Description = "string",
DeviceInterfaceId = 0,
InterfaceId = 0,
MacAddressId = "string",
ObjectType = "string",
Tags = new[]
{
"string",
},
VirtualMachineInterfaceId = 0,
});
example, err := netbox.NewMacAddress(ctx, "macAddressResource", &netbox.MacAddressArgs{
MacAddress: pulumi.String("string"),
Comments: pulumi.String("string"),
CustomFields: pulumi.StringMap{
"string": pulumi.String("string"),
},
Description: pulumi.String("string"),
DeviceInterfaceId: pulumi.Float64(0),
InterfaceId: pulumi.Float64(0),
MacAddressId: pulumi.String("string"),
ObjectType: pulumi.String("string"),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
VirtualMachineInterfaceId: pulumi.Float64(0),
})
var macAddressResource = new MacAddress("macAddressResource", MacAddressArgs.builder()
.macAddress("string")
.comments("string")
.customFields(Map.of("string", "string"))
.description("string")
.deviceInterfaceId(0.0)
.interfaceId(0.0)
.macAddressId("string")
.objectType("string")
.tags("string")
.virtualMachineInterfaceId(0.0)
.build());
mac_address_resource = netbox.MacAddress("macAddressResource",
mac_address="string",
comments="string",
custom_fields={
"string": "string",
},
description="string",
device_interface_id=0,
interface_id=0,
mac_address_id="string",
object_type="string",
tags=["string"],
virtual_machine_interface_id=0)
const macAddressResource = new netbox.MacAddress("macAddressResource", {
macAddress: "string",
comments: "string",
customFields: {
string: "string",
},
description: "string",
deviceInterfaceId: 0,
interfaceId: 0,
macAddressId: "string",
objectType: "string",
tags: ["string"],
virtualMachineInterfaceId: 0,
});
type: netbox:MacAddress
properties:
comments: string
customFields:
string: string
description: string
deviceInterfaceId: 0
interfaceId: 0
macAddress: string
macAddressId: string
objectType: string
tags:
- string
virtualMachineInterfaceId: 0
MacAddress 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 MacAddress resource accepts the following input properties:
- Mac
Address string - Comments string
- Custom
Fields Dictionary<string, string> - Description string
- Device
Interface doubleId - Conflicts with
interface_id
andvirtual_machine_interface_id
. - Interface
Id double - Required when
object_type
is set. - Mac
Address stringId - The ID of this resource.
- Object
Type string - Valid values are
virtualization.vminterface
anddcim.interface
. Required wheninterface_id
is set. - List<string>
- Virtual
Machine doubleInterface Id - Conflicts with
interface_id
anddevice_interface_id
.
- Mac
Address string - Comments string
- Custom
Fields map[string]string - Description string
- Device
Interface float64Id - Conflicts with
interface_id
andvirtual_machine_interface_id
. - Interface
Id float64 - Required when
object_type
is set. - Mac
Address stringId - The ID of this resource.
- Object
Type string - Valid values are
virtualization.vminterface
anddcim.interface
. Required wheninterface_id
is set. - []string
- Virtual
Machine float64Interface Id - Conflicts with
interface_id
anddevice_interface_id
.
- mac
Address String - comments String
- custom
Fields Map<String,String> - description String
- device
Interface DoubleId - Conflicts with
interface_id
andvirtual_machine_interface_id
. - interface
Id Double - Required when
object_type
is set. - mac
Address StringId - The ID of this resource.
- object
Type String - Valid values are
virtualization.vminterface
anddcim.interface
. Required wheninterface_id
is set. - List<String>
- virtual
Machine DoubleInterface Id - Conflicts with
interface_id
anddevice_interface_id
.
- mac
Address string - comments string
- custom
Fields {[key: string]: string} - description string
- device
Interface numberId - Conflicts with
interface_id
andvirtual_machine_interface_id
. - interface
Id number - Required when
object_type
is set. - mac
Address stringId - The ID of this resource.
- object
Type string - Valid values are
virtualization.vminterface
anddcim.interface
. Required wheninterface_id
is set. - string[]
- virtual
Machine numberInterface Id - Conflicts with
interface_id
anddevice_interface_id
.
- mac_
address str - comments str
- custom_
fields Mapping[str, str] - description str
- device_
interface_ floatid - Conflicts with
interface_id
andvirtual_machine_interface_id
. - interface_
id float - Required when
object_type
is set. - mac_
address_ strid - The ID of this resource.
- object_
type str - Valid values are
virtualization.vminterface
anddcim.interface
. Required wheninterface_id
is set. - Sequence[str]
- virtual_
machine_ floatinterface_ id - Conflicts with
interface_id
anddevice_interface_id
.
- mac
Address String - comments String
- custom
Fields Map<String> - description String
- device
Interface NumberId - Conflicts with
interface_id
andvirtual_machine_interface_id
. - interface
Id Number - Required when
object_type
is set. - mac
Address StringId - The ID of this resource.
- object
Type String - Valid values are
virtualization.vminterface
anddcim.interface
. Required wheninterface_id
is set. - List<String>
- virtual
Machine NumberInterface Id - Conflicts with
interface_id
anddevice_interface_id
.
Outputs
All input properties are implicitly available as output properties. Additionally, the MacAddress resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- List<string>
- Id string
- The provider-assigned unique ID for this managed resource.
- []string
- id String
- The provider-assigned unique ID for this managed resource.
- List<String>
- id string
- The provider-assigned unique ID for this managed resource.
- string[]
- id str
- The provider-assigned unique ID for this managed resource.
- Sequence[str]
- id String
- The provider-assigned unique ID for this managed resource.
- List<String>
Look up Existing MacAddress Resource
Get an existing MacAddress 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?: MacAddressState, opts?: CustomResourceOptions): MacAddress
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
comments: Optional[str] = None,
custom_fields: Optional[Mapping[str, str]] = None,
description: Optional[str] = None,
device_interface_id: Optional[float] = None,
interface_id: Optional[float] = None,
mac_address: Optional[str] = None,
mac_address_id: Optional[str] = None,
object_type: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
tags_alls: Optional[Sequence[str]] = None,
virtual_machine_interface_id: Optional[float] = None) -> MacAddress
func GetMacAddress(ctx *Context, name string, id IDInput, state *MacAddressState, opts ...ResourceOption) (*MacAddress, error)
public static MacAddress Get(string name, Input<string> id, MacAddressState? state, CustomResourceOptions? opts = null)
public static MacAddress get(String name, Output<String> id, MacAddressState state, CustomResourceOptions options)
resources: _: type: netbox:MacAddress 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.
- Comments string
- Custom
Fields Dictionary<string, string> - Description string
- Device
Interface doubleId - Conflicts with
interface_id
andvirtual_machine_interface_id
. - Interface
Id double - Required when
object_type
is set. - Mac
Address string - Mac
Address stringId - The ID of this resource.
- Object
Type string - Valid values are
virtualization.vminterface
anddcim.interface
. Required wheninterface_id
is set. - List<string>
- List<string>
- Virtual
Machine doubleInterface Id - Conflicts with
interface_id
anddevice_interface_id
.
- Comments string
- Custom
Fields map[string]string - Description string
- Device
Interface float64Id - Conflicts with
interface_id
andvirtual_machine_interface_id
. - Interface
Id float64 - Required when
object_type
is set. - Mac
Address string - Mac
Address stringId - The ID of this resource.
- Object
Type string - Valid values are
virtualization.vminterface
anddcim.interface
. Required wheninterface_id
is set. - []string
- []string
- Virtual
Machine float64Interface Id - Conflicts with
interface_id
anddevice_interface_id
.
- comments String
- custom
Fields Map<String,String> - description String
- device
Interface DoubleId - Conflicts with
interface_id
andvirtual_machine_interface_id
. - interface
Id Double - Required when
object_type
is set. - mac
Address String - mac
Address StringId - The ID of this resource.
- object
Type String - Valid values are
virtualization.vminterface
anddcim.interface
. Required wheninterface_id
is set. - List<String>
- List<String>
- virtual
Machine DoubleInterface Id - Conflicts with
interface_id
anddevice_interface_id
.
- comments string
- custom
Fields {[key: string]: string} - description string
- device
Interface numberId - Conflicts with
interface_id
andvirtual_machine_interface_id
. - interface
Id number - Required when
object_type
is set. - mac
Address string - mac
Address stringId - The ID of this resource.
- object
Type string - Valid values are
virtualization.vminterface
anddcim.interface
. Required wheninterface_id
is set. - string[]
- string[]
- virtual
Machine numberInterface Id - Conflicts with
interface_id
anddevice_interface_id
.
- comments str
- custom_
fields Mapping[str, str] - description str
- device_
interface_ floatid - Conflicts with
interface_id
andvirtual_machine_interface_id
. - interface_
id float - Required when
object_type
is set. - mac_
address str - mac_
address_ strid - The ID of this resource.
- object_
type str - Valid values are
virtualization.vminterface
anddcim.interface
. Required wheninterface_id
is set. - Sequence[str]
- Sequence[str]
- virtual_
machine_ floatinterface_ id - Conflicts with
interface_id
anddevice_interface_id
.
- comments String
- custom
Fields Map<String> - description String
- device
Interface NumberId - Conflicts with
interface_id
andvirtual_machine_interface_id
. - interface
Id Number - Required when
object_type
is set. - mac
Address String - mac
Address StringId - The ID of this resource.
- object
Type String - Valid values are
virtualization.vminterface
anddcim.interface
. Required wheninterface_id
is set. - List<String>
- List<String>
- virtual
Machine NumberInterface Id - Conflicts with
interface_id
anddevice_interface_id
.
Package Details
- Repository
- netbox e-breuninger/terraform-provider-netbox
- License
- Notes
- This Pulumi package is based on the
netbox
Terraform Provider.