published on Thursday, Jul 23, 2026 by Aten Security
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.
- 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 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 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.
- policy
Json String - Policy JSON object.
- provider
Name String - Browser provider slug.
- active Boolean
- 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 Integer
- Optional explicit policy version.
- name string
- Policy display name.
- policy
Json string - Policy JSON object.
- provider
Name string - Browser provider slug.
- active boolean
- 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 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.
- policy
Json String - Policy JSON object.
- provider
Name String - Browser provider slug.
- active Boolean
- 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the Policy resource produces the following output properties:
- Compiled
Policy stringJson - 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.
- Compiled
Policy stringJson - 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.
- compiled_
policy_ stringjson - 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.
- compiled
Policy StringJson - 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.
- compiled
Policy stringJson - 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.
- compiled_
policy_ strjson - 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.
- compiled
Policy StringJson - 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.
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) -> 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: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.
- Active bool
- Whether the policy is active.
- Compiled
Policy stringJson - 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 int
- Optional explicit policy version.
- Active bool
- Whether the policy is active.
- Compiled
Policy stringJson - 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 int
- Optional explicit policy version.
- active bool
- Whether the policy is active.
- compiled_
policy_ stringjson - 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.
- compiled
Policy StringJson - 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 Integer
- Optional explicit policy version.
- active boolean
- Whether the policy is active.
- compiled
Policy stringJson - 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 bool
- Whether the policy is active.
- compiled_
policy_ strjson - 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.
- compiled
Policy StringJson - 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.
Package Details
- Repository
- thoth atensecurity/pulumi-thoth
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
thothTerraform Provider.
published on Thursday, Jul 23, 2026 by Aten Security