{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/oracle/json-schema/oracle-create-instance-pool-details-schema.json",
  "title": "CreateInstancePoolDetails",
  "description": "The data to create an instance pool.\n",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/oracle-computemanagement-api-openapi.yml#/components/schemas/CreateInstancePoolDetails",
  "properties": {
    "compartmentId": {
      "description": "The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the instance pool.\n",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "definedTags": {
      "additionalProperties": {
        "additionalProperties": {
          "description": "The value of the tag. Only the String type is supported.\n",
          "type": "object"
        },
        "description": "Key-value pair representing a defined tag key and value, scoped to a namespace.\n\nExample: `{\"CostCenter\": \"42\"}`\n",
        "type": "object"
      },
      "description": "Defined tags for this resource. Each key is predefined and scoped to a\nnamespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm).\n\nExample: `{\"Operations\": {\"CostCenter\": \"42\"}}`\n",
      "type": "object"
    },
    "displayName": {
      "description": "A user-friendly name. Does not have to be unique, and it's changeable.\nAvoid entering confidential information.\n",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "freeformTags": {
      "additionalProperties": {
        "type": "string"
      },
      "description": "Free-form tags for this resource. Each tag is a simple key-value pair with no\npredefined name, type, or namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm).\n\nExample: `{\"Department\": \"Finance\"}`\n",
      "type": "object"
    },
    "instanceConfigurationId": {
      "description": "The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the instance configuration associated\nwith the instance pool.\n",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "instanceDisplayNameFormatter": {
      "description": "A user-friendly formatter for the instance pool's instances. Instance displaynames follow the format.\nThe formatter does not retroactively change instance's displaynames, only instance displaynames in the future follow the format\n",
      "maxLength": 255,
      "minLength": 1,
      "type": "string",
      "x-default-description": "null"
    },
    "instanceHostnameFormatter": {
      "description": "A user-friendly formatter for the instance pool's instances. Instance hostnames follow the format.\nThe formatter does not retroactively change instance's hostnames, only instance hostnames in the future follow the format\n",
      "maxLength": 255,
      "minLength": 1,
      "type": "string",
      "x-default-description": "null"
    },
    "lifecycleManagement": {
      "$ref": "#/$defs/InstancePoolLifecycleManagementDetails"
    },
    "loadBalancers": {
      "description": "The load balancers to attach to the instance pool.\n",
      "items": {
        "$ref": "#/$defs/AttachLoadBalancerDetails"
      },
      "type": "array"
    },
    "placementConfigurations": {
      "description": "The placement configurations for the instance pool. Provide one placement configuration for\neach availability domain.\n\nTo use the instance pool with a regional subnet, provide a placement configuration for\neach availability domain, and include the regional subnet in each placement\nconfiguration.\nTo use compute cluster with instance pool, provide a single placement configuration.\n",
      "items": {
        "$ref": "#/$defs/CreateInstancePoolPlacementConfigurationDetails"
      },
      "type": "array"
    },
    "size": {
      "description": "The number of instances that should be in the instance pool.\n",
      "type": "integer"
    }
  },
  "required": [
    "compartmentId",
    "instanceConfigurationId",
    "placementConfigurations",
    "size"
  ],
  "$defs": {
    "AttachLoadBalancerDetails": {
      "description": "Represents a load balancer that is to be attached to an instance pool.",
      "properties": {
        "backendSetName": {
          "description": "The name of the backend set on the load balancer to add instances to.",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "loadBalancerId": {
          "description": "The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the load balancer to attach to the instance pool.\n",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "port": {
          "description": "The port value to use when creating the backend set.",
          "maximum": 65535,
          "minimum": 1,
          "type": "integer"
        },
        "vnicSelection": {
          "description": "Indicates which VNIC on each instance in the pool should be used to associate with the load balancer.\nPossible values are \"PrimaryVnic\" or the displayName of one of the secondary VNICs on the instance configuration\nthat is associated with the instance pool.\n",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "loadBalancerId",
        "backendSetName",
        "port",
        "vnicSelection"
      ]
    },
    "CreateInstancePoolPlacementConfigurationDetails": {
      "description": "The location for where an instance pool will place instances.",
      "properties": {
        "availabilityDomain": {
          "description": "The availability domain to place instances.\n\nExample: `Uocm:PHX-AD-1`\n",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "computeClusterId": {
          "description": "The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the\n[compute cluster](/iaas/Content/Compute/Tasks/compute-clusters.htm) that the instance will be created in.\n\nMake sure the compute cluster belongs to the same availability domain as specified in placement configuration otherwise the request will be rejected with 400.\nOnce this field is set, it cannot be updated. Also any update to the availability domain in placement configuration will be blocked.\n",
          "maxLength": 255,
          "minLength": 1,
          "type": "string",
          "x-default-description": "null"
        },
        "faultDomains": {
          "description": "The fault domains to place instances.\n\nIf you don't provide any values, the system makes a best effort to distribute\ninstances across all fault domains based on capacity.\n\nTo distribute the instances evenly across selected fault domains, provide a\nset of fault domains. For example, you might want instances to be evenly\ndistributed if your applications require high availability.\n\nTo get a list of fault domains, use the\n[ListFaultDomains](#/en/identity/20160918/FaultDomain/ListFaultDomains) operation\nin the Identity and Access Management Service API.\n\nExample: `[FAULT-DOMAIN-1, FAULT-DOMAIN-2, FAULT-DOMAIN-3]`\n",
          "items": {
            "type": "string"
          },
          "type": "array",
          "uniqueItems": true
        },
        "primarySubnetId": {
          "description": "The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the primary subnet in which to place instances. This field is deprecated.\nUse `primaryVnicSubnets` instead to set VNIC data for instances in the pool.\n",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "primaryVnicSubnets": {
          "$ref": "#/$defs/InstancePoolPlacementPrimarySubnet"
        },
        "secondaryVnicSubnets": {
          "description": "The set of secondary VNIC data for instances in the pool.",
          "items": {
            "$ref": "#/$defs/InstancePoolPlacementSecondaryVnicSubnet"
          },
          "type": "array",
          "uniqueItems": true
        }
      },
      "required": [
        "availabilityDomain"
      ]
    },
    "InstancePoolLifecycleActionsDetails": {
      "description": "The lifecycle actions for the instance pool.\n",
      "minProperties": 1,
      "properties": {
        "preTermination": {
          "$ref": "#/$defs/InstancePoolPreTerminationActionDetails"
        }
      }
    },
    "InstancePoolLifecycleManagementDetails": {
      "description": "The lifecycle management options for the instance pool.\n",
      "properties": {
        "lifecycleActions": {
          "$ref": "#/$defs/InstancePoolLifecycleActionsDetails"
        }
      },
      "required": [
        "lifecycleActions"
      ]
    },
    "InstancePoolPlacementIpv6AddressIpv6SubnetCidrDetails": {
      "description": "Optional. Used to specify from which subnet prefixes an IPv6 address should be allocated, or to assign valid available IPv6 addresses.\n",
      "properties": {
        "ipv6SubnetCidr": {
          "description": "Optional. Used to disambiguate which subnet prefix should be used to create an IPv6 allocation.\n",
          "maxLength": 45,
          "minLength": 1,
          "type": "string"
        }
      }
    },
    "InstancePoolPlacementPrimarySubnet": {
      "allOf": [
        {
          "$ref": "#/$defs/InstancePoolPlacementSubnetDetails"
        },
        {
          "type": "object"
        }
      ],
      "description": "Details about the IPv6 primary subnet."
    },
    "InstancePoolPlacementSecondaryVnicSubnet": {
      "allOf": [
        {
          "$ref": "#/$defs/InstancePoolPlacementSubnetDetails"
        },
        {
          "properties": {
            "displayName": {
              "description": "The display name of the VNIC. This is also used to match against the instance configuration defined\nsecondary VNIC.\n",
              "maxLength": 255,
              "minItems": 1,
              "minLength": 1,
              "type": "string"
            }
          },
          "type": "object"
        }
      ],
      "description": "The secondary VNIC object for the placement configuration for an instance pool."
    },
    "InstancePoolPlacementSubnetDetails": {
      "description": "Base details about the IPv6 subnet.",
      "properties": {
        "ipv6AddressIpv6SubnetCidrPairDetails": {
          "description": "A list of IPv6 prefix ranges from which the VNIC should be assigned an IPv6 address.\nYou can provide only the prefix ranges and OCI will select an available\naddress from the range. You can optionally choose to leave the prefix range empty\nand instead provide the specific IPv6 address that should be used from within that range.\n",
          "items": {
            "$ref": "#/$defs/InstancePoolPlacementIpv6AddressIpv6SubnetCidrDetails"
          },
          "type": "array"
        },
        "isAssignIpv6Ip": {
          "default": false,
          "description": "Whether to allocate an IPv6 address at instance and VNIC creation from an IPv6 enabled\nsubnet. Default: False. When provided you may optionally provide an IPv6 prefix\n(`ipv6SubnetCidr`) of your choice to assign the IPv6 address from. If `ipv6SubnetCidr`\nis not provided then an IPv6 prefix is chosen\nfor you.\n",
          "type": "boolean"
        },
        "subnetId": {
          "description": "The subnet [OCID](/iaas/Content/General/Concepts/identifiers.htm) for the secondary VNIC.",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "subnetId"
      ]
    },
    "InstancePoolPreTerminationActionDetails": {
      "description": "The data for pre-termination action for an instance pool\n",
      "properties": {
        "isEnabled": {
          "description": "Whether pre-termination action is enabled or not.\n",
          "type": "boolean"
        },
        "onTimeout": {
          "$ref": "#/$defs/InstancePoolPreTerminationActionHandleTimeoutDetails"
        },
        "timeout": {
          "description": "The timeout in seconds for pre-termination action for an instance pool.\n",
          "type": "integer"
        }
      },
      "required": [
        "isEnabled",
        "timeout",
        "onTimeout"
      ]
    },
    "InstancePoolPreTerminationActionHandleTimeoutDetails": {
      "description": "Options to handle timeout for pre-termination action.\n",
      "properties": {
        "preserveBlockVolumeMode": {
          "description": "Whether the block volume should be preserved after termination.\n",
          "enum": [
            "PRESERVE_ALWAYS",
            "PRESERVE_ON_TIMEOUT",
            "DELETE_ALWAYS"
          ],
          "type": "string"
        },
        "preserveBootVolumeMode": {
          "description": "Whether the boot volume should be preserved after termination.\n",
          "enum": [
            "PRESERVE_ALWAYS",
            "PRESERVE_ON_TIMEOUT",
            "DELETE_ALWAYS"
          ],
          "type": "string"
        }
      },
      "required": [
        "preserveBlockVolumeMode",
        "preserveBootVolumeMode"
      ]
    }
  }
}