> ## Documentation Index
> Fetch the complete documentation index at: https://docs.outerproduct.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create S3 Connector

> Store an S3 connector (encrypted) for the caller's org.

AWS S3 connectors use the customer-owned IAM role + ExternalId flow.
S3-compatible connectors may still use the non-AWS credential variants.
Credentials are never echoed back in the response.



## OpenAPI

````yaml https://api.outerproduct.com/openapi.json post /v1/connectors/s3
openapi: 3.1.0
info:
  title: OuterProduct API
  description: >-
    Public-facing REST API for OuterProduct model distillation, prediction, and
    explanation.
  version: 0.1.8
servers: []
security: []
paths:
  /v1/connectors/s3:
    post:
      tags:
        - connector
      summary: Create S3 Connector
      description: |-
        Store an S3 connector (encrypted) for the caller's org.

        AWS S3 connectors use the customer-owned IAM role + ExternalId flow.
        S3-compatible connectors may still use the non-AWS credential variants.
        Credentials are never echoed back in the response.
      operationId: create_s3_connector_v1_connectors_s3_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateS3ConnectorRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateS3ConnectorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerAuth: []
components:
  schemas:
    CreateS3ConnectorRequest:
      properties:
        name:
          type: string
          minLength: 1
          title: Name
          description: Unique-per-org name for this connector entry.
        url:
          type: string
          minLength: 1
          format: uri
          title: Url
        third_party_bucket_settings:
          anyOf:
            - $ref: '#/components/schemas/ThirdPartyS3Settings'
            - type: 'null'
        credentials:
          oneOf:
            - $ref: '#/components/schemas/S3TaskRoleCredentials'
            - $ref: '#/components/schemas/S3AssumeRoleCredentials'
            - $ref: '#/components/schemas/S3ProfileCredentials'
            - $ref: '#/components/schemas/S3StaticAccessKeyCredentials'
            - $ref: '#/components/schemas/S3TemporarySessionAccessKeyCredentials'
          title: Credentials
          discriminator:
            propertyName: kind
            mapping:
              assume_role:
                $ref: '#/components/schemas/S3AssumeRoleCredentials'
              profile:
                $ref: '#/components/schemas/S3ProfileCredentials'
              session_access_key:
                $ref: '#/components/schemas/S3TemporarySessionAccessKeyCredentials'
              static_access_key:
                $ref: '#/components/schemas/S3StaticAccessKeyCredentials'
              task_role:
                $ref: '#/components/schemas/S3TaskRoleCredentials'
      type: object
      required:
        - name
        - url
        - credentials
      title: CreateS3ConnectorRequest
    CreateS3ConnectorResponse:
      properties:
        id:
          $ref: '#/components/schemas/ID'
        short_id:
          type: string
          title: Short Id
        credential_name:
          type: string
          title: Credential Name
      type: object
      required:
        - id
        - short_id
        - credential_name
      title: CreateS3ConnectorResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ThirdPartyS3Settings:
      properties:
        endpoint_url:
          type: string
          minLength: 1
          format: uri
          title: Endpoint Url
        region:
          type: string
          title: Region
      type: object
      required:
        - endpoint_url
        - region
      title: ThirdPartyS3Settings
    S3TaskRoleCredentials:
      properties:
        kind:
          type: string
          const: task_role
          title: Kind
          default: task_role
      additionalProperties: false
      type: object
      title: S3TaskRoleCredentials
    S3AssumeRoleCredentials:
      properties:
        kind:
          type: string
          const: assume_role
          title: Kind
          default: assume_role
        role_arn:
          type: string
          pattern: >-
            ^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b|aws-iso-e|aws-iso-f):([a-z0-9-]+):([a-z0-9-]*):(\d{12}|):(.+)$
          format: aws-iam-role-arn
          title: IamRoleArn
          description: An AWS IAM Role ARN
          examples:
            - arn:aws:iam::123456789012:role/MyRole
        external_id:
          type: string
          title: External Id
        session_name:
          type: string
          title: Session Name
          default: outerproduct-connectors
        duration_seconds:
          type: integer
          title: Duration Seconds
          default: 3600
      additionalProperties: false
      type: object
      required:
        - role_arn
        - external_id
      title: S3AssumeRoleCredentials
    S3ProfileCredentials:
      properties:
        kind:
          type: string
          const: profile
          title: Kind
          default: profile
        profile_name:
          type: string
          title: Profile Name
      additionalProperties: false
      type: object
      required:
        - profile_name
      title: S3ProfileCredentials
    S3StaticAccessKeyCredentials:
      properties:
        kind:
          type: string
          const: static_access_key
          title: Kind
          default: static_access_key
        access_key_id:
          type: string
          format: password
          title: Access Key Id
          writeOnly: true
        secret_access_key:
          type: string
          format: password
          title: Secret Access Key
          writeOnly: true
      additionalProperties: false
      type: object
      required:
        - access_key_id
        - secret_access_key
      title: S3StaticAccessKeyCredentials
    S3TemporarySessionAccessKeyCredentials:
      properties:
        kind:
          type: string
          const: session_access_key
          title: Kind
          default: session_access_key
        access_key_id:
          type: string
          format: password
          title: Access Key Id
          writeOnly: true
        secret_access_key:
          type: string
          format: password
          title: Secret Access Key
          writeOnly: true
        session_token:
          type: string
          format: password
          title: Session Token
          writeOnly: true
      additionalProperties: false
      type: object
      required:
        - access_key_id
        - secret_access_key
        - session_token
      title: S3TemporarySessionAccessKeyCredentials
    ID:
      anyOf:
        - type: string
          format: uuid
        - type: string
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key or OAuth2/OIDC access token
      description: >-
        An API key or OAuth2/OIDC access token sent as `Authorization: Bearer
        <token>`.

````