Viewing docs for Nutanix v0.11.0
published on Monday, Nov 24, 2025 by Piers Karsenbarg
published on Monday, Nov 24, 2025 by Piers Karsenbarg
Viewing docs for Nutanix v0.11.0
published on Monday, Nov 24, 2025 by Piers Karsenbarg
published on Monday, Nov 24, 2025 by Piers Karsenbarg
Describes a Role.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as nutanix from "@pierskarsenbarg/nutanix";
const testRole = new nutanix.Role("test", {
name: "NAME",
description: "DESCRIPTION",
permissionReferenceLists: [{
kind: "permission",
uuid: "ID OF PERMISSION",
}],
});
const test = nutanix.getRoleOutput({
roleId: testRole.id,
});
import pulumi
import pulumi_nutanix as nutanix
test_role = nutanix.Role("test",
name="NAME",
description="DESCRIPTION",
permission_reference_lists=[{
"kind": "permission",
"uuid": "ID OF PERMISSION",
}])
test = nutanix.get_role_output(role_id=test_role.id)
package main
import (
"github.com/pierskarsenbarg/pulumi-nutanix/sdk/go/nutanix"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
testRole, err := nutanix.NewRole(ctx, "test", &nutanix.RoleArgs{
Name: pulumi.String("NAME"),
Description: pulumi.String("DESCRIPTION"),
PermissionReferenceLists: nutanix.RolePermissionReferenceListArray{
&nutanix.RolePermissionReferenceListArgs{
Kind: pulumi.String("permission"),
Uuid: pulumi.String("ID OF PERMISSION"),
},
},
})
if err != nil {
return err
}
_ = nutanix.LookupRoleOutput(ctx, nutanix.GetRoleOutputArgs{
RoleId: testRole.ID(),
}, nil)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nutanix = PiersKarsenbarg.Nutanix;
using Nutanix = Pulumi.Nutanix;
return await Deployment.RunAsync(() =>
{
var testRole = new Nutanix.Role("test", new()
{
Name = "NAME",
Description = "DESCRIPTION",
PermissionReferenceLists = new[]
{
new Nutanix.Inputs.RolePermissionReferenceListArgs
{
Kind = "permission",
Uuid = "ID OF PERMISSION",
},
},
});
var test = Nutanix.GetRole.Invoke(new()
{
RoleId = testRole.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.nutanix.Role;
import com.pulumi.nutanix.RoleArgs;
import com.pulumi.nutanix.inputs.RolePermissionReferenceListArgs;
import com.pulumi.nutanix.NutanixFunctions;
import com.pulumi.nutanix.inputs.GetRoleArgs;
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) {
var testRole = new Role("testRole", RoleArgs.builder()
.name("NAME")
.description("DESCRIPTION")
.permissionReferenceLists(RolePermissionReferenceListArgs.builder()
.kind("permission")
.uuid("ID OF PERMISSION")
.build())
.build());
final var test = NutanixFunctions.getRole(GetRoleArgs.builder()
.roleId(testRole.id())
.build());
}
}
resources:
testRole:
type: nutanix:Role
name: test
properties:
name: NAME
description: DESCRIPTION
permissionReferenceLists:
- kind: permission
uuid: ID OF PERMISSION
variables:
test:
fn::invoke:
function: nutanix:getRole
arguments:
roleId: ${testRole.id}
Using getRole
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 getRole(args: GetRoleArgs, opts?: InvokeOptions): Promise<GetRoleResult>
function getRoleOutput(args: GetRoleOutputArgs, opts?: InvokeOptions): Output<GetRoleResult>def get_role(categories: Optional[Sequence[GetRoleCategory]] = None,
role_id: Optional[str] = None,
role_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetRoleResult
def get_role_output(categories: Optional[pulumi.Input[Sequence[pulumi.Input[GetRoleCategoryArgs]]]] = None,
role_id: Optional[pulumi.Input[str]] = None,
role_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetRoleResult]func LookupRole(ctx *Context, args *LookupRoleArgs, opts ...InvokeOption) (*LookupRoleResult, error)
func LookupRoleOutput(ctx *Context, args *LookupRoleOutputArgs, opts ...InvokeOption) LookupRoleResultOutput> Note: This function is named LookupRole in the Go SDK.
public static class GetRole
{
public static Task<GetRoleResult> InvokeAsync(GetRoleArgs args, InvokeOptions? opts = null)
public static Output<GetRoleResult> Invoke(GetRoleInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetRoleResult> getRole(GetRoleArgs args, InvokeOptions options)
public static Output<GetRoleResult> getRole(GetRoleArgs args, InvokeOptions options)
fn::invoke:
function: nutanix:index/getRole:getRole
arguments:
# arguments dictionaryThe following arguments are supported:
- Categories
List<Piers
Karsenbarg. Nutanix. Inputs. Get Role Category> - Categories for the Role.
- Role
Id string - (Optional) The UUID of a Role.
- Role
Name string - (Optional) The name of a Role.
- Categories
[]Get
Role Category - Categories for the Role.
- Role
Id string - (Optional) The UUID of a Role.
- Role
Name string - (Optional) The name of a Role.
- categories
List<Get
Role Category> - Categories for the Role.
- role
Id String - (Optional) The UUID of a Role.
- role
Name String - (Optional) The name of a Role.
- categories
Get
Role Category[] - Categories for the Role.
- role
Id string - (Optional) The UUID of a Role.
- role
Name string - (Optional) The name of a Role.
- categories
Sequence[Get
Role Category] - Categories for the Role.
- role_
id str - (Optional) The UUID of a Role.
- role_
name str - (Optional) The name of a Role.
- categories List<Property Map>
- Categories for the Role.
- role
Id String - (Optional) The UUID of a Role.
- role
Name String - (Optional) The name of a Role.
getRole Result
The following output properties are available:
- Api
Version string - The version of the API.
- Categories
List<Piers
Karsenbarg. Nutanix. Outputs. Get Role Category> - Categories for the Role.
- Description string
- The description of the Role.
- Id string
- The provider-assigned unique ID for this managed resource.
- Metadata Dictionary<string, string>
- The role kind metadata.
- Name string
- the name(Optional).
- Owner
Reference Dictionary<string, string> - The reference to a user.
- Permission
Reference List<PiersLists Karsenbarg. Nutanix. Outputs. Get Role Permission Reference List> - (Required) List of permission references.
- Project
Reference Dictionary<string, string> - The reference to a project.
- State string
- The state of the role.
- Role
Id string - Role
Name string
- Api
Version string - The version of the API.
- Categories
[]Get
Role Category - Categories for the Role.
- Description string
- The description of the Role.
- Id string
- The provider-assigned unique ID for this managed resource.
- Metadata map[string]string
- The role kind metadata.
- Name string
- the name(Optional).
- Owner
Reference map[string]string - The reference to a user.
- Permission
Reference []GetLists Role Permission Reference List - (Required) List of permission references.
- Project
Reference map[string]string - The reference to a project.
- State string
- The state of the role.
- Role
Id string - Role
Name string
- api
Version String - The version of the API.
- categories
List<Get
Role Category> - Categories for the Role.
- description String
- The description of the Role.
- id String
- The provider-assigned unique ID for this managed resource.
- metadata Map<String,String>
- The role kind metadata.
- name String
- the name(Optional).
- owner
Reference Map<String,String> - The reference to a user.
- permission
Reference List<GetLists Role Permission Reference List> - (Required) List of permission references.
- project
Reference Map<String,String> - The reference to a project.
- state String
- The state of the role.
- role
Id String - role
Name String
- api
Version string - The version of the API.
- categories
Get
Role Category[] - Categories for the Role.
- description string
- The description of the Role.
- id string
- The provider-assigned unique ID for this managed resource.
- metadata {[key: string]: string}
- The role kind metadata.
- name string
- the name(Optional).
- owner
Reference {[key: string]: string} - The reference to a user.
- permission
Reference GetLists Role Permission Reference List[] - (Required) List of permission references.
- project
Reference {[key: string]: string} - The reference to a project.
- state string
- The state of the role.
- role
Id string - role
Name string
- api_
version str - The version of the API.
- categories
Sequence[Get
Role Category] - Categories for the Role.
- description str
- The description of the Role.
- id str
- The provider-assigned unique ID for this managed resource.
- metadata Mapping[str, str]
- The role kind metadata.
- name str
- the name(Optional).
- owner_
reference Mapping[str, str] - The reference to a user.
- permission_
reference_ Sequence[Getlists Role Permission Reference List] - (Required) List of permission references.
- project_
reference Mapping[str, str] - The reference to a project.
- state str
- The state of the role.
- role_
id str - role_
name str
- api
Version String - The version of the API.
- categories List<Property Map>
- Categories for the Role.
- description String
- The description of the Role.
- id String
- The provider-assigned unique ID for this managed resource.
- metadata Map<String>
- The role kind metadata.
- name String
- the name(Optional).
- owner
Reference Map<String> - The reference to a user.
- permission
Reference List<Property Map>Lists - (Required) List of permission references.
- project
Reference Map<String> - The reference to a project.
- state String
- The state of the role.
- role
Id String - role
Name String
Supporting Types
GetRoleCategory
GetRolePermissionReferenceList
Package Details
- Repository
- nutanix pierskarsenbarg/pulumi-nutanix
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
nutanixTerraform Provider.
Viewing docs for Nutanix v0.11.0
published on Monday, Nov 24, 2025 by Piers Karsenbarg
published on Monday, Nov 24, 2025 by Piers Karsenbarg
