lxd.InstanceDevice
Create InstanceDevice Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new InstanceDevice(name: string, args: InstanceDeviceArgs, opts?: CustomResourceOptions);
@overload
def InstanceDevice(resource_name: str,
args: InstanceDeviceInitArgs,
opts: Optional[ResourceOptions] = None)
@overload
def InstanceDevice(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_name: Optional[str] = None,
properties: Optional[Mapping[str, str]] = None,
type: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None,
remote: Optional[str] = None,
target: Optional[str] = None)
func NewInstanceDevice(ctx *Context, name string, args InstanceDeviceArgs, opts ...ResourceOption) (*InstanceDevice, error)
public InstanceDevice(string name, InstanceDeviceArgs args, CustomResourceOptions? opts = null)
public InstanceDevice(String name, InstanceDeviceArgs args)
public InstanceDevice(String name, InstanceDeviceArgs args, CustomResourceOptions options)
type: lxd:InstanceDevice
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 InstanceDeviceArgs
- 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 InstanceDeviceInitArgs
- 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 InstanceDeviceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args InstanceDeviceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args InstanceDeviceArgs
- 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 instanceDeviceResource = new Lxd.InstanceDevice("instanceDeviceResource", new()
{
InstanceName = "string",
Properties =
{
{ "string", "string" },
},
Type = "string",
Name = "string",
Project = "string",
Remote = "string",
Target = "string",
});
example, err := lxd.NewInstanceDevice(ctx, "instanceDeviceResource", &lxd.InstanceDeviceArgs{
InstanceName: pulumi.String("string"),
Properties: pulumi.StringMap{
"string": pulumi.String("string"),
},
Type: pulumi.String("string"),
Name: pulumi.String("string"),
Project: pulumi.String("string"),
Remote: pulumi.String("string"),
Target: pulumi.String("string"),
})
var instanceDeviceResource = new InstanceDevice("instanceDeviceResource", InstanceDeviceArgs.builder()
.instanceName("string")
.properties(Map.of("string", "string"))
.type("string")
.name("string")
.project("string")
.remote("string")
.target("string")
.build());
instance_device_resource = lxd.InstanceDevice("instanceDeviceResource",
instance_name="string",
properties={
"string": "string",
},
type="string",
name="string",
project="string",
remote="string",
target="string")
const instanceDeviceResource = new lxd.InstanceDevice("instanceDeviceResource", {
instanceName: "string",
properties: {
string: "string",
},
type: "string",
name: "string",
project: "string",
remote: "string",
target: "string",
});
type: lxd:InstanceDevice
properties:
instanceName: string
name: string
project: string
properties:
string: string
remote: string
target: string
type: string
InstanceDevice 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 InstanceDevice resource accepts the following input properties:
- Instance
Name string - Required - Name of the instance.
- Properties Dictionary<string, string>
- Required - Map of key/value pairs of device properties.
- Type string
- Required - Type of the device Must be one of none, disk, nic, unix-char, unix-block, usb, gpu, infiniband, proxy, unix-hotplug, tpm, pci.
- Name string
- Required - Name of the device.
- Project string
- Optional - Name of the project where the instance to which this device will be attached exists
- Remote string
- Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
- Target string
- Optional - Specify a target cluster member or cluster member group of the instance.
- Instance
Name string - Required - Name of the instance.
- Properties map[string]string
- Required - Map of key/value pairs of device properties.
- Type string
- Required - Type of the device Must be one of none, disk, nic, unix-char, unix-block, usb, gpu, infiniband, proxy, unix-hotplug, tpm, pci.
- Name string
- Required - Name of the device.
- Project string
- Optional - Name of the project where the instance to which this device will be attached exists
- Remote string
- Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
- Target string
- Optional - Specify a target cluster member or cluster member group of the instance.
- instance
Name String - Required - Name of the instance.
- properties Map<String,String>
- Required - Map of key/value pairs of device properties.
- type String
- Required - Type of the device Must be one of none, disk, nic, unix-char, unix-block, usb, gpu, infiniband, proxy, unix-hotplug, tpm, pci.
- name String
- Required - Name of the device.
- project String
- Optional - Name of the project where the instance to which this device will be attached exists
- remote String
- Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
- target String
- Optional - Specify a target cluster member or cluster member group of the instance.
- instance
Name string - Required - Name of the instance.
- properties {[key: string]: string}
- Required - Map of key/value pairs of device properties.
- type string
- Required - Type of the device Must be one of none, disk, nic, unix-char, unix-block, usb, gpu, infiniband, proxy, unix-hotplug, tpm, pci.
- name string
- Required - Name of the device.
- project string
- Optional - Name of the project where the instance to which this device will be attached exists
- remote string
- Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
- target string
- Optional - Specify a target cluster member or cluster member group of the instance.
- instance_
name str - Required - Name of the instance.
- properties Mapping[str, str]
- Required - Map of key/value pairs of device properties.
- type str
- Required - Type of the device Must be one of none, disk, nic, unix-char, unix-block, usb, gpu, infiniband, proxy, unix-hotplug, tpm, pci.
- name str
- Required - Name of the device.
- project str
- Optional - Name of the project where the instance to which this device will be attached exists
- remote str
- Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
- target str
- Optional - Specify a target cluster member or cluster member group of the instance.
- instance
Name String - Required - Name of the instance.
- properties Map<String>
- Required - Map of key/value pairs of device properties.
- type String
- Required - Type of the device Must be one of none, disk, nic, unix-char, unix-block, usb, gpu, infiniband, proxy, unix-hotplug, tpm, pci.
- name String
- Required - Name of the device.
- project String
- Optional - Name of the project where the instance to which this device will be attached exists
- remote String
- Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
- target String
- Optional - Specify a target cluster member or cluster member group of the instance.
Outputs
All input properties are implicitly available as output properties. Additionally, the InstanceDevice 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 InstanceDevice Resource
Get an existing InstanceDevice 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?: InstanceDeviceState, opts?: CustomResourceOptions): InstanceDevice
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
instance_name: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None,
properties: Optional[Mapping[str, str]] = None,
remote: Optional[str] = None,
target: Optional[str] = None,
type: Optional[str] = None) -> InstanceDevice
func GetInstanceDevice(ctx *Context, name string, id IDInput, state *InstanceDeviceState, opts ...ResourceOption) (*InstanceDevice, error)
public static InstanceDevice Get(string name, Input<string> id, InstanceDeviceState? state, CustomResourceOptions? opts = null)
public static InstanceDevice get(String name, Output<String> id, InstanceDeviceState state, CustomResourceOptions options)
resources: _: type: lxd:InstanceDevice 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.
- Instance
Name string - Required - Name of the instance.
- Name string
- Required - Name of the device.
- Project string
- Optional - Name of the project where the instance to which this device will be attached exists
- Properties Dictionary<string, string>
- Required - Map of key/value pairs of device properties.
- Remote string
- Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
- Target string
- Optional - Specify a target cluster member or cluster member group of the instance.
- Type string
- Required - Type of the device Must be one of none, disk, nic, unix-char, unix-block, usb, gpu, infiniband, proxy, unix-hotplug, tpm, pci.
- Instance
Name string - Required - Name of the instance.
- Name string
- Required - Name of the device.
- Project string
- Optional - Name of the project where the instance to which this device will be attached exists
- Properties map[string]string
- Required - Map of key/value pairs of device properties.
- Remote string
- Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
- Target string
- Optional - Specify a target cluster member or cluster member group of the instance.
- Type string
- Required - Type of the device Must be one of none, disk, nic, unix-char, unix-block, usb, gpu, infiniband, proxy, unix-hotplug, tpm, pci.
- instance
Name String - Required - Name of the instance.
- name String
- Required - Name of the device.
- project String
- Optional - Name of the project where the instance to which this device will be attached exists
- properties Map<String,String>
- Required - Map of key/value pairs of device properties.
- remote String
- Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
- target String
- Optional - Specify a target cluster member or cluster member group of the instance.
- type String
- Required - Type of the device Must be one of none, disk, nic, unix-char, unix-block, usb, gpu, infiniband, proxy, unix-hotplug, tpm, pci.
- instance
Name string - Required - Name of the instance.
- name string
- Required - Name of the device.
- project string
- Optional - Name of the project where the instance to which this device will be attached exists
- properties {[key: string]: string}
- Required - Map of key/value pairs of device properties.
- remote string
- Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
- target string
- Optional - Specify a target cluster member or cluster member group of the instance.
- type string
- Required - Type of the device Must be one of none, disk, nic, unix-char, unix-block, usb, gpu, infiniband, proxy, unix-hotplug, tpm, pci.
- instance_
name str - Required - Name of the instance.
- name str
- Required - Name of the device.
- project str
- Optional - Name of the project where the instance to which this device will be attached exists
- properties Mapping[str, str]
- Required - Map of key/value pairs of device properties.
- remote str
- Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
- target str
- Optional - Specify a target cluster member or cluster member group of the instance.
- type str
- Required - Type of the device Must be one of none, disk, nic, unix-char, unix-block, usb, gpu, infiniband, proxy, unix-hotplug, tpm, pci.
- instance
Name String - Required - Name of the instance.
- name String
- Required - Name of the device.
- project String
- Optional - Name of the project where the instance to which this device will be attached exists
- properties Map<String>
- Required - Map of key/value pairs of device properties.
- remote String
- Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
- target String
- Optional - Specify a target cluster member or cluster member group of the instance.
- type String
- Required - Type of the device Must be one of none, disk, nic, unix-char, unix-block, usb, gpu, infiniband, proxy, unix-hotplug, tpm, pci.
Package Details
- Repository
- lxd terraform-lxd/terraform-provider-lxd
- License
- Notes
- This Pulumi package is based on the
lxd
Terraform Provider.