1. Packages
  2. Opennebula Provider
  3. API Docs
  4. ServiceTemplate
opennebula 1.4.1 published on Monday, Apr 14, 2025 by opennebula

opennebula.ServiceTemplate

Explore with Pulumi AI

Provides an OpenNebula service template resource.

This resource allows you to manage service templates on your OpenNebula clusters. When applied, a new service template will be created. When destroyed, that service template will be removed.

Create ServiceTemplate Resource

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

Constructor syntax

new ServiceTemplate(name: string, args: ServiceTemplateArgs, opts?: CustomResourceOptions);
@overload
def ServiceTemplate(resource_name: str,
                    args: ServiceTemplateArgs,
                    opts: Optional[ResourceOptions] = None)

@overload
def ServiceTemplate(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    template: Optional[str] = None,
                    gid: Optional[float] = None,
                    gname: Optional[str] = None,
                    name: Optional[str] = None,
                    permissions: Optional[str] = None,
                    service_template_id: Optional[str] = None,
                    uid: Optional[float] = None,
                    uname: Optional[str] = None)
func NewServiceTemplate(ctx *Context, name string, args ServiceTemplateArgs, opts ...ResourceOption) (*ServiceTemplate, error)
public ServiceTemplate(string name, ServiceTemplateArgs args, CustomResourceOptions? opts = null)
public ServiceTemplate(String name, ServiceTemplateArgs args)
public ServiceTemplate(String name, ServiceTemplateArgs args, CustomResourceOptions options)
type: opennebula:ServiceTemplate
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. ServiceTemplateArgs
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. ServiceTemplateArgs
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. ServiceTemplateArgs
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. ServiceTemplateArgs
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. ServiceTemplateArgs
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 serviceTemplateResource = new Opennebula.ServiceTemplate("serviceTemplateResource", new()
{
    Template = "string",
    Gid = 0,
    Gname = "string",
    Name = "string",
    Permissions = "string",
    ServiceTemplateId = "string",
    Uid = 0,
    Uname = "string",
});
Copy
example, err := opennebula.NewServiceTemplate(ctx, "serviceTemplateResource", &opennebula.ServiceTemplateArgs{
Template: pulumi.String("string"),
Gid: pulumi.Float64(0),
Gname: pulumi.String("string"),
Name: pulumi.String("string"),
Permissions: pulumi.String("string"),
ServiceTemplateId: pulumi.String("string"),
Uid: pulumi.Float64(0),
Uname: pulumi.String("string"),
})
Copy
var serviceTemplateResource = new ServiceTemplate("serviceTemplateResource", ServiceTemplateArgs.builder()
    .template("string")
    .gid(0)
    .gname("string")
    .name("string")
    .permissions("string")
    .serviceTemplateId("string")
    .uid(0)
    .uname("string")
    .build());
Copy
service_template_resource = opennebula.ServiceTemplate("serviceTemplateResource",
    template="string",
    gid=0,
    gname="string",
    name="string",
    permissions="string",
    service_template_id="string",
    uid=0,
    uname="string")
Copy
const serviceTemplateResource = new opennebula.ServiceTemplate("serviceTemplateResource", {
    template: "string",
    gid: 0,
    gname: "string",
    name: "string",
    permissions: "string",
    serviceTemplateId: "string",
    uid: 0,
    uname: "string",
});
Copy
type: opennebula:ServiceTemplate
properties:
    gid: 0
    gname: string
    name: string
    permissions: string
    serviceTemplateId: string
    template: string
    uid: 0
    uname: string
Copy

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

Template This property is required. string
Service template definition in JSON format.
Gid double
Set the id of the group owner of the newly created service template. The corresponding gname will be computed.
Gname string
Set the name of the group owner of the newly created service template. The corresponding gid will be computed.
Name string
The name of the service template.
Permissions string
Permissions applied on service template. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
ServiceTemplateId string
ID of the service.
Uid double
Set the id of the user owner of the newly created service template. The corresponding uname will be computed.
Uname string
Set the name of the user owner of the newly created service template. The corresponding uid will be computed.
Template This property is required. string
Service template definition in JSON format.
Gid float64
Set the id of the group owner of the newly created service template. The corresponding gname will be computed.
Gname string
Set the name of the group owner of the newly created service template. The corresponding gid will be computed.
Name string
The name of the service template.
Permissions string
Permissions applied on service template. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
ServiceTemplateId string
ID of the service.
Uid float64
Set the id of the user owner of the newly created service template. The corresponding uname will be computed.
Uname string
Set the name of the user owner of the newly created service template. The corresponding uid will be computed.
template This property is required. String
Service template definition in JSON format.
gid Double
Set the id of the group owner of the newly created service template. The corresponding gname will be computed.
gname String
Set the name of the group owner of the newly created service template. The corresponding gid will be computed.
name String
The name of the service template.
permissions String
Permissions applied on service template. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
serviceTemplateId String
ID of the service.
uid Double
Set the id of the user owner of the newly created service template. The corresponding uname will be computed.
uname String
Set the name of the user owner of the newly created service template. The corresponding uid will be computed.
template This property is required. string
Service template definition in JSON format.
gid number
Set the id of the group owner of the newly created service template. The corresponding gname will be computed.
gname string
Set the name of the group owner of the newly created service template. The corresponding gid will be computed.
name string
The name of the service template.
permissions string
Permissions applied on service template. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
serviceTemplateId string
ID of the service.
uid number
Set the id of the user owner of the newly created service template. The corresponding uname will be computed.
uname string
Set the name of the user owner of the newly created service template. The corresponding uid will be computed.
template This property is required. str
Service template definition in JSON format.
gid float
Set the id of the group owner of the newly created service template. The corresponding gname will be computed.
gname str
Set the name of the group owner of the newly created service template. The corresponding gid will be computed.
name str
The name of the service template.
permissions str
Permissions applied on service template. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
service_template_id str
ID of the service.
uid float
Set the id of the user owner of the newly created service template. The corresponding uname will be computed.
uname str
Set the name of the user owner of the newly created service template. The corresponding uid will be computed.
template This property is required. String
Service template definition in JSON format.
gid Number
Set the id of the group owner of the newly created service template. The corresponding gname will be computed.
gname String
Set the name of the group owner of the newly created service template. The corresponding gid will be computed.
name String
The name of the service template.
permissions String
Permissions applied on service template. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
serviceTemplateId String
ID of the service.
uid Number
Set the id of the user owner of the newly created service template. The corresponding uname will be computed.
uname String
Set the name of the user owner of the newly created service template. The corresponding uid will be computed.

