1. Packages
  2. Snowflake Provider
  3. API Docs
  4. PasswordPolicy
Snowflake v1.2.0 published on Monday, Apr 14, 2025 by Pulumi

snowflake.PasswordPolicy

Explore with Pulumi AI

!> 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 preview_features_enabled field 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.

!> Note According to Snowflake docs, a password policy cannot be dropped successfully if it is currently assigned to another object. Currently, the provider does not unassign such objects automatically. Before dropping the resource, first unassign the policy from the relevant objects. See guide for more details.

A password policy specifies the requirements that must be met to create and reset a password to authenticate to Snowflake.

Note If a field has a default value, it is shown next to the type in the schema.

Create PasswordPolicy Resource

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

Constructor syntax

new PasswordPolicy(name: string, args: PasswordPolicyArgs, opts?: CustomResourceOptions);
@overload
def PasswordPolicy(resource_name: str,
                   args: PasswordPolicyArgs,
                   opts: Optional[ResourceOptions] = None)

@overload
def PasswordPolicy(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   schema: Optional[str] = None,
                   database: Optional[str] = None,
                   min_age_days: Optional[int] = None,
                   min_length: Optional[int] = None,
                   lockout_time_mins: Optional[int] = None,
                   max_age_days: Optional[int] = None,
                   max_length: Optional[int] = None,
                   max_retries: Optional[int] = None,
                   comment: Optional[str] = None,
                   if_not_exists: Optional[bool] = None,
                   min_lower_case_chars: Optional[int] = None,
                   min_numeric_chars: Optional[int] = None,
                   min_special_chars: Optional[int] = None,
                   min_upper_case_chars: Optional[int] = None,
                   name: Optional[str] = None,
                   or_replace: Optional[bool] = None,
                   history: Optional[int] = None)
func NewPasswordPolicy(ctx *Context, name string, args PasswordPolicyArgs, opts ...ResourceOption) (*PasswordPolicy, error)
public PasswordPolicy(string name, PasswordPolicyArgs args, CustomResourceOptions? opts = null)
public PasswordPolicy(String name, PasswordPolicyArgs args)
public PasswordPolicy(String name, PasswordPolicyArgs args, CustomResourceOptions options)
type: snowflake:PasswordPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. PasswordPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. PasswordPolicyArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. PasswordPolicyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. PasswordPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. PasswordPolicyArgs
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 passwordPolicyResource = new Snowflake.PasswordPolicy("passwordPolicyResource", new()
{
    Schema = "string",
    Database = "string",
    MinAgeDays = 0,
    MinLength = 0,
    LockoutTimeMins = 0,
    MaxAgeDays = 0,
    MaxLength = 0,
    MaxRetries = 0,
    Comment = "string",
    IfNotExists = false,
    MinLowerCaseChars = 0,
    MinNumericChars = 0,
    MinSpecialChars = 0,
    MinUpperCaseChars = 0,
    Name = "string",
    OrReplace = false,
    History = 0,
});
Copy
example, err := snowflake.NewPasswordPolicy(ctx, "passwordPolicyResource", &snowflake.PasswordPolicyArgs{
	Schema:            pulumi.String("string"),
	Database:          pulumi.String("string"),
	MinAgeDays:        pulumi.Int(0),
	MinLength:         pulumi.Int(0),
	LockoutTimeMins:   pulumi.Int(0),
	MaxAgeDays:        pulumi.Int(0),
	MaxLength:         pulumi.Int(0),
	MaxRetries:        pulumi.Int(0),
	Comment:           pulumi.String("string"),
	IfNotExists:       pulumi.Bool(false),
	MinLowerCaseChars: pulumi.Int(0),
	MinNumericChars:   pulumi.Int(0),
	MinSpecialChars:   pulumi.Int(0),
	MinUpperCaseChars: pulumi.Int(0),
	Name:              pulumi.String("string"),
	OrReplace:         pulumi.Bool(false),
	History:           pulumi.Int(0),
})
Copy
var passwordPolicyResource = new PasswordPolicy("passwordPolicyResource", PasswordPolicyArgs.builder()
    .schema("string")
    .database("string")
    .minAgeDays(0)
    .minLength(0)
    .lockoutTimeMins(0)
    .maxAgeDays(0)
    .maxLength(0)
    .maxRetries(0)
    .comment("string")
    .ifNotExists(false)
    .minLowerCaseChars(0)
    .minNumericChars(0)
    .minSpecialChars(0)
    .minUpperCaseChars(0)
    .name("string")
    .orReplace(false)
    .history(0)
    .build());
Copy
password_policy_resource = snowflake.PasswordPolicy("passwordPolicyResource",
    schema="string",
    database="string",
    min_age_days=0,
    min_length=0,
    lockout_time_mins=0,
    max_age_days=0,
    max_length=0,
    max_retries=0,
    comment="string",
    if_not_exists=False,
    min_lower_case_chars=0,
    min_numeric_chars=0,
    min_special_chars=0,
    min_upper_case_chars=0,
    name="string",
    or_replace=False,
    history=0)
