{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-clean-rooms/json-schema/amazon-clean-rooms-create-intermediate-table-input-schema.json",
  "title": "CreateIntermediateTableInput",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-clean-rooms-intermediatetables-api-openapi.yml#/components/schemas/CreateIntermediateTableInput",
  "type": "object",
  "properties": {
    "membershipIdentifier": {
      "type": "string",
      "description": "The unique identifier of the membership where the intermediate table is created."
    },
    "name": {
      "type": "string",
      "description": "The display name for the intermediate table."
    },
    "description": {
      "type": "string",
      "description": "A description of the intermediate table."
    },
    "populationAnalysisConfiguration": {
      "$ref": "#/$defs/PopulationAnalysisConfiguration"
    },
    "kmsKeyArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the customer-managed KMS key used to encrypt the intermediate table data."
    },
    "retentionInDays": {
      "type": "integer",
      "description": "The number of days to retain populated data versions."
    },
    "tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "An optional label that you can assign to a resource when you create it. Each tag consists of a key and an optional value, both of which you define. When you use tagging, you can also use tag-based access control in IAM policies to control access to this resource."
    }
  },
  "required": [
    "membershipIdentifier",
    "name",
    "populationAnalysisConfiguration"
  ],
  "$defs": {
    "PopulationAnalysisConfiguration": {
      "type": "object",
      "properties": {
        "sqlParameters": {
          "$ref": "#/$defs/PopulationAnalysisSqlParameters"
        }
      },
      "description": "Exactly one member is set."
    },
    "PopulationAnalysisSqlParameters": {
      "type": "object",
      "properties": {
        "queryString": {
          "type": "string",
          "description": "The SQL query string used to populate the intermediate table."
        },
        "analysisTemplateArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the analysis template to use for populating the intermediate table."
        }
      }
    }
  }
}