Update Data Source
Update a data source by ID.
ParametersExpand Collapse
body DataSourceUpdateParams
SourceType param.Field[DataSourceUpdateParamsSourceType]
Component that implements the data source
type CloudAzStorageBlobDataSource struct{…}
type CloudSharepointDataSource struct{…}
ExcludePathPatterns []stringoptional
List of regex patterns for file paths to exclude. Files whose paths (including filename) match any pattern will be excluded. Example: ['/temp/', '/backup/', '.git/', '.tmp$', '^~']
type CloudConfluenceDataSource struct{…}
type CloudJiraDataSource struct{…}
type CloudJiraDataSourceV2 struct{…}
type CloudBoxDataSource struct{…}
AuthenticationMechanism CloudBoxDataSourceAuthenticationMechanism
The type of authentication to use (Developer Token or CCG)
ClientID stringoptional
Box API key used for identifying the application the user is authenticating with
ReturnsExpand Collapse
type DataSource struct{…}
Schema for a data source.
Component DataSourceComponentUnion
Component that implements the data source
type CloudAzStorageBlobDataSource struct{…}
type CloudSharepointDataSource struct{…}
ExcludePathPatterns []stringoptional
List of regex patterns for file paths to exclude. Files whose paths (including filename) match any pattern will be excluded. Example: ['/temp/', '/backup/', '.git/', '.tmp$', '^~']
type CloudConfluenceDataSource struct{…}
type CloudJiraDataSource struct{…}
type CloudJiraDataSourceV2 struct{…}
type CloudBoxDataSource struct{…}
AuthenticationMechanism CloudBoxDataSourceAuthenticationMechanism
The type of authentication to use (Developer Token or CCG)
ClientID stringoptional
Box API key used for identifying the application the user is authenticating with
Version metadata for the data source
ReaderVersion DataSourceReaderVersionMetadataReaderVersionoptional
Update Data Source
package main
import (
"context"
"fmt"
"github.com/stainless-sdks/llamacloud-prod-go"
"github.com/stainless-sdks/llamacloud-prod-go/option"
)
func main() {
client := llamacloudprod.NewClient(
option.WithAPIKey("My API Key"),
)
dataSource, err := client.DataSources.Update(
context.TODO(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
llamacloudprod.DataSourceUpdateParams{
SourceType: llamacloudprod.DataSourceUpdateParamsSourceTypeS3,
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", dataSource.ID)
}
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"component": {
"foo": "bar"
},
"name": "name",
"project_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"source_type": "S3",
"created_at": "2019-12-27T18:11:19.117Z",
"custom_metadata": {
"foo": {
"foo": "bar"
}
},
"updated_at": "2019-12-27T18:11:19.117Z",
"version_metadata": {
"reader_version": "1.0"
}
}Returns Examples
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"component": {
"foo": "bar"
},
"name": "name",
"project_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"source_type": "S3",
"created_at": "2019-12-27T18:11:19.117Z",
"custom_metadata": {
"foo": {
"foo": "bar"
}
},
"updated_at": "2019-12-27T18:11:19.117Z",
"version_metadata": {
"reader_version": "1.0"
}
}