published on Thursday, Aug 20, 2026 by jschady
published on Thursday, Aug 20, 2026 by jschady
A KeyLifecycleRule represents a rule that applies to API keys, GPG keys, and SSH keys (also called User Public Keys) based on their inactivity or age.
Keys that have been unused for the specified number of days will be deleted. SSH keys can also be configured to expire after a specified number of days. SSH key expiration applies only to User Public Keys used for inbound SFTP/SSH login, not Remote Server outbound SSH keys.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as filescom from "pulumi-filescom";
const exampleKeyLifecycleRule = filescom.getKeyLifecycleRule({
id: 1,
});
import pulumi
import pulumi_filescom as filescom
example_key_lifecycle_rule = filescom.get_key_lifecycle_rule(id=1)
package main
import (
"github.com/jschady/pulumi-filescom/sdk/go/filescom"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := filescom.GetKeyLifecycleRule(ctx, &filescom.LookupKeyLifecycleRuleArgs{
Id: 1,
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Filescom = Jschady.Filescom;
return await Deployment.RunAsync(() =>
{
var exampleKeyLifecycleRule = Filescom.GetKeyLifecycleRule.Invoke(new()
{
Id = 1,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.filescom.FilescomFunctions;
import com.pulumi.filescom.inputs.GetKeyLifecycleRuleArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 exampleKeyLifecycleRule = FilescomFunctions.getKeyLifecycleRule(GetKeyLifecycleRuleArgs.builder()
.id(1)
.build());
}
}
variables:
exampleKeyLifecycleRule:
fn::invoke:
function: filescom:getKeyLifecycleRule
arguments:
id: 1
pulumi {
required_providers {
filescom = {
source = "pulumi/filescom"
}
}
}
data "filescom_getkeylifecyclerule" "exampleKeyLifecycleRule" {
id = 1
}
Using getKeyLifecycleRule
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 getKeyLifecycleRule(args: GetKeyLifecycleRuleArgs, opts?: InvokeOptions): Promise<GetKeyLifecycleRuleResult>
function getKeyLifecycleRuleOutput(args: GetKeyLifecycleRuleOutputArgs, opts?: InvokeOutputOptions): Output<GetKeyLifecycleRuleResult>def get_key_lifecycle_rule(id: Optional[int] = None,
opts: Optional[InvokeOptions] = None) -> GetKeyLifecycleRuleResult
def get_key_lifecycle_rule_output(id: pulumi.Input[Optional[int]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetKeyLifecycleRuleResult]func LookupKeyLifecycleRule(ctx *Context, args *LookupKeyLifecycleRuleArgs, opts ...InvokeOption) (*LookupKeyLifecycleRuleResult, error)
func LookupKeyLifecycleRuleOutput(ctx *Context, args *LookupKeyLifecycleRuleOutputArgs, opts ...InvokeOption) LookupKeyLifecycleRuleResultOutput> Note: This function is named LookupKeyLifecycleRule in the Go SDK.
public static class GetKeyLifecycleRule
{
public static Task<GetKeyLifecycleRuleResult> InvokeAsync(GetKeyLifecycleRuleArgs args, InvokeOptions? opts = null)
public static Output<GetKeyLifecycleRuleResult> Invoke(GetKeyLifecycleRuleInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetKeyLifecycleRuleResult> Invoke(GetKeyLifecycleRuleInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetKeyLifecycleRuleResult> getKeyLifecycleRule(GetKeyLifecycleRuleArgs args, InvokeOptions options)
public static Output<GetKeyLifecycleRuleResult> getKeyLifecycleRule(GetKeyLifecycleRuleArgs args, InvokeOptions options)
public static Output<GetKeyLifecycleRuleResult> getKeyLifecycleRule(GetKeyLifecycleRuleArgs args, InvokeOutputOptions options)
fn::invoke:
function: filescom:index/getKeyLifecycleRule:getKeyLifecycleRule
arguments:
# arguments dictionarydata "filescom_get_key_lifecycle_rule" "name" {
# arguments
}The following arguments are supported:
- Id int
- Key Lifecycle Rule ID
- Id int
- Key Lifecycle Rule ID
- id number
- Key Lifecycle Rule ID
- id Integer
- Key Lifecycle Rule ID
- id number
- Key Lifecycle Rule ID
- id int
- Key Lifecycle Rule ID
- id Number
- Key Lifecycle Rule ID
getKeyLifecycleRule Result
The following output properties are available:
- Apply
To boolAll Workspaces - If true, a default-workspace rule also applies to keys in all workspaces.
- Expiration
Days int - Number of days after creation before an SSH key expires. Applies only to SSH keys.
- Id int
- Key Lifecycle Rule ID
- Inactivity
Days int - Number of days of inactivity before the rule applies.
- Key
Type string - Key type for which the rule will apply (gpg, ssh, or api).
- Name string
- Key Lifecycle Rule name
- Workspace
Id int - Workspace ID.
0means the default workspace.
- Apply
To boolAll Workspaces - If true, a default-workspace rule also applies to keys in all workspaces.
- Expiration
Days int - Number of days after creation before an SSH key expires. Applies only to SSH keys.
- Id int
- Key Lifecycle Rule ID
- Inactivity
Days int - Number of days of inactivity before the rule applies.
- Key
Type string - Key type for which the rule will apply (gpg, ssh, or api).
- Name string
- Key Lifecycle Rule name
- Workspace
Id int - Workspace ID.
0means the default workspace.
- apply_
to_ boolall_ workspaces - If true, a default-workspace rule also applies to keys in all workspaces.
- expiration_
days number - Number of days after creation before an SSH key expires. Applies only to SSH keys.
- id number
- Key Lifecycle Rule ID
- inactivity_
days number - Number of days of inactivity before the rule applies.
- key_
type string - Key type for which the rule will apply (gpg, ssh, or api).
- name string
- Key Lifecycle Rule name
- workspace_
id number - Workspace ID.
0means the default workspace.
- apply
To BooleanAll Workspaces - If true, a default-workspace rule also applies to keys in all workspaces.
- expiration
Days Integer - Number of days after creation before an SSH key expires. Applies only to SSH keys.
- id Integer
- Key Lifecycle Rule ID
- inactivity
Days Integer - Number of days of inactivity before the rule applies.
- key
Type String - Key type for which the rule will apply (gpg, ssh, or api).
- name String
- Key Lifecycle Rule name
- workspace
Id Integer - Workspace ID.
0means the default workspace.
- apply
To booleanAll Workspaces - If true, a default-workspace rule also applies to keys in all workspaces.
- expiration
Days number - Number of days after creation before an SSH key expires. Applies only to SSH keys.
- id number
- Key Lifecycle Rule ID
- inactivity
Days number - Number of days of inactivity before the rule applies.
- key
Type string - Key type for which the rule will apply (gpg, ssh, or api).
- name string
- Key Lifecycle Rule name
- workspace
Id number - Workspace ID.
0means the default workspace.
- apply_
to_ boolall_ workspaces - If true, a default-workspace rule also applies to keys in all workspaces.
- expiration_
days int - Number of days after creation before an SSH key expires. Applies only to SSH keys.
- id int
- Key Lifecycle Rule ID
- inactivity_
days int - Number of days of inactivity before the rule applies.
- key_
type str - Key type for which the rule will apply (gpg, ssh, or api).
- name str
- Key Lifecycle Rule name
- workspace_
id int - Workspace ID.
0means the default workspace.
- apply
To BooleanAll Workspaces - If true, a default-workspace rule also applies to keys in all workspaces.
- expiration
Days Number - Number of days after creation before an SSH key expires. Applies only to SSH keys.
- id Number
- Key Lifecycle Rule ID
- inactivity
Days Number - Number of days of inactivity before the rule applies.
- key
Type String - Key type for which the rule will apply (gpg, ssh, or api).
- name String
- Key Lifecycle Rule name
- workspace
Id Number - Workspace ID.
0means the default workspace.
Package Details
- Repository
- filescom jschady/pulumi-filescom
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
filescomTerraform Provider.
published on Thursday, Aug 20, 2026 by jschady