{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-emr/json-schema/amazon-emr-create-managed-endpoint-request-schema.json",
  "title": "CreateManagedEndpointRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-emr-endpoints-api-openapi.yml#/components/schemas/CreateManagedEndpointRequest",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the managed endpoint."
    },
    "virtualClusterId": {
      "type": "string",
      "description": "The ID of the virtual cluster for which a managed endpoint is created."
    },
    "type": {
      "type": "string",
      "description": "The type of the managed endpoint."
    },
    "releaseLabel": {
      "type": "string",
      "description": "The Amazon EMR release version."
    },
    "executionRoleArn": {
      "type": "string",
      "description": "The ARN of the execution role."
    },
    "certificateArn": {
      "type": "string",
      "description": "The certificate ARN provided by users for the managed endpoint. This field is under deprecation and will be removed in future releases."
    },
    "configurationOverrides": {
      "$ref": "#/$defs/ConfigurationOverrides"
    },
    "clientToken": {
      "type": "string",
      "description": "The client idempotency token for this create call."
    },
    "tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "The tags of the managed endpoint."
    },
    "sessionIdleTimeoutInMinutes": {
      "type": "integer",
      "description": "The number of idle minutes before the managed endpoint session times out."
    }
  },
  "required": [
    "name",
    "virtualClusterId",
    "type",
    "releaseLabel",
    "executionRoleArn",
    "clientToken"
  ],
  "$defs": {
    "CloudWatchMonitoringConfiguration": {
      "type": "object",
      "properties": {
        "logGroupName": {
          "type": "string",
          "description": "The name of the log group for log publishing."
        },
        "logStreamNamePrefix": {
          "type": "string",
          "description": "The specified name prefix for log streams."
        }
      },
      "required": [
        "logGroupName"
      ]
    },
    "ConfigurationOverrides": {
      "type": "object",
      "properties": {
        "applicationConfiguration": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EmrContainersConfiguration"
          },
          "description": "The configurations for the application running by the job run."
        },
        "monitoringConfiguration": {
          "$ref": "#/$defs/EmrContainersMonitoringConfiguration"
        }
      }
    },
    "ContainerLogRotationConfiguration": {
      "type": "object",
      "properties": {
        "rotationSize": {
          "type": "string",
          "description": "The file size at which to rotate logs. Minimum of 2KB, Maximum of 2GB."
        },
        "maxFilesToKeep": {
          "type": "integer",
          "description": "The number of files to keep in container after rotation."
        }
      },
      "required": [
        "rotationSize",
        "maxFilesToKeep"
      ]
    },
    "EmrContainersConfiguration": {
      "type": "object",
      "properties": {
        "classification": {
          "type": "string",
          "description": "The classification within a configuration."
        },
        "properties": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "A set of properties specified within a configuration classification."
        },
        "configurations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EmrContainersConfiguration"
          },
          "description": "A list of additional configurations to apply within a configuration object."
        }
      },
      "required": [
        "classification"
      ]
    },
    "EmrContainersMonitoringConfiguration": {
      "type": "object",
      "properties": {
        "managedLogs": {
          "$ref": "#/$defs/ManagedLogs"
        },
        "persistentAppUI": {
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ],
          "description": "Monitoring configurations for the persistent application UI."
        },
        "cloudWatchMonitoringConfiguration": {
          "$ref": "#/$defs/CloudWatchMonitoringConfiguration"
        },
        "s3MonitoringConfiguration": {
          "$ref": "#/$defs/EmrContainersS3MonitoringConfiguration"
        },
        "containerLogRotationConfiguration": {
          "$ref": "#/$defs/ContainerLogRotationConfiguration"
        }
      }
    },
    "EmrContainersS3MonitoringConfiguration": {
      "type": "object",
      "properties": {
        "logUri": {
          "type": "string",
          "description": "Amazon S3 destination URI for log publishing."
        },
        "encryptionKeyArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the encryption key for logs."
        }
      },
      "required": [
        "logUri"
      ]
    },
    "ManagedLogs": {
      "type": "object",
      "properties": {
        "allowAWSToRetainLogs": {
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ],
          "description": "Determines whether Amazon Web Services can retain logs."
        },
        "encryptionKeyArn": {
          "type": "string",
          "description": "The Amazon resource name (ARN) of the encryption key for logs."
        }
      }
    }
  }
}