1. Packages
  2. Authentik Provider
  3. API Docs
  4. PolicyExpression
authentik 2025.2.0 published on Monday, Mar 24, 2025 by goauthentik

authentik.PolicyExpression

Explore with Pulumi AI

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as authentik from "@pulumi/authentik";

const name = new authentik.PolicyExpression("name", {expression: "return True"});
Copy
import pulumi
import pulumi_authentik as authentik

name = authentik.PolicyExpression("name", expression="return True")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/authentik/v2025/authentik"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := authentik.NewPolicyExpression(ctx, "name", &authentik.PolicyExpressionArgs{
			Expression: pulumi.String("return True"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Authentik = Pulumi.Authentik;

return await Deployment.RunAsync(() => 
{
    var name = new Authentik.PolicyExpression("name", new()
    {
        Expression = "return True",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.authentik.PolicyExpression;
import com.pulumi.authentik.PolicyExpressionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var name = new PolicyExpression("name", PolicyExpressionArgs.builder()
            .expression("return True")
            .build());

    }
}
Copy
resources:
  name:
    type: authentik:PolicyExpression
    properties:
      expression: return True
Copy

Create PolicyExpression Resource

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

Constructor syntax

new PolicyExpression(name: string, args: PolicyExpressionArgs, opts?: CustomResourceOptions);
@overload
def PolicyExpression(resource_name: str,
                     args: PolicyExpressionArgs,
                     opts: Optional[ResourceOptions] = None)

@overload
def PolicyExpression(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     expression: Optional[str] = None,
                     execution_logging: Optional[bool] = None,
                     name: Optional[str] = None,
                     policy_expression_id: Optional[str] = None)
func NewPolicyExpression(ctx *Context, name string, args PolicyExpressionArgs, opts ...ResourceOption) (*PolicyExpression, error)
public PolicyExpression(string name, PolicyExpressionArgs args, CustomResourceOptions? opts = null)
public PolicyExpression(String name, PolicyExpressionArgs args)
public PolicyExpression(String name, PolicyExpressionArgs args, CustomResourceOptions options)
type: authentik:PolicyExpression
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. PolicyExpressionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. PolicyExpressionArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. PolicyExpressionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. PolicyExpressionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. PolicyExpressionArgs
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 policyExpressionResource = new Authentik.PolicyExpression("policyExpressionResource", new()
{
    Expression = "string",
    ExecutionLogging = false,
    Name = "string",
    PolicyExpressionId = "string",
});
Copy
example, err := authentik.NewPolicyExpression(ctx, "policyExpressionResource", &authentik.PolicyExpressionArgs{
	Expression:         pulumi.String("string"),
	ExecutionLogging:   pulumi.Bool(false),
	Name:               pulumi.String("string"),
	PolicyExpressionId: pulumi.String("string"),
})
Copy
var policyExpressionResource = new PolicyExpression("policyExpressionResource", PolicyExpressionArgs.builder()
    .expression("string")
    .executionLogging(false)
    .name("string")
    .policyExpressionId("string")
    .build());
Copy
policy_expression_resource = authentik.PolicyExpression("policyExpressionResource",
    expression="string",
    execution_logging=False,
    name="string",
    policy_expression_id="string")
Copy
const policyExpressionResource = new authentik.PolicyExpression("policyExpressionResource", {
    expression: "string",
    executionLogging: false,
    name: "string",
    policyExpressionId: "string",
});
Copy
type: authentik:PolicyExpression
properties:
    executionLogging: false
    expression: string
    name: string
    policyExpressionId: string
Copy

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

Expression This property is required. string
ExecutionLogging bool
Defaults to false.
Name string
PolicyExpressionId string
The ID of this resource.
Expression This property is required. string
ExecutionLogging bool
Defaults to false.
Name string
PolicyExpressionId string
The ID of this resource.
expression This property is required. String
executionLogging Boolean
Defaults to false.
name String
policyExpressionId String
The ID of this resource.
expression This property is required. string
executionLogging boolean
Defaults to false.
name string
policyExpressionId string
The ID of this resource.
expression This property is required. str
execution_logging bool
Defaults to false.
name str
policy_expression_id str
The ID of this resource.
expression This property is required. String
executionLogging Boolean
Defaults to false.
name String
policyExpressionId String
The ID of this resource.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing PolicyExpression Resource

Get an existing PolicyExpression 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?: PolicyExpressionState, opts?: CustomResourceOptions): PolicyExpression
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        execution_logging: Optional[bool] = None,
        expression: Optional[str] = None,
        name: Optional[str] = None,
        policy_expression_id: Optional[str] = None) -> PolicyExpression
func GetPolicyExpression(ctx *Context, name string, id IDInput, state *PolicyExpressionState, opts ...ResourceOption) (*PolicyExpression, error)
public static PolicyExpression Get(string name, Input<string> id, PolicyExpressionState? state, CustomResourceOptions? opts = null)
public static PolicyExpression get(String name, Output<String> id, PolicyExpressionState state, CustomResourceOptions options)
resources:  _:    type: authentik:PolicyExpression    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
ExecutionLogging bool
Defaults to false.
Expression string
Name string
PolicyExpressionId string
The ID of this resource.
ExecutionLogging bool
Defaults to false.
Expression string
Name string
PolicyExpressionId string
The ID of this resource.
executionLogging Boolean
Defaults to false.
expression String
name String
policyExpressionId String
The ID of this resource.
executionLogging boolean
Defaults to false.
expression string
name string
policyExpressionId string
The ID of this resource.
execution_logging bool
Defaults to false.
expression str
name str
policy_expression_id str
The ID of this resource.
executionLogging Boolean
Defaults to false.
expression String
name String
policyExpressionId String
The ID of this resource.

Package Details

Repository
authentik goauthentik/terraform-provider-authentik
License
Notes
This Pulumi package is based on the authentik Terraform Provider.