1. Packages
  2. Snowflake Provider
  3. API Docs
  4. getNetworkRules
Snowflake v2.13.0 published on Thursday, Feb 26, 2026 by Pulumi
snowflake logo
Snowflake v2.13.0 published on Thursday, Feb 26, 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 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.

    Data source used to get details of filtered network rules. Filtering is aligned with the current possibilities for SHOW NETWORK RULES query. The results of SHOW and DESCRIBE are encapsulated in one output collection network_rules.

    Using getNetworkRules

    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 getNetworkRules(args: GetNetworkRulesArgs, opts?: InvokeOptions): Promise<GetNetworkRulesResult>
    function getNetworkRulesOutput(args: GetNetworkRulesOutputArgs, opts?: InvokeOptions): Output<GetNetworkRulesResult>
    def get_network_rules(in_: Optional[GetNetworkRulesIn] = None,
                          like: Optional[str] = None,
                          limit: Optional[GetNetworkRulesLimit] = None,
                          starts_with: Optional[str] = None,
                          with_describe: Optional[bool] = None,
                          opts: Optional[InvokeOptions] = None) -> GetNetworkRulesResult
    def get_network_rules_output(in_: Optional[pulumi.Input[GetNetworkRulesInArgs]] = None,
                          like: Optional[pulumi.Input[str]] = None,
                          limit: Optional[pulumi.Input[GetNetworkRulesLimitArgs]] = None,
                          starts_with: Optional[pulumi.Input[str]] = None,
                          with_describe: Optional[pulumi.Input[bool]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetNetworkRulesResult]
    func GetNetworkRules(ctx *Context, args *GetNetworkRulesArgs, opts ...InvokeOption) (*GetNetworkRulesResult, error)
    func GetNetworkRulesOutput(ctx *Context, args *GetNetworkRulesOutputArgs, opts ...InvokeOption) GetNetworkRulesResultOutput

    > Note: This function is named GetNetworkRules in the Go SDK.

    public static class GetNetworkRules 
    {
        public static Task<GetNetworkRulesResult> InvokeAsync(GetNetworkRulesArgs args, InvokeOptions? opts = null)
        public static Output<GetNetworkRulesResult> Invoke(GetNetworkRulesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetNetworkRulesResult> getNetworkRules(GetNetworkRulesArgs args, InvokeOptions options)
    public static Output<GetNetworkRulesResult> getNetworkRules(GetNetworkRulesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: snowflake:index/getNetworkRules:getNetworkRules
      arguments:
        # arguments dictionary

    The following arguments are supported:

    In GetNetworkRulesIn
    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 GetNetworkRulesLimit
    Limits the number of rows returned. If the limit.from is 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 with starts_with or like.
    StartsWith string
    Filters the output with case-sensitive characters indicating the beginning of the object name.
    WithDescribe bool
    (Default: true) Runs DESC NETWORK RULE for each network rule returned by SHOW NETWORK RULES. The output of describe is saved to the description field. By default this value is set to true.
    In GetNetworkRulesIn
    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 GetNetworkRulesLimit
    Limits the number of rows returned. If the limit.from is 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 with starts_with or like.
    StartsWith string
    Filters the output with case-sensitive characters indicating the beginning of the object name.
    WithDescribe bool
    (Default: true) Runs DESC NETWORK RULE for each network rule returned by SHOW NETWORK RULES. The output of describe is saved to the description field. By default this value is set to true.
    in GetNetworkRulesIn
    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 GetNetworkRulesLimit
    Limits the number of rows returned. If the limit.from is 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 with starts_with or like.
    startsWith String
    Filters the output with case-sensitive characters indicating the beginning of the object name.
    withDescribe Boolean
    (Default: true) Runs DESC NETWORK RULE for each network rule returned by SHOW NETWORK RULES. The output of describe is saved to the description field. By default this value is set to true.
    in GetNetworkRulesIn
    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 GetNetworkRulesLimit
    Limits the number of rows returned. If the limit.from is 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 with starts_with or like.
    startsWith string
    Filters the output with case-sensitive characters indicating the beginning of the object name.
    withDescribe boolean
    (Default: true) Runs DESC NETWORK RULE for each network rule returned by SHOW NETWORK RULES. The output of describe is saved to the description field. By default this value is set to true.
    in_ GetNetworkRulesIn
    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 GetNetworkRulesLimit
    Limits the number of rows returned. If the limit.from is 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 with starts_with or like.
    starts_with str
    Filters the output with case-sensitive characters indicating the beginning of the object name.
    with_describe bool
    (Default: true) Runs DESC NETWORK RULE for each network rule returned by SHOW NETWORK RULES. The output of describe is saved to the description 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.from is 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 with starts_with or like.
    startsWith String
    Filters the output with case-sensitive characters indicating the beginning of the object name.
    withDescribe Boolean
    (Default: true) Runs DESC NETWORK RULE for each network rule returned by SHOW NETWORK RULES. The output of describe is saved to the description field. By default this value is set to true.

    getNetworkRules Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    NetworkRules List<GetNetworkRulesNetworkRule>
    Holds the aggregated output of all network rules details queries.
    In GetNetworkRulesIn
    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 GetNetworkRulesLimit
    Limits the number of rows returned. If the limit.from is 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 with starts_with or like.
    StartsWith string
    Filters the output with case-sensitive characters indicating the beginning of the object name.
    WithDescribe bool
    (Default: true) Runs DESC NETWORK RULE for each network rule returned by SHOW NETWORK RULES. The output of describe is saved to the description field. By default this value is set to true.
    Id string
    The provider-assigned unique ID for this managed resource.
    NetworkRules []GetNetworkRulesNetworkRule
    Holds the aggregated output of all network rules details queries.
    In GetNetworkRulesIn
    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 GetNetworkRulesLimit
    Limits the number of rows returned. If the limit.from is 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 with starts_with or like.
    StartsWith string
    Filters the output with case-sensitive characters indicating the beginning of the object name.
    WithDescribe bool
    (Default: true) Runs DESC NETWORK RULE for each network rule returned by SHOW NETWORK RULES. The output of describe is saved to the description field. By default this value is set to true.
    id String
    The provider-assigned unique ID for this managed resource.
    networkRules List<GetNetworkRulesNetworkRule>
    Holds the aggregated output of all network rules details queries.
    in GetNetworkRulesIn
    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 GetNetworkRulesLimit
    Limits the number of rows returned. If the limit.from is 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 with starts_with or like.
    startsWith String
    Filters the output with case-sensitive characters indicating the beginning of the object name.
    withDescribe Boolean
    (Default: true) Runs DESC NETWORK RULE for each network rule returned by SHOW NETWORK RULES. The output of describe is saved to the description field. By default this value is set to true.
    id string
    The provider-assigned unique ID for this managed resource.
    networkRules GetNetworkRulesNetworkRule[]
    Holds the aggregated output of all network rules details queries.
    in GetNetworkRulesIn
    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 GetNetworkRulesLimit
    Limits the number of rows returned. If the limit.from is 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 with starts_with or like.
    startsWith string
    Filters the output with case-sensitive characters indicating the beginning of the object name.
    withDescribe boolean
    (Default: true) Runs DESC NETWORK RULE for each network rule returned by SHOW NETWORK RULES. The output of describe is saved to the description field. By default this value is set to true.
    id str
    The provider-assigned unique ID for this managed resource.
    network_rules Sequence[GetNetworkRulesNetworkRule]
    Holds the aggregated output of all network rules details queries.
    in_ GetNetworkRulesIn
    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 GetNetworkRulesLimit
    Limits the number of rows returned. If the limit.from is 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 with starts_with or like.
    starts_with str
    Filters the output with case-sensitive characters indicating the beginning of the object name.
    with_describe bool
    (Default: true) Runs DESC NETWORK RULE for each network rule returned by SHOW NETWORK RULES. The output of describe is saved to the description field. By default this value is set to true.
    id String
    The provider-assigned unique ID for this managed resource.
    networkRules List<Property Map>
    Holds the aggregated output of all network rules 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.from is 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 with starts_with or like.
    startsWith String
    Filters the output with case-sensitive characters indicating the beginning of the object name.
    withDescribe Boolean
    (Default: true) Runs DESC NETWORK RULE for each network rule returned by SHOW NETWORK RULES. The output of describe is saved to the description field. By default this value is set to true.

    Supporting Types

    GetNetworkRulesIn

    Account bool
    Returns records for the entire account.
    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.
    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.
    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.
    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.
    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.
    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.

    GetNetworkRulesLimit

    Rows int
    The maximum number of rows to return.
    From string
    Specifies a case-sensitive pattern that is used to match object name. After the first match, the limit on the number of rows will be applied.
    Rows int
    The maximum number of rows to return.
    From string
    Specifies a case-sensitive pattern that is used to match object name. After the first match, the limit on the number of rows will be applied.
    rows Integer
    The maximum number of rows to return.
    from String
    Specifies a case-sensitive pattern that is used to match object name. After the first match, the limit on the number of rows will be applied.
    rows number
    The maximum number of rows to return.
    from string
    Specifies a case-sensitive pattern that is used to match object name. After the first match, the limit on the number of rows will be applied.
    rows int
    The maximum number of rows to return.
    from_ str
    Specifies a case-sensitive pattern that is used to match object name. After the first match, the limit on the number of rows will be applied.
    rows Number
    The maximum number of rows to return.
    from String
    Specifies a case-sensitive pattern that is used to match object name. After the first match, the limit on the number of rows will be applied.

    GetNetworkRulesNetworkRule

    DescribeOutputs List<GetNetworkRulesNetworkRuleDescribeOutput>
    Holds the output of DESCRIBE NETWORK RULE.
    ShowOutputs List<GetNetworkRulesNetworkRuleShowOutput>
    Holds the output of SHOW NETWORK RULES.
    DescribeOutputs []GetNetworkRulesNetworkRuleDescribeOutput
    Holds the output of DESCRIBE NETWORK RULE.
    ShowOutputs []GetNetworkRulesNetworkRuleShowOutput
    Holds the output of SHOW NETWORK RULES.
    describeOutputs List<GetNetworkRulesNetworkRuleDescribeOutput>
    Holds the output of DESCRIBE NETWORK RULE.
    showOutputs List<GetNetworkRulesNetworkRuleShowOutput>
    Holds the output of SHOW NETWORK RULES.
    describeOutputs GetNetworkRulesNetworkRuleDescribeOutput[]
    Holds the output of DESCRIBE NETWORK RULE.
    showOutputs GetNetworkRulesNetworkRuleShowOutput[]
    Holds the output of SHOW NETWORK RULES.
    describe_outputs Sequence[GetNetworkRulesNetworkRuleDescribeOutput]
    Holds the output of DESCRIBE NETWORK RULE.
    show_outputs Sequence[GetNetworkRulesNetworkRuleShowOutput]
    Holds the output of SHOW NETWORK RULES.
    describeOutputs List<Property Map>
    Holds the output of DESCRIBE NETWORK RULE.
    showOutputs List<Property Map>
    Holds the output of SHOW NETWORK RULES.

    GetNetworkRulesNetworkRuleDescribeOutput

    Comment string
    CreatedOn string
    DatabaseName string
    Mode string
    Name string
    Owner string
    SchemaName string
    Type string
    ValueLists List<string>
    Comment string
    CreatedOn string
    DatabaseName string
    Mode string
    Name string
    Owner string
    SchemaName string
    Type string
    ValueLists []string
    comment String
    createdOn String
    databaseName String
    mode String
    name String
    owner String
    schemaName String
    type String
    valueLists List<String>
    comment string
    createdOn string
    databaseName string
    mode string
    name string
    owner string
    schemaName string
    type string
    valueLists string[]
    comment str
    created_on str
    database_name str
    mode str
    name str
    owner str
    schema_name str
    type str
    value_lists Sequence[str]
    comment String
    createdOn String
    databaseName String
    mode String
    name String
    owner String
    schemaName String
    type String
    valueLists List<String>

    GetNetworkRulesNetworkRuleShowOutput

    Comment string
    CreatedOn string
    DatabaseName string
    EntriesInValueList int
    Mode string
    Name string
    Owner string
    OwnerRoleType string
    SchemaName string
    Type string
    Comment string
    CreatedOn string
    DatabaseName string
    EntriesInValueList int
    Mode string
    Name string
    Owner string
    OwnerRoleType string
    SchemaName string
    Type string
    comment String
    createdOn String
    databaseName String
    entriesInValueList Integer
    mode String
    name String
    owner String
    ownerRoleType String
    schemaName String
    type String
    comment string
    createdOn string
    databaseName string
    entriesInValueList number
    mode string
    name string
    owner string
    ownerRoleType string
    schemaName string
    type string
    comment String
    createdOn String
    databaseName String
    entriesInValueList Number
    mode String
    name String
    owner String
    ownerRoleType String
    schemaName String
    type String

    Package Details

    Repository
    Snowflake pulumi/pulumi-snowflake
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the snowflake Terraform Provider.
    snowflake logo
    Snowflake v2.13.0 published on Thursday, Feb 26, 2026 by Pulumi
      Meet Neo: Your AI Platform Teammate