{
  "typeName" : "AWS::BedrockAgentCore::RuntimeEndpoint",
  "description" : "Resource definition for AWS::BedrockAgentCore::RuntimeEndpoint",
  "additionalProperties" : false,
  "definitions" : {
    "AgentRuntimeId" : {
      "type" : "string",
      "pattern" : "^[a-zA-Z][a-zA-Z0-9_]{0,99}-[a-zA-Z0-9]{10}$",
      "description" : "The ID of the parent Agent Runtime"
    },
    "AgentRuntimeEndpointId" : {
      "type" : "string",
      "pattern" : "^[a-zA-Z0-9_-]+$",
      "description" : "The unique ID of the Agent Runtime Endpoint itself"
    },
    "EndpointName" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 48,
      "pattern" : "^[a-zA-Z][a-zA-Z0-9_]{0,47}$"
    },
    "AgentRuntimeVersion" : {
      "type" : "string",
      "pattern" : "^([1-9][0-9]{0,4})$"
    },
    "AgentEndpointDescription" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 256
    },
    "AgentRuntimeEndpointArn" : {
      "type" : "string",
      "pattern" : "^arn:(aws(?:-cn|-us-gov|-iso(?:-[bef])?)?):bedrock-agentcore:[a-z0-9-]+:[0-9]{12}:runtime/[a-zA-Z0-9_-]+/runtime-endpoint/[a-zA-Z0-9_-]+$"
    },
    "AgentRuntimeArn" : {
      "type" : "string",
      "pattern" : "^arn:(aws(?:-cn|-us-gov|-iso(?:-[bef])?)?):bedrock-agentcore:[a-z0-9-]+:[0-9]{12}:runtime/[a-zA-Z][a-zA-Z0-9_]{0,99}-[a-zA-Z0-9]{10}$"
    },
    "AgentRuntimeEndpointStatus" : {
      "type" : "string",
      "enum" : [ "CREATING", "CREATE_FAILED", "UPDATING", "UPDATE_FAILED", "READY", "DELETING" ]
    },
    "DateTimestamp" : {
      "type" : "string",
      "format" : "date-time"
    },
    "TagsMap" : {
      "type" : "object",
      "description" : "A map of tag keys and values",
      "patternProperties" : {
        "^[a-zA-Z0-9\\s._:/=+@-]*$" : {
          "type" : "string",
          "maxLength" : 256,
          "minLength" : 0,
          "pattern" : "^[a-zA-Z0-9\\s._:/=+@-]*$",
          "description" : "Value of a tag"
        }
      },
      "additionalProperties" : false
    }
  },
  "properties" : {
    "AgentRuntimeId" : {
      "$ref" : "#/definitions/AgentRuntimeId",
      "description" : "The ID of the parent Agent Runtime (required for creation)"
    },
    "Id" : {
      "$ref" : "#/definitions/AgentRuntimeEndpointId",
      "description" : "The unique identifier of the AgentCore Runtime endpoint."
    },
    "Name" : {
      "$ref" : "#/definitions/EndpointName",
      "description" : "The name of the Agent Runtime Endpoint"
    },
    "AgentRuntimeVersion" : {
      "$ref" : "#/definitions/AgentRuntimeVersion",
      "description" : "The version of the AgentCore Runtime to use for the endpoint."
    },
    "LiveVersion" : {
      "$ref" : "#/definitions/AgentRuntimeVersion",
      "description" : "The Live version of the Agent Runtime"
    },
    "TargetVersion" : {
      "$ref" : "#/definitions/AgentRuntimeVersion",
      "description" : "The target version of the AgentCore Runtime for the endpoint."
    },
    "Description" : {
      "$ref" : "#/definitions/AgentEndpointDescription",
      "description" : "The description of the AgentCore Runtime endpoint."
    },
    "AgentRuntimeEndpointArn" : {
      "$ref" : "#/definitions/AgentRuntimeEndpointArn",
      "description" : "The Amazon Resource Name (ARN) of the AgentCore Runtime."
    },
    "AgentRuntimeArn" : {
      "$ref" : "#/definitions/AgentRuntimeArn",
      "description" : "The ARN of the Agent Runtime"
    },
    "Status" : {
      "$ref" : "#/definitions/AgentRuntimeEndpointStatus",
      "description" : "The status of the Agent Runtime Endpoint"
    },
    "CreatedAt" : {
      "$ref" : "#/definitions/DateTimestamp",
      "description" : "The timestamp when the Agent Runtime Endpoint was created"
    },
    "LastUpdatedAt" : {
      "$ref" : "#/definitions/DateTimestamp",
      "description" : "The timestamp when the Agent Runtime Endpoint was last updated"
    },
    "Tags" : {
      "$ref" : "#/definitions/TagsMap"
    },
    "FailureReason" : {
      "type" : "string",
      "description" : "The reason for failure if the endpoint is in a failed state"
    }
  },
  "required" : [ "AgentRuntimeId", "Name" ],
  "replacementStrategy" : "create_then_delete",
  "readOnlyProperties" : [ "/properties/Id", "/properties/AgentRuntimeEndpointArn", "/properties/AgentRuntimeArn", "/properties/Status", "/properties/CreatedAt", "/properties/LastUpdatedAt", "/properties/FailureReason", "/properties/TargetVersion", "/properties/LiveVersion" ],
  "primaryIdentifier" : [ "/properties/AgentRuntimeEndpointArn" ],
  "additionalIdentifiers" : [ [ "/properties/Id" ] ],
  "createOnlyProperties" : [ "/properties/AgentRuntimeId", "/properties/Name" ],
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git",
  "handlers" : {
    "create" : {
      "permissions" : [ "bedrock-agentcore:CreateAgentRuntimeEndpoint", "bedrock-agentcore:GetAgentRuntime", "bedrock-agentcore:GetAgentRuntimeEndpoint", "bedrock-agentcore:TagResource", "bedrock-agentcore:ListTagsForResource" ]
    },
    "read" : {
      "permissions" : [ "bedrock-agentcore:GetAgentRuntime", "bedrock-agentcore:GetAgentRuntimeEndpoint", "bedrock-agentcore:ListTagsForResource" ]
    },
    "update" : {
      "permissions" : [ "bedrock-agentcore:UpdateAgentRuntimeEndpoint", "bedrock-agentcore:GetAgentRuntime", "bedrock-agentcore:GetAgentRuntimeEndpoint", "bedrock-agentcore:TagResource", "bedrock-agentcore:UntagResource", "bedrock-agentcore:ListTagsForResource" ]
    },
    "delete" : {
      "permissions" : [ "bedrock-agentcore:DeleteAgentRuntimeEndpoint", "bedrock-agentcore:GetAgentRuntime", "bedrock-agentcore:GetAgentRuntimeEndpoint" ]
    },
    "list" : {
      "permissions" : [ "bedrock-agentcore:ListAgentRuntimeEndpoints" ],
      "handlerSchema" : {
        "properties" : {
          "AgentRuntimeId" : {
            "$ref" : "resource-schema.json#/properties/AgentRuntimeId"
          }
        },
        "required" : [ "AgentRuntimeId" ]
      }
    }
  },
  "tagging" : {
    "cloudFormationSystemTags" : false,
    "tagOnCreate" : true,
    "tagProperty" : "/properties/Tags",
    "tagUpdatable" : true,
    "taggable" : true,
    "permissions" : [ "bedrock-agentcore:TagResource", "bedrock-agentcore:UntagResource", "bedrock-agentcore:ListTagsForResource" ]
  }
}