1. Packages
  2. Twingate
  3. API Docs
  4. getTwingateResources
Twingate v3.0.1 published on Friday, Apr 19, 2024 by Twingate

twingate.getTwingateResources

Explore with Pulumi AI

twingate logo
Twingate v3.0.1 published on Friday, Apr 19, 2024 by Twingate

    Resources in Twingate represent servers on the private network that clients can connect to. Resources can be defined by IP, CIDR range, FQDN, or DNS zone. For more information, see the Twingate documentation.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as twingate from "@pulumi/twingate";
    
    const foo = twingate.getTwingateResources({
        name: "<your resource's name>",
    });
    
    import pulumi
    import pulumi_twingate as twingate
    
    foo = twingate.get_twingate_resources(name="<your resource'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.GetTwingateResources(ctx, &twingate.GetTwingateResourcesArgs{
    			Name: pulumi.StringRef("<your resource'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 foo = Twingate.GetTwingateResources.Invoke(new()
        {
            Name = "<your resource'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.GetTwingateResourcesArgs;
    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.getTwingateResources(GetTwingateResourcesArgs.builder()
                .name("<your resource's name>")
                .build());
    
        }
    }
    
    variables:
      foo:
        fn::invoke:
          Function: twingate:getTwingateResources
          Arguments:
            name: <your resource's name>
    

    Using getTwingateResources

    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 getTwingateResources(args: GetTwingateResourcesArgs, opts?: InvokeOptions): Promise<GetTwingateResourcesResult>
    function getTwingateResourcesOutput(args: GetTwingateResourcesOutputArgs, opts?: InvokeOptions): Output<GetTwingateResourcesResult>
    def get_twingate_resources(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) -> GetTwingateResourcesResult
    def get_twingate_resources_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[GetTwingateResourcesResult]
    func GetTwingateResources(ctx *Context, args *GetTwingateResourcesArgs, opts ...InvokeOption) (*GetTwingateResourcesResult, error)
    func GetTwingateResourcesOutput(ctx *Context, args *GetTwingateResourcesOutputArgs, opts ...InvokeOption) GetTwingateResourcesResultOutput

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

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

    The following arguments are supported:

    Name string
    The name of the Resource
    NameContains string
    Match when the value exist in the name of the resource.
    NameExclude string
    Match when the exact value does not exist in the name of the resource.
    NamePrefix string
    The name of the resource must start with the value.
    NameRegexp string
    The regular expression match of the name of the resource.
    NameSuffix string
    The name of the resource must end with the value.
    Name string
    The name of the Resource
    NameContains string
    Match when the value exist in the name of the resource.
    NameExclude string
    Match when the exact value does not exist in the name of the resource.
    NamePrefix string
    The name of the resource must start with the value.
    NameRegexp string
    The regular expression match of the name of the resource.
    NameSuffix string
    The name of the resource must end with the value.
    name String
    The name of the Resource
    nameContains String
    Match when the value exist in the name of the resource.
    nameExclude String
    Match when the exact value does not exist in the name of the resource.
    namePrefix String
    The name of the resource must start with the value.
    nameRegexp String
    The regular expression match of the name of the resource.
    nameSuffix String
    The name of the resource must end with the value.
    name string
    The name of the Resource
    nameContains string
    Match when the value exist in the name of the resource.
    nameExclude string
    Match when the exact value does not exist in the name of the resource.
    namePrefix string
    The name of the resource must start with the value.
    nameRegexp string
    The regular expression match of the name of the resource.
    nameSuffix string
    The name of the resource must end with the value.
    name str
    The name of the Resource
    name_contains str
    Match when the value exist in the name of the resource.
    name_exclude str
    Match when the exact value does not exist in the name of the resource.
    name_prefix str
    The name of the resource must start with the value.
    name_regexp str
    The regular expression match of the name of the resource.
    name_suffix str
    The name of the resource must end with the value.
    name String
    The name of the Resource
    nameContains String
    Match when the value exist in the name of the resource.
    nameExclude String
    Match when the exact value does not exist in the name of the resource.
    namePrefix String
    The name of the resource must start with the value.
    nameRegexp String
    The regular expression match of the name of the resource.
    nameSuffix String
    The name of the resource must end with the value.

    getTwingateResources Result

    The following output properties are available:

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

    Supporting Types

    GetTwingateResourcesResource

    Address string
    The Resource's IP/CIDR or FQDN/DNS zone
    Id string
    The id of the Resource
    Name string
    The name of the Resource
    Protocols Twingate.Twingate.Inputs.GetTwingateResourcesResourceProtocols
    Restrict access to certain protocols and ports. By default or when this argument is not defined, there is no restriction, and all protocols and ports are allowed.
    RemoteNetworkId string
    Remote Network ID where the Resource lives
    Address string
    The Resource's IP/CIDR or FQDN/DNS zone
    Id string
    The id of the Resource
    Name string
    The name of the Resource
    Protocols GetTwingateResourcesResourceProtocols
    Restrict access to certain protocols and ports. By default or when this argument is not defined, there is no restriction, and all protocols and ports are allowed.
    RemoteNetworkId string
    Remote Network ID where the Resource lives
    address String
    The Resource's IP/CIDR or FQDN/DNS zone
    id String
    The id of the Resource
    name String
    The name of the Resource
    protocols GetTwingateResourcesResourceProtocols
    Restrict access to certain protocols and ports. By default or when this argument is not defined, there is no restriction, and all protocols and ports are allowed.
    remoteNetworkId String
    Remote Network ID where the Resource lives
    address string
    The Resource's IP/CIDR or FQDN/DNS zone
    id string
    The id of the Resource
    name string
    The name of the Resource
    protocols GetTwingateResourcesResourceProtocols
    Restrict access to certain protocols and ports. By default or when this argument is not defined, there is no restriction, and all protocols and ports are allowed.
    remoteNetworkId string
    Remote Network ID where the Resource lives
    address str
    The Resource's IP/CIDR or FQDN/DNS zone
    id str
    The id of the Resource
    name str
    The name of the Resource
    protocols GetTwingateResourcesResourceProtocols
    Restrict access to certain protocols and ports. By default or when this argument is not defined, there is no restriction, and all protocols and ports are allowed.
    remote_network_id str
    Remote Network ID where the Resource lives
    address String
    The Resource's IP/CIDR or FQDN/DNS zone
    id String
    The id of the Resource
    name String
    The name of the Resource
    protocols Property Map
    Restrict access to certain protocols and ports. By default or when this argument is not defined, there is no restriction, and all protocols and ports are allowed.
    remoteNetworkId String
    Remote Network ID where the Resource lives

    GetTwingateResourcesResourceProtocols

    allowIcmp Boolean
    Whether to allow ICMP (ping) traffic
    tcp Property Map
    udp Property Map

    GetTwingateResourcesResourceProtocolsTcp

    Policy string
    Whether to allow or deny all ports, or restrict protocol access within certain port ranges: Can be RESTRICTED (only listed ports are allowed), ALLOW_ALL, or DENY_ALL
    Ports List<string>
    List of port ranges between 1 and 65535 inclusive, in the format 100-200 for a range, or 8080 for a single port
    Policy string
    Whether to allow or deny all ports, or restrict protocol access within certain port ranges: Can be RESTRICTED (only listed ports are allowed), ALLOW_ALL, or DENY_ALL
    Ports []string
    List of port ranges between 1 and 65535 inclusive, in the format 100-200 for a range, or 8080 for a single port
    policy String
    Whether to allow or deny all ports, or restrict protocol access within certain port ranges: Can be RESTRICTED (only listed ports are allowed), ALLOW_ALL, or DENY_ALL
    ports List<String>
    List of port ranges between 1 and 65535 inclusive, in the format 100-200 for a range, or 8080 for a single port
    policy string
    Whether to allow or deny all ports, or restrict protocol access within certain port ranges: Can be RESTRICTED (only listed ports are allowed), ALLOW_ALL, or DENY_ALL
    ports string[]
    List of port ranges between 1 and 65535 inclusive, in the format 100-200 for a range, or 8080 for a single port
    policy str
    Whether to allow or deny all ports, or restrict protocol access within certain port ranges: Can be RESTRICTED (only listed ports are allowed), ALLOW_ALL, or DENY_ALL
    ports Sequence[str]
    List of port ranges between 1 and 65535 inclusive, in the format 100-200 for a range, or 8080 for a single port
    policy String
    Whether to allow or deny all ports, or restrict protocol access within certain port ranges: Can be RESTRICTED (only listed ports are allowed), ALLOW_ALL, or DENY_ALL
    ports List<String>
    List of port ranges between 1 and 65535 inclusive, in the format 100-200 for a range, or 8080 for a single port

    GetTwingateResourcesResourceProtocolsUdp

    Policy string
    Whether to allow or deny all ports, or restrict protocol access within certain port ranges: Can be RESTRICTED (only listed ports are allowed), ALLOW_ALL, or DENY_ALL
    Ports List<string>
    List of port ranges between 1 and 65535 inclusive, in the format 100-200 for a range, or 8080 for a single port
    Policy string
    Whether to allow or deny all ports, or restrict protocol access within certain port ranges: Can be RESTRICTED (only listed ports are allowed), ALLOW_ALL, or DENY_ALL
    Ports []string
    List of port ranges between 1 and 65535 inclusive, in the format 100-200 for a range, or 8080 for a single port
    policy String
    Whether to allow or deny all ports, or restrict protocol access within certain port ranges: Can be RESTRICTED (only listed ports are allowed), ALLOW_ALL, or DENY_ALL
    ports List<String>
    List of port ranges between 1 and 65535 inclusive, in the format 100-200 for a range, or 8080 for a single port
    policy string
    Whether to allow or deny all ports, or restrict protocol access within certain port ranges: Can be RESTRICTED (only listed ports are allowed), ALLOW_ALL, or DENY_ALL
    ports string[]
    List of port ranges between 1 and 65535 inclusive, in the format 100-200 for a range, or 8080 for a single port
    policy str
    Whether to allow or deny all ports, or restrict protocol access within certain port ranges: Can be RESTRICTED (only listed ports are allowed), ALLOW_ALL, or DENY_ALL
    ports Sequence[str]
    List of port ranges between 1 and 65535 inclusive, in the format 100-200 for a range, or 8080 for a single port
    policy String
    Whether to allow or deny all ports, or restrict protocol access within certain port ranges: Can be RESTRICTED (only listed ports are allowed), ALLOW_ALL, or DENY_ALL
    ports List<String>
    List of port ranges between 1 and 65535 inclusive, in the format 100-200 for a range, or 8080 for a single port

    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.1 published on Friday, Apr 19, 2024 by Twingate