1. Packages
  2. Twingate
  3. API Docs
  4. TwingateServiceAccountKey
Twingate v3.6.0 published on Wednesday, Nov 26, 2025 by Twingate
twingate logo
Twingate v3.6.0 published on Wednesday, Nov 26, 2025 by Twingate

    A Service Key authorizes access to all Resources assigned to a Service Account.

    Create TwingateServiceAccountKey Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new TwingateServiceAccountKey(name: string, args: TwingateServiceAccountKeyArgs, opts?: CustomResourceOptions);
    @overload
    def TwingateServiceAccountKey(resource_name: str,
                                  args: TwingateServiceAccountKeyArgs,
                                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def TwingateServiceAccountKey(resource_name: str,
                                  opts: Optional[ResourceOptions] = None,
                                  service_account_id: Optional[str] = None,
                                  expiration_time: Optional[int] = None,
                                  name: Optional[str] = None)
    func NewTwingateServiceAccountKey(ctx *Context, name string, args TwingateServiceAccountKeyArgs, opts ...ResourceOption) (*TwingateServiceAccountKey, error)
    public TwingateServiceAccountKey(string name, TwingateServiceAccountKeyArgs args, CustomResourceOptions? opts = null)
    public TwingateServiceAccountKey(String name, TwingateServiceAccountKeyArgs args)
    public TwingateServiceAccountKey(String name, TwingateServiceAccountKeyArgs args, CustomResourceOptions options)
    
    type: twingate:TwingateServiceAccountKey
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args TwingateServiceAccountKeyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args TwingateServiceAccountKeyArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args TwingateServiceAccountKeyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TwingateServiceAccountKeyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TwingateServiceAccountKeyArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var twingateServiceAccountKeyResource = new Twingate.TwingateServiceAccountKey("twingateServiceAccountKeyResource", new()
    {
        ServiceAccountId = "string",
        ExpirationTime = 0,
        Name = "string",
    });
    
    example, err := twingate.NewTwingateServiceAccountKey(ctx, "twingateServiceAccountKeyResource", &twingate.TwingateServiceAccountKeyArgs{
    	ServiceAccountId: pulumi.String("string"),
    	ExpirationTime:   pulumi.Int(0),
    	Name:             pulumi.String("string"),
    })
    
    var twingateServiceAccountKeyResource = new TwingateServiceAccountKey("twingateServiceAccountKeyResource", TwingateServiceAccountKeyArgs.builder()
        .serviceAccountId("string")
        .expirationTime(0)
        .name("string")
        .build());
    
    twingate_service_account_key_resource = twingate.TwingateServiceAccountKey("twingateServiceAccountKeyResource",
        service_account_id="string",
        expiration_time=0,
        name="string")
    
    const twingateServiceAccountKeyResource = new twingate.TwingateServiceAccountKey("twingateServiceAccountKeyResource", {
        serviceAccountId: "string",
        expirationTime: 0,
        name: "string",
    });
    
    type: twingate:TwingateServiceAccountKey
    properties:
        expirationTime: 0
        name: string
        serviceAccountId: string
    

    TwingateServiceAccountKey Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The TwingateServiceAccountKey resource accepts the following input properties:

    ServiceAccountId string
    The id of the Service Account
    ExpirationTime int
    Specifies how many days until a Service Account Key expires. This should be an integer between 0 and 365 representing the number of days until the Service Account Key will expire. Defaults to 0, meaning the key will never expire.
    Name string
    The name of the Service Key
    ServiceAccountId string
    The id of the Service Account
    ExpirationTime int
    Specifies how many days until a Service Account Key expires. This should be an integer between 0 and 365 representing the number of days until the Service Account Key will expire. Defaults to 0, meaning the key will never expire.
    Name string
    The name of the Service Key
    serviceAccountId String
    The id of the Service Account
    expirationTime Integer
    Specifies how many days until a Service Account Key expires. This should be an integer between 0 and 365 representing the number of days until the Service Account Key will expire. Defaults to 0, meaning the key will never expire.
    name String
    The name of the Service Key
    serviceAccountId string
    The id of the Service Account
    expirationTime number
    Specifies how many days until a Service Account Key expires. This should be an integer between 0 and 365 representing the number of days until the Service Account Key will expire. Defaults to 0, meaning the key will never expire.
    name string
    The name of the Service Key
    service_account_id str
    The id of the Service Account
    expiration_time int
    Specifies how many days until a Service Account Key expires. This should be an integer between 0 and 365 representing the number of days until the Service Account Key will expire. Defaults to 0, meaning the key will never expire.
    name str
    The name of the Service Key
    serviceAccountId String
    The id of the Service Account
    expirationTime Number
    Specifies how many days until a Service Account Key expires. This should be an integer between 0 and 365 representing the number of days until the Service Account Key will expire. Defaults to 0, meaning the key will never expire.
    name String
    The name of the Service Key

    Outputs

    All input properties are implicitly available as output properties. Additionally, the TwingateServiceAccountKey resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    IsActive bool
    Token string
    Autogenerated Service Key token. Used to configure a Twingate Client running in headless mode.
    Id string
    The provider-assigned unique ID for this managed resource.
    IsActive bool
    Token string
    Autogenerated Service Key token. Used to configure a Twingate Client running in headless mode.
    id String
    The provider-assigned unique ID for this managed resource.
    isActive Boolean
    token String
    Autogenerated Service Key token. Used to configure a Twingate Client running in headless mode.
    id string
    The provider-assigned unique ID for this managed resource.
    isActive boolean
    token string
    Autogenerated Service Key token. Used to configure a Twingate Client running in headless mode.
    id str
    The provider-assigned unique ID for this managed resource.
    is_active bool
    token str
    Autogenerated Service Key token. Used to configure a Twingate Client running in headless mode.
    id String
    The provider-assigned unique ID for this managed resource.
    isActive Boolean
    token String
    Autogenerated Service Key token. Used to configure a Twingate Client running in headless mode.

    Look up Existing TwingateServiceAccountKey Resource

    Get an existing TwingateServiceAccountKey resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: TwingateServiceAccountKeyState, opts?: CustomResourceOptions): TwingateServiceAccountKey
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            expiration_time: Optional[int] = None,
            is_active: Optional[bool] = None,
            name: Optional[str] = None,
            service_account_id: Optional[str] = None,
            token: Optional[str] = None) -> TwingateServiceAccountKey
    func GetTwingateServiceAccountKey(ctx *Context, name string, id IDInput, state *TwingateServiceAccountKeyState, opts ...ResourceOption) (*TwingateServiceAccountKey, error)
    public static TwingateServiceAccountKey Get(string name, Input<string> id, TwingateServiceAccountKeyState? state, CustomResourceOptions? opts = null)
    public static TwingateServiceAccountKey get(String name, Output<String> id, TwingateServiceAccountKeyState state, CustomResourceOptions options)
    resources:  _:    type: twingate:TwingateServiceAccountKey    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ExpirationTime int
    Specifies how many days until a Service Account Key expires. This should be an integer between 0 and 365 representing the number of days until the Service Account Key will expire. Defaults to 0, meaning the key will never expire.
    IsActive bool
    Name string
    The name of the Service Key
    ServiceAccountId string
    The id of the Service Account
    Token string
    Autogenerated Service Key token. Used to configure a Twingate Client running in headless mode.
    ExpirationTime int
    Specifies how many days until a Service Account Key expires. This should be an integer between 0 and 365 representing the number of days until the Service Account Key will expire. Defaults to 0, meaning the key will never expire.
    IsActive bool
    Name string
    The name of the Service Key
    ServiceAccountId string
    The id of the Service Account
    Token string
    Autogenerated Service Key token. Used to configure a Twingate Client running in headless mode.
    expirationTime Integer
    Specifies how many days until a Service Account Key expires. This should be an integer between 0 and 365 representing the number of days until the Service Account Key will expire. Defaults to 0, meaning the key will never expire.
    isActive Boolean
    name String
    The name of the Service Key
    serviceAccountId String
    The id of the Service Account
    token String
    Autogenerated Service Key token. Used to configure a Twingate Client running in headless mode.
    expirationTime number
    Specifies how many days until a Service Account Key expires. This should be an integer between 0 and 365 representing the number of days until the Service Account Key will expire. Defaults to 0, meaning the key will never expire.
    isActive boolean
    name string
    The name of the Service Key
    serviceAccountId string
    The id of the Service Account
    token string
    Autogenerated Service Key token. Used to configure a Twingate Client running in headless mode.
    expiration_time int
    Specifies how many days until a Service Account Key expires. This should be an integer between 0 and 365 representing the number of days until the Service Account Key will expire. Defaults to 0, meaning the key will never expire.
    is_active bool
    name str
    The name of the Service Key
    service_account_id str
    The id of the Service Account
    token str
    Autogenerated Service Key token. Used to configure a Twingate Client running in headless mode.
    expirationTime Number
    Specifies how many days until a Service Account Key expires. This should be an integer between 0 and 365 representing the number of days until the Service Account Key will expire. Defaults to 0, meaning the key will never expire.
    isActive Boolean
    name String
    The name of the Service Key
    serviceAccountId String
    The id of the Service Account
    token String
    Autogenerated Service Key token. Used to configure a Twingate Client running in headless mode.

    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.6.0 published on Wednesday, Nov 26, 2025 by Twingate
      Meet Neo: Your AI Platform Teammate