Copy
const passwordPolicyResource = new snowflake.PasswordPolicy("passwordPolicyResource", {
    schema: "string",
    database: "string",
    minAgeDays: 0,
    minLength: 0,
    lockoutTimeMins: 0,
    maxAgeDays: 0,
    maxLength: 0,
    maxRetries: 0,
    comment: "string",
    ifNotExists: false,
    minLowerCaseChars: 0,
    minNumericChars: 0,
    minSpecialChars: 0,
    minUpperCaseChars: 0,
    name: "string",
    orReplace: false,
    history: 0,
});
Copy
type: snowflake:PasswordPolicy
properties:
    comment: string
    database: string
    history: 0
    ifNotExists: false
    lockoutTimeMins: 0
    maxAgeDays: 0
    maxLength: 0
    maxRetries: 0
    minAgeDays: 0
    minLength: 0
    minLowerCaseChars: 0
    minNumericChars: 0
    minSpecialChars: 0
    minUpperCaseChars: 0
    name: string
    orReplace: false
    schema: string
Copy

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

Database
This property is required.
Changes to this property will trigger replacement.
string
The database this password policy belongs to.
Schema
This property is required.
Changes to this property will trigger replacement.
string
The schema this password policy belongs to.
Comment string
Adds a comment or overwrites an existing comment for the password policy.
History int
(Default: 0) Specifies the number of the most recent passwords that Snowflake stores. These stored passwords cannot be repeated when a user updates their password value. The current password value does not count towards the history. When you increase the history value, Snowflake saves the previous values. When you decrease the value, Snowflake saves the stored values up to that value that is set. For example, if the history value is 8 and you change the history value to 3, Snowflake stores the most recent 3 passwords and deletes the 5 older password values from the history. Default: 0 Max: 24
IfNotExists bool
(Default: false) Prevent overwriting a previous password policy with the same name.
LockoutTimeMins int
(Default: 15) Specifies the number of minutes the user account will be locked after exhausting the designated number of password retries (i.e. PASSWORDMAXRETRIES). Supported range: 1 to 999, inclusive. Default: 15
MaxAgeDays int
(Default: 90) Specifies the maximum number of days before the password must be changed. Supported range: 0 to 999, inclusive. A value of zero (i.e. 0) indicates that the password does not need to be changed. Snowflake does not recommend choosing this value for a default account-level password policy or for any user-level policy. Instead, choose a value that meets your internal security guidelines. Default: 90, which means the password must be changed every 90 days.
MaxLength int
(Default: 256) Specifies the maximum number of characters the password must contain. This number must be greater than or equal to the sum of PASSWORDMINLENGTH, PASSWORDMINUPPERCASECHARS, and PASSWORDMINLOWERCASECHARS. Supported range: 8 to 256, inclusive. Default: 256
MaxRetries int
(Default: 5) Specifies the maximum number of attempts to enter a password before being locked out. Supported range: 1 to 10, inclusive. Default: 5
MinAgeDays int
(Default: 0) Specifies the number of days the user must wait before a recently changed password can be changed again. Supported range: 0 to 999, inclusive. Default: 0
MinLength int
(Default: 8) Specifies the minimum number of characters the password must contain. Supported range: 8 to 256, inclusive. Default: 8
MinLowerCaseChars int
(Default: 1) Specifies the minimum number of lowercase characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
MinNumericChars int
(Default: 1) Specifies the minimum number of numeric characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
MinSpecialChars int
(Default: 1) Specifies the minimum number of special characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
MinUpperCaseChars int
(Default: 1) Specifies the minimum number of uppercase characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
Name string
Identifier for the password policy; must be unique for your account.
OrReplace bool
(Default: false) Whether to override a previous password policy with the same name.
Database
This property is required.
Changes to this property will trigger replacement.
string
The database this password policy belongs to.
Schema
This property is required.
Changes to this property will trigger replacement.
string
The schema this password policy belongs to.
Comment string
Adds a comment or overwrites an existing comment for the password policy.
History int
(Default: 0) Specifies the number of the most recent passwords that Snowflake stores. These stored passwords cannot be repeated when a user updates their password value. The current password value does not count towards the history. When you increase the history value, Snowflake saves the previous values. When you decrease the value, Snowflake saves the stored values up to that value that is set. For example, if the history value is 8 and you change the history value to 3, Snowflake stores the most recent 3 passwords and deletes the 5 older password values from the history. Default: 0 Max: 24
IfNotExists bool
(Default: false) Prevent overwriting a previous password policy with the same name.
LockoutTimeMins int
(Default: 15) Specifies the number of minutes the user account will be locked after exhausting the designated number of password retries (i.e. PASSWORDMAXRETRIES). Supported range: 1 to 999, inclusive. Default: 15
MaxAgeDays int
(Default: 90) Specifies the maximum number of days before the password must be changed. Supported range: 0 to 999, inclusive. A value of zero (i.e. 0) indicates that the password does not need to be changed. Snowflake does not recommend choosing this value for a default account-level password policy or for any user-level policy. Instead, choose a value that meets your internal security guidelines. Default: 90, which means the password must be changed every 90 days.
MaxLength int
(Default: 256) Specifies the maximum number of characters the password must contain. This number must be greater than or equal to the sum of PASSWORDMINLENGTH, PASSWORDMINUPPERCASECHARS, and PASSWORDMINLOWERCASECHARS. Supported range: 8 to 256, inclusive. Default: 256
MaxRetries int
(Default: 5) Specifies the maximum number of attempts to enter a password before being locked out. Supported range: 1 to 10, inclusive. Default: 5
MinAgeDays int
(Default: 0) Specifies the number of days the user must wait before a recently changed password can be changed again. Supported range: 0 to 999, inclusive. Default: 0
MinLength int
(Default: 8) Specifies the minimum number of characters the password must contain. Supported range: 8 to 256, inclusive. Default: 8
MinLowerCaseChars int
(Default: 1) Specifies the minimum number of lowercase characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
MinNumericChars int
(Default: 1) Specifies the minimum number of numeric characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
MinSpecialChars int
(Default: 1) Specifies the minimum number of special characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
MinUpperCaseChars int
(Default: 1) Specifies the minimum number of uppercase characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
Name string
Identifier for the password policy; must be unique for your account.
OrReplace bool
(Default: false) Whether to override a previous password policy with the same name.
database
This property is required.
Changes to this property will trigger replacement.
String
The database this password policy belongs to.
schema
This property is required.
Changes to this property will trigger replacement.
String
The schema this password policy belongs to.
comment String
Adds a comment or overwrites an existing comment for the password policy.
history Integer
(Default: 0) Specifies the number of the most recent passwords that Snowflake stores. These stored passwords cannot be repeated when a user updates their password value. The current password value does not count towards the history. When you increase the history value, Snowflake saves the previous values. When you decrease the value, Snowflake saves the stored values up to that value that is set. For example, if the history value is 8 and you change the history value to 3, Snowflake stores the most recent 3 passwords and deletes the 5 older password values from the history. Default: 0 Max: 24
ifNotExists Boolean
(Default: false) Prevent overwriting a previous password policy with the same name.
lockoutTimeMins Integer
(Default: 15) Specifies the number of minutes the user account will be locked after exhausting the designated number of password retries (i.e. PASSWORDMAXRETRIES). Supported range: 1 to 999, inclusive. Default: 15
maxAgeDays Integer
(Default: 90) Specifies the maximum number of days before the password must be changed. Supported range: 0 to 999, inclusive. A value of zero (i.e. 0) indicates that the password does not need to be changed. Snowflake does not recommend choosing this value for a default account-level password policy or for any user-level policy. Instead, choose a value that meets your internal security guidelines. Default: 90, which means the password must be changed every 90 days.
maxLength Integer
(Default: 256) Specifies the maximum number of characters the password must contain. This number must be greater than or equal to the sum of PASSWORDMINLENGTH, PASSWORDMINUPPERCASECHARS, and PASSWORDMINLOWERCASECHARS. Supported range: 8 to 256, inclusive. Default: 256
maxRetries Integer
(Default: 5) Specifies the maximum number of attempts to enter a password before being locked out. Supported range: 1 to 10, inclusive. Default: 5
minAgeDays Integer
(Default: 0) Specifies the number of days the user must wait before a recently changed password can be changed again. Supported range: 0 to 999, inclusive. Default: 0
minLength Integer
(Default: 8) Specifies the minimum number of characters the password must contain. Supported range: 8 to 256, inclusive. Default: 8
minLowerCaseChars Integer
(Default: 1) Specifies the minimum number of lowercase characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
minNumericChars Integer
(Default: 1) Specifies the minimum number of numeric characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
minSpecialChars Integer
(Default: 1) Specifies the minimum number of special characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
minUpperCaseChars Integer
(Default: 1) Specifies the minimum number of uppercase characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
name String
Identifier for the password policy; must be unique for your account.
orReplace Boolean
(Default: false) Whether to override a previous password policy with the same name.
database
This property is required.
Changes to this property will trigger replacement.
string
The database this password policy belongs to.
schema
This property is required.
Changes to this property will trigger replacement.
string
The schema this password policy belongs to.
comment string
Adds a comment or overwrites an existing comment for the password policy.
history number
(Default: 0) Specifies the number of the most recent passwords that Snowflake stores. These stored passwords cannot be repeated when a user updates their password value. The current password value does not count towards the history. When you increase the history value, Snowflake saves the previous values. When you decrease the value, Snowflake saves the stored values up to that value that is set. For example, if the history value is 8 and you change the history value to 3, Snowflake stores the most recent 3 passwords and deletes the 5 older password values from the history. Default: 0 Max: 24
ifNotExists boolean
(Default: false) Prevent overwriting a previous password policy with the same name.
lockoutTimeMins number
(Default: 15) Specifies the number of minutes the user account will be locked after exhausting the designated number of password retries (i.e. PASSWORDMAXRETRIES). Supported range: 1 to 999, inclusive. Default: 15
maxAgeDays number
(Default: 90) Specifies the maximum number of days before the password must be changed. Supported range: 0 to 999, inclusive. A value of zero (i.e. 0) indicates that the password does not need to be changed. Snowflake does not recommend choosing this value for a default account-level password policy or for any user-level policy. Instead, choose a value that meets your internal security guidelines. Default: 90, which means the password must be changed every 90 days.
maxLength number
(Default: 256) Specifies the maximum number of characters the password must contain. This number must be greater than or equal to the sum of PASSWORDMINLENGTH, PASSWORDMINUPPERCASECHARS, and PASSWORDMINLOWERCASECHARS. Supported range: 8 to 256, inclusive. Default: 256
maxRetries number
(Default: 5) Specifies the maximum number of attempts to enter a password before being locked out. Supported range: 1 to 10, inclusive. Default: 5
minAgeDays number
(Default: 0) Specifies the number of days the user must wait before a recently changed password can be changed again. Supported range: 0 to 999, inclusive. Default: 0
minLength number
(Default: 8) Specifies the minimum number of characters the password must contain. Supported range: 8 to 256, inclusive. Default: 8
minLowerCaseChars number
(Default: 1) Specifies the minimum number of lowercase characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
minNumericChars number
(Default: 1) Specifies the minimum number of numeric characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
minSpecialChars number
(Default: 1) Specifies the minimum number of special characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
minUpperCaseChars number
(Default: 1) Specifies the minimum number of uppercase characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
name string
Identifier for the password policy; must be unique for your account.
orReplace boolean
(Default: false) Whether to override a previous password policy with the same name.
database
This property is required.
Changes to this property will trigger replacement.
str
The database this password policy belongs to.
schema
This property is required.
Changes to this property will trigger replacement.
str
The schema this password policy belongs to.
comment str
Adds a comment or overwrites an existing comment for the password policy.
history int
(Default: 0) Specifies the number of the most recent passwords that Snowflake stores. These stored passwords cannot be repeated when a user updates their password value. The current password value does not count towards the history. When you increase the history value, Snowflake saves the previous values. When you decrease the value, Snowflake saves the stored values up to that value that is set. For example, if the history value is 8 and you change the history value to 3, Snowflake stores the most recent 3 passwords and deletes the 5 older password values from the history. Default: 0 Max: 24
if_not_exists bool
(Default: false) Prevent overwriting a previous password policy with the same name.
lockout_time_mins int
(Default: 15) Specifies the number of minutes the user account will be locked after exhausting the designated number of password retries (i.e. PASSWORDMAXRETRIES). Supported range: 1 to 999, inclusive. Default: 15
max_age_days int
(Default: 90) Specifies the maximum number of days before the password must be changed. Supported range: 0 to 999, inclusive. A value of zero (i.e. 0) indicates that the password does not need to be changed. Snowflake does not recommend choosing this value for a default account-level password policy or for any user-level policy. Instead, choose a value that meets your internal security guidelines. Default: 90, which means the password must be changed every 90 days.
max_length int
(Default: 256) Specifies the maximum number of characters the password must contain. This number must be greater than or equal to the sum of PASSWORDMINLENGTH, PASSWORDMINUPPERCASECHARS, and PASSWORDMINLOWERCASECHARS. Supported range: 8 to 256, inclusive. Default: 256
max_retries int
(Default: 5) Specifies the maximum number of attempts to enter a password before being locked out. Supported range: 1 to 10, inclusive. Default: 5
min_age_days int
(Default: 0) Specifies the number of days the user must wait before a recently changed password can be changed again. Supported range: 0 to 999, inclusive. Default: 0
min_length int
(Default: 8) Specifies the minimum number of characters the password must contain. Supported range: 8 to 256, inclusive. Default: 8
min_lower_case_chars int
(Default: 1) Specifies the minimum number of lowercase characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
min_numeric_chars int
(Default: 1) Specifies the minimum number of numeric characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
min_special_chars int
(Default: 1) Specifies the minimum number of special characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
min_upper_case_chars int
(Default: 1) Specifies the minimum number of uppercase characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
name str
Identifier for the password policy; must be unique for your account.
or_replace bool
(Default: false) Whether to override a previous password policy with the same name.
database
This property is required.
Changes to this property will trigger replacement.
String
The database this password policy belongs to.
schema
This property is required.
Changes to this property will trigger replacement.
String
The schema this password policy belongs to.
comment String
Adds a comment or overwrites an existing comment for the password policy.
history Number
(Default: 0) Specifies the number of the most recent passwords that Snowflake stores. These stored passwords cannot be repeated when a user updates their password value. The current password value does not count towards the history. When you increase the history value, Snowflake saves the previous values. When you decrease the value, Snowflake saves the stored values up to that value that is set. For example, if the history value is 8 and you change the history value to 3, Snowflake stores the most recent 3 passwords and deletes the 5 older password values from the history. Default: 0 Max: 24
ifNotExists Boolean
(Default: false) Prevent overwriting a previous password policy with the same name.
lockoutTimeMins Number
(Default: 15) Specifies the number of minutes the user account will be locked after exhausting the designated number of password retries (i.e. PASSWORDMAXRETRIES). Supported range: 1 to 999, inclusive. Default: 15
maxAgeDays Number
(Default: 90) Specifies the maximum number of days before the password must be changed. Supported range: 0 to 999, inclusive. A value of zero (i.e. 0) indicates that the password does not need to be changed. Snowflake does not recommend choosing this value for a default account-level password policy or for any user-level policy. Instead, choose a value that meets your internal security guidelines. Default: 90, which means the password must be changed every 90 days.
maxLength Number
(Default: 256) Specifies the maximum number of characters the password must contain. This number must be greater than or equal to the sum of PASSWORDMINLENGTH, PASSWORDMINUPPERCASECHARS, and PASSWORDMINLOWERCASECHARS. Supported range: 8 to 256, inclusive. Default: 256
maxRetries Number
(Default: 5) Specifies the maximum number of attempts to enter a password before being locked out. Supported range: 1 to 10, inclusive. Default: 5
minAgeDays Number
(Default: 0) Specifies the number of days the user must wait before a recently changed password can be changed again. Supported range: 0 to 999, inclusive. Default: 0
minLength Number
(Default: 8) Specifies the minimum number of characters the password must contain. Supported range: 8 to 256, inclusive. Default: 8
minLowerCaseChars Number
(Default: 1) Specifies the minimum number of lowercase characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
minNumericChars Number
(Default: 1) Specifies the minimum number of numeric characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
minSpecialChars Number
(Default: 1) Specifies the minimum number of special characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
minUpperCaseChars Number
(Default: 1) Specifies the minimum number of uppercase characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
name String
Identifier for the password policy; must be unique for your account.
orReplace Boolean
(Default: false) Whether to override a previous password policy with the same name.

