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 fetch information about a network policy, as well as perform certain actions on it.

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 PollingOperation for 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 PollingOperation for more information on asynchronous execution and the return type.

Language: English