1. Packages
  2. Twingate
  3. API Docs
  4. getTwingateServiceAccounts
Twingate v3.0.16 published on Thursday, Feb 20, 2025 by Twingate

twingate.getTwingateServiceAccounts

Explore with Pulumi AI

Service Accounts offer a way to provide programmatic, centrally-controlled, and consistent access controls.

Example Usage

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

const foo = twingate.getTwingateServiceAccounts({
    name: "<your service account's name>",
});
Copy
import pulumi
import pulumi_twingate as twingate

foo = twingate.get_twingate_service_accounts(name="<your service account's 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.GetTwingateServiceAccounts(ctx, &twingate.GetTwingateServiceAccountsArgs{
			Name: pulumi.StringRef("<your service account's 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.GetTwingateServiceAccounts.Invoke(new()
    {
        Name = "<your service account's 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.GetTwingateServiceAccountsArgs;
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.getTwingateServiceAccounts(GetTwingateServiceAccountsArgs.builder()
            .name("<your service account's name>")
            .build());

    }
}
Copy
variables:
  foo:
    fn::invoke:
      function: twingate:getTwingateServiceAccounts
      arguments:
        name: <your service account's name>
Copy

Using getTwingateServiceAccounts

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 getTwingateServiceAccounts(args: GetTwingateServiceAccountsArgs, opts?: InvokeOptions): Promise<GetTwingateServiceAccountsResult>
function getTwingateServiceAccountsOutput(args: GetTwingateServiceAccountsOutputArgs, opts?: InvokeOptions): Output<GetTwingateServiceAccountsResult>
Copy
def get_twingate_service_accounts(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) -> GetTwingateServiceAccountsResult
def get_twingate_service_accounts_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[GetTwingateServiceAccountsResult]
Copy
func GetTwingateServiceAccounts(ctx *Context, args *GetTwingateServiceAccountsArgs, opts ...InvokeOption) (*GetTwingateServiceAccountsResult, error)
func GetTwingateServiceAccountsOutput(ctx *Context, args *GetTwingateServiceAccountsOutputArgs, opts ...InvokeOption) GetTwingateServiceAccountsResultOutput
Copy

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

public static class GetTwingateServiceAccounts 
{
    public static Task<GetTwingateServiceAccountsResult> InvokeAsync(GetTwingateServiceAccountsArgs args, InvokeOptions? opts = null)
    public static Output<GetTwingateServiceAccountsResult> Invoke(GetTwingateServiceAccountsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetTwingateServiceAccountsResult> getTwingateServiceAccounts(GetTwingateServiceAccountsArgs args, InvokeOptions options)
public static Output<GetTwingateServiceAccountsResult> getTwingateServiceAccounts(GetTwingateServiceAccountsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: twingate:index/getTwingateServiceAccounts:getTwingateServiceAccounts
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

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

getTwingateServiceAccounts Result

The following output properties are available:

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

Supporting Types

GetTwingateServiceAccountsServiceAccount

Id This property is required. string
ID of the Service Account resource
KeyIds This property is required. List<string>
List of twingateserviceaccount_key IDs that are assigned to the Service Account.
Name This property is required. string
Name of the Service Account
ResourceIds This property is required. List<string>
List of twingate.TwingateResource IDs that the Service Account is assigned to.
Id This property is required. string
ID of the Service Account resource
KeyIds This property is required. []string
List of twingateserviceaccount_key IDs that are assigned to the Service Account.
Name This property is required. string
Name of the Service Account
ResourceIds This property is required. []string
List of twingate.TwingateResource IDs that the Service Account is assigned to.
id This property is required. String
ID of the Service Account resource
keyIds This property is required. List<String>
List of twingateserviceaccount_key IDs that are assigned to the Service Account.
name This property is required. String
Name of the Service Account
resourceIds This property is required. List<String>
List of twingate.TwingateResource IDs that the Service Account is assigned to.
id This property is required. string
ID of the Service Account resource
keyIds This property is required. string[]
List of twingateserviceaccount_key IDs that are assigned to the Service Account.
name This property is required. string
Name of the Service Account
resourceIds This property is required. string[]
List of twingate.TwingateResource IDs that the Service Account is assigned to.
id This property is required. str
ID of the Service Account resource
key_ids This property is required. Sequence[str]
List of twingateserviceaccount_key IDs that are assigned to the Service Account.
name This property is required. str
Name of the Service Account
resource_ids This property is required. Sequence[str]
List of twingate.TwingateResource IDs that the Service Account is assigned to.
id This property is required. String
ID of the Service Account resource
keyIds This property is required. List<String>
List of twingateserviceaccount_key IDs that are assigned to the Service Account.
name This property is required. String
Name of the Service Account
resourceIds This property is required. List<String>
List of twingate.TwingateResource IDs that the Service Account is assigned to.

Package Details

Repository
twingate Twingate/pulumi-twingate
License
Apache-2.0
Notes
This Pulumi package is based on the twingate Terraform Provider.