1. Packages
  2. Twingate
  3. API Docs
  4. getTwingateSecurityPolicies
Twingate v3.0.6 published on Thursday, Jun 27, 2024 by Twingate

twingate.getTwingateSecurityPolicies

Explore with Pulumi AI

twingate logo
Twingate v3.0.6 published on Thursday, Jun 27, 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 all = twingate.getTwingateSecurityPolicies({
        name: "<your security policy's name>",
    });
    
    import pulumi
    import pulumi_twingate as twingate
    
    all = twingate.get_twingate_security_policies(name="<your security policy's 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.GetTwingateSecurityPolicies(ctx, &twingate.GetTwingateSecurityPoliciesArgs{
    			Name: pulumi.StringRef("<your security policy's 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 all = Twingate.GetTwingateSecurityPolicies.Invoke(new()
        {
            Name = "<your security policy's 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.GetTwingateSecurityPoliciesArgs;
    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 all = TwingateFunctions.getTwingateSecurityPolicies(GetTwingateSecurityPoliciesArgs.builder()
                .name("<your security policy's name>")
                .build());
    
        }
    }
    
    variables:
      all:
        fn::invoke:
          Function: twingate:getTwingateSecurityPolicies
          Arguments:
            name: <your security policy's name>
    

    Using getTwingateSecurityPolicies

    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 getTwingateSecurityPolicies(args: GetTwingateSecurityPoliciesArgs, opts?: InvokeOptions): Promise<GetTwingateSecurityPoliciesResult>
    function getTwingateSecurityPoliciesOutput(args: GetTwingateSecurityPoliciesOutputArgs, opts?: InvokeOptions): Output<GetTwingateSecurityPoliciesResult>
    def get_twingate_security_policies(name: Optional[str] = None,
                                       name_contains: Optional[str] = None,
                                       name_exclude: Optional[str] = None,
                                       name_prefix: Optional[str] = None,
                                       name_regexp: Optional[str] = None,
                                       name_suffix: Optional[str] = None,
                                       opts: Optional[InvokeOptions] = None) -> GetTwingateSecurityPoliciesResult
    def get_twingate_security_policies_output(name: Optional[pulumi.Input[str]] = None,
                                       name_contains: Optional[pulumi.Input[str]] = None,
                                       name_exclude: Optional[pulumi.Input[str]] = None,
                                       name_prefix: Optional[pulumi.Input[str]] = None,
                                       name_regexp: Optional[pulumi.Input[str]] = None,
                                       name_suffix: Optional[pulumi.Input[str]] = None,
                                       opts: Optional[InvokeOptions] = None) -> Output[GetTwingateSecurityPoliciesResult]
    func GetTwingateSecurityPolicies(ctx *Context, args *GetTwingateSecurityPoliciesArgs, opts ...InvokeOption) (*GetTwingateSecurityPoliciesResult, error)
    func GetTwingateSecurityPoliciesOutput(ctx *Context, args *GetTwingateSecurityPoliciesOutputArgs, opts ...InvokeOption) GetTwingateSecurityPoliciesResultOutput

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

    public static class GetTwingateSecurityPolicies 
    {
        public static Task<GetTwingateSecurityPoliciesResult> InvokeAsync(GetTwingateSecurityPoliciesArgs args, InvokeOptions? opts = null)
        public static Output<GetTwingateSecurityPoliciesResult> Invoke(GetTwingateSecurityPoliciesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetTwingateSecurityPoliciesResult> getTwingateSecurityPolicies(GetTwingateSecurityPoliciesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: twingate:index/getTwingateSecurityPolicies:getTwingateSecurityPolicies
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    Returns only security policies that exactly match this name. If no options are passed it will return all security policies. Only one option can be used at a time.
    NameContains string
    Match when the value exist in the name of the security policy.
    NameExclude string
    Match when the exact value does not exist in the name of the security policy.
    NamePrefix string
    The name of the security policy must start with the value.
    NameRegexp string
    The regular expression match of the name of the security policy.
    NameSuffix string
    The name of the security policy must end with the value.
    Name string
    Returns only security policies that exactly match this name. If no options are passed it will return all security policies. Only one option can be used at a time.
    NameContains string
    Match when the value exist in the name of the security policy.
    NameExclude string
    Match when the exact value does not exist in the name of the security policy.
    NamePrefix string
    The name of the security policy must start with the value.
    NameRegexp string
    The regular expression match of the name of the security policy.
    NameSuffix string
    The name of the security policy must end with the value.
    name String
    Returns only security policies that exactly match this name. If no options are passed it will return all security policies. Only one option can be used at a time.
    nameContains String
    Match when the value exist in the name of the security policy.
    nameExclude String
    Match when the exact value does not exist in the name of the security policy.
    namePrefix String
    The name of the security policy must start with the value.
    nameRegexp String
    The regular expression match of the name of the security policy.
    nameSuffix String
    The name of the security policy must end with the value.
    name string
    Returns only security policies that exactly match this name. If no options are passed it will return all security policies. Only one option can be used at a time.
    nameContains string
    Match when the value exist in the name of the security policy.
    nameExclude string
    Match when the exact value does not exist in the name of the security policy.
    namePrefix string
    The name of the security policy must start with the value.
    nameRegexp string
    The regular expression match of the name of the security policy.
    nameSuffix string
    The name of the security policy must end with the value.
    name str
    Returns only security policies that exactly match this name. If no options are passed it will return all security policies. Only one option can be used at a time.
    name_contains str
    Match when the value exist in the name of the security policy.
    name_exclude str
    Match when the exact value does not exist in the name of the security policy.
    name_prefix str
    The name of the security policy must start with the value.
    name_regexp str
    The regular expression match of the name of the security policy.
    name_suffix str
    The name of the security policy must end with the value.
    name String
    Returns only security policies that exactly match this name. If no options are passed it will return all security policies. Only one option can be used at a time.
    nameContains String
    Match when the value exist in the name of the security policy.
    nameExclude String
    Match when the exact value does not exist in the name of the security policy.
    namePrefix String
    The name of the security policy must start with the value.
    nameRegexp String
    The regular expression match of the name of the security policy.
    nameSuffix String
    The name of the security policy must end with the value.

    getTwingateSecurityPolicies Result

    The following output properties are available:

    Id string
    The ID of this resource.
    SecurityPolicies List<Twingate.Twingate.Outputs.GetTwingateSecurityPoliciesSecurityPolicy>
    Name string
    Returns only security policies that exactly match this name. If no options are passed it will return all security policies. Only one option can be used at a time.
    NameContains string
    Match when the value exist in the name of the security policy.
    NameExclude string
    Match when the exact value does not exist in the name of the security policy.
    NamePrefix string
    The name of the security policy must start with the value.
    NameRegexp string
    The regular expression match of the name of the security policy.
    NameSuffix string
    The name of the security policy must end with the value.
    Id string
    The ID of this resource.
    SecurityPolicies []GetTwingateSecurityPoliciesSecurityPolicy
    Name string
    Returns only security policies that exactly match this name. If no options are passed it will return all security policies. Only one option can be used at a time.
    NameContains string
    Match when the value exist in the name of the security policy.
    NameExclude string
    Match when the exact value does not exist in the name of the security policy.
    NamePrefix string
    The name of the security policy must start with the value.
    NameRegexp string
    The regular expression match of the name of the security policy.
    NameSuffix string
    The name of the security policy must end with the value.
    id String
    The ID of this resource.
    securityPolicies List<GetTwingateSecurityPoliciesSecurityPolicy>
    name String
    Returns only security policies that exactly match this name. If no options are passed it will return all security policies. Only one option can be used at a time.
    nameContains String
    Match when the value exist in the name of the security policy.
    nameExclude String
    Match when the exact value does not exist in the name of the security policy.
    namePrefix String
    The name of the security policy must start with the value.
    nameRegexp String
    The regular expression match of the name of the security policy.
    nameSuffix String
    The name of the security policy must end with the value.
    id string
    The ID of this resource.
    securityPolicies GetTwingateSecurityPoliciesSecurityPolicy[]
    name string
    Returns only security policies that exactly match this name. If no options are passed it will return all security policies. Only one option can be used at a time.
    nameContains string
    Match when the value exist in the name of the security policy.
    nameExclude string
    Match when the exact value does not exist in the name of the security policy.
    namePrefix string
    The name of the security policy must start with the value.
    nameRegexp string
    The regular expression match of the name of the security policy.
    nameSuffix string
    The name of the security policy must end with the value.
    id str
    The ID of this resource.
    security_policies Sequence[GetTwingateSecurityPoliciesSecurityPolicy]
    name str
    Returns only security policies that exactly match this name. If no options are passed it will return all security policies. Only one option can be used at a time.
    name_contains str
    Match when the value exist in the name of the security policy.
    name_exclude str
    Match when the exact value does not exist in the name of the security policy.
    name_prefix str
    The name of the security policy must start with the value.
    name_regexp str
    The regular expression match of the name of the security policy.
    name_suffix str
    The name of the security policy must end with the value.
    id String
    The ID of this resource.
    securityPolicies List<Property Map>
    name String
    Returns only security policies that exactly match this name. If no options are passed it will return all security policies. Only one option can be used at a time.
    nameContains String
    Match when the value exist in the name of the security policy.
    nameExclude String
    Match when the exact value does not exist in the name of the security policy.
    namePrefix String
    The name of the security policy must start with the value.
    nameRegexp String
    The regular expression match of the name of the security policy.
    nameSuffix String
    The name of the security policy must end with the value.

    Supporting Types

    GetTwingateSecurityPoliciesSecurityPolicy

    Id string
    Return a matching 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 matching 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 matching 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 matching 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 matching 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 matching 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.6 published on Thursday, Jun 27, 2024 by Twingate