1. Packages
  2. Netbox Provider
  3. API Docs
  4. PowerPanel
netbox 3.10.0 published on Monday, Apr 14, 2025 by e-breuninger

netbox.PowerPanel

Explore with Pulumi AI

From the official documentation:

A power panel represents the origin point in NetBox for electrical power being disseminated by one or more power feeds. In a data center environment, one power panel often serves a group of racks, with an individual power feed extending to each rack, though this is not always the case. It is common to have two sets of panels and feeds arranged in parallel to provide redundant power to each rack.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as netbox from "@pulumi/netbox";

const testSite = new netbox.Site("testSite", {status: "active"});
const testLocation = new netbox.Location("testLocation", {siteId: testSite.siteId});
const testPowerPanel = new netbox.PowerPanel("testPowerPanel", {
    siteId: testSite.siteId,
    locationId: testLocation.locationId,
});
Copy
import pulumi
import pulumi_netbox as netbox

test_site = netbox.Site("testSite", status="active")
test_location = netbox.Location("testLocation", site_id=test_site.site_id)
test_power_panel = netbox.PowerPanel("testPowerPanel",
    site_id=test_site.site_id,
    location_id=test_location.location_id)
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/netbox/v3/netbox"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		testSite, err := netbox.NewSite(ctx, "testSite", &netbox.SiteArgs{
			Status: pulumi.String("active"),
		})
		if err != nil {
			return err
		}
		testLocation, err := netbox.NewLocation(ctx, "testLocation", &netbox.LocationArgs{
			SiteId: testSite.SiteId,
		})
		if err != nil {
			return err
		}
		_, err = netbox.NewPowerPanel(ctx, "testPowerPanel", &netbox.PowerPanelArgs{
			SiteId:     testSite.SiteId,
			LocationId: testLocation.LocationId,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Netbox = Pulumi.Netbox;

return await Deployment.RunAsync(() => 
{
    var testSite = new Netbox.Site("testSite", new()
    {
        Status = "active",
    });

    var testLocation = new Netbox.Location("testLocation", new()
    {
        SiteId = testSite.SiteId,
    });

    var testPowerPanel = new Netbox.PowerPanel("testPowerPanel", new()
    {
        SiteId = testSite.SiteId,
        LocationId = testLocation.LocationId,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.netbox.Site;
import com.pulumi.netbox.SiteArgs;
import com.pulumi.netbox.Location;
import com.pulumi.netbox.LocationArgs;
import com.pulumi.netbox.PowerPanel;
import com.pulumi.netbox.PowerPanelArgs;
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 testSite = new Site("testSite", SiteArgs.builder()
            .status("active")
            .build());

        var testLocation = new Location("testLocation", LocationArgs.builder()
            .siteId(testSite.siteId())
            .build());

        var testPowerPanel = new PowerPanel("testPowerPanel", PowerPanelArgs.builder()
            .siteId(testSite.siteId())
            .locationId(testLocation.locationId())
            .build());

    }
}
Copy
resources:
  testSite:
    type: netbox:Site
    properties:
      status: active
  testLocation:
    type: netbox:Location
    properties:
      siteId: ${testSite.siteId}
  testPowerPanel:
    type: netbox:PowerPanel
    properties:
      siteId: ${testSite.siteId}
      locationId: ${testLocation.locationId}
Copy

Create PowerPanel Resource

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

Constructor syntax

new PowerPanel(name: string, args: PowerPanelArgs, opts?: CustomResourceOptions);
@overload
def PowerPanel(resource_name: str,
               args: PowerPanelArgs,
               opts: Optional[ResourceOptions] = None)

@overload
def PowerPanel(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               site_id: Optional[float] = None,
               comments: Optional[str] = None,
               custom_fields: Optional[Mapping[str, str]] = None,
               description: Optional[str] = None,
               location_id: Optional[float] = None,
               name: Optional[str] = None,
               power_panel_id: Optional[str] = None,
               tags: Optional[Sequence[str]] = None)
func NewPowerPanel(ctx *Context, name string, args PowerPanelArgs, opts ...ResourceOption) (*PowerPanel, error)
public PowerPanel(string name, PowerPanelArgs args, CustomResourceOptions? opts = null)
public PowerPanel(String name, PowerPanelArgs args)
public PowerPanel(String name, PowerPanelArgs args, CustomResourceOptions options)
type: netbox:PowerPanel
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. PowerPanelArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. PowerPanelArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. PowerPanelArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. PowerPanelArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. PowerPanelArgs
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 powerPanelResource = new Netbox.PowerPanel("powerPanelResource", new()
{
    SiteId = 0,
    Comments = "string",
    CustomFields = 
    {
        { "string", "string" },
    },
    Description = "string",
    LocationId = 0,
    Name = "string",
    PowerPanelId = "string",
    Tags = new[]
    {
        "string",
    },
});
Copy
example, err := netbox.NewPowerPanel(ctx, "powerPanelResource", &netbox.PowerPanelArgs{
SiteId: pulumi.Float64(0),
Comments: pulumi.String("string"),
CustomFields: pulumi.StringMap{
"string": pulumi.String("string"),
},
Description: pulumi.String("string"),
LocationId: pulumi.Float64(0),
Name: pulumi.String("string"),
PowerPanelId: pulumi.String("string"),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
})
Copy
var powerPanelResource = new PowerPanel("powerPanelResource", PowerPanelArgs.builder()
    .siteId(0)
    .comments("string")
    .customFields(Map.of("string", "string"))
    .description("string")
    .locationId(0)
    .name("string")
    .powerPanelId("string")
    .tags("string")
    .build());
Copy
power_panel_resource = netbox.PowerPanel("powerPanelResource",
    site_id=0,
    comments="string",
    custom_fields={
        "string": "string",
    },
    description="string",
    location_id=0,
    name="string",
    power_panel_id="string",
    tags=["string"])
Copy
const powerPanelResource = new netbox.PowerPanel("powerPanelResource", {
    siteId: 0,
    comments: "string",
    customFields: {
        string: "string",
    },
    description: "string",
    locationId: 0,
    name: "string",
    powerPanelId: "string",
    tags: ["string"],
});
Copy
type: netbox:PowerPanel
properties:
    comments: string
    customFields:
        string: string
    description: string
    locationId: 0
    name: string
    powerPanelId: string
    siteId: 0
    tags:
        - string
Copy

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

SiteId This property is required. double
Comments string
CustomFields Dictionary<string, string>
Description string
LocationId double
Name string
PowerPanelId string
The ID of this resource.
Tags List<string>
SiteId This property is required. float64
Comments string
CustomFields map[string]string
Description string
LocationId float64
Name string
PowerPanelId string
The ID of this resource.
Tags []string
siteId This property is required. Double
comments String
customFields Map<String,String>
description String
locationId Double
name String
powerPanelId String
The ID of this resource.
tags List<String>
siteId This property is required. number
comments string
customFields {[key: string]: string}
description string
locationId number
name string
powerPanelId string
The ID of this resource.
tags string[]
site_id This property is required. float
comments str
custom_fields Mapping[str, str]
description str
location_id float
name str
power_panel_id str
The ID of this resource.
tags Sequence[str]
siteId This property is required. Number
comments String
customFields Map<String>
description String
locationId Number
name String
powerPanelId String
The ID of this resource.
tags List<String>

Outputs

All input properties are implicitly available as output properties. Additionally, the PowerPanel 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 PowerPanel Resource

Get an existing PowerPanel 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?: PowerPanelState, opts?: CustomResourceOptions): PowerPanel
@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,
        location_id: Optional[float] = None,
        name: Optional[str] = None,
        power_panel_id: Optional[str] = None,
        site_id: Optional[float] = None,
        tags: Optional[Sequence[str]] = None) -> PowerPanel
func GetPowerPanel(ctx *Context, name string, id IDInput, state *PowerPanelState, opts ...ResourceOption) (*PowerPanel, error)
public static PowerPanel Get(string name, Input<string> id, PowerPanelState? state, CustomResourceOptions? opts = null)
public static PowerPanel get(String name, Output<String> id, PowerPanelState state, CustomResourceOptions options)
resources:  _:    type: netbox:PowerPanel    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Comments string
CustomFields Dictionary<string, string>
Description string
LocationId double
Name string
PowerPanelId string
The ID of this resource.
SiteId double
Tags List<string>
Comments string
CustomFields map[string]string
Description string
LocationId float64
Name string
PowerPanelId string
The ID of this resource.
SiteId float64
Tags []string
comments String
customFields Map<String,String>
description String
locationId Double
name String
powerPanelId String
The ID of this resource.
siteId Double
tags List<String>
comments string
customFields {[key: string]: string}
description string
locationId number
name string
powerPanelId string
The ID of this resource.
siteId number
tags string[]
comments str
custom_fields Mapping[str, str]
description str
location_id float
name str
power_panel_id str
The ID of this resource.
site_id float
tags Sequence[str]
comments String
customFields Map<String>
description String
locationId Number
name String
powerPanelId String
The ID of this resource.
siteId Number
tags List<String>

Package Details

Repository
netbox e-breuninger/terraform-provider-netbox
License
Notes
This Pulumi package is based on the netbox Terraform Provider.