Nutanix v0.5.0 published on Monday, Nov 4, 2024 by Piers Karsenbarg
nutanix.getPermission
Explore with Pulumi AI
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 dictionaryThe following arguments are supported:
- Categories
List<Piers
Karsenbarg. Nutanix. Inputs. Get Permission Category>  - The categories for this resource.
 - Permission
Id string - The 
idof the permission. - Permission
Name string - The 
nameof the permission. 
- Categories
[]Get
Permission Category  - The categories for this resource.
 - Permission
Id string - The 
idof the permission. - Permission
Name string - The 
nameof the permission. 
- categories
List<Get
Permission Category>  - The categories for this resource.
 - permission
Id String - The 
idof the permission. - permission
Name String - The 
nameof the permission. 
- categories
Get
Permission Category[]  - The categories for this resource.
 - permission
Id string - The 
idof the permission. - permission
Name string - The 
nameof the permission. 
- categories
Sequence[Get
Permission Category]  - The categories for this resource.
 - permission_
id str - The 
idof the permission. - permission_
name str - The 
nameof the permission. 
- categories List<Property Map>
 - The categories for this resource.
 - permission
Id String - The 
idof the permission. - permission
Name String - The 
nameof the permission. 
getPermission Result
The following output properties are available:
- Api
Version string - Categories
List<Piers
Karsenbarg. Nutanix. Outputs. Get Permission Category>  - The categories for this resource.
 - Description string
 - A description for the permission.
 - Fields
List<Piers
Karsenbarg. Nutanix. Outputs. Get Permission Field>  - . 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.
 - Owner
Reference Dictionary<string, string> - The reference to a user.
 - Project
Reference Dictionary<string, string> - The reference to a project.
 - State string
 - The state of the permission.
 - Permission
Id string - Permission
Name string 
- Api
Version string - Categories
[]Get
Permission Category  - The categories for this resource.
 - Description string
 - A description for the permission.
 - Fields
[]Get
Permission Field  - . 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.
 - Owner
Reference map[string]string - The reference to a user.
 - Project
Reference map[string]string - The reference to a project.
 - State string
 - The state of the permission.
 - Permission
Id string - Permission
Name string 
- api
Version String - categories
List<Get
Permission Category>  - The categories for this resource.
 - description String
 - A description for the permission.
 - fields
List<Get
Permission Field>  - . 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.
 - owner
Reference Map<String,String> - The reference to a user.
 - project
Reference Map<String,String> - The reference to a project.
 - state String
 - The state of the permission.
 - permission
Id String - permission
Name String 
- api
Version string - categories
Get
Permission Category[]  - The categories for this resource.
 - description string
 - A description for the permission.
 - fields
Get
Permission Field[]  - . 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.
 - owner
Reference {[key: string]: string} - The reference to a user.
 - project
Reference {[key: string]: string} - The reference to a project.
 - state string
 - The state of the permission.
 - permission
Id string - permission
Name string 
- api_
version str - categories
Sequence[Get
Permission Category]  - The categories for this resource.
 - description str
 - A description for the permission.
 - fields
Sequence[Get
Permission Field]  - . 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 
- api
Version 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.
 - owner
Reference Map<String> - The reference to a user.
 - project
Reference Map<String> - The reference to a project.
 - state String
 - The state of the permission.
 - permission
Id String - permission
Name String 
Supporting Types
GetPermissionCategory  
GetPermissionField  
- Field
Mode string - Allow or disallow the fields mentioned.
 - Field
Name List<string>Lists  - The list of fields.
 
- Field
Mode string - Allow or disallow the fields mentioned.
 - Field
Name []stringLists  - The list of fields.
 
- field
Mode String - Allow or disallow the fields mentioned.
 - field
Name List<String>Lists  - The list of fields.
 
- field
Mode string - Allow or disallow the fields mentioned.
 - field
Name string[]Lists  - The list of fields.
 
- field_
mode str - Allow or disallow the fields mentioned.
 - field_
name_ Sequence[str]lists  - The list of fields.
 
- field
Mode String - Allow or disallow the fields mentioned.
 - field
Name List<String>Lists  - The list of fields.
 
Package Details
- Repository
 - nutanix pierskarsenbarg/pulumi-nutanix
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
nutanixTerraform Provider.