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

netbox.PowerFeed

Explore with Pulumi AI

netbox logo
netbox 3.10.0 published on Monday, Apr 14, 2025 by e-breuninger

    From the official documentation:

    A power feed represents the distribution of power from a power panel to a particular device, typically a power distribution unit (PDU). The power port (inlet) on a device can be connected via a cable to a power feed. A power feed may optionally be assigned to a rack to allow more easily tracking the distribution of power among racks.

    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,
    });
    const testPowerFeed = new netbox.PowerFeed("testPowerFeed", {
        powerPanelId: testPowerPanel.powerPanelId,
        status: "active",
        type: "primary",
        supply: "ac",
        phase: "single-phase",
        voltage: 250,
        amperage: 100,
        maxPercentUtilization: 80,
    });
    
    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)
    test_power_feed = netbox.PowerFeed("testPowerFeed",
        power_panel_id=test_power_panel.power_panel_id,
        status="active",
        type="primary",
        supply="ac",
        phase="single-phase",
        voltage=250,
        amperage=100,
        max_percent_utilization=80)
    
    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
    		}
    		testPowerPanel, err := netbox.NewPowerPanel(ctx, "testPowerPanel", &netbox.PowerPanelArgs{
    			SiteId:     testSite.SiteId,
    			LocationId: testLocation.LocationId,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = netbox.NewPowerFeed(ctx, "testPowerFeed", &netbox.PowerFeedArgs{
    			PowerPanelId:          testPowerPanel.PowerPanelId,
    			Status:                pulumi.String("active"),
    			Type:                  pulumi.String("primary"),
    			Supply:                pulumi.String("ac"),
    			Phase:                 pulumi.String("single-phase"),
    			Voltage:               pulumi.Float64(250),
    			Amperage:              pulumi.Float64(100),
    			MaxPercentUtilization: pulumi.Float64(80),
    		})
    		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 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,
        });
    
        var testPowerFeed = new Netbox.PowerFeed("testPowerFeed", new()
        {
            PowerPanelId = testPowerPanel.PowerPanelId,
            Status = "active",
            Type = "primary",
            Supply = "ac",
            Phase = "single-phase",
            Voltage = 250,
            Amperage = 100,
            MaxPercentUtilization = 80,
        });
    
    });
    
    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 com.pulumi.netbox.PowerFeed;
    import com.pulumi.netbox.PowerFeedArgs;
    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());
    
            var testPowerFeed = new PowerFeed("testPowerFeed", PowerFeedArgs.builder()
                .powerPanelId(testPowerPanel.powerPanelId())
                .status("active")
                .type("primary")
                .supply("ac")
                .phase("single-phase")
                .voltage(250)
                .amperage(100)
                .maxPercentUtilization(80)
                .build());
    
        }
    }
    
    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}
      testPowerFeed:
        type: netbox:PowerFeed
        properties:
          powerPanelId: ${testPowerPanel.powerPanelId}
          status: active
          type: primary
          supply: ac
          phase: single-phase
          voltage: 250
          amperage: 100
          maxPercentUtilization: 80
    

    Create PowerFeed Resource

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

    Constructor syntax

    new PowerFeed(name: string, args: PowerFeedArgs, opts?: CustomResourceOptions);
    @overload
    def PowerFeed(resource_name: str,
                  args: PowerFeedArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def PowerFeed(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  power_panel_id: Optional[float] = None,
                  voltage: Optional[float] = None,
                  type: Optional[str] = None,
                  supply: Optional[str] = None,
                  amperage: Optional[float] = None,
                  max_percent_utilization: Optional[float] = None,
                  status: Optional[str] = None,
                  phase: Optional[str] = None,
                  mark_connected: Optional[bool] = None,
                  power_feed_id: Optional[str] = None,
                  rack_id: Optional[float] = None,
                  name: Optional[str] = None,
                  description: Optional[str] = None,
                  tags: Optional[Sequence[str]] = None,
                  custom_fields: Optional[Mapping[str, str]] = None,
                  comments: Optional[str] = None)
    func NewPowerFeed(ctx *Context, name string, args PowerFeedArgs, opts ...ResourceOption) (*PowerFeed, error)
    public PowerFeed(string name, PowerFeedArgs args, CustomResourceOptions? opts = null)
    public PowerFeed(String name, PowerFeedArgs args)
    public PowerFeed(String name, PowerFeedArgs args, CustomResourceOptions options)
    
    type: netbox:PowerFeed
    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 PowerFeedArgs
    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 PowerFeedArgs
    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 PowerFeedArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PowerFeedArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PowerFeedArgs
    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 powerFeedResource = new Netbox.PowerFeed("powerFeedResource", new()
    {
        PowerPanelId = 0,
        Voltage = 0,
        Type = "string",
        Supply = "string",
        Amperage = 0,
        MaxPercentUtilization = 0,
        Status = "string",
        Phase = "string",
        MarkConnected = false,
        PowerFeedId = "string",
        RackId = 0,
        Name = "string",
        Description = "string",
        Tags = new[]
        {
            "string",
        },
        CustomFields = 
        {
            { "string", "string" },
        },
        Comments = "string",
    });
    
    example, err := netbox.NewPowerFeed(ctx, "powerFeedResource", &netbox.PowerFeedArgs{
    	PowerPanelId:          pulumi.Float64(0),
    	Voltage:               pulumi.Float64(0),
    	Type:                  pulumi.String("string"),
    	Supply:                pulumi.String("string"),
    	Amperage:              pulumi.Float64(0),
    	MaxPercentUtilization: pulumi.Float64(0),
    	Status:                pulumi.String("string"),
    	Phase:                 pulumi.String("string"),
    	MarkConnected:         pulumi.Bool(false),
    	PowerFeedId:           pulumi.String("string"),
    	RackId:                pulumi.Float64(0),
    	Name:                  pulumi.String("string"),
    	Description:           pulumi.String("string"),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	CustomFields: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Comments: pulumi.String("string"),
    })
    
    var powerFeedResource = new PowerFeed("powerFeedResource", PowerFeedArgs.builder()
        .powerPanelId(0)
        .voltage(0)
        .type("string")
        .supply("string")
        .amperage(0)
        .maxPercentUtilization(0)
        .status("string")
        .phase("string")
        .markConnected(false)
        .powerFeedId("string")
        .rackId(0)
        .name("string")
        .description("string")
        .tags("string")
        .customFields(Map.of("string", "string"))
        .comments("string")
        .build());
    
    power_feed_resource = netbox.PowerFeed("powerFeedResource",
        power_panel_id=0,
        voltage=0,
        type="string",
        supply="string",
        amperage=0,
        max_percent_utilization=0,
        status="string",
        phase="string",
        mark_connected=False,
        power_feed_id="string",
        rack_id=0,
        name="string",
        description="string",
        tags=["string"],
        custom_fields={
            "string": "string",
        },
        comments="string")
    
    const powerFeedResource = new netbox.PowerFeed("powerFeedResource", {
        powerPanelId: 0,
        voltage: 0,
        type: "string",
        supply: "string",
        amperage: 0,
        maxPercentUtilization: 0,
        status: "string",
        phase: "string",
        markConnected: false,
        powerFeedId: "string",
        rackId: 0,
        name: "string",
        description: "string",
        tags: ["string"],
        customFields: {
            string: "string",
        },
        comments: "string",
    });
    
    type: netbox:PowerFeed
    properties:
        amperage: 0
        comments: string
        customFields:
            string: string
        description: string
        markConnected: false
        maxPercentUtilization: 0
        name: string
        phase: string
        powerFeedId: string
        powerPanelId: 0
        rackId: 0
        status: string
        supply: string
        tags:
            - string
        type: string
        voltage: 0
    

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

    Amperage double
    MaxPercentUtilization double
    Phase string
    One of [single-phase, three-phase].
    PowerPanelId double
    Status string
    One of [offline, active, planned, failed].
    Supply string
    One of [ac, dc].
    Type string
    One of [primary, redundant].
    Voltage double
    Comments string
    CustomFields Dictionary<string, string>
    Description string
    MarkConnected bool
    Defaults to false.
    Name string
    PowerFeedId string
    The ID of this resource.
    RackId double
    Tags List<string>
    Amperage float64
    MaxPercentUtilization float64
    Phase string
    One of [single-phase, three-phase].
    PowerPanelId float64
    Status string
    One of [offline, active, planned, failed].
    Supply string
    One of [ac, dc].
    Type string
    One of [primary, redundant].
    Voltage float64
    Comments string
    CustomFields map[string]string
    Description string
    MarkConnected bool
    Defaults to false.
    Name string
    PowerFeedId string
    The ID of this resource.
    RackId float64
    Tags []string
    amperage Double
    maxPercentUtilization Double
    phase String
    One of [single-phase, three-phase].
    powerPanelId Double
    status String
    One of [offline, active, planned, failed].
    supply String
    One of [ac, dc].
    type String
    One of [primary, redundant].
    voltage Double
    comments String
    customFields Map<String,String>
    description String
    markConnected Boolean
    Defaults to false.
    name String
    powerFeedId String
    The ID of this resource.
    rackId Double
    tags List<String>
    amperage number
    maxPercentUtilization number
    phase string
    One of [single-phase, three-phase].
    powerPanelId number
    status string
    One of [offline, active, planned, failed].
    supply string
    One of [ac, dc].
    type string
    One of [primary, redundant].
    voltage number
    comments string
    customFields {[key: string]: string}
    description string
    markConnected boolean
    Defaults to false.
    name string
    powerFeedId string
    The ID of this resource.
    rackId number
    tags string[]
    amperage float
    max_percent_utilization float
    phase str
    One of [single-phase, three-phase].
    power_panel_id float
    status str
    One of [offline, active, planned, failed].
    supply str
    One of [ac, dc].
    type str
    One of [primary, redundant].
    voltage float
    comments str
    custom_fields Mapping[str, str]
    description str
    mark_connected bool
    Defaults to false.
    name str
    power_feed_id str
    The ID of this resource.
    rack_id float
    tags Sequence[str]
    amperage Number
    maxPercentUtilization Number
    phase String
    One of [single-phase, three-phase].
    powerPanelId Number
    status String
    One of [offline, active, planned, failed].
    supply String
    One of [ac, dc].
    type String
    One of [primary, redundant].
    voltage Number
    comments String
    customFields Map<String>
    description String
    markConnected Boolean
    Defaults to false.
    name String
    powerFeedId String
    The ID of this resource.
    rackId Number
    tags List<String>

    Outputs

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

    Get an existing PowerFeed 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?: PowerFeedState, opts?: CustomResourceOptions): PowerFeed
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            amperage: Optional[float] = None,
            comments: Optional[str] = None,
            custom_fields: Optional[Mapping[str, str]] = None,
            description: Optional[str] = None,
            mark_connected: Optional[bool] = None,
            max_percent_utilization: Optional[float] = None,
            name: Optional[str] = None,
            phase: Optional[str] = None,
            power_feed_id: Optional[str] = None,
            power_panel_id: Optional[float] = None,
            rack_id: Optional[float] = None,
            status: Optional[str] = None,
            supply: Optional[str] = None,
            tags: Optional[Sequence[str]] = None,
            type: Optional[str] = None,
            voltage: Optional[float] = None) -> PowerFeed
    func GetPowerFeed(ctx *Context, name string, id IDInput, state *PowerFeedState, opts ...ResourceOption) (*PowerFeed, error)
    public static PowerFeed Get(string name, Input<string> id, PowerFeedState? state, CustomResourceOptions? opts = null)
    public static PowerFeed get(String name, Output<String> id, PowerFeedState state, CustomResourceOptions options)
    resources:  _:    type: netbox:PowerFeed    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:
    Amperage double
    Comments string
    CustomFields Dictionary<string, string>
    Description string
    MarkConnected bool
    Defaults to false.
    MaxPercentUtilization double
    Name string
    Phase string
    One of [single-phase, three-phase].
    PowerFeedId string
    The ID of this resource.
    PowerPanelId double
    RackId double
    Status string
    One of [offline, active, planned, failed].
    Supply string
    One of [ac, dc].
    Tags List<string>
    Type string
    One of [primary, redundant].
    Voltage double
    Amperage float64
    Comments string
    CustomFields map[string]string
    Description string
    MarkConnected bool
    Defaults to false.
    MaxPercentUtilization float64
    Name string
    Phase string
    One of [single-phase, three-phase].
    PowerFeedId string
    The ID of this resource.
    PowerPanelId float64
    RackId float64
    Status string
    One of [offline, active, planned, failed].
    Supply string
    One of [ac, dc].
    Tags []string
    Type string
    One of [primary, redundant].
    Voltage float64
    amperage Double
    comments String
    customFields Map<String,String>
    description String
    markConnected Boolean
    Defaults to false.
    maxPercentUtilization Double
    name String
    phase String
    One of [single-phase, three-phase].
    powerFeedId String
    The ID of this resource.
    powerPanelId Double
    rackId Double
    status String
    One of [offline, active, planned, failed].
    supply String
    One of [ac, dc].
    tags List<String>
    type String
    One of [primary, redundant].
    voltage Double
    amperage number
    comments string
    customFields {[key: string]: string}
    description string
    markConnected boolean
    Defaults to false.
    maxPercentUtilization number
    name string
    phase string
    One of [single-phase, three-phase].
    powerFeedId string
    The ID of this resource.
    powerPanelId number
    rackId number
    status string
    One of [offline, active, planned, failed].
    supply string
    One of [ac, dc].
    tags string[]
    type string
    One of [primary, redundant].
    voltage number
    amperage float
    comments str
    custom_fields Mapping[str, str]
    description str
    mark_connected bool
    Defaults to false.
    max_percent_utilization float
    name str
    phase str
    One of [single-phase, three-phase].
    power_feed_id str
    The ID of this resource.
    power_panel_id float
    rack_id float
    status str
    One of [offline, active, planned, failed].
    supply str
    One of [ac, dc].
    tags Sequence[str]
    type str
    One of [primary, redundant].
    voltage float
    amperage Number
    comments String
    customFields Map<String>
    description String
    markConnected Boolean
    Defaults to false.
    maxPercentUtilization Number
    name String
    phase String
    One of [single-phase, three-phase].
    powerFeedId String
    The ID of this resource.
    powerPanelId Number
    rackId Number
    status String
    One of [offline, active, planned, failed].
    supply String
    One of [ac, dc].
    tags List<String>
    type String
    One of [primary, redundant].
    voltage Number

    Package Details

    Repository
    netbox e-breuninger/terraform-provider-netbox
    License
    Notes
    This Pulumi package is based on the netbox Terraform Provider.
    netbox logo
    netbox 3.10.0 published on Monday, Apr 14, 2025 by e-breuninger