opennebula 1.4.1 published on Monday, Apr 14, 2025 by opennebula
opennebula.getTemplate
Explore with Pulumi AI
opennebula 1.4.1 published on Monday, Apr 14, 2025 by opennebula
Use this data source to retrieve the template information for a given name.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as opennebula from "@pulumi/opennebula";
const example = opennebula.getTemplate({
name: "My_Template",
});
import pulumi
import pulumi_opennebula as opennebula
example = opennebula.get_template(name="My_Template")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opennebula/opennebula"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := opennebula.LookupTemplate(ctx, &opennebula.LookupTemplateArgs{
Name: pulumi.StringRef("My_Template"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opennebula = Pulumi.Opennebula;
return await Deployment.RunAsync(() =>
{
var example = Opennebula.GetTemplate.Invoke(new()
{
Name = "My_Template",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opennebula.OpennebulaFunctions;
import com.pulumi.opennebula.inputs.GetTemplateArgs;
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) {
final var example = OpennebulaFunctions.getTemplate(GetTemplateArgs.builder()
.name("My_Template")
.build());
}
}
variables:
example:
fn::invoke:
function: opennebula:getTemplate
arguments:
name: My_Template
Using getTemplate
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getTemplate(args: GetTemplateArgs, opts?: InvokeOptions): Promise<GetTemplateResult>
function getTemplateOutput(args: GetTemplateOutputArgs, opts?: InvokeOptions): Output<GetTemplateResult>
def get_template(cpu: Optional[float] = None,
has_cpu: Optional[bool] = None,
has_memory: Optional[bool] = None,
has_vcpu: Optional[bool] = None,
id: Optional[float] = None,
memory: Optional[float] = None,
name: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
vcpu: Optional[float] = None,
opts: Optional[InvokeOptions] = None) -> GetTemplateResult
def get_template_output(cpu: Optional[pulumi.Input[float]] = None,
has_cpu: Optional[pulumi.Input[bool]] = None,
has_memory: Optional[pulumi.Input[bool]] = None,
has_vcpu: Optional[pulumi.Input[bool]] = None,
id: Optional[pulumi.Input[float]] = None,
memory: Optional[pulumi.Input[float]] = None,
name: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
vcpu: Optional[pulumi.Input[float]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetTemplateResult]
func LookupTemplate(ctx *Context, args *LookupTemplateArgs, opts ...InvokeOption) (*LookupTemplateResult, error)
func LookupTemplateOutput(ctx *Context, args *LookupTemplateOutputArgs, opts ...InvokeOption) LookupTemplateResultOutput
> Note: This function is named LookupTemplate
in the Go SDK.
public static class GetTemplate
{
public static Task<GetTemplateResult> InvokeAsync(GetTemplateArgs args, InvokeOptions? opts = null)
public static Output<GetTemplateResult> Invoke(GetTemplateInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetTemplateResult> getTemplate(GetTemplateArgs args, InvokeOptions options)
public static Output<GetTemplateResult> getTemplate(GetTemplateArgs args, InvokeOptions options)
fn::invoke:
function: opennebula:index/getTemplate:getTemplate
arguments:
# arguments dictionary
The following arguments are supported:
- Cpu double
- Amount of CPU shares assigned to the VM.
- Has
Cpu bool - Indicate if a CPU value has been defined.
- Has
Memory bool - Indicate if a memory value has been defined.
- Has
Vcpu bool - Indicate if a VCPU value has been defined.
- Id double
- ID of the template.
- Memory double
- Amount of RAM assigned to the VM in MB.
- Name string
- The OpenNebula template to retrieve information for.
- Dictionary<string, string>
- Template tags (Key = Value).
- Vcpu double
- Number of CPU cores presented to the VM.
- Cpu float64
- Amount of CPU shares assigned to the VM.
- Has
Cpu bool - Indicate if a CPU value has been defined.
- Has
Memory bool - Indicate if a memory value has been defined.
- Has
Vcpu bool - Indicate if a VCPU value has been defined.
- Id float64
- ID of the template.
- Memory float64
- Amount of RAM assigned to the VM in MB.
- Name string
- The OpenNebula template to retrieve information for.
- map[string]string
- Template tags (Key = Value).
- Vcpu float64
- Number of CPU cores presented to the VM.
- cpu Double
- Amount of CPU shares assigned to the VM.
- has
Cpu Boolean - Indicate if a CPU value has been defined.
- has
Memory Boolean - Indicate if a memory value has been defined.
- has
Vcpu Boolean - Indicate if a VCPU value has been defined.
- id Double
- ID of the template.
- memory Double
- Amount of RAM assigned to the VM in MB.
- name String
- The OpenNebula template to retrieve information for.
- Map<String,String>
- Template tags (Key = Value).
- vcpu Double
- Number of CPU cores presented to the VM.
- cpu number
- Amount of CPU shares assigned to the VM.
- has
Cpu boolean - Indicate if a CPU value has been defined.
- has
Memory boolean - Indicate if a memory value has been defined.
- has
Vcpu boolean - Indicate if a VCPU value has been defined.
- id number
- ID of the template.
- memory number
- Amount of RAM assigned to the VM in MB.
- name string
- The OpenNebula template to retrieve information for.
- {[key: string]: string}
- Template tags (Key = Value).
- vcpu number
- Number of CPU cores presented to the VM.
- cpu float
- Amount of CPU shares assigned to the VM.
- has_
cpu bool - Indicate if a CPU value has been defined.
- has_
memory bool - Indicate if a memory value has been defined.
- has_
vcpu bool - Indicate if a VCPU value has been defined.
- id float
- ID of the template.
- memory float
- Amount of RAM assigned to the VM in MB.
- name str
- The OpenNebula template to retrieve information for.
- Mapping[str, str]
- Template tags (Key = Value).
- vcpu float
- Number of CPU cores presented to the VM.
- cpu Number
- Amount of CPU shares assigned to the VM.
- has
Cpu Boolean - Indicate if a CPU value has been defined.
- has
Memory Boolean - Indicate if a memory value has been defined.
- has
Vcpu Boolean - Indicate if a VCPU value has been defined.
- id Number
- ID of the template.
- memory Number
- Amount of RAM assigned to the VM in MB.
- name String
- The OpenNebula template to retrieve information for.
- Map<String>
- Template tags (Key = Value).
- vcpu Number
- Number of CPU cores presented to the VM.
getTemplate Result
The following output properties are available:
- Cpu double
- Amount of CPU shares assigned to the VM.
- Disks
List<Get
Template Disk> - Disk parameters
- Memory double
- Amount of RAM assigned to the VM in MB.
- Nics
List<Get
Template Nic> - NIC parameters
- Vcpu double
- Number of CPU cores presented to the VM.
- Vmgroups
List<Get
Template Vmgroup> - VM group parameters
- Has
Cpu bool - Has
Memory bool - Has
Vcpu bool - Id double
- ID of the template.
- Name string
- Name of the template.
- Dictionary<string, string>
- Tags of the template (Key = Value).
- Cpu float64
- Amount of CPU shares assigned to the VM.
- Disks
[]Get
Template Disk - Disk parameters
- Memory float64
- Amount of RAM assigned to the VM in MB.
- Nics
[]Get
Template Nic - NIC parameters
- Vcpu float64
- Number of CPU cores presented to the VM.
- Vmgroups
[]Get
Template Vmgroup - VM group parameters
- Has
Cpu bool - Has
Memory bool - Has
Vcpu bool - Id float64
- ID of the template.
- Name string
- Name of the template.
- map[string]string
- Tags of the template (Key = Value).
- cpu Double
- Amount of CPU shares assigned to the VM.
- disks
List<Get
Template Disk> - Disk parameters
- memory Double
- Amount of RAM assigned to the VM in MB.
- nics
List<Get
Template Nic> - NIC parameters
- vcpu Double
- Number of CPU cores presented to the VM.
- vmgroups
List<Get
Template Vmgroup> - VM group parameters
- has
Cpu Boolean - has
Memory Boolean - has
Vcpu Boolean - id Double
- ID of the template.
- name String
- Name of the template.
- Map<String,String>
- Tags of the template (Key = Value).
- cpu number
- Amount of CPU shares assigned to the VM.
- disks
Get
Template Disk[] - Disk parameters
- memory number
- Amount of RAM assigned to the VM in MB.
- nics
Get
Template Nic[] - NIC parameters
- vcpu number
- Number of CPU cores presented to the VM.
- vmgroups
Get
Template Vmgroup[] - VM group parameters
- has
Cpu boolean - has
Memory boolean - has
Vcpu boolean - id number
- ID of the template.
- name string
- Name of the template.
- {[key: string]: string}
- Tags of the template (Key = Value).
- cpu float
- Amount of CPU shares assigned to the VM.
- disks
Sequence[Get
Template Disk] - Disk parameters
- memory float
- Amount of RAM assigned to the VM in MB.
- nics
Sequence[Get
Template Nic] - NIC parameters
- vcpu float
- Number of CPU cores presented to the VM.
- vmgroups
Sequence[Get
Template Vmgroup] - VM group parameters
- has_
cpu bool - has_
memory bool - has_
vcpu bool - id float
- ID of the template.
- name str
- Name of the template.
- Mapping[str, str]
- Tags of the template (Key = Value).
- cpu Number
- Amount of CPU shares assigned to the VM.
- disks List<Property Map>
- Disk parameters
- memory Number
- Amount of RAM assigned to the VM in MB.
- nics List<Property Map>
- NIC parameters
- vcpu Number
- Number of CPU cores presented to the VM.
- vmgroups List<Property Map>
- VM group parameters
- has
Cpu Boolean - has
Memory Boolean - has
Vcpu Boolean - id Number
- ID of the template.
- name String
- Name of the template.
- Map<String>
- Tags of the template (Key = Value).
Supporting Types
GetTemplateDisk
- Cache string
- Dev
Prefix string - Discard string
- Driver string
- Image
Id double - Io string
- Size double
- Target string
- Volatile
Format string - Volatile
Type string
- Cache string
- Dev
Prefix string - Discard string
- Driver string
- Image
Id float64 - Io string
- Size float64
- Target string
- Volatile
Format string - Volatile
Type string
- cache String
- dev
Prefix String - discard String
- driver String
- image
Id Double - io String
- size Double
- target String
- volatile
Format String - volatile
Type String
- cache string
- dev
Prefix string - discard string
- driver string
- image
Id number - io string
- size number
- target string
- volatile
Format string - volatile
Type string
- cache str
- dev_
prefix str - discard str
- driver str
- image_
id float - io str
- size float
- target str
- volatile_
format str - volatile_
type str
- cache String
- dev
Prefix String - discard String
- driver String
- image
Id Number - io String
- size Number
- target String
- volatile
Format String - volatile
Type String
GetTemplateNic
- Dns string
- Gateway string
- Ip string
- Mac string
- Method string
- Model string
- Network string
- Network
Id double - Network
Mode boolAuto - Physical
Device string - Sched
Rank string - Sched
Requirements string - Security
Groups List<double> - Virtio
Queues string
- Dns string
- Gateway string
- Ip string
- Mac string
- Method string
- Model string
- Network string
- Network
Id float64 - Network
Mode boolAuto - Physical
Device string - Sched
Rank string - Sched
Requirements string - Security
Groups []float64 - Virtio
Queues string
- dns String
- gateway String
- ip String
- mac String
- method String
- model String
- network String
- network
Id Double - network
Mode BooleanAuto - physical
Device String - sched
Rank String - sched
Requirements String - security
Groups List<Double> - virtio
Queues String
- dns string
- gateway string
- ip string
- mac string
- method string
- model string
- network string
- network
Id number - network
Mode booleanAuto - physical
Device string - sched
Rank string - sched
Requirements string - security
Groups number[] - virtio
Queues string
- dns str
- gateway str
- ip str
- mac str
- method str
- model str
- network str
- network_
id float - network_
mode_ boolauto - physical_
device str - sched_
rank str - sched_
requirements str - security_
groups Sequence[float] - virtio_
queues str
- dns String
- gateway String
- ip String
- mac String
- method String
- model String
- network String
- network
Id Number - network
Mode BooleanAuto - physical
Device String - sched
Rank String - sched
Requirements String - security
Groups List<Number> - virtio
Queues String
GetTemplateVmgroup
- role str
- vmgroup_
id float
Package Details
- Repository
- opennebula opennebula/terraform-provider-opennebula
- License
- Notes
- This Pulumi package is based on the
opennebula
Terraform Provider.
opennebula 1.4.1 published on Monday, Apr 14, 2025 by opennebula