{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-opensearch/json-schema/amazon-opensearch-create-application-request-schema.json",
  "title": "CreateApplicationRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-opensearch-opensearch-api-openapi.yml#/components/schemas/CreateApplicationRequest",
  "type": "object",
  "properties": {
    "clientToken": {
      "type": "string",
      "description": "Unique, case-sensitive identifier to ensure idempotency of the request."
    },
    "name": {
      "type": "string",
      "description": "The unique name of the OpenSearch application. Names must be unique within an Amazon Web Services Region for each account."
    },
    "dataSources": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/DataSource"
      },
      "description": "The data sources to link to the OpenSearch application."
    },
    "iamIdentityCenterOptions": {
      "$ref": "#/$defs/IamIdentityCenterOptionsInput"
    },
    "appConfigs": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AppConfig"
      },
      "description": "Configuration settings for the OpenSearch application, including administrative options."
    },
    "tagList": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      }
    },
    "kmsKeyArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the KMS key used to encrypt the application's data at rest. If provided, the application uses your customer-managed key for encryption. If omitted, the application uses an AWS-managed key. The KMS key must be in the same region as the application."
    }
  },
  "required": [
    "name"
  ],
  "$defs": {
    "AppConfig": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "enum": [
            "opensearchDashboards.dashboardAdmin.users",
            "opensearchDashboards.dashboardAdmin.groups"
          ],
          "description": "The configuration item to set, such as the admin role for the OpenSearch application."
        },
        "value": {
          "type": "string",
          "description": "The value assigned to the configuration key, such as an IAM user ARN."
        }
      }
    },
    "DataSource": {
      "type": "object",
      "properties": {
        "dataSourceArn": {
          "type": "string"
        },
        "dataSourceDescription": {
          "type": "string",
          "description": "Detailed description of a data source."
        },
        "iamRoleForDataSourceArn": {
          "type": "string",
          "description": "The ARN of the IAM role to be used for cross account/region data source association."
        }
      }
    },
    "IamIdentityCenterOptionsInput": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "Specifies whether IAM Identity Center is enabled or disabled."
        },
        "iamIdentityCenterInstanceArn": {
          "type": "string"
        },
        "iamRoleForIdentityCenterApplicationArn": {
          "type": "string",
          "description": "The ARN of the IAM role associated with the IAM Identity Center application."
        }
      }
    },
    "Tag": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "The tag key. Tag keys must be unique for the domain to which they are attached."
        },
        "Value": {
          "type": "string",
          "description": "The value assigned to the corresponding tag key. Tag values can be null and don't have to be unique in a tag set. For example, you can have a key value pair in a tag set of project : Trinity and cost-center : Trinity"
        }
      },
      "required": [
        "Key",
        "Value"
      ]
    }
  }
}