Modules for interacting with the imports group of Stream APIs
API Reference: https://getstream.github.io/protocol/?urls.primaryName=Chat%20v2
Shared options
All functions in this module accept the following optional parameters:
api_key- API key to use. If not provided, the default key from config will be usedauthenticate_as_user- User id to authenticate. If not provided, the server key will be usedapi_key_secret- API key secret to use. If not provided, the default secret from config will be usedendpoint- endpoint to use. If not provided, the default endpoint from config will be usedclient- HTTP client to use. Must implementExStreamClient.Http.Behavior. Defaults toExStreamClient.Httpreq_opts- all of these options will be forwarded to req. SeeReq.new/1for available options
Summary
Functions
Creates a new import
Creates a new import v2 task
Deletes an import v2 task. Can only delete tasks in queued state.
Removes the external storage configuration for the app. Idempotent: succeeds even if no configuration exists.
Gets an import
Gets a single import v2 task by ID
Returns the current external storage configuration for the app. Returns 404 if no configuration exists.
Lists all import v2 tasks for the app
Gets an import
Creates or updates the external storage configuration for the app. Currently only AWS S3 (via cross-account IAM role assumption) is supported.
Validates the configured external S3 storage by performing a live STS AssumeRole and S3 ListObjectsV2 check.
Types
Functions
@spec create_import(ExStreamClient.Model.CreateImportRequest.t(), shared_opts()) :: {:ok, ExStreamClient.Model.CreateImportResponse.t()} | {:error, any()}
Creates a new import
Required Arguments:
Optional Arguments:
- All options from Shared Options are supported.
@spec create_import_v2_task( ExStreamClient.Model.CreateImportV2TaskRequest.t(), shared_opts() ) :: {:ok, ExStreamClient.Model.CreateImportV2TaskResponse.t()} | {:error, any()}
Creates a new import v2 task
Required Arguments:
Optional Arguments:
- All options from Shared Options are supported.
@spec delete_import_v2_task(String.t(), shared_opts()) :: {:ok, ExStreamClient.Model.DeleteImportV2TaskResponse.t()} | {:error, any()}
Deletes an import v2 task. Can only delete tasks in queued state.
Required Arguments:
id
Optional Arguments:
- All options from Shared Options are supported.
@spec delete_importer_external_storage(shared_opts()) :: {:ok, ExStreamClient.Model.DeleteExternalStorageResponse.t()} | {:error, any()}
Removes the external storage configuration for the app. Idempotent: succeeds even if no configuration exists.
Optional Arguments:
- All options from Shared Options are supported.
@spec get_import(String.t(), shared_opts()) :: {:ok, ExStreamClient.Model.GetImportResponse.t()} | {:error, any()}
Gets an import
Required Arguments:
id
Optional Arguments:
- All options from Shared Options are supported.
@spec get_import_v2_task(String.t(), shared_opts()) :: {:ok, ExStreamClient.Model.GetImportV2TaskResponse.t()} | {:error, any()}
Gets a single import v2 task by ID
Required Arguments:
id
Optional Arguments:
- All options from Shared Options are supported.
@spec get_importer_external_storage(shared_opts()) :: {:ok, ExStreamClient.Model.GetExternalStorageResponse.t()} | {:error, any()}
Returns the current external storage configuration for the app. Returns 404 if no configuration exists.
Optional Arguments:
- All options from Shared Options are supported.
@spec list_import_v2_tasks([{:state, integer()} | shared_opts()]) :: {:ok, ExStreamClient.Model.ListImportV2TasksResponse.t()} | {:error, any()}
Lists all import v2 tasks for the app
Optional Arguments:
state- All options from Shared Options are supported.
@spec list_imports(shared_opts()) :: {:ok, ExStreamClient.Model.ListImportsResponse.t()} | {:error, any()}
Gets an import
Optional Arguments:
- All options from Shared Options are supported.
@spec upsert_importer_external_storage( ExStreamClient.Model.UpsertExternalStorageRequest.t(), shared_opts() ) :: {:ok, ExStreamClient.Model.UpsertExternalStorageResponse.t()} | {:error, any()}
Creates or updates the external storage configuration for the app. Currently only AWS S3 (via cross-account IAM role assumption) is supported.
Required Arguments:
Optional Arguments:
- All options from Shared Options are supported.
@spec validate_importer_external_storage(shared_opts()) :: {:ok, ExStreamClient.Model.ValidateExternalStorageResponse.t()} | {:error, any()}
Validates the configured external S3 storage by performing a live STS AssumeRole and S3 ListObjectsV2 check.
Optional Arguments:
- All options from Shared Options are supported.