Twingate v3.0.11 published on Wednesday, Aug 28, 2024 by Twingate
twingate.getTwingateResources
Explore with Pulumi AI
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
- 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 string - Match when the value exist in the name of the resource.
- Name
Exclude string - Match when the exact value does not exist in the name of the resource.
- Name
Prefix string - The name of the resource must start with the value.
- Name
Regexp string - The regular expression match of the name of the resource.
- Name
Suffix string - The name of the resource must end with the value.
- 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.
- Name
Contains string - Match when the value exist in the name of the resource.
- Name
Exclude string - Match when the exact value does not exist in the name of the resource.
- Name
Prefix string - The name of the resource must start with the value.
- Name
Regexp string - The regular expression match of the name of the resource.
- Name
Suffix string - The name of the resource must end with the value.
- 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.
- name
Contains String - Match when the value exist in the name of the resource.
- name
Exclude String - Match when the exact value does not exist in the name of the resource.
- name
Prefix String - The name of the resource must start with the value.
- name
Regexp String - The regular expression match of the name of the resource.
- name
Suffix String - The name of the resource must end with the value.
- 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.
- name
Contains string - Match when the value exist in the name of the resource.
- name
Exclude string - Match when the exact value does not exist in the name of the resource.
- name
Prefix string - The name of the resource must start with the value.
- name
Regexp string - The regular expression match of the name of the resource.
- name
Suffix string - The name of the resource must end with the value.
- 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.
- 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.
- name
Contains String - Match when the value exist in the name of the resource.
- name
Exclude String - Match when the exact value does not exist in the name of the resource.
- name
Prefix String - The name of the resource must start with the value.
- name
Regexp String - The regular expression match of the name of the resource.
- name
Suffix 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. Get Twingate Resources Resource> - 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.
- Name
Contains string - Match when the value exist in the name of the resource.
- Name
Exclude string - Match when the exact value does not exist in the name of the resource.
- Name
Prefix string - The name of the resource must start with the value.
- Name
Regexp string - The regular expression match of the name of the resource.
- Name
Suffix string - The name of the resource must end with the value.
- Id string
- The ID of this resource.
- Resources
[]Get
Twingate Resources Resource - 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.
- Name
Contains string - Match when the value exist in the name of the resource.
- Name
Exclude string - Match when the exact value does not exist in the name of the resource.
- Name
Prefix string - The name of the resource must start with the value.
- Name
Regexp string - The regular expression match of the name of the resource.
- Name
Suffix string - The name of the resource must end with the value.
- id String
- The ID of this resource.
- resources
List<Get
Twingate Resources Resource> - 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.
- name
Contains String - Match when the value exist in the name of the resource.
- name
Exclude String - Match when the exact value does not exist in the name of the resource.
- name
Prefix String - The name of the resource must start with the value.
- name
Regexp String - The regular expression match of the name of the resource.
- name
Suffix String - The name of the resource must end with the value.
- id string
- The ID of this resource.
- resources
Get
Twingate Resources Resource[] - 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.
- name
Contains string - Match when the value exist in the name of the resource.
- name
Exclude string - Match when the exact value does not exist in the name of the resource.
- name
Prefix string - The name of the resource must start with the value.
- name
Regexp string - The regular expression match of the name of the resource.
- name
Suffix string - The name of the resource must end with the value.
- id str
- The ID of this resource.
- resources
Sequence[Get
Twingate Resources Resource] - 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.
- name
Contains String - Match when the value exist in the name of the resource.
- name
Exclude String - Match when the exact value does not exist in the name of the resource.
- name
Prefix String - The name of the resource must start with the value.
- name
Regexp String - The regular expression match of the name of the resource.
- name
Suffix 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. Get Twingate Resources Resource Protocols - 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 stringId - 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
Get
Twingate Resources Resource Protocols - 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 stringId - 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
Get
Twingate Resources Resource Protocols - 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 StringId - 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
Get
Twingate Resources Resource Protocols - 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 stringId - 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
Get
Twingate Resources Resource Protocols - 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_ strid - 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.
- remote
Network StringId - Remote Network ID where the Resource lives
GetTwingateResourcesResourceProtocols
- Allow
Icmp bool - Whether to allow ICMP (ping) traffic
- Tcp
Twingate.
Twingate. Inputs. Get Twingate Resources Resource Protocols Tcp - Udp
Twingate.
Twingate. Inputs. Get Twingate Resources Resource Protocols Udp
- Allow
Icmp bool - Whether to allow ICMP (ping) traffic
- Tcp
Get
Twingate Resources Resource Protocols Tcp - Udp
Get
Twingate Resources Resource Protocols Udp
- allow
Icmp Boolean - Whether to allow ICMP (ping) traffic
- tcp
Get
Twingate Resources Resource Protocols Tcp - udp
Get
Twingate Resources Resource Protocols Udp
- allow
Icmp boolean - Whether to allow ICMP (ping) traffic
- tcp
Get
Twingate Resources Resource Protocols Tcp - udp
Get
Twingate Resources Resource Protocols Udp
- allow_
icmp bool - Whether to allow ICMP (ping) traffic
- tcp
Get
Twingate Resources Resource Protocols Tcp - udp
Get
Twingate Resources Resource Protocols Udp
- allow
Icmp 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
, orDENY_ALL
- Ports List<string>
- List of port ranges between 1 and 65535 inclusive, in the format
100-200
for a range, or8080
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
, orDENY_ALL
- Ports []string
- List of port ranges between 1 and 65535 inclusive, in the format
100-200
for a range, or8080
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
, orDENY_ALL
- ports List<String>
- List of port ranges between 1 and 65535 inclusive, in the format
100-200
for a range, or8080
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
, orDENY_ALL
- ports string[]
- List of port ranges between 1 and 65535 inclusive, in the format
100-200
for a range, or8080
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
, orDENY_ALL
- ports Sequence[str]
- List of port ranges between 1 and 65535 inclusive, in the format
100-200
for a range, or8080
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
, orDENY_ALL
- ports List<String>
- List of port ranges between 1 and 65535 inclusive, in the format
100-200
for a range, or8080
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
, orDENY_ALL
- Ports List<string>
- List of port ranges between 1 and 65535 inclusive, in the format
100-200
for a range, or8080
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
, orDENY_ALL
- Ports []string
- List of port ranges between 1 and 65535 inclusive, in the format
100-200
for a range, or8080
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
, orDENY_ALL
- ports List<String>
- List of port ranges between 1 and 65535 inclusive, in the format
100-200
for a range, or8080
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
, orDENY_ALL
- ports string[]
- List of port ranges between 1 and 65535 inclusive, in the format
100-200
for a range, or8080
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
, orDENY_ALL
- ports Sequence[str]
- List of port ranges between 1 and 65535 inclusive, in the format
100-200
for a range, or8080
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
, orDENY_ALL
- ports List<String>
- List of port ranges between 1 and 65535 inclusive, in the format
100-200
for a range, or8080
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.