Skip to main content
The StorageConfigsResource provides methods to create, list, test, and delete storage configurations for connecting to external storage providers like AWS S3 and Google Cloud Storage.

List storage configs

Retrieve a paginated list of all storage configurations.
const response = await avala.storageConfigs.list({
  limit: 50
});

Parameters

limit
number
Maximum number of results to return
cursor
string
Cursor for pagination

Returns

items
StorageConfig[]
Array of storage configuration objects
nextCursor
string | null
Cursor for the next page of results
previousCursor
string | null
Cursor for the previous page of results
hasMore
boolean
Whether there are more results available

Create a storage config

Create a new storage configuration for an external storage provider.
// AWS S3 configuration
const s3Config = await avala.storageConfigs.create({
  name: "My S3 Bucket",
  provider: "s3",
  s3BucketName: "my-bucket",
  s3BucketRegion: "us-east-1",
  s3AccessKeyId: "AKIAIOSFODNN7EXAMPLE",
  s3SecretAccessKey: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
});

// Google Cloud Storage configuration
const gcsConfig = await avala.storageConfigs.create({
  name: "My GCS Bucket",
  provider: "gcs",
  gcStorageBucketName: "my-gcs-bucket",
  gcStorageAuthJsonContent: JSON.stringify(serviceAccountJson)
});

Parameters

name
string
required
The name of the storage configuration
provider
string
required
The storage provider type (e.g., “s3”, “gcs”)
s3BucketName
string
AWS S3 bucket name (required for S3 provider)
s3BucketRegion
string
AWS S3 bucket region (e.g., “us-east-1”)
s3BucketPrefix
string
Optional prefix for S3 objects
s3AccessKeyId
string
AWS access key ID for authentication
s3SecretAccessKey
string
AWS secret access key for authentication
s3IsAccelerated
boolean
Whether to use S3 transfer acceleration
gcStorageBucketName
string
Google Cloud Storage bucket name (required for GCS provider)
gcStoragePrefix
string
Optional prefix for GCS objects
gcStorageAuthJsonContent
string
JSON content of the GCS service account credentials

Returns

uid
string
The unique identifier for the storage configuration
name
string
The name of the storage configuration
provider
string
The storage provider type
s3BucketName
string | null
AWS S3 bucket name
s3BucketRegion
string | null
AWS S3 bucket region
s3BucketPrefix
string | null
S3 object prefix
s3IsAccelerated
boolean
Whether S3 transfer acceleration is enabled
gcStorageBucketName
string | null
Google Cloud Storage bucket name
gcStoragePrefix
string | null
GCS object prefix
isVerified
boolean
Whether the storage configuration has been verified
lastVerifiedAt
string | null
The timestamp when the configuration was last verified
createdAt
string | null
The timestamp when the configuration was created
updatedAt
string | null
The timestamp when the configuration was last updated

Test a storage config

Test a storage configuration to verify connectivity and permissions.
const result = await avala.storageConfigs.test("config_uid");

if (result.verified) {
  console.log("Storage configuration is valid");
} else {
  console.error("Verification failed:", result.errors);
}

Parameters

uid
string
required
The unique identifier of the storage configuration to test

Returns

verified
boolean
Whether the storage configuration passed verification
errors
Record<string, string[]>
Validation errors if verification failed

Delete a storage config

Delete a storage configuration.
await avala.storageConfigs.delete("config_uid");

Parameters

uid
string
required
The unique identifier of the storage configuration to delete

Returns

Returns void on successful deletion.

Build docs developers (and LLMs) love