1. Packages
  2. Packages
  3. Nutanix
  4. API Docs
  5. getAuthorizationPoliciesV2
Viewing docs for Nutanix v0.16.0
published on Tuesday, May 26, 2026 by Piers Karsenbarg
nutanix logo
Viewing docs for Nutanix v0.16.0
published on Tuesday, May 26, 2026 by Piers Karsenbarg

    Provides a datasource to retrieve the list of existing Authorization Policies.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as nutanix from "@pierskarsenbarg/nutanix";
    
    //list of authorization policies, with limit and filter
    const filtered_ap = nutanix.getAuthorizationPoliciesV2({
        filter: "displayName eq 'auth_policy_example'",
        limit: 2,
    });
    // list of authorization policies, with select
    const select_ap = nutanix.getAuthorizationPoliciesV2({
        select: "extId,displayName,description,authorizationPolicyType",
    });
    
    import pulumi
    import pulumi_nutanix as nutanix
    
    #list of authorization policies, with limit and filter
    filtered_ap = nutanix.get_authorization_policies_v2(filter="displayName eq 'auth_policy_example'",
        limit=2)
    # list of authorization policies, with select
    select_ap = nutanix.get_authorization_policies_v2(select="extId,displayName,description,authorizationPolicyType")
    
    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 {
    		// list of authorization policies, with limit and filter
    		_, err := nutanix.GetAuthorizationPoliciesV2(ctx, &nutanix.GetAuthorizationPoliciesV2Args{
    			Filter: pulumi.StringRef("displayName eq 'auth_policy_example'"),
    			Limit:  pulumi.IntRef(2),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		// list of authorization policies, with select
    		_, err = nutanix.GetAuthorizationPoliciesV2(ctx, &nutanix.GetAuthorizationPoliciesV2Args{
    			Select: pulumi.StringRef("extId,displayName,description,authorizationPolicyType"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nutanix = PiersKarsenbarg.Nutanix;
    
    return await Deployment.RunAsync(() => 
    {
        //list of authorization policies, with limit and filter
        var filtered_ap = Nutanix.GetAuthorizationPoliciesV2.Invoke(new()
        {
            Filter = "displayName eq 'auth_policy_example'",
            Limit = 2,
        });
    
        // list of authorization policies, with select
        var select_ap = Nutanix.GetAuthorizationPoliciesV2.Invoke(new()
        {
            Select = "extId,displayName,description,authorizationPolicyType",
        });
    
    });
    
    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.GetAuthorizationPoliciesV2Args;
    import java.util.ArrayList;
    import java.util.Arrays;
    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) {
            //list of authorization policies, with limit and filter
            final var filtered-ap = NutanixFunctions.getAuthorizationPoliciesV2(GetAuthorizationPoliciesV2Args.builder()
                .filter("displayName eq 'auth_policy_example'")
                .limit(2)
                .build());
    
            // list of authorization policies, with select
            final var select-ap = NutanixFunctions.getAuthorizationPoliciesV2(GetAuthorizationPoliciesV2Args.builder()
                .select("extId,displayName,description,authorizationPolicyType")
                .build());
    
        }
    }
    
    variables:
      #list of authorization policies, with limit and filter
      filtered-ap:
        fn::invoke:
          function: nutanix:getAuthorizationPoliciesV2
          arguments:
            filter: displayName eq 'auth_policy_example'
            limit: 2
      # list of authorization policies, with select
      select-ap:
        fn::invoke:
          function: nutanix:getAuthorizationPoliciesV2
          arguments:
            select: extId,displayName,description,authorizationPolicyType
    
    pulumi {
      required_providers {
        nutanix = {
          source = "pulumi/nutanix"
        }
      }
    }
    
    data "nutanix_getauthorizationpoliciesv2" "filtered-ap" {
      filter = "displayName eq 'auth_policy_example'"
      limit  = 2
    }
    data "nutanix_getauthorizationpoliciesv2" "select-ap" {
      select = "extId,displayName,description,authorizationPolicyType"
    }
    
    #list of authorization policies, with limit and filter
    # list of authorization policies, with select
    

    Authorization Policies

    The following attributes are exported for each Authorization Policy:

    • extId: extId of Authorization policy.
    • links: 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.
    • displayName: Name of the Authorization Policy.
    • description: Description of the Authorization Policy.
    • clientName: Client that created the entity.
    • identities: The identities for which the Authorization Policy is created.
    • entities: The entities being qualified by the Authorization Policy.
    • role: The Role associated with the Authorization Policy.
    • createdTime: The creation time of the Authorization Policy.
    • lastUpdatedTime: The time when the Authorization Policy was last updated.
    • createdBy: User or Service Name that created the Authorization Policy.
    • isSystemDefined: Flag identifying if the Authorization Policy is system defined or not.
    • authorizationPolicyType: Type of Authorization Policy.
      • PREDEFINED_READ_ONLY : System-defined read-only ACP, i.e. no modifications allowed.
      • SERVICE_DEFINED_READ_ONLY : Read-only ACP defined by a service.
      • PREDEFINED_UPDATE_IDENTITY_ONLY : System-defined ACP prohibiting any modifications from customer.
      • SERVICE_DEFINED : ACP defined by a service.
      • USER_DEFINED : ACP defined by an User.

    The links attribute supports the following:

    • href: - The URL at which the entity described by the link can be accessed.
    • rel: - A name that identifies the relationship of the link to the object that is returned by the URL. The unique value of “self” identifies the URL for the object

    See detailed information in Nutanix List Authorization Policies v4.

    Using getAuthorizationPoliciesV2

    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 getAuthorizationPoliciesV2(args: GetAuthorizationPoliciesV2Args, opts?: InvokeOptions): Promise<GetAuthorizationPoliciesV2Result>
    function getAuthorizationPoliciesV2Output(args: GetAuthorizationPoliciesV2OutputArgs, opts?: InvokeOptions): Output<GetAuthorizationPoliciesV2Result>
    def get_authorization_policies_v2(expand: Optional[str] = None,
                                      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) -> GetAuthorizationPoliciesV2Result
    def get_authorization_policies_v2_output(expand: pulumi.Input[Optional[str]] = None,
                                      filter: pulumi.Input[Optional[str]] = None,
                                      limit: pulumi.Input[Optional[int]] = None,
                                      order_by: pulumi.Input[Optional[str]] = None,
                                      page: pulumi.Input[Optional[int]] = None,
                                      select: pulumi.Input[Optional[str]] = None,
                                      opts: Optional[InvokeOptions] = None) -> Output[GetAuthorizationPoliciesV2Result]
    func GetAuthorizationPoliciesV2(ctx *Context, args *GetAuthorizationPoliciesV2Args, opts ...InvokeOption) (*GetAuthorizationPoliciesV2Result, error)
    func GetAuthorizationPoliciesV2Output(ctx *Context, args *GetAuthorizationPoliciesV2OutputArgs, opts ...InvokeOption) GetAuthorizationPoliciesV2ResultOutput

    > Note: This function is named GetAuthorizationPoliciesV2 in the Go SDK.

    public static class GetAuthorizationPoliciesV2 
    {
        public static Task<GetAuthorizationPoliciesV2Result> InvokeAsync(GetAuthorizationPoliciesV2Args args, InvokeOptions? opts = null)
        public static Output<GetAuthorizationPoliciesV2Result> Invoke(GetAuthorizationPoliciesV2InvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAuthorizationPoliciesV2Result> getAuthorizationPoliciesV2(GetAuthorizationPoliciesV2Args args, InvokeOptions options)
    public static Output<GetAuthorizationPoliciesV2Result> getAuthorizationPoliciesV2(GetAuthorizationPoliciesV2Args args, InvokeOptions options)
    
    fn::invoke:
      function: nutanix:index/getAuthorizationPoliciesV2:getAuthorizationPoliciesV2
      arguments:
        # arguments dictionary
    data "nutanix_getauthorizationpoliciesv2" "name" {
        # arguments
    }

    The following arguments are supported:

    Expand string
    A URL query parameter that allows clients to request related resources when a resource that satisfies a particular request is retrieved. Each expanded item is evaluated relative to the entity containing the property being expanded. Other query options can be applied to an expanded property by appending a semicolon-separated list of query options, enclosed in parentheses, to the property name. Permissible system query options are $filter, $select and $orderby. The following expansion keys are supported:

    • role
    Filter string
    A URL query parameter that allows clients to filter a collection of resources. The filter can be applied to the following fields:

    • authorizationPolicyType
    • clientName
    • createdBy
    • createdTime
    • displayName
    • extId
    • isSystemDefined
    • lastUpdatedTime
    • role
    Limit int
    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.
    OrderBy string
    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. The orderby can be applied to the following fields:

    • createdTime
    • displayName
    • extId
    • lastUpdatedTime
    • role
    Page int
    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.
    Select string
    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. The select can be applied to the following fields:

    • authorizationPolicyType
    • authorizationPolicyType
    • clientName
    • createdBy
    • createdTime
    • description
    • displayName
    • entities
    • extId
    • identities
    • isSystemDefined
    • lastUpdatedTime
    • links
    • role
    • tenantId
    Expand string
    A URL query parameter that allows clients to request related resources when a resource that satisfies a particular request is retrieved. Each expanded item is evaluated relative to the entity containing the property being expanded. Other query options can be applied to an expanded property by appending a semicolon-separated list of query options, enclosed in parentheses, to the property name. Permissible system query options are $filter, $select and $orderby. The following expansion keys are supported:

    • role
    Filter string
    A URL query parameter that allows clients to filter a collection of resources. The filter can be applied to the following fields:

    • authorizationPolicyType
    • clientName
    • createdBy
    • createdTime
    • displayName
    • extId
    • isSystemDefined
    • lastUpdatedTime
    • role
    Limit int
    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.
    OrderBy string
    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. The orderby can be applied to the following fields:

    • createdTime
    • displayName
    • extId
    • lastUpdatedTime
    • role
    Page int
    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.
    Select string
    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. The select can be applied to the following fields:

    • authorizationPolicyType
    • authorizationPolicyType
    • clientName
    • createdBy
    • createdTime
    • description
    • displayName
    • entities
    • extId
    • identities
    • isSystemDefined
    • lastUpdatedTime
    • links
    • role
    • tenantId
    expand string
    A URL query parameter that allows clients to request related resources when a resource that satisfies a particular request is retrieved. Each expanded item is evaluated relative to the entity containing the property being expanded. Other query options can be applied to an expanded property by appending a semicolon-separated list of query options, enclosed in parentheses, to the property name. Permissible system query options are $filter, $select and $orderby. The following expansion keys are supported:

    • role
    filter string
    A URL query parameter that allows clients to filter a collection of resources. The filter can be applied to the following fields:

    • authorizationPolicyType
    • clientName
    • createdBy
    • createdTime
    • displayName
    • extId
    • isSystemDefined
    • lastUpdatedTime
    • role
    limit number
    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.
    order_by string
    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. The orderby can be applied to the following fields:

    • createdTime
    • displayName
    • extId
    • lastUpdatedTime
    • role
    page number
    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.
    select string
    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. The select can be applied to the following fields:

    • authorizationPolicyType
    • authorizationPolicyType
    • clientName
    • createdBy
    • createdTime
    • description
    • displayName
    • entities
    • extId
    • identities
    • isSystemDefined
    • lastUpdatedTime
    • links
    • role
    • tenantId
    expand String
    A URL query parameter that allows clients to request related resources when a resource that satisfies a particular request is retrieved. Each expanded item is evaluated relative to the entity containing the property being expanded. Other query options can be applied to an expanded property by appending a semicolon-separated list of query options, enclosed in parentheses, to the property name. Permissible system query options are $filter, $select and $orderby. The following expansion keys are supported:

    • role
    filter String
    A URL query parameter that allows clients to filter a collection of resources. The filter can be applied to the following fields:

    • authorizationPolicyType
    • clientName
    • createdBy
    • createdTime
    • displayName
    • extId
    • isSystemDefined
    • lastUpdatedTime
    • role
    limit Integer
    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.
    orderBy String
    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. The orderby can be applied to the following fields:

    • createdTime
    • displayName
    • extId
    • lastUpdatedTime
    • role
    page Integer
    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.
    select String
    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. The select can be applied to the following fields:

    • authorizationPolicyType
    • authorizationPolicyType
    • clientName
    • createdBy
    • createdTime
    • description
    • displayName
    • entities
    • extId
    • identities
    • isSystemDefined
    • lastUpdatedTime
    • links
    • role
    • tenantId
    expand string
    A URL query parameter that allows clients to request related resources when a resource that satisfies a particular request is retrieved. Each expanded item is evaluated relative to the entity containing the property being expanded. Other query options can be applied to an expanded property by appending a semicolon-separated list of query options, enclosed in parentheses, to the property name. Permissible system query options are $filter, $select and $orderby. The following expansion keys are supported:

    • role
    filter string
    A URL query parameter that allows clients to filter a collection of resources. The filter can be applied to the following fields:

    • authorizationPolicyType
    • clientName
    • createdBy
    • createdTime
    • displayName
    • extId
    • isSystemDefined
    • lastUpdatedTime
    • role
    limit number
    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.
    orderBy string
    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. The orderby can be applied to the following fields:

    • createdTime
    • displayName
    • extId
    • lastUpdatedTime
    • role
    page number
    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.
    select string
    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. The select can be applied to the following fields:

    • authorizationPolicyType
    • authorizationPolicyType
    • clientName
    • createdBy
    • createdTime
    • description
    • displayName
    • entities
    • extId
    • identities
    • isSystemDefined
    • lastUpdatedTime
    • links
    • role
    • tenantId
    expand str
    A URL query parameter that allows clients to request related resources when a resource that satisfies a particular request is retrieved. Each expanded item is evaluated relative to the entity containing the property being expanded. Other query options can be applied to an expanded property by appending a semicolon-separated list of query options, enclosed in parentheses, to the property name. Permissible system query options are $filter, $select and $orderby. The following expansion keys are supported:

    • role
    filter str
    A URL query parameter that allows clients to filter a collection of resources. The filter can be applied to the following fields:

    • authorizationPolicyType
    • clientName
    • createdBy
    • createdTime
    • displayName
    • extId
    • isSystemDefined
    • lastUpdatedTime
    • role
    limit int
    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.
    order_by str
    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. The orderby can be applied to the following fields:

    • createdTime
    • displayName
    • extId
    • lastUpdatedTime
    • role
    page int
    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.
    select str
    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. The select can be applied to the following fields:

    • authorizationPolicyType
    • authorizationPolicyType
    • clientName
    • createdBy
    • createdTime
    • description
    • displayName
    • entities
    • extId
    • identities
    • isSystemDefined
    • lastUpdatedTime
    • links
    • role
    • tenantId
    expand String
    A URL query parameter that allows clients to request related resources when a resource that satisfies a particular request is retrieved. Each expanded item is evaluated relative to the entity containing the property being expanded. Other query options can be applied to an expanded property by appending a semicolon-separated list of query options, enclosed in parentheses, to the property name. Permissible system query options are $filter, $select and $orderby. The following expansion keys are supported:

    • role
    filter String
    A URL query parameter that allows clients to filter a collection of resources. The filter can be applied to the following fields:

    • authorizationPolicyType
    • clientName
    • createdBy
    • createdTime
    • displayName
    • extId
    • isSystemDefined
    • lastUpdatedTime
    • role
    limit Number
    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.
    orderBy String
    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. The orderby can be applied to the following fields:

    • createdTime
    • displayName
    • extId
    • lastUpdatedTime
    • role
    page Number
    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.
    select String
    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. The select can be applied to the following fields:

    • authorizationPolicyType
    • authorizationPolicyType
    • clientName
    • createdBy
    • createdTime
    • description
    • displayName
    • entities
    • extId
    • identities
    • isSystemDefined
    • lastUpdatedTime
    • links
    • role
    • tenantId

    getAuthorizationPoliciesV2 Result

    The following output properties are available:

    AuthPolicies List<PiersKarsenbarg.Nutanix.Outputs.GetAuthorizationPoliciesV2AuthPolicy>
    List of all existing Authorization Policies.
    Id string
    The provider-assigned unique ID for this managed resource.
    Expand string
    Filter string
    Limit int
    OrderBy string
    Page int
    Select string
    AuthPolicies []GetAuthorizationPoliciesV2AuthPolicy
    List of all existing Authorization Policies.
    Id string
    The provider-assigned unique ID for this managed resource.
    Expand string
    Filter string
    Limit int
    OrderBy string
    Page int
    Select string
    auth_policies list(object)
    List of all existing Authorization Policies.
    id string
    The provider-assigned unique ID for this managed resource.
    expand string
    filter string
    limit number
    order_by string
    page number
    select string
    authPolicies List<GetAuthorizationPoliciesV2AuthPolicy>
    List of all existing Authorization Policies.
    id String
    The provider-assigned unique ID for this managed resource.
    expand String
    filter String
    limit Integer
    orderBy String
    page Integer
    select String
    authPolicies GetAuthorizationPoliciesV2AuthPolicy[]
    List of all existing Authorization Policies.
    id string
    The provider-assigned unique ID for this managed resource.
    expand string
    filter string
    limit number
    orderBy string
    page number
    select string
    auth_policies Sequence[GetAuthorizationPoliciesV2AuthPolicy]
    List of all existing Authorization Policies.
    id str
    The provider-assigned unique ID for this managed resource.
    expand str
    filter str
    limit int
    order_by str
    page int
    select str
    authPolicies List<Property Map>
    List of all existing Authorization Policies.
    id String
    The provider-assigned unique ID for this managed resource.
    expand String
    filter String
    limit Number
    orderBy String
    page Number
    select String

    Supporting Types

    GetAuthorizationPoliciesV2AuthPolicy

    GetAuthorizationPoliciesV2AuthPolicyEntity

    Reserved string
    Reserved string
    reserved string
    reserved String
    reserved string
    reserved String

    GetAuthorizationPoliciesV2AuthPolicyIdentity

    Reserved string
    Reserved string
    reserved string
    reserved String
    reserved string
    reserved String

    Package Details

    Repository
    nutanix pierskarsenbarg/pulumi-nutanix
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the nutanix Terraform Provider.
    nutanix logo
    Viewing docs for Nutanix v0.16.0
    published on Tuesday, May 26, 2026 by Piers Karsenbarg

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial