Create an external storage configuration
ExternalStorageConfiguration admin().organization().externalStorage().create(ExternalStorageCreateParamsparams , RequestOptionsrequestOptions = RequestOptions.none() )
POST
/organization/external_storageCreate an external storage configuration
package com.openai.example;
import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.admin.organization.externalstorage.ExternalStorageConfiguration;
import com.openai.models.admin.organization.externalstorage.ExternalStorageCreateParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
OpenAIClient client = OpenAIOkHttpClient.fromEnv();
ExternalStorageCreateParams params = ExternalStorageCreateParams.builder()
.projectId("proj_123")
.provider(ExternalStorageCreateParams.Provider.Aws.builder()
.bucket("bucket")
.roleArn("role_arn")
.build())
.build();
ExternalStorageConfiguration externalStorageConfiguration = client.admin().organization().externalStorage().create(params);
}
}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"
}