1. Registry
  2. Packages
  3. Okta Provider
  4. API Docs
  5. user
  6. Subscription
Viewing docs for Okta v7.0.0
published on Friday, Sep 11, 2026 by Pulumi
okta logo
Viewing docs for Okta v7.0.0
published on Friday, Sep 11, 2026 by Pulumi

    Manages a user’s notification subscription.

    This resource allows you to configure email notification subscriptions for a specific Okta user.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as okta from "@pulumi/okta";
    
    const test = new okta.user.Subscription("test", {
        userId: "usr00000000000001",
        notificationType: "APP_IMPORT",
    });
    
    import pulumi
    import pulumi_okta as okta
    
    test = okta.user.Subscription("test",
        user_id="usr00000000000001",
        notification_type="APP_IMPORT")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-okta/sdk/v7/go/okta/user"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := user.NewSubscription(ctx, "test", &user.SubscriptionArgs{
    			UserId:           pulumi.String("usr00000000000001"),
    			NotificationType: pulumi.String("APP_IMPORT"),
    		})
    		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 = new Okta.User.Subscription("test", new()
        {
            UserId = "usr00000000000001",
            NotificationType = "APP_IMPORT",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.okta.user.Subscription;
    import com.pulumi.okta.user.SubscriptionArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 test = new Subscription("test", SubscriptionArgs.builder()
                .userId("usr00000000000001")
                .notificationType("APP_IMPORT")
                .build());
    
        }
    }
    
    resources:
      test:
        type: okta:user:Subscription
        properties:
          userId: usr00000000000001
          notificationType: APP_IMPORT
    
    pulumi {
      required_providers {
        okta = {
          source = "pulumi/okta"
        }
      }
    }
    
    resource "okta_user_subscription" "test" {
      user_id           = "usr00000000000001"
      notification_type = "APP_IMPORT"
    }
    

    Create Subscription Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Subscription(name: string, args: SubscriptionArgs, opts?: CustomResourceOptions);
    @overload
    def Subscription(resource_name: str,
                     args: SubscriptionArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def Subscription(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     notification_type: Optional[str] = None,
                     user_id: Optional[str] = None,
                     channels: Optional[Sequence[str]] = None)
    func NewSubscription(ctx *Context, name string, args SubscriptionArgs, opts ...ResourceOption) (*Subscription, error)
    public Subscription(string name, SubscriptionArgs args, CustomResourceOptions? opts = null)
    public Subscription(String name, SubscriptionArgs args)
    public Subscription(String name, SubscriptionArgs args, CustomResourceOptions options)
    
    type: okta:user:Subscription
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "okta_user_subscription" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args SubscriptionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args SubscriptionArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args SubscriptionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SubscriptionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SubscriptionArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var subscriptionResource = new Okta.User.Subscription("subscriptionResource", new()
    {
        NotificationType = "string",
        UserId = "string",
        Channels = new[]
        {
            "string",
        },
    });
    
    example, err := user.NewSubscription(ctx, "subscriptionResource", &user.SubscriptionArgs{
    	NotificationType: pulumi.String("string"),
    	UserId:           pulumi.String("string"),
    	Channels: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    resource "okta_user_subscription" "subscriptionResource" {
      lifecycle {
        create_before_destroy = true
      }
      notification_type = "string"
      user_id           = "string"
      channels          = ["string"]
    }
    
    var subscriptionResource = new Subscription("subscriptionResource", SubscriptionArgs.builder()
        .notificationType("string")
        .userId("string")
        .channels("string")
        .build());
    
    subscription_resource = okta.user.Subscription("subscriptionResource",
        notification_type="string",
        user_id="string",
        channels=["string"])
    
    const subscriptionResource = new okta.user.Subscription("subscriptionResource", {
        notificationType: "string",
        userId: "string",
        channels: ["string"],
    });
    
    type: okta:user:Subscription
    properties:
        channels:
            - string
        notificationType: string
        userId: string
    

    Subscription Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Subscription resource accepts the following input properties:

    NotificationType string
    Type of the notification
    UserId string
    ID of an existing Okta user
    Channels List<string>
    An array of sources send notifications to users.
    NotificationType string
    Type of the notification
    UserId string
    ID of an existing Okta user
    Channels []string
    An array of sources send notifications to users.
    notification_type string
    Type of the notification
    user_id string
    ID of an existing Okta user
    channels list(string)
    An array of sources send notifications to users.
    notificationType String
    Type of the notification
    userId String
    ID of an existing Okta user
    channels List<String>
    An array of sources send notifications to users.
    notificationType string
    Type of the notification
    userId string
    ID of an existing Okta user
    channels string[]
    An array of sources send notifications to users.
    notification_type str
    Type of the notification
    user_id str
    ID of an existing Okta user
    channels Sequence[str]
    An array of sources send notifications to users.
    notificationType String
    Type of the notification
    userId String
    ID of an existing Okta user
    channels List<String>
    An array of sources send notifications to users.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Subscription resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the subscription
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the subscription
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The status of the subscription
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the subscription
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The status of the subscription
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The status of the subscription
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the subscription

    Look up Existing Subscription Resource

    Get an existing Subscription resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: SubscriptionState, opts?: CustomResourceOptions): Subscription
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            channels: Optional[Sequence[str]] = None,
            notification_type: Optional[str] = None,
            status: Optional[str] = None,
            user_id: Optional[str] = None) -> Subscription
    func GetSubscription(ctx *Context, name string, id IDInput, state *SubscriptionState, opts ...ResourceOption) (*Subscription, error)
    public static Subscription Get(string name, Input<string> id, SubscriptionState? state, CustomResourceOptions? opts = null)
    public static Subscription get(String name, Output<String> id, SubscriptionState state, CustomResourceOptions options)
    resources:  _:    type: okta:user:Subscription    get:      id: ${id}
    import {
      to = okta_user_subscription.example
      id = "${id}"
    }
    
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Channels List<string>
    An array of sources send notifications to users.
    NotificationType string
    Type of the notification
    Status string
    The status of the subscription
    UserId string
    ID of an existing Okta user
    Channels []string
    An array of sources send notifications to users.
    NotificationType string
    Type of the notification
    Status string
    The status of the subscription
    UserId string
    ID of an existing Okta user
    channels list(string)
    An array of sources send notifications to users.
    notification_type string
    Type of the notification
    status string
    The status of the subscription
    user_id string
    ID of an existing Okta user
    channels List<String>
    An array of sources send notifications to users.
    notificationType String
    Type of the notification
    status String
    The status of the subscription
    userId String
    ID of an existing Okta user
    channels string[]
    An array of sources send notifications to users.
    notificationType string
    Type of the notification
    status string
    The status of the subscription
    userId string
    ID of an existing Okta user
    channels Sequence[str]
    An array of sources send notifications to users.
    notification_type str
    Type of the notification
    status str
    The status of the subscription
    user_id str
    ID of an existing Okta user
    channels List<String>
    An array of sources send notifications to users.
    notificationType String
    Type of the notification
    status String
    The status of the subscription
    userId String
    ID of an existing Okta user

    Import

    $ pulumi import okta:user/subscription:Subscription example <user_id>/<notification_type>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Okta pulumi/pulumi-okta
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the okta Terraform Provider.
    okta logo
    Viewing docs for Okta v7.0.0
    published on Friday, Sep 11, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial