lxd.Profile
Explore with Pulumi AI
Create Profile Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Profile(name: string, args?: ProfileArgs, opts?: CustomResourceOptions);
@overload
def Profile(resource_name: str,
args: Optional[ProfileArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Profile(resource_name: str,
opts: Optional[ResourceOptions] = None,
config: Optional[Mapping[str, str]] = None,
description: Optional[str] = None,
devices: Optional[Sequence[ProfileDeviceArgs]] = None,
name: Optional[str] = None,
project: Optional[str] = None,
remote: Optional[str] = None)
func NewProfile(ctx *Context, name string, args *ProfileArgs, opts ...ResourceOption) (*Profile, error)
public Profile(string name, ProfileArgs? args = null, CustomResourceOptions? opts = null)
public Profile(String name, ProfileArgs args)
public Profile(String name, ProfileArgs args, CustomResourceOptions options)
type: lxd:Profile
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 ProfileArgs
- 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 ProfileArgs
- 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 ProfileArgs
- 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 ProfileArgs
- 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. ProfileArgs - 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 profileResource = new Lxd.Profile("profileResource", new()
{
Config =
{
{ "string", "string" },
},
Description = "string",
Devices = new[]
{
new Lxd.Inputs.ProfileDeviceArgs
{
Name = "string",
Properties =
{
{ "string", "string" },
},
Type = "string",
},
},
Name = "string",
Project = "string",
Remote = "string",
});
example, err := lxd.NewProfile(ctx, "profileResource", &lxd.ProfileArgs{
Config: pulumi.StringMap{
"string": pulumi.String("string"),
},
Description: pulumi.String("string"),
Devices: .ProfileDeviceArray{
&.ProfileDeviceArgs{
Name: 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"),
})
var profileResource = new Profile("profileResource", ProfileArgs.builder()
.config(Map.of("string", "string"))
.description("string")
.devices(ProfileDeviceArgs.builder()
.name("string")
.properties(Map.of("string", "string"))
.type("string")
.build())
.name("string")
.project("string")
.remote("string")
.build());
profile_resource = lxd.Profile("profileResource",
config={
"string": "string",
},
description="string",
devices=[{
"name": "string",
"properties": {
"string": "string",
},
"type": "string",
}],
name="string",
project="string",
remote="string")
const profileResource = new lxd.Profile("profileResource", {
config: {
string: "string",
},
description: "string",
devices: [{
name: "string",
properties: {
string: "string",
},
type: "string",
}],
name: "string",
project: "string",
remote: "string",
});
type: lxd:Profile
properties:
config:
string: string
description: string
devices:
- name: string
properties:
string: string
type: string
name: string
project: string
remote: string
Profile 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 Profile resource accepts the following input properties:
- Config Dictionary<string, string>
- Optional - Map of key/value pairs of instance config settings.
- Description string
- Devices
List<Profile
Device> - Optional - Device definition. See reference below.
- Name string
- Required - Name of the profile.
- Project string
- Optional - Name of the project where the profile will be stored.
- Remote string
- Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
- Config map[string]string
- Optional - Map of key/value pairs of instance config settings.
- Description string
- Devices
[]Profile
Device Args - Optional - Device definition. See reference below.
- Name string
- Required - Name of the profile.
- Project string
- Optional - Name of the project where the profile will be stored.
- Remote string
- Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
- config Map<String,String>
- Optional - Map of key/value pairs of instance config settings.
- description String
- devices
List<Profile
Device> - Optional - Device definition. See reference below.
- name String
- Required - Name of the profile.
- project String
- Optional - Name of the project where the profile will be stored.
- remote String
- Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
- config {[key: string]: string}
- Optional - Map of key/value pairs of instance config settings.
- description string
- devices
Profile
Device[] - Optional - Device definition. See reference below.
- name string
- Required - Name of the profile.
- project string
- Optional - Name of the project where the profile will be stored.
- remote string
- Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
- config Mapping[str, str]
- Optional - Map of key/value pairs of instance config settings.
- description str
- devices
Sequence[Profile
Device Args] - Optional - Device definition. See reference below.
- name str
- Required - Name of the profile.
- project str
- Optional - Name of the project where the profile will be stored.
- remote str
- Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
- config Map<String>
- Optional - Map of key/value pairs of instance config settings.
- description String
- devices List<Property Map>
- Optional - Device definition. See reference below.
- name String
- Required - Name of the profile.
- project String
- Optional - Name of the project where the profile will be stored.
- remote String
- Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
Outputs
All input properties are implicitly available as output properties. Additionally, the Profile 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 Profile Resource
Get an existing Profile 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?: ProfileState, opts?: CustomResourceOptions): Profile
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
config: Optional[Mapping[str, str]] = None,
description: Optional[str] = None,
devices: Optional[Sequence[ProfileDeviceArgs]] = None,
name: Optional[str] = None,
project: Optional[str] = None,
remote: Optional[str] = None) -> Profile
func GetProfile(ctx *Context, name string, id IDInput, state *ProfileState, opts ...ResourceOption) (*Profile, error)
public static Profile Get(string name, Input<string> id, ProfileState? state, CustomResourceOptions? opts = null)
public static Profile get(String name, Output<String> id, ProfileState state, CustomResourceOptions options)
resources: _: type: lxd:Profile 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.
- Config Dictionary<string, string>
- Optional - Map of key/value pairs of instance config settings.
- Description string
- Devices
List<Profile
Device> - Optional - Device definition. See reference below.
- Name string
- Required - Name of the profile.
- Project string
- Optional - Name of the project where the profile will be stored.
- Remote string
- Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
- Config map[string]string
- Optional - Map of key/value pairs of instance config settings.
- Description string
- Devices
[]Profile
Device Args - Optional - Device definition. See reference below.
- Name string
- Required - Name of the profile.
- Project string
- Optional - Name of the project where the profile will be stored.
- Remote string
- Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
- config Map<String,String>
- Optional - Map of key/value pairs of instance config settings.
- description String
- devices
List<Profile
Device> - Optional - Device definition. See reference below.
- name String
- Required - Name of the profile.
- project String
- Optional - Name of the project where the profile will be stored.
- remote String
- Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
- config {[key: string]: string}
- Optional - Map of key/value pairs of instance config settings.
- description string
- devices
Profile
Device[] - Optional - Device definition. See reference below.
- name string
- Required - Name of the profile.
- project string
- Optional - Name of the project where the profile will be stored.
- remote string
- Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
- config Mapping[str, str]
- Optional - Map of key/value pairs of instance config settings.
- description str
- devices
Sequence[Profile
Device Args] - Optional - Device definition. See reference below.
- name str
- Required - Name of the profile.
- project str
- Optional - Name of the project where the profile will be stored.
- remote str
- Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
- config Map<String>
- Optional - Map of key/value pairs of instance config settings.
- description String
- devices List<Property Map>
- Optional - Device definition. See reference below.
- name String
- Required - Name of the profile.
- project String
- Optional - Name of the project where the profile will be stored.
- remote String
- Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
Supporting Types
ProfileDevice, ProfileDeviceArgs
- Name
This property is required. string - Required - Name of the device.
- Properties
This property is required. Dictionary<string, string> - Required - Map of key/value pairs of device properties.
- Type
This property is required. 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
This property is required. string - Required - Name of the device.
- Properties
This property is required. map[string]string - Required - Map of key/value pairs of device properties.
- Type
This property is required. 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
This property is required. String - Required - Name of the device.
- properties
This property is required. Map<String,String> - Required - Map of key/value pairs of device properties.
- type
This property is required. 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
This property is required. string - Required - Name of the device.
- properties
This property is required. {[key: string]: string} - Required - Map of key/value pairs of device properties.
- type
This property is required. 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
This property is required. str - Required - Name of the device.
- properties
This property is required. Mapping[str, str] - Required - Map of key/value pairs of device properties.
- type
This property is required. 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
This property is required. String - Required - Name of the device.
- properties
This property is required. Map<String> - Required - Map of key/value pairs of device properties.
- type
This property is required. 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.