snowflake.NetworkPolicy
Explore with Pulumi AI
Import
$ pulumi import snowflake:index/networkPolicy:NetworkPolicy example "name"
Create NetworkPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NetworkPolicy(name: string, args?: NetworkPolicyArgs, opts?: CustomResourceOptions);
@overload
def NetworkPolicy(resource_name: str,
args: Optional[NetworkPolicyArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def NetworkPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
allowed_ip_lists: Optional[Sequence[str]] = None,
allowed_network_rule_lists: Optional[Sequence[str]] = None,
blocked_ip_lists: Optional[Sequence[str]] = None,
blocked_network_rule_lists: Optional[Sequence[str]] = None,
comment: Optional[str] = None,
name: Optional[str] = None)
func NewNetworkPolicy(ctx *Context, name string, args *NetworkPolicyArgs, opts ...ResourceOption) (*NetworkPolicy, error)
public NetworkPolicy(string name, NetworkPolicyArgs? args = null, CustomResourceOptions? opts = null)
public NetworkPolicy(String name, NetworkPolicyArgs args)
public NetworkPolicy(String name, NetworkPolicyArgs args, CustomResourceOptions options)
type: snowflake:NetworkPolicy
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 NetworkPolicyArgs
- 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 NetworkPolicyArgs
- 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 NetworkPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NetworkPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NetworkPolicyArgs
- 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 networkPolicyResource = new Snowflake.NetworkPolicy("networkPolicyResource", new()
{
AllowedIpLists = new[]
{
"string",
},
AllowedNetworkRuleLists = new[]
{
"string",
},
BlockedIpLists = new[]
{
"string",
},
BlockedNetworkRuleLists = new[]
{
"string",
},
Comment = "string",
Name = "string",
});
example, err := snowflake.NewNetworkPolicy(ctx, "networkPolicyResource", &snowflake.NetworkPolicyArgs{
AllowedIpLists: pulumi.StringArray{
pulumi.String("string"),
},
AllowedNetworkRuleLists: pulumi.StringArray{
pulumi.String("string"),
},
BlockedIpLists: pulumi.StringArray{
pulumi.String("string"),
},
BlockedNetworkRuleLists: pulumi.StringArray{
pulumi.String("string"),
},
Comment: pulumi.String("string"),
Name: pulumi.String("string"),
})
var networkPolicyResource = new NetworkPolicy("networkPolicyResource", NetworkPolicyArgs.builder()
.allowedIpLists("string")
.allowedNetworkRuleLists("string")
.blockedIpLists("string")
.blockedNetworkRuleLists("string")
.comment("string")
.name("string")
.build());
network_policy_resource = snowflake.NetworkPolicy("networkPolicyResource",
allowed_ip_lists=["string"],
allowed_network_rule_lists=["string"],
blocked_ip_lists=["string"],
blocked_network_rule_lists=["string"],
comment="string",
name="string")
const networkPolicyResource = new snowflake.NetworkPolicy("networkPolicyResource", {
allowedIpLists: ["string"],
allowedNetworkRuleLists: ["string"],
blockedIpLists: ["string"],
blockedNetworkRuleLists: ["string"],
comment: "string",
name: "string",
});
type: snowflake:NetworkPolicy
properties:
allowedIpLists:
- string
allowedNetworkRuleLists:
- string
blockedIpLists:
- string
blockedNetworkRuleLists:
- string
comment: string
name: string
NetworkPolicy 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 NetworkPolicy resource accepts the following input properties:
- Allowed
Ip List<string>Lists - Specifies one or more IPv4 addresses (CIDR notation) that are allowed access to your Snowflake account.
- Allowed
Network List<string>Rule Lists - Specifies a list of fully qualified network rules that contain the network identifiers that are allowed access to Snowflake.
- Blocked
Ip List<string>Lists - Specifies one or more IPv4 addresses (CIDR notation) that are denied access to your Snowflake account. Do not add
0.0.0.0/0
toblocked_ip_list
, in order to block all IP addresses except a select list, you only need to add IP addresses toallowed_ip_list
. - Blocked
Network List<string>Rule Lists - Specifies a list of fully qualified network rules that contain the network identifiers that are denied access to Snowflake.
- Comment string
- Specifies a comment for the network policy.
- Name string
- Specifies the identifier for the network policy; must be unique for the account in which the network policy is created. Due to technical limitations (read more here), avoid using the following characters:
|
,.
,(
,)
,"
- Allowed
Ip []stringLists - Specifies one or more IPv4 addresses (CIDR notation) that are allowed access to your Snowflake account.
- Allowed
Network []stringRule Lists - Specifies a list of fully qualified network rules that contain the network identifiers that are allowed access to Snowflake.
- Blocked
Ip []stringLists - Specifies one or more IPv4 addresses (CIDR notation) that are denied access to your Snowflake account. Do not add
0.0.0.0/0
toblocked_ip_list
, in order to block all IP addresses except a select list, you only need to add IP addresses toallowed_ip_list
. - Blocked
Network []stringRule Lists - Specifies a list of fully qualified network rules that contain the network identifiers that are denied access to Snowflake.
- Comment string
- Specifies a comment for the network policy.
- Name string
- Specifies the identifier for the network policy; must be unique for the account in which the network policy is created. Due to technical limitations (read more here), avoid using the following characters:
|
,.
,(
,)
,"
- allowed
Ip List<String>Lists - Specifies one or more IPv4 addresses (CIDR notation) that are allowed access to your Snowflake account.
- allowed
Network List<String>Rule Lists - Specifies a list of fully qualified network rules that contain the network identifiers that are allowed access to Snowflake.
- blocked
Ip List<String>Lists - Specifies one or more IPv4 addresses (CIDR notation) that are denied access to your Snowflake account. Do not add
0.0.0.0/0
toblocked_ip_list
, in order to block all IP addresses except a select list, you only need to add IP addresses toallowed_ip_list
. - blocked
Network List<String>Rule Lists - Specifies a list of fully qualified network rules that contain the network identifiers that are denied access to Snowflake.
- comment String
- Specifies a comment for the network policy.
- name String
- Specifies the identifier for the network policy; must be unique for the account in which the network policy is created. Due to technical limitations (read more here), avoid using the following characters:
|
,.
,(
,)
,"
- allowed
Ip string[]Lists - Specifies one or more IPv4 addresses (CIDR notation) that are allowed access to your Snowflake account.
- allowed
Network string[]Rule Lists - Specifies a list of fully qualified network rules that contain the network identifiers that are allowed access to Snowflake.
- blocked
Ip string[]Lists - Specifies one or more IPv4 addresses (CIDR notation) that are denied access to your Snowflake account. Do not add
0.0.0.0/0
toblocked_ip_list
, in order to block all IP addresses except a select list, you only need to add IP addresses toallowed_ip_list
. - blocked
Network string[]Rule Lists - Specifies a list of fully qualified network rules that contain the network identifiers that are denied access to Snowflake.
- comment string
- Specifies a comment for the network policy.
- name string
- Specifies the identifier for the network policy; must be unique for the account in which the network policy is created. Due to technical limitations (read more here), avoid using the following characters:
|
,.
,(
,)
,"
- allowed_
ip_ Sequence[str]lists - Specifies one or more IPv4 addresses (CIDR notation) that are allowed access to your Snowflake account.
- allowed_
network_ Sequence[str]rule_ lists - Specifies a list of fully qualified network rules that contain the network identifiers that are allowed access to Snowflake.
- blocked_
ip_ Sequence[str]lists - Specifies one or more IPv4 addresses (CIDR notation) that are denied access to your Snowflake account. Do not add
0.0.0.0/0
toblocked_ip_list
, in order to block all IP addresses except a select list, you only need to add IP addresses toallowed_ip_list
. - blocked_
network_ Sequence[str]rule_ lists - Specifies a list of fully qualified network rules that contain the network identifiers that are denied access to Snowflake.
- comment str
- Specifies a comment for the network policy.
- name str
- Specifies the identifier for the network policy; must be unique for the account in which the network policy is created. Due to technical limitations (read more here), avoid using the following characters:
|
,.
,(
,)
,"
- allowed
Ip List<String>Lists - Specifies one or more IPv4 addresses (CIDR notation) that are allowed access to your Snowflake account.
- allowed
Network List<String>Rule Lists - Specifies a list of fully qualified network rules that contain the network identifiers that are allowed access to Snowflake.
- blocked
Ip List<String>Lists - Specifies one or more IPv4 addresses (CIDR notation) that are denied access to your Snowflake account. Do not add
0.0.0.0/0
toblocked_ip_list
, in order to block all IP addresses except a select list, you only need to add IP addresses toallowed_ip_list
. - blocked
Network List<String>Rule Lists - Specifies a list of fully qualified network rules that contain the network identifiers that are denied access to Snowflake.
- comment String
- Specifies a comment for the network policy.
- name String
- Specifies the identifier for the network policy; must be unique for the account in which the network policy is created. Due to technical limitations (read more here), avoid using the following characters:
|
,.
,(
,)
,"
Outputs
All input properties are implicitly available as output properties. Additionally, the NetworkPolicy resource produces the following output properties:
- Describe
Outputs List<NetworkPolicy Describe Output> - Outputs the result of
DESCRIBE NETWORK POLICY
for the given network policy. - Fully
Qualified stringName - Fully qualified name of the resource. For more information, see object name resolution.
- Id string
- The provider-assigned unique ID for this managed resource.
- Show
Outputs List<NetworkPolicy Show Output> - Outputs the result of
SHOW NETWORK POLICIES
for the given network policy.
- Describe
Outputs []NetworkPolicy Describe Output - Outputs the result of
DESCRIBE NETWORK POLICY
for the given network policy. - Fully
Qualified stringName - Fully qualified name of the resource. For more information, see object name resolution.
- Id string
- The provider-assigned unique ID for this managed resource.
- Show
Outputs []NetworkPolicy Show Output - Outputs the result of
SHOW NETWORK POLICIES
for the given network policy.
- describe
Outputs List<NetworkPolicy Describe Output> - Outputs the result of
DESCRIBE NETWORK POLICY
for the given network policy. - fully
Qualified StringName - Fully qualified name of the resource. For more information, see object name resolution.
- id String
- The provider-assigned unique ID for this managed resource.
- show
Outputs List<NetworkPolicy Show Output> - Outputs the result of
SHOW NETWORK POLICIES
for the given network policy.
- describe
Outputs NetworkPolicy Describe Output[] - Outputs the result of
DESCRIBE NETWORK POLICY
for the given network policy. - fully
Qualified stringName - Fully qualified name of the resource. For more information, see object name resolution.
- id string
- The provider-assigned unique ID for this managed resource.
- show
Outputs NetworkPolicy Show Output[] - Outputs the result of
SHOW NETWORK POLICIES
for the given network policy.
- describe_
outputs Sequence[NetworkPolicy Describe Output] - Outputs the result of
DESCRIBE NETWORK POLICY
for the given network policy. - fully_
qualified_ strname - Fully qualified name of the resource. For more information, see object name resolution.
- id str
- The provider-assigned unique ID for this managed resource.
- show_
outputs Sequence[NetworkPolicy Show Output] - Outputs the result of
SHOW NETWORK POLICIES
for the given network policy.
- describe
Outputs List<Property Map> - Outputs the result of
DESCRIBE NETWORK POLICY
for the given network policy. - fully
Qualified StringName - Fully qualified name of the resource. For more information, see object name resolution.
- id String
- The provider-assigned unique ID for this managed resource.
- show
Outputs List<Property Map> - Outputs the result of
SHOW NETWORK POLICIES
for the given network policy.
Look up Existing NetworkPolicy Resource
Get an existing NetworkPolicy 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?: NetworkPolicyState, opts?: CustomResourceOptions): NetworkPolicy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
allowed_ip_lists: Optional[Sequence[str]] = None,
allowed_network_rule_lists: Optional[Sequence[str]] = None,
blocked_ip_lists: Optional[Sequence[str]] = None,
blocked_network_rule_lists: Optional[Sequence[str]] = None,
comment: Optional[str] = None,
describe_outputs: Optional[Sequence[NetworkPolicyDescribeOutputArgs]] = None,
fully_qualified_name: Optional[str] = None,
name: Optional[str] = None,
show_outputs: Optional[Sequence[NetworkPolicyShowOutputArgs]] = None) -> NetworkPolicy
func GetNetworkPolicy(ctx *Context, name string, id IDInput, state *NetworkPolicyState, opts ...ResourceOption) (*NetworkPolicy, error)
public static NetworkPolicy Get(string name, Input<string> id, NetworkPolicyState? state, CustomResourceOptions? opts = null)
public static NetworkPolicy get(String name, Output<String> id, NetworkPolicyState 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.
- Allowed
Ip List<string>Lists - Specifies one or more IPv4 addresses (CIDR notation) that are allowed access to your Snowflake account.
- Allowed
Network List<string>Rule Lists - Specifies a list of fully qualified network rules that contain the network identifiers that are allowed access to Snowflake.
- Blocked
Ip List<string>Lists - Specifies one or more IPv4 addresses (CIDR notation) that are denied access to your Snowflake account. Do not add
0.0.0.0/0
toblocked_ip_list
, in order to block all IP addresses except a select list, you only need to add IP addresses toallowed_ip_list
. - Blocked
Network List<string>Rule Lists - Specifies a list of fully qualified network rules that contain the network identifiers that are denied access to Snowflake.
- Comment string
- Specifies a comment for the network policy.
- Describe
Outputs List<NetworkPolicy Describe Output> - Outputs the result of
DESCRIBE NETWORK POLICY
for the given network policy. - Fully
Qualified stringName - Fully qualified name of the resource. For more information, see object name resolution.
- Name string
- Specifies the identifier for the network policy; must be unique for the account in which the network policy is created. Due to technical limitations (read more here), avoid using the following characters:
|
,.
,(
,)
,"
- Show
Outputs List<NetworkPolicy Show Output> - Outputs the result of
SHOW NETWORK POLICIES
for the given network policy.
- Allowed
Ip []stringLists - Specifies one or more IPv4 addresses (CIDR notation) that are allowed access to your Snowflake account.
- Allowed
Network []stringRule Lists - Specifies a list of fully qualified network rules that contain the network identifiers that are allowed access to Snowflake.
- Blocked
Ip []stringLists - Specifies one or more IPv4 addresses (CIDR notation) that are denied access to your Snowflake account. Do not add
0.0.0.0/0
toblocked_ip_list
, in order to block all IP addresses except a select list, you only need to add IP addresses toallowed_ip_list
. - Blocked
Network []stringRule Lists - Specifies a list of fully qualified network rules that contain the network identifiers that are denied access to Snowflake.
- Comment string
- Specifies a comment for the network policy.
- Describe
Outputs []NetworkPolicy Describe Output Args - Outputs the result of
DESCRIBE NETWORK POLICY
for the given network policy. - Fully
Qualified stringName - Fully qualified name of the resource. For more information, see object name resolution.
- Name string
- Specifies the identifier for the network policy; must be unique for the account in which the network policy is created. Due to technical limitations (read more here), avoid using the following characters:
|
,.
,(
,)
,"
- Show
Outputs []NetworkPolicy Show Output Args - Outputs the result of
SHOW NETWORK POLICIES
for the given network policy.
- allowed
Ip List<String>Lists - Specifies one or more IPv4 addresses (CIDR notation) that are allowed access to your Snowflake account.
- allowed
Network List<String>Rule Lists - Specifies a list of fully qualified network rules that contain the network identifiers that are allowed access to Snowflake.
- blocked
Ip List<String>Lists - Specifies one or more IPv4 addresses (CIDR notation) that are denied access to your Snowflake account. Do not add
0.0.0.0/0
toblocked_ip_list
, in order to block all IP addresses except a select list, you only need to add IP addresses toallowed_ip_list
. - blocked
Network List<String>Rule Lists - Specifies a list of fully qualified network rules that contain the network identifiers that are denied access to Snowflake.
- comment String
- Specifies a comment for the network policy.
- describe
Outputs List<NetworkPolicy Describe Output> - Outputs the result of
DESCRIBE NETWORK POLICY
for the given network policy. - fully
Qualified StringName - Fully qualified name of the resource. For more information, see object name resolution.
- name String
- Specifies the identifier for the network policy; must be unique for the account in which the network policy is created. Due to technical limitations (read more here), avoid using the following characters:
|
,.
,(
,)
,"
- show
Outputs List<NetworkPolicy Show Output> - Outputs the result of
SHOW NETWORK POLICIES
for the given network policy.
- allowed
Ip string[]Lists - Specifies one or more IPv4 addresses (CIDR notation) that are allowed access to your Snowflake account.
- allowed
Network string[]Rule Lists - Specifies a list of fully qualified network rules that contain the network identifiers that are allowed access to Snowflake.
- blocked
Ip string[]Lists - Specifies one or more IPv4 addresses (CIDR notation) that are denied access to your Snowflake account. Do not add
0.0.0.0/0
toblocked_ip_list
, in order to block all IP addresses except a select list, you only need to add IP addresses toallowed_ip_list
. - blocked
Network string[]Rule Lists - Specifies a list of fully qualified network rules that contain the network identifiers that are denied access to Snowflake.
- comment string
- Specifies a comment for the network policy.
- describe
Outputs NetworkPolicy Describe Output[] - Outputs the result of
DESCRIBE NETWORK POLICY
for the given network policy. - fully
Qualified stringName - Fully qualified name of the resource. For more information, see object name resolution.
- name string
- Specifies the identifier for the network policy; must be unique for the account in which the network policy is created. Due to technical limitations (read more here), avoid using the following characters:
|
,.
,(
,)
,"
- show
Outputs NetworkPolicy Show Output[] - Outputs the result of
SHOW NETWORK POLICIES
for the given network policy.
- allowed_
ip_ Sequence[str]lists - Specifies one or more IPv4 addresses (CIDR notation) that are allowed access to your Snowflake account.
- allowed_
network_ Sequence[str]rule_ lists - Specifies a list of fully qualified network rules that contain the network identifiers that are allowed access to Snowflake.
- blocked_
ip_ Sequence[str]lists - Specifies one or more IPv4 addresses (CIDR notation) that are denied access to your Snowflake account. Do not add
0.0.0.0/0
toblocked_ip_list
, in order to block all IP addresses except a select list, you only need to add IP addresses toallowed_ip_list
. - blocked_
network_ Sequence[str]rule_ lists - Specifies a list of fully qualified network rules that contain the network identifiers that are denied access to Snowflake.
- comment str
- Specifies a comment for the network policy.
- describe_
outputs Sequence[NetworkPolicy Describe Output Args] - Outputs the result of
DESCRIBE NETWORK POLICY
for the given network policy. - fully_
qualified_ strname - Fully qualified name of the resource. For more information, see object name resolution.
- name str
- Specifies the identifier for the network policy; must be unique for the account in which the network policy is created. Due to technical limitations (read more here), avoid using the following characters:
|
,.
,(
,)
,"
- show_
outputs Sequence[NetworkPolicy Show Output Args] - Outputs the result of
SHOW NETWORK POLICIES
for the given network policy.
- allowed
Ip List<String>Lists - Specifies one or more IPv4 addresses (CIDR notation) that are allowed access to your Snowflake account.
- allowed
Network List<String>Rule Lists - Specifies a list of fully qualified network rules that contain the network identifiers that are allowed access to Snowflake.
- blocked
Ip List<String>Lists - Specifies one or more IPv4 addresses (CIDR notation) that are denied access to your Snowflake account. Do not add
0.0.0.0/0
toblocked_ip_list
, in order to block all IP addresses except a select list, you only need to add IP addresses toallowed_ip_list
. - blocked
Network List<String>Rule Lists - Specifies a list of fully qualified network rules that contain the network identifiers that are denied access to Snowflake.
- comment String
- Specifies a comment for the network policy.
- describe
Outputs List<Property Map> - Outputs the result of
DESCRIBE NETWORK POLICY
for the given network policy. - fully
Qualified StringName - Fully qualified name of the resource. For more information, see object name resolution.
- name String
- Specifies the identifier for the network policy; must be unique for the account in which the network policy is created. Due to technical limitations (read more here), avoid using the following characters:
|
,.
,(
,)
,"
- show
Outputs List<Property Map> - Outputs the result of
SHOW NETWORK POLICIES
for the given network policy.
Supporting Types
NetworkPolicyDescribeOutput, NetworkPolicyDescribeOutputArgs
- Allowed
Ip stringList - Allowed
Network stringRule List - Blocked
Ip stringList - Blocked
Network stringRule List
- Allowed
Ip stringList - Allowed
Network stringRule List - Blocked
Ip stringList - Blocked
Network stringRule List
- allowed
Ip StringList - allowed
Network StringRule List - blocked
Ip StringList - blocked
Network StringRule List
- allowed
Ip stringList - allowed
Network stringRule List - blocked
Ip stringList - blocked
Network stringRule List
- allowed
Ip StringList - allowed
Network StringRule List - blocked
Ip StringList - blocked
Network StringRule List
NetworkPolicyShowOutput, NetworkPolicyShowOutputArgs
- Comment string
- Created
On string - Entries
In intAllowed Ip List - Entries
In intAllowed Network Rules - Entries
In intBlocked Ip List - Entries
In intBlocked Network Rules - Name string
- Comment string
- Created
On string - Entries
In intAllowed Ip List - Entries
In intAllowed Network Rules - Entries
In intBlocked Ip List - Entries
In intBlocked Network Rules - Name string
- comment String
- created
On String - entries
In IntegerAllowed Ip List - entries
In IntegerAllowed Network Rules - entries
In IntegerBlocked Ip List - entries
In IntegerBlocked Network Rules - name String
- comment string
- created
On string - entries
In numberAllowed Ip List - entries
In numberAllowed Network Rules - entries
In numberBlocked Ip List - entries
In numberBlocked Network Rules - name string
- comment String
- created
On String - entries
In NumberAllowed Ip List - entries
In NumberAllowed Network Rules - entries
In NumberBlocked Ip List - entries
In NumberBlocked Network Rules - name String
Package Details
- Repository
- Snowflake pulumi/pulumi-snowflake
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
snowflake
Terraform Provider.