{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-opensearch/json-schema/amazon-opensearch-create-pipeline-request-schema.json",
  "title": "CreatePipelineRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-opensearch-osis-api-openapi.yml#/components/schemas/CreatePipelineRequest",
  "type": "object",
  "properties": {
    "PipelineName": {
      "type": "string",
      "description": "The name of the OpenSearch Ingestion pipeline to create. Pipeline names are unique across the pipelines owned by an account within an Amazon Web Services Region."
    },
    "MinUnits": {
      "type": "integer",
      "description": "The minimum pipeline capacity, in Ingestion Compute Units (ICUs)."
    },
    "MaxUnits": {
      "type": "integer",
      "description": "The maximum pipeline capacity, in Ingestion Compute Units (ICUs)."
    },
    "PipelineConfigurationBody": {
      "type": "string",
      "description": "The pipeline configuration in YAML format. The command accepts the pipeline configuration as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with \\n."
    },
    "LogPublishingOptions": {
      "$ref": "#/$defs/LogPublishingOptions"
    },
    "VpcOptions": {
      "$ref": "#/$defs/VpcOptions"
    },
    "BufferOptions": {
      "$ref": "#/$defs/BufferOptions"
    },
    "EncryptionAtRestOptions": {
      "$ref": "#/$defs/OsisEncryptionAtRestOptions"
    },
    "Tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/OsisTag"
      },
      "description": "List of tags to add to the pipeline upon creation."
    },
    "PipelineRoleArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the IAM role that grants the pipeline permission to access Amazon Web Services resources."
    }
  },
  "required": [
    "PipelineName",
    "MinUnits",
    "MaxUnits",
    "PipelineConfigurationBody"
  ],
  "$defs": {
    "BufferOptions": {
      "type": "object",
      "properties": {
        "PersistentBufferEnabled": {
          "type": "boolean",
          "description": "Whether persistent buffering should be enabled."
        }
      },
      "required": [
        "PersistentBufferEnabled"
      ]
    },
    "CloudWatchLogDestination": {
      "type": "object",
      "properties": {
        "LogGroup": {
          "type": "string",
          "description": "The name of the CloudWatch Logs group to send pipeline logs to. You can specify an existing log group or create a new one. For example, /aws/vendedlogs/OpenSearchService/pipelines."
        }
      },
      "required": [
        "LogGroup"
      ]
    },
    "LogPublishingOptions": {
      "type": "object",
      "properties": {
        "IsLoggingEnabled": {
          "type": "boolean",
          "description": "Whether logs should be published."
        },
        "CloudWatchLogDestination": {
          "$ref": "#/$defs/CloudWatchLogDestination"
        }
      }
    },
    "OsisEncryptionAtRestOptions": {
      "type": "object",
      "properties": {
        "KmsKeyArn": {
          "type": "string",
          "description": "The ARN of the KMS key used to encrypt buffer data. By default, data is encrypted using an Amazon Web Services owned key."
        }
      },
      "required": [
        "KmsKeyArn"
      ]
    },
    "OsisTag": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "The tag key. Tag keys must be unique for the pipeline 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"
      ]
    },
    "VpcAttachmentOptions": {
      "type": "object",
      "properties": {
        "AttachToVpc": {
          "type": "boolean",
          "description": "Whether a VPC is attached to the pipeline."
        },
        "CidrBlock": {
          "type": "string",
          "description": "The CIDR block to be reserved for OpenSearch Ingestion to create elastic network interfaces (ENIs)."
        }
      },
      "required": [
        "AttachToVpc"
      ]
    },
    "VpcOptions": {
      "type": "object",
      "properties": {
        "SubnetIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of subnet IDs associated with the VPC endpoint."
        },
        "SecurityGroupIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of security groups associated with the VPC endpoint."
        },
        "VpcAttachmentOptions": {
          "$ref": "#/$defs/VpcAttachmentOptions"
        },
        "VpcEndpointManagement": {
          "type": "string",
          "enum": [
            "CUSTOMER",
            "SERVICE"
          ],
          "description": "Defines whether you or Amazon OpenSearch Ingestion service create and manage the VPC endpoint configured for the pipeline."
        }
      },
      "required": [
        "SubnetIds"
      ]
    }
  }
}