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

# Test an AWS account configuration



## OpenAPI

````yaml https://api.select.dev/v2/openapi.json post /aws-accounts/actions/test
openapi: 3.1.0
info:
  title: SELECT API (v2)
  version: 0.1.0
servers:
  - url: https://api.select.dev/v2
    description: SELECT API v2
security: []
paths:
  /aws-accounts/actions/test:
    post:
      tags:
        - aws-accounts
      summary: Test an AWS account configuration
      operationId: test_aws_account_config_route_aws_accounts_actions_test_post
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          schema:
            type: string
            description: The organization ID the request is scoped to.
            title: X-Tenant-Id
          description: The organization ID the request is scoped to.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AwsAccountCreate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AwsAccountValidationReport'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '405':
          $ref: '#/components/responses/MethodNotAllowed'
        '408':
          $ref: '#/components/responses/RequestTimeout'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/ValidationFailed'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - HTTPBearer: []
components:
  schemas:
    AwsAccountCreate:
      properties:
        name:
          type: string
          title: Name
          description: Display name for the account, as shown throughout SELECT.
        payer_account_id:
          type: string
          pattern: ^\d{12}$
          title: Payer Account Id
          description: >-
            The 12-digit AWS account id of the payer account SELECT reads spend
            for.
        s3_bucket:
          type: string
          minLength: 1
          title: S3 Bucket
          description: >-
            The S3 bucket AWS delivers this payer account's Cost and Usage
            Report to.
        s3_prefix:
          anyOf:
            - type: string
            - type: 'null'
          title: S3 Prefix
          description: >-
            Path within the bucket that the report is delivered under. Null when
            the report is delivered at the root of the bucket.
        region:
          type: string
          pattern: ^[a-z][a-z0-9-]+-\d+$
          title: Region
          description: >-
            The AWS region the bucket is in, such as `us-east-1`. SELECT reads
            the bucket through this region's S3 endpoint.
        credentials:
          $ref: '#/components/schemas/AwsCredentials'
          description: >-
            IAM credentials that can list and read the report objects under
            `s3_prefix`. SELECT verifies them against the bucket before the
            account is added.
        sync_enabled:
          type: boolean
          title: Sync Enabled
          description: Whether SELECT starts syncing data for this account.
          default: true
      type: object
      required:
        - name
        - payer_account_id
        - s3_bucket
        - region
        - credentials
      title: AwsAccountCreate
      description: An AWS payer account to add.
    AwsAccountValidationReport:
      properties:
        success:
          type: boolean
          title: Success
          description: Whether every applicable check passed.
        checks:
          items:
            $ref: '#/components/schemas/AwsAccountValidationCheck'
          type: array
          title: Checks
          description: >-
            The checks that ran, in the order they ran. Read top-down to find
            where setup stopped working.
      type: object
      required:
        - success
        - checks
      title: AwsAccountValidationReport
      description: The result of validating an account's configuration against AWS.
    AwsCredentials:
      properties:
        access_key_id:
          type: string
          title: Access Key Id
          description: Access key id of the IAM user SELECT authenticates as.
        secret_access_key:
          type: string
          title: Secret Access Key
          description: Secret access key paired with `access_key_id`.
          writeOnly: true
          x-doit-confidentiality: sensitive
          x-terraform-sensitive: true
      type: object
      required:
        - access_key_id
        - secret_access_key
      title: AwsCredentials
      description: >-
        The IAM credentials SELECT reads an account's report with.


        Write-only. A read never returns the secret access key; the credentials

        sub-resource reports the access key id so you can tell which key is in
        use.
    AwsAccountValidationCheck:
      properties:
        id:
          type: string
          enum:
            - bucket_access
            - cur_manifest_discovery
            - manifest_read
          title: Id
          description: Identifies which check this is.
        label:
          type: string
          title: Label
          description: Short human-readable name for the check.
        status:
          type: string
          enum:
            - passed
            - failed
            - skipped
          title: Status
          description: >-
            `passed`, `failed`, or `skipped`. A check is skipped when it does
            not apply, or when an earlier check failed and stopped the run.
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
          description: >-
            What to change when the check failed, or why it was skipped. Null
            when the check passed with nothing worth noting.
        docs_link:
          anyOf:
            - type: string
            - type: 'null'
          title: Docs Link
          description: >-
            Link to the setup documentation covering what the check found. Null
            when no page addresses it specifically.
      type: object
      required:
        - id
        - label
        - status
      title: AwsAccountValidationCheck
      description: One check SELECT runs against an account's configuration.
    ProblemDetail:
      additionalProperties: true
      description: >-
        RFC 9457-style error payload, served as ``application/problem+json``.


        ``code`` is the stable, machine-readable identifier — consumers branch
        on it,

        never on ``title``. ``type`` stays ``about:blank``: we keep no per-error

        documentation pages. There is no ``instance``/request-id member (we
        don't run

        access logs). See the flat error-code catalogue in §4 of the standards
        doc.
      properties:
        type:
          default: about:blank
          title: Type
          type: string
        title:
          type: string
          title: Title
        status:
          title: Status
          type: integer
        detail:
          title: Detail
          type: string
        code:
          title: Code
          type: string
        retryable:
          title: Retryable
          type: boolean
        details:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          default: null
          title: Details
      required:
        - title
        - status
        - detail
        - code
        - retryable
      title: ProblemDetail
      type: object
  responses:
    BadRequest:
      description: Bad request
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    Unauthorized:
      description: Unauthorized
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
      headers:
        WWW-Authenticate:
          description: Authentication challenge for the requested resource.
          required: true
          schema:
            type: string
    Forbidden:
      description: Forbidden
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    NotFound:
      description: Not found
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    MethodNotAllowed:
      description: Method not allowed
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
      headers:
        Allow:
          description: HTTP methods supported by the requested resource.
          required: true
          schema:
            type: string
    RequestTimeout:
      description: Request Timeout
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    Conflict:
      description: Conflict
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    ValidationFailed:
      description: Validation failed
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    RateLimited:
      description: Rate limited
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
      headers:
        Retry-After:
          description: Number of seconds to wait before retrying the request.
          required: true
          schema:
            type: integer
            minimum: 0
    InternalError:
      description: Internal error
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    ServiceUnavailable:
      description: Service unavailable
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
      headers:
        Retry-After:
          description: Number of seconds to wait before retrying the request.
          required: true
          schema:
            type: integer
            minimum: 0
  securitySchemes:
    HTTPBearer:
      type: http
      description: Organization API key (sl_…).
      scheme: bearer

````