netbox.Platform
Explore with Pulumi AI
From the official documentation:
A platform defines the type of software running on a device or virtual machine. This can be helpful to model when it is necessary to distinguish between different versions or feature sets. Note that two devices of the same type may be assigned different platforms: For example, one Juniper MX240 might run Junos 14 while another runs Junos 15.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as netbox from "@pulumi/netbox";
// Resource for PanOS (e.g. Panorama from Palo Alto)
const pANOS = new netbox.Platform("pANOS", {});
import pulumi
import pulumi_netbox as netbox
# Resource for PanOS (e.g. Panorama from Palo Alto)
p_anos = netbox.Platform("pANOS")
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 {
// Resource for PanOS (e.g. Panorama from Palo Alto)
_, err := netbox.NewPlatform(ctx, "pANOS", 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(() =>
{
// Resource for PanOS (e.g. Panorama from Palo Alto)
var pANOS = new Netbox.Platform("pANOS");
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.netbox.Platform;
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) {
// Resource for PanOS (e.g. Panorama from Palo Alto)
var pANOS = new Platform("pANOS");
}
}
resources:
# Resource for PanOS (e.g. Panorama from Palo Alto)
pANOS:
type: netbox:Platform
Create Platform Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Platform(name: string, args?: PlatformArgs, opts?: CustomResourceOptions);
@overload
def Platform(resource_name: str,
args: Optional[PlatformArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Platform(resource_name: str,
opts: Optional[ResourceOptions] = None,
manufacturer_id: Optional[float] = None,
name: Optional[str] = None,
platform_id: Optional[str] = None,
slug: Optional[str] = None)
func NewPlatform(ctx *Context, name string, args *PlatformArgs, opts ...ResourceOption) (*Platform, error)
public Platform(string name, PlatformArgs? args = null, CustomResourceOptions? opts = null)
public Platform(String name, PlatformArgs args)
public Platform(String name, PlatformArgs args, CustomResourceOptions options)
type: netbox:Platform
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 PlatformArgs
- 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 PlatformArgs
- 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 PlatformArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PlatformArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PlatformArgs
- 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 platformResource = new Netbox.Platform("platformResource", new()
{
ManufacturerId = 0,
Name = "string",
PlatformId = "string",
Slug = "string",
});
example, err := netbox.NewPlatform(ctx, "platformResource", &netbox.PlatformArgs{
ManufacturerId: pulumi.Float64(0),
Name: pulumi.String("string"),
PlatformId: pulumi.String("string"),
Slug: pulumi.String("string"),
})
var platformResource = new Platform("platformResource", PlatformArgs.builder()
.manufacturerId(0)
.name("string")
.platformId("string")
.slug("string")
.build());
platform_resource = netbox.Platform("platformResource",
manufacturer_id=0,
name="string",
platform_id="string",
slug="string")
const platformResource = new netbox.Platform("platformResource", {
manufacturerId: 0,
name: "string",
platformId: "string",
slug: "string",
});
type: netbox:Platform
properties:
manufacturerId: 0
name: string
platformId: string
slug: string
Platform 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 Platform resource accepts the following input properties:
- Manufacturer
Id double - Name string
- Platform
Id string - The ID of this resource.
- Slug string
- Manufacturer
Id float64 - Name string
- Platform
Id string - The ID of this resource.
- Slug string
- manufacturer
Id Double - name String
- platform
Id String - The ID of this resource.
- slug String
- manufacturer
Id number - name string
- platform
Id string - The ID of this resource.
- slug string
- manufacturer_
id float - name str
- platform_
id str - The ID of this resource.
- slug str
- manufacturer
Id Number - name String
- platform
Id String - The ID of this resource.
- slug String
Outputs
All input properties are implicitly available as output properties. Additionally, the Platform 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 Platform Resource
Get an existing Platform 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?: PlatformState, opts?: CustomResourceOptions): Platform
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
manufacturer_id: Optional[float] = None,
name: Optional[str] = None,
platform_id: Optional[str] = None,
slug: Optional[str] = None) -> Platform
func GetPlatform(ctx *Context, name string, id IDInput, state *PlatformState, opts ...ResourceOption) (*Platform, error)
public static Platform Get(string name, Input<string> id, PlatformState? state, CustomResourceOptions? opts = null)
public static Platform get(String name, Output<String> id, PlatformState state, CustomResourceOptions options)
resources: _: type: netbox:Platform 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.
- Manufacturer
Id double - Name string
- Platform
Id string - The ID of this resource.
- Slug string
- Manufacturer
Id float64 - Name string
- Platform
Id string - The ID of this resource.
- Slug string
- manufacturer
Id Double - name String
- platform
Id String - The ID of this resource.
- slug String
- manufacturer
Id number - name string
- platform
Id string - The ID of this resource.
- slug string
- manufacturer_
id float - name str
- platform_
id str - The ID of this resource.
- slug str
- manufacturer
Id Number - name String
- platform
Id String - The ID of this resource.
- slug String
Package Details
- Repository
- netbox e-breuninger/terraform-provider-netbox
- License
- Notes
- This Pulumi package is based on the
netbox
Terraform Provider.