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

netbox.IpamRole

Explore with Pulumi AI

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

    From the official documentation:

    A role indicates the function of a prefix or VLAN. For example, you might define Data, Voice, and Security roles. Generally, a prefix will be assigned the same functional role as the VLAN to which it is assigned (if any).

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as netbox from "@pulumi/netbox";
    
    const testBasic = new netbox.IpamRole("testBasic", {});
    
    import pulumi
    import pulumi_netbox as netbox
    
    test_basic = netbox.IpamRole("testBasic")
    
    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 {
    		_, err := netbox.NewIpamRole(ctx, "testBasic", nil)
    		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 testBasic = new Netbox.IpamRole("testBasic");
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.netbox.IpamRole;
    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 testBasic = new IpamRole("testBasic");
    
        }
    }
    
    resources:
      testBasic:
        type: netbox:IpamRole
    

    Create IpamRole Resource

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

    Constructor syntax

    new IpamRole(name: string, args?: IpamRoleArgs, opts?: CustomResourceOptions);
    @overload
    def IpamRole(resource_name: str,
                 args: Optional[IpamRoleArgs] = None,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def IpamRole(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 description: Optional[str] = None,
                 ipam_role_id: Optional[str] = None,
                 name: Optional[str] = None,
                 slug: Optional[str] = None,
                 weight: Optional[float] = None)
    func NewIpamRole(ctx *Context, name string, args *IpamRoleArgs, opts ...ResourceOption) (*IpamRole, error)
    public IpamRole(string name, IpamRoleArgs? args = null, CustomResourceOptions? opts = null)
    public IpamRole(String name, IpamRoleArgs args)
    public IpamRole(String name, IpamRoleArgs args, CustomResourceOptions options)
    
    type: netbox:IpamRole
    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 IpamRoleArgs
    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 IpamRoleArgs
    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 IpamRoleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IpamRoleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IpamRoleArgs
    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 ipamRoleResource = new Netbox.IpamRole("ipamRoleResource", new()
    {
        Description = "string",
        IpamRoleId = "string",
        Name = "string",
        Slug = "string",
        Weight = 0,
    });
    
    example, err := netbox.NewIpamRole(ctx, "ipamRoleResource", &netbox.IpamRoleArgs{
    	Description: pulumi.String("string"),
    	IpamRoleId:  pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	Slug:        pulumi.String("string"),
    	Weight:      pulumi.Float64(0),
    })
    
    var ipamRoleResource = new IpamRole("ipamRoleResource", IpamRoleArgs.builder()
        .description("string")
        .ipamRoleId("string")
        .name("string")
        .slug("string")
        .weight(0)
        .build());
    
    ipam_role_resource = netbox.IpamRole("ipamRoleResource",
        description="string",
        ipam_role_id="string",
        name="string",
        slug="string",
        weight=0)
    
    const ipamRoleResource = new netbox.IpamRole("ipamRoleResource", {
        description: "string",
        ipamRoleId: "string",
        name: "string",
        slug: "string",
        weight: 0,
    });
    
    type: netbox:IpamRole
    properties:
        description: string
        ipamRoleId: string
        name: string
        slug: string
        weight: 0
    

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

    Description string
    IpamRoleId string
    The ID of this resource.
    Name string
    Slug string
    Weight double
    Description string
    IpamRoleId string
    The ID of this resource.
    Name string
    Slug string
    Weight float64
    description String
    ipamRoleId String
    The ID of this resource.
    name String
    slug String
    weight Double
    description string
    ipamRoleId string
    The ID of this resource.
    name string
    slug string
    weight number
    description str
    ipam_role_id str
    The ID of this resource.
    name str
    slug str
    weight float
    description String
    ipamRoleId String
    The ID of this resource.
    name String
    slug String
    weight Number

    Outputs

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

    Get an existing IpamRole 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?: IpamRoleState, opts?: CustomResourceOptions): IpamRole
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            ipam_role_id: Optional[str] = None,
            name: Optional[str] = None,
            slug: Optional[str] = None,
            weight: Optional[float] = None) -> IpamRole
    func GetIpamRole(ctx *Context, name string, id IDInput, state *IpamRoleState, opts ...ResourceOption) (*IpamRole, error)
    public static IpamRole Get(string name, Input<string> id, IpamRoleState? state, CustomResourceOptions? opts = null)
    public static IpamRole get(String name, Output<String> id, IpamRoleState state, CustomResourceOptions options)
    resources:  _:    type: netbox:IpamRole    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:
    Description string
    IpamRoleId string
    The ID of this resource.
    Name string
    Slug string
    Weight double
    Description string
    IpamRoleId string
    The ID of this resource.
    Name string
    Slug string
    Weight float64
    description String
    ipamRoleId String
    The ID of this resource.
    name String
    slug String
    weight Double
    description string
    ipamRoleId string
    The ID of this resource.
    name string
    slug string
    weight number
    description str
    ipam_role_id str
    The ID of this resource.
    name str
    slug str
    weight float
    description String
    ipamRoleId String
    The ID of this resource.
    name String
    slug String
    weight 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