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

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",
});
Copy
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")
Copy
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
	})
}
Copy
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",
    });

});
Copy
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());

    }
}
Copy
resources:
  myInsertedMedia:
    type: vcd:InsertedMedia
    properties:
      catalog: my-catalog
      ejectForce: true
      org: my-org
      vappName: my-vApp
      vdc: my-vcd
      vmName: my-VM
Copy

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 This property is required. string
The unique name of the resource.
args This property is required. InsertedMediaArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. InsertedMediaArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. InsertedMediaArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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",
});
Copy
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"),
})
Copy
var insertedMediaResource = new InsertedMedia("insertedMediaResource", InsertedMediaArgs.builder()
    .catalog("string")
    .vappName("string")
    .vmName("string")
    .ejectForce(false)
    .insertedMediaId("string")
    .name("string")
    .org("string")
    .vdc("string")
    .build());
Copy
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")
Copy
const insertedMediaResource = new vcd.InsertedMedia("insertedMediaResource", {
    catalog: "string",
    vappName: "string",
    vmName: "string",
    ejectForce: false,
    insertedMediaId: "string",
    name: "string",
    org: "string",
    vdc: "string",
});
Copy
type: vcd:InsertedMedia
properties:
    catalog: string
    ejectForce: false
    insertedMediaId: string
    name: string
    org: string
    vappName: string
    vdc: string
    vmName: string
Copy

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 This property is required. string
The name of the catalog where to find media file
VappName This property is required. string
The name of vApp to find
VmName This property is required. 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 This property is required. string
The name of the catalog where to find media file
VappName This property is required. string
The name of vApp to find
VmName This property is required. 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 This property is required. String
The name of the catalog where to find media file
vappName This property is required. String
The name of vApp to find
vmName This property is required. 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 This property is required. string
The name of the catalog where to find media file
vappName This property is required. string
The name of vApp to find
vmName This property is required. 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 This property is required. str
The name of the catalog where to find media file
vapp_name This property is required. str
The name of vApp to find
vm_name This property is required. 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 This property is required. String
The name of the catalog where to find media file
vappName This property is required. String
The name of vApp to find
vmName This property is required. 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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.