1. Packages
  2. Nutanix
  3. API Docs
  4. getPermission
Nutanix v0.5.0 published on Monday, Nov 4, 2024 by Piers Karsenbarg

nutanix.getPermission

Explore with Pulumi AI

nutanix logo
Nutanix v0.5.0 published on Monday, Nov 4, 2024 by Piers Karsenbarg

    Describe a Nutanix Permission and its values (if it has them).

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as nutanix from "@pulumi/nutanix";
    
    const byuuid = nutanix.getPermission({
        permissionId: "26b81a55-2bca-48c6-9fab-4f82c6bb4284",
    });
    const byname = nutanix.getPermission({
        permissionName: "Access_Console_Virtual_Machine",
    });
    
    import pulumi
    import pulumi_nutanix as nutanix
    
    byuuid = nutanix.get_permission(permission_id="26b81a55-2bca-48c6-9fab-4f82c6bb4284")
    byname = nutanix.get_permission(permission_name="Access_Console_Virtual_Machine")
    
    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.GetPermission(ctx, &nutanix.GetPermissionArgs{
    			PermissionId: pulumi.StringRef("26b81a55-2bca-48c6-9fab-4f82c6bb4284"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = nutanix.GetPermission(ctx, &nutanix.GetPermissionArgs{
    			PermissionName: pulumi.StringRef("Access_Console_Virtual_Machine"),
    		}, 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 byuuid = Nutanix.GetPermission.Invoke(new()
        {
            PermissionId = "26b81a55-2bca-48c6-9fab-4f82c6bb4284",
        });
    
        var byname = Nutanix.GetPermission.Invoke(new()
        {
            PermissionName = "Access_Console_Virtual_Machine",
        });
    
    });
    
    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.GetPermissionArgs;
    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 byuuid = NutanixFunctions.getPermission(GetPermissionArgs.builder()
                .permissionId("26b81a55-2bca-48c6-9fab-4f82c6bb4284")
                .build());
    
            final var byname = NutanixFunctions.getPermission(GetPermissionArgs.builder()
                .permissionName("Access_Console_Virtual_Machine")
                .build());
    
        }
    }
    
    variables:
      byuuid:
        fn::invoke:
          Function: nutanix:getPermission
          Arguments:
            permissionId: 26b81a55-2bca-48c6-9fab-4f82c6bb4284
      byname:
        fn::invoke:
          Function: nutanix:getPermission
          Arguments:
            permissionName: Access_Console_Virtual_Machine
    

    Using getPermission

    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 getPermission(args: GetPermissionArgs, opts?: InvokeOptions): Promise<GetPermissionResult>
    function getPermissionOutput(args: GetPermissionOutputArgs, opts?: InvokeOptions): Output<GetPermissionResult>
    def get_permission(categories: Optional[Sequence[GetPermissionCategory]] = None,
                       permission_id: Optional[str] = None,
                       permission_name: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetPermissionResult
    def get_permission_output(categories: Optional[pulumi.Input[Sequence[pulumi.Input[GetPermissionCategoryArgs]]]] = None,
                       permission_id: Optional[pulumi.Input[str]] = None,
                       permission_name: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetPermissionResult]
    func GetPermission(ctx *Context, args *GetPermissionArgs, opts ...InvokeOption) (*GetPermissionResult, error)
    func GetPermissionOutput(ctx *Context, args *GetPermissionOutputArgs, opts ...InvokeOption) GetPermissionResultOutput

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

    public static class GetPermission 
    {
        public static Task<GetPermissionResult> InvokeAsync(GetPermissionArgs args, InvokeOptions? opts = null)
        public static Output<GetPermissionResult> Invoke(GetPermissionInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPermissionResult> getPermission(GetPermissionArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: nutanix:index/getPermission:getPermission
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Categories List<PiersKarsenbarg.Nutanix.Inputs.GetPermissionCategory>
    The categories for this resource.
    PermissionId string
    The id of the permission.
    PermissionName string
    The name of the permission.
    Categories []GetPermissionCategory
    The categories for this resource.
    PermissionId string
    The id of the permission.
    PermissionName string
    The name of the permission.
    categories List<GetPermissionCategory>
    The categories for this resource.
    permissionId String
    The id of the permission.
    permissionName String
    The name of the permission.
    categories GetPermissionCategory[]
    The categories for this resource.
    permissionId string
    The id of the permission.
    permissionName string
    The name of the permission.
    categories Sequence[GetPermissionCategory]
    The categories for this resource.
    permission_id str
    The id of the permission.
    permission_name str
    The name of the permission.
    categories List<Property Map>
    The categories for this resource.
    permissionId String
    The id of the permission.
    permissionName String
    The name of the permission.

    getPermission Result

    The following output properties are available:

    ApiVersion string
    Categories List<PiersKarsenbarg.Nutanix.Outputs.GetPermissionCategory>
    The categories for this resource.
    Description string
    A description for the permission.
    Fields List<PiersKarsenbarg.Nutanix.Outputs.GetPermissionField>
    . The fields that can/cannot be accessed during the specified operation. field_name_list will be a list of fields. e.g. if field_mode = disallowed, field_name_list = [“xyz”] then the list of allowed fields is ALL fields minus xyz. Seee Field for more info.
    Id string
    The provider-assigned unique ID for this managed resource.
    Kind string
    (Required) The kind name (Default value: project).
    Metadata Dictionary<string, string>
    The permission kind metadata.
    Name string
    the name.
    Operation string
    The operation that is being performed on a given kind.
    OwnerReference Dictionary<string, string>
    The reference to a user.
    ProjectReference Dictionary<string, string>
    The reference to a project.
    State string
    The state of the permission.
    PermissionId string
    PermissionName string
    ApiVersion string
    Categories []GetPermissionCategory
    The categories for this resource.
    Description string
    A description for the permission.
    Fields []GetPermissionField
    . The fields that can/cannot be accessed during the specified operation. field_name_list will be a list of fields. e.g. if field_mode = disallowed, field_name_list = [“xyz”] then the list of allowed fields is ALL fields minus xyz. Seee Field for more info.
    Id string
    The provider-assigned unique ID for this managed resource.
    Kind string
    (Required) The kind name (Default value: project).
    Metadata map[string]string
    The permission kind metadata.
    Name string
    the name.
    Operation string
    The operation that is being performed on a given kind.
    OwnerReference map[string]string
    The reference to a user.
    ProjectReference map[string]string
    The reference to a project.
    State string
    The state of the permission.
    PermissionId string
    PermissionName string
    apiVersion String
    categories List<GetPermissionCategory>
    The categories for this resource.
    description String
    A description for the permission.
    fields List<GetPermissionField>
    . The fields that can/cannot be accessed during the specified operation. field_name_list will be a list of fields. e.g. if field_mode = disallowed, field_name_list = [“xyz”] then the list of allowed fields is ALL fields minus xyz. Seee Field for more info.
    id String
    The provider-assigned unique ID for this managed resource.
    kind String
    (Required) The kind name (Default value: project).
    metadata Map<String,String>
    The permission kind metadata.
    name String
    the name.
    operation String
    The operation that is being performed on a given kind.
    ownerReference Map<String,String>
    The reference to a user.
    projectReference Map<String,String>
    The reference to a project.
    state String
    The state of the permission.
    permissionId String
    permissionName String
    apiVersion string
    categories GetPermissionCategory[]
    The categories for this resource.
    description string
    A description for the permission.
    fields GetPermissionField[]
    . The fields that can/cannot be accessed during the specified operation. field_name_list will be a list of fields. e.g. if field_mode = disallowed, field_name_list = [“xyz”] then the list of allowed fields is ALL fields minus xyz. Seee Field for more info.
    id string
    The provider-assigned unique ID for this managed resource.
    kind string
    (Required) The kind name (Default value: project).
    metadata {[key: string]: string}
    The permission kind metadata.
    name string
    the name.
    operation string
    The operation that is being performed on a given kind.
    ownerReference {[key: string]: string}
    The reference to a user.
    projectReference {[key: string]: string}
    The reference to a project.
    state string
    The state of the permission.
    permissionId string
    permissionName string
    api_version str
    categories Sequence[GetPermissionCategory]
    The categories for this resource.
    description str
    A description for the permission.
    fields Sequence[GetPermissionField]
    . The fields that can/cannot be accessed during the specified operation. field_name_list will be a list of fields. e.g. if field_mode = disallowed, field_name_list = [“xyz”] then the list of allowed fields is ALL fields minus xyz. Seee Field for more info.
    id str
    The provider-assigned unique ID for this managed resource.
    kind str
    (Required) The kind name (Default value: project).
    metadata Mapping[str, str]
    The permission kind metadata.
    name str
    the name.
    operation str
    The operation that is being performed on a given kind.
    owner_reference Mapping[str, str]
    The reference to a user.
    project_reference Mapping[str, str]
    The reference to a project.
    state str
    The state of the permission.
    permission_id str
    permission_name str
    apiVersion String
    categories List<Property Map>
    The categories for this resource.
    description String
    A description for the permission.
    fields List<Property Map>
    . The fields that can/cannot be accessed during the specified operation. field_name_list will be a list of fields. e.g. if field_mode = disallowed, field_name_list = [“xyz”] then the list of allowed fields is ALL fields minus xyz. Seee Field for more info.
    id String
    The provider-assigned unique ID for this managed resource.
    kind String
    (Required) The kind name (Default value: project).
    metadata Map<String>
    The permission kind metadata.
    name String
    the name.
    operation String
    The operation that is being performed on a given kind.
    ownerReference Map<String>
    The reference to a user.
    projectReference Map<String>
    The reference to a project.
    state String
    The state of the permission.
    permissionId String
    permissionName String

    Supporting Types

    GetPermissionCategory

    Name string
    the name.
    Value string
    value of the key.
    Name string
    the name.
    Value string
    value of the key.
    name String
    the name.
    value String
    value of the key.
    name string
    the name.
    value string
    value of the key.
    name str
    the name.
    value str
    value of the key.
    name String
    the name.
    value String
    value of the key.

    GetPermissionField

    FieldMode string
    Allow or disallow the fields mentioned.
    FieldNameLists List<string>
    The list of fields.
    FieldMode string
    Allow or disallow the fields mentioned.
    FieldNameLists []string
    The list of fields.
    fieldMode String
    Allow or disallow the fields mentioned.
    fieldNameLists List<String>
    The list of fields.
    fieldMode string
    Allow or disallow the fields mentioned.
    fieldNameLists string[]
    The list of fields.
    field_mode str
    Allow or disallow the fields mentioned.
    field_name_lists Sequence[str]
    The list of fields.
    fieldMode String
    Allow or disallow the fields mentioned.
    fieldNameLists List<String>
    The list of fields.

    Package Details

    Repository
    nutanix pierskarsenbarg/pulumi-nutanix
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the nutanix Terraform Provider.
    nutanix logo
    Nutanix v0.5.0 published on Monday, Nov 4, 2024 by Piers Karsenbarg