1. Registry
  2. Packages
  3. Files.com
  4. API Docs
  5. getKeyLifecycleRule
Viewing docs for Files.com v0.1.1
published on Thursday, Aug 20, 2026 by jschady
filescom logo
Viewing docs for Files.com v0.1.1
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 dictionary
    data "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:

    ApplyToAllWorkspaces bool
    If true, a default-workspace rule also applies to keys in all workspaces.
    ExpirationDays int
    Number of days after creation before an SSH key expires. Applies only to SSH keys.
    Id int
    Key Lifecycle Rule ID
    InactivityDays int
    Number of days of inactivity before the rule applies.
    KeyType string
    Key type for which the rule will apply (gpg, ssh, or api).
    Name string
    Key Lifecycle Rule name
    WorkspaceId int
    Workspace ID. 0 means the default workspace.
    ApplyToAllWorkspaces bool
    If true, a default-workspace rule also applies to keys in all workspaces.
    ExpirationDays int
    Number of days after creation before an SSH key expires. Applies only to SSH keys.
    Id int
    Key Lifecycle Rule ID
    InactivityDays int
    Number of days of inactivity before the rule applies.
    KeyType string
    Key type for which the rule will apply (gpg, ssh, or api).
    Name string
    Key Lifecycle Rule name
    WorkspaceId int
    Workspace ID. 0 means the default workspace.
    apply_to_all_workspaces bool
    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. 0 means the default workspace.
    applyToAllWorkspaces Boolean
    If true, a default-workspace rule also applies to keys in all workspaces.
    expirationDays Integer
    Number of days after creation before an SSH key expires. Applies only to SSH keys.
    id Integer
    Key Lifecycle Rule ID
    inactivityDays Integer
    Number of days of inactivity before the rule applies.
    keyType String
    Key type for which the rule will apply (gpg, ssh, or api).
    name String
    Key Lifecycle Rule name
    workspaceId Integer
    Workspace ID. 0 means the default workspace.
    applyToAllWorkspaces boolean
    If true, a default-workspace rule also applies to keys in all workspaces.
    expirationDays number
    Number of days after creation before an SSH key expires. Applies only to SSH keys.
    id number
    Key Lifecycle Rule ID
    inactivityDays number
    Number of days of inactivity before the rule applies.
    keyType string
    Key type for which the rule will apply (gpg, ssh, or api).
    name string
    Key Lifecycle Rule name
    workspaceId number
    Workspace ID. 0 means the default workspace.
    apply_to_all_workspaces bool
    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. 0 means the default workspace.
    applyToAllWorkspaces Boolean
    If true, a default-workspace rule also applies to keys in all workspaces.
    expirationDays Number
    Number of days after creation before an SSH key expires. Applies only to SSH keys.
    id Number
    Key Lifecycle Rule ID
    inactivityDays Number
    Number of days of inactivity before the rule applies.
    keyType String
    Key type for which the rule will apply (gpg, ssh, or api).
    name String
    Key Lifecycle Rule name
    workspaceId Number
    Workspace ID. 0 means the default workspace.

    Package Details

    Repository
    filescom jschady/pulumi-filescom
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the filescom Terraform Provider.
    filescom logo
    Viewing docs for Files.com v0.1.1
    published on Thursday, Aug 20, 2026 by jschady

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial