1. Packages
  2. Twingate
  3. API Docs
  4. getTwingateSecurityPolicy
Twingate v3.0.18 published on Wednesday, Apr 16, 2025 by Twingate

twingate.getTwingateSecurityPolicy

Explore with Pulumi AI

Twingate v3.0.18 published on Wednesday, Apr 16, 2025 by Twingate

Security Policies are defined in the Twingate Admin Console and determine user and device authentication requirements for Resources.

Example Usage

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

const foo = twingate.getTwingateSecurityPolicy({
    name: "<your security policy name>",
});
Copy
import pulumi
import pulumi_twingate as twingate

foo = twingate.get_twingate_security_policy(name="<your security policy name>")
Copy
package main

import (
	"github.com/Twingate/pulumi-twingate/sdk/v3/go/twingate"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := twingate.GetTwingateSecurityPolicy(ctx, &twingate.GetTwingateSecurityPolicyArgs{
			Name: pulumi.StringRef("<your security policy name>"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Twingate = Pulumi.Twingate;

return await Deployment.RunAsync(() => 
{
    var foo = Twingate.GetTwingateSecurityPolicy.Invoke(new()
    {
        Name = "<your security policy name>",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.twingate.TwingateFunctions;
import com.pulumi.twingate.inputs.GetTwingateSecurityPolicyArgs;
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) {
        final var foo = TwingateFunctions.getTwingateSecurityPolicy(GetTwingateSecurityPolicyArgs.builder()
            .name("<your security policy name>")
            .build());

    }
}
Copy
variables:
  foo:
    fn::invoke:
      function: twingate:getTwingateSecurityPolicy
      arguments:
        name: <your security policy name>
Copy

Using getTwingateSecurityPolicy

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getTwingateSecurityPolicy(args: GetTwingateSecurityPolicyArgs, opts?: InvokeOptions): Promise<GetTwingateSecurityPolicyResult>
function getTwingateSecurityPolicyOutput(args: GetTwingateSecurityPolicyOutputArgs, opts?: InvokeOptions): Output<GetTwingateSecurityPolicyResult>
Copy
def get_twingate_security_policy(id: Optional[str] = None,
                                 name: Optional[str] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetTwingateSecurityPolicyResult
def get_twingate_security_policy_output(id: Optional[pulumi.Input[str]] = None,
                                 name: Optional[pulumi.Input[str]] = None,
                                 opts: Optional[InvokeOptions] = None) -> Output[GetTwingateSecurityPolicyResult]
Copy
func GetTwingateSecurityPolicy(ctx *Context, args *GetTwingateSecurityPolicyArgs, opts ...InvokeOption) (*GetTwingateSecurityPolicyResult, error)
func GetTwingateSecurityPolicyOutput(ctx *Context, args *GetTwingateSecurityPolicyOutputArgs, opts ...InvokeOption) GetTwingateSecurityPolicyResultOutput
Copy

> Note: This function is named GetTwingateSecurityPolicy in the Go SDK.

public static class GetTwingateSecurityPolicy 
{
    public static Task<GetTwingateSecurityPolicyResult> InvokeAsync(GetTwingateSecurityPolicyArgs args, InvokeOptions? opts = null)
    public static Output<GetTwingateSecurityPolicyResult> Invoke(GetTwingateSecurityPolicyInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetTwingateSecurityPolicyResult> getTwingateSecurityPolicy(GetTwingateSecurityPolicyArgs args, InvokeOptions options)
public static Output<GetTwingateSecurityPolicyResult> getTwingateSecurityPolicy(GetTwingateSecurityPolicyArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: twingate:index/getTwingateSecurityPolicy:getTwingateSecurityPolicy
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Id string
Return a Security Policy by its ID. The ID for the Security Policy can be obtained from the Admin API or the URL string in the Admin Console.
Name string
Return a Security Policy that exactly matches this name.
Id string
Return a Security Policy by its ID. The ID for the Security Policy can be obtained from the Admin API or the URL string in the Admin Console.
Name string
Return a Security Policy that exactly matches this name.
id String
Return a Security Policy by its ID. The ID for the Security Policy can be obtained from the Admin API or the URL string in the Admin Console.
name String
Return a Security Policy that exactly matches this name.
id string
Return a Security Policy by its ID. The ID for the Security Policy can be obtained from the Admin API or the URL string in the Admin Console.
name string
Return a Security Policy that exactly matches this name.
id str
Return a Security Policy by its ID. The ID for the Security Policy can be obtained from the Admin API or the URL string in the Admin Console.
name str
Return a Security Policy that exactly matches this name.
id String
Return a Security Policy by its ID. The ID for the Security Policy can be obtained from the Admin API or the URL string in the Admin Console.
name String
Return a Security Policy that exactly matches this name.

getTwingateSecurityPolicy Result

The following output properties are available:

Id string
Return a Security Policy by its ID. The ID for the Security Policy can be obtained from the Admin API or the URL string in the Admin Console.
Name string
Return a Security Policy that exactly matches this name.
Id string
Return a Security Policy by its ID. The ID for the Security Policy can be obtained from the Admin API or the URL string in the Admin Console.
Name string
Return a Security Policy that exactly matches this name.
id String
Return a Security Policy by its ID. The ID for the Security Policy can be obtained from the Admin API or the URL string in the Admin Console.
name String
Return a Security Policy that exactly matches this name.
id string
Return a Security Policy by its ID. The ID for the Security Policy can be obtained from the Admin API or the URL string in the Admin Console.
name string
Return a Security Policy that exactly matches this name.
id str
Return a Security Policy by its ID. The ID for the Security Policy can be obtained from the Admin API or the URL string in the Admin Console.
name str
Return a Security Policy that exactly matches this name.
id String
Return a Security Policy by its ID. The ID for the Security Policy can be obtained from the Admin API or the URL string in the Admin Console.
name String
Return a Security Policy that exactly matches this name.

Package Details

Repository
twingate Twingate/pulumi-twingate
License
Apache-2.0
Notes
This Pulumi package is based on the twingate Terraform Provider.
Twingate v3.0.18 published on Wednesday, Apr 16, 2025 by Twingate