1. Packages
  2. Nutanix
  3. API Docs
  4. getCategoryKey
Nutanix v0.11.0 published on Monday, Nov 24, 2025 by Piers Karsenbarg
nutanix logo
Nutanix v0.11.0 published on Monday, Nov 24, 2025 by Piers Karsenbarg

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as nutanix from "@pierskarsenbarg/nutanix";
    
    const testKeyValueCategoryKey = new nutanix.CategoryKey("test_key_value", {
        name: "data_source_category_key_test_values",
        description: "Data Source CategoryKey Test with Values",
    });
    const testValue = new nutanix.CategoryValue("test_value", {
        name: testKeyValueCategoryKey.name,
        value: "test_category_value_data_source",
        description: "Data Source CategoryValue Test with Values",
    });
    const testKeyValue = nutanix.getCategoryKeyOutput({
        name: testKeyValueCategoryKey.name,
    });
    
    import pulumi
    import pulumi_nutanix as nutanix
    
    test_key_value_category_key = nutanix.CategoryKey("test_key_value",
        name="data_source_category_key_test_values",
        description="Data Source CategoryKey Test with Values")
    test_value = nutanix.CategoryValue("test_value",
        name=test_key_value_category_key.name,
        value="test_category_value_data_source",
        description="Data Source CategoryValue Test with Values")
    test_key_value = nutanix.get_category_key_output(name=test_key_value_category_key.name)
    
    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 {
    		testKeyValueCategoryKey, err := nutanix.NewCategoryKey(ctx, "test_key_value", &nutanix.CategoryKeyArgs{
    			Name:        pulumi.String("data_source_category_key_test_values"),
    			Description: pulumi.String("Data Source CategoryKey Test with Values"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = nutanix.NewCategoryValue(ctx, "test_value", &nutanix.CategoryValueArgs{
    			Name:        testKeyValueCategoryKey.Name,
    			Value:       pulumi.String("test_category_value_data_source"),
    			Description: pulumi.String("Data Source CategoryValue Test with Values"),
    		})
    		if err != nil {
    			return err
    		}
    		_ = nutanix.LookupCategoryKeyOutput(ctx, nutanix.GetCategoryKeyOutputArgs{
    			Name: testKeyValueCategoryKey.Name,
    		}, nil)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nutanix = PiersKarsenbarg.Nutanix;
    using Nutanix = Pulumi.Nutanix;
    
    return await Deployment.RunAsync(() => 
    {
        var testKeyValueCategoryKey = new Nutanix.CategoryKey("test_key_value", new()
        {
            Name = "data_source_category_key_test_values",
            Description = "Data Source CategoryKey Test with Values",
        });
    
        var testValue = new Nutanix.CategoryValue("test_value", new()
        {
            Name = testKeyValueCategoryKey.Name,
            Value = "test_category_value_data_source",
            Description = "Data Source CategoryValue Test with Values",
        });
    
        var testKeyValue = Nutanix.GetCategoryKey.Invoke(new()
        {
            Name = testKeyValueCategoryKey.Name,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.nutanix.CategoryKey;
    import com.pulumi.nutanix.CategoryKeyArgs;
    import com.pulumi.nutanix.CategoryValue;
    import com.pulumi.nutanix.CategoryValueArgs;
    import com.pulumi.nutanix.NutanixFunctions;
    import com.pulumi.nutanix.inputs.GetCategoryKeyArgs;
    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) {
            var testKeyValueCategoryKey = new CategoryKey("testKeyValueCategoryKey", CategoryKeyArgs.builder()
                .name("data_source_category_key_test_values")
                .description("Data Source CategoryKey Test with Values")
                .build());
    
            var testValue = new CategoryValue("testValue", CategoryValueArgs.builder()
                .name(testKeyValueCategoryKey.name())
                .value("test_category_value_data_source")
                .description("Data Source CategoryValue Test with Values")
                .build());
    
            final var testKeyValue = NutanixFunctions.getCategoryKey(GetCategoryKeyArgs.builder()
                .name(testKeyValueCategoryKey.name())
                .build());
    
        }
    }
    
    resources:
      testKeyValueCategoryKey:
        type: nutanix:CategoryKey
        name: test_key_value
        properties:
          name: data_source_category_key_test_values
          description: Data Source CategoryKey Test with Values
      testValue:
        type: nutanix:CategoryValue
        name: test_value
        properties:
          name: ${testKeyValueCategoryKey.name}
          value: test_category_value_data_source
          description: Data Source CategoryValue Test with Values
    variables:
      testKeyValue:
        fn::invoke:
          function: nutanix:getCategoryKey
          arguments:
            name: ${testKeyValueCategoryKey.name}
    

    Using getCategoryKey

    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 getCategoryKey(args: GetCategoryKeyArgs, opts?: InvokeOptions): Promise<GetCategoryKeyResult>
    function getCategoryKeyOutput(args: GetCategoryKeyOutputArgs, opts?: InvokeOptions): Output<GetCategoryKeyResult>
    def get_category_key(name: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetCategoryKeyResult
    def get_category_key_output(name: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetCategoryKeyResult]
    func LookupCategoryKey(ctx *Context, args *LookupCategoryKeyArgs, opts ...InvokeOption) (*LookupCategoryKeyResult, error)
    func LookupCategoryKeyOutput(ctx *Context, args *LookupCategoryKeyOutputArgs, opts ...InvokeOption) LookupCategoryKeyResultOutput

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

    public static class GetCategoryKey 
    {
        public static Task<GetCategoryKeyResult> InvokeAsync(GetCategoryKeyArgs args, InvokeOptions? opts = null)
        public static Output<GetCategoryKeyResult> Invoke(GetCategoryKeyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCategoryKeyResult> getCategoryKey(GetCategoryKeyArgs args, InvokeOptions options)
    public static Output<GetCategoryKeyResult> getCategoryKey(GetCategoryKeyArgs args, InvokeOptions options)
    
    fn::invoke:
      function: nutanix:index/getCategoryKey:getCategoryKey
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    • (Required) The name for the category key.
    Name string
    • (Required) The name for the category key.
    name String
    • (Required) The name for the category key.
    name string
    • (Required) The name for the category key.
    name str
    • (Required) The name for the category key.
    name String
    • (Required) The name for the category key.

    getCategoryKey Result

    The following output properties are available:

    ApiVersion string
    The version of the API.
    Description string
    • A description for category key.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    SystemDefined bool
    • Specifying whether its a system defined category.
    Values List<string>
    • A list of the values from this category key (if it has them).
    ApiVersion string
    The version of the API.
    Description string
    • A description for category key.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    SystemDefined bool
    • Specifying whether its a system defined category.
    Values []string
    • A list of the values from this category key (if it has them).
    apiVersion String
    The version of the API.
    description String
    • A description for category key.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    systemDefined Boolean
    • Specifying whether its a system defined category.
    values List<String>
    • A list of the values from this category key (if it has them).
    apiVersion string
    The version of the API.
    description string
    • A description for category key.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    systemDefined boolean
    • Specifying whether its a system defined category.
    values string[]
    • A list of the values from this category key (if it has them).
    api_version str
    The version of the API.
    description str
    • A description for category key.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    system_defined bool
    • Specifying whether its a system defined category.
    values Sequence[str]
    • A list of the values from this category key (if it has them).
    apiVersion String
    The version of the API.
    description String
    • A description for category key.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    systemDefined Boolean
    • Specifying whether its a system defined category.
    values List<String>
    • A list of the values from this category key (if it has them).

    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.11.0 published on Monday, Nov 24, 2025 by Piers Karsenbarg
      Meet Neo: Your AI Platform Teammate