1. Packages
  2. Nutanix
  3. API Docs
  4. getUserKeyV2
Nutanix v0.10.0 published on Monday, Sep 1, 2025 by Piers Karsenbarg

nutanix.getUserKeyV2

Explore with Pulumi AI

nutanix logo
Nutanix v0.10.0 published on Monday, Sep 1, 2025 by Piers Karsenbarg

    Fetches the requested key through the provided external identifier for the user and the key.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as nutanix from "@pierskarsenbarg/nutanix";
    
    const getKey = nutanix.getUserKeyV2({
        extId: "<USER_KEY_UUID>",
        userExtId: "<SERVICE_ACCOUNT_UUID>",
    });
    
    import pulumi
    import pulumi_nutanix as nutanix
    
    get_key = nutanix.get_user_key_v2(ext_id="<USER_KEY_UUID>",
        user_ext_id="<SERVICE_ACCOUNT_UUID>")
    
    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.LookupUserKeyV2(ctx, &nutanix.LookupUserKeyV2Args{
    			ExtId:     "<USER_KEY_UUID>",
    			UserExtId: "<SERVICE_ACCOUNT_UUID>",
    		}, 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 getKey = Nutanix.GetUserKeyV2.Invoke(new()
        {
            ExtId = "<USER_KEY_UUID>",
            UserExtId = "<SERVICE_ACCOUNT_UUID>",
        });
    
    });
    
    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.GetUserKeyV2Args;
    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 getKey = NutanixFunctions.getUserKeyV2(GetUserKeyV2Args.builder()
                .extId("<USER_KEY_UUID>")
                .userExtId("<SERVICE_ACCOUNT_UUID>")
                .build());
    
        }
    }
    
    variables:
      getKey:
        fn::invoke:
          function: nutanix:getUserKeyV2
          arguments:
            extId: <USER_KEY_UUID>
            userExtId: <SERVICE_ACCOUNT_UUID>
    

    Argument Reference

    The following arguments are supported:

    • user_ext_id: - ( Required ) External Identifier of the User.
    • ext_id: - ( Required ) External identifier of the key.

    Using getUserKeyV2

    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 getUserKeyV2(args: GetUserKeyV2Args, opts?: InvokeOptions): Promise<GetUserKeyV2Result>
    function getUserKeyV2Output(args: GetUserKeyV2OutputArgs, opts?: InvokeOptions): Output<GetUserKeyV2Result>
    def get_user_key_v2(description: Optional[str] = None,
                        ext_id: Optional[str] = None,
                        user_ext_id: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetUserKeyV2Result
    def get_user_key_v2_output(description: Optional[pulumi.Input[str]] = None,
                        ext_id: Optional[pulumi.Input[str]] = None,
                        user_ext_id: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetUserKeyV2Result]
    func LookupUserKeyV2(ctx *Context, args *LookupUserKeyV2Args, opts ...InvokeOption) (*LookupUserKeyV2Result, error)
    func LookupUserKeyV2Output(ctx *Context, args *LookupUserKeyV2OutputArgs, opts ...InvokeOption) LookupUserKeyV2ResultOutput

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

    public static class GetUserKeyV2 
    {
        public static Task<GetUserKeyV2Result> InvokeAsync(GetUserKeyV2Args args, InvokeOptions? opts = null)
        public static Output<GetUserKeyV2Result> Invoke(GetUserKeyV2InvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetUserKeyV2Result> getUserKeyV2(GetUserKeyV2Args args, InvokeOptions options)
    public static Output<GetUserKeyV2Result> getUserKeyV2(GetUserKeyV2Args args, InvokeOptions options)
    
    fn::invoke:
      function: nutanix:index/getUserKeyV2:getUserKeyV2
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ExtId string
    The External Identifier of the User Group.
    UserExtId string
    Description string
    • Brief description of the key.
    ExtId string
    The External Identifier of the User Group.
    UserExtId string
    Description string
    • Brief description of the key.
    extId String
    The External Identifier of the User Group.
    userExtId String
    description String
    • Brief description of the key.
    extId string
    The External Identifier of the User Group.
    userExtId string
    description string
    • Brief description of the key.
    ext_id str
    The External Identifier of the User Group.
    user_ext_id str
    description str
    • Brief description of the key.
    extId String
    The External Identifier of the User Group.
    userExtId String
    description String
    • Brief description of the key.

    getUserKeyV2 Result

    The following output properties are available:

    AssignedTo string
    • External client to whom the given key is allocated.
    CreatedBy string
    • User or service who created the key.
    CreatedTime string
    • The creation time of the key.
    CreationType string
    • The creation mechanism of this entity.
    ExpiryTime string
    • The time when the key will expire.
    ExtId string
    The External Identifier of the User Group.
    Id string
    The provider-assigned unique ID for this managed resource.
    KeyDetails List<PiersKarsenbarg.Nutanix.Outputs.GetUserKeyV2KeyDetail>
    • Details specific to type of the key.
    KeyType string
    • The type of key.
    LastUpdatedBy string
    • User who updated the key.
    LastUpdatedTime string
    • The time when the key was updated.
    LastUsedTime string
    • The time when the key was last used.
    Links List<PiersKarsenbarg.Nutanix.Outputs.GetUserKeyV2Link>
    • 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.
    Name string
    • Identifier for the key in the form of a name.
    Status string
    • The status of the key.
    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).
    UserExtId string
    Description string
    • Brief description of the key.
    AssignedTo string
    • External client to whom the given key is allocated.
    CreatedBy string
    • User or service who created the key.
    CreatedTime string
    • The creation time of the key.
    CreationType string
    • The creation mechanism of this entity.
    ExpiryTime string
    • The time when the key will expire.
    ExtId string
    The External Identifier of the User Group.
    Id string
    The provider-assigned unique ID for this managed resource.
    KeyDetails []GetUserKeyV2KeyDetail
    • Details specific to type of the key.
    KeyType string
    • The type of key.
    LastUpdatedBy string
    • User who updated the key.
    LastUpdatedTime string
    • The time when the key was updated.
    LastUsedTime string
    • The time when the key was last used.
    Links []GetUserKeyV2Link
    • 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.
    Name string
    • Identifier for the key in the form of a name.
    Status string
    • The status of the key.
    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).
    UserExtId string
    Description string
    • Brief description of the key.
    assignedTo String
    • External client to whom the given key is allocated.
    createdBy String
    • User or service who created the key.
    createdTime String
    • The creation time of the key.
    creationType String
    • The creation mechanism of this entity.
    expiryTime String
    • The time when the key will expire.
    extId String
    The External Identifier of the User Group.
    id String
    The provider-assigned unique ID for this managed resource.
    keyDetails List<GetUserKeyV2KeyDetail>
    • Details specific to type of the key.
    keyType String
    • The type of key.
    lastUpdatedBy String
    • User who updated the key.
    lastUpdatedTime String
    • The time when the key was updated.
    lastUsedTime String
    • The time when the key was last used.
    links List<GetUserKeyV2Link>
    • 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.
    name String
    • Identifier for the key in the form of a name.
    status String
    • The status of the key.
    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).
    userExtId String
    description String
    • Brief description of the key.
    assignedTo string
    • External client to whom the given key is allocated.
    createdBy string
    • User or service who created the key.
    createdTime string
    • The creation time of the key.
    creationType string
    • The creation mechanism of this entity.
    expiryTime string
    • The time when the key will expire.
    extId string
    The External Identifier of the User Group.
    id string
    The provider-assigned unique ID for this managed resource.
    keyDetails GetUserKeyV2KeyDetail[]
    • Details specific to type of the key.
    keyType string
    • The type of key.
    lastUpdatedBy string
    • User who updated the key.
    lastUpdatedTime string
    • The time when the key was updated.
    lastUsedTime string
    • The time when the key was last used.
    links GetUserKeyV2Link[]
    • 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.
    name string
    • Identifier for the key in the form of a name.
    status string
    • The status of the key.
    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).
    userExtId string
    description string
    • Brief description of the key.
    assigned_to str
    • External client to whom the given key is allocated.
    created_by str
    • User or service who created the key.
    created_time str
    • The creation time of the key.
    creation_type str
    • The creation mechanism of this entity.
    expiry_time str
    • The time when the key will expire.
    ext_id str
    The External Identifier of the User Group.
    id str
    The provider-assigned unique ID for this managed resource.
    key_details Sequence[GetUserKeyV2KeyDetail]
    • Details specific to type of the key.
    key_type str
    • The type of key.
    last_updated_by str
    • User who updated the key.
    last_updated_time str
    • The time when the key was updated.
    last_used_time str
    • The time when the key was last used.
    links Sequence[GetUserKeyV2Link]
    • 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.
    name str
    • Identifier for the key in the form of a name.
    status str
    • The status of the key.
    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).
    user_ext_id str
    description str
    • Brief description of the key.
    assignedTo String
    • External client to whom the given key is allocated.
    createdBy String
    • User or service who created the key.
    createdTime String
    • The creation time of the key.
    creationType String
    • The creation mechanism of this entity.
    expiryTime String
    • The time when the key will expire.
    extId String
    The External Identifier of the User Group.
    id String
    The provider-assigned unique ID for this managed resource.
    keyDetails List<Property Map>
    • Details specific to type of the key.
    keyType String
    • The type of key.
    lastUpdatedBy String
    • User who updated the key.
    lastUpdatedTime String
    • The time when the key was updated.
    lastUsedTime String
    • The time when the key was last used.
    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.
    name String
    • Identifier for the key in the form of a name.
    status String
    • The status of the key.
    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).
    userExtId String
    description String
    • Brief description of the key.

    Supporting Types

    GetUserKeyV2KeyDetail

    GetUserKeyV2KeyDetailApiKeyDetail

    ApiKey string
    ApiKey string
    apiKey String
    apiKey string
    apiKey String

    GetUserKeyV2KeyDetailObjectKeyDetail

    AccessKey string
    SecretKey string
    AccessKey string
    SecretKey string
    accessKey String
    secretKey String
    accessKey string
    secretKey string
    accessKey String
    secretKey String
    Href string
    Rel string
    Href string
    Rel string
    href String
    rel String
    href string
    rel string
    href str
    rel str
    href String
    rel 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
    Nutanix v0.10.0 published on Monday, Sep 1, 2025 by Piers Karsenbarg
      AI Agentic Workflows: Register now