{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-migration-hub/json-schema/amazon-migration-hub-create-service-request-schema.json",
  "title": "CreateServiceRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-migration-hub-services-api-openapi.yml#/components/schemas/CreateServiceRequest",
  "type": "object",
  "properties": {
    "Name": {
      "type": "string",
      "description": "The name of the service."
    },
    "Description": {
      "type": "string",
      "description": "The description of the service."
    },
    "EnvironmentIdentifier": {
      "type": "string",
      "description": "The ID of the environment in which the service is created."
    },
    "ApplicationIdentifier": {
      "type": "string",
      "description": "The ID of the application which the service is created."
    },
    "VpcId": {
      "type": "string",
      "description": "The ID of the VPC."
    },
    "EndpointType": {
      "type": "string",
      "description": "The type of endpoint to use for the service. The type can be a URL in a VPC or an Lambda function."
    },
    "UrlEndpoint": {
      "$ref": "#/$defs/UrlEndpointInput"
    },
    "LambdaEndpoint": {
      "$ref": "#/$defs/LambdaEndpointInput"
    },
    "Tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "The tags to assign to the service. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair.."
    },
    "ClientToken": {
      "type": "string",
      "description": "A unique, case-sensitive identifier that you provide to ensure the idempotency of the request."
    }
  },
  "required": [
    "Name",
    "EnvironmentIdentifier",
    "ApplicationIdentifier",
    "EndpointType"
  ],
  "$defs": {
    "LambdaEndpointInput": {
      "type": "object",
      "properties": {
        "Arn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the Lambda function or alias."
        }
      },
      "required": [
        "Arn"
      ]
    },
    "UrlEndpointInput": {
      "type": "object",
      "properties": {
        "Url": {
          "type": "string",
          "description": "The URL to route traffic to. The URL must be an rfc3986-formatted URL. If the host is a domain name, the name must be resolvable over the public internet. If the scheme is https, the top level domain of the host must be listed in the IANA root zone database."
        },
        "HealthUrl": {
          "type": "string",
          "description": "The health check URL of the URL endpoint type. If the URL is a public endpoint, the HealthUrl must also be a public endpoint. If the URL is a private endpoint inside a virtual private cloud (VPC), the health URL must also be a private endpoint, and the host must be the same as the URL."
        }
      },
      "required": [
        "Url"
      ]
    }
  }
}