---
updatedAt: 2026-05-22T00:42:24.000Z
agentTools:
  projectIndex: https://docs.oneschema.co/llms.txt
---

# Test AWS Secrets Manager Connection

Test that OneSchema can authenticate via the configured IAM role and retrieve a specific secret. The secret value is not returned.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "AWS Secrets Manager",
    "version": "0.0.1",
    "contact": {
      "name": "OneSchema Support",
      "email": "support@oneschema.co"
    },
    "license": {
      "name": "proprietary",
      "url": "https://www.oneschema.co/terms-and-conditions"
    },
    "termsOfService": "https://www.oneschema.co/terms-and-conditions",
    "description": "An API for managing AWS Secrets Manager connections and managed secrets in OneSchema."
  },
  "tags": [
    {
      "name": "AWS Secrets Manager Accounts",
      "description": "Manage AWS Secrets Manager account connections"
    }
  ],
  "paths": {
    "/v0/aws-secrets-manager/accounts/{account-id}/test": {
      "post": {
        "operationId": "test-aws-secrets-manager-account",
        "summary": "Test AWS Secrets Manager Connection",
        "description": "Test that OneSchema can authenticate via the configured IAM role and retrieve a specific secret. The secret value is not returned.",
        "parameters": [
          {
            "name": "account-id",
            "in": "path",
            "required": true,
            "description": "The ID of the AWS Secrets Manager account",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Test result (check the `success` field)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/test-connection-response"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized (missing or invalid API key)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error-response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error-response"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error-response"
                }
              }
            }
          }
        },
        "tags": [
          "AWS Secrets Manager Accounts"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/aws-test-connection-request"
              }
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "components": {
    "schemas": {
      "aws-test-connection-request": {
        "type": "object",
        "required": [
          "secret_identifier",
          "region"
        ],
        "properties": {
          "secret_identifier": {
            "type": "string",
            "description": "The identifier of the secret to test retrieval for"
          },
          "region": {
            "type": "string",
            "description": "The AWS region where the secret is stored"
          },
          "secret_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A specific version ID or stage label"
          },
          "version_kind": {
            "type": "string",
            "enum": [
              "id",
              "stage"
            ],
            "description": "Selects whether secret_version is treated as a VersionId or VersionStage for AWS GetSecretValue"
          }
        }
      },
      "error-response": {
        "type": "object",
        "required": [
          "message"
        ],
        "properties": {
          "code": {
            "type": "string",
            "description": "A machine-readable error code"
          },
          "param": {
            "type": "string",
            "description": "The parameter that caused the error"
          },
          "message": {
            "type": "string",
            "description": "A human-readable error message"
          },
          "data": {
            "type": "object",
            "description": "Additional error context"
          }
        }
      },
      "test-connection-response": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "error_code": {
            "type": "string",
            "description": "Present when success is false"
          },
          "error_category": {
            "type": "string",
            "enum": [
              "account",
              "secret",
              "provider"
            ],
            "description": "Broad classification of the failure. \"account\" means the account credentials or permissions are wrong; \"secret\" means the secret identifier or version could not be found; \"provider\" means a transient infrastructure issue. Present when success is false."
          },
          "error_message": {
            "type": "string",
            "description": "Present when success is false"
          },
          "request_id": {
            "type": "string"
          },
          "transaction_id": {
            "type": "string"
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-KEY"
      }
    }
  },
  "servers": [
    {
      "url": "https://api.oneschema.co",
      "description": "Production server (hosted in the US)",
      "variables": {}
    },
    {
      "url": "https://api.eu.oneschema.co",
      "description": "Production server (hosted in the EU)",
      "variables": {}
    },
    {
      "url": "https://api.ca.oneschema.co",
      "description": "Production server (hosted in Canada)",
      "variables": {}
    },
    {
      "url": "https://api.au.oneschema.co",
      "description": "Production server (hosted in Australia)",
      "variables": {}
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```