1. Packages
  2. Packages
  3. Thoth
  4. API Docs
  5. browser
  6. Policy
Viewing docs for Thoth v0.1.15
published on Thursday, Jul 23, 2026 by Aten Security
thoth logo
Viewing docs for Thoth v0.1.15
published on Thursday, Jul 23, 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,
               name: Optional[str] = None,
               policy_json: Optional[str] = None,
               provider_name: Optional[str] = None,
               active: Optional[bool] = None,
               created_by: Optional[str] = None,
               enforcement_mode: Optional[str] = None,
               metadata_json: Optional[str] = None,
               policy_id: Optional[str] = None,
               updated_by: Optional[str] = None,
               version: Optional[int] = 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:browser:Policy
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "thoth_browser_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 policyResource = new Thoth.Browser.Policy("policyResource", new()
    {
        Name = "string",
        PolicyJson = "string",
        ProviderName = "string",
        Active = false,
        CreatedBy = "string",
        EnforcementMode = "string",
        MetadataJson = "string",
        PolicyId = "string",
        UpdatedBy = "string",
        Version = 0,
    });
    
    example, err := browser.NewPolicy(ctx, "policyResource", &browser.PolicyArgs{
    	Name:            pulumi.String("string"),
    	PolicyJson:      pulumi.String("string"),
    	ProviderName:    pulumi.String("string"),
    	Active:          pulumi.Bool(false),
    	CreatedBy:       pulumi.String("string"),
    	EnforcementMode: pulumi.String("string"),
    	MetadataJson:    pulumi.String("string"),
    	PolicyId:        pulumi.String("string"),
    	UpdatedBy:       pulumi.String("string"),
    	Version:         pulumi.Int(0),
    })
    
    resource "thoth_browser_policy" "policyResource" {
      lifecycle {
        create_before_destroy = true
      }
      name             = "string"
      policy_json      = "string"
      provider_name    = "string"
      active           = false
      created_by       = "string"
      enforcement_mode = "string"
      metadata_json    = "string"
      policy_id        = "string"
      updated_by       = "string"
      version          = 0
    }
    
    var policyResource = new Policy("policyResource", PolicyArgs.builder()
        .name("string")
        .policyJson("string")
        .providerName("string")
        .active(false)
        .createdBy("string")
        .enforcementMode("string")
        .metadataJson("string")
        .policyId("string")
        .updatedBy("string")
        .version(0)
        .build());
    
    policy_resource = thoth.browser.Policy("policyResource",
        name="string",
        policy_json="string",
        provider_name="string",
        active=False,
        created_by="string",
        enforcement_mode="string",
        metadata_json="string",
        policy_id="string",
        updated_by="string",
        version=0)
    
    const policyResource = new thoth.browser.Policy("policyResource", {
        name: "string",
        policyJson: "string",
        providerName: "string",
        active: false,
        createdBy: "string",
        enforcementMode: "string",
        metadataJson: "string",
        policyId: "string",
        updatedBy: "string",
        version: 0,
    });
    
    type: thoth:browser:Policy
    properties:
        active: false
        createdBy: string
        enforcementMode: string
        metadataJson: string
        name: string
        policyId: string
        policyJson: string
        providerName: string
        updatedBy: string
        version: 0
    

    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:

    Name string
    Policy display name.
    PolicyJson string
    Policy JSON object.
    ProviderName string
    Browser provider slug.
    Active bool
    Whether the policy is active.
    CreatedBy string
    Override createdBy audit value.
    EnforcementMode string
    Policy mode: monitor or enforce.
    MetadataJson string
    Arbitrary metadata JSON object.
    PolicyId string
    Policy ID. If omitted on create, GovAPI generates one.
    UpdatedBy string
    Override updatedBy audit value.
    Version int
    Optional explicit policy version.
    Name string
    Policy display name.
    PolicyJson string
    Policy JSON object.
    ProviderName string
    Browser provider slug.
    Active bool
    Whether the policy is active.
    CreatedBy string
    Override createdBy audit value.
    EnforcementMode string
    Policy mode: monitor or enforce.
    MetadataJson string
    Arbitrary metadata JSON object.
    PolicyId string
    Policy ID. If omitted on create, GovAPI generates one.
    UpdatedBy string
    Override updatedBy audit value.
    Version int
    Optional explicit policy version.
    name string
    Policy display name.
    policy_json string
    Policy JSON object.
    provider_name string
    Browser provider slug.
    active bool
    Whether the policy is active.
    created_by string
    Override createdBy audit value.
    enforcement_mode string
    Policy mode: monitor or enforce.
    metadata_json string
    Arbitrary metadata JSON object.
    policy_id string
    Policy ID. If omitted on create, GovAPI generates one.
    updated_by string
    Override updatedBy audit value.
    version number
    Optional explicit policy version.
    name String
    Policy display name.
    policyJson String
    Policy JSON object.
    providerName String
    Browser provider slug.
    active Boolean
    Whether the policy is active.
    createdBy String
    Override createdBy audit value.
    enforcementMode String
    Policy mode: monitor or enforce.
    metadataJson String
    Arbitrary metadata JSON object.
    policyId String
    Policy ID. If omitted on create, GovAPI generates one.
    updatedBy String
    Override updatedBy audit value.
    version Integer
    Optional explicit policy version.
    name string
    Policy display name.
    policyJson string
    Policy JSON object.
    providerName string
    Browser provider slug.
    active boolean
    Whether the policy is active.
    createdBy string
    Override createdBy audit value.
    enforcementMode string
    Policy mode: monitor or enforce.
    metadataJson string
    Arbitrary metadata JSON object.
    policyId string
    Policy ID. If omitted on create, GovAPI generates one.
    updatedBy string
    Override updatedBy audit value.
    version number
    Optional explicit policy version.
    name str
    Policy display name.
    policy_json str
    Policy JSON object.
    provider_name str
    Browser provider slug.
    active bool
    Whether the policy is active.
    created_by str
    Override createdBy audit value.
    enforcement_mode str
    Policy mode: monitor or enforce.
    metadata_json str
    Arbitrary metadata JSON object.
    policy_id str
    Policy ID. If omitted on create, GovAPI generates one.
    updated_by str
    Override updatedBy audit value.
    version int
    Optional explicit policy version.
    name String
    Policy display name.
    policyJson String
    Policy JSON object.
    providerName String
    Browser provider slug.
    active Boolean
    Whether the policy is active.
    createdBy String
    Override createdBy audit value.
    enforcementMode String
    Policy mode: monitor or enforce.
    metadataJson String
    Arbitrary metadata JSON object.
    policyId String
    Policy ID. If omitted on create, GovAPI generates one.
    updatedBy String
    Override updatedBy audit value.
    version Number
    Optional explicit policy version.

    Outputs

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

    CompiledPolicyJson string
    Compiled provider-native policy JSON from GovAPI.
    CreatedAt string
    Creation timestamp.
    Id string
    The provider-assigned unique ID for this managed resource.
    TenantId string
    Tenant ID from provider configuration.
    UpdatedAt string
    Update timestamp.
    CompiledPolicyJson string
    Compiled provider-native policy JSON from GovAPI.
    CreatedAt string
    Creation timestamp.
    Id string
    The provider-assigned unique ID for this managed resource.
    TenantId string
    Tenant ID from provider configuration.
    UpdatedAt string
    Update timestamp.
    compiled_policy_json string
    Compiled provider-native policy JSON from GovAPI.
    created_at string
    Creation timestamp.
    id string
    The provider-assigned unique ID for this managed resource.
    tenant_id string
    Tenant ID from provider configuration.
    updated_at string
    Update timestamp.
    compiledPolicyJson String
    Compiled provider-native policy JSON from GovAPI.
    createdAt String
    Creation timestamp.
    id String
    The provider-assigned unique ID for this managed resource.
    tenantId String
    Tenant ID from provider configuration.
    updatedAt String
    Update timestamp.
    compiledPolicyJson string
    Compiled provider-native policy JSON from GovAPI.
    createdAt string
    Creation timestamp.
    id string
    The provider-assigned unique ID for this managed resource.
    tenantId string
    Tenant ID from provider configuration.
    updatedAt string
    Update timestamp.
    compiled_policy_json str
    Compiled provider-native policy JSON from GovAPI.
    created_at str
    Creation timestamp.
    id str
    The provider-assigned unique ID for this managed resource.
    tenant_id str
    Tenant ID from provider configuration.
    updated_at str
    Update timestamp.
    compiledPolicyJson String
    Compiled provider-native policy JSON from GovAPI.
    createdAt String
    Creation timestamp.
    id String
    The provider-assigned unique ID for this managed resource.
    tenantId String
    Tenant ID from provider configuration.
    updatedAt String
    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,
            active: Optional[bool] = None,
            compiled_policy_json: Optional[str] = None,
            created_at: Optional[str] = None,
            created_by: Optional[str] = None,
            enforcement_mode: Optional[str] = None,
            metadata_json: Optional[str] = None,
            name: Optional[str] = None,
            policy_id: Optional[str] = None,
            policy_json: Optional[str] = None,
            provider_name: Optional[str] = None,
            tenant_id: Optional[str] = None,
            updated_at: Optional[str] = None,
            updated_by: Optional[str] = None,
            version: Optional[int] = 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:browser:Policy    get:      id: ${id}
    import {
      to = thoth_browser_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:
    Active bool
    Whether the policy is active.
    CompiledPolicyJson string
    Compiled provider-native policy JSON from GovAPI.
    CreatedAt string
    Creation timestamp.
    CreatedBy string
    Override createdBy audit value.
    EnforcementMode string
    Policy mode: monitor or enforce.
    MetadataJson string
    Arbitrary metadata JSON object.
    Name string
    Policy display name.
    PolicyId string
    Policy ID. If omitted on create, GovAPI generates one.
    PolicyJson string
    Policy JSON object.
    ProviderName string
    Browser provider slug.
    TenantId string
    Tenant ID from provider configuration.
    UpdatedAt string
    Update timestamp.
    UpdatedBy string
    Override updatedBy audit value.
    Version int
    Optional explicit policy version.
    Active bool
    Whether the policy is active.
    CompiledPolicyJson string
    Compiled provider-native policy JSON from GovAPI.
    CreatedAt string
    Creation timestamp.
    CreatedBy string
    Override createdBy audit value.
    EnforcementMode string
    Policy mode: monitor or enforce.
    MetadataJson string
    Arbitrary metadata JSON object.
    Name string
    Policy display name.
    PolicyId string
    Policy ID. If omitted on create, GovAPI generates one.
    PolicyJson string
    Policy JSON object.
    ProviderName string
    Browser provider slug.
    TenantId string
    Tenant ID from provider configuration.
    UpdatedAt string
    Update timestamp.
    UpdatedBy string
    Override updatedBy audit value.
    Version int
    Optional explicit policy version.
    active bool
    Whether the policy is active.
    compiled_policy_json string
    Compiled provider-native policy JSON from GovAPI.
    created_at string
    Creation timestamp.
    created_by string
    Override createdBy audit value.
    enforcement_mode string
    Policy mode: monitor or enforce.
    metadata_json string
    Arbitrary metadata JSON object.
    name string
    Policy display name.
    policy_id string
    Policy ID. If omitted on create, GovAPI generates one.
    policy_json string
    Policy JSON object.
    provider_name string
    Browser provider slug.
    tenant_id string
    Tenant ID from provider configuration.
    updated_at string
    Update timestamp.
    updated_by string
    Override updatedBy audit value.
    version number
    Optional explicit policy version.
    active Boolean
    Whether the policy is active.
    compiledPolicyJson String
    Compiled provider-native policy JSON from GovAPI.
    createdAt String
    Creation timestamp.
    createdBy String
    Override createdBy audit value.
    enforcementMode String
    Policy mode: monitor or enforce.
    metadataJson String
    Arbitrary metadata JSON object.
    name String
    Policy display name.
    policyId String
    Policy ID. If omitted on create, GovAPI generates one.
    policyJson String
    Policy JSON object.
    providerName String
    Browser provider slug.
    tenantId String
    Tenant ID from provider configuration.
    updatedAt String
    Update timestamp.
    updatedBy String
    Override updatedBy audit value.
    version Integer
    Optional explicit policy version.
    active boolean
    Whether the policy is active.
    compiledPolicyJson string
    Compiled provider-native policy JSON from GovAPI.
    createdAt string
    Creation timestamp.
    createdBy string
    Override createdBy audit value.
    enforcementMode string
    Policy mode: monitor or enforce.
    metadataJson string
    Arbitrary metadata JSON object.
    name string
    Policy display name.
    policyId string
    Policy ID. If omitted on create, GovAPI generates one.
    policyJson string
    Policy JSON object.
    providerName string
    Browser provider slug.
    tenantId string
    Tenant ID from provider configuration.
    updatedAt string
    Update timestamp.
    updatedBy string
    Override updatedBy audit value.
    version number
    Optional explicit policy version.
    active bool
    Whether the policy is active.
    compiled_policy_json str
    Compiled provider-native policy JSON from GovAPI.
    created_at str
    Creation timestamp.
    created_by str
    Override createdBy audit value.
    enforcement_mode str
    Policy mode: monitor or enforce.
    metadata_json str
    Arbitrary metadata JSON object.
    name str
    Policy display name.
    policy_id str
    Policy ID. If omitted on create, GovAPI generates one.
    policy_json str
    Policy JSON object.
    provider_name str
    Browser provider slug.
    tenant_id str
    Tenant ID from provider configuration.
    updated_at str
    Update timestamp.
    updated_by str
    Override updatedBy audit value.
    version int
    Optional explicit policy version.
    active Boolean
    Whether the policy is active.
    compiledPolicyJson String
    Compiled provider-native policy JSON from GovAPI.
    createdAt String
    Creation timestamp.
    createdBy String
    Override createdBy audit value.
    enforcementMode String
    Policy mode: monitor or enforce.
    metadataJson String
    Arbitrary metadata JSON object.
    name String
    Policy display name.
    policyId String
    Policy ID. If omitted on create, GovAPI generates one.
    policyJson String
    Policy JSON object.
    providerName String
    Browser provider slug.
    tenantId String
    Tenant ID from provider configuration.
    updatedAt String
    Update timestamp.
    updatedBy String
    Override updatedBy audit value.
    version Number
    Optional explicit policy version.

    Package Details

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

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial