You are viewing documentation about an older version (0.13.1). View latest version

snowflake.core.network_policy.NetworkPolicyResource¶

class snowflake.core.network_policy.NetworkPolicyResource(name: Annotated[str, Strict(strict=True)], collection: NetworkPolicyCollection)¶

Bases: ObjectReferenceMixin[NetworkPolicyCollection]

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¶

Methods

drop() → None¶

Drop this network policy.

Examples

Deleting a network policy using its reference:

>>> network_policy_reference.drop()
Copy
fetch() → NetworkPolicy¶

Fetch the details of a network policy.

Examples

Fetching a network policy reference to print its time of creation:

>>> print(network_policy_reference.fetch().created_on)
Copy