snowflake.core.api_integration.ApiIntegrationCollectionΒΆ
- class snowflake.core.api_integration.ApiIntegrationCollection(root: Root)ΒΆ
Bases:
ApiIntegrationCollectionBaseRepresents the collection operations on the Snowflake api integration resource.
With this collection, you can create, iterate through, and search for api integration that you have access to in the current context.
Examples
Creating an ApiIntegration instance using AWS API Gateway:
>>> api_integrations = root.api_integrations >>> new_api_integration = ApiIntegration( ... name="name", ... api_hook=AwsHook( ... api_provider="AWS_API_GATEWAY", ... api_aws_role_arn="your_arn", ... api_key=os.environ.get("YOUR_API_KEY"), ... ), ... api_allowed_prefixes=["https://snowflake.com"], ... enabled=True, ... ) >>> api_integrations.create(new_api_integration)
Attributes
- rootΒΆ
The Root object this collection belongs to.
Methods
- create(api_integration: ApiIntegration, mode: CreateMode | str | None = None) ApiIntegrationResourceΒΆ
Create an API integration.
- Parameters:
api_integration (ApiIntegration) β (required)
mode (Union[CreateMode, str]) β Parameter allowing support for different modes of resource creation. Possible values include: - errorIfExists: Throws an error if you try to create a resource that already exists. - orReplace: Automatically replaces the existing resource with the current one. - ifNotExists: Creates a new resource when an alter is requested for a non-existent resource.
- create_async(api_integration: ApiIntegration, mode: CreateMode | str | None = None) PollingOperation[ApiIntegrationResource]ΒΆ
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[ApiIntegration]ΒΆ
List API integrations.
- Parameters:
like (str) β Parameter to filter the command output by resource name. Uses case-insensitive pattern matching, with support for SQL wildcard characters.
- iter_async(*, like: str | None = None) PollingOperation[Iterator[ApiIntegration]]ΒΆ
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]ΒΆ