1. Packages
  2. Okta Provider
  3. API Docs
  4. getHookKey
Okta v6.2.0 published on Thursday, Dec 11, 2025 by Pulumi
okta logo
Okta v6.2.0 published on Thursday, Dec 11, 2025 by Pulumi

    Use Key Management to create and manage JSON Web Keys (JWKS) that support OAuth 2.0 client authentication. The key is composed of a public and private key pair. The private key signs the JSON Web Token (JWT) and the public key validates it on the client side.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as okta from "@pulumi/okta";
    
    // Get hook key by ID
    const example = okta.getHookKey({
        id: "abcdefghij0123456789",
    });
    
    import pulumi
    import pulumi_okta as okta
    
    # Get hook key by ID
    example = okta.get_hook_key(id="abcdefghij0123456789")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-okta/sdk/v6/go/okta"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Get hook key by ID
    		_, err := okta.LookupHookKey(ctx, &okta.LookupHookKeyArgs{
    			Id: "abcdefghij0123456789",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Okta = Pulumi.Okta;
    
    return await Deployment.RunAsync(() => 
    {
        // Get hook key by ID
        var example = Okta.GetHookKey.Invoke(new()
        {
            Id = "abcdefghij0123456789",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.okta.OktaFunctions;
    import com.pulumi.okta.inputs.GetHookKeyArgs;
    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) {
            // Get hook key by ID
            final var example = OktaFunctions.getHookKey(GetHookKeyArgs.builder()
                .id("abcdefghij0123456789")
                .build());
    
        }
    }
    
    variables:
      # Get hook key by ID
      example:
        fn::invoke:
          function: okta:getHookKey
          arguments:
            id: abcdefghij0123456789
    

    Using getHookKey

    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 getHookKey(args: GetHookKeyArgs, opts?: InvokeOptions): Promise<GetHookKeyResult>
    function getHookKeyOutput(args: GetHookKeyOutputArgs, opts?: InvokeOptions): Output<GetHookKeyResult>
    def get_hook_key(id: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetHookKeyResult
    def get_hook_key_output(id: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetHookKeyResult]
    func LookupHookKey(ctx *Context, args *LookupHookKeyArgs, opts ...InvokeOption) (*LookupHookKeyResult, error)
    func LookupHookKeyOutput(ctx *Context, args *LookupHookKeyOutputArgs, opts ...InvokeOption) LookupHookKeyResultOutput

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

    public static class GetHookKey 
    {
        public static Task<GetHookKeyResult> InvokeAsync(GetHookKeyArgs args, InvokeOptions? opts = null)
        public static Output<GetHookKeyResult> Invoke(GetHookKeyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetHookKeyResult> getHookKey(GetHookKeyArgs args, InvokeOptions options)
    public static Output<GetHookKeyResult> getHookKey(GetHookKeyArgs args, InvokeOptions options)
    
    fn::invoke:
      function: okta:index/getHookKey:getHookKey
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    The unique identifier of the Hook Key.
    Id string
    The unique identifier of the Hook Key.
    id String
    The unique identifier of the Hook Key.
    id string
    The unique identifier of the Hook Key.
    id str
    The unique identifier of the Hook Key.
    id String
    The unique identifier of the Hook Key.

    getHookKey Result

    The following output properties are available:

    Created string
    The date and time the Hook Key was created.
    Id string
    The unique identifier of the Hook Key.
    IsUsed bool
    Whether the Hook Key is currently being used.
    KeyId string
    The alias of the public key that can be used to retrieve the public key data.
    LastUpdated string
    The date and time the Hook Key was last updated.
    Name string
    Created string
    The date and time the Hook Key was created.
    Id string
    The unique identifier of the Hook Key.
    IsUsed bool
    Whether the Hook Key is currently being used.
    KeyId string
    The alias of the public key that can be used to retrieve the public key data.
    LastUpdated string
    The date and time the Hook Key was last updated.
    Name string
    created String
    The date and time the Hook Key was created.
    id String
    The unique identifier of the Hook Key.
    isUsed Boolean
    Whether the Hook Key is currently being used.
    keyId String
    The alias of the public key that can be used to retrieve the public key data.
    lastUpdated String
    The date and time the Hook Key was last updated.
    name String
    created string
    The date and time the Hook Key was created.
    id string
    The unique identifier of the Hook Key.
    isUsed boolean
    Whether the Hook Key is currently being used.
    keyId string
    The alias of the public key that can be used to retrieve the public key data.
    lastUpdated string
    The date and time the Hook Key was last updated.
    name string
    created str
    The date and time the Hook Key was created.
    id str
    The unique identifier of the Hook Key.
    is_used bool
    Whether the Hook Key is currently being used.
    key_id str
    The alias of the public key that can be used to retrieve the public key data.
    last_updated str
    The date and time the Hook Key was last updated.
    name str
    created String
    The date and time the Hook Key was created.
    id String
    The unique identifier of the Hook Key.
    isUsed Boolean
    Whether the Hook Key is currently being used.
    keyId String
    The alias of the public key that can be used to retrieve the public key data.
    lastUpdated String
    The date and time the Hook Key was last updated.
    name String

    Package Details

    Repository
    Okta pulumi/pulumi-okta
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the okta Terraform Provider.
    okta logo
    Okta v6.2.0 published on Thursday, Dec 11, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate