published on Thursday, Nov 5, 2026 by Aten Security
Thothpublished 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.
- 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.
- Applied
Tos []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.
- 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.
- applied
Tos 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.
- 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.
- applied
Tos 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.
- 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 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.
- applied
Tos 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.
- 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the Policy resource produces the following output properties:
- 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.
- 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.
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) -> Policyfunc 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.
- 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.
- Applied
Tos []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.
- 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.
- applied
Tos List<String> - Agent IDs the rule applies to, or ["all"] (the default).
- created
At 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.
- 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.
- applied
Tos string[] - Agent IDs the rule applies to, or ["all"] (the default).
- created
At 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.
- 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.
- 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.
- applied
Tos List<String> - Agent IDs the rule applies to, or ["all"] (the default).
- created
At 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.
- 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.
Package Details
- Repository
- thoth atensecurity/pulumi-thoth
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
thothTerraform Provider.
Thothpublished on Thursday, Nov 5, 2026 by Aten Security