Create an external storage configuration
client.Admin.Organization.ExternalStorage.New(ctx, body) (*ExternalStorageConfiguration, error)
POST
/organization/external_storageCreate an external storage configuration
package main
import (
"context"
"fmt"
"github.com/openai/openai-go"
"github.com/openai/openai-go/option"
)
func main() {
client := openai.NewClient(
option.WithAdminAPIKey("My Admin API Key"),
)
externalStorageConfiguration, err := client.Admin.Organization.ExternalStorage.New(context.TODO(), openai.AdminOrganizationExternalStorageNewParams{
ProjectID: "proj_123",
Provider: openai.AdminOrganizationExternalStorageNewParamsProviderUnion{
OfAws: &openai.AdminOrganizationExternalStorageNewParamsProviderAws{
Bucket: "bucket",
RoleArn: "role_arn",
},
},
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", externalStorageConfiguration.ID)
}
200 — Example
{
"id": "id",
"created_at": 0,
"geography": "geography",
"object": "organization.external_storage",
"project_id": "project_id",
"provider": {
"account_id": "account_id",
"bucket": "bucket",
"external_id": "external_id",
"region": "region",
"role_arn": "role_arn",
"type": "aws"
},
"status": "pending"
}Returns Examples
200 — Example
{
"id": "id",
"created_at": 0,
"geography": "geography",
"object": "organization.external_storage",
"project_id": "project_id",
"provider": {
"account_id": "account_id",
"bucket": "bucket",
"external_id": "external_id",
"region": "region",
"role_arn": "role_arn",
"type": "aws"
},
"status": "pending"
}