Outputs

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

FullyQualifiedName string
Fully qualified name of the resource. For more information, see object name resolution.
Id string
The provider-assigned unique ID for this managed resource.
FullyQualifiedName string
Fully qualified name of the resource. For more information, see object name resolution.
Id string
The provider-assigned unique ID for this managed resource.
fullyQualifiedName String
Fully qualified name of the resource. For more information, see object name resolution.
id String
The provider-assigned unique ID for this managed resource.
fullyQualifiedName string
Fully qualified name of the resource. For more information, see object name resolution.
id string
The provider-assigned unique ID for this managed resource.
fully_qualified_name str
Fully qualified name of the resource. For more information, see object name resolution.
id str
The provider-assigned unique ID for this managed resource.
fullyQualifiedName String
Fully qualified name of the resource. For more information, see object name resolution.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing PasswordPolicy Resource

Get an existing PasswordPolicy 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?: PasswordPolicyState, opts?: CustomResourceOptions): PasswordPolicy
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        comment: Optional[str] = None,
        database: Optional[str] = None,
        fully_qualified_name: Optional[str] = None,
        history: Optional[int] = None,
        if_not_exists: Optional[bool] = None,
        lockout_time_mins: Optional[int] = None,
        max_age_days: Optional[int] = None,
        max_length: Optional[int] = None,
        max_retries: Optional[int] = None,
        min_age_days: Optional[int] = None,
        min_length: Optional[int] = None,
        min_lower_case_chars: Optional[int] = None,
        min_numeric_chars: Optional[int] = None,
        min_special_chars: Optional[int] = None,
        min_upper_case_chars: Optional[int] = None,
        name: Optional[str] = None,
        or_replace: Optional[bool] = None,
        schema: Optional[str] = None) -> PasswordPolicy
