formal.Policy
Explore with Pulumi AI
Creating a Policy in Formal.
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,
description: Optional[str] = None,
module: Optional[str] = None,
notification: Optional[str] = None,
owner: Optional[str] = None,
status: Optional[str] = None,
name: Optional[str] = None,
termination_protection: Optional[bool] = 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: formal:Policy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
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 Pulumi.Policy("policyResource", new()
{
Description = "string",
Module = "string",
Notification = "string",
Owner = "string",
Status = "string",
Name = "string",
TerminationProtection = false,
});
example, err := formal.NewPolicy(ctx, "policyResource", &formal.PolicyArgs{
Description: pulumi.String("string"),
Module: pulumi.String("string"),
Notification: pulumi.String("string"),
Owner: pulumi.String("string"),
Status: pulumi.String("string"),
Name: pulumi.String("string"),
TerminationProtection: pulumi.Bool(false),
})
var policyResource = new Policy("policyResource", PolicyArgs.builder()
.description("string")
.module("string")
.notification("string")
.owner("string")
.status("string")
.name("string")
.terminationProtection(false)
.build());
policy_resource = formal.Policy("policyResource",
description="string",
module="string",
notification="string",
owner="string",
status="string",
name="string",
termination_protection=False)
const policyResource = new formal.Policy("policyResource", {
description: "string",
module: "string",
notification: "string",
owner: "string",
status: "string",
name: "string",
terminationProtection: false,
});
type: formal:Policy
properties:
description: string
module: string
name: string
notification: string
owner: string
status: string
terminationProtection: false
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:
- Description string
- Policy Description.
- Module string
- The module describing how the policy works. Create one in the Formal Console.
- Notification string
- Notification settings for this policy.
- Owner string
- Owner of this policy: it can be either a group name or a user email.
- Status string
- Defines the current status of the policy. It can be one of the following: 'draft', 'dry-run', or 'active'.
- Name string
- Policy Name
- Termination
Protection bool - If set to true, this Policy cannot be deleted.
- Description string
- Policy Description.
- Module string
- The module describing how the policy works. Create one in the Formal Console.
- Notification string
- Notification settings for this policy.
- Owner string
- Owner of this policy: it can be either a group name or a user email.
- Status string
- Defines the current status of the policy. It can be one of the following: 'draft', 'dry-run', or 'active'.
- Name string
- Policy Name
- Termination
Protection bool - If set to true, this Policy cannot be deleted.
- description String
- Policy Description.
- module String
- The module describing how the policy works. Create one in the Formal Console.
- notification String
- Notification settings for this policy.
- owner String
- Owner of this policy: it can be either a group name or a user email.
- status String
- Defines the current status of the policy. It can be one of the following: 'draft', 'dry-run', or 'active'.
- name String
- Policy Name
- termination
Protection Boolean - If set to true, this Policy cannot be deleted.
- description string
- Policy Description.
- module string
- The module describing how the policy works. Create one in the Formal Console.
- notification string
- Notification settings for this policy.
- owner string
- Owner of this policy: it can be either a group name or a user email.
- status string
- Defines the current status of the policy. It can be one of the following: 'draft', 'dry-run', or 'active'.
- name string
- Policy Name
- termination
Protection boolean - If set to true, this Policy cannot be deleted.
- description str
- Policy Description.
- module str
- The module describing how the policy works. Create one in the Formal Console.
- notification str
- Notification settings for this policy.
- owner str
- Owner of this policy: it can be either a group name or a user email.
- status str
- Defines the current status of the policy. It can be one of the following: 'draft', 'dry-run', or 'active'.
- name str
- Policy Name
- termination_
protection bool - If set to true, this Policy cannot be deleted.
- description String
- Policy Description.
- module String
- The module describing how the policy works. Create one in the Formal Console.
- notification String
- Notification settings for this policy.
- owner String
- Owner of this policy: it can be either a group name or a user email.
- status String
- Defines the current status of the policy. It can be one of the following: 'draft', 'dry-run', or 'active'.
- name String
- Policy Name
- termination
Protection Boolean - If set to true, this Policy cannot be deleted.
Outputs
All input properties are implicitly available as output properties. Additionally, the Policy resource produces the following output properties:
- created_
at str - When the policy was created.
- id str
- The provider-assigned unique ID for this managed resource.
- updated_
at str - Last update time.
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,
created_at: Optional[str] = None,
description: Optional[str] = None,
module: Optional[str] = None,
name: Optional[str] = None,
notification: Optional[str] = None,
owner: Optional[str] = None,
status: Optional[str] = None,
termination_protection: Optional[bool] = 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: formal:Policy get: 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.
- Created
At string - When the policy was created.
- Description string
- Policy Description.
- Module string
- The module describing how the policy works. Create one in the Formal Console.
- Name string
- Policy Name
- Notification string
- Notification settings for this policy.
- Owner string
- Owner of this policy: it can be either a group name or a user email.
- Status string
- Defines the current status of the policy. It can be one of the following: 'draft', 'dry-run', or 'active'.
- Termination
Protection bool - If set to true, this Policy cannot be deleted.
- Updated
At string - Last update time.
- Created
At string - When the policy was created.
- Description string
- Policy Description.
- Module string
- The module describing how the policy works. Create one in the Formal Console.
- Name string
- Policy Name
- Notification string
- Notification settings for this policy.
- Owner string
- Owner of this policy: it can be either a group name or a user email.
- Status string
- Defines the current status of the policy. It can be one of the following: 'draft', 'dry-run', or 'active'.
- Termination
Protection bool - If set to true, this Policy cannot be deleted.
- Updated
At string - Last update time.
- created
At String - When the policy was created.
- description String
- Policy Description.
- module String
- The module describing how the policy works. Create one in the Formal Console.
- name String
- Policy Name
- notification String
- Notification settings for this policy.
- owner String
- Owner of this policy: it can be either a group name or a user email.
- status String
- Defines the current status of the policy. It can be one of the following: 'draft', 'dry-run', or 'active'.
- termination
Protection Boolean - If set to true, this Policy cannot be deleted.
- updated
At String - Last update time.
- created
At string - When the policy was created.
- description string
- Policy Description.
- module string
- The module describing how the policy works. Create one in the Formal Console.
- name string
- Policy Name
- notification string
- Notification settings for this policy.
- owner string
- Owner of this policy: it can be either a group name or a user email.
- status string
- Defines the current status of the policy. It can be one of the following: 'draft', 'dry-run', or 'active'.
- termination
Protection boolean - If set to true, this Policy cannot be deleted.
- updated
At string - Last update time.
- created_
at str - When the policy was created.
- description str
- Policy Description.
- module str
- The module describing how the policy works. Create one in the Formal Console.
- name str
- Policy Name
- notification str
- Notification settings for this policy.
- owner str
- Owner of this policy: it can be either a group name or a user email.
- status str
- Defines the current status of the policy. It can be one of the following: 'draft', 'dry-run', or 'active'.
- termination_
protection bool - If set to true, this Policy cannot be deleted.
- updated_
at str - Last update time.
- created
At String - When the policy was created.
- description String
- Policy Description.
- module String
- The module describing how the policy works. Create one in the Formal Console.
- name String
- Policy Name
- notification String
- Notification settings for this policy.
- owner String
- Owner of this policy: it can be either a group name or a user email.
- status String
- Defines the current status of the policy. It can be one of the following: 'draft', 'dry-run', or 'active'.
- termination
Protection Boolean - If set to true, this Policy cannot be deleted.
- updated
At String - Last update time.
Package Details
- Repository
- formal formalco/pulumi-formal
- License
- MPL-2.0
- Notes
- This Pulumi package is based on the
formal
Terraform Provider.