published on Saturday, May 9, 2026 by Pulumi
published on Saturday, May 9, 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 previewFeaturesEnabled 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.
Data source used to get details of filtered session policies. Filtering is aligned with the current possibilities for SHOW SESSION POLICIES query. The results of SHOW and DESCRIBE are encapsulated in one output collection sessionPolicies.
Using getSessionPolicies
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getSessionPolicies(args: GetSessionPoliciesArgs, opts?: InvokeOptions): Promise<GetSessionPoliciesResult>
function getSessionPoliciesOutput(args: GetSessionPoliciesOutputArgs, opts?: InvokeOptions): Output<GetSessionPoliciesResult>def get_session_policies(in_: Optional[GetSessionPoliciesIn] = None,
like: Optional[str] = None,
limit: Optional[GetSessionPoliciesLimit] = None,
on: Optional[GetSessionPoliciesOn] = None,
starts_with: Optional[str] = None,
with_describe: Optional[bool] = None,
opts: Optional[InvokeOptions] = None) -> GetSessionPoliciesResult
def get_session_policies_output(in_: pulumi.Input[Optional[GetSessionPoliciesInArgs]] = None,
like: pulumi.Input[Optional[str]] = None,
limit: pulumi.Input[Optional[GetSessionPoliciesLimitArgs]] = None,
on: pulumi.Input[Optional[GetSessionPoliciesOnArgs]] = None,
starts_with: pulumi.Input[Optional[str]] = None,
with_describe: pulumi.Input[Optional[bool]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetSessionPoliciesResult]func GetSessionPolicies(ctx *Context, args *GetSessionPoliciesArgs, opts ...InvokeOption) (*GetSessionPoliciesResult, error)
func GetSessionPoliciesOutput(ctx *Context, args *GetSessionPoliciesOutputArgs, opts ...InvokeOption) GetSessionPoliciesResultOutput> Note: This function is named GetSessionPolicies in the Go SDK.
public static class GetSessionPolicies
{
public static Task<GetSessionPoliciesResult> InvokeAsync(GetSessionPoliciesArgs args, InvokeOptions? opts = null)
public static Output<GetSessionPoliciesResult> Invoke(GetSessionPoliciesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetSessionPoliciesResult> getSessionPolicies(GetSessionPoliciesArgs args, InvokeOptions options)
public static Output<GetSessionPoliciesResult> getSessionPolicies(GetSessionPoliciesArgs args, InvokeOptions options)
fn::invoke:
function: snowflake:index/getSessionPolicies:getSessionPolicies
arguments:
# arguments dictionarydata "snowflake_getsessionpolicies" "name" {
# arguments
}The following arguments are supported:
- In
Get
Session Policies In - IN clause to filter the list of objects
- Like string
- Filters the output with case-insensitive pattern, with support for SQL wildcard characters (
%and_). - Limit
Get
Session Policies Limit - Limits the number of rows returned. If the
limit.fromis set, then the limit will start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern withstartsWithorlike. - On
Get
Session Policies On - Lists the policies that are effective on the specified object.
- Starts
With string - Filters the output with case-sensitive characters indicating the beginning of the object name.
- With
Describe bool - (Default:
true) Runs DESC SESSION POLICY for each object returned by SHOW SESSION POLICIES. The output of describe is saved to the describeOutput field. By default this value is set to true.
- In
Get
Session Policies In - IN clause to filter the list of objects
- Like string
- Filters the output with case-insensitive pattern, with support for SQL wildcard characters (
%and_). - Limit
Get
Session Policies Limit - Limits the number of rows returned. If the
limit.fromis set, then the limit will start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern withstartsWithorlike. - On
Get
Session Policies On - Lists the policies that are effective on the specified object.
- Starts
With string - Filters the output with case-sensitive characters indicating the beginning of the object name.
- With
Describe bool - (Default:
true) Runs DESC SESSION POLICY for each object returned by SHOW SESSION POLICIES. The output of describe is saved to the describeOutput field. By default this value is set to true.
- in object
- IN clause to filter the list of objects
- like string
- Filters the output with case-insensitive pattern, with support for SQL wildcard characters (
%and_). - limit object
- Limits the number of rows returned. If the
limit.fromis set, then the limit will start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern withstartsWithorlike. - on object
- Lists the policies that are effective on the specified object.
- starts_
with string - Filters the output with case-sensitive characters indicating the beginning of the object name.
- with_
describe bool - (Default:
true) Runs DESC SESSION POLICY for each object returned by SHOW SESSION POLICIES. The output of describe is saved to the describeOutput field. By default this value is set to true.
- in
Get
Session Policies In - IN clause to filter the list of objects
- like String
- Filters the output with case-insensitive pattern, with support for SQL wildcard characters (
%and_). - limit
Get
Session Policies Limit - Limits the number of rows returned. If the
limit.fromis set, then the limit will start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern withstartsWithorlike. - on
Get
Session Policies On - Lists the policies that are effective on the specified object.
- starts
With String - Filters the output with case-sensitive characters indicating the beginning of the object name.
- with
Describe Boolean - (Default:
true) Runs DESC SESSION POLICY for each object returned by SHOW SESSION POLICIES. The output of describe is saved to the describeOutput field. By default this value is set to true.
- in
Get
Session Policies In - IN clause to filter the list of objects
- like string
- Filters the output with case-insensitive pattern, with support for SQL wildcard characters (
%and_). - limit
Get
Session Policies Limit - Limits the number of rows returned. If the
limit.fromis set, then the limit will start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern withstartsWithorlike. - on
Get
Session Policies On - Lists the policies that are effective on the specified object.
- starts
With string - Filters the output with case-sensitive characters indicating the beginning of the object name.
- with
Describe boolean - (Default:
true) Runs DESC SESSION POLICY for each object returned by SHOW SESSION POLICIES. The output of describe is saved to the describeOutput field. By default this value is set to true.
- in_
Get
Session Policies In - IN clause to filter the list of objects
- like str
- Filters the output with case-insensitive pattern, with support for SQL wildcard characters (
%and_). - limit
Get
Session Policies Limit - Limits the number of rows returned. If the
limit.fromis set, then the limit will start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern withstartsWithorlike. - on
Get
Session Policies On - Lists the policies that are effective on the specified object.
- starts_
with str - Filters the output with case-sensitive characters indicating the beginning of the object name.
- with_
describe bool - (Default:
true) Runs DESC SESSION POLICY for each object returned by SHOW SESSION POLICIES. The output of describe is saved to the describeOutput field. By default this value is set to true.
- in Property Map
- IN clause to filter the list of objects
- like String
- Filters the output with case-insensitive pattern, with support for SQL wildcard characters (
%and_). - limit Property Map
- Limits the number of rows returned. If the
limit.fromis set, then the limit will start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern withstartsWithorlike. - on Property Map
- Lists the policies that are effective on the specified object.
- starts
With String - Filters the output with case-sensitive characters indicating the beginning of the object name.
- with
Describe Boolean - (Default:
true) Runs DESC SESSION POLICY for each object returned by SHOW SESSION POLICIES. The output of describe is saved to the describeOutput field. By default this value is set to true.
getSessionPolicies Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Session
Policies List<GetSession Policies Session Policy> - Holds the aggregated output of all session policy details queries.
- In
Get
Session Policies In - IN clause to filter the list of objects
- Like string
- Filters the output with case-insensitive pattern, with support for SQL wildcard characters (
%and_). - Limit
Get
Session Policies Limit - Limits the number of rows returned. If the
limit.fromis set, then the limit will start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern withstartsWithorlike. - On
Get
Session Policies On - Lists the policies that are effective on the specified object.
- Starts
With string - Filters the output with case-sensitive characters indicating the beginning of the object name.
- With
Describe bool - (Default:
true) Runs DESC SESSION POLICY for each object returned by SHOW SESSION POLICIES. The output of describe is saved to the describeOutput field. By default this value is set to true.
- Id string
- The provider-assigned unique ID for this managed resource.
- Session
Policies []GetSession Policies Session Policy - Holds the aggregated output of all session policy details queries.
- In
Get
Session Policies In - IN clause to filter the list of objects
- Like string
- Filters the output with case-insensitive pattern, with support for SQL wildcard characters (
%and_). - Limit
Get
Session Policies Limit - Limits the number of rows returned. If the
limit.fromis set, then the limit will start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern withstartsWithorlike. - On
Get
Session Policies On - Lists the policies that are effective on the specified object.
- Starts
With string - Filters the output with case-sensitive characters indicating the beginning of the object name.
- With
Describe bool - (Default:
true) Runs DESC SESSION POLICY for each object returned by SHOW SESSION POLICIES. The output of describe is saved to the describeOutput field. By default this value is set to true.
- id string
- The provider-assigned unique ID for this managed resource.
- session_
policies list(object) - Holds the aggregated output of all session policy details queries.
- in object
- IN clause to filter the list of objects
- like string
- Filters the output with case-insensitive pattern, with support for SQL wildcard characters (
%and_). - limit object
- Limits the number of rows returned. If the
limit.fromis set, then the limit will start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern withstartsWithorlike. - on object
- Lists the policies that are effective on the specified object.
- starts_
with string - Filters the output with case-sensitive characters indicating the beginning of the object name.
- with_
describe bool - (Default:
true) Runs DESC SESSION POLICY for each object returned by SHOW SESSION POLICIES. The output of describe is saved to the describeOutput field. By default this value is set to true.
- id String
- The provider-assigned unique ID for this managed resource.
- session
Policies List<GetSession Policies Session Policy> - Holds the aggregated output of all session policy details queries.
- in
Get
Session Policies In - IN clause to filter the list of objects
- like String
- Filters the output with case-insensitive pattern, with support for SQL wildcard characters (
%and_). - limit
Get
Session Policies Limit - Limits the number of rows returned. If the
limit.fromis set, then the limit will start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern withstartsWithorlike. - on
Get
Session Policies On - Lists the policies that are effective on the specified object.
- starts
With String - Filters the output with case-sensitive characters indicating the beginning of the object name.
- with
Describe Boolean - (Default:
true) Runs DESC SESSION POLICY for each object returned by SHOW SESSION POLICIES. The output of describe is saved to the describeOutput field. By default this value is set to true.
- id string
- The provider-assigned unique ID for this managed resource.
- session
Policies GetSession Policies Session Policy[] - Holds the aggregated output of all session policy details queries.
- in
Get
Session Policies In - IN clause to filter the list of objects
- like string
- Filters the output with case-insensitive pattern, with support for SQL wildcard characters (
%and_). - limit
Get
Session Policies Limit - Limits the number of rows returned. If the
limit.fromis set, then the limit will start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern withstartsWithorlike. - on
Get
Session Policies On - Lists the policies that are effective on the specified object.
- starts
With string - Filters the output with case-sensitive characters indicating the beginning of the object name.
- with
Describe boolean - (Default:
true) Runs DESC SESSION POLICY for each object returned by SHOW SESSION POLICIES. The output of describe is saved to the describeOutput field. By default this value is set to true.
- id str
- The provider-assigned unique ID for this managed resource.
- session_
policies Sequence[GetSession Policies Session Policy] - Holds the aggregated output of all session policy details queries.
- in_
Get
Session Policies In - IN clause to filter the list of objects
- like str
- Filters the output with case-insensitive pattern, with support for SQL wildcard characters (
%and_). - limit
Get
Session Policies Limit - Limits the number of rows returned. If the
limit.fromis set, then the limit will start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern withstartsWithorlike. - on
Get
Session Policies On - Lists the policies that are effective on the specified object.
- starts_
with str - Filters the output with case-sensitive characters indicating the beginning of the object name.
- with_
describe bool - (Default:
true) Runs DESC SESSION POLICY for each object returned by SHOW SESSION POLICIES. The output of describe is saved to the describeOutput field. By default this value is set to true.
- id String
- The provider-assigned unique ID for this managed resource.
- session
Policies List<Property Map> - Holds the aggregated output of all session policy details queries.
- in Property Map
- IN clause to filter the list of objects
- like String
- Filters the output with case-insensitive pattern, with support for SQL wildcard characters (
%and_). - limit Property Map
- Limits the number of rows returned. If the
limit.fromis set, then the limit will start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern withstartsWithorlike. - on Property Map
- Lists the policies that are effective on the specified object.
- starts
With String - Filters the output with case-sensitive characters indicating the beginning of the object name.
- with
Describe Boolean - (Default:
true) Runs DESC SESSION POLICY for each object returned by SHOW SESSION POLICIES. The output of describe is saved to the describeOutput field. By default this value is set to true.
Supporting Types
GetSessionPoliciesIn
- Account bool
- Returns records for the entire account.
- Application string
- Returns records for the specified application.
- Application
Package string - Returns records for the specified application package.
- Database string
- Returns records for the current database in use or for a specified database.
- Schema string
- Returns records for the current schema in use or a specified schema. Use fully qualified name.
- Account bool
- Returns records for the entire account.
- Application string
- Returns records for the specified application.
- Application
Package string - Returns records for the specified application package.
- Database string
- Returns records for the current database in use or for a specified database.
- Schema string
- Returns records for the current schema in use or a specified schema. Use fully qualified name.
- account bool
- Returns records for the entire account.
- application string
- Returns records for the specified application.
- application_
package string - Returns records for the specified application package.
- database string
- Returns records for the current database in use or for a specified database.
- schema string
- Returns records for the current schema in use or a specified schema. Use fully qualified name.
- account Boolean
- Returns records for the entire account.
- application String
- Returns records for the specified application.
- application
Package String - Returns records for the specified application package.
- database String
- Returns records for the current database in use or for a specified database.
- schema String
- Returns records for the current schema in use or a specified schema. Use fully qualified name.
- account boolean
- Returns records for the entire account.
- application string
- Returns records for the specified application.
- application
Package string - Returns records for the specified application package.
- database string
- Returns records for the current database in use or for a specified database.
- schema string
- Returns records for the current schema in use or a specified schema. Use fully qualified name.
- account bool
- Returns records for the entire account.
- application str
- Returns records for the specified application.
- application_
package str - Returns records for the specified application package.
- database str
- Returns records for the current database in use or for a specified database.
- schema str
- Returns records for the current schema in use or a specified schema. Use fully qualified name.
- account Boolean
- Returns records for the entire account.
- application String
- Returns records for the specified application.
- application
Package String - Returns records for the specified application package.
- database String
- Returns records for the current database in use or for a specified database.
- schema String
- Returns records for the current schema in use or a specified schema. Use fully qualified name.
GetSessionPoliciesLimit
GetSessionPoliciesOn
GetSessionPoliciesSessionPolicy
- Describe
Outputs List<GetSession Policies Session Policy Describe Output> - Holds the output of DESCRIBE SESSION POLICY.
- Show
Outputs List<GetSession Policies Session Policy Show Output> - Holds the output of SHOW SESSION POLICIES.
- Describe
Outputs []GetSession Policies Session Policy Describe Output - Holds the output of DESCRIBE SESSION POLICY.
- Show
Outputs []GetSession Policies Session Policy Show Output - Holds the output of SHOW SESSION POLICIES.
- describe_
outputs list(object) - Holds the output of DESCRIBE SESSION POLICY.
- show_
outputs list(object) - Holds the output of SHOW SESSION POLICIES.
- describe
Outputs List<GetSession Policies Session Policy Describe Output> - Holds the output of DESCRIBE SESSION POLICY.
- show
Outputs List<GetSession Policies Session Policy Show Output> - Holds the output of SHOW SESSION POLICIES.
- describe
Outputs GetSession Policies Session Policy Describe Output[] - Holds the output of DESCRIBE SESSION POLICY.
- show
Outputs GetSession Policies Session Policy Show Output[] - Holds the output of SHOW SESSION POLICIES.
- describe_
outputs Sequence[GetSession Policies Session Policy Describe Output] - Holds the output of DESCRIBE SESSION POLICY.
- show_
outputs Sequence[GetSession Policies Session Policy Show Output] - Holds the output of SHOW SESSION POLICIES.
- describe
Outputs List<Property Map> - Holds the output of DESCRIBE SESSION POLICY.
- show
Outputs List<Property Map> - Holds the output of SHOW SESSION POLICIES.
GetSessionPoliciesSessionPolicyDescribeOutput
- Allowed
Secondary List<string>Roles - Blocked
Secondary List<string>Roles - Comment string
- Id string
- Owner string
- Owner
Role stringType - Session
Idle intTimeout Mins - Session
Ui intIdle Timeout Mins
- Allowed
Secondary []stringRoles - Blocked
Secondary []stringRoles - Comment string
- Id string
- Owner string
- Owner
Role stringType - Session
Idle intTimeout Mins - Session
Ui intIdle Timeout Mins
- allowed_
secondary_ list(string)roles - blocked_
secondary_ list(string)roles - comment string
- id string
- owner string
- owner_
role_ stringtype - session_
idle_ numbertimeout_ mins - session_
ui_ numberidle_ timeout_ mins
- allowed
Secondary List<String>Roles - blocked
Secondary List<String>Roles - comment String
- id String
- owner String
- owner
Role StringType - session
Idle IntegerTimeout Mins - session
Ui IntegerIdle Timeout Mins
- allowed
Secondary string[]Roles - blocked
Secondary string[]Roles - comment string
- id string
- owner string
- owner
Role stringType - session
Idle numberTimeout Mins - session
Ui numberIdle Timeout Mins
- allowed_
secondary_ Sequence[str]roles - blocked_
secondary_ Sequence[str]roles - comment str
- id str
- owner str
- owner_
role_ strtype - session_
idle_ inttimeout_ mins - session_
ui_ intidle_ timeout_ mins
- allowed
Secondary List<String>Roles - blocked
Secondary List<String>Roles - comment String
- id String
- owner String
- owner
Role StringType - session
Idle NumberTimeout Mins - session
Ui NumberIdle Timeout Mins
GetSessionPoliciesSessionPolicyShowOutput
- 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
Package Details
- Repository
- Snowflake pulumi/pulumi-snowflake
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
snowflakeTerraform Provider.
published on Saturday, May 9, 2026 by Pulumi
