snowflake.core.api_integration.ApiIntegrationResourceΒΆ

class snowflake.core.api_integration.ApiIntegrationResource(name: Annotated[str, Strict(strict=True)], collection: ApiIntegrationCollection)ΒΆ

Bases: ApiIntegrationResourceBase

Represents 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 ApiIntegration object.

Examples

Creating a new API integration:

>>> root.api_integrations["my_api"].create_or_alter(my_api_def)
Copy

See ApiIntegrationCollection.create for more examples.

create_or_alter_async(api_integration: ApiIntegration) β†’ PollingOperation[None]ΒΆ

An asynchronous version of create_or_alter().

Refer to PollingOperation for 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 PollingOperation for 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 PollingOperation for more information on asynchronous execution and the return type.