{
 "additionalIdentifiers": [
  [
   "/properties/HarnessId"
  ]
 ],
 "additionalProperties": false,
 "createOnlyProperties": [
  "/properties/HarnessName",
  "/properties/Environment/AgentCoreRuntimeEnvironment/NetworkConfiguration"
 ],
 "definitions": {
  "AuthorizerConfiguration": {
   "additionalProperties": false,
   "properties": {
    "CustomJWTAuthorizer": {
     "$ref": "#/definitions/CustomJWTAuthorizerConfiguration"
    }
   },
   "type": "object"
  },
  "AuthorizingClaimMatchValueType": {
   "additionalProperties": false,
   "properties": {
    "ClaimMatchOperator": {
     "enum": [
      "EQUALS",
      "CONTAINS",
      "CONTAINS_ANY"
     ],
     "type": "string"
    },
    "ClaimMatchValue": {
     "$ref": "#/definitions/ClaimMatchValueType"
    }
   },
   "required": [
    "ClaimMatchValue",
    "ClaimMatchOperator"
   ],
   "type": "object"
  },
  "ClaimMatchValueType": {
   "additionalProperties": false,
   "oneOf": [
    {
     "required": [
      "MatchValueString"
     ]
    },
    {
     "required": [
      "MatchValueStringList"
     ]
    }
   ],
   "properties": {
    "MatchValueString": {
     "maxLength": 255,
     "minLength": 1,
     "pattern": "^[A-Za-z0-9_.-]+$",
     "type": "string"
    },
    "MatchValueStringList": {
     "items": {
      "maxLength": 255,
      "minLength": 1,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "type": "string"
     },
     "minItems": 1,
     "type": "array"
    }
   },
   "type": "object"
  },
  "ContainerConfiguration": {
   "additionalProperties": false,
   "properties": {
    "ContainerUri": {
     "maxLength": 1024,
     "minLength": 1,
     "pattern": "^(([0-9]{12})\\.dkr\\.ecr\\.([a-z0-9-]+)\\.amazonaws\\.com(\\.cn)?|public\\.ecr\\.aws)/((?:[a-z0-9]+(?:[._-][a-z0-9]+)*/)*[a-z0-9]+(?:[._-][a-z0-9]+)*)(?::([^:@]{1,300}))?(?:@(.+))?$",
     "type": "string"
    }
   },
   "required": [
    "ContainerUri"
   ],
   "type": "object"
  },
  "CustomClaimValidationType": {
   "additionalProperties": false,
   "properties": {
    "AuthorizingClaimMatchValue": {
     "$ref": "#/definitions/AuthorizingClaimMatchValueType"
    },
    "InboundTokenClaimName": {
     "maxLength": 255,
     "minLength": 1,
     "pattern": "^[A-Za-z0-9_.-:]+$",
     "type": "string"
    },
    "InboundTokenClaimValueType": {
     "enum": [
      "STRING",
      "STRING_ARRAY"
     ],
     "type": "string"
    }
   },
   "required": [
    "InboundTokenClaimName",
    "InboundTokenClaimValueType",
    "AuthorizingClaimMatchValue"
   ],
   "type": "object"
  },
  "CustomJWTAuthorizerConfiguration": {
   "additionalProperties": false,
   "properties": {
    "AllowedAudience": {
     "items": {
      "type": "string"
     },
     "minItems": 1,
     "type": "array"
    },
    "AllowedClients": {
     "items": {
      "type": "string"
     },
     "minItems": 1,
     "type": "array"
    },
    "AllowedScopes": {
     "items": {
      "maxLength": 255,
      "minLength": 1,
      "pattern": "^[\\x21\\x23-\\x5B\\x5D-\\x7E]+$",
      "type": "string"
     },
     "minItems": 1,
     "type": "array"
    },
    "CustomClaims": {
     "items": {
      "$ref": "#/definitions/CustomClaimValidationType"
     },
     "minItems": 1,
     "type": "array"
    },
    "DiscoveryUrl": {
     "pattern": "^.+/\\.well-known/openid-configuration$",
     "type": "string"
    }
   },
   "required": [
    "DiscoveryUrl"
   ],
   "type": "object"
  },
  "FilesystemConfiguration": {
   "additionalProperties": false,
   "properties": {
    "SessionStorage": {
     "$ref": "#/definitions/SessionStorageConfiguration"
    }
   },
   "required": [
    "SessionStorage"
   ],
   "type": "object"
  },
  "HarnessAgentCoreBrowserConfig": {
   "additionalProperties": false,
   "properties": {
    "BrowserArn": {
     "pattern": "^arn:aws(-[^:]+)?:bedrock-agentcore:[a-z0-9-]+:(aws|[0-9]{12}):browser(-custom)?/(aws\\.browser\\.v1|[a-zA-Z][a-zA-Z0-9_]{0,47}-[a-zA-Z0-9]{10})$",
     "type": "string"
    }
   },
   "type": "object"
  },
  "HarnessAgentCoreCodeInterpreterConfig": {
   "additionalProperties": false,
   "properties": {
    "CodeInterpreterArn": {
     "pattern": "^arn:aws(-[^:]+)?:bedrock-agentcore:[a-z0-9-]+:(aws|[0-9]{12}):code-interpreter(-custom)?/(aws\\.codeinterpreter\\.v1|[a-zA-Z][a-zA-Z0-9_]{0,47}-[a-zA-Z0-9]{10})$",
     "type": "string"
    }
   },
   "type": "object"
  },
  "HarnessAgentCoreGatewayConfig": {
   "additionalProperties": false,
   "properties": {
    "GatewayArn": {
     "pattern": "^arn:aws(|-cn|-us-gov):bedrock-agentcore:[a-z0-9-]{1,20}:[0-9]{12}:gateway/([0-9a-z][-]?){1,48}-[a-z0-9]{10}$",
     "type": "string"
    },
    "OutboundAuth": {
     "$ref": "#/definitions/HarnessGatewayOutboundAuth"
    }
   },
   "required": [
    "GatewayArn"
   ],
   "type": "object"
  },
  "HarnessAgentCoreMemoryConfiguration": {
   "additionalProperties": false,
   "properties": {
    "ActorId": {
     "type": "string"
    },
    "Arn": {
     "pattern": "^arn:aws:bedrock-agentcore:[a-z0-9-]+:[0-9]{12}:memory/[a-zA-Z][a-zA-Z0-9-_]{0,99}-[a-zA-Z0-9]{10}$",
     "type": "string"
    },
    "MessagesCount": {
     "type": "integer"
    },
    "RetrievalConfig": {
     "additionalProperties": false,
     "patternProperties": {
      "^[\\s\\S]*$": {
       "$ref": "#/definitions/HarnessAgentCoreMemoryRetrievalConfig"
      }
     },
     "type": "object"
    }
   },
   "required": [
    "Arn"
   ],
   "type": "object"
  },
  "HarnessAgentCoreMemoryRetrievalConfig": {
   "additionalProperties": false,
   "properties": {
    "RelevanceScore": {
     "type": "number"
    },
    "StrategyId": {
     "type": "string"
    },
    "TopK": {
     "type": "integer"
    }
   },
   "type": "object"
  },
  "HarnessAgentCoreRuntimeEnvironment": {
   "additionalProperties": false,
   "properties": {
    "AgentRuntimeArn": {
     "maxLength": 1011,
     "minLength": 20,
     "type": "string"
    },
    "AgentRuntimeId": {
     "type": "string"
    },
    "AgentRuntimeName": {
     "type": "string"
    },
    "FilesystemConfigurations": {
     "items": {
      "$ref": "#/definitions/FilesystemConfiguration"
     },
     "maxItems": 1,
     "minItems": 0,
     "type": "array"
    },
    "LifecycleConfiguration": {
     "$ref": "#/definitions/LifecycleConfiguration"
    },
    "NetworkConfiguration": {
     "$ref": "#/definitions/NetworkConfiguration"
    }
   },
   "type": "object"
  },
  "HarnessBedrockModelConfig": {
   "additionalProperties": false,
   "properties": {
    "MaxTokens": {
     "minimum": 1,
     "type": "integer"
    },
    "ModelId": {
     "type": "string"
    },
    "Temperature": {
     "maximum": 2,
     "minimum": 0,
     "type": "number"
    },
    "TopP": {
     "maximum": 1,
     "minimum": 0,
     "type": "number"
    }
   },
   "required": [
    "ModelId"
   ],
   "type": "object"
  },
  "HarnessEnvironmentArtifact": {
   "additionalProperties": false,
   "properties": {
    "ContainerConfiguration": {
     "$ref": "#/definitions/ContainerConfiguration"
    }
   },
   "type": "object"
  },
  "HarnessEnvironmentProvider": {
   "additionalProperties": false,
   "properties": {
    "AgentCoreRuntimeEnvironment": {
     "$ref": "#/definitions/HarnessAgentCoreRuntimeEnvironment"
    }
   },
   "type": "object"
  },
  "HarnessGatewayOutboundAuth": {
   "additionalProperties": false,
   "oneOf": [
    {
     "required": [
      "AwsIam"
     ]
    },
    {
     "required": [
      "None"
     ]
    },
    {
     "required": [
      "Oauth"
     ]
    }
   ],
   "properties": {
    "AwsIam": {
     "additionalProperties": false,
     "type": "object"
    },
    "None": {
     "additionalProperties": false,
     "type": "object"
    },
    "Oauth": {
     "$ref": "#/definitions/OAuthCredentialProvider"
    }
   },
   "type": "object"
  },
  "HarnessGeminiModelConfig": {
   "additionalProperties": false,
   "properties": {
    "ApiKeyArn": {
     "pattern": "^arn:aws:bedrock-agentcore:[a-z0-9-]+:[0-9]{12}:token-vault/[a-zA-Z0-9-.]+/apikeycredentialprovider/[a-zA-Z0-9-.]+$",
     "type": "string"
    },
    "MaxTokens": {
     "minimum": 1,
     "type": "integer"
    },
    "ModelId": {
     "type": "string"
    },
    "Temperature": {
     "maximum": 2,
     "minimum": 0,
     "type": "number"
    },
    "TopK": {
     "maximum": 500,
     "minimum": 0,
     "type": "integer"
    },
    "TopP": {
     "maximum": 1,
     "minimum": 0,
     "type": "number"
    }
   },
   "required": [
    "ModelId",
    "ApiKeyArn"
   ],
   "type": "object"
  },
  "HarnessInlineFunctionConfig": {
   "additionalProperties": false,
   "properties": {
    "Description": {
     "maxLength": 4096,
     "minLength": 1,
     "type": "string"
    },
    "InputSchema": {
     "type": "object"
    }
   },
   "required": [
    "Description",
    "InputSchema"
   ],
   "type": "object"
  },
  "HarnessMemoryConfiguration": {
   "additionalProperties": false,
   "properties": {
    "AgentCoreMemoryConfiguration": {
     "$ref": "#/definitions/HarnessAgentCoreMemoryConfiguration"
    }
   },
   "type": "object"
  },
  "HarnessModelConfiguration": {
   "additionalProperties": false,
   "oneOf": [
    {
     "required": [
      "BedrockModelConfig"
     ]
    },
    {
     "required": [
      "OpenAiModelConfig"
     ]
    },
    {
     "required": [
      "GeminiModelConfig"
     ]
    }
   ],
   "properties": {
    "BedrockModelConfig": {
     "$ref": "#/definitions/HarnessBedrockModelConfig"
    },
    "GeminiModelConfig": {
     "$ref": "#/definitions/HarnessGeminiModelConfig"
    },
    "OpenAiModelConfig": {
     "$ref": "#/definitions/HarnessOpenAiModelConfig"
    }
   },
   "type": "object"
  },
  "HarnessOpenAiModelConfig": {
   "additionalProperties": false,
   "properties": {
    "ApiKeyArn": {
     "pattern": "^arn:aws:bedrock-agentcore:[a-z0-9-]+:[0-9]{12}:token-vault/[a-zA-Z0-9-.]+/apikeycredentialprovider/[a-zA-Z0-9-.]+$",
     "type": "string"
    },
    "MaxTokens": {
     "minimum": 1,
     "type": "integer"
    },
    "ModelId": {
     "type": "string"
    },
    "Temperature": {
     "maximum": 2,
     "minimum": 0,
     "type": "number"
    },
    "TopP": {
     "maximum": 1,
     "minimum": 0,
     "type": "number"
    }
   },
   "required": [
    "ModelId",
    "ApiKeyArn"
   ],
   "type": "object"
  },
  "HarnessRemoteMcpConfig": {
   "additionalProperties": false,
   "properties": {
    "Headers": {
     "additionalProperties": false,
     "patternProperties": {
      "^[\\s\\S]*$": {
       "maxLength": 16383,
       "minLength": 1,
       "type": "string"
      }
     },
     "type": "object"
    },
    "Url": {
     "maxLength": 16383,
     "minLength": 1,
     "type": "string"
    }
   },
   "required": [
    "Url"
   ],
   "type": "object"
  },
  "HarnessSkill": {
   "additionalProperties": false,
   "properties": {
    "Path": {
     "minLength": 1,
     "type": "string"
    }
   },
   "required": [
    "Path"
   ],
   "type": "object"
  },
  "HarnessSlidingWindowConfiguration": {
   "additionalProperties": false,
   "properties": {
    "MessagesCount": {
     "type": "integer"
    }
   },
   "type": "object"
  },
  "HarnessStatus": {
   "enum": [
    "CREATING",
    "CREATE_FAILED",
    "UPDATING",
    "UPDATE_FAILED",
    "READY",
    "DELETING",
    "DELETE_FAILED"
   ],
   "type": "string"
  },
  "HarnessSummarizationConfiguration": {
   "additionalProperties": false,
   "properties": {
    "PreserveRecentMessages": {
     "type": "integer"
    },
    "SummarizationSystemPrompt": {
     "type": "string"
    },
    "SummaryRatio": {
     "type": "number"
    }
   },
   "type": "object"
  },
  "HarnessSystemContentBlock": {
   "additionalProperties": false,
   "properties": {
    "Text": {
     "minLength": 1,
     "type": "string"
    }
   },
   "required": [
    "Text"
   ],
   "type": "object"
  },
  "HarnessTool": {
   "additionalProperties": false,
   "properties": {
    "Config": {
     "$ref": "#/definitions/HarnessToolConfiguration"
    },
    "Name": {
     "maxLength": 64,
     "minLength": 1,
     "pattern": "^[a-zA-Z0-9_-]+$",
     "type": "string"
    },
    "Type": {
     "enum": [
      "remote_mcp",
      "agentcore_browser",
      "agentcore_gateway",
      "inline_function",
      "agentcore_code_interpreter"
     ],
     "type": "string"
    }
   },
   "required": [
    "Type"
   ],
   "type": "object"
  },
  "HarnessToolConfiguration": {
   "additionalProperties": false,
   "oneOf": [
    {
     "required": [
      "RemoteMcp"
     ]
    },
    {
     "required": [
      "AgentCoreBrowser"
     ]
    },
    {
     "required": [
      "AgentCoreGateway"
     ]
    },
    {
     "required": [
      "InlineFunction"
     ]
    },
    {
     "required": [
      "AgentCoreCodeInterpreter"
     ]
    }
   ],
   "properties": {
    "AgentCoreBrowser": {
     "$ref": "#/definitions/HarnessAgentCoreBrowserConfig"
    },
    "AgentCoreCodeInterpreter": {
     "$ref": "#/definitions/HarnessAgentCoreCodeInterpreterConfig"
    },
    "AgentCoreGateway": {
     "$ref": "#/definitions/HarnessAgentCoreGatewayConfig"
    },
    "InlineFunction": {
     "$ref": "#/definitions/HarnessInlineFunctionConfig"
    },
    "RemoteMcp": {
     "$ref": "#/definitions/HarnessRemoteMcpConfig"
    }
   },
   "type": "object"
  },
  "HarnessTruncationConfiguration": {
   "additionalProperties": false,
   "properties": {
    "Config": {
     "$ref": "#/definitions/HarnessTruncationStrategyConfiguration"
    },
    "Strategy": {
     "enum": [
      "sliding_window",
      "summarization",
      "none"
     ],
     "type": "string"
    }
   },
   "required": [
    "Strategy"
   ],
   "type": "object"
  },
  "HarnessTruncationStrategyConfiguration": {
   "additionalProperties": false,
   "properties": {
    "SlidingWindow": {
     "$ref": "#/definitions/HarnessSlidingWindowConfiguration"
    },
    "Summarization": {
     "$ref": "#/definitions/HarnessSummarizationConfiguration"
    }
   },
   "type": "object"
  },
  "LifecycleConfiguration": {
   "additionalProperties": false,
   "properties": {
    "IdleRuntimeSessionTimeout": {
     "maximum": 28800,
     "minimum": 60,
     "type": "integer"
    },
    "MaxLifetime": {
     "maximum": 28800,
     "minimum": 60,
     "type": "integer"
    }
   },
   "type": "object"
  },
  "NetworkConfiguration": {
   "additionalProperties": false,
   "properties": {
    "NetworkMode": {
     "enum": [
      "PUBLIC",
      "VPC"
     ],
     "type": "string"
    },
    "NetworkModeConfig": {
     "$ref": "#/definitions/VpcConfig"
    }
   },
   "required": [
    "NetworkMode"
   ],
   "type": "object"
  },
  "OAuthCredentialProvider": {
   "additionalProperties": false,
   "properties": {
    "CustomParameters": {
     "additionalProperties": false,
     "maxProperties": 10,
     "minProperties": 1,
     "patternProperties": {
      "^[\\s\\S]*$": {
       "maxLength": 2048,
       "minLength": 1,
       "type": "string"
      }
     },
     "type": "object"
    },
    "DefaultReturnUrl": {
     "maxLength": 2048,
     "minLength": 1,
     "pattern": "^\\w+:(\\/?\\/?)[^\\s]+$",
     "type": "string"
    },
    "GrantType": {
     "enum": [
      "CLIENT_CREDENTIALS",
      "AUTHORIZATION_CODE"
     ],
     "type": "string"
    },
    "ProviderArn": {
     "pattern": "^arn:([^:]*):([^:]*):([^:]*):([0-9]{12})?:(.+)$",
     "type": "string"
    },
    "Scopes": {
     "items": {
      "maxLength": 64,
      "minLength": 1,
      "type": "string"
     },
     "maxItems": 100,
     "type": "array"
    }
   },
   "required": [
    "ProviderArn",
    "Scopes"
   ],
   "type": "object"
  },
  "SessionStorageConfiguration": {
   "additionalProperties": false,
   "properties": {
    "MountPath": {
     "maxLength": 200,
     "minLength": 6,
     "pattern": "^/mnt/[a-zA-Z0-9._-]+/?$",
     "type": "string"
    }
   },
   "required": [
    "MountPath"
   ],
   "type": "object"
  },
  "Tag": {
   "additionalProperties": false,
   "properties": {
    "Key": {
     "maxLength": 128,
     "minLength": 1,
     "pattern": "^[a-zA-Z0-9\\s_.:/=+\\-@]*$",
     "type": "string"
    },
    "Value": {
     "maxLength": 256,
     "minLength": 0,
     "pattern": "^[a-zA-Z0-9\\s_.:/=+\\-@]*$",
     "type": "string"
    }
   },
   "required": [
    "Key",
    "Value"
   ],
   "type": "object"
  },
  "VpcConfig": {
   "additionalProperties": false,
   "properties": {
    "SecurityGroups": {
     "items": {
      "pattern": "^sg-[0-9a-zA-Z]{8,17}$",
      "type": "string"
     },
     "maxItems": 16,
     "minItems": 1,
     "type": "array"
    },
    "Subnets": {
     "items": {
      "pattern": "^subnet-[0-9a-zA-Z]{8,17}$",
      "type": "string"
     },
     "maxItems": 16,
     "minItems": 1,
     "type": "array"
    }
   },
   "required": [
    "SecurityGroups",
    "Subnets"
   ],
   "type": "object"
  }
 },
 "primaryIdentifier": [
  "/properties/Arn"
 ],
 "properties": {
  "AllowedTools": {
   "items": {
    "maxLength": 64,
    "minLength": 1,
    "pattern": "^(\\*|@?[^/]+(/[^/]+)?)$",
    "type": "string"
   },
   "type": "array"
  },
  "Arn": {
   "pattern": "^arn:([^:]+)?:bedrock-agentcore:[a-z0-9-]+:[0-9]{12}:harness/[a-zA-Z][a-zA-Z0-9_]{0,39}-[a-zA-Z0-9]{10}$",
   "type": "string"
  },
  "AuthorizerConfiguration": {
   "$ref": "#/definitions/AuthorizerConfiguration"
  },
  "CreatedAt": {
   "format": "date-time",
   "type": "string"
  },
  "Environment": {
   "$ref": "#/definitions/HarnessEnvironmentProvider"
  },
  "EnvironmentArtifact": {
   "$ref": "#/definitions/HarnessEnvironmentArtifact"
  },
  "EnvironmentVariables": {
   "additionalProperties": false,
   "maxProperties": 50,
   "patternProperties": {
    "^[\\s\\S]*$": {
     "maxLength": 5000,
     "minLength": 0,
     "type": "string"
    }
   },
   "type": "object"
  },
  "ExecutionRoleArn": {
   "maxLength": 2048,
   "minLength": 1,
   "pattern": "^arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+$",
   "type": "string"
  },
  "HarnessId": {
   "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,39}-[a-zA-Z0-9]{10}$",
   "type": "string"
  },
  "HarnessName": {
   "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,39}$",
   "type": "string"
  },
  "MaxIterations": {
   "type": "integer"
  },
  "MaxTokens": {
   "type": "integer"
  },
  "Memory": {
   "$ref": "#/definitions/HarnessMemoryConfiguration"
  },
  "Model": {
   "$ref": "#/definitions/HarnessModelConfiguration"
  },
  "Skills": {
   "items": {
    "$ref": "#/definitions/HarnessSkill"
   },
   "type": "array"
  },
  "Status": {
   "$ref": "#/definitions/HarnessStatus"
  },
  "SystemPrompt": {
   "items": {
    "$ref": "#/definitions/HarnessSystemContentBlock"
   },
   "type": "array"
  },
  "Tags": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/Tag"
   },
   "maxItems": 50,
   "type": "array"
  },
  "TimeoutSeconds": {
   "type": "integer"
  },
  "Tools": {
   "items": {
    "$ref": "#/definitions/HarnessTool"
   },
   "type": "array"
  },
  "Truncation": {
   "$ref": "#/definitions/HarnessTruncationConfiguration"
  },
  "UpdatedAt": {
   "format": "date-time",
   "type": "string"
  }
 },
 "readOnlyProperties": [
  "/properties/Arn",
  "/properties/HarnessId",
  "/properties/Status",
  "/properties/CreatedAt",
  "/properties/UpdatedAt",
  "/properties/Environment/AgentCoreRuntimeEnvironment/AgentRuntimeArn",
  "/properties/Environment/AgentCoreRuntimeEnvironment/AgentRuntimeName",
  "/properties/Environment/AgentCoreRuntimeEnvironment/AgentRuntimeId"
 ],
 "required": [
  "HarnessName",
  "ExecutionRoleArn",
  "Model"
 ],
 "tagging": {
  "cloudFormationSystemTags": true,
  "tagOnCreate": true,
  "tagProperty": "/properties/Tags",
  "tagUpdatable": true,
  "taggable": true
 },
 "typeName": "AWS::BedrockAgentCore::Harness"
}
