1. Registry
  2. Packages
  3. Descope Provider
  4. API Docs
  5. FgaSchema
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 the FGA (fine-grained authorization) schema for a Descope project as a single DSL string. Setting an empty schema, or destroying the resource, clears the project’s FGA schema (which also removes any FGA relations that depend on it).

    Create FgaSchema Resource

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

    Constructor syntax

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

    Parameters

    name string
    The unique name of the resource.
    args FgaSchemaArgs
    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 FgaSchemaArgs
    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 FgaSchemaArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args FgaSchemaArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args FgaSchemaArgs
    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 fgaSchemaResource = new Descope.FgaSchema("fgaSchemaResource", new()
    {
        ProjectId = "string",
        Schema = "string",
    });
    
    example, err := descope.NewFgaSchema(ctx, "fgaSchemaResource", &descope.FgaSchemaArgs{
    	ProjectId: pulumi.String("string"),
    	Schema:    pulumi.String("string"),
    })
    
    resource "descope_fga_schema" "fgaSchemaResource" {
      lifecycle {
        create_before_destroy = true
      }
      project_id = "string"
      schema     = "string"
    }
    
    var fgaSchemaResource = new FgaSchema("fgaSchemaResource", FgaSchemaArgs.builder()
        .projectId("string")
        .schema("string")
        .build());
    
    fga_schema_resource = descope.FgaSchema("fgaSchemaResource",
        project_id="string",
        schema="string")
    
    const fgaSchemaResource = new descope.FgaSchema("fgaSchemaResource", {
        projectId: "string",
        schema: "string",
    });
    
    type: descope:FgaSchema
    properties:
        projectId: string
        schema: string
    

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

    ProjectId string
    The ID of the project that this FGA schema belongs to. Changing this value will require the resource to be deleted and recreated.
    Schema string
    The project's FGA (fine-grained authorization) schema, configured in the Descope console under the FGA tab. Use the code view to get the schema text and paste it as the value for this attribute. When set, the schema must start with model AuthZ. Setting an empty schema, or destroying the resource, clears the project's FGA schema, which also removes any FGA relations that depend on it.
    ProjectId string
    The ID of the project that this FGA schema belongs to. Changing this value will require the resource to be deleted and recreated.
    Schema string
    The project's FGA (fine-grained authorization) schema, configured in the Descope console under the FGA tab. Use the code view to get the schema text and paste it as the value for this attribute. When set, the schema must start with model AuthZ. Setting an empty schema, or destroying the resource, clears the project's FGA schema, which also removes any FGA relations that depend on it.
    project_id string
    The ID of the project that this FGA schema belongs to. Changing this value will require the resource to be deleted and recreated.
    schema string
    The project's FGA (fine-grained authorization) schema, configured in the Descope console under the FGA tab. Use the code view to get the schema text and paste it as the value for this attribute. When set, the schema must start with model AuthZ. Setting an empty schema, or destroying the resource, clears the project's FGA schema, which also removes any FGA relations that depend on it.
    projectId String
    The ID of the project that this FGA schema belongs to. Changing this value will require the resource to be deleted and recreated.
    schema String
    The project's FGA (fine-grained authorization) schema, configured in the Descope console under the FGA tab. Use the code view to get the schema text and paste it as the value for this attribute. When set, the schema must start with model AuthZ. Setting an empty schema, or destroying the resource, clears the project's FGA schema, which also removes any FGA relations that depend on it.
    projectId string
    The ID of the project that this FGA schema belongs to. Changing this value will require the resource to be deleted and recreated.
    schema string
    The project's FGA (fine-grained authorization) schema, configured in the Descope console under the FGA tab. Use the code view to get the schema text and paste it as the value for this attribute. When set, the schema must start with model AuthZ. Setting an empty schema, or destroying the resource, clears the project's FGA schema, which also removes any FGA relations that depend on it.
    project_id str
    The ID of the project that this FGA schema belongs to. Changing this value will require the resource to be deleted and recreated.
    schema str
    The project's FGA (fine-grained authorization) schema, configured in the Descope console under the FGA tab. Use the code view to get the schema text and paste it as the value for this attribute. When set, the schema must start with model AuthZ. Setting an empty schema, or destroying the resource, clears the project's FGA schema, which also removes any FGA relations that depend on it.
    projectId String
    The ID of the project that this FGA schema belongs to. Changing this value will require the resource to be deleted and recreated.
    schema String
    The project's FGA (fine-grained authorization) schema, configured in the Descope console under the FGA tab. Use the code view to get the schema text and paste it as the value for this attribute. When set, the schema must start with model AuthZ. Setting an empty schema, or destroying the resource, clears the project's FGA schema, which also removes any FGA relations that depend on it.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the FgaSchema 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 FgaSchema Resource

    Get an existing FgaSchema 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?: FgaSchemaState, opts?: CustomResourceOptions): FgaSchema
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            project_id: Optional[str] = None,
            schema: Optional[str] = None) -> FgaSchema
    func GetFgaSchema(ctx *Context, name string, id IDInput, state *FgaSchemaState, opts ...ResourceOption) (*FgaSchema, error)
    public static FgaSchema Get(string name, Input<string> id, FgaSchemaState? state, CustomResourceOptions? opts = null)
    public static FgaSchema get(String name, Output<String> id, FgaSchemaState state, CustomResourceOptions options)
    resources:  _:    type: descope:FgaSchema    get:      id: ${id}
    import {
      to = descope_fga_schema.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:
    ProjectId string
    The ID of the project that this FGA schema belongs to. Changing this value will require the resource to be deleted and recreated.
    Schema string
    The project's FGA (fine-grained authorization) schema, configured in the Descope console under the FGA tab. Use the code view to get the schema text and paste it as the value for this attribute. When set, the schema must start with model AuthZ. Setting an empty schema, or destroying the resource, clears the project's FGA schema, which also removes any FGA relations that depend on it.
    ProjectId string
    The ID of the project that this FGA schema belongs to. Changing this value will require the resource to be deleted and recreated.
    Schema string
    The project's FGA (fine-grained authorization) schema, configured in the Descope console under the FGA tab. Use the code view to get the schema text and paste it as the value for this attribute. When set, the schema must start with model AuthZ. Setting an empty schema, or destroying the resource, clears the project's FGA schema, which also removes any FGA relations that depend on it.
    project_id string
    The ID of the project that this FGA schema belongs to. Changing this value will require the resource to be deleted and recreated.
    schema string
    The project's FGA (fine-grained authorization) schema, configured in the Descope console under the FGA tab. Use the code view to get the schema text and paste it as the value for this attribute. When set, the schema must start with model AuthZ. Setting an empty schema, or destroying the resource, clears the project's FGA schema, which also removes any FGA relations that depend on it.
    projectId String
    The ID of the project that this FGA schema belongs to. Changing this value will require the resource to be deleted and recreated.
    schema String
    The project's FGA (fine-grained authorization) schema, configured in the Descope console under the FGA tab. Use the code view to get the schema text and paste it as the value for this attribute. When set, the schema must start with model AuthZ. Setting an empty schema, or destroying the resource, clears the project's FGA schema, which also removes any FGA relations that depend on it.
    projectId string
    The ID of the project that this FGA schema belongs to. Changing this value will require the resource to be deleted and recreated.
    schema string
    The project's FGA (fine-grained authorization) schema, configured in the Descope console under the FGA tab. Use the code view to get the schema text and paste it as the value for this attribute. When set, the schema must start with model AuthZ. Setting an empty schema, or destroying the resource, clears the project's FGA schema, which also removes any FGA relations that depend on it.
    project_id str
    The ID of the project that this FGA schema belongs to. Changing this value will require the resource to be deleted and recreated.
    schema str
    The project's FGA (fine-grained authorization) schema, configured in the Descope console under the FGA tab. Use the code view to get the schema text and paste it as the value for this attribute. When set, the schema must start with model AuthZ. Setting an empty schema, or destroying the resource, clears the project's FGA schema, which also removes any FGA relations that depend on it.
    projectId String
    The ID of the project that this FGA schema belongs to. Changing this value will require the resource to be deleted and recreated.
    schema String
    The project's FGA (fine-grained authorization) schema, configured in the Descope console under the FGA tab. Use the code view to get the schema text and paste it as the value for this attribute. When set, the schema must start with model AuthZ. Setting an empty schema, or destroying the resource, clears the project's FGA schema, which also removes any FGA relations that depend on it.

    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