1. Packages
  2. Okta Provider
  3. API Docs
  4. getTemplates
Okta v6.1.0 published on Wednesday, Oct 29, 2025 by Pulumi

okta.getTemplates

Start a Neo task
Explain and create an okta.getTemplates resource
okta logo
Okta v6.1.0 published on Wednesday, Oct 29, 2025 by Pulumi

    Get the email templates belonging to a brand in an Okta organization.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as okta from "@pulumi/okta";
    
    const test = okta.getBrands({});
    const testGetTemplates = test.then(test => okta.getTemplates({
        brandId: test.brands?.[0]?.id,
    }));
    
    import pulumi
    import pulumi_okta as okta
    
    test = okta.get_brands()
    test_get_templates = okta.get_templates(brand_id=test.brands[0].id)
    
    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 {
    		test, err := okta.GetBrands(ctx, map[string]interface{}{}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = okta.GetTemplates(ctx, &okta.GetTemplatesArgs{
    			BrandId: test.Brands[0].Id,
    		}, 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(() => 
    {
        var test = Okta.GetBrands.Invoke();
    
        var testGetTemplates = Okta.GetTemplates.Invoke(new()
        {
            BrandId = test.Apply(getBrandsResult => getBrandsResult.Brands[0]?.Id),
        });
    
    });
    
    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.GetTemplatesArgs;
    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 test = OktaFunctions.getBrands(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference);
    
            final var testGetTemplates = OktaFunctions.getTemplates(GetTemplatesArgs.builder()
                .brandId(test.brands()[0].id())
                .build());
    
        }
    }
    
    variables:
      test:
        fn::invoke:
          function: okta:getBrands
          arguments: {}
      testGetTemplates:
        fn::invoke:
          function: okta:getTemplates
          arguments:
            brandId: ${test.brands[0].id}
    

    Using getTemplates

    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 getTemplates(args: GetTemplatesArgs, opts?: InvokeOptions): Promise<GetTemplatesResult>
    function getTemplatesOutput(args: GetTemplatesOutputArgs, opts?: InvokeOptions): Output<GetTemplatesResult>
    def get_templates(brand_id: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetTemplatesResult
    def get_templates_output(brand_id: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetTemplatesResult]
    func GetTemplates(ctx *Context, args *GetTemplatesArgs, opts ...InvokeOption) (*GetTemplatesResult, error)
    func GetTemplatesOutput(ctx *Context, args *GetTemplatesOutputArgs, opts ...InvokeOption) GetTemplatesResultOutput

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

    public static class GetTemplates 
    {
        public static Task<GetTemplatesResult> InvokeAsync(GetTemplatesArgs args, InvokeOptions? opts = null)
        public static Output<GetTemplatesResult> Invoke(GetTemplatesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetTemplatesResult> getTemplates(GetTemplatesArgs args, InvokeOptions options)
    public static Output<GetTemplatesResult> getTemplates(GetTemplatesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: okta:index/getTemplates:getTemplates
      arguments:
        # arguments dictionary

    The following arguments are supported:

    BrandId string
    Brand ID
    BrandId string
    Brand ID
    brandId String
    Brand ID
    brandId string
    Brand ID
    brand_id str
    Brand ID
    brandId String
    Brand ID

    getTemplates Result

    The following output properties are available:

    BrandId string
    Brand ID
    EmailTemplates List<GetTemplatesEmailTemplate>
    List of okta.getTemplate belonging to a brand in the organization
    Id string
    The provider-assigned unique ID for this managed resource.
    BrandId string
    Brand ID
    EmailTemplates []GetTemplatesEmailTemplate
    List of okta.getTemplate belonging to a brand in the organization
    Id string
    The provider-assigned unique ID for this managed resource.
    brandId String
    Brand ID
    emailTemplates List<GetTemplatesEmailTemplate>
    List of okta.getTemplate belonging to a brand in the organization
    id String
    The provider-assigned unique ID for this managed resource.
    brandId string
    Brand ID
    emailTemplates GetTemplatesEmailTemplate[]
    List of okta.getTemplate belonging to a brand in the organization
    id string
    The provider-assigned unique ID for this managed resource.
    brand_id str
    Brand ID
    email_templates Sequence[GetTemplatesEmailTemplate]
    List of okta.getTemplate belonging to a brand in the organization
    id str
    The provider-assigned unique ID for this managed resource.
    brandId String
    Brand ID
    emailTemplates List<Property Map>
    List of okta.getTemplate belonging to a brand in the organization
    id String
    The provider-assigned unique ID for this managed resource.

    Supporting Types

    GetTemplatesEmailTemplate

    Links string
    Link relations for this object - JSON HAL - Discoverable resources related to the email template
    Name string
    The name of the email template
    Links string
    Link relations for this object - JSON HAL - Discoverable resources related to the email template
    Name string
    The name of the email template
    links String
    Link relations for this object - JSON HAL - Discoverable resources related to the email template
    name String
    The name of the email template
    links string
    Link relations for this object - JSON HAL - Discoverable resources related to the email template
    name string
    The name of the email template
    links str
    Link relations for this object - JSON HAL - Discoverable resources related to the email template
    name str
    The name of the email template
    links String
    Link relations for this object - JSON HAL - Discoverable resources related to the email template
    name String
    The name of the email template

    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.1.0 published on Wednesday, Oct 29, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate