1. Packages
  2. Vcd Provider
  3. API Docs
  4. InsertedMedia
vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware

vcd.InsertedMedia

Explore with Pulumi AI

vcd logo
vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware

    Provides a VMware Cloud Director resource for inserting or ejecting media (ISO) file for the VM. Create this resource for inserting the media, and destroy it for ejecting.

    Supported in provider v2.0+

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vcd from "@pulumi/vcd";
    
    const myInsertedMedia = new vcd.InsertedMedia("myInsertedMedia", {
        catalog: "my-catalog",
        ejectForce: true,
        org: "my-org",
        vappName: "my-vApp",
        vdc: "my-vcd",
        vmName: "my-VM",
    });
    
    import pulumi
    import pulumi_vcd as vcd
    
    my_inserted_media = vcd.InsertedMedia("myInsertedMedia",
        catalog="my-catalog",
        eject_force=True,
        org="my-org",
        vapp_name="my-vApp",
        vdc="my-vcd",
        vm_name="my-VM")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vcd/v3/vcd"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vcd.NewInsertedMedia(ctx, "myInsertedMedia", &vcd.InsertedMediaArgs{
    			Catalog:    pulumi.String("my-catalog"),
    			EjectForce: pulumi.Bool(true),
    			Org:        pulumi.String("my-org"),
    			VappName:   pulumi.String("my-vApp"),
    			Vdc:        pulumi.String("my-vcd"),
    			VmName:     pulumi.String("my-VM"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vcd = Pulumi.Vcd;
    
    return await Deployment.RunAsync(() => 
    {
        var myInsertedMedia = new Vcd.InsertedMedia("myInsertedMedia", new()
        {
            Catalog = "my-catalog",
            EjectForce = true,
            Org = "my-org",
            VappName = "my-vApp",
            Vdc = "my-vcd",
            VmName = "my-VM",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vcd.InsertedMedia;
    import com.pulumi.vcd.InsertedMediaArgs;
    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 myInsertedMedia = new InsertedMedia("myInsertedMedia", InsertedMediaArgs.builder()
                .catalog("my-catalog")
                .ejectForce(true)
                .org("my-org")
                .vappName("my-vApp")
                .vdc("my-vcd")
                .vmName("my-VM")
                .build());
    
        }
    }
    
    resources:
      myInsertedMedia:
        type: vcd:InsertedMedia
        properties:
          catalog: my-catalog
          ejectForce: true
          org: my-org
          vappName: my-vApp
          vdc: my-vcd
          vmName: my-VM
    

    Create InsertedMedia Resource

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

    Constructor syntax

    new InsertedMedia(name: string, args: InsertedMediaArgs, opts?: CustomResourceOptions);
    @overload
    def InsertedMedia(resource_name: str,
                      args: InsertedMediaArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def InsertedMedia(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      catalog: Optional[str] = None,
                      vapp_name: Optional[str] = None,
                      vm_name: Optional[str] = None,
                      eject_force: Optional[bool] = None,
                      inserted_media_id: Optional[str] = None,
                      name: Optional[str] = None,
                      org: Optional[str] = None,
                      vdc: Optional[str] = None)
    func NewInsertedMedia(ctx *Context, name string, args InsertedMediaArgs, opts ...ResourceOption) (*InsertedMedia, error)
    public InsertedMedia(string name, InsertedMediaArgs args, CustomResourceOptions? opts = null)
    public InsertedMedia(String name, InsertedMediaArgs args)
    public InsertedMedia(String name, InsertedMediaArgs args, CustomResourceOptions options)
    
    type: vcd:InsertedMedia
    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 InsertedMediaArgs
    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 InsertedMediaArgs
    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 InsertedMediaArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args InsertedMediaArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args InsertedMediaArgs
    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 insertedMediaResource = new Vcd.InsertedMedia("insertedMediaResource", new()
    {
        Catalog = "string",
        VappName = "string",
        VmName = "string",
        EjectForce = false,
        InsertedMediaId = "string",
        Name = "string",
        Org = "string",
        Vdc = "string",
    });
    
    example, err := vcd.NewInsertedMedia(ctx, "insertedMediaResource", &vcd.InsertedMediaArgs{
    	Catalog:         pulumi.String("string"),
    	VappName:        pulumi.String("string"),
    	VmName:          pulumi.String("string"),
    	EjectForce:      pulumi.Bool(false),
    	InsertedMediaId: pulumi.String("string"),
    	Name:            pulumi.String("string"),
    	Org:             pulumi.String("string"),
    	Vdc:             pulumi.String("string"),
    })
    
    var insertedMediaResource = new InsertedMedia("insertedMediaResource", InsertedMediaArgs.builder()
        .catalog("string")
        .vappName("string")
        .vmName("string")
        .ejectForce(false)
        .insertedMediaId("string")
        .name("string")
        .org("string")
        .vdc("string")
        .build());
    
    inserted_media_resource = vcd.InsertedMedia("insertedMediaResource",
        catalog="string",
        vapp_name="string",
        vm_name="string",
        eject_force=False,
        inserted_media_id="string",
        name="string",
        org="string",
        vdc="string")
    
    const insertedMediaResource = new vcd.InsertedMedia("insertedMediaResource", {
        catalog: "string",
        vappName: "string",
        vmName: "string",
        ejectForce: false,
        insertedMediaId: "string",
        name: "string",
        org: "string",
        vdc: "string",
    });
    
    type: vcd:InsertedMedia
    properties:
        catalog: string
        ejectForce: false
        insertedMediaId: string
        name: string
        org: string
        vappName: string
        vdc: string
        vmName: string
    

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

    Catalog string
    The name of the catalog where to find media file
    VappName string
    The name of vApp to find
    VmName string
    The name of VM to be used to insert media file
    EjectForce bool
    Allows to pass answer to question in vCD "The guest operating system has locked the CD-ROM door and is probably using the CD-ROM. Disconnect anyway (and override the lock)?" when ejecting from a VM which is powered on. True means "Yes" as answer to question. Default is true
    InsertedMediaId string
    Name string
    Media file name in catalog which will be inserted to VM
    Org string
    The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations
    Vdc string
    The name of VDC to use, optional if defined at provider level
    Catalog string
    The name of the catalog where to find media file
    VappName string
    The name of vApp to find
    VmName string
    The name of VM to be used to insert media file
    EjectForce bool
    Allows to pass answer to question in vCD "The guest operating system has locked the CD-ROM door and is probably using the CD-ROM. Disconnect anyway (and override the lock)?" when ejecting from a VM which is powered on. True means "Yes" as answer to question. Default is true
    InsertedMediaId string
    Name string
    Media file name in catalog which will be inserted to VM
    Org string
    The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations
    Vdc string
    The name of VDC to use, optional if defined at provider level
    catalog String
    The name of the catalog where to find media file
    vappName String
    The name of vApp to find
    vmName String
    The name of VM to be used to insert media file
    ejectForce Boolean
    Allows to pass answer to question in vCD "The guest operating system has locked the CD-ROM door and is probably using the CD-ROM. Disconnect anyway (and override the lock)?" when ejecting from a VM which is powered on. True means "Yes" as answer to question. Default is true
    insertedMediaId String
    name String
    Media file name in catalog which will be inserted to VM
    org String
    The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations
    vdc String
    The name of VDC to use, optional if defined at provider level
    catalog string
    The name of the catalog where to find media file
    vappName string
    The name of vApp to find
    vmName string
    The name of VM to be used to insert media file
    ejectForce boolean
    Allows to pass answer to question in vCD "The guest operating system has locked the CD-ROM door and is probably using the CD-ROM. Disconnect anyway (and override the lock)?" when ejecting from a VM which is powered on. True means "Yes" as answer to question. Default is true
    insertedMediaId string
    name string
    Media file name in catalog which will be inserted to VM
    org string
    The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations
    vdc string
    The name of VDC to use, optional if defined at provider level
    catalog str
    The name of the catalog where to find media file
    vapp_name str
    The name of vApp to find
    vm_name str
    The name of VM to be used to insert media file
    eject_force bool
    Allows to pass answer to question in vCD "The guest operating system has locked the CD-ROM door and is probably using the CD-ROM. Disconnect anyway (and override the lock)?" when ejecting from a VM which is powered on. True means "Yes" as answer to question. Default is true
    inserted_media_id str
    name str
    Media file name in catalog which will be inserted to VM
    org str
    The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations
    vdc str
    The name of VDC to use, optional if defined at provider level
    catalog String
    The name of the catalog where to find media file
    vappName String
    The name of vApp to find
    vmName String
    The name of VM to be used to insert media file
    ejectForce Boolean
    Allows to pass answer to question in vCD "The guest operating system has locked the CD-ROM door and is probably using the CD-ROM. Disconnect anyway (and override the lock)?" when ejecting from a VM which is powered on. True means "Yes" as answer to question. Default is true
    insertedMediaId String
    name String
    Media file name in catalog which will be inserted to VM
    org String
    The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations
    vdc String
    The name of VDC to use, optional if defined at provider level

    Outputs

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

    Get an existing InsertedMedia 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?: InsertedMediaState, opts?: CustomResourceOptions): InsertedMedia
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            catalog: Optional[str] = None,
            eject_force: Optional[bool] = None,
            inserted_media_id: Optional[str] = None,
            name: Optional[str] = None,
            org: Optional[str] = None,
            vapp_name: Optional[str] = None,
            vdc: Optional[str] = None,
            vm_name: Optional[str] = None) -> InsertedMedia
    func GetInsertedMedia(ctx *Context, name string, id IDInput, state *InsertedMediaState, opts ...ResourceOption) (*InsertedMedia, error)
    public static InsertedMedia Get(string name, Input<string> id, InsertedMediaState? state, CustomResourceOptions? opts = null)
    public static InsertedMedia get(String name, Output<String> id, InsertedMediaState state, CustomResourceOptions options)
    resources:  _:    type: vcd:InsertedMedia    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:
    Catalog string
    The name of the catalog where to find media file
    EjectForce bool
    Allows to pass answer to question in vCD "The guest operating system has locked the CD-ROM door and is probably using the CD-ROM. Disconnect anyway (and override the lock)?" when ejecting from a VM which is powered on. True means "Yes" as answer to question. Default is true
    InsertedMediaId string
    Name string
    Media file name in catalog which will be inserted to VM
    Org string
    The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations
    VappName string
    The name of vApp to find
    Vdc string
    The name of VDC to use, optional if defined at provider level
    VmName string
    The name of VM to be used to insert media file
    Catalog string
    The name of the catalog where to find media file
    EjectForce bool
    Allows to pass answer to question in vCD "The guest operating system has locked the CD-ROM door and is probably using the CD-ROM. Disconnect anyway (and override the lock)?" when ejecting from a VM which is powered on. True means "Yes" as answer to question. Default is true
    InsertedMediaId string
    Name string
    Media file name in catalog which will be inserted to VM
    Org string
    The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations
    VappName string
    The name of vApp to find
    Vdc string
    The name of VDC to use, optional if defined at provider level
    VmName string
    The name of VM to be used to insert media file
    catalog String
    The name of the catalog where to find media file
    ejectForce Boolean
    Allows to pass answer to question in vCD "The guest operating system has locked the CD-ROM door and is probably using the CD-ROM. Disconnect anyway (and override the lock)?" when ejecting from a VM which is powered on. True means "Yes" as answer to question. Default is true
    insertedMediaId String
    name String
    Media file name in catalog which will be inserted to VM
    org String
    The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations
    vappName String
    The name of vApp to find
    vdc String
    The name of VDC to use, optional if defined at provider level
    vmName String
    The name of VM to be used to insert media file
    catalog string
    The name of the catalog where to find media file
    ejectForce boolean
    Allows to pass answer to question in vCD "The guest operating system has locked the CD-ROM door and is probably using the CD-ROM. Disconnect anyway (and override the lock)?" when ejecting from a VM which is powered on. True means "Yes" as answer to question. Default is true
    insertedMediaId string
    name string
    Media file name in catalog which will be inserted to VM
    org string
    The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations
    vappName string
    The name of vApp to find
    vdc string
    The name of VDC to use, optional if defined at provider level
    vmName string
    The name of VM to be used to insert media file
    catalog str
    The name of the catalog where to find media file
    eject_force bool
    Allows to pass answer to question in vCD "The guest operating system has locked the CD-ROM door and is probably using the CD-ROM. Disconnect anyway (and override the lock)?" when ejecting from a VM which is powered on. True means "Yes" as answer to question. Default is true
    inserted_media_id str
    name str
    Media file name in catalog which will be inserted to VM
    org str
    The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations
    vapp_name str
    The name of vApp to find
    vdc str
    The name of VDC to use, optional if defined at provider level
    vm_name str
    The name of VM to be used to insert media file
    catalog String
    The name of the catalog where to find media file
    ejectForce Boolean
    Allows to pass answer to question in vCD "The guest operating system has locked the CD-ROM door and is probably using the CD-ROM. Disconnect anyway (and override the lock)?" when ejecting from a VM which is powered on. True means "Yes" as answer to question. Default is true
    insertedMediaId String
    name String
    Media file name in catalog which will be inserted to VM
    org String
    The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations
    vappName String
    The name of vApp to find
    vdc String
    The name of VDC to use, optional if defined at provider level
    vmName String
    The name of VM to be used to insert media file

    Package Details

    Repository
    vcd vmware/terraform-provider-vcd
    License
    Notes
    This Pulumi package is based on the vcd Terraform Provider.
    vcd logo
    vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware