snowflake.core.api_integration.ApiIntegrationResourceΒΆ
- class snowflake.core.api_integration.ApiIntegrationResource(name: Annotated[str, Strict(strict=True)], collection: ApiIntegrationCollection)ΒΆ
Bases:
ApiIntegrationResourceBaseRepresents a reference to a Snowflake api integration.
With this api integration reference, you can create, update, delete and fetch information about api integrations, as well as perform certain actions on them.
Attributes
- rootΒΆ
The Root object this reference belongs to.
Methods
- create_or_alter(api_integration: ApiIntegration) NoneΒΆ
Create or alter an API integration.
The operation is limited by the fact that api_key will not be updated and api_blocked_prefixes cannot be unset.
- Parameters:
api_integration (ApiIntegration) β The
ApiIntegrationobject.
Examples
Creating a new API integration:
>>> root.api_integrations["my_api"].create_or_alter(my_api_def)
See
ApiIntegrationCollection.createfor more examples.
- create_or_alter_async(api_integration: ApiIntegration) PollingOperation[None]ΒΆ
An asynchronous version of
create_or_alter().Refer to
PollingOperationfor more information on asynchronous execution and the return type.
- drop(if_exists: bool | None = None) NoneΒΆ
Delete an API integration.
- 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() ApiIntegrationΒΆ
Fetch an API integration.
- fetch_async() PollingOperation[ApiIntegration]ΒΆ
An asynchronous version of
fetch().Refer to
PollingOperationfor more information on asynchronous execution and the return type.