Nutanix v0.7.4 published on Friday, Mar 21, 2025 by Piers Karsenbarg
nutanix.getRolesV2
Explore with Pulumi AI
Describes a List all the Role(s).
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as nutanix from "@pulumi/nutanix";
const roles = nutanix.getRolesV2({});
const test = nutanix.getRolesV2({
    filter: "displayName eq 'example_role'",
});
import pulumi
import pulumi_nutanix as nutanix
roles = nutanix.get_roles_v2()
test = nutanix.get_roles_v2(filter="displayName eq 'example_role'")
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 {
		_, err := nutanix.LookupRolesV2(ctx, &nutanix.LookupRolesV2Args{}, nil)
		if err != nil {
			return err
		}
		_, err = nutanix.LookupRolesV2(ctx, &nutanix.LookupRolesV2Args{
			Filter: pulumi.StringRef("displayName eq 'example_role'"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nutanix = Pulumi.Nutanix;
return await Deployment.RunAsync(() => 
{
    var roles = Nutanix.GetRolesV2.Invoke();
    var test = Nutanix.GetRolesV2.Invoke(new()
    {
        Filter = "displayName eq 'example_role'",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.nutanix.NutanixFunctions;
import com.pulumi.nutanix.inputs.GetRolesV2Args;
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 roles = NutanixFunctions.getRolesV2();
        final var test = NutanixFunctions.getRolesV2(GetRolesV2Args.builder()
            .filter("displayName eq 'example_role'")
            .build());
    }
}
variables:
  roles:
    fn::invoke:
      function: nutanix:getRolesV2
      arguments: {}
  test:
    fn::invoke:
      function: nutanix:getRolesV2
      arguments:
        filter: displayName eq 'example_role'
Argument Reference
The following arguments are supported:
- page: - A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results.
- limit: A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set.
- filter:A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the OData V4.01 URL conventions. For example, filter ‘$filter=name eq ‘karbon-ntnx-1.0’ would filter the result on cluster name ‘karbon-ntnx1.0’, filter ‘$filter=startswith(name, ‘C’)’ would filter on cluster name starting with ‘C’. The filter can be applied to the following fields: clientName, createdBy, extId, createdTime, displayName, extId, isSystemDefined, lastUpdatedTime.
- orderby: A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default. For example, ‘$orderby=templateName desc’ would get all templates sorted by templateName in descending order. The orderby can be applied to the following fields: createdTime, distinguishedName, displayName, extId, lastUpdatedTime.
- select: A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the OData V4.01 URL conventions. If a $select expression consists of a single select item that is an asterisk (i.e., *), then all properties on the matching resource will be returned. following fields: accessibleClients, accessibleEntityTypes, assignedUserGroupsCount, assignedUsersCount, clientName, createdBy, createdTime, description, displayName, extId, isSystemDefined, lastUpdatedTime, links, operations, tenantId.
Using getRolesV2
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 getRolesV2(args: GetRolesV2Args, opts?: InvokeOptions): Promise<GetRolesV2Result>
function getRolesV2Output(args: GetRolesV2OutputArgs, opts?: InvokeOptions): Output<GetRolesV2Result>def get_roles_v2(filter: Optional[str] = None,
                 limit: Optional[int] = None,
                 order_by: Optional[str] = None,
                 page: Optional[int] = None,
                 select: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetRolesV2Result
def get_roles_v2_output(filter: Optional[pulumi.Input[str]] = None,
                 limit: Optional[pulumi.Input[int]] = None,
                 order_by: Optional[pulumi.Input[str]] = None,
                 page: Optional[pulumi.Input[int]] = None,
                 select: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetRolesV2Result]func LookupRolesV2(ctx *Context, args *LookupRolesV2Args, opts ...InvokeOption) (*LookupRolesV2Result, error)
func LookupRolesV2Output(ctx *Context, args *LookupRolesV2OutputArgs, opts ...InvokeOption) LookupRolesV2ResultOutput> Note: This function is named LookupRolesV2 in the Go SDK.
public static class GetRolesV2 
{
    public static Task<GetRolesV2Result> InvokeAsync(GetRolesV2Args args, InvokeOptions? opts = null)
    public static Output<GetRolesV2Result> Invoke(GetRolesV2InvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetRolesV2Result> getRolesV2(GetRolesV2Args args, InvokeOptions options)
public static Output<GetRolesV2Result> getRolesV2(GetRolesV2Args args, InvokeOptions options)
fn::invoke:
  function: nutanix:index/getRolesV2:getRolesV2
  arguments:
    # arguments dictionaryThe following arguments are supported:
getRolesV2 Result
The following output properties are available:
Supporting Types
GetRolesV2Role  
- AccessibleClients List<string>
- List of Accessible Clients for the Role.
 
- AccessibleEntity List<string>Types 
- List of Accessible Entity Types for the Role.
 
- AssignedUsers intCount 
- Number of Users assigned to given Role.
 
- AssignedUsers intGroups Count 
- Number of User Groups assigned to given Role.
 
- ClientName string
- Client that created the entity.
 
- CreatedBy string
- User or Service Name that created the Role.
 
- CreatedTime string
- The creation time of the Role.
 
- Description string
- Description of the Role.
 
- DisplayName string
- The display name for the Role.
 
- ExtId string
- A globally unique identifier of an instance that is suitable for external consumption.
 
- IsSystem boolDefined 
- Flag identifying if the Role is system defined or not.
 
- LastUpdated stringTime 
- The time when the Role was last updated.
 
- Links
List<PiersKarsenbarg. Nutanix. Inputs. Get Roles V2Role Link> 
- A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource.
 
- Operations List<string>
- List of operations for the role.
 
- TenantId string
- A globally unique identifier that represents the tenant that owns this entity. The system automatically assigns it, and it and is immutable from an API consumer perspective (some use cases may cause this Id to change - For instance, a use case may require the transfer of ownership of the entity, but these cases are handled automatically on the server).
 
- AccessibleClients []string
- List of Accessible Clients for the Role.
 
- AccessibleEntity []stringTypes 
- List of Accessible Entity Types for the Role.
 
- AssignedUsers intCount 
- Number of Users assigned to given Role.
 
- AssignedUsers intGroups Count 
- Number of User Groups assigned to given Role.
 
- ClientName string
- Client that created the entity.
 
- CreatedBy string
- User or Service Name that created the Role.
 
- CreatedTime string
- The creation time of the Role.
 
- Description string
- Description of the Role.
 
- DisplayName string
- The display name for the Role.
 
- ExtId string
- A globally unique identifier of an instance that is suitable for external consumption.
 
- IsSystem boolDefined 
- Flag identifying if the Role is system defined or not.
 
- LastUpdated stringTime 
- The time when the Role was last updated.
 
- Links
[]GetRoles V2Role Link 
- A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource.
 
- Operations []string
- List of operations for the role.
 
- TenantId string
- A globally unique identifier that represents the tenant that owns this entity. The system automatically assigns it, and it and is immutable from an API consumer perspective (some use cases may cause this Id to change - For instance, a use case may require the transfer of ownership of the entity, but these cases are handled automatically on the server).
 
- accessibleClients List<String>
- List of Accessible Clients for the Role.
 
- accessibleEntity List<String>Types 
- List of Accessible Entity Types for the Role.
 
- assignedUsers IntegerCount 
- Number of Users assigned to given Role.
 
- assignedUsers IntegerGroups Count 
- Number of User Groups assigned to given Role.
 
- clientName String
- Client that created the entity.
 
- createdBy String
- User or Service Name that created the Role.
 
- createdTime String
- The creation time of the Role.
 
- description String
- Description of the Role.
 
- displayName String
- The display name for the Role.
 
- extId String
- A globally unique identifier of an instance that is suitable for external consumption.
 
- isSystem BooleanDefined 
- Flag identifying if the Role is system defined or not.
 
- lastUpdated StringTime 
- The time when the Role was last updated.
 
- links
List<GetRoles V2Role Link> 
- A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource.
 
- operations List<String>
- List of operations for the role.
 
- tenantId String
- A globally unique identifier that represents the tenant that owns this entity. The system automatically assigns it, and it and is immutable from an API consumer perspective (some use cases may cause this Id to change - For instance, a use case may require the transfer of ownership of the entity, but these cases are handled automatically on the server).
 
- accessibleClients string[]
- List of Accessible Clients for the Role.
 
- accessibleEntity string[]Types 
- List of Accessible Entity Types for the Role.
 
- assignedUsers numberCount 
- Number of Users assigned to given Role.
 
- assignedUsers numberGroups Count 
- Number of User Groups assigned to given Role.
 
- clientName string
- Client that created the entity.
 
- createdBy string
- User or Service Name that created the Role.
 
- createdTime string
- The creation time of the Role.
 
- description string
- Description of the Role.
 
- displayName string
- The display name for the Role.
 
- extId string
- A globally unique identifier of an instance that is suitable for external consumption.
 
- isSystem booleanDefined 
- Flag identifying if the Role is system defined or not.
 
- lastUpdated stringTime 
- The time when the Role was last updated.
 
- links
GetRoles V2Role Link[] 
- A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource.
 
- operations string[]
- List of operations for the role.
 
- tenantId string
- A globally unique identifier that represents the tenant that owns this entity. The system automatically assigns it, and it and is immutable from an API consumer perspective (some use cases may cause this Id to change - For instance, a use case may require the transfer of ownership of the entity, but these cases are handled automatically on the server).
 
- accessible_clients Sequence[str]
- List of Accessible Clients for the Role.
 
- accessible_entity_ Sequence[str]types 
- List of Accessible Entity Types for the Role.
 
- assigned_users_ intcount 
- Number of Users assigned to given Role.
 
- assigned_users_ intgroups_ count 
- Number of User Groups assigned to given Role.
 
- client_name str
- Client that created the entity.
 
- created_by str
- User or Service Name that created the Role.
 
- created_time str
- The creation time of the Role.
 
- description str
- Description of the Role.
 
- display_name str
- The display name for the Role.
 
- ext_id str
- A globally unique identifier of an instance that is suitable for external consumption.
 
- is_system_ booldefined 
- Flag identifying if the Role is system defined or not.
 
- last_updated_ strtime 
- The time when the Role was last updated.
 
- links
Sequence[GetRoles V2Role Link] 
- A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource.
 
- operations Sequence[str]
- List of operations for the role.
 
- tenant_id str
- A globally unique identifier that represents the tenant that owns this entity. The system automatically assigns it, and it and is immutable from an API consumer perspective (some use cases may cause this Id to change - For instance, a use case may require the transfer of ownership of the entity, but these cases are handled automatically on the server).
 
- accessibleClients List<String>
- List of Accessible Clients for the Role.
 
- accessibleEntity List<String>Types 
- List of Accessible Entity Types for the Role.
 
- assignedUsers NumberCount 
- Number of Users assigned to given Role.
 
- assignedUsers NumberGroups Count 
- Number of User Groups assigned to given Role.
 
- clientName String
- Client that created the entity.
 
- createdBy String
- User or Service Name that created the Role.
 
- createdTime String
- The creation time of the Role.
 
- description String
- Description of the Role.
 
- displayName String
- The display name for the Role.
 
- extId String
- A globally unique identifier of an instance that is suitable for external consumption.
 
- isSystem BooleanDefined 
- Flag identifying if the Role is system defined or not.
 
- lastUpdated StringTime 
- The time when the Role was last updated.
 
- links List<Property Map>
- A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource.
 
- operations List<String>
- List of operations for the role.
 
- tenantId String
- A globally unique identifier that represents the tenant that owns this entity. The system automatically assigns it, and it and is immutable from an API consumer perspective (some use cases may cause this Id to change - For instance, a use case may require the transfer of ownership of the entity, but these cases are handled automatically on the server).
 
GetRolesV2RoleLink   
Package Details
- Repository
- nutanix pierskarsenbarg/pulumi-nutanix
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the nutanixTerraform Provider.
