# APIIntegration

[Snowflake Documentation](https://docs.snowflake.com/en/sql-reference/sql/create-api-integration)

Manages API integrations in Snowflake, allowing external services to interact with Snowflake resources securely. This class supports creating, replacing, and checking the existence of API integrations with various configurations.

## Examples

### Python

```python
api_integration = APIIntegration(
    name="some_api_integration",
    api_provider="AWS_API_GATEWAY",
    api_aws_role_arn="arn:aws:iam::123456789012:role/MyRole",
    enabled=True,
    api_allowed_prefixes=["/prod/", "/dev/"],
    api_blocked_prefixes=["/test/"],
    api_key="ABCD1234",
    comment="Example API integration"
)
```

### YAML

```yaml
api_integrations:
  - name: some_api_integration
    api_provider: AWS_API_GATEWAY
    api_aws_role_arn: "arn:aws:iam::123456789012:role/MyRole"
    enabled: true
    api_allowed_prefixes: ["/prod/", "/dev/"]
    api_blocked_prefixes: ["/test/"]
    api_key: "ABCD1234"
    comment: "Example API integration"
```

## Fields

* `name` (string, required) - The unique name of the API integration.
* `api_provider` (string or [ApiProvider](https://github.com/Titan-Systems/titan/blob/main/docs/resources/api_provider.md), required) - The provider of the API service. Defaults to AWS\_API\_GATEway.
* `api_aws_role_arn` (string, required) - The AWS IAM role ARN associated with the API integration.
* `api_key` (string) - The API key used for authentication.
* `api_allowed_prefixes` (list) - The list of allowed prefixes for the API endpoints.
* `api_blocked_prefixes` (list) - The list of blocked prefixes for the API endpoints.
* `enabled` (bool, required) - Specifies if the API integration is enabled. Defaults to TRUE.
* `comment` (string) - A comment or description for the API integration.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://titan-core.gitbook.io/titan-core/resources/api_integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
