published on Wednesday, Jul 8, 2026 by Pulumi
published on Wednesday, Jul 8, 2026 by Pulumi
Caution: Preview Feature This feature is considered a preview feature in the provider, regardless of the state of the resource in Snowflake. We do not guarantee its stability. It will be reworked and marked as a stable feature in future releases. Breaking changes are expected, even without bumping the major version. To use this feature, add the relevant feature name to
previewFeaturesEnabledfield in the provider configuration. Please always refer to the Getting Help section in our Github repo to best determine how to get help for your questions.
Resource used to manage storage lifecycle policy objects. For more information, check storage lifecycle policy documentation.
Example Usage
Note Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult identifiers guide.
import * as pulumi from "@pulumi/pulumi";
import * as snowflake from "@pulumi/snowflake";
//# Minimal
const basic = new snowflake.StorageLifecyclePolicy("basic", {
database: "database_name",
schema: "schema_name",
name: "storage_lifecycle_policy_name",
arguments: [{
name: "VAL",
type: "VARCHAR",
}],
body: "LENGTH(VAL) > 0",
});
//# Complete
const complete = new snowflake.StorageLifecyclePolicy("complete", {
database: "database_name",
schema: "schema_name",
name: "storage_lifecycle_policy_name",
arguments: [
{
name: "VAL",
type: "VARCHAR",
},
{
name: "CREATED_AT",
type: "TIMESTAMP_NTZ",
},
],
body: "LENGTH(VAL) > 0",
archiveTier: "COLD",
archiveForDays: 365,
comment: "My storage lifecycle policy",
});
import pulumi
import pulumi_snowflake as snowflake
## Minimal
basic = snowflake.StorageLifecyclePolicy("basic",
database="database_name",
schema="schema_name",
name="storage_lifecycle_policy_name",
arguments=[{
"name": "VAL",
"type": "VARCHAR",
}],
body="LENGTH(VAL) > 0")
## Complete
complete = snowflake.StorageLifecyclePolicy("complete",
database="database_name",
schema="schema_name",
name="storage_lifecycle_policy_name",
arguments=[
{
"name": "VAL",
"type": "VARCHAR",
},
{
"name": "CREATED_AT",
"type": "TIMESTAMP_NTZ",
},
],
body="LENGTH(VAL) > 0",
archive_tier="COLD",
archive_for_days=365,
comment="My storage lifecycle policy")
package main
import (
"github.com/pulumi/pulumi-snowflake/sdk/v2/go/snowflake"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// # Minimal
_, err := snowflake.NewStorageLifecyclePolicy(ctx, "basic", &snowflake.StorageLifecyclePolicyArgs{
Database: pulumi.String("database_name"),
Schema: pulumi.String("schema_name"),
Name: pulumi.String("storage_lifecycle_policy_name"),
Arguments: snowflake.StorageLifecyclePolicyArgumentArray{
&snowflake.StorageLifecyclePolicyArgumentArgs{
Name: pulumi.String("VAL"),
Type: pulumi.String("VARCHAR"),
},
},
Body: pulumi.String("LENGTH(VAL) > 0"),
})
if err != nil {
return err
}
// # Complete
_, err = snowflake.NewStorageLifecyclePolicy(ctx, "complete", &snowflake.StorageLifecyclePolicyArgs{
Database: pulumi.String("database_name"),
Schema: pulumi.String("schema_name"),
Name: pulumi.String("storage_lifecycle_policy_name"),
Arguments: snowflake.StorageLifecyclePolicyArgumentArray{
&snowflake.StorageLifecyclePolicyArgumentArgs{
Name: pulumi.String("VAL"),
Type: pulumi.String("VARCHAR"),
},
&snowflake.StorageLifecyclePolicyArgumentArgs{
Name: pulumi.String("CREATED_AT"),
Type: pulumi.String("TIMESTAMP_NTZ"),
},
},
Body: pulumi.String("LENGTH(VAL) > 0"),
ArchiveTier: pulumi.String("COLD"),
ArchiveForDays: pulumi.Int(365),
Comment: pulumi.String("My storage lifecycle policy"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Snowflake = Pulumi.Snowflake;
return await Deployment.RunAsync(() =>
{
//# Minimal
var basic = new Snowflake.StorageLifecyclePolicy("basic", new()
{
Database = "database_name",
Schema = "schema_name",
Name = "storage_lifecycle_policy_name",
Arguments = new[]
{
new Snowflake.Inputs.StorageLifecyclePolicyArgumentArgs
{
Name = "VAL",
Type = "VARCHAR",
},
},
Body = "LENGTH(VAL) > 0",
});
//# Complete
var complete = new Snowflake.StorageLifecyclePolicy("complete", new()
{
Database = "database_name",
Schema = "schema_name",
Name = "storage_lifecycle_policy_name",
Arguments = new[]
{
new Snowflake.Inputs.StorageLifecyclePolicyArgumentArgs
{
Name = "VAL",
Type = "VARCHAR",
},
new Snowflake.Inputs.StorageLifecyclePolicyArgumentArgs
{
Name = "CREATED_AT",
Type = "TIMESTAMP_NTZ",
},
},
Body = "LENGTH(VAL) > 0",
ArchiveTier = "COLD",
ArchiveForDays = 365,
Comment = "My storage lifecycle policy",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.snowflake.StorageLifecyclePolicy;
import com.pulumi.snowflake.StorageLifecyclePolicyArgs;
import com.pulumi.snowflake.inputs.StorageLifecyclePolicyArgumentArgs;
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) {
//# Minimal
var basic = new StorageLifecyclePolicy("basic", StorageLifecyclePolicyArgs.builder()
.database("database_name")
.schema("schema_name")
.name("storage_lifecycle_policy_name")
.arguments(StorageLifecyclePolicyArgumentArgs.builder()
.name("VAL")
.type("VARCHAR")
.build())
.body("LENGTH(VAL) > 0")
.build());
//# Complete
var complete = new StorageLifecyclePolicy("complete", StorageLifecyclePolicyArgs.builder()
.database("database_name")
.schema("schema_name")
.name("storage_lifecycle_policy_name")
.arguments(
StorageLifecyclePolicyArgumentArgs.builder()
.name("VAL")
.type("VARCHAR")
.build(),
StorageLifecyclePolicyArgumentArgs.builder()
.name("CREATED_AT")
.type("TIMESTAMP_NTZ")
.build())
.body("LENGTH(VAL) > 0")
.archiveTier("COLD")
.archiveForDays(365)
.comment("My storage lifecycle policy")
.build());
}
}
resources:
## Minimal
basic:
type: snowflake:StorageLifecyclePolicy
properties:
database: database_name
schema: schema_name
name: storage_lifecycle_policy_name
arguments:
- name: VAL
type: VARCHAR
body: LENGTH(VAL) > 0
## Complete
complete:
type: snowflake:StorageLifecyclePolicy
properties:
database: database_name
schema: schema_name
name: storage_lifecycle_policy_name
arguments:
- name: VAL
type: VARCHAR
- name: CREATED_AT
type: TIMESTAMP_NTZ
body: LENGTH(VAL) > 0
archiveTier: COLD
archiveForDays: 365
comment: My storage lifecycle policy
pulumi {
required_providers {
snowflake = {
source = "pulumi/snowflake"
}
}
}
## Minimal
resource "snowflake_storagelifecyclepolicy" "basic" {
database = "database_name"
schema = "schema_name"
name = "storage_lifecycle_policy_name"
arguments {
name = "VAL"
type = "VARCHAR"
}
body = "LENGTH(VAL) > 0"
}
## Complete
resource "snowflake_storagelifecyclepolicy" "complete" {
database = "database_name"
schema = "schema_name"
name = "storage_lifecycle_policy_name"
arguments {
name = "VAL"
type = "VARCHAR"
}
arguments {
name = "CREATED_AT"
type = "TIMESTAMP_NTZ"
}
body = "LENGTH(VAL) > 0"
archive_tier = "COLD"
archive_for_days = 365
comment = "My storage lifecycle policy"
}
Note If a field has a default value, it is shown next to the type in the schema.
Create StorageLifecyclePolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new StorageLifecyclePolicy(name: string, args: StorageLifecyclePolicyArgs, opts?: CustomResourceOptions);@overload
def StorageLifecyclePolicy(resource_name: str,
args: StorageLifecyclePolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def StorageLifecyclePolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
arguments: Optional[Sequence[StorageLifecyclePolicyArgumentArgs]] = None,
body: Optional[str] = None,
database: Optional[str] = None,
schema: Optional[str] = None,
archive_for_days: Optional[int] = None,
archive_tier: Optional[str] = None,
comment: Optional[str] = None,
name: Optional[str] = None)func NewStorageLifecyclePolicy(ctx *Context, name string, args StorageLifecyclePolicyArgs, opts ...ResourceOption) (*StorageLifecyclePolicy, error)public StorageLifecyclePolicy(string name, StorageLifecyclePolicyArgs args, CustomResourceOptions? opts = null)
public StorageLifecyclePolicy(String name, StorageLifecyclePolicyArgs args)
public StorageLifecyclePolicy(String name, StorageLifecyclePolicyArgs args, CustomResourceOptions options)
type: snowflake:StorageLifecyclePolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "snowflake_storage_lifecycle_policy" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args StorageLifecyclePolicyArgs
- 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 StorageLifecyclePolicyArgs
- 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 StorageLifecyclePolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args StorageLifecyclePolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args StorageLifecyclePolicyArgs
- 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 storageLifecyclePolicyResource = new Snowflake.StorageLifecyclePolicy("storageLifecyclePolicyResource", new()
{
Arguments = new[]
{
new Snowflake.Inputs.StorageLifecyclePolicyArgumentArgs
{
Name = "string",
Type = "string",
},
},
Body = "string",
Database = "string",
Schema = "string",
ArchiveForDays = 0,
ArchiveTier = "string",
Comment = "string",
Name = "string",
});
example, err := snowflake.NewStorageLifecyclePolicy(ctx, "storageLifecyclePolicyResource", &snowflake.StorageLifecyclePolicyArgs{
Arguments: snowflake.StorageLifecyclePolicyArgumentArray{
&snowflake.StorageLifecyclePolicyArgumentArgs{
Name: pulumi.String("string"),
Type: pulumi.String("string"),
},
},
Body: pulumi.String("string"),
Database: pulumi.String("string"),
Schema: pulumi.String("string"),
ArchiveForDays: pulumi.Int(0),
ArchiveTier: pulumi.String("string"),
Comment: pulumi.String("string"),
Name: pulumi.String("string"),
})
resource "snowflake_storage_lifecycle_policy" "storageLifecyclePolicyResource" {
lifecycle {
create_before_destroy = true
}
arguments {
name = "string"
type = "string"
}
body = "string"
database = "string"
schema = "string"
archive_for_days = 0
archive_tier = "string"
comment = "string"
name = "string"
}
var storageLifecyclePolicyResource = new StorageLifecyclePolicy("storageLifecyclePolicyResource", StorageLifecyclePolicyArgs.builder()
.arguments(StorageLifecyclePolicyArgumentArgs.builder()
.name("string")
.type("string")
.build())
.body("string")
.database("string")
.schema("string")
.archiveForDays(0)
.archiveTier("string")
.comment("string")
.name("string")
.build());
storage_lifecycle_policy_resource = snowflake.StorageLifecyclePolicy("storageLifecyclePolicyResource",
arguments=[{
"name": "string",
"type": "string",
}],
body="string",
database="string",
schema="string",
archive_for_days=0,
archive_tier="string",
comment="string",
name="string")
const storageLifecyclePolicyResource = new snowflake.StorageLifecyclePolicy("storageLifecyclePolicyResource", {
arguments: [{
name: "string",
type: "string",
}],
body: "string",
database: "string",
schema: "string",
archiveForDays: 0,
archiveTier: "string",
comment: "string",
name: "string",
});
type: snowflake:StorageLifecyclePolicy
properties:
archiveForDays: 0
archiveTier: string
arguments:
- name: string
type: string
body: string
comment: string
database: string
name: string
schema: string
StorageLifecyclePolicy 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 StorageLifecyclePolicy resource accepts the following input properties:
- Arguments
List<Storage
Lifecycle Policy Argument> - List of the arguments for the storage lifecycle policy. A signature specifies a set of attributes that must be considered to determine whether the row is ready for expiration.
- Body string
- Specifies the SQL expression. The expression can be any boolean-valued SQL expression. To mitigate permadiff on this field, the provider replaces blank characters with a space. This can lead to false positives in cases where a change in case or run of whitespace is semantically significant.
- Database string
- The database in which to create the storage lifecycle policy. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - Schema string
- The schema in which to create the storage lifecycle policy. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - Archive
For intDays - Specifies the number of days to keep rows that match the policy expression in archive storage. If set, Snowflake moves the data into archive storage according to the value you select for archive_tier. If unset, Snowflake expires the rows from the table without archiving the data.
- Archive
Tier string - Specifies the type of storage tier to use for archiving rows. After you set the ARCHIVE_TIER for a policy, you can’t modify it. If you don’t specify this parameter, the policy is an expiration policy that deletes rows without archiving them. Valid values are (case-insensitive):
COOL|COLD. - Comment string
- Specifies a comment for the storage lifecycle policy.
- Name string
- Specifies the identifier for the storage lifecycle policy; must be unique for the database and schema in which the storage lifecycle policy is created. Due to technical limitations (read more here), avoid using the following characters:
|,.,".
- Arguments
[]Storage
Lifecycle Policy Argument Args - List of the arguments for the storage lifecycle policy. A signature specifies a set of attributes that must be considered to determine whether the row is ready for expiration.
- Body string
- Specifies the SQL expression. The expression can be any boolean-valued SQL expression. To mitigate permadiff on this field, the provider replaces blank characters with a space. This can lead to false positives in cases where a change in case or run of whitespace is semantically significant.
- Database string
- The database in which to create the storage lifecycle policy. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - Schema string
- The schema in which to create the storage lifecycle policy. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - Archive
For intDays - Specifies the number of days to keep rows that match the policy expression in archive storage. If set, Snowflake moves the data into archive storage according to the value you select for archive_tier. If unset, Snowflake expires the rows from the table without archiving the data.
- Archive
Tier string - Specifies the type of storage tier to use for archiving rows. After you set the ARCHIVE_TIER for a policy, you can’t modify it. If you don’t specify this parameter, the policy is an expiration policy that deletes rows without archiving them. Valid values are (case-insensitive):
COOL|COLD. - Comment string
- Specifies a comment for the storage lifecycle policy.
- Name string
- Specifies the identifier for the storage lifecycle policy; must be unique for the database and schema in which the storage lifecycle policy is created. Due to technical limitations (read more here), avoid using the following characters:
|,.,".
- arguments list(object)
- List of the arguments for the storage lifecycle policy. A signature specifies a set of attributes that must be considered to determine whether the row is ready for expiration.
- body string
- Specifies the SQL expression. The expression can be any boolean-valued SQL expression. To mitigate permadiff on this field, the provider replaces blank characters with a space. This can lead to false positives in cases where a change in case or run of whitespace is semantically significant.
- database string
- The database in which to create the storage lifecycle policy. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - schema string
- The schema in which to create the storage lifecycle policy. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - archive_
for_ numberdays - Specifies the number of days to keep rows that match the policy expression in archive storage. If set, Snowflake moves the data into archive storage according to the value you select for archive_tier. If unset, Snowflake expires the rows from the table without archiving the data.
- archive_
tier string - Specifies the type of storage tier to use for archiving rows. After you set the ARCHIVE_TIER for a policy, you can’t modify it. If you don’t specify this parameter, the policy is an expiration policy that deletes rows without archiving them. Valid values are (case-insensitive):
COOL|COLD. - comment string
- Specifies a comment for the storage lifecycle policy.
- name string
- Specifies the identifier for the storage lifecycle policy; must be unique for the database and schema in which the storage lifecycle policy is created. Due to technical limitations (read more here), avoid using the following characters:
|,.,".
- arguments
List<Storage
Lifecycle Policy Argument> - List of the arguments for the storage lifecycle policy. A signature specifies a set of attributes that must be considered to determine whether the row is ready for expiration.
- body String
- Specifies the SQL expression. The expression can be any boolean-valued SQL expression. To mitigate permadiff on this field, the provider replaces blank characters with a space. This can lead to false positives in cases where a change in case or run of whitespace is semantically significant.
- database String
- The database in which to create the storage lifecycle policy. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - schema String
- The schema in which to create the storage lifecycle policy. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - archive
For IntegerDays - Specifies the number of days to keep rows that match the policy expression in archive storage. If set, Snowflake moves the data into archive storage according to the value you select for archive_tier. If unset, Snowflake expires the rows from the table without archiving the data.
- archive
Tier String - Specifies the type of storage tier to use for archiving rows. After you set the ARCHIVE_TIER for a policy, you can’t modify it. If you don’t specify this parameter, the policy is an expiration policy that deletes rows without archiving them. Valid values are (case-insensitive):
COOL|COLD. - comment String
- Specifies a comment for the storage lifecycle policy.
- name String
- Specifies the identifier for the storage lifecycle policy; must be unique for the database and schema in which the storage lifecycle policy is created. Due to technical limitations (read more here), avoid using the following characters:
|,.,".
- arguments
Storage
Lifecycle Policy Argument[] - List of the arguments for the storage lifecycle policy. A signature specifies a set of attributes that must be considered to determine whether the row is ready for expiration.
- body string
- Specifies the SQL expression. The expression can be any boolean-valued SQL expression. To mitigate permadiff on this field, the provider replaces blank characters with a space. This can lead to false positives in cases where a change in case or run of whitespace is semantically significant.
- database string
- The database in which to create the storage lifecycle policy. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - schema string
- The schema in which to create the storage lifecycle policy. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - archive
For numberDays - Specifies the number of days to keep rows that match the policy expression in archive storage. If set, Snowflake moves the data into archive storage according to the value you select for archive_tier. If unset, Snowflake expires the rows from the table without archiving the data.
- archive
Tier string - Specifies the type of storage tier to use for archiving rows. After you set the ARCHIVE_TIER for a policy, you can’t modify it. If you don’t specify this parameter, the policy is an expiration policy that deletes rows without archiving them. Valid values are (case-insensitive):
COOL|COLD. - comment string
- Specifies a comment for the storage lifecycle policy.
- name string
- Specifies the identifier for the storage lifecycle policy; must be unique for the database and schema in which the storage lifecycle policy is created. Due to technical limitations (read more here), avoid using the following characters:
|,.,".
- arguments
Sequence[Storage
Lifecycle Policy Argument Args] - List of the arguments for the storage lifecycle policy. A signature specifies a set of attributes that must be considered to determine whether the row is ready for expiration.
- body str
- Specifies the SQL expression. The expression can be any boolean-valued SQL expression. To mitigate permadiff on this field, the provider replaces blank characters with a space. This can lead to false positives in cases where a change in case or run of whitespace is semantically significant.
- database str
- The database in which to create the storage lifecycle policy. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - schema str
- The schema in which to create the storage lifecycle policy. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - archive_
for_ intdays - Specifies the number of days to keep rows that match the policy expression in archive storage. If set, Snowflake moves the data into archive storage according to the value you select for archive_tier. If unset, Snowflake expires the rows from the table without archiving the data.
- archive_
tier str - Specifies the type of storage tier to use for archiving rows. After you set the ARCHIVE_TIER for a policy, you can’t modify it. If you don’t specify this parameter, the policy is an expiration policy that deletes rows without archiving them. Valid values are (case-insensitive):
COOL|COLD. - comment str
- Specifies a comment for the storage lifecycle policy.
- name str
- Specifies the identifier for the storage lifecycle policy; must be unique for the database and schema in which the storage lifecycle policy is created. Due to technical limitations (read more here), avoid using the following characters:
|,.,".
- arguments List<Property Map>
- List of the arguments for the storage lifecycle policy. A signature specifies a set of attributes that must be considered to determine whether the row is ready for expiration.
- body String
- Specifies the SQL expression. The expression can be any boolean-valued SQL expression. To mitigate permadiff on this field, the provider replaces blank characters with a space. This can lead to false positives in cases where a change in case or run of whitespace is semantically significant.
- database String
- The database in which to create the storage lifecycle policy. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - schema String
- The schema in which to create the storage lifecycle policy. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - archive
For NumberDays - Specifies the number of days to keep rows that match the policy expression in archive storage. If set, Snowflake moves the data into archive storage according to the value you select for archive_tier. If unset, Snowflake expires the rows from the table without archiving the data.
- archive
Tier String - Specifies the type of storage tier to use for archiving rows. After you set the ARCHIVE_TIER for a policy, you can’t modify it. If you don’t specify this parameter, the policy is an expiration policy that deletes rows without archiving them. Valid values are (case-insensitive):
COOL|COLD. - comment String
- Specifies a comment for the storage lifecycle policy.
- name String
- Specifies the identifier for the storage lifecycle policy; must be unique for the database and schema in which the storage lifecycle policy is created. Due to technical limitations (read more here), avoid using the following characters:
|,.,".
Outputs
All input properties are implicitly available as output properties. Additionally, the StorageLifecyclePolicy resource produces the following output properties:
- Describe
Outputs List<StorageLifecycle Policy Describe Output> - Outputs the result of
DESCRIBE STORAGE LIFECYCLE POLICYfor the given storage lifecycle policy. - Fully
Qualified stringName - Fully qualified name of the resource. For more information, see object name resolution.
- Id string
- The provider-assigned unique ID for this managed resource.
- Show
Outputs List<StorageLifecycle Policy Show Output> - Outputs the result of
SHOW STORAGE LIFECYCLE POLICIESfor the given storage lifecycle policy.
- Describe
Outputs []StorageLifecycle Policy Describe Output - Outputs the result of
DESCRIBE STORAGE LIFECYCLE POLICYfor the given storage lifecycle policy. - Fully
Qualified stringName - Fully qualified name of the resource. For more information, see object name resolution.
- Id string
- The provider-assigned unique ID for this managed resource.
- Show
Outputs []StorageLifecycle Policy Show Output - Outputs the result of
SHOW STORAGE LIFECYCLE POLICIESfor the given storage lifecycle policy.
- describe_
outputs list(object) - Outputs the result of
DESCRIBE STORAGE LIFECYCLE POLICYfor the given storage lifecycle policy. - fully_
qualified_ stringname - Fully qualified name of the resource. For more information, see object name resolution.
- id string
- The provider-assigned unique ID for this managed resource.
- show_
outputs list(object) - Outputs the result of
SHOW STORAGE LIFECYCLE POLICIESfor the given storage lifecycle policy.
- describe
Outputs List<StorageLifecycle Policy Describe Output> - Outputs the result of
DESCRIBE STORAGE LIFECYCLE POLICYfor the given storage lifecycle policy. - fully
Qualified StringName - Fully qualified name of the resource. For more information, see object name resolution.
- id String
- The provider-assigned unique ID for this managed resource.
- show
Outputs List<StorageLifecycle Policy Show Output> - Outputs the result of
SHOW STORAGE LIFECYCLE POLICIESfor the given storage lifecycle policy.
- describe
Outputs StorageLifecycle Policy Describe Output[] - Outputs the result of
DESCRIBE STORAGE LIFECYCLE POLICYfor the given storage lifecycle policy. - fully
Qualified stringName - Fully qualified name of the resource. For more information, see object name resolution.
- id string
- The provider-assigned unique ID for this managed resource.
- show
Outputs StorageLifecycle Policy Show Output[] - Outputs the result of
SHOW STORAGE LIFECYCLE POLICIESfor the given storage lifecycle policy.
- describe_
outputs Sequence[StorageLifecycle Policy Describe Output] - Outputs the result of
DESCRIBE STORAGE LIFECYCLE POLICYfor the given storage lifecycle policy. - fully_
qualified_ strname - Fully qualified name of the resource. For more information, see object name resolution.
- id str
- The provider-assigned unique ID for this managed resource.
- show_
outputs Sequence[StorageLifecycle Policy Show Output] - Outputs the result of
SHOW STORAGE LIFECYCLE POLICIESfor the given storage lifecycle policy.
- describe
Outputs List<Property Map> - Outputs the result of
DESCRIBE STORAGE LIFECYCLE POLICYfor the given storage lifecycle policy. - fully
Qualified StringName - Fully qualified name of the resource. For more information, see object name resolution.
- id String
- The provider-assigned unique ID for this managed resource.
- show
Outputs List<Property Map> - Outputs the result of
SHOW STORAGE LIFECYCLE POLICIESfor the given storage lifecycle policy.
Look up Existing StorageLifecyclePolicy Resource
Get an existing StorageLifecyclePolicy 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?: StorageLifecyclePolicyState, opts?: CustomResourceOptions): StorageLifecyclePolicy@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
archive_for_days: Optional[int] = None,
archive_tier: Optional[str] = None,
arguments: Optional[Sequence[StorageLifecyclePolicyArgumentArgs]] = None,
body: Optional[str] = None,
comment: Optional[str] = None,
database: Optional[str] = None,
describe_outputs: Optional[Sequence[StorageLifecyclePolicyDescribeOutputArgs]] = None,
fully_qualified_name: Optional[str] = None,
name: Optional[str] = None,
schema: Optional[str] = None,
show_outputs: Optional[Sequence[StorageLifecyclePolicyShowOutputArgs]] = None) -> StorageLifecyclePolicyfunc GetStorageLifecyclePolicy(ctx *Context, name string, id IDInput, state *StorageLifecyclePolicyState, opts ...ResourceOption) (*StorageLifecyclePolicy, error)public static StorageLifecyclePolicy Get(string name, Input<string> id, StorageLifecyclePolicyState? state, CustomResourceOptions? opts = null)public static StorageLifecyclePolicy get(String name, Output<String> id, StorageLifecyclePolicyState state, CustomResourceOptions options)resources: _: type: snowflake:StorageLifecyclePolicy get: id: ${id}import {
to = snowflake_storage_lifecycle_policy.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.
- Archive
For intDays - Specifies the number of days to keep rows that match the policy expression in archive storage. If set, Snowflake moves the data into archive storage according to the value you select for archive_tier. If unset, Snowflake expires the rows from the table without archiving the data.
- Archive
Tier string - Specifies the type of storage tier to use for archiving rows. After you set the ARCHIVE_TIER for a policy, you can’t modify it. If you don’t specify this parameter, the policy is an expiration policy that deletes rows without archiving them. Valid values are (case-insensitive):
COOL|COLD. - Arguments
List<Storage
Lifecycle Policy Argument> - List of the arguments for the storage lifecycle policy. A signature specifies a set of attributes that must be considered to determine whether the row is ready for expiration.
- Body string
- Specifies the SQL expression. The expression can be any boolean-valued SQL expression. To mitigate permadiff on this field, the provider replaces blank characters with a space. This can lead to false positives in cases where a change in case or run of whitespace is semantically significant.
- Comment string
- Specifies a comment for the storage lifecycle policy.
- Database string
- The database in which to create the storage lifecycle policy. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - Describe
Outputs List<StorageLifecycle Policy Describe Output> - Outputs the result of
DESCRIBE STORAGE LIFECYCLE POLICYfor the given storage lifecycle policy. - Fully
Qualified stringName - Fully qualified name of the resource. For more information, see object name resolution.
- Name string
- Specifies the identifier for the storage lifecycle policy; must be unique for the database and schema in which the storage lifecycle policy is created. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - Schema string
- The schema in which to create the storage lifecycle policy. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - Show
Outputs List<StorageLifecycle Policy Show Output> - Outputs the result of
SHOW STORAGE LIFECYCLE POLICIESfor the given storage lifecycle policy.
- Archive
For intDays - Specifies the number of days to keep rows that match the policy expression in archive storage. If set, Snowflake moves the data into archive storage according to the value you select for archive_tier. If unset, Snowflake expires the rows from the table without archiving the data.
- Archive
Tier string - Specifies the type of storage tier to use for archiving rows. After you set the ARCHIVE_TIER for a policy, you can’t modify it. If you don’t specify this parameter, the policy is an expiration policy that deletes rows without archiving them. Valid values are (case-insensitive):
COOL|COLD. - Arguments
[]Storage
Lifecycle Policy Argument Args - List of the arguments for the storage lifecycle policy. A signature specifies a set of attributes that must be considered to determine whether the row is ready for expiration.
- Body string
- Specifies the SQL expression. The expression can be any boolean-valued SQL expression. To mitigate permadiff on this field, the provider replaces blank characters with a space. This can lead to false positives in cases where a change in case or run of whitespace is semantically significant.
- Comment string
- Specifies a comment for the storage lifecycle policy.
- Database string
- The database in which to create the storage lifecycle policy. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - Describe
Outputs []StorageLifecycle Policy Describe Output Args - Outputs the result of
DESCRIBE STORAGE LIFECYCLE POLICYfor the given storage lifecycle policy. - Fully
Qualified stringName - Fully qualified name of the resource. For more information, see object name resolution.
- Name string
- Specifies the identifier for the storage lifecycle policy; must be unique for the database and schema in which the storage lifecycle policy is created. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - Schema string
- The schema in which to create the storage lifecycle policy. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - Show
Outputs []StorageLifecycle Policy Show Output Args - Outputs the result of
SHOW STORAGE LIFECYCLE POLICIESfor the given storage lifecycle policy.
- archive_
for_ numberdays - Specifies the number of days to keep rows that match the policy expression in archive storage. If set, Snowflake moves the data into archive storage according to the value you select for archive_tier. If unset, Snowflake expires the rows from the table without archiving the data.
- archive_
tier string - Specifies the type of storage tier to use for archiving rows. After you set the ARCHIVE_TIER for a policy, you can’t modify it. If you don’t specify this parameter, the policy is an expiration policy that deletes rows without archiving them. Valid values are (case-insensitive):
COOL|COLD. - arguments list(object)
- List of the arguments for the storage lifecycle policy. A signature specifies a set of attributes that must be considered to determine whether the row is ready for expiration.
- body string
- Specifies the SQL expression. The expression can be any boolean-valued SQL expression. To mitigate permadiff on this field, the provider replaces blank characters with a space. This can lead to false positives in cases where a change in case or run of whitespace is semantically significant.
- comment string
- Specifies a comment for the storage lifecycle policy.
- database string
- The database in which to create the storage lifecycle policy. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - describe_
outputs list(object) - Outputs the result of
DESCRIBE STORAGE LIFECYCLE POLICYfor the given storage lifecycle policy. - fully_
qualified_ stringname - Fully qualified name of the resource. For more information, see object name resolution.
- name string
- Specifies the identifier for the storage lifecycle policy; must be unique for the database and schema in which the storage lifecycle policy is created. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - schema string
- The schema in which to create the storage lifecycle policy. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - show_
outputs list(object) - Outputs the result of
SHOW STORAGE LIFECYCLE POLICIESfor the given storage lifecycle policy.
- archive
For IntegerDays - Specifies the number of days to keep rows that match the policy expression in archive storage. If set, Snowflake moves the data into archive storage according to the value you select for archive_tier. If unset, Snowflake expires the rows from the table without archiving the data.
- archive
Tier String - Specifies the type of storage tier to use for archiving rows. After you set the ARCHIVE_TIER for a policy, you can’t modify it. If you don’t specify this parameter, the policy is an expiration policy that deletes rows without archiving them. Valid values are (case-insensitive):
COOL|COLD. - arguments
List<Storage
Lifecycle Policy Argument> - List of the arguments for the storage lifecycle policy. A signature specifies a set of attributes that must be considered to determine whether the row is ready for expiration.
- body String
- Specifies the SQL expression. The expression can be any boolean-valued SQL expression. To mitigate permadiff on this field, the provider replaces blank characters with a space. This can lead to false positives in cases where a change in case or run of whitespace is semantically significant.
- comment String
- Specifies a comment for the storage lifecycle policy.
- database String
- The database in which to create the storage lifecycle policy. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - describe
Outputs List<StorageLifecycle Policy Describe Output> - Outputs the result of
DESCRIBE STORAGE LIFECYCLE POLICYfor the given storage lifecycle policy. - fully
Qualified StringName - Fully qualified name of the resource. For more information, see object name resolution.
- name String
- Specifies the identifier for the storage lifecycle policy; must be unique for the database and schema in which the storage lifecycle policy is created. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - schema String
- The schema in which to create the storage lifecycle policy. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - show
Outputs List<StorageLifecycle Policy Show Output> - Outputs the result of
SHOW STORAGE LIFECYCLE POLICIESfor the given storage lifecycle policy.
- archive
For numberDays - Specifies the number of days to keep rows that match the policy expression in archive storage. If set, Snowflake moves the data into archive storage according to the value you select for archive_tier. If unset, Snowflake expires the rows from the table without archiving the data.
- archive
Tier string - Specifies the type of storage tier to use for archiving rows. After you set the ARCHIVE_TIER for a policy, you can’t modify it. If you don’t specify this parameter, the policy is an expiration policy that deletes rows without archiving them. Valid values are (case-insensitive):
COOL|COLD. - arguments
Storage
Lifecycle Policy Argument[] - List of the arguments for the storage lifecycle policy. A signature specifies a set of attributes that must be considered to determine whether the row is ready for expiration.
- body string
- Specifies the SQL expression. The expression can be any boolean-valued SQL expression. To mitigate permadiff on this field, the provider replaces blank characters with a space. This can lead to false positives in cases where a change in case or run of whitespace is semantically significant.
- comment string
- Specifies a comment for the storage lifecycle policy.
- database string
- The database in which to create the storage lifecycle policy. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - describe
Outputs StorageLifecycle Policy Describe Output[] - Outputs the result of
DESCRIBE STORAGE LIFECYCLE POLICYfor the given storage lifecycle policy. - fully
Qualified stringName - Fully qualified name of the resource. For more information, see object name resolution.
- name string
- Specifies the identifier for the storage lifecycle policy; must be unique for the database and schema in which the storage lifecycle policy is created. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - schema string
- The schema in which to create the storage lifecycle policy. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - show
Outputs StorageLifecycle Policy Show Output[] - Outputs the result of
SHOW STORAGE LIFECYCLE POLICIESfor the given storage lifecycle policy.
- archive_
for_ intdays - Specifies the number of days to keep rows that match the policy expression in archive storage. If set, Snowflake moves the data into archive storage according to the value you select for archive_tier. If unset, Snowflake expires the rows from the table without archiving the data.
- archive_
tier str - Specifies the type of storage tier to use for archiving rows. After you set the ARCHIVE_TIER for a policy, you can’t modify it. If you don’t specify this parameter, the policy is an expiration policy that deletes rows without archiving them. Valid values are (case-insensitive):
COOL|COLD. - arguments
Sequence[Storage
Lifecycle Policy Argument Args] - List of the arguments for the storage lifecycle policy. A signature specifies a set of attributes that must be considered to determine whether the row is ready for expiration.
- body str
- Specifies the SQL expression. The expression can be any boolean-valued SQL expression. To mitigate permadiff on this field, the provider replaces blank characters with a space. This can lead to false positives in cases where a change in case or run of whitespace is semantically significant.
- comment str
- Specifies a comment for the storage lifecycle policy.
- database str
- The database in which to create the storage lifecycle policy. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - describe_
outputs Sequence[StorageLifecycle Policy Describe Output Args] - Outputs the result of
DESCRIBE STORAGE LIFECYCLE POLICYfor the given storage lifecycle policy. - fully_
qualified_ strname - Fully qualified name of the resource. For more information, see object name resolution.
- name str
- Specifies the identifier for the storage lifecycle policy; must be unique for the database and schema in which the storage lifecycle policy is created. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - schema str
- The schema in which to create the storage lifecycle policy. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - show_
outputs Sequence[StorageLifecycle Policy Show Output Args] - Outputs the result of
SHOW STORAGE LIFECYCLE POLICIESfor the given storage lifecycle policy.
- archive
For NumberDays - Specifies the number of days to keep rows that match the policy expression in archive storage. If set, Snowflake moves the data into archive storage according to the value you select for archive_tier. If unset, Snowflake expires the rows from the table without archiving the data.
- archive
Tier String - Specifies the type of storage tier to use for archiving rows. After you set the ARCHIVE_TIER for a policy, you can’t modify it. If you don’t specify this parameter, the policy is an expiration policy that deletes rows without archiving them. Valid values are (case-insensitive):
COOL|COLD. - arguments List<Property Map>
- List of the arguments for the storage lifecycle policy. A signature specifies a set of attributes that must be considered to determine whether the row is ready for expiration.
- body String
- Specifies the SQL expression. The expression can be any boolean-valued SQL expression. To mitigate permadiff on this field, the provider replaces blank characters with a space. This can lead to false positives in cases where a change in case or run of whitespace is semantically significant.
- comment String
- Specifies a comment for the storage lifecycle policy.
- database String
- The database in which to create the storage lifecycle policy. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - describe
Outputs List<Property Map> - Outputs the result of
DESCRIBE STORAGE LIFECYCLE POLICYfor the given storage lifecycle policy. - fully
Qualified StringName - Fully qualified name of the resource. For more information, see object name resolution.
- name String
- Specifies the identifier for the storage lifecycle policy; must be unique for the database and schema in which the storage lifecycle policy is created. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - schema String
- The schema in which to create the storage lifecycle policy. Due to technical limitations (read more here), avoid using the following characters:
|,.,". - show
Outputs List<Property Map> - Outputs the result of
SHOW STORAGE LIFECYCLE POLICIESfor the given storage lifecycle policy.
Supporting Types
StorageLifecyclePolicyArgument, StorageLifecyclePolicyArgumentArgs
- Name string
- The argument name.
- Type string
- The argument type. For more information about data types, check Snowflake docs.
- Name string
- The argument name.
- Type string
- The argument type. For more information about data types, check Snowflake docs.
- name string
- The argument name.
- type string
- The argument type. For more information about data types, check Snowflake docs.
- name String
- The argument name.
- type String
- The argument type. For more information about data types, check Snowflake docs.
- name string
- The argument name.
- type string
- The argument type. For more information about data types, check Snowflake docs.
- name str
- The argument name.
- type str
- The argument type. For more information about data types, check Snowflake docs.
- name String
- The argument name.
- type String
- The argument type. For more information about data types, check Snowflake docs.
StorageLifecyclePolicyDescribeOutput, StorageLifecyclePolicyDescribeOutputArgs
- Archive
For intDays - Archive
Tier string - Body string
- Name string
- Return
Type string - Signatures
List<Storage
Lifecycle Policy Describe Output Signature>
- Archive
For intDays - Archive
Tier string - Body string
- Name string
- Return
Type string - Signatures
[]Storage
Lifecycle Policy Describe Output Signature
- archive_
for_ numberdays - archive_
tier string - body string
- name string
- return_
type string - signatures list(object)
- archive
For IntegerDays - archive
Tier String - body String
- name String
- return
Type String - signatures
List<Storage
Lifecycle Policy Describe Output Signature>
- archive
For numberDays - archive
Tier string - body string
- name string
- return
Type string - signatures
Storage
Lifecycle Policy Describe Output Signature[]
- archive
For NumberDays - archive
Tier String - body String
- name String
- return
Type String - signatures List<Property Map>
StorageLifecyclePolicyDescribeOutputSignature, StorageLifecyclePolicyDescribeOutputSignatureArgs
StorageLifecyclePolicyShowOutput, StorageLifecyclePolicyShowOutputArgs
- Comment string
- Created
On string - Database
Name string - Kind string
- Name string
- Options string
- Owner string
- Owner
Role stringType - Schema
Name string
- Comment string
- Created
On string - Database
Name string - Kind string
- Name string
- Options string
- Owner string
- Owner
Role stringType - Schema
Name string
- comment string
- created_
on string - database_
name string - kind string
- name string
- options string
- owner string
- owner_
role_ stringtype - schema_
name string
- comment String
- created
On String - database
Name String - kind String
- name String
- options String
- owner String
- owner
Role StringType - schema
Name String
- comment string
- created
On string - database
Name string - kind string
- name string
- options string
- owner string
- owner
Role stringType - schema
Name string
- comment str
- created_
on str - database_
name str - kind str
- name str
- options str
- owner str
- owner_
role_ strtype - schema_
name str
- comment String
- created
On String - database
Name String - kind String
- name String
- options String
- owner String
- owner
Role StringType - schema
Name String
Import
$ pulumi import snowflake:index/storageLifecyclePolicy:StorageLifecyclePolicy example '"<database_name>"."<schema_name>"."<storage_lifecycle_policy_name>"'
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Snowflake pulumi/pulumi-snowflake
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
snowflakeTerraform Provider.
published on Wednesday, Jul 8, 2026 by Pulumi