1. Packages
  2. Snowflake Provider
  3. API Docs
  4. NetworkRule
Snowflake v0.61.1 published on Thursday, Nov 14, 2024 by Pulumi

snowflake.NetworkRule

Explore with Pulumi AI

snowflake logo
Snowflake v0.61.1 published on Thursday, Nov 14, 2024 by Pulumi

    Import

    $ pulumi import snowflake:index/networkRule:NetworkRule example 'databaseName|schemaName|networkRuleName'
    

    Create NetworkRule Resource

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

    Constructor syntax

    new NetworkRule(name: string, args: NetworkRuleArgs, opts?: CustomResourceOptions);
    @overload
    def NetworkRule(resource_name: str,
                    args: NetworkRuleArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def NetworkRule(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    database: Optional[str] = None,
                    mode: Optional[str] = None,
                    schema: Optional[str] = None,
                    type: Optional[str] = None,
                    value_lists: Optional[Sequence[str]] = None,
                    comment: Optional[str] = None,
                    name: Optional[str] = None)
    func NewNetworkRule(ctx *Context, name string, args NetworkRuleArgs, opts ...ResourceOption) (*NetworkRule, error)
    public NetworkRule(string name, NetworkRuleArgs args, CustomResourceOptions? opts = null)
    public NetworkRule(String name, NetworkRuleArgs args)
    public NetworkRule(String name, NetworkRuleArgs args, CustomResourceOptions options)
    
    type: snowflake:NetworkRule
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args NetworkRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args NetworkRuleArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args NetworkRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NetworkRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NetworkRuleArgs
    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 networkRuleResource = new Snowflake.NetworkRule("networkRuleResource", new()
    {
        Database = "string",
        Mode = "string",
        Schema = "string",
        Type = "string",
        ValueLists = new[]
        {
            "string",
        },
        Comment = "string",
        Name = "string",
    });
    
    example, err := snowflake.NewNetworkRule(ctx, "networkRuleResource", &snowflake.NetworkRuleArgs{
    	Database: pulumi.String("string"),
    	Mode:     pulumi.String("string"),
    	Schema:   pulumi.String("string"),
    	Type:     pulumi.String("string"),
    	ValueLists: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Comment: pulumi.String("string"),
    	Name:    pulumi.String("string"),
    })
    
    var networkRuleResource = new NetworkRule("networkRuleResource", NetworkRuleArgs.builder()
        .database("string")
        .mode("string")
        .schema("string")
        .type("string")
        .valueLists("string")
        .comment("string")
        .name("string")
        .build());
    
    network_rule_resource = snowflake.NetworkRule("networkRuleResource",
        database="string",
        mode="string",
        schema="string",
        type="string",
        value_lists=["string"],
        comment="string",
        name="string")
    
    const networkRuleResource = new snowflake.NetworkRule("networkRuleResource", {
        database: "string",
        mode: "string",
        schema: "string",
        type: "string",
        valueLists: ["string"],
        comment: "string",
        name: "string",
    });
    
    type: snowflake:NetworkRule
    properties:
        comment: string
        database: string
        mode: string
        name: string
        schema: string
        type: string
        valueLists:
            - string
    

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

    Database string
    The database in which to create the network rule.
    Mode string
    Specifies what is restricted by the network rule. Valid values are INGRESS, INTERNAL_STAGE and EGRESS; see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    Schema string
    The schema in which to create the network rule.
    Type string
    Specifies the type of network identifiers being allowed or blocked. A network rule can have only one type. Allowed values are IPV4, AWSVPCEID, AZURELINKID and HOST_PORT; allowed values are determined by the mode of the network rule; see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    ValueLists List<string>
    Specifies the network identifiers that will be allowed or blocked. Valid values in the list are determined by the type of network rule, see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    Comment string
    Specifies a comment for the network rule.
    Name string
    Specifies the identifier for the network rule; must be unique for the database and schema in which the network rule is created.
    Database string
    The database in which to create the network rule.
    Mode string
    Specifies what is restricted by the network rule. Valid values are INGRESS, INTERNAL_STAGE and EGRESS; see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    Schema string
    The schema in which to create the network rule.
    Type string
    Specifies the type of network identifiers being allowed or blocked. A network rule can have only one type. Allowed values are IPV4, AWSVPCEID, AZURELINKID and HOST_PORT; allowed values are determined by the mode of the network rule; see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    ValueLists []string
    Specifies the network identifiers that will be allowed or blocked. Valid values in the list are determined by the type of network rule, see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    Comment string
    Specifies a comment for the network rule.
    Name string
    Specifies the identifier for the network rule; must be unique for the database and schema in which the network rule is created.
    database String
    The database in which to create the network rule.
    mode String
    Specifies what is restricted by the network rule. Valid values are INGRESS, INTERNAL_STAGE and EGRESS; see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    schema String
    The schema in which to create the network rule.
    type String
    Specifies the type of network identifiers being allowed or blocked. A network rule can have only one type. Allowed values are IPV4, AWSVPCEID, AZURELINKID and HOST_PORT; allowed values are determined by the mode of the network rule; see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    valueLists List<String>
    Specifies the network identifiers that will be allowed or blocked. Valid values in the list are determined by the type of network rule, see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    comment String
    Specifies a comment for the network rule.
    name String
    Specifies the identifier for the network rule; must be unique for the database and schema in which the network rule is created.
    database string
    The database in which to create the network rule.
    mode string
    Specifies what is restricted by the network rule. Valid values are INGRESS, INTERNAL_STAGE and EGRESS; see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    schema string
    The schema in which to create the network rule.
    type string
    Specifies the type of network identifiers being allowed or blocked. A network rule can have only one type. Allowed values are IPV4, AWSVPCEID, AZURELINKID and HOST_PORT; allowed values are determined by the mode of the network rule; see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    valueLists string[]
    Specifies the network identifiers that will be allowed or blocked. Valid values in the list are determined by the type of network rule, see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    comment string
    Specifies a comment for the network rule.
    name string
    Specifies the identifier for the network rule; must be unique for the database and schema in which the network rule is created.
    database str
    The database in which to create the network rule.
    mode str
    Specifies what is restricted by the network rule. Valid values are INGRESS, INTERNAL_STAGE and EGRESS; see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    schema str
    The schema in which to create the network rule.
    type str
    Specifies the type of network identifiers being allowed or blocked. A network rule can have only one type. Allowed values are IPV4, AWSVPCEID, AZURELINKID and HOST_PORT; allowed values are determined by the mode of the network rule; see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    value_lists Sequence[str]
    Specifies the network identifiers that will be allowed or blocked. Valid values in the list are determined by the type of network rule, see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    comment str
    Specifies a comment for the network rule.
    name str
    Specifies the identifier for the network rule; must be unique for the database and schema in which the network rule is created.
    database String
    The database in which to create the network rule.
    mode String
    Specifies what is restricted by the network rule. Valid values are INGRESS, INTERNAL_STAGE and EGRESS; see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    schema String
    The schema in which to create the network rule.
    type String
    Specifies the type of network identifiers being allowed or blocked. A network rule can have only one type. Allowed values are IPV4, AWSVPCEID, AZURELINKID and HOST_PORT; allowed values are determined by the mode of the network rule; see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    valueLists List<String>
    Specifies the network identifiers that will be allowed or blocked. Valid values in the list are determined by the type of network rule, see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    comment String
    Specifies a comment for the network rule.
    name String
    Specifies the identifier for the network rule; must be unique for the database and schema in which the network rule is created.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the NetworkRule 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 NetworkRule Resource

    Get an existing NetworkRule 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?: NetworkRuleState, opts?: CustomResourceOptions): NetworkRule
    @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,
            mode: Optional[str] = None,
            name: Optional[str] = None,
            schema: Optional[str] = None,
            type: Optional[str] = None,
            value_lists: Optional[Sequence[str]] = None) -> NetworkRule
    func GetNetworkRule(ctx *Context, name string, id IDInput, state *NetworkRuleState, opts ...ResourceOption) (*NetworkRule, error)
    public static NetworkRule Get(string name, Input<string> id, NetworkRuleState? state, CustomResourceOptions? opts = null)
    public static NetworkRule get(String name, Output<String> id, NetworkRuleState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Comment string
    Specifies a comment for the network rule.
    Database string
    The database in which to create the network rule.
    FullyQualifiedName string
    Fully qualified name of the resource. For more information, see object name resolution.
    Mode string
    Specifies what is restricted by the network rule. Valid values are INGRESS, INTERNAL_STAGE and EGRESS; see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    Name string
    Specifies the identifier for the network rule; must be unique for the database and schema in which the network rule is created.
    Schema string
    The schema in which to create the network rule.
    Type string
    Specifies the type of network identifiers being allowed or blocked. A network rule can have only one type. Allowed values are IPV4, AWSVPCEID, AZURELINKID and HOST_PORT; allowed values are determined by the mode of the network rule; see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    ValueLists List<string>
    Specifies the network identifiers that will be allowed or blocked. Valid values in the list are determined by the type of network rule, see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    Comment string
    Specifies a comment for the network rule.
    Database string
    The database in which to create the network rule.
    FullyQualifiedName string
    Fully qualified name of the resource. For more information, see object name resolution.
    Mode string
    Specifies what is restricted by the network rule. Valid values are INGRESS, INTERNAL_STAGE and EGRESS; see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    Name string
    Specifies the identifier for the network rule; must be unique for the database and schema in which the network rule is created.
    Schema string
    The schema in which to create the network rule.
    Type string
    Specifies the type of network identifiers being allowed or blocked. A network rule can have only one type. Allowed values are IPV4, AWSVPCEID, AZURELINKID and HOST_PORT; allowed values are determined by the mode of the network rule; see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    ValueLists []string
    Specifies the network identifiers that will be allowed or blocked. Valid values in the list are determined by the type of network rule, see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    comment String
    Specifies a comment for the network rule.
    database String
    The database in which to create the network rule.
    fullyQualifiedName String
    Fully qualified name of the resource. For more information, see object name resolution.
    mode String
    Specifies what is restricted by the network rule. Valid values are INGRESS, INTERNAL_STAGE and EGRESS; see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    name String
    Specifies the identifier for the network rule; must be unique for the database and schema in which the network rule is created.
    schema String
    The schema in which to create the network rule.
    type String
    Specifies the type of network identifiers being allowed or blocked. A network rule can have only one type. Allowed values are IPV4, AWSVPCEID, AZURELINKID and HOST_PORT; allowed values are determined by the mode of the network rule; see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    valueLists List<String>
    Specifies the network identifiers that will be allowed or blocked. Valid values in the list are determined by the type of network rule, see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    comment string
    Specifies a comment for the network rule.
    database string
    The database in which to create the network rule.
    fullyQualifiedName string
    Fully qualified name of the resource. For more information, see object name resolution.
    mode string
    Specifies what is restricted by the network rule. Valid values are INGRESS, INTERNAL_STAGE and EGRESS; see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    name string
    Specifies the identifier for the network rule; must be unique for the database and schema in which the network rule is created.
    schema string
    The schema in which to create the network rule.
    type string
    Specifies the type of network identifiers being allowed or blocked. A network rule can have only one type. Allowed values are IPV4, AWSVPCEID, AZURELINKID and HOST_PORT; allowed values are determined by the mode of the network rule; see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    valueLists string[]
    Specifies the network identifiers that will be allowed or blocked. Valid values in the list are determined by the type of network rule, see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    comment str
    Specifies a comment for the network rule.
    database str
    The database in which to create the network rule.
    fully_qualified_name str
    Fully qualified name of the resource. For more information, see object name resolution.
    mode str
    Specifies what is restricted by the network rule. Valid values are INGRESS, INTERNAL_STAGE and EGRESS; see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    name str
    Specifies the identifier for the network rule; must be unique for the database and schema in which the network rule is created.
    schema str
    The schema in which to create the network rule.
    type str
    Specifies the type of network identifiers being allowed or blocked. A network rule can have only one type. Allowed values are IPV4, AWSVPCEID, AZURELINKID and HOST_PORT; allowed values are determined by the mode of the network rule; see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    value_lists Sequence[str]
    Specifies the network identifiers that will be allowed or blocked. Valid values in the list are determined by the type of network rule, see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    comment String
    Specifies a comment for the network rule.
    database String
    The database in which to create the network rule.
    fullyQualifiedName String
    Fully qualified name of the resource. For more information, see object name resolution.
    mode String
    Specifies what is restricted by the network rule. Valid values are INGRESS, INTERNAL_STAGE and EGRESS; see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    name String
    Specifies the identifier for the network rule; must be unique for the database and schema in which the network rule is created.
    schema String
    The schema in which to create the network rule.
    type String
    Specifies the type of network identifiers being allowed or blocked. A network rule can have only one type. Allowed values are IPV4, AWSVPCEID, AZURELINKID and HOST_PORT; allowed values are determined by the mode of the network rule; see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    valueLists List<String>
    Specifies the network identifiers that will be allowed or blocked. Valid values in the list are determined by the type of network rule, see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.

    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 v0.61.1 published on Thursday, Nov 14, 2024 by Pulumi