1. Registry
  2. Packages
  3. Descope Provider
  4. API Docs
  5. Widget
Viewing docs for Descope v1.0.1
published on Sunday, Oct 11, 2026 by Descope
descope logo Descope
Viewing docs for Descope v1.0.1
published on Sunday, Oct 11, 2026 by Descope

    Manages a single widget in a Descope project via its exported JSON representation, the same format produced by exporting a widget in the Descope console.

    Create Widget Resource

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

    Constructor syntax

    new Widget(name: string, args: WidgetArgs, opts?: CustomResourceOptions);
    @overload
    def Widget(resource_name: str,
               args: WidgetArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Widget(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               data: Optional[str] = None,
               project_id: Optional[str] = None,
               widget_id: Optional[str] = None)
    func NewWidget(ctx *Context, name string, args WidgetArgs, opts ...ResourceOption) (*Widget, error)
    public Widget(string name, WidgetArgs args, CustomResourceOptions? opts = null)
    public Widget(String name, WidgetArgs args)
    public Widget(String name, WidgetArgs args, CustomResourceOptions options)
    
    type: descope:Widget
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "descope_widget" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args WidgetArgs
    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 WidgetArgs
    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 WidgetArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args WidgetArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args WidgetArgs
    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 widgetResource = new Descope.Widget("widgetResource", new()
    {
        Data = "string",
        ProjectId = "string",
        WidgetId = "string",
    });
    
    example, err := descope.NewWidget(ctx, "widgetResource", &descope.WidgetArgs{
    	Data:      pulumi.String("string"),
    	ProjectId: pulumi.String("string"),
    	WidgetId:  pulumi.String("string"),
    })
    
    resource "descope_widget" "widgetResource" {
      lifecycle {
        create_before_destroy = true
      }
      data       = "string"
      project_id = "string"
      widget_id  = "string"
    }
    
    var widgetResource = new Widget("widgetResource", WidgetArgs.builder()
        .data("string")
        .projectId("string")
        .widgetId("string")
        .build());
    
    widget_resource = descope.Widget("widgetResource",
        data="string",
        project_id="string",
        widget_id="string")
    
    const widgetResource = new descope.Widget("widgetResource", {
        data: "string",
        projectId: "string",
        widgetId: "string",
    });
    
    type: descope:Widget
    properties:
        data: string
        projectId: string
        widgetId: string
    

    Widget 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 Widget resource accepts the following input properties:

    Data string
    The JSON data of the widget in its exported representation, including its metadata and screens. This will usually be exported as a .json file from the Descope console, and set in the .tf file using the data = file("...") syntax.
    ProjectId string
    The ID of the project that the widget belongs to. Changing this value will require the resource to be deleted and recreated.
    WidgetId string
    The machine identifier of the widget (e.g., user-management), used to embed the widget and to reference it in other resources. Changing this value will require the resource to be deleted and recreated.
    Data string
    The JSON data of the widget in its exported representation, including its metadata and screens. This will usually be exported as a .json file from the Descope console, and set in the .tf file using the data = file("...") syntax.
    ProjectId string
    The ID of the project that the widget belongs to. Changing this value will require the resource to be deleted and recreated.
    WidgetId string
    The machine identifier of the widget (e.g., user-management), used to embed the widget and to reference it in other resources. Changing this value will require the resource to be deleted and recreated.
    data string
    The JSON data of the widget in its exported representation, including its metadata and screens. This will usually be exported as a .json file from the Descope console, and set in the .tf file using the data = file("...") syntax.
    project_id string
    The ID of the project that the widget belongs to. Changing this value will require the resource to be deleted and recreated.
    widget_id string
    The machine identifier of the widget (e.g., user-management), used to embed the widget and to reference it in other resources. Changing this value will require the resource to be deleted and recreated.
    data String
    The JSON data of the widget in its exported representation, including its metadata and screens. This will usually be exported as a .json file from the Descope console, and set in the .tf file using the data = file("...") syntax.
    projectId String
    The ID of the project that the widget belongs to. Changing this value will require the resource to be deleted and recreated.
    widgetId String
    The machine identifier of the widget (e.g., user-management), used to embed the widget and to reference it in other resources. Changing this value will require the resource to be deleted and recreated.
    data string
    The JSON data of the widget in its exported representation, including its metadata and screens. This will usually be exported as a .json file from the Descope console, and set in the .tf file using the data = file("...") syntax.
    projectId string
    The ID of the project that the widget belongs to. Changing this value will require the resource to be deleted and recreated.
    widgetId string
    The machine identifier of the widget (e.g., user-management), used to embed the widget and to reference it in other resources. Changing this value will require the resource to be deleted and recreated.
    data str
    The JSON data of the widget in its exported representation, including its metadata and screens. This will usually be exported as a .json file from the Descope console, and set in the .tf file using the data = file("...") syntax.
    project_id str
    The ID of the project that the widget belongs to. Changing this value will require the resource to be deleted and recreated.
    widget_id str
    The machine identifier of the widget (e.g., user-management), used to embed the widget and to reference it in other resources. Changing this value will require the resource to be deleted and recreated.
    data String
    The JSON data of the widget in its exported representation, including its metadata and screens. This will usually be exported as a .json file from the Descope console, and set in the .tf file using the data = file("...") syntax.
    projectId String
    The ID of the project that the widget belongs to. Changing this value will require the resource to be deleted and recreated.
    widgetId String
    The machine identifier of the widget (e.g., user-management), used to embed the widget and to reference it in other resources. Changing this value will require the resource to be deleted and recreated.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Widget Resource

    Get an existing Widget 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?: WidgetState, opts?: CustomResourceOptions): Widget
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            data: Optional[str] = None,
            project_id: Optional[str] = None,
            widget_id: Optional[str] = None) -> Widget
    func GetWidget(ctx *Context, name string, id IDInput, state *WidgetState, opts ...ResourceOption) (*Widget, error)
    public static Widget Get(string name, Input<string> id, WidgetState? state, CustomResourceOptions? opts = null)
    public static Widget get(String name, Output<String> id, WidgetState state, CustomResourceOptions options)
    resources:  existingWidget:    type: descope:Widget    get:      id: ${id}
    import {
      to = descope_widget.example
      id = "${id}"
    }
    
    name string
    The unique name of the resulting resource.
    id Input<ID>
    The unique provider ID of the resource to look up.
    state WidgetState
    Known property values the provider needs, along with the ID, to find the resource. Usually not required.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resulting resource.
    id str
    The unique provider ID of the resource to look up.
    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 resulting resource.
    id IDInput
    The unique provider ID of the resource to look up.
    state WidgetState
    Known property values the provider needs, along with the ID, to find the resource. Usually not required.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resulting resource.
    id Input<string>
    The unique provider ID of the resource to look up.
    state WidgetState
    Known property values the provider needs, along with the ID, to find the resource. Usually not required.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resulting resource.
    id Output<String>
    The unique provider ID of the resource to look up.
    state WidgetState
    Known property values the provider needs, along with the ID, to find the resource. Usually not required.
    options CustomResourceOptions
    Bag of options to control resource's behavior.
    The following state arguments are supported:
    Data string
    The JSON data of the widget in its exported representation, including its metadata and screens. This will usually be exported as a .json file from the Descope console, and set in the .tf file using the data = file("...") syntax.
    ProjectId string
    The ID of the project that the widget belongs to. Changing this value will require the resource to be deleted and recreated.
    WidgetId string
    The machine identifier of the widget (e.g., user-management), used to embed the widget and to reference it in other resources. Changing this value will require the resource to be deleted and recreated.
    Data string
    The JSON data of the widget in its exported representation, including its metadata and screens. This will usually be exported as a .json file from the Descope console, and set in the .tf file using the data = file("...") syntax.
    ProjectId string
    The ID of the project that the widget belongs to. Changing this value will require the resource to be deleted and recreated.
    WidgetId string
    The machine identifier of the widget (e.g., user-management), used to embed the widget and to reference it in other resources. Changing this value will require the resource to be deleted and recreated.
    data string
    The JSON data of the widget in its exported representation, including its metadata and screens. This will usually be exported as a .json file from the Descope console, and set in the .tf file using the data = file("...") syntax.
    project_id string
    The ID of the project that the widget belongs to. Changing this value will require the resource to be deleted and recreated.
    widget_id string
    The machine identifier of the widget (e.g., user-management), used to embed the widget and to reference it in other resources. Changing this value will require the resource to be deleted and recreated.
    data String
    The JSON data of the widget in its exported representation, including its metadata and screens. This will usually be exported as a .json file from the Descope console, and set in the .tf file using the data = file("...") syntax.
    projectId String
    The ID of the project that the widget belongs to. Changing this value will require the resource to be deleted and recreated.
    widgetId String
    The machine identifier of the widget (e.g., user-management), used to embed the widget and to reference it in other resources. Changing this value will require the resource to be deleted and recreated.
    data string
    The JSON data of the widget in its exported representation, including its metadata and screens. This will usually be exported as a .json file from the Descope console, and set in the .tf file using the data = file("...") syntax.
    projectId string
    The ID of the project that the widget belongs to. Changing this value will require the resource to be deleted and recreated.
    widgetId string
    The machine identifier of the widget (e.g., user-management), used to embed the widget and to reference it in other resources. Changing this value will require the resource to be deleted and recreated.
    data str
    The JSON data of the widget in its exported representation, including its metadata and screens. This will usually be exported as a .json file from the Descope console, and set in the .tf file using the data = file("...") syntax.
    project_id str
    The ID of the project that the widget belongs to. Changing this value will require the resource to be deleted and recreated.
    widget_id str
    The machine identifier of the widget (e.g., user-management), used to embed the widget and to reference it in other resources. Changing this value will require the resource to be deleted and recreated.
    data String
    The JSON data of the widget in its exported representation, including its metadata and screens. This will usually be exported as a .json file from the Descope console, and set in the .tf file using the data = file("...") syntax.
    projectId String
    The ID of the project that the widget belongs to. Changing this value will require the resource to be deleted and recreated.
    widgetId String
    The machine identifier of the widget (e.g., user-management), used to embed the widget and to reference it in other resources. Changing this value will require the resource to be deleted and recreated.

    Package Details

    Repository
    descope descope/pulumi-descope
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the descope Terraform Provider.
    descope logo Descope
    Viewing docs for Descope v1.0.1
    published on Sunday, Oct 11, 2026 by Descope

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial