1. Packages
  2. Xen Orchestra
  3. API Docs
  4. Acl
xenorchestra v1.5.2 published on Monday, Mar 10, 2025 by Vates

xenorchestra.Acl

Explore with Pulumi AI

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as xenorchestra from "@pulumi/xenorchestra";
import * as xenorchestra from "@vates/pulumi-xenorchestra";

const pool = xenorchestra.getXoaPool({
    nameLabel: "Your pool",
});
const user = xenorchestra.getXoaUser({
    username: "my-username",
});
const acl = new xenorchestra.Acl("acl", {
    subject: user.then(user => user.id),
    object: pool.then(pool => pool.id),
    action: "operator",
});
Copy
import pulumi
import pulumi_xenorchestra as xenorchestra

pool = xenorchestra.get_xoa_pool(name_label="Your pool")
user = xenorchestra.get_xoa_user(username="my-username")
acl = xenorchestra.Acl("acl",
    subject=user.id,
    object=pool.id,
    action="operator")
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/vatesfr/pulumi-xenorchestra/sdk/go/xenorchestra"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		pool, err := xenorchestra.GetXoaPool(ctx, &xenorchestra.GetXoaPoolArgs{
			NameLabel: "Your pool",
		}, nil)
		if err != nil {
			return err
		}
		user, err := xenorchestra.GetXoaUser(ctx, &xenorchestra.GetXoaUserArgs{
			Username: "my-username",
		}, nil)
		if err != nil {
			return err
		}
		_, err = xenorchestra.NewAcl(ctx, "acl", &xenorchestra.AclArgs{
			Subject: pulumi.String(user.Id),
			Object:  pulumi.String(pool.Id),
			Action:  pulumi.String("operator"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Xenorchestra = Pulumi.Xenorchestra;

return await Deployment.RunAsync(() => 
{
    var pool = Xenorchestra.GetXoaPool.Invoke(new()
    {
        NameLabel = "Your pool",
    });

    var user = Xenorchestra.GetXoaUser.Invoke(new()
    {
        Username = "my-username",
    });

    var acl = new Xenorchestra.Acl("acl", new()
    {
        Subject = user.Apply(getXoaUserResult => getXoaUserResult.Id),
        Object = pool.Apply(getXoaPoolResult => getXoaPoolResult.Id),
        Action = "operator",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.xenorchestra.XenorchestraFunctions;
import com.pulumi.xenorchestra.inputs.GetXoaPoolArgs;
import com.pulumi.xenorchestra.inputs.GetXoaUserArgs;
import com.pulumi.xenorchestra.Acl;
import com.pulumi.xenorchestra.AclArgs;
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 pool = XenorchestraFunctions.getXoaPool(GetXoaPoolArgs.builder()
            .nameLabel("Your pool")
            .build());

        final var user = XenorchestraFunctions.getXoaUser(GetXoaUserArgs.builder()
            .username("my-username")
            .build());

        var acl = new Acl("acl", AclArgs.builder()
            .subject(user.applyValue(getXoaUserResult -> getXoaUserResult.id()))
            .object(pool.applyValue(getXoaPoolResult -> getXoaPoolResult.id()))
            .action("operator")
            .build());

    }
}
Copy
resources:
  acl:
    type: xenorchestra:Acl
    properties:
      subject: ${user.id}
      object: ${pool.id}
      action: operator
variables:
  pool:
    fn::invoke:
      function: xenorchestra:getXoaPool
      arguments:
        nameLabel: Your pool
  user:
    fn::invoke:
      function: xenorchestra:getXoaUser
      arguments:
        username: my-username
Copy

Create Acl Resource

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

Constructor syntax

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

@overload
def Acl(resource_name: str,
        opts: Optional[ResourceOptions] = None,
        action: Optional[str] = None,
        object: Optional[str] = None,
        subject: Optional[str] = None)
func NewAcl(ctx *Context, name string, args AclArgs, opts ...ResourceOption) (*Acl, error)
public Acl(string name, AclArgs args, CustomResourceOptions? opts = null)
public Acl(String name, AclArgs args)
public Acl(String name, AclArgs args, CustomResourceOptions options)
type: xenorchestra:Acl
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. AclArgs
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. AclArgs
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. AclArgs
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. AclArgs
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. AclArgs
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 aclResource = new Xenorchestra.Acl("aclResource", new()
{
    Action = "string",
    Object = "string",
    Subject = "string",
});
Copy
example, err := xenorchestra.NewAcl(ctx, "aclResource", &xenorchestra.AclArgs{
	Action:  pulumi.String("string"),
	Object:  pulumi.String("string"),
	Subject: pulumi.String("string"),
})
Copy
var aclResource = new Acl("aclResource", AclArgs.builder()
    .action("string")
    .object("string")
    .subject("string")
    .build());
Copy
acl_resource = xenorchestra.Acl("aclResource",
    action="string",
    object="string",
    subject="string")
Copy
const aclResource = new xenorchestra.Acl("aclResource", {
    action: "string",
    object: "string",
    subject: "string",
});
Copy
type: xenorchestra:Acl
properties:
    action: string
    object: string
    subject: string
Copy

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

Action
This property is required.
Changes to this property will trigger replacement.
string
Must be one of admin, operator, viewer. See the Xen orchestra docs on ACLs for more details.
Object
This property is required.
Changes to this property will trigger replacement.
string
The id of the object that will be able to be used by the subject.
Subject
This property is required.
Changes to this property will trigger replacement.
string
The uuid of the user account that the acl will apply to.
Action
This property is required.
Changes to this property will trigger replacement.
string
Must be one of admin, operator, viewer. See the Xen orchestra docs on ACLs for more details.
Object
This property is required.
Changes to this property will trigger replacement.
string
The id of the object that will be able to be used by the subject.
Subject
This property is required.
Changes to this property will trigger replacement.
string
The uuid of the user account that the acl will apply to.
action
This property is required.
Changes to this property will trigger replacement.
String
Must be one of admin, operator, viewer. See the Xen orchestra docs on ACLs for more details.
object
This property is required.
Changes to this property will trigger replacement.
String
The id of the object that will be able to be used by the subject.
subject
This property is required.
Changes to this property will trigger replacement.
String
The uuid of the user account that the acl will apply to.
action
This property is required.
Changes to this property will trigger replacement.
string
Must be one of admin, operator, viewer. See the Xen orchestra docs on ACLs for more details.
object
This property is required.
Changes to this property will trigger replacement.
string
The id of the object that will be able to be used by the subject.
subject
This property is required.
Changes to this property will trigger replacement.
string
The uuid of the user account that the acl will apply to.
action
This property is required.
Changes to this property will trigger replacement.
str
Must be one of admin, operator, viewer. See the Xen orchestra docs on ACLs for more details.
object
This property is required.
Changes to this property will trigger replacement.
str
The id of the object that will be able to be used by the subject.
subject
This property is required.
Changes to this property will trigger replacement.
str
The uuid of the user account that the acl will apply to.
action
This property is required.
Changes to this property will trigger replacement.
String
Must be one of admin, operator, viewer. See the Xen orchestra docs on ACLs for more details.
object
This property is required.
Changes to this property will trigger replacement.
String
The id of the object that will be able to be used by the subject.
subject
This property is required.
Changes to this property will trigger replacement.
String
The uuid of the user account that the acl will apply to.

Outputs

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

Get an existing Acl 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?: AclState, opts?: CustomResourceOptions): Acl
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        action: Optional[str] = None,
        object: Optional[str] = None,
        subject: Optional[str] = None) -> Acl
func GetAcl(ctx *Context, name string, id IDInput, state *AclState, opts ...ResourceOption) (*Acl, error)
public static Acl Get(string name, Input<string> id, AclState? state, CustomResourceOptions? opts = null)
public static Acl get(String name, Output<String> id, AclState state, CustomResourceOptions options)
resources:  _:    type: xenorchestra:Acl    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:
Action Changes to this property will trigger replacement. string
Must be one of admin, operator, viewer. See the Xen orchestra docs on ACLs for more details.
Object Changes to this property will trigger replacement. string
The id of the object that will be able to be used by the subject.
Subject Changes to this property will trigger replacement. string
The uuid of the user account that the acl will apply to.
Action Changes to this property will trigger replacement. string
Must be one of admin, operator, viewer. See the Xen orchestra docs on ACLs for more details.
Object Changes to this property will trigger replacement. string
The id of the object that will be able to be used by the subject.
Subject Changes to this property will trigger replacement. string
The uuid of the user account that the acl will apply to.
action Changes to this property will trigger replacement. String
Must be one of admin, operator, viewer. See the Xen orchestra docs on ACLs for more details.
object Changes to this property will trigger replacement. String
The id of the object that will be able to be used by the subject.
subject Changes to this property will trigger replacement. String
The uuid of the user account that the acl will apply to.
action Changes to this property will trigger replacement. string
Must be one of admin, operator, viewer. See the Xen orchestra docs on ACLs for more details.
object Changes to this property will trigger replacement. string
The id of the object that will be able to be used by the subject.
subject Changes to this property will trigger replacement. string
The uuid of the user account that the acl will apply to.
action Changes to this property will trigger replacement. str
Must be one of admin, operator, viewer. See the Xen orchestra docs on ACLs for more details.
object Changes to this property will trigger replacement. str
The id of the object that will be able to be used by the subject.
subject Changes to this property will trigger replacement. str
The uuid of the user account that the acl will apply to.
action Changes to this property will trigger replacement. String
Must be one of admin, operator, viewer. See the Xen orchestra docs on ACLs for more details.
object Changes to this property will trigger replacement. String
The id of the object that will be able to be used by the subject.
subject Changes to this property will trigger replacement. String
The uuid of the user account that the acl will apply to.

Package Details

Repository
xenorchestra vatesfr/pulumi-xenorchestra
License
Apache-2.0
Notes
This Pulumi package is based on the xenorchestra Terraform Provider.