snowflake.core.network_policy.NetworkPolicyResource¶
- class snowflake.core.network_policy.NetworkPolicyResource(name: str, collection_class: NetworkPolicyCollectionBase)¶
- Bases: - NetworkPolicyResourceBase- Represents a reference to a Snowflake Network Policy resource. - With this network policy reference, you can create, update, and fetch information about network policies, as well as perform certain actions on them. - Attributes - root¶
- The Root object this reference belongs to. 
 - Methods - drop(if_exists: bool | None = None) None¶
- Delete a network policy. - Parameters:
- if_exists (bool) – Parameter that specifies how to handle the request for a resource that does not exist: - true: The endpoint does not throw an error if the resource does not exist. It returns a 200 success response, but does not take any action on the resource. - false: The endpoint throws an error if the resource doesn’t exist. 
 
 - drop_async(if_exists: bool | None = None) PollingOperation[None]¶
- An asynchronous version of - drop().- Refer to - PollingOperationfor more information on asynchronous execution and the return type.
 - fetch() NetworkPolicy¶
- Fetch a network policy. 
 - fetch_async() PollingOperation[NetworkPolicy]¶
- An asynchronous version of - fetch().- Refer to - PollingOperationfor more information on asynchronous execution and the return type.