snowflake.core.managed_account.ManagedAccountCollection¶
- class snowflake.core.managed_account.ManagedAccountCollection(root: Root)¶
Bases:
AccountObjectCollectionParent[ManagedAccountResource]Represents the collection operations of the Snowflake ManagedAccount resource.
With this collection, you can create, iterate through, and search for managed accounts that you have access to in the current context.
Examples
Creating a managed account instance:
Attributes
- root¶
The Root object this collection belongs to.
Methods
- create(managed_account: ManagedAccountModel) ManagedAccountResource¶
Create a managed account in Snowflake.
- Parameters:
managed_account (ManagedAccount)
Examples
Creating a managed account instance and getting reference to it:
- create_async(managed_account: ManagedAccountModel) PollingOperation[ManagedAccountResource]¶
An asynchronous version of
create().Refer to
PollingOperationfor more information on asynchronous execution and the return type.
- items() ItemsView[str, T]¶
- iter(*, like: str | None = None) Iterator[ManagedAccountModel]¶
Iterate through
ManagedAccountobjects in Snowflake, filtering on any optional like pattern.- Parameters:
like (str, optional) – A case-insensitive string functioning as a filter, with support for SQL wildcard characters (% and _).
Examples
Showing all managed accounts that you have access to see:
Showing information of the exact managed account you want to see:
Showing managed accounts starting with ‘your-managed-account-name-‘:
Using a for loop to retrieve information from iterator:
- iter_async(*, like: str | None = None) PollingOperation[Iterator[ManagedAccountModel]]¶
An asynchronous version of
iter().Refer to
PollingOperationfor more information on asynchronous execution and the return type.
- keys() KeysView[str]¶
- update_reference(old_name: str, new_name: str, resource: T) None¶
Update the collection with a new item.
- values() ValuesView[T]¶