func GetPasswordPolicy(ctx *Context, name string, id IDInput, state *PasswordPolicyState, opts ...ResourceOption) (*PasswordPolicy, error)
public static PasswordPolicy Get(string name, Input<string> id, PasswordPolicyState? state, CustomResourceOptions? opts = null)
public static PasswordPolicy get(String name, Output<String> id, PasswordPolicyState state, CustomResourceOptions options)
resources:  _:    type: snowflake:PasswordPolicy    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Comment string
Adds a comment or overwrites an existing comment for the password policy.
Database Changes to this property will trigger replacement. string
The database this password policy belongs to.
FullyQualifiedName string
Fully qualified name of the resource. For more information, see object name resolution.
History int
(Default: 0) Specifies the number of the most recent passwords that Snowflake stores. These stored passwords cannot be repeated when a user updates their password value. The current password value does not count towards the history. When you increase the history value, Snowflake saves the previous values. When you decrease the value, Snowflake saves the stored values up to that value that is set. For example, if the history value is 8 and you change the history value to 3, Snowflake stores the most recent 3 passwords and deletes the 5 older password values from the history. Default: 0 Max: 24
IfNotExists bool
(Default: false) Prevent overwriting a previous password policy with the same name.
LockoutTimeMins int
(Default: 15) Specifies the number of minutes the user account will be locked after exhausting the designated number of password retries (i.e. PASSWORDMAXRETRIES). Supported range: 1 to 999, inclusive. Default: 15
MaxAgeDays int
(Default: 90) Specifies the maximum number of days before the password must be changed. Supported range: 0 to 999, inclusive. A value of zero (i.e. 0) indicates that the password does not need to be changed. Snowflake does not recommend choosing this value for a default account-level password policy or for any user-level policy. Instead, choose a value that meets your internal security guidelines. Default: 90, which means the password must be changed every 90 days.
MaxLength int
(Default: 256) Specifies the maximum number of characters the password must contain. This number must be greater than or equal to the sum of PASSWORDMINLENGTH, PASSWORDMINUPPERCASECHARS, and PASSWORDMINLOWERCASECHARS. Supported range: 8 to 256, inclusive. Default: 256
MaxRetries int
(Default: 5) Specifies the maximum number of attempts to enter a password before being locked out. Supported range: 1 to 10, inclusive. Default: 5
MinAgeDays int
(Default: 0) Specifies the number of days the user must wait before a recently changed password can be changed again. Supported range: 0 to 999, inclusive. Default: 0
MinLength int
(Default: 8) Specifies the minimum number of characters the password must contain. Supported range: 8 to 256, inclusive. Default: 8
MinLowerCaseChars int
(Default: 1) Specifies the minimum number of lowercase characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
MinNumericChars int
(Default: 1) Specifies the minimum number of numeric characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
MinSpecialChars int
(Default: 1) Specifies the minimum number of special characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
MinUpperCaseChars int
(Default: 1) Specifies the minimum number of uppercase characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
Name string
Identifier for the password policy; must be unique for your account.
OrReplace bool
(Default: false) Whether to override a previous password policy with the same name.
Schema Changes to this property will trigger replacement. string
The schema this password policy belongs to.
Comment string
Adds a comment or overwrites an existing comment for the password policy.
Database Changes to this property will trigger replacement. string
The database this password policy belongs to.
FullyQualifiedName string
Fully qualified name of the resource. For more information, see object name resolution.
History int
(Default: 0) Specifies the number of the most recent passwords that Snowflake stores. These stored passwords cannot be repeated when a user updates their password value. The current password value does not count towards the history. When you increase the history value, Snowflake saves the previous values. When you decrease the value, Snowflake saves the stored values up to that value that is set. For example, if the history value is 8 and you change the history value to 3, Snowflake stores the most recent 3 passwords and deletes the 5 older password values from the history. Default: 0 Max: 24
IfNotExists bool
(Default: false) Prevent overwriting a previous password policy with the same name.
LockoutTimeMins int
(Default: 15) Specifies the number of minutes the user account will be locked after exhausting the designated number of password retries (i.e. PASSWORDMAXRETRIES). Supported range: 1 to 999, inclusive. Default: 15
MaxAgeDays int
(Default: 90) Specifies the maximum number of days before the password must be changed. Supported range: 0 to 999, inclusive. A value of zero (i.e. 0) indicates that the password does not need to be changed. Snowflake does not recommend choosing this value for a default account-level password policy or for any user-level policy. Instead, choose a value that meets your internal security guidelines. Default: 90, which means the password must be changed every 90 days.
MaxLength int
(Default: 256) Specifies the maximum number of characters the password must contain. This number must be greater than or equal to the sum of PASSWORDMINLENGTH, PASSWORDMINUPPERCASECHARS, and PASSWORDMINLOWERCASECHARS. Supported range: 8 to 256, inclusive. Default: 256
MaxRetries int
(Default: 5) Specifies the maximum number of attempts to enter a password before being locked out. Supported range: 1 to 10, inclusive. Default: 5
MinAgeDays int
(Default: 0) Specifies the number of days the user must wait before a recently changed password can be changed again. Supported range: 0 to 999, inclusive. Default: 0
MinLength int
(Default: 8) Specifies the minimum number of characters the password must contain. Supported range: 8 to 256, inclusive. Default: 8
MinLowerCaseChars int
(Default: 1) Specifies the minimum number of lowercase characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
MinNumericChars int
(Default: 1) Specifies the minimum number of numeric characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
MinSpecialChars int
(Default: 1) Specifies the minimum number of special characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
MinUpperCaseChars int
(Default: 1) Specifies the minimum number of uppercase characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
Name string
Identifier for the password policy; must be unique for your account.
OrReplace bool
(Default: false) Whether to override a previous password policy with the same name.
Schema Changes to this property will trigger replacement. string
The schema this password policy belongs to.
comment String
Adds a comment or overwrites an existing comment for the password policy.
database Changes to this property will trigger replacement. String
The database this password policy belongs to.
fullyQualifiedName String
Fully qualified name of the resource. For more information, see object name resolution.
history Integer
(Default: 0) Specifies the number of the most recent passwords that Snowflake stores. These stored passwords cannot be repeated when a user updates their password value. The current password value does not count towards the history. When you increase the history value, Snowflake saves the previous values. When you decrease the value, Snowflake saves the stored values up to that value that is set. For example, if the history value is 8 and you change the history value to 3, Snowflake stores the most recent 3 passwords and deletes the 5 older password values from the history. Default: 0 Max: 24
ifNotExists Boolean
(Default: false) Prevent overwriting a previous password policy with the same name.
lockoutTimeMins Integer
(Default: 15) Specifies the number of minutes the user account will be locked after exhausting the designated number of password retries (i.e. PASSWORDMAXRETRIES). Supported range: 1 to 999, inclusive. Default: 15
maxAgeDays Integer
(Default: 90) Specifies the maximum number of days before the password must be changed. Supported range: 0 to 999, inclusive. A value of zero (i.e. 0) indicates that the password does not need to be changed. Snowflake does not recommend choosing this value for a default account-level password policy or for any user-level policy. Instead, choose a value that meets your internal security guidelines. Default: 90, which means the password must be changed every 90 days.
maxLength Integer
(Default: 256) Specifies the maximum number of characters the password must contain. This number must be greater than or equal to the sum of PASSWORDMINLENGTH, PASSWORDMINUPPERCASECHARS, and PASSWORDMINLOWERCASECHARS. Supported range: 8 to 256, inclusive. Default: 256
maxRetries Integer
(Default: 5) Specifies the maximum number of attempts to enter a password before being locked out. Supported range: 1 to 10, inclusive. Default: 5
minAgeDays Integer
(Default: 0) Specifies the number of days the user must wait before a recently changed password can be changed again. Supported range: 0 to 999, inclusive. Default: 0
minLength Integer
(Default: 8) Specifies the minimum number of characters the password must contain. Supported range: 8 to 256, inclusive. Default: 8
minLowerCaseChars Integer
(Default: 1) Specifies the minimum number of lowercase characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
minNumericChars Integer
(Default: 1) Specifies the minimum number of numeric characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
minSpecialChars Integer
(Default: 1) Specifies the minimum number of special characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
minUpperCaseChars Integer
(Default: 1) Specifies the minimum number of uppercase characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
name String
Identifier for the password policy; must be unique for your account.
orReplace Boolean
(Default: false) Whether to override a previous password policy with the same name.
schema Changes to this property will trigger replacement. String
The schema this password policy belongs to.
comment string
Adds a comment or overwrites an existing comment for the password policy.
database Changes to this property will trigger replacement. string
The database this password policy belongs to.
fullyQualifiedName string
Fully qualified name of the resource. For more information, see object name resolution.
history number
(Default: 0) Specifies the number of the most recent passwords that Snowflake stores. These stored passwords cannot be repeated when a user updates their password value. The current password value does not count towards the history. When you increase the history value, Snowflake saves the previous values. When you decrease the value, Snowflake saves the stored values up to that value that is set. For example, if the history value is 8 and you change the history value to 3, Snowflake stores the most recent 3 passwords and deletes the 5 older password values from the history. Default: 0 Max: 24
ifNotExists boolean
(Default: false) Prevent overwriting a previous password policy with the same name.
lockoutTimeMins number
(Default: 15) Specifies the number of minutes the user account will be locked after exhausting the designated number of password retries (i.e. PASSWORDMAXRETRIES). Supported range: 1 to 999, inclusive. Default: 15
maxAgeDays number
(Default: 90) Specifies the maximum number of days before the password must be changed. Supported range: 0 to 999, inclusive. A value of zero (i.e. 0) indicates that the password does not need to be changed. Snowflake does not recommend choosing this value for a default account-level password policy or for any user-level policy. Instead, choose a value that meets your internal security guidelines. Default: 90, which means the password must be changed every 90 days.
maxLength number
(Default: 256) Specifies the maximum number of characters the password must contain. This number must be greater than or equal to the sum of PASSWORDMINLENGTH, PASSWORDMINUPPERCASECHARS, and PASSWORDMINLOWERCASECHARS. Supported range: 8 to 256, inclusive. Default: 256
maxRetries number
(Default: 5) Specifies the maximum number of attempts to enter a password before being locked out. Supported range: 1 to 10, inclusive. Default: 5
minAgeDays number
(Default: 0) Specifies the number of days the user must wait before a recently changed password can be changed again. Supported range: 0 to 999, inclusive. Default: 0
minLength number
(Default: 8) Specifies the minimum number of characters the password must contain. Supported range: 8 to 256, inclusive. Default: 8
minLowerCaseChars number
(Default: 1) Specifies the minimum number of lowercase characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
minNumericChars number
(Default: 1) Specifies the minimum number of numeric characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
minSpecialChars number
(Default: 1) Specifies the minimum number of special characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
minUpperCaseChars number
(Default: 1) Specifies the minimum number of uppercase characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
name string
Identifier for the password policy; must be unique for your account.
orReplace boolean
(Default: false) Whether to override a previous password policy with the same name.
schema Changes to this property will trigger replacement. string
The schema this password policy belongs to.
comment str
Adds a comment or overwrites an existing comment for the password policy.
database Changes to this property will trigger replacement. str
The database this password policy belongs to.
fully_qualified_name str
Fully qualified name of the resource. For more information, see object name resolution.
history int
(Default: 0) Specifies the number of the most recent passwords that Snowflake stores. These stored passwords cannot be repeated when a user updates their password value. The current password value does not count towards the history. When you increase the history value, Snowflake saves the previous values. When you decrease the value, Snowflake saves the stored values up to that value that is set. For example, if the history value is 8 and you change the history value to 3, Snowflake stores the most recent 3 passwords and deletes the 5 older password values from the history. Default: 0 Max: 24
if_not_exists bool
(Default: false) Prevent overwriting a previous password policy with the same name.
lockout_time_mins int
(Default: 15) Specifies the number of minutes the user account will be locked after exhausting the designated number of password retries (i.e. PASSWORDMAXRETRIES). Supported range: 1 to 999, inclusive. Default: 15
max_age_days int
(Default: 90) Specifies the maximum number of days before the password must be changed. Supported range: 0 to 999, inclusive. A value of zero (i.e. 0) indicates that the password does not need to be changed. Snowflake does not recommend choosing this value for a default account-level password policy or for any user-level policy. Instead, choose a value that meets your internal security guidelines. Default: 90, which means the password must be changed every 90 days.
max_length int
(Default: 256) Specifies the maximum number of characters the password must contain. This number must be greater than or equal to the sum of PASSWORDMINLENGTH, PASSWORDMINUPPERCASECHARS, and PASSWORDMINLOWERCASECHARS. Supported range: 8 to 256, inclusive. Default: 256
max_retries int
(Default: 5) Specifies the maximum number of attempts to enter a password before being locked out. Supported range: 1 to 10, inclusive. Default: 5
min_age_days int
(Default: 0) Specifies the number of days the user must wait before a recently changed password can be changed again. Supported range: 0 to 999, inclusive. Default: 0
min_length int
(Default: 8) Specifies the minimum number of characters the password must contain. Supported range: 8 to 256, inclusive. Default: 8
min_lower_case_chars int
(Default: 1) Specifies the minimum number of lowercase characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
min_numeric_chars int
(Default: 1) Specifies the minimum number of numeric characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
min_special_chars int
(Default: 1) Specifies the minimum number of special characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
min_upper_case_chars int
(Default: 1) Specifies the minimum number of uppercase characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
name str
Identifier for the password policy; must be unique for your account.
or_replace bool
(Default: false) Whether to override a previous password policy with the same name.
schema Changes to this property will trigger replacement. str
The schema this password policy belongs to.
comment String
Adds a comment or overwrites an existing comment for the password policy.
database Changes to this property will trigger replacement. String
The database this password policy belongs to.
fullyQualifiedName String
Fully qualified name of the resource. For more information, see object name resolution.
history Number
(Default: 0) Specifies the number of the most recent passwords that Snowflake stores. These stored passwords cannot be repeated when a user updates their password value. The current password value does not count towards the history. When you increase the history value, Snowflake saves the previous values. When you decrease the value, Snowflake saves the stored values up to that value that is set. For example, if the history value is 8 and you change the history value to 3, Snowflake stores the most recent 3 passwords and deletes the 5 older password values from the history. Default: 0 Max: 24
ifNotExists Boolean
(Default: false) Prevent overwriting a previous password policy with the same name.
lockoutTimeMins Number
(Default: 15) Specifies the number of minutes the user account will be locked after exhausting the designated number of password retries (i.e. PASSWORDMAXRETRIES). Supported range: 1 to 999, inclusive. Default: 15
maxAgeDays Number
(Default: 90) Specifies the maximum number of days before the password must be changed. Supported range: 0 to 999, inclusive. A value of zero (i.e. 0) indicates that the password does not need to be changed. Snowflake does not recommend choosing this value for a default account-level password policy or for any user-level policy. Instead, choose a value that meets your internal security guidelines. Default: 90, which means the password must be changed every 90 days.
maxLength Number
(Default: 256) Specifies the maximum number of characters the password must contain. This number must be greater than or equal to the sum of PASSWORDMINLENGTH, PASSWORDMINUPPERCASECHARS, and PASSWORDMINLOWERCASECHARS. Supported range: 8 to 256, inclusive. Default: 256
maxRetries Number
(Default: 5) Specifies the maximum number of attempts to enter a password before being locked out. Supported range: 1 to 10, inclusive. Default: 5
minAgeDays Number
(Default: 0) Specifies the number of days the user must wait before a recently changed password can be changed again. Supported range: 0 to 999, inclusive. Default: 0
minLength Number
(Default: 8) Specifies the minimum number of characters the password must contain. Supported range: 8 to 256, inclusive. Default: 8
minLowerCaseChars Number
(Default: 1) Specifies the minimum number of lowercase characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
minNumericChars Number
(Default: 1) Specifies the minimum number of numeric characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
minSpecialChars Number
(Default: 1) Specifies the minimum number of special characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
minUpperCaseChars Number
(Default: 1) Specifies the minimum number of uppercase characters the password must contain. Supported range: 0 to 256, inclusive. Default: 1
name String
Identifier for the password policy; must be unique for your account.
orReplace Boolean
(Default: false) Whether to override a previous password policy with the same name.
schema Changes to this property will trigger replacement. String
The schema this password policy belongs to.

Package Details

Repository
Snowflake pulumi/pulumi-snowflake
License
Apache-2.0
Notes
This Pulumi package is based on the snowflake Terraform Provider.