Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation
Theme

Create an external storage configuration

client.Admin.Organization.ExternalStorage.New(ctx, body) (*ExternalStorageConfiguration, error)
POST
/organization/external_storage

Register one customer-managed external storage configuration.

Parameters
body AdminOrganizationExternalStorageNewParams
ProjectID param.Field[string]
Returns
type ExternalStorageConfiguration struct{…}
ID string
CreatedAt int64
formatunixtime
Geography string
Object OrganizationExternalStorage
ProjectID string
Provider ExternalStorageConfigurationProviderUnion
Status ExternalStorageConfigurationStatus

Create 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"
}