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

junipermist.device.Image

Explore with Pulumi AI

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

    This resource is used to upload a Device picture. This resource can be used to add a picture to a Wireless Access point, a Switch or a Gateway. A Maximum of 3 pictures can be uploaded.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as junipermist from "@pulumi/juniper-mist";
    
    const deviceImageOne = new junipermist.device.Image("device_image_one", {
        deviceId: inventory.devices[1].id,
        siteId: inventory.devices[1].siteId,
        file: "/Users/johndoe/Documents/image.jpg",
        imageNumber: 1,
    });
    
    import pulumi
    import pulumi_juniper_mist as junipermist
    
    device_image_one = junipermist.device.Image("device_image_one",
        device_id=inventory["devices"][1]["id"],
        site_id=inventory["devices"][1]["siteId"],
        file="/Users/johndoe/Documents/image.jpg",
        image_number=1)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-junipermist/sdk/go/junipermist/device"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := device.NewImage(ctx, "device_image_one", &device.ImageArgs{
    			DeviceId:    pulumi.Any(inventory.Devices[1].Id),
    			SiteId:      pulumi.Any(inventory.Devices[1].SiteId),
    			File:        pulumi.String("/Users/johndoe/Documents/image.jpg"),
    			ImageNumber: pulumi.Int(1),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using JuniperMist = Pulumi.JuniperMist;
    
    return await Deployment.RunAsync(() => 
    {
        var deviceImageOne = new JuniperMist.Device.Image("device_image_one", new()
        {
            DeviceId = inventory.Devices[1].Id,
            SiteId = inventory.Devices[1].SiteId,
            File = "/Users/johndoe/Documents/image.jpg",
            ImageNumber = 1,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.junipermist.device.Image;
    import com.pulumi.junipermist.device.ImageArgs;
    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 deviceImageOne = new Image("deviceImageOne", ImageArgs.builder()
                .deviceId(inventory.devices()[1].id())
                .siteId(inventory.devices()[1].siteId())
                .file("/Users/johndoe/Documents/image.jpg")
                .imageNumber(1)
                .build());
    
        }
    }
    
    resources:
      deviceImageOne:
        type: junipermist:device:Image
        name: device_image_one
        properties:
          deviceId: ${inventory.devices[1].id}
          siteId: ${inventory.devices[1].siteId}
          file: /Users/johndoe/Documents/image.jpg
          imageNumber: 1
    

    Create Image Resource

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

    Constructor syntax

    new Image(name: string, args: ImageArgs, opts?: CustomResourceOptions);
    @overload
    def Image(resource_name: str,
              args: ImageArgs,
              opts: Optional[ResourceOptions] = None)
    
    @overload
    def Image(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              device_id: Optional[str] = None,
              file: Optional[str] = None,
              image_number: Optional[int] = None,
              site_id: Optional[str] = None)
    func NewImage(ctx *Context, name string, args ImageArgs, opts ...ResourceOption) (*Image, error)
    public Image(string name, ImageArgs args, CustomResourceOptions? opts = null)
    public Image(String name, ImageArgs args)
    public Image(String name, ImageArgs args, CustomResourceOptions options)
    
    type: junipermist:device:Image
    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 ImageArgs
    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 ImageArgs
    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 ImageArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ImageArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ImageArgs
    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 imageResource = new JuniperMist.Device.Image("imageResource", new()
    {
        DeviceId = "string",
        File = "string",
        ImageNumber = 0,
        SiteId = "string",
    });
    
    example, err := device.NewImage(ctx, "imageResource", &device.ImageArgs{
    	DeviceId:    pulumi.String("string"),
    	File:        pulumi.String("string"),
    	ImageNumber: pulumi.Int(0),
    	SiteId:      pulumi.String("string"),
    })
    
    var imageResource = new Image("imageResource", ImageArgs.builder()
        .deviceId("string")
        .file("string")
        .imageNumber(0)
        .siteId("string")
        .build());
    
    image_resource = junipermist.device.Image("imageResource",
        device_id="string",
        file="string",
        image_number=0,
        site_id="string")
    
    const imageResource = new junipermist.device.Image("imageResource", {
        deviceId: "string",
        file: "string",
        imageNumber: 0,
        siteId: "string",
    });
    
    type: junipermist:device:Image
    properties:
        deviceId: string
        file: string
        imageNumber: 0
        siteId: string
    

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

    DeviceId string
    File string
    path to the device image file to upload. File must be a jpeg, jpg or png image`
    ImageNumber int
    SiteId string
    DeviceId string
    File string
    path to the device image file to upload. File must be a jpeg, jpg or png image`
    ImageNumber int
    SiteId string
    deviceId String
    file String
    path to the device image file to upload. File must be a jpeg, jpg or png image`
    imageNumber Integer
    siteId String
    deviceId string
    file string
    path to the device image file to upload. File must be a jpeg, jpg or png image`
    imageNumber number
    siteId string
    device_id str
    file str
    path to the device image file to upload. File must be a jpeg, jpg or png image`
    image_number int
    site_id str
    deviceId String
    file String
    path to the device image file to upload. File must be a jpeg, jpg or png image`
    imageNumber Number
    siteId String

    Outputs

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

    Get an existing Image 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?: ImageState, opts?: CustomResourceOptions): Image
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            device_id: Optional[str] = None,
            file: Optional[str] = None,
            image_number: Optional[int] = None,
            site_id: Optional[str] = None) -> Image
    func GetImage(ctx *Context, name string, id IDInput, state *ImageState, opts ...ResourceOption) (*Image, error)
    public static Image Get(string name, Input<string> id, ImageState? state, CustomResourceOptions? opts = null)
    public static Image get(String name, Output<String> id, ImageState 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.
    The following state arguments are supported:
    DeviceId string
    File string
    path to the device image file to upload. File must be a jpeg, jpg or png image`
    ImageNumber int
    SiteId string
    DeviceId string
    File string
    path to the device image file to upload. File must be a jpeg, jpg or png image`
    ImageNumber int
    SiteId string
    deviceId String
    file String
    path to the device image file to upload. File must be a jpeg, jpg or png image`
    imageNumber Integer
    siteId String
    deviceId string
    file string
    path to the device image file to upload. File must be a jpeg, jpg or png image`
    imageNumber number
    siteId string
    device_id str
    file str
    path to the device image file to upload. File must be a jpeg, jpg or png image`
    image_number int
    site_id str
    deviceId String
    file String
    path to the device image file to upload. File must be a jpeg, jpg or png image`
    imageNumber Number
    siteId String

    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