{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-bedrock/json-schema/amazon-bedrock-create-code-interpreter-request-schema.json",
  "title": "CreateCodeInterpreterRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-bedrock-code-interpreters-api-openapi.yml#/components/schemas/CreateCodeInterpreterRequest",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the code interpreter. The name must be unique within your account."
    },
    "description": {
      "type": "string",
      "description": "The description of the code interpreter."
    },
    "executionRoleArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the IAM role that provides permissions for the code interpreter to access Amazon Web Services services."
    },
    "networkConfiguration": {
      "$ref": "#/$defs/CodeInterpreterNetworkConfiguration"
    },
    "certificates": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Certificate"
      },
      "description": "A list of certificates to install in the code interpreter."
    },
    "filesystemConfigurations": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ToolsFileSystemConfiguration"
      },
      "description": "The file system configurations to mount into the code interpreter. Use these configurations to mount your own Amazon Simple Storage Service (Amazon S3) Files or Amazon Elastic File System (Amazon EFS) access points. Your sessions can then access your data. If you don't specify this field, no file systems are mounted."
    },
    "clientToken": {
      "type": "string",
      "description": "A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, Amazon Bedrock AgentCore ignores the request but does not return an error."
    },
    "tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "A map of tag keys and values to assign to the code interpreter. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment."
    }
  },
  "required": [
    "name",
    "networkConfiguration"
  ],
  "$defs": {
    "BedrockAgentcoreControlVpcConfig": {
      "type": "object",
      "properties": {
        "securityGroups": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The security groups associated with the VPC configuration."
        },
        "subnets": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The subnets associated with the VPC configuration."
        },
        "requireServiceS3Endpoint": {
          "type": "boolean",
          "description": "This field applies only to Agent Runtimes. It is not applicable to Browsers or Code Interpreters. Controls whether a service-managed Amazon S3 gateway endpoint is provisioned in the VPC network topology for the agent runtime. This gateway is used by Amazon Bedrock AgentCore Runtime to download code and container images during agent startup. Starting May 5, 2026, Amazon Bedrock AgentCore Runtime is gradually rolling out a change to how network isolation is configured for VPC mode agents. Agent runtimes created on or after this rollout will no longer include the service-managed Amazon S3 gateway"
        }
      },
      "required": [
        "securityGroups",
        "subnets"
      ]
    },
    "Certificate": {
      "type": "object",
      "properties": {
        "location": {
          "$ref": "#/$defs/CertificateLocation"
        }
      },
      "required": [
        "location"
      ]
    },
    "CertificateLocation": {
      "type": "object",
      "properties": {
        "secretsManager": {
          "$ref": "#/$defs/SecretsManagerLocation"
        }
      },
      "description": "Exactly one member is set."
    },
    "CodeInterpreterNetworkConfiguration": {
      "type": "object",
      "properties": {
        "networkMode": {
          "type": "string",
          "enum": [
            "PUBLIC",
            "SANDBOX",
            "VPC"
          ],
          "description": "The network mode for the code interpreter. This field specifies how the code interpreter connects to the network."
        },
        "vpcConfig": {
          "$ref": "#/$defs/BedrockAgentcoreControlVpcConfig"
        }
      },
      "required": [
        "networkMode"
      ]
    },
    "EfsConfiguration": {
      "type": "object",
      "properties": {
        "accessPointArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the Amazon Elastic File System (Amazon EFS) access point to mount."
        },
        "mountPath": {
          "type": "string",
          "description": "The absolute path within the session at which the access point is mounted, for example /mnt/efs. Each mount path must be unique across all file system configurations in the session."
        },
        "fileSystemArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the Amazon Elastic File System (Amazon EFS) file system that owns the access point."
        }
      },
      "required": [
        "accessPointArn",
        "mountPath",
        "fileSystemArn"
      ]
    },
    "S3FilesConfiguration": {
      "type": "object",
      "properties": {
        "accessPointArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the Amazon Simple Storage Service (Amazon S3) Files access point to mount."
        },
        "mountPath": {
          "type": "string",
          "description": "The absolute path within the session at which the access point is mounted, for example /mnt/s3data. Each mount path must be unique across all file system configurations in the session."
        },
        "fileSystemArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the Amazon Simple Storage Service (Amazon S3) Files file system that owns the access point."
        }
      },
      "required": [
        "accessPointArn",
        "mountPath",
        "fileSystemArn"
      ]
    },
    "SecretsManagerLocation": {
      "type": "object",
      "properties": {
        "secretArn": {
          "type": "string",
          "description": "The ARN of the Amazon Web Services Secrets Manager secret containing the certificate."
        }
      },
      "required": [
        "secretArn"
      ]
    },
    "ToolsFileSystemConfiguration": {
      "type": "object",
      "properties": {
        "s3FilesConfiguration": {
          "$ref": "#/$defs/S3FilesConfiguration"
        },
        "efsConfiguration": {
          "$ref": "#/$defs/EfsConfiguration"
        }
      },
      "description": "Exactly one member is set."
    }
  }
}