Outputs

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

Get an existing ServiceTemplate 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?: ServiceTemplateState, opts?: CustomResourceOptions): ServiceTemplate
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        gid: Optional[float] = None,
        gname: Optional[str] = None,
        name: Optional[str] = None,
        permissions: Optional[str] = None,
        service_template_id: Optional[str] = None,
        template: Optional[str] = None,
        uid: Optional[float] = None,
        uname: Optional[str] = None) -> ServiceTemplate
func GetServiceTemplate(ctx *Context, name string, id IDInput, state *ServiceTemplateState, opts ...ResourceOption) (*ServiceTemplate, error)
public static ServiceTemplate Get(string name, Input<string> id, ServiceTemplateState? state, CustomResourceOptions? opts = null)
public static ServiceTemplate get(String name, Output<String> id, ServiceTemplateState state, CustomResourceOptions options)
resources:  _:    type: opennebula:ServiceTemplate    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:
Gid double
Set the id of the group owner of the newly created service template. The corresponding gname will be computed.
Gname string
Set the name of the group owner of the newly created service template. The corresponding gid will be computed.
Name string
The name of the service template.
Permissions string
Permissions applied on service template. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
ServiceTemplateId string
ID of the service.
Template string
Service template definition in JSON format.
Uid double
Set the id of the user owner of the newly created service template. The corresponding uname will be computed.
Uname string
Set the name of the user owner of the newly created service template. The corresponding uid will be computed.
Gid float64
Set the id of the group owner of the newly created service template. The corresponding gname will be computed.
Gname string
Set the name of the group owner of the newly created service template. The corresponding gid will be computed.
Name string
The name of the service template.
Permissions string
Permissions applied on service template. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
ServiceTemplateId string
ID of the service.
Template string
Service template definition in JSON format.
Uid float64
Set the id of the user owner of the newly created service template. The corresponding uname will be computed.
Uname string
Set the name of the user owner of the newly created service template. The corresponding uid will be computed.
gid Double
Set the id of the group owner of the newly created service template. The corresponding gname will be computed.
gname String
Set the name of the group owner of the newly created service template. The corresponding gid will be computed.
name String
The name of the service template.
permissions String
Permissions applied on service template. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
serviceTemplateId String
ID of the service.
template String
Service template definition in JSON format.
uid Double
Set the id of the user owner of the newly created service template. The corresponding uname will be computed.
uname String
Set the name of the user owner of the newly created service template. The corresponding uid will be computed.
gid number
Set the id of the group owner of the newly created service template. The corresponding gname will be computed.
gname string
Set the name of the group owner of the newly created service template. The corresponding gid will be computed.
name string
The name of the service template.
permissions string
Permissions applied on service template. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
serviceTemplateId string
ID of the service.
template string
Service template definition in JSON format.
uid number
Set the id of the user owner of the newly created service template. The corresponding uname will be computed.
uname string
Set the name of the user owner of the newly created service template. The corresponding uid will be computed.
gid float
Set the id of the group owner of the newly created service template. The corresponding gname will be computed.
gname str
Set the name of the group owner of the newly created service template. The corresponding gid will be computed.
name str
The name of the service template.
permissions str
Permissions applied on service template. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
service_template_id str
ID of the service.
template str
Service template definition in JSON format.
uid float
Set the id of the user owner of the newly created service template. The corresponding uname will be computed.
uname str
Set the name of the user owner of the newly created service template. The corresponding uid will be computed.
gid Number
Set the id of the group owner of the newly created service template. The corresponding gname will be computed.
gname String
Set the name of the group owner of the newly created service template. The corresponding gid will be computed.
name String
The name of the service template.
permissions String
Permissions applied on service template. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
serviceTemplateId String
ID of the service.
template String
Service template definition in JSON format.
uid Number
Set the id of the user owner of the newly created service template. The corresponding uname will be computed.
uname String
Set the name of the user owner of the newly created service template. The corresponding uid will be computed.

Import

opennebula_security_group can be imported using its ID:

$ pulumi import opennebula:index/serviceTemplate:ServiceTemplate example 123
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
opennebula opennebula/terraform-provider-opennebula
License
Notes
This Pulumi package is based on the opennebula Terraform Provider.