Nutanix v0.10.0 published on Monday, Sep 1, 2025 by Piers Karsenbarg
nutanix.getUserKeysV2
Explore with Pulumi AI
List all keys identified by the external identifier of a user.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as nutanix from "@pierskarsenbarg/nutanix";
const getKeys = nutanix.getUserKeysV2({
userExtId: "<SERVICE_ACCOUNT_UUID>",
});
const getKeysFilter = nutanix.getUserKeysV2({
filter: "name eq '<NAME_OF_API_KEY>'",
userExtId: "<SERVICE_ACCOUNT_UUID>",
});
import pulumi
import pulumi_nutanix as nutanix
get_keys = nutanix.get_user_keys_v2(user_ext_id="<SERVICE_ACCOUNT_UUID>")
get_keys_filter = nutanix.get_user_keys_v2(filter="name eq '<NAME_OF_API_KEY>'",
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.GetUserKeysV2(ctx, &nutanix.GetUserKeysV2Args{
UserExtId: "<SERVICE_ACCOUNT_UUID>",
}, nil)
if err != nil {
return err
}
_, err = nutanix.GetUserKeysV2(ctx, &nutanix.GetUserKeysV2Args{
Filter: pulumi.StringRef("name eq '<NAME_OF_API_KEY>'"),
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 getKeys = Nutanix.GetUserKeysV2.Invoke(new()
{
UserExtId = "<SERVICE_ACCOUNT_UUID>",
});
var getKeysFilter = Nutanix.GetUserKeysV2.Invoke(new()
{
Filter = "name eq '<NAME_OF_API_KEY>'",
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.GetUserKeysV2Args;
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 getKeys = NutanixFunctions.getUserKeysV2(GetUserKeysV2Args.builder()
.userExtId("<SERVICE_ACCOUNT_UUID>")
.build());
final var getKeysFilter = NutanixFunctions.getUserKeysV2(GetUserKeysV2Args.builder()
.filter("name eq '<NAME_OF_API_KEY>'")
.userExtId("<SERVICE_ACCOUNT_UUID>")
.build());
}
}
variables:
getKeys:
fn::invoke:
function: nutanix:getUserKeysV2
arguments:
userExtId: <SERVICE_ACCOUNT_UUID>
getKeysFilter:
fn::invoke:
function: nutanix:getUserKeysV2
arguments:
filter: name eq '<NAME_OF_API_KEY>'
userExtId: <SERVICE_ACCOUNT_UUID>
Argument Reference
The following arguments are supported:
user_ext_id
: - ( Required ) External Identifier of the User.page
:- (Optional)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
:- (Optional) 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
:- (Optional) 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:- assignedTo
- creationType
- extId
- keyType
- lastUpdatedBy
- name
- status
- tenantId
orderby
:- (Optional) 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: * createdBy- assignedTo
- createdBy
- createdTime
- expiryTime
- keyType
- lastUpdatedTime
- lastUsedTime
- name
- status
- tenantId
select
:- (Optional) 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:- assignedTo
- createdBy
- createdTime
- creationType
- description
- expiryTime
- extId
- keyType
- lastUpdatedBy
- lastUpdatedTime
- lastUsedTime
- name
- status
- tenantId
Using getUserKeysV2
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 getUserKeysV2(args: GetUserKeysV2Args, opts?: InvokeOptions): Promise<GetUserKeysV2Result>
function getUserKeysV2Output(args: GetUserKeysV2OutputArgs, opts?: InvokeOptions): Output<GetUserKeysV2Result>
def get_user_keys_v2(filter: Optional[str] = None,
limit: Optional[int] = None,
order_by: Optional[str] = None,
page: Optional[int] = None,
select: Optional[str] = None,
user_ext_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetUserKeysV2Result
def get_user_keys_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,
user_ext_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetUserKeysV2Result]
func GetUserKeysV2(ctx *Context, args *GetUserKeysV2Args, opts ...InvokeOption) (*GetUserKeysV2Result, error)
func GetUserKeysV2Output(ctx *Context, args *GetUserKeysV2OutputArgs, opts ...InvokeOption) GetUserKeysV2ResultOutput
> Note: This function is named GetUserKeysV2
in the Go SDK.
public static class GetUserKeysV2
{
public static Task<GetUserKeysV2Result> InvokeAsync(GetUserKeysV2Args args, InvokeOptions? opts = null)
public static Output<GetUserKeysV2Result> Invoke(GetUserKeysV2InvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetUserKeysV2Result> getUserKeysV2(GetUserKeysV2Args args, InvokeOptions options)
public static Output<GetUserKeysV2Result> getUserKeysV2(GetUserKeysV2Args args, InvokeOptions options)
fn::invoke:
function: nutanix:index/getUserKeysV2:getUserKeysV2
arguments:
# arguments dictionary
The following arguments are supported:
getUserKeysV2 Result
The following output properties are available:
- id str
- The provider-assigned unique ID for this managed resource.
- keys
Sequence[Get
User Keys V2Key] - user_
ext_ strid - filter str
- limit int
- order_
by str - page int
- select str
Supporting Types
GetUserKeysV2Key
- Assigned
To string - External client to whom the given key is allocated.
- Created
By string - User or service who created the key.
- Created
Time string - The creation time of the key.
- Creation
Type string - The creation mechanism of this entity.
- Expiry
Time string - The time when the key will expire.
- Ext
Id string - The External Identifier of the User Group.
- Key
Details List<PiersKarsenbarg. Nutanix. Inputs. Get User Keys V2Key Key Detail> - Details specific to type of the key.
- Key
Type string - The type of key.
- Last
Updated stringBy - User who updated the key.
- Last
Updated stringTime - The time when the key was updated.
- Last
Used stringTime - The time when the key was last used.
- Links
List<Piers
Karsenbarg. Nutanix. Inputs. Get User Keys V2Key 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.
- Name string
- Identifier for the key in the form of a name.
- Status string
- The status of the key.
- Tenant
Id 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).
- User
Ext stringId - Description string
- Brief description of the key.
- Assigned
To string - External client to whom the given key is allocated.
- Created
By string - User or service who created the key.
- Created
Time string - The creation time of the key.
- Creation
Type string - The creation mechanism of this entity.
- Expiry
Time string - The time when the key will expire.
- Ext
Id string - The External Identifier of the User Group.
- Key
Details []GetUser Keys V2Key Key Detail - Details specific to type of the key.
- Key
Type string - The type of key.
- Last
Updated stringBy - User who updated the key.
- Last
Updated stringTime - The time when the key was updated.
- Last
Used stringTime - The time when the key was last used.
- Links
[]Get
User Keys V2Key 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.
- Name string
- Identifier for the key in the form of a name.
- Status string
- The status of the key.
- Tenant
Id 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).
- User
Ext stringId - Description string
- Brief description of the key.
- assigned
To String - External client to whom the given key is allocated.
- created
By String - User or service who created the key.
- created
Time String - The creation time of the key.
- creation
Type String - The creation mechanism of this entity.
- expiry
Time String - The time when the key will expire.
- ext
Id String - The External Identifier of the User Group.
- key
Details List<GetUser Keys V2Key Key Detail> - Details specific to type of the key.
- key
Type String - The type of key.
- last
Updated StringBy - User who updated the key.
- last
Updated StringTime - The time when the key was updated.
- last
Used StringTime - The time when the key was last used.
- links
List<Get
User Keys V2Key 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.
- name String
- Identifier for the key in the form of a name.
- status String
- The status of the key.
- tenant
Id 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).
- user
Ext StringId - description String
- Brief description of the key.
- assigned
To string - External client to whom the given key is allocated.
- created
By string - User or service who created the key.
- created
Time string - The creation time of the key.
- creation
Type string - The creation mechanism of this entity.
- expiry
Time string - The time when the key will expire.
- ext
Id string - The External Identifier of the User Group.
- key
Details GetUser Keys V2Key Key Detail[] - Details specific to type of the key.
- key
Type string - The type of key.
- last
Updated stringBy - User who updated the key.
- last
Updated stringTime - The time when the key was updated.
- last
Used stringTime - The time when the key was last used.
- links
Get
User Keys V2Key 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.
- name string
- Identifier for the key in the form of a name.
- status string
- The status of the key.
- tenant
Id 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).
- user
Ext stringId - 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.
- key_
details Sequence[GetUser Keys V2Key Key Detail] - Details specific to type of the key.
- key_
type str - The type of key.
- last_
updated_ strby - User who updated the key.
- last_
updated_ strtime - The time when the key was updated.
- last_
used_ strtime - The time when the key was last used.
- links
Sequence[Get
User Keys V2Key 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.
- 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_ strid - description str
- Brief description of the key.
- assigned
To String - External client to whom the given key is allocated.
- created
By String - User or service who created the key.
- created
Time String - The creation time of the key.
- creation
Type String - The creation mechanism of this entity.
- expiry
Time String - The time when the key will expire.
- ext
Id String - The External Identifier of the User Group.
- key
Details List<Property Map> - Details specific to type of the key.
- key
Type String - The type of key.
- last
Updated StringBy - User who updated the key.
- last
Updated StringTime - The time when the key was updated.
- last
Used StringTime - 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.
- tenant
Id 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).
- user
Ext StringId - description String
- Brief description of the key.
GetUserKeysV2KeyKeyDetail
GetUserKeysV2KeyKeyDetailApiKeyDetail
- Api
Key string
- Api
Key string
- api
Key String
- api
Key string
- api_
key str
- api
Key String
GetUserKeysV2KeyKeyDetailObjectKeyDetail
- access_
key str - secret_
key str
GetUserKeysV2KeyLink
Package Details
- Repository
- nutanix pierskarsenbarg/pulumi-nutanix
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
nutanix
Terraform Provider.