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

twingate.getTwingateServiceAccounts

Explore with Pulumi AI

twingate logo
Twingate v3.0.6 published on Thursday, Jun 27, 2024 by Twingate

    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>",
    });
    
    import pulumi
    import pulumi_twingate as twingate
    
    foo = twingate.get_twingate_service_accounts(name="<your service account'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.GetTwingateServiceAccounts(ctx, &twingate.GetTwingateServiceAccountsArgs{
    			Name: pulumi.StringRef("<your service account'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.GetTwingateServiceAccounts.Invoke(new()
        {
            Name = "<your service account'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.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());
    
        }
    }
    
    variables:
      foo:
        fn::invoke:
          Function: twingate:getTwingateServiceAccounts
          Arguments:
            name: <your service account's name>
    

    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>
    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]
    func GetTwingateServiceAccounts(ctx *Context, args *GetTwingateServiceAccountsArgs, opts ...InvokeOption) (*GetTwingateServiceAccountsResult, error)
    func GetTwingateServiceAccountsOutput(ctx *Context, args *GetTwingateServiceAccountsOutputArgs, opts ...InvokeOption) GetTwingateServiceAccountsResultOutput

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

    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 string
    ID of the Service Account resource
    KeyIds List<string>
    List of twingateserviceaccount_key IDs that are assigned to the Service Account.
    Name string
    Name of the Service Account
    ResourceIds List<string>
    List of twingate.TwingateResource IDs that the Service Account is assigned to.
    Id string
    ID of the Service Account resource
    KeyIds []string
    List of twingateserviceaccount_key IDs that are assigned to the Service Account.
    Name string
    Name of the Service Account
    ResourceIds []string
    List of twingate.TwingateResource IDs that the Service Account is assigned to.
    id String
    ID of the Service Account resource
    keyIds List<String>
    List of twingateserviceaccount_key IDs that are assigned to the Service Account.
    name String
    Name of the Service Account
    resourceIds List<String>
    List of twingate.TwingateResource IDs that the Service Account is assigned to.
    id string
    ID of the Service Account resource
    keyIds string[]
    List of twingateserviceaccount_key IDs that are assigned to the Service Account.
    name string
    Name of the Service Account
    resourceIds string[]
    List of twingate.TwingateResource IDs that the Service Account is assigned to.
    id str
    ID of the Service Account resource
    key_ids Sequence[str]
    List of twingateserviceaccount_key IDs that are assigned to the Service Account.
    name str
    Name of the Service Account
    resource_ids Sequence[str]
    List of twingate.TwingateResource IDs that the Service Account is assigned to.
    id String
    ID of the Service Account resource
    keyIds List<String>
    List of twingateserviceaccount_key IDs that are assigned to the Service Account.
    name String
    Name of the Service Account
    resourceIds 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.
    twingate logo
    Twingate v3.0.6 published on Thursday, Jun 27, 2024 by Twingate