snowflake.core.secret.SecretResource¶
- class snowflake.core.secret.SecretResource(name: str, collection_class: SecretCollectionBase)¶
Bases:
SecretResourceBaseRepresents a reference to a Snowflake secret.
With this secret reference, you can fetch information about a secret, as well as perform certain actions on it.
Attributes
- database¶
The DatabaseResource this reference belongs to.
- fully_qualified_name¶
Return the fully qualified name of the object this reference points to.
- root¶
The Root object this reference belongs to.
Methods
- drop(if_exists: bool | None = None) None¶
Delete a secret.
- 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_async() PollingOperation[Secret]¶
An asynchronous version of
fetch().Refer to
PollingOperationfor more information on asynchronous execution and the return type.