1. Packages
  2. Twingate
  3. API Docs
  4. getTwingateSecurityPolicy
Twingate v3.0.12 published on Tuesday, Nov 5, 2024 by Twingate

twingate.getTwingateSecurityPolicy

Explore with Pulumi AI

twingate logo
Twingate v3.0.12 published on Tuesday, Nov 5, 2024 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>",
    });
    
    import pulumi
    import pulumi_twingate as twingate
    
    foo = twingate.get_twingate_security_policy(name="<your security policy name>")
    
    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
    	})
    }
    
    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>",
        });
    
    });
    
    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());
    
        }
    }
    
    variables:
      foo:
        fn::invoke:
          Function: twingate:getTwingateSecurityPolicy
          Arguments:
            name: <your security policy name>
    

    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>
    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]
    func GetTwingateSecurityPolicy(ctx *Context, args *GetTwingateSecurityPolicyArgs, opts ...InvokeOption) (*GetTwingateSecurityPolicyResult, error)
    func GetTwingateSecurityPolicyOutput(ctx *Context, args *GetTwingateSecurityPolicyOutputArgs, opts ...InvokeOption) GetTwingateSecurityPolicyResultOutput

    > 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)
    }
    public static CompletableFuture<GetTwingateSecurityPolicyResult> getTwingateSecurityPolicy(GetTwingateSecurityPolicyArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: twingate:index/getTwingateSecurityPolicy:getTwingateSecurityPolicy
      arguments:
        # arguments dictionary

    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 logo
    Twingate v3.0.12 published on Tuesday, Nov 5, 2024 by Twingate