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

opennebula.Service

Explore with Pulumi AI

opennebula logo
opennebula 1.4.1 published on Monday, Apr 14, 2025 by opennebula

    Provides an OpenNebula service resource.

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

    Create Service Resource

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

    Constructor syntax

    new Service(name: string, args: ServiceArgs, opts?: CustomResourceOptions);
    @overload
    def Service(resource_name: str,
                args: ServiceArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Service(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                template_id: Optional[float] = None,
                extra_template: Optional[str] = None,
                gid: Optional[float] = None,
                gname: Optional[str] = None,
                name: Optional[str] = None,
                permissions: Optional[str] = None,
                service_id: Optional[str] = None,
                timeouts: Optional[ServiceTimeoutsArgs] = None,
                uid: Optional[float] = None,
                uname: Optional[str] = None)
    func NewService(ctx *Context, name string, args ServiceArgs, opts ...ResourceOption) (*Service, error)
    public Service(string name, ServiceArgs args, CustomResourceOptions? opts = null)
    public Service(String name, ServiceArgs args)
    public Service(String name, ServiceArgs args, CustomResourceOptions options)
    
    type: opennebula:Service
    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 ServiceArgs
    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 ServiceArgs
    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 ServiceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ServiceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ServiceArgs
    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 serviceResource = new Opennebula.Service("serviceResource", new()
    {
        TemplateId = 0,
        ExtraTemplate = "string",
        Gid = 0,
        Gname = "string",
        Name = "string",
        Permissions = "string",
        ServiceId = "string",
        Timeouts = new Opennebula.Inputs.ServiceTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Update = "string",
        },
        Uid = 0,
        Uname = "string",
    });
    
    example, err := opennebula.NewService(ctx, "serviceResource", &opennebula.ServiceArgs{
    	TemplateId:    pulumi.Float64(0),
    	ExtraTemplate: pulumi.String("string"),
    	Gid:           pulumi.Float64(0),
    	Gname:         pulumi.String("string"),
    	Name:          pulumi.String("string"),
    	Permissions:   pulumi.String("string"),
    	ServiceId:     pulumi.String("string"),
    	Timeouts: &opennebula.ServiceTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    	Uid:   pulumi.Float64(0),
    	Uname: pulumi.String("string"),
    })
    
    var serviceResource = new Service("serviceResource", ServiceArgs.builder()
        .templateId(0)
        .extraTemplate("string")
        .gid(0)
        .gname("string")
        .name("string")
        .permissions("string")
        .serviceId("string")
        .timeouts(ServiceTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .update("string")
            .build())
        .uid(0)
        .uname("string")
        .build());
    
    service_resource = opennebula.Service("serviceResource",
        template_id=0,
        extra_template="string",
        gid=0,
        gname="string",
        name="string",
        permissions="string",
        service_id="string",
        timeouts={
            "create": "string",
            "delete": "string",
            "update": "string",
        },
        uid=0,
        uname="string")
    
    const serviceResource = new opennebula.Service("serviceResource", {
        templateId: 0,
        extraTemplate: "string",
        gid: 0,
        gname: "string",
        name: "string",
        permissions: "string",
        serviceId: "string",
        timeouts: {
            create: "string",
            "delete": "string",
            update: "string",
        },
        uid: 0,
        uname: "string",
    });
    
    type: opennebula:Service
    properties:
        extraTemplate: string
        gid: 0
        gname: string
        name: string
        permissions: string
        serviceId: string
        templateId: 0
        timeouts:
            create: string
            delete: string
            update: string
        uid: 0
        uname: string
    

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

    TemplateId double
    Service will be instantiated from the template ID.
    ExtraTemplate string
    Service information to be merged with the template during instantiate.
    Gid double
    Set the id of the group owner of the newly created service. The corresponding gname will be computed.
    Gname string
    Set the name of the group owner of the newly created service. The corresponding gid will be computed.
    Name string
    The name of the service.
    Permissions string
    Permissions applied on service. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
    ServiceId string
    ID of the service.
    Timeouts ServiceTimeouts
    Uid double
    Set the id of the user owner of the newly created service. The corresponding uname will be computed.
    Uname string
    Set the name of the user owner of the newly created service. The corresponding uid will be computed.
    TemplateId float64
    Service will be instantiated from the template ID.
    ExtraTemplate string
    Service information to be merged with the template during instantiate.
    Gid float64
    Set the id of the group owner of the newly created service. The corresponding gname will be computed.
    Gname string
    Set the name of the group owner of the newly created service. The corresponding gid will be computed.
    Name string
    The name of the service.
    Permissions string
    Permissions applied on service. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
    ServiceId string
    ID of the service.
    Timeouts ServiceTimeoutsArgs
    Uid float64
    Set the id of the user owner of the newly created service. The corresponding uname will be computed.
    Uname string
    Set the name of the user owner of the newly created service. The corresponding uid will be computed.
    templateId Double
    Service will be instantiated from the template ID.
    extraTemplate String
    Service information to be merged with the template during instantiate.
    gid Double
    Set the id of the group owner of the newly created service. The corresponding gname will be computed.
    gname String
    Set the name of the group owner of the newly created service. The corresponding gid will be computed.
    name String
    The name of the service.
    permissions String
    Permissions applied on service. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
    serviceId String
    ID of the service.
    timeouts ServiceTimeouts
    uid Double
    Set the id of the user owner of the newly created service. The corresponding uname will be computed.
    uname String
    Set the name of the user owner of the newly created service. The corresponding uid will be computed.
    templateId number
    Service will be instantiated from the template ID.
    extraTemplate string
    Service information to be merged with the template during instantiate.
    gid number
    Set the id of the group owner of the newly created service. The corresponding gname will be computed.
    gname string
    Set the name of the group owner of the newly created service. The corresponding gid will be computed.
    name string
    The name of the service.
    permissions string
    Permissions applied on service. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
    serviceId string
    ID of the service.
    timeouts ServiceTimeouts
    uid number
    Set the id of the user owner of the newly created service. The corresponding uname will be computed.
    uname string
    Set the name of the user owner of the newly created service. The corresponding uid will be computed.
    template_id float
    Service will be instantiated from the template ID.
    extra_template str
    Service information to be merged with the template during instantiate.
    gid float
    Set the id of the group owner of the newly created service. The corresponding gname will be computed.
    gname str
    Set the name of the group owner of the newly created service. The corresponding gid will be computed.
    name str
    The name of the service.
    permissions str
    Permissions applied on service. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
    service_id str
    ID of the service.
    timeouts ServiceTimeoutsArgs
    uid float
    Set the id of the user owner of the newly created service. The corresponding uname will be computed.
    uname str
    Set the name of the user owner of the newly created service. The corresponding uid will be computed.
    templateId Number
    Service will be instantiated from the template ID.
    extraTemplate String
    Service information to be merged with the template during instantiate.
    gid Number
    Set the id of the group owner of the newly created service. The corresponding gname will be computed.
    gname String
    Set the name of the group owner of the newly created service. The corresponding gid will be computed.
    name String
    The name of the service.
    permissions String
    Permissions applied on service. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
    serviceId String
    ID of the service.
    timeouts Property Map
    uid Number
    Set the id of the user owner of the newly created service. The corresponding uname will be computed.
    uname String
    Set the name of the user owner of the newly created service. The corresponding uid will be computed.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Service resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Networks Dictionary<string, double>
    Map with the service name of each networks along with the id of the network.
    Roles List<ServiceRole>
    Array with roles information containing: cardinality, name, nodes and state.
    State double
    State of the service.
    Id string
    The provider-assigned unique ID for this managed resource.
    Networks map[string]float64
    Map with the service name of each networks along with the id of the network.
    Roles []ServiceRole
    Array with roles information containing: cardinality, name, nodes and state.
    State float64
    State of the service.
    id String
    The provider-assigned unique ID for this managed resource.
    networks Map<String,Double>
    Map with the service name of each networks along with the id of the network.
    roles List<ServiceRole>
    Array with roles information containing: cardinality, name, nodes and state.
    state Double
    State of the service.
    id string
    The provider-assigned unique ID for this managed resource.
    networks {[key: string]: number}
    Map with the service name of each networks along with the id of the network.
    roles ServiceRole[]
    Array with roles information containing: cardinality, name, nodes and state.
    state number
    State of the service.
    id str
    The provider-assigned unique ID for this managed resource.
    networks Mapping[str, float]
    Map with the service name of each networks along with the id of the network.
    roles Sequence[ServiceRole]
    Array with roles information containing: cardinality, name, nodes and state.
    state float
    State of the service.
    id String
    The provider-assigned unique ID for this managed resource.
    networks Map<Number>
    Map with the service name of each networks along with the id of the network.
    roles List<Property Map>
    Array with roles information containing: cardinality, name, nodes and state.
    state Number
    State of the service.

    Look up Existing Service Resource

    Get an existing Service 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?: ServiceState, opts?: CustomResourceOptions): Service
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            extra_template: Optional[str] = None,
            gid: Optional[float] = None,
            gname: Optional[str] = None,
            name: Optional[str] = None,
            networks: Optional[Mapping[str, float]] = None,
            permissions: Optional[str] = None,
            roles: Optional[Sequence[ServiceRoleArgs]] = None,
            service_id: Optional[str] = None,
            state: Optional[float] = None,
            template_id: Optional[float] = None,
            timeouts: Optional[ServiceTimeoutsArgs] = None,
            uid: Optional[float] = None,
            uname: Optional[str] = None) -> Service
    func GetService(ctx *Context, name string, id IDInput, state *ServiceState, opts ...ResourceOption) (*Service, error)
    public static Service Get(string name, Input<string> id, ServiceState? state, CustomResourceOptions? opts = null)
    public static Service get(String name, Output<String> id, ServiceState state, CustomResourceOptions options)
    resources:  _:    type: opennebula:Service    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.
    The following state arguments are supported:
    ExtraTemplate string
    Service information to be merged with the template during instantiate.
    Gid double
    Set the id of the group owner of the newly created service. The corresponding gname will be computed.
    Gname string
    Set the name of the group owner of the newly created service. The corresponding gid will be computed.
    Name string
    The name of the service.
    Networks Dictionary<string, double>
    Map with the service name of each networks along with the id of the network.
    Permissions string
    Permissions applied on service. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
    Roles List<ServiceRole>
    Array with roles information containing: cardinality, name, nodes and state.
    ServiceId string
    ID of the service.
    State double
    State of the service.
    TemplateId double
    Service will be instantiated from the template ID.
    Timeouts ServiceTimeouts
    Uid double
    Set the id of the user owner of the newly created service. The corresponding uname will be computed.
    Uname string
    Set the name of the user owner of the newly created service. The corresponding uid will be computed.
    ExtraTemplate string
    Service information to be merged with the template during instantiate.
    Gid float64
    Set the id of the group owner of the newly created service. The corresponding gname will be computed.
    Gname string
    Set the name of the group owner of the newly created service. The corresponding gid will be computed.
    Name string
    The name of the service.
    Networks map[string]float64
    Map with the service name of each networks along with the id of the network.
    Permissions string
    Permissions applied on service. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
    Roles []ServiceRoleArgs
    Array with roles information containing: cardinality, name, nodes and state.
    ServiceId string
    ID of the service.
    State float64
    State of the service.
    TemplateId float64
    Service will be instantiated from the template ID.
    Timeouts ServiceTimeoutsArgs
    Uid float64
    Set the id of the user owner of the newly created service. The corresponding uname will be computed.
    Uname string
    Set the name of the user owner of the newly created service. The corresponding uid will be computed.
    extraTemplate String
    Service information to be merged with the template during instantiate.
    gid Double
    Set the id of the group owner of the newly created service. The corresponding gname will be computed.
    gname String
    Set the name of the group owner of the newly created service. The corresponding gid will be computed.
    name String
    The name of the service.
    networks Map<String,Double>
    Map with the service name of each networks along with the id of the network.
    permissions String
    Permissions applied on service. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
    roles List<ServiceRole>
    Array with roles information containing: cardinality, name, nodes and state.
    serviceId String
    ID of the service.
    state Double
    State of the service.
    templateId Double
    Service will be instantiated from the template ID.
    timeouts ServiceTimeouts
    uid Double
    Set the id of the user owner of the newly created service. The corresponding uname will be computed.
    uname String
    Set the name of the user owner of the newly created service. The corresponding uid will be computed.
    extraTemplate string
    Service information to be merged with the template during instantiate.
    gid number
    Set the id of the group owner of the newly created service. The corresponding gname will be computed.
    gname string
    Set the name of the group owner of the newly created service. The corresponding gid will be computed.
    name string
    The name of the service.
    networks {[key: string]: number}
    Map with the service name of each networks along with the id of the network.
    permissions string
    Permissions applied on service. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
    roles ServiceRole[]
    Array with roles information containing: cardinality, name, nodes and state.
    serviceId string
    ID of the service.
    state number
    State of the service.
    templateId number
    Service will be instantiated from the template ID.
    timeouts ServiceTimeouts
    uid number
    Set the id of the user owner of the newly created service. The corresponding uname will be computed.
    uname string
    Set the name of the user owner of the newly created service. The corresponding uid will be computed.
    extra_template str
    Service information to be merged with the template during instantiate.
    gid float
    Set the id of the group owner of the newly created service. The corresponding gname will be computed.
    gname str
    Set the name of the group owner of the newly created service. The corresponding gid will be computed.
    name str
    The name of the service.
    networks Mapping[str, float]
    Map with the service name of each networks along with the id of the network.
    permissions str
    Permissions applied on service. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
    roles Sequence[ServiceRoleArgs]
    Array with roles information containing: cardinality, name, nodes and state.
    service_id str
    ID of the service.
    state float
    State of the service.
    template_id float
    Service will be instantiated from the template ID.
    timeouts ServiceTimeoutsArgs
    uid float
    Set the id of the user owner of the newly created service. The corresponding uname will be computed.
    uname str
    Set the name of the user owner of the newly created service. The corresponding uid will be computed.
    extraTemplate String
    Service information to be merged with the template during instantiate.
    gid Number
    Set the id of the group owner of the newly created service. The corresponding gname will be computed.
    gname String
    Set the name of the group owner of the newly created service. The corresponding gid will be computed.
    name String
    The name of the service.
    networks Map<Number>
    Map with the service name of each networks along with the id of the network.
    permissions String
    Permissions applied on service. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
    roles List<Property Map>
    Array with roles information containing: cardinality, name, nodes and state.
    serviceId String
    ID of the service.
    state Number
    State of the service.
    templateId Number
    Service will be instantiated from the template ID.
    timeouts Property Map
    uid Number
    Set the id of the user owner of the newly created service. The corresponding uname will be computed.
    uname String
    Set the name of the user owner of the newly created service. The corresponding uid will be computed.

    Supporting Types

    ServiceRole, ServiceRoleArgs

    Cardinality double
    Name string
    The name of the service.
    Nodes List<double>
    State double
    State of the service.
    Cardinality float64
    Name string
    The name of the service.
    Nodes []float64
    State float64
    State of the service.
    cardinality Double
    name String
    The name of the service.
    nodes List<Double>
    state Double
    State of the service.
    cardinality number
    name string
    The name of the service.
    nodes number[]
    state number
    State of the service.
    cardinality float
    name str
    The name of the service.
    nodes Sequence[float]
    state float
    State of the service.
    cardinality Number
    name String
    The name of the service.
    nodes List<Number>
    state Number
    State of the service.

    ServiceTimeouts, ServiceTimeoutsArgs

    Create string
    Delete string
    Update string
    Create string
    Delete string
    Update string
    create String
    delete String
    update String
    create string
    delete string
    update string
    create str
    delete str
    update str
    create String
    delete String
    update String

    Import

    opennebula_service can be imported using its ID:

    $ pulumi import opennebula:index/service:Service example 123
    

    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.
    opennebula logo
    opennebula 1.4.1 published on Monday, Apr 14, 2025 by opennebula