1. Registry
  2. Packages
  3. Thoth
  4. API Docs
  5. governance
  6. Policy
Viewing docs for Thoth v0.1.24
published on Thursday, Nov 5, 2026 by Aten Security
thoth logo Thoth
Viewing docs for Thoth v0.1.24
published on Thursday, Nov 5, 2026 by Aten Security

    Create Policy Resource

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

    Constructor syntax

    new Policy(name: string, args: PolicyArgs, opts?: CustomResourceOptions);
    @overload
    def Policy(resource_name: str,
               args: PolicyArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Policy(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               enforcement: Optional[str] = None,
               environment: Optional[str] = None,
               name: Optional[str] = None,
               type: Optional[str] = None,
               applied_tos: Optional[Sequence[str]] = None,
               description: Optional[str] = None,
               enabled: Optional[bool] = None,
               rules_json: Optional[str] = None)
    func NewPolicy(ctx *Context, name string, args PolicyArgs, opts ...ResourceOption) (*Policy, error)
    public Policy(string name, PolicyArgs args, CustomResourceOptions? opts = null)
    public Policy(String name, PolicyArgs args)
    public Policy(String name, PolicyArgs args, CustomResourceOptions options)
    
    type: thoth:governance:Policy
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "thoth_governance_policy" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args PolicyArgs
    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 PolicyArgs
    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 PolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PolicyArgs
    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 thothPolicyResource = new Thoth.Governance.Policy("thothPolicyResource", new()
    {
        Enforcement = "string",
        Environment = "string",
        Name = "string",
        Type = "string",
        AppliedTos = new[]
        {
            "string",
        },
        Description = "string",
        Enabled = false,
        RulesJson = "string",
    });
    
    example, err := governance.NewPolicy(ctx, "thothPolicyResource", &governance.PolicyArgs{
    	Enforcement: pulumi.String("string"),
    	Environment: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	Type:        pulumi.String("string"),
    	AppliedTos: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Description: pulumi.String("string"),
    	Enabled:     pulumi.Bool(false),
    	RulesJson:   pulumi.String("string"),
    })
    
    resource "thoth_governance_policy" "thothPolicyResource" {
      lifecycle {
        create_before_destroy = true
      }
      enforcement = "string"
      environment = "string"
      name        = "string"
      type        = "string"
      applied_tos = ["string"]
      description = "string"
      enabled     = false
      rules_json  = "string"
    }
    
    var thothPolicyResource = new com.pulumi.thoth.governance.Policy("thothPolicyResource", com.pulumi.thoth.governance.PolicyArgs.builder()
        .enforcement("string")
        .environment("string")
        .name("string")
        .type("string")
        .appliedTos("string")
        .description("string")
        .enabled(false)
        .rulesJson("string")
        .build());
    
    thoth_policy_resource = thoth.governance.Policy("thothPolicyResource",
        enforcement="string",
        environment="string",
        name="string",
        type="string",
        applied_tos=["string"],
        description="string",
        enabled=False,
        rules_json="string")
    
    const thothPolicyResource = new thoth.governance.Policy("thothPolicyResource", {
        enforcement: "string",
        environment: "string",
        name: "string",
        type: "string",
        appliedTos: ["string"],
        description: "string",
        enabled: false,
        rulesJson: "string",
    });
    
    type: thoth:governance:Policy
    properties:
        appliedTos:
            - string
        description: string
        enabled: false
        enforcement: string
        environment: string
        name: string
        rulesJson: string
        type: string
    

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

    Enforcement string
    monitor, review or block.
    Environment string
    dev or prod. Changing it replaces the rule; promote a dev rule with the configuration preview or the API.
    Name string
    Rule name.
    Type string
    scope, budget, risk or data_access.
    AppliedTos List<string>
    Agent IDs the rule applies to, or ["all"] (the default).
    Description string
    Rule description.
    Enabled bool
    Whether the rule applies. Turning a rule on needs an org admin's key; a pending rule stays pending until approved.
    RulesJson string
    What the rule matches, as a JSON object (for example with jsonencode()) with one of tool, tool_names, model_name, model_provider, purpose, data_classification, minTokenCount or min_estimated_cost_usd, or the overlay keys blockedTools and allowed_tools. A rule with none of these is refused, because Thoth would never apply it.
    Enforcement string
    monitor, review or block.
    Environment string
    dev or prod. Changing it replaces the rule; promote a dev rule with the configuration preview or the API.
    Name string
    Rule name.
    Type string
    scope, budget, risk or data_access.
    AppliedTos []string
    Agent IDs the rule applies to, or ["all"] (the default).
    Description string
    Rule description.
    Enabled bool
    Whether the rule applies. Turning a rule on needs an org admin's key; a pending rule stays pending until approved.
    RulesJson string
    What the rule matches, as a JSON object (for example with jsonencode()) with one of tool, tool_names, model_name, model_provider, purpose, data_classification, minTokenCount or min_estimated_cost_usd, or the overlay keys blockedTools and allowed_tools. A rule with none of these is refused, because Thoth would never apply it.
    enforcement string
    monitor, review or block.
    environment string
    dev or prod. Changing it replaces the rule; promote a dev rule with the configuration preview or the API.
    name string
    Rule name.
    type string
    scope, budget, risk or data_access.
    applied_tos list(string)
    Agent IDs the rule applies to, or ["all"] (the default).
    description string
    Rule description.
    enabled bool
    Whether the rule applies. Turning a rule on needs an org admin's key; a pending rule stays pending until approved.
    rules_json string
    What the rule matches, as a JSON object (for example with jsonencode()) with one of tool, tool_names, model_name, model_provider, purpose, data_classification, minTokenCount or min_estimated_cost_usd, or the overlay keys blockedTools and allowed_tools. A rule with none of these is refused, because Thoth would never apply it.
    enforcement String
    monitor, review or block.
    environment String
    dev or prod. Changing it replaces the rule; promote a dev rule with the configuration preview or the API.
    name String
    Rule name.
    type String
    scope, budget, risk or data_access.
    appliedTos List<String>
    Agent IDs the rule applies to, or ["all"] (the default).
    description String
    Rule description.
    enabled Boolean
    Whether the rule applies. Turning a rule on needs an org admin's key; a pending rule stays pending until approved.
    rulesJson String
    What the rule matches, as a JSON object (for example with jsonencode()) with one of tool, tool_names, model_name, model_provider, purpose, data_classification, minTokenCount or min_estimated_cost_usd, or the overlay keys blockedTools and allowed_tools. A rule with none of these is refused, because Thoth would never apply it.
    enforcement string
    monitor, review or block.
    environment string
    dev or prod. Changing it replaces the rule; promote a dev rule with the configuration preview or the API.
    name string
    Rule name.
    type string
    scope, budget, risk or data_access.
    appliedTos string[]
    Agent IDs the rule applies to, or ["all"] (the default).
    description string
    Rule description.
    enabled boolean
    Whether the rule applies. Turning a rule on needs an org admin's key; a pending rule stays pending until approved.
    rulesJson string
    What the rule matches, as a JSON object (for example with jsonencode()) with one of tool, tool_names, model_name, model_provider, purpose, data_classification, minTokenCount or min_estimated_cost_usd, or the overlay keys blockedTools and allowed_tools. A rule with none of these is refused, because Thoth would never apply it.
    enforcement str
    monitor, review or block.
    environment str
    dev or prod. Changing it replaces the rule; promote a dev rule with the configuration preview or the API.
    name str
    Rule name.
    type str
    scope, budget, risk or data_access.
    applied_tos Sequence[str]
    Agent IDs the rule applies to, or ["all"] (the default).
    description str
    Rule description.
    enabled bool
    Whether the rule applies. Turning a rule on needs an org admin's key; a pending rule stays pending until approved.
    rules_json str
    What the rule matches, as a JSON object (for example with jsonencode()) with one of tool, tool_names, model_name, model_provider, purpose, data_classification, minTokenCount or min_estimated_cost_usd, or the overlay keys blockedTools and allowed_tools. A rule with none of these is refused, because Thoth would never apply it.
    enforcement String
    monitor, review or block.
    environment String
    dev or prod. Changing it replaces the rule; promote a dev rule with the configuration preview or the API.
    name String
    Rule name.
    type String
    scope, budget, risk or data_access.
    appliedTos List<String>
    Agent IDs the rule applies to, or ["all"] (the default).
    description String
    Rule description.
    enabled Boolean
    Whether the rule applies. Turning a rule on needs an org admin's key; a pending rule stays pending until approved.
    rulesJson String
    What the rule matches, as a JSON object (for example with jsonencode()) with one of tool, tool_names, model_name, model_provider, purpose, data_classification, minTokenCount or min_estimated_cost_usd, or the overlay keys blockedTools and allowed_tools. A rule with none of these is refused, because Thoth would never apply it.

    Outputs

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

    CreatedAt string
    Creation timestamp.
    Id string
    The provider-assigned unique ID for this managed resource.
    PolicyId string
    Policy rule ID assigned by Thoth.
    Status string
    pending, active, disabled or rejected.
    TenantId string
    Tenant ID from provider configuration.
    UpdatedAt string
    Last update timestamp.
    CreatedAt string
    Creation timestamp.
    Id string
    The provider-assigned unique ID for this managed resource.
    PolicyId string
    Policy rule ID assigned by Thoth.
    Status string
    pending, active, disabled or rejected.
    TenantId string
    Tenant ID from provider configuration.
    UpdatedAt string
    Last update timestamp.
    created_at string
    Creation timestamp.
    id string
    The provider-assigned unique ID for this managed resource.
    policy_id string
    Policy rule ID assigned by Thoth.
    status string
    pending, active, disabled or rejected.
    tenant_id string
    Tenant ID from provider configuration.
    updated_at string
    Last update timestamp.
    createdAt String
    Creation timestamp.
    id String
    The provider-assigned unique ID for this managed resource.
    policyId String
    Policy rule ID assigned by Thoth.
    status String
    pending, active, disabled or rejected.
    tenantId String
    Tenant ID from provider configuration.
    updatedAt String
    Last update timestamp.
    createdAt string
    Creation timestamp.
    id string
    The provider-assigned unique ID for this managed resource.
    policyId string
    Policy rule ID assigned by Thoth.
    status string
    pending, active, disabled or rejected.
    tenantId string
    Tenant ID from provider configuration.
    updatedAt string
    Last update timestamp.
    created_at str
    Creation timestamp.
    id str
    The provider-assigned unique ID for this managed resource.
    policy_id str
    Policy rule ID assigned by Thoth.
    status str
    pending, active, disabled or rejected.
    tenant_id str
    Tenant ID from provider configuration.
    updated_at str
    Last update timestamp.
    createdAt String
    Creation timestamp.
    id String
    The provider-assigned unique ID for this managed resource.
    policyId String
    Policy rule ID assigned by Thoth.
    status String
    pending, active, disabled or rejected.
    tenantId String
    Tenant ID from provider configuration.
    updatedAt String
    Last update timestamp.

    Look up Existing Policy Resource

    Get an existing Policy 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?: PolicyState, opts?: CustomResourceOptions): Policy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            applied_tos: Optional[Sequence[str]] = None,
            created_at: Optional[str] = None,
            description: Optional[str] = None,
            enabled: Optional[bool] = None,
            enforcement: Optional[str] = None,
            environment: Optional[str] = None,
            name: Optional[str] = None,
            policy_id: Optional[str] = None,
            rules_json: Optional[str] = None,
            status: Optional[str] = None,
            tenant_id: Optional[str] = None,
            type: Optional[str] = None,
            updated_at: Optional[str] = None) -> Policy
    func GetPolicy(ctx *Context, name string, id IDInput, state *PolicyState, opts ...ResourceOption) (*Policy, error)
    public static Policy Get(string name, Input<string> id, PolicyState? state, CustomResourceOptions? opts = null)
    public static Policy get(String name, Output<String> id, PolicyState state, CustomResourceOptions options)
    resources:  _:    type: thoth:governance:Policy    get:      id: ${id}
    import {
      to = thoth_governance_policy.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:
    AppliedTos List<string>
    Agent IDs the rule applies to, or ["all"] (the default).
    CreatedAt string
    Creation timestamp.
    Description string
    Rule description.
    Enabled bool
    Whether the rule applies. Turning a rule on needs an org admin's key; a pending rule stays pending until approved.
    Enforcement string
    monitor, review or block.
    Environment string
    dev or prod. Changing it replaces the rule; promote a dev rule with the configuration preview or the API.
    Name string
    Rule name.
    PolicyId string
    Policy rule ID assigned by Thoth.
    RulesJson string
    What the rule matches, as a JSON object (for example with jsonencode()) with one of tool, tool_names, model_name, model_provider, purpose, data_classification, minTokenCount or min_estimated_cost_usd, or the overlay keys blockedTools and allowed_tools. A rule with none of these is refused, because Thoth would never apply it.
    Status string
    pending, active, disabled or rejected.
    TenantId string
    Tenant ID from provider configuration.
    Type string
    scope, budget, risk or data_access.
    UpdatedAt string
    Last update timestamp.
    AppliedTos []string
    Agent IDs the rule applies to, or ["all"] (the default).
    CreatedAt string
    Creation timestamp.
    Description string
    Rule description.
    Enabled bool
    Whether the rule applies. Turning a rule on needs an org admin's key; a pending rule stays pending until approved.
    Enforcement string
    monitor, review or block.
    Environment string
    dev or prod. Changing it replaces the rule; promote a dev rule with the configuration preview or the API.
    Name string
    Rule name.
    PolicyId string
    Policy rule ID assigned by Thoth.
    RulesJson string
    What the rule matches, as a JSON object (for example with jsonencode()) with one of tool, tool_names, model_name, model_provider, purpose, data_classification, minTokenCount or min_estimated_cost_usd, or the overlay keys blockedTools and allowed_tools. A rule with none of these is refused, because Thoth would never apply it.
    Status string
    pending, active, disabled or rejected.
    TenantId string
    Tenant ID from provider configuration.
    Type string
    scope, budget, risk or data_access.
    UpdatedAt string
    Last update timestamp.
    applied_tos list(string)
    Agent IDs the rule applies to, or ["all"] (the default).
    created_at string
    Creation timestamp.
    description string
    Rule description.
    enabled bool
    Whether the rule applies. Turning a rule on needs an org admin's key; a pending rule stays pending until approved.
    enforcement string
    monitor, review or block.
    environment string
    dev or prod. Changing it replaces the rule; promote a dev rule with the configuration preview or the API.
    name string
    Rule name.
    policy_id string
    Policy rule ID assigned by Thoth.
    rules_json string
    What the rule matches, as a JSON object (for example with jsonencode()) with one of tool, tool_names, model_name, model_provider, purpose, data_classification, minTokenCount or min_estimated_cost_usd, or the overlay keys blockedTools and allowed_tools. A rule with none of these is refused, because Thoth would never apply it.
    status string
    pending, active, disabled or rejected.
    tenant_id string
    Tenant ID from provider configuration.
    type string
    scope, budget, risk or data_access.
    updated_at string
    Last update timestamp.
    appliedTos List<String>
    Agent IDs the rule applies to, or ["all"] (the default).
    createdAt String
    Creation timestamp.
    description String
    Rule description.
    enabled Boolean
    Whether the rule applies. Turning a rule on needs an org admin's key; a pending rule stays pending until approved.
    enforcement String
    monitor, review or block.
    environment String
    dev or prod. Changing it replaces the rule; promote a dev rule with the configuration preview or the API.
    name String
    Rule name.
    policyId String
    Policy rule ID assigned by Thoth.
    rulesJson String
    What the rule matches, as a JSON object (for example with jsonencode()) with one of tool, tool_names, model_name, model_provider, purpose, data_classification, minTokenCount or min_estimated_cost_usd, or the overlay keys blockedTools and allowed_tools. A rule with none of these is refused, because Thoth would never apply it.
    status String
    pending, active, disabled or rejected.
    tenantId String
    Tenant ID from provider configuration.
    type String
    scope, budget, risk or data_access.
    updatedAt String
    Last update timestamp.
    appliedTos string[]
    Agent IDs the rule applies to, or ["all"] (the default).
    createdAt string
    Creation timestamp.
    description string
    Rule description.
    enabled boolean
    Whether the rule applies. Turning a rule on needs an org admin's key; a pending rule stays pending until approved.
    enforcement string
    monitor, review or block.
    environment string
    dev or prod. Changing it replaces the rule; promote a dev rule with the configuration preview or the API.
    name string
    Rule name.
    policyId string
    Policy rule ID assigned by Thoth.
    rulesJson string
    What the rule matches, as a JSON object (for example with jsonencode()) with one of tool, tool_names, model_name, model_provider, purpose, data_classification, minTokenCount or min_estimated_cost_usd, or the overlay keys blockedTools and allowed_tools. A rule with none of these is refused, because Thoth would never apply it.
    status string
    pending, active, disabled or rejected.
    tenantId string
    Tenant ID from provider configuration.
    type string
    scope, budget, risk or data_access.
    updatedAt string
    Last update timestamp.
    applied_tos Sequence[str]
    Agent IDs the rule applies to, or ["all"] (the default).
    created_at str
    Creation timestamp.
    description str
    Rule description.
    enabled bool
    Whether the rule applies. Turning a rule on needs an org admin's key; a pending rule stays pending until approved.
    enforcement str
    monitor, review or block.
    environment str
    dev or prod. Changing it replaces the rule; promote a dev rule with the configuration preview or the API.
    name str
    Rule name.
    policy_id str
    Policy rule ID assigned by Thoth.
    rules_json str
    What the rule matches, as a JSON object (for example with jsonencode()) with one of tool, tool_names, model_name, model_provider, purpose, data_classification, minTokenCount or min_estimated_cost_usd, or the overlay keys blockedTools and allowed_tools. A rule with none of these is refused, because Thoth would never apply it.
    status str
    pending, active, disabled or rejected.
    tenant_id str
    Tenant ID from provider configuration.
    type str
    scope, budget, risk or data_access.
    updated_at str
    Last update timestamp.
    appliedTos List<String>
    Agent IDs the rule applies to, or ["all"] (the default).
    createdAt String
    Creation timestamp.
    description String
    Rule description.
    enabled Boolean
    Whether the rule applies. Turning a rule on needs an org admin's key; a pending rule stays pending until approved.
    enforcement String
    monitor, review or block.
    environment String
    dev or prod. Changing it replaces the rule; promote a dev rule with the configuration preview or the API.
    name String
    Rule name.
    policyId String
    Policy rule ID assigned by Thoth.
    rulesJson String
    What the rule matches, as a JSON object (for example with jsonencode()) with one of tool, tool_names, model_name, model_provider, purpose, data_classification, minTokenCount or min_estimated_cost_usd, or the overlay keys blockedTools and allowed_tools. A rule with none of these is refused, because Thoth would never apply it.
    status String
    pending, active, disabled or rejected.
    tenantId String
    Tenant ID from provider configuration.
    type String
    scope, budget, risk or data_access.
    updatedAt String
    Last update timestamp.

    Package Details

    Repository
    thoth atensecurity/pulumi-thoth
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the thoth Terraform Provider.
    thoth logo Thoth
    Viewing docs for Thoth v0.1.24
    published on Thursday, Nov 5, 2026 by Aten Security

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial