1. Packages
  2. Juniper Mist
  3. API Docs
  4. org
  5. Inventory
Juniper Mist v0.0.27 published on Friday, Sep 27, 2024 by Pulumi

junipermist.org.Inventory

Explore with Pulumi AI

junipermist logo
Juniper Mist v0.0.27 published on Friday, Sep 27, 2024 by Pulumi

    This resource manages the Org inventory. It can be used to claim, unclaim, assign, unassign, reassign devices

    Example Usage

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.junipermist.org.Inventory;
    import com.pulumi.junipermist.org.InventoryArgs;
    import com.pulumi.junipermist.org.inputs.InventoryDeviceArgs;
    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 inventoryOne = new Inventory("inventoryOne", InventoryArgs.builder()
                .orgId(terraformTest.id())
                .devices(            
                    InventoryDeviceArgs.builder()
                        .claim_code("<device_claim_code>")
                        .site_id(terraformSite.id())
                        .build(),
                    InventoryDeviceArgs.builder()
                        .claim_code("<device_claim_code>")
                        .build(),
                    InventoryDeviceArgs.builder()
                        .mac("<device_mac_address>")
                        .site_id(terraformSite.id())
                        .build(),
                    InventoryDeviceArgs.builder()
                        .mac("<device_mac_address>")
                        .build())
                .build());
    
        }
    }
    
    resources:
      inventoryOne:
        type: junipermist:org:Inventory
        name: inventory_one
        properties:
          orgId: ${terraformTest.id}
          devices:
            - claim_code: <device_claim_code>
              site_id: ${terraformSite.id}
            - claim_code: <device_claim_code>
            - mac: <device_mac_address>
              site_id: ${terraformSite.id}
            - mac: <device_mac_address>
    

    Create Inventory Resource

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

    Constructor syntax

    new Inventory(name: string, args: InventoryArgs, opts?: CustomResourceOptions);
    @overload
    def Inventory(resource_name: str,
                  args: InventoryArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def Inventory(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  org_id: Optional[str] = None,
                  devices: Optional[Sequence[InventoryDeviceArgs]] = None)
    func NewInventory(ctx *Context, name string, args InventoryArgs, opts ...ResourceOption) (*Inventory, error)
    public Inventory(string name, InventoryArgs args, CustomResourceOptions? opts = null)
    public Inventory(String name, InventoryArgs args)
    public Inventory(String name, InventoryArgs args, CustomResourceOptions options)
    
    type: junipermist:org:Inventory
    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 InventoryArgs
    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 InventoryArgs
    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 InventoryArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args InventoryArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args InventoryArgs
    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 inventoryResource = new JuniperMist.Org.Inventory("inventoryResource", new()
    {
        OrgId = "string",
        Devices = new[]
        {
            new JuniperMist.Org.Inputs.InventoryDeviceArgs
            {
                ClaimCode = "string",
                Hostname = "string",
                Id = "string",
                Mac = "string",
                Model = "string",
                OrgId = "string",
                Serial = "string",
                SiteId = "string",
                Type = "string",
                VcMac = "string",
            },
        },
    });
    
    example, err := org.NewInventory(ctx, "inventoryResource", &org.InventoryArgs{
    	OrgId: pulumi.String("string"),
    	Devices: org.InventoryDeviceArray{
    		&org.InventoryDeviceArgs{
    			ClaimCode: pulumi.String("string"),
    			Hostname:  pulumi.String("string"),
    			Id:        pulumi.String("string"),
    			Mac:       pulumi.String("string"),
    			Model:     pulumi.String("string"),
    			OrgId:     pulumi.String("string"),
    			Serial:    pulumi.String("string"),
    			SiteId:    pulumi.String("string"),
    			Type:      pulumi.String("string"),
    			VcMac:     pulumi.String("string"),
    		},
    	},
    })
    
    var inventoryResource = new Inventory("inventoryResource", InventoryArgs.builder()
        .orgId("string")
        .devices(InventoryDeviceArgs.builder()
            .claimCode("string")
            .hostname("string")
            .id("string")
            .mac("string")
            .model("string")
            .orgId("string")
            .serial("string")
            .siteId("string")
            .type("string")
            .vcMac("string")
            .build())
        .build());
    
    inventory_resource = junipermist.org.Inventory("inventoryResource",
        org_id="string",
        devices=[junipermist.org.InventoryDeviceArgs(
            claim_code="string",
            hostname="string",
            id="string",
            mac="string",
            model="string",
            org_id="string",
            serial="string",
            site_id="string",
            type="string",
            vc_mac="string",
        )])
    
    const inventoryResource = new junipermist.org.Inventory("inventoryResource", {
        orgId: "string",
        devices: [{
            claimCode: "string",
            hostname: "string",
            id: "string",
            mac: "string",
            model: "string",
            orgId: "string",
            serial: "string",
            siteId: "string",
            type: "string",
            vcMac: "string",
        }],
    });
    
    type: junipermist:org:Inventory
    properties:
        devices:
            - claimCode: string
              hostname: string
              id: string
              mac: string
              model: string
              orgId: string
              serial: string
              siteId: string
              type: string
              vcMac: string
        orgId: string
    

    Inventory Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Inventory resource accepts the following input properties:

    Outputs

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

    Get an existing Inventory 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?: InventoryState, opts?: CustomResourceOptions): Inventory
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            devices: Optional[Sequence[InventoryDeviceArgs]] = None,
            org_id: Optional[str] = None) -> Inventory
    func GetInventory(ctx *Context, name string, id IDInput, state *InventoryState, opts ...ResourceOption) (*Inventory, error)
    public static Inventory Get(string name, Input<string> id, InventoryState? state, CustomResourceOptions? opts = null)
    public static Inventory get(String name, Output<String> id, InventoryState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.

    Supporting Types

    InventoryDevice, InventoryDeviceArgs

    ClaimCode string
    Device Claim Code. Required for claimed devices. Removing an adopted device from the list will release it. Format is [0-9A-Z]{15} (e.g 01234ABCDE56789)
    Hostname string
    Device Hostname
    Id string
    Mist Device ID
    Mac string
    Device MAC address. Required to assign adopted devices to site. Removing an adopted device from the list will not release it, but will unassign it from the site. Cannot be specified when claim_code is used. Format is [0-9a-f]{12} (e.g 5684dae9ac8b)
    Model string
    Device model
    OrgId string
    Serial string
    Device serial
    SiteId string
    Site ID. Used to assign device to a Site
    Type string
    VcMac string
    Virtual Chassis MAC Address
    ClaimCode string
    Device Claim Code. Required for claimed devices. Removing an adopted device from the list will release it. Format is [0-9A-Z]{15} (e.g 01234ABCDE56789)
    Hostname string
    Device Hostname
    Id string
    Mist Device ID
    Mac string
    Device MAC address. Required to assign adopted devices to site. Removing an adopted device from the list will not release it, but will unassign it from the site. Cannot be specified when claim_code is used. Format is [0-9a-f]{12} (e.g 5684dae9ac8b)
    Model string
    Device model
    OrgId string
    Serial string
    Device serial
    SiteId string
    Site ID. Used to assign device to a Site
    Type string
    VcMac string
    Virtual Chassis MAC Address
    claimCode String
    Device Claim Code. Required for claimed devices. Removing an adopted device from the list will release it. Format is [0-9A-Z]{15} (e.g 01234ABCDE56789)
    hostname String
    Device Hostname
    id String
    Mist Device ID
    mac String
    Device MAC address. Required to assign adopted devices to site. Removing an adopted device from the list will not release it, but will unassign it from the site. Cannot be specified when claim_code is used. Format is [0-9a-f]{12} (e.g 5684dae9ac8b)
    model String
    Device model
    orgId String
    serial String
    Device serial
    siteId String
    Site ID. Used to assign device to a Site
    type String
    vcMac String
    Virtual Chassis MAC Address
    claimCode string
    Device Claim Code. Required for claimed devices. Removing an adopted device from the list will release it. Format is [0-9A-Z]{15} (e.g 01234ABCDE56789)
    hostname string
    Device Hostname
    id string
    Mist Device ID
    mac string
    Device MAC address. Required to assign adopted devices to site. Removing an adopted device from the list will not release it, but will unassign it from the site. Cannot be specified when claim_code is used. Format is [0-9a-f]{12} (e.g 5684dae9ac8b)
    model string
    Device model
    orgId string
    serial string
    Device serial
    siteId string
    Site ID. Used to assign device to a Site
    type string
    vcMac string
    Virtual Chassis MAC Address
    claim_code str
    Device Claim Code. Required for claimed devices. Removing an adopted device from the list will release it. Format is [0-9A-Z]{15} (e.g 01234ABCDE56789)
    hostname str
    Device Hostname
    id str
    Mist Device ID
    mac str
    Device MAC address. Required to assign adopted devices to site. Removing an adopted device from the list will not release it, but will unassign it from the site. Cannot be specified when claim_code is used. Format is [0-9a-f]{12} (e.g 5684dae9ac8b)
    model str
    Device model
    org_id str
    serial str
    Device serial
    site_id str
    Site ID. Used to assign device to a Site
    type str
    vc_mac str
    Virtual Chassis MAC Address
    claimCode String
    Device Claim Code. Required for claimed devices. Removing an adopted device from the list will release it. Format is [0-9A-Z]{15} (e.g 01234ABCDE56789)
    hostname String
    Device Hostname
    id String
    Mist Device ID
    mac String
    Device MAC address. Required to assign adopted devices to site. Removing an adopted device from the list will not release it, but will unassign it from the site. Cannot be specified when claim_code is used. Format is [0-9a-f]{12} (e.g 5684dae9ac8b)
    model String
    Device model
    orgId String
    serial String
    Device serial
    siteId String
    Site ID. Used to assign device to a Site
    type String
    vcMac String
    Virtual Chassis MAC Address

    Import

    Using pulumi import, import mist_org_inventory with:

    Org Inventory can be imported by specifying the org_id

    $ pulumi import junipermist:org/inventory:Inventory inventory_one 17b46405-3a6d-4715-8bb4-6bb6d06f316a
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    junipermist pulumi/pulumi-junipermist
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the mist Terraform Provider.
    junipermist logo
    Juniper Mist v0.0.27 published on Friday, Sep 27, 2024 by Pulumi