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 fetch information about an api integration, as well as perform certain actions on it.
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.
- get_tags(with_lineage: bool | None = None) dict[TagResource, TagValue]¶
Get the tag assignments for an API integration.
Returns all tags assigned to an API integration. This operation requires an active warehouse.
- Parameters:
with_lineage (bool) – Parameter that specifies whether tag assignments inherited by the object from its ancestors in securable object hierarchy should be returned as well: - true: All tags assigned to this object should be returned, inheritance included. - false: Only tags explicitly assigned to this object should be returned.
- get_tags_async(with_lineage: bool | None = None) PollingOperation[dict[TagResource, TagValue]]¶
An asynchronous version of
get_tags().Refer to
PollingOperationfor more information on asynchronous execution and the return type.
- set_tags(tags: dict[TagResource, TagValue], if_exists: bool | None = None) None¶
Set tags on an API integration.
- Parameters:
tags (dict[TagResource, TagValue]) – (required)
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.
- set_tags_async(tags: dict[TagResource, TagValue], if_exists: bool | None = None) PollingOperation[None]¶
An asynchronous version of
set_tags().Refer to
PollingOperationfor more information on asynchronous execution and the return type.
- unset_tags(tag_resources: set[TagResource], if_exists: bool | None = None) None¶
Unset tags from an API integration.
- Parameters:
tag_resources (set[TagResource]) – (required)
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.
- unset_tags_async(tag_resources: set[TagResource], if_exists: bool | None = None) PollingOperation[None]¶
An asynchronous version of
unset_tags().Refer to
PollingOperationfor more information on asynchronous execution and the return type.