1. Registry
  2. Packages
  3. Volcenginecc Provider
  4. API Docs
  5. redis
  6. KeyScanJob
Viewing docs for volcenginecc v0.0.60
published on Thursday, Sep 3, 2026 by Volcengine
volcenginecc logo
Viewing docs for volcenginecc v0.0.60
published on Thursday, Sep 3, 2026 by Volcengine

    Volcengine Redis expired key scan/cleanup task (KeyScanJob). Refers to a one-time expired key scan and cleanup job initiated for the target Redis instance. You can create, query, or cancel (interrupt) the job. The task is one-time and does not support updates. Finished/Failed/Interrupted are terminal states; canceled and failed tasks are considered nonexistent resources when queried.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcenginecc from "@volcengine/pulumi-volcenginecc";
    
    const example = new volcenginecc.redis.KeyScanJob("example", {
        instanceId: "redis-xxxx",
        scanKeyNumPerSecond: 3000,
        timeoutMinutes: 60,
    });
    
    import pulumi
    import pulumi_volcenginecc as volcenginecc
    
    example = volcenginecc.redis.KeyScanJob("example",
        instance_id="redis-xxxx",
        scan_key_num_per_second=3000,
        timeout_minutes=60)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcenginecc/sdk/go/volcenginecc/redis"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := redis.NewKeyScanJob(ctx, "example", &redis.KeyScanJobArgs{
    			InstanceId:          pulumi.String("redis-xxxx"),
    			ScanKeyNumPerSecond: pulumi.Int(3000),
    			TimeoutMinutes:      pulumi.Int(60),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcenginecc = Volcengine.Pulumi.Volcenginecc;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Volcenginecc.Redis.KeyScanJob("example", new()
        {
            InstanceId = "redis-xxxx",
            ScanKeyNumPerSecond = 3000,
            TimeoutMinutes = 60,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.volcengine.volcenginecc.redis.KeyScanJob;
    import com.volcengine.volcenginecc.redis.KeyScanJobArgs;
    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) {
            var example = new KeyScanJob("example", KeyScanJobArgs.builder()
                .instanceId("redis-xxxx")
                .scanKeyNumPerSecond(3000)
                .timeoutMinutes(60)
                .build());
    
        }
    }
    
    resources:
      example:
        type: volcenginecc:redis:KeyScanJob
        properties:
          instanceId: redis-xxxx
          scanKeyNumPerSecond: 3000
          timeoutMinutes: 60
    
    pulumi {
      required_providers {
        volcenginecc = {
          source = "pulumi/volcenginecc"
        }
      }
    }
    
    resource "volcenginecc_redis_keyscanjob" "example" {
      instance_id             = "redis-xxxx"
      scan_key_num_per_second = 3000
      timeout_minutes         = 60
    }
    

    Create KeyScanJob Resource

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

    Constructor syntax

    new KeyScanJob(name: string, args: KeyScanJobArgs, opts?: CustomResourceOptions);
    @overload
    def KeyScanJob(resource_name: str,
                   args: KeyScanJobArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def KeyScanJob(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   instance_id: Optional[str] = None,
                   scan_key_num_per_second: Optional[int] = None,
                   timeout_minutes: Optional[int] = None)
    func NewKeyScanJob(ctx *Context, name string, args KeyScanJobArgs, opts ...ResourceOption) (*KeyScanJob, error)
    public KeyScanJob(string name, KeyScanJobArgs args, CustomResourceOptions? opts = null)
    public KeyScanJob(String name, KeyScanJobArgs args)
    public KeyScanJob(String name, KeyScanJobArgs args, CustomResourceOptions options)
    
    type: volcenginecc:redis:KeyScanJob
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "volcenginecc_redis_key_scan_job" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args KeyScanJobArgs
    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 KeyScanJobArgs
    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 KeyScanJobArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args KeyScanJobArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args KeyScanJobArgs
    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 keyScanJobResource = new Volcenginecc.Redis.KeyScanJob("keyScanJobResource", new()
    {
        InstanceId = "string",
        ScanKeyNumPerSecond = 0,
        TimeoutMinutes = 0,
    });
    
    example, err := redis.NewKeyScanJob(ctx, "keyScanJobResource", &redis.KeyScanJobArgs{
    	InstanceId:          pulumi.String("string"),
    	ScanKeyNumPerSecond: pulumi.Int(0),
    	TimeoutMinutes:      pulumi.Int(0),
    })
    
    resource "volcenginecc_redis_key_scan_job" "keyScanJobResource" {
      lifecycle {
        create_before_destroy = true
      }
      instance_id             = "string"
      scan_key_num_per_second = 0
      timeout_minutes         = 0
    }
    
    var keyScanJobResource = new KeyScanJob("keyScanJobResource", KeyScanJobArgs.builder()
        .instanceId("string")
        .scanKeyNumPerSecond(0)
        .timeoutMinutes(0)
        .build());
    
    key_scan_job_resource = volcenginecc.redis.KeyScanJob("keyScanJobResource",
        instance_id="string",
        scan_key_num_per_second=0,
        timeout_minutes=0)
    
    const keyScanJobResource = new volcenginecc.redis.KeyScanJob("keyScanJobResource", {
        instanceId: "string",
        scanKeyNumPerSecond: 0,
        timeoutMinutes: 0,
    });
    
    type: volcenginecc:redis:KeyScanJob
    properties:
        instanceId: string
        scanKeyNumPerSecond: 0
        timeoutMinutes: 0
    

    KeyScanJob 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 KeyScanJob resource accepts the following input properties:

    InstanceId string
    Instance ID. You can call the DescribeDBInstances API to query basic information for all Redis instances in the target region, including the instance ID.
    ScanKeyNumPerSecond int
    Number of expired keys scanned per second. Value range: integer between 2000 and 100000.
    TimeoutMinutes int
    Scan timeout. Value range: integer between 30 and 1440, unit: minutes.
    InstanceId string
    Instance ID. You can call the DescribeDBInstances API to query basic information for all Redis instances in the target region, including the instance ID.
    ScanKeyNumPerSecond int
    Number of expired keys scanned per second. Value range: integer between 2000 and 100000.
    TimeoutMinutes int
    Scan timeout. Value range: integer between 30 and 1440, unit: minutes.
    instance_id string
    Instance ID. You can call the DescribeDBInstances API to query basic information for all Redis instances in the target region, including the instance ID.
    scan_key_num_per_second number
    Number of expired keys scanned per second. Value range: integer between 2000 and 100000.
    timeout_minutes number
    Scan timeout. Value range: integer between 30 and 1440, unit: minutes.
    instanceId String
    Instance ID. You can call the DescribeDBInstances API to query basic information for all Redis instances in the target region, including the instance ID.
    scanKeyNumPerSecond Integer
    Number of expired keys scanned per second. Value range: integer between 2000 and 100000.
    timeoutMinutes Integer
    Scan timeout. Value range: integer between 30 and 1440, unit: minutes.
    instanceId string
    Instance ID. You can call the DescribeDBInstances API to query basic information for all Redis instances in the target region, including the instance ID.
    scanKeyNumPerSecond number
    Number of expired keys scanned per second. Value range: integer between 2000 and 100000.
    timeoutMinutes number
    Scan timeout. Value range: integer between 30 and 1440, unit: minutes.
    instance_id str
    Instance ID. You can call the DescribeDBInstances API to query basic information for all Redis instances in the target region, including the instance ID.
    scan_key_num_per_second int
    Number of expired keys scanned per second. Value range: integer between 2000 and 100000.
    timeout_minutes int
    Scan timeout. Value range: integer between 30 and 1440, unit: minutes.
    instanceId String
    Instance ID. You can call the DescribeDBInstances API to query basic information for all Redis instances in the target region, including the instance ID.
    scanKeyNumPerSecond Number
    Number of expired keys scanned per second. Value range: integer between 2000 and 100000.
    timeoutMinutes Number
    Scan timeout. Value range: integer between 30 and 1440, unit: minutes.

    Outputs

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

    CompletedCount int
    Number of shards analyzed.
    CreateTime string
    Task creation time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    FinishTime string
    Task end time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    Id string
    The provider-assigned unique ID for this managed resource.
    JobId string
    Task ID of the scan job.
    StartTime string
    Task start time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    Status string
    Task status. Values: Created, Running, Finished, Failed, Interrupted.
    TotalCount int
    Total number of shards to analyze.
    CompletedCount int
    Number of shards analyzed.
    CreateTime string
    Task creation time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    FinishTime string
    Task end time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    Id string
    The provider-assigned unique ID for this managed resource.
    JobId string
    Task ID of the scan job.
    StartTime string
    Task start time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    Status string
    Task status. Values: Created, Running, Finished, Failed, Interrupted.
    TotalCount int
    Total number of shards to analyze.
    completed_count number
    Number of shards analyzed.
    create_time string
    Task creation time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    finish_time string
    Task end time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    id string
    The provider-assigned unique ID for this managed resource.
    job_id string
    Task ID of the scan job.
    start_time string
    Task start time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    status string
    Task status. Values: Created, Running, Finished, Failed, Interrupted.
    total_count number
    Total number of shards to analyze.
    completedCount Integer
    Number of shards analyzed.
    createTime String
    Task creation time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    finishTime String
    Task end time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    id String
    The provider-assigned unique ID for this managed resource.
    jobId String
    Task ID of the scan job.
    startTime String
    Task start time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    status String
    Task status. Values: Created, Running, Finished, Failed, Interrupted.
    totalCount Integer
    Total number of shards to analyze.
    completedCount number
    Number of shards analyzed.
    createTime string
    Task creation time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    finishTime string
    Task end time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    id string
    The provider-assigned unique ID for this managed resource.
    jobId string
    Task ID of the scan job.
    startTime string
    Task start time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    status string
    Task status. Values: Created, Running, Finished, Failed, Interrupted.
    totalCount number
    Total number of shards to analyze.
    completed_count int
    Number of shards analyzed.
    create_time str
    Task creation time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    finish_time str
    Task end time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    id str
    The provider-assigned unique ID for this managed resource.
    job_id str
    Task ID of the scan job.
    start_time str
    Task start time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    status str
    Task status. Values: Created, Running, Finished, Failed, Interrupted.
    total_count int
    Total number of shards to analyze.
    completedCount Number
    Number of shards analyzed.
    createTime String
    Task creation time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    finishTime String
    Task end time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    id String
    The provider-assigned unique ID for this managed resource.
    jobId String
    Task ID of the scan job.
    startTime String
    Task start time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    status String
    Task status. Values: Created, Running, Finished, Failed, Interrupted.
    totalCount Number
    Total number of shards to analyze.

    Look up Existing KeyScanJob Resource

    Get an existing KeyScanJob 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?: KeyScanJobState, opts?: CustomResourceOptions): KeyScanJob
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            completed_count: Optional[int] = None,
            create_time: Optional[str] = None,
            finish_time: Optional[str] = None,
            instance_id: Optional[str] = None,
            job_id: Optional[str] = None,
            scan_key_num_per_second: Optional[int] = None,
            start_time: Optional[str] = None,
            status: Optional[str] = None,
            timeout_minutes: Optional[int] = None,
            total_count: Optional[int] = None) -> KeyScanJob
    func GetKeyScanJob(ctx *Context, name string, id IDInput, state *KeyScanJobState, opts ...ResourceOption) (*KeyScanJob, error)
    public static KeyScanJob Get(string name, Input<string> id, KeyScanJobState? state, CustomResourceOptions? opts = null)
    public static KeyScanJob get(String name, Output<String> id, KeyScanJobState state, CustomResourceOptions options)
    resources:  _:    type: volcenginecc:redis:KeyScanJob    get:      id: ${id}
    import {
      to = volcenginecc_redis_key_scan_job.example
      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:
    CompletedCount int
    Number of shards analyzed.
    CreateTime string
    Task creation time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    FinishTime string
    Task end time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    InstanceId string
    Instance ID. You can call the DescribeDBInstances API to query basic information for all Redis instances in the target region, including the instance ID.
    JobId string
    Task ID of the scan job.
    ScanKeyNumPerSecond int
    Number of expired keys scanned per second. Value range: integer between 2000 and 100000.
    StartTime string
    Task start time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    Status string
    Task status. Values: Created, Running, Finished, Failed, Interrupted.
    TimeoutMinutes int
    Scan timeout. Value range: integer between 30 and 1440, unit: minutes.
    TotalCount int
    Total number of shards to analyze.
    CompletedCount int
    Number of shards analyzed.
    CreateTime string
    Task creation time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    FinishTime string
    Task end time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    InstanceId string
    Instance ID. You can call the DescribeDBInstances API to query basic information for all Redis instances in the target region, including the instance ID.
    JobId string
    Task ID of the scan job.
    ScanKeyNumPerSecond int
    Number of expired keys scanned per second. Value range: integer between 2000 and 100000.
    StartTime string
    Task start time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    Status string
    Task status. Values: Created, Running, Finished, Failed, Interrupted.
    TimeoutMinutes int
    Scan timeout. Value range: integer between 30 and 1440, unit: minutes.
    TotalCount int
    Total number of shards to analyze.
    completed_count number
    Number of shards analyzed.
    create_time string
    Task creation time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    finish_time string
    Task end time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    instance_id string
    Instance ID. You can call the DescribeDBInstances API to query basic information for all Redis instances in the target region, including the instance ID.
    job_id string
    Task ID of the scan job.
    scan_key_num_per_second number
    Number of expired keys scanned per second. Value range: integer between 2000 and 100000.
    start_time string
    Task start time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    status string
    Task status. Values: Created, Running, Finished, Failed, Interrupted.
    timeout_minutes number
    Scan timeout. Value range: integer between 30 and 1440, unit: minutes.
    total_count number
    Total number of shards to analyze.
    completedCount Integer
    Number of shards analyzed.
    createTime String
    Task creation time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    finishTime String
    Task end time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    instanceId String
    Instance ID. You can call the DescribeDBInstances API to query basic information for all Redis instances in the target region, including the instance ID.
    jobId String
    Task ID of the scan job.
    scanKeyNumPerSecond Integer
    Number of expired keys scanned per second. Value range: integer between 2000 and 100000.
    startTime String
    Task start time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    status String
    Task status. Values: Created, Running, Finished, Failed, Interrupted.
    timeoutMinutes Integer
    Scan timeout. Value range: integer between 30 and 1440, unit: minutes.
    totalCount Integer
    Total number of shards to analyze.
    completedCount number
    Number of shards analyzed.
    createTime string
    Task creation time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    finishTime string
    Task end time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    instanceId string
    Instance ID. You can call the DescribeDBInstances API to query basic information for all Redis instances in the target region, including the instance ID.
    jobId string
    Task ID of the scan job.
    scanKeyNumPerSecond number
    Number of expired keys scanned per second. Value range: integer between 2000 and 100000.
    startTime string
    Task start time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    status string
    Task status. Values: Created, Running, Finished, Failed, Interrupted.
    timeoutMinutes number
    Scan timeout. Value range: integer between 30 and 1440, unit: minutes.
    totalCount number
    Total number of shards to analyze.
    completed_count int
    Number of shards analyzed.
    create_time str
    Task creation time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    finish_time str
    Task end time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    instance_id str
    Instance ID. You can call the DescribeDBInstances API to query basic information for all Redis instances in the target region, including the instance ID.
    job_id str
    Task ID of the scan job.
    scan_key_num_per_second int
    Number of expired keys scanned per second. Value range: integer between 2000 and 100000.
    start_time str
    Task start time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    status str
    Task status. Values: Created, Running, Finished, Failed, Interrupted.
    timeout_minutes int
    Scan timeout. Value range: integer between 30 and 1440, unit: minutes.
    total_count int
    Total number of shards to analyze.
    completedCount Number
    Number of shards analyzed.
    createTime String
    Task creation time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    finishTime String
    Task end time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    instanceId String
    Instance ID. You can call the DescribeDBInstances API to query basic information for all Redis instances in the target region, including the instance ID.
    jobId String
    Task ID of the scan job.
    scanKeyNumPerSecond Number
    Number of expired keys scanned per second. Value range: integer between 2000 and 100000.
    startTime String
    Task start time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC).
    status String
    Task status. Values: Created, Running, Finished, Failed, Interrupted.
    timeoutMinutes Number
    Scan timeout. Value range: integer between 30 and 1440, unit: minutes.
    totalCount Number
    Total number of shards to analyze.

    Import

    $ pulumi import volcenginecc:redis/keyScanJob:KeyScanJob example "instance_id|job_id"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    volcenginecc volcengine/pulumi-volcenginecc
    License
    MPL-2.0
    Notes
    This Pulumi package is based on the volcenginecc Terraform Provider.
    volcenginecc logo
    Viewing docs for volcenginecc v0.0.60
    published on Thursday, Sep 3, 2026 by Volcengine

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial