Skip to main content

Compute Config API Reference

Customer-hosted cloud features

note

Some features are only available on customer-hosted clouds. Reach out to support@anyscale.com for info.

Compute Config CLI

anyscale compute-config create

Usage

anyscale compute-config create [OPTIONS] [COMPUTE_CONFIG_FILE]

Create a new version of a compute config from a YAML file.

(1) To use the new schema defined at https://docs.anyscale.com/reference/compute-config-api#computeconfig, use the -f/--config-file flag:

anyscale compute-config create -f new_schema_config.yaml

(2) To use the old schema defined at https://docs.anyscale.com/reference/python-sdk/models#createclustercomputeconfig, use the positional argument:

anyscale compute-config create old_schema_config.yaml

Options

  • -n/--name: Name for the created compute config. This should not include a version tag. If a name is not provided, an anonymous compute config is generated. Anonymous compute configs are not accessible in the UI and can only be referenced by their ID.
  • -f/--config-file: Path to a YAML config file defining the compute config. Schema: https://docs.anyscale.com/reference/compute-config-api#computeconfig.

Examples

$ anyscale compute-config create -n my-compute-config -f compute_config.yaml
(anyscale +3.7s) Created compute config: 'my-compute-config:1'
(anyscale +3.7s) View the compute config in the UI: 'https://console.anyscale.com/v2/...'

$cat compute_config.yaml
head_node:
instance_type: m5.8xlarge
worker_nodes:
- instance_type: m5.8xlarge
min_nodes: 5
max_nodes: 5
market_type: ON_DEMAND # (Optional) Defaults to ON_DEMAND
- instance_type: g4dn.xlarge
min_nodes: 1
max_nodes: 10
market_type: PREFER_SPOT # (Optional) Defaults to ON_DEMAND
min_resources: # (Optional) Defaults to no minimum.
CPU: 1
GPU: 1
max_resources: # (Optional) Defaults to no maximum.
CPU: 6
GPU: 1

anyscale compute-config get

Usage

anyscale compute-config get [OPTIONS] [COMPUTE_CONFIG_NAME]

Get the details of a compute config.

The name can contain an optional version, e.g., 'name:version'. If no version is provided, the latest one will be archived.

Options

Examples

$ anyscale compute-config get -n my-compute-config
name: my-compute-config:1
id: cpt_buthu4glxj3azv4e287jad3ya3
config:
cloud: aviary-prod-us-east-1
head_node:
instance_type: m5.8xlarge
resources:
CPU: 0
GPU: 0
worker_nodes:
- instance_type: m5.8xlarge
name: m5.8xlarge
min_nodes: 5
max_nodes: 5
market_type: ON_DEMAND
- instance_type: g4dn.xlarge
name: g4dn.xlarge
min_nodes: 1
max_nodes: 10
market_type: PREFER_SPOT
min_resources:
CPU: 1
GPU: 1
max_resources:
CPU: 6
GPU: 1
enable_cross_zone_scaling: false
flags: {}

anyscale compute-config archive

Usage

anyscale compute-config archive [OPTIONS] [COMPUTE_CONFIG_NAME]

Archive all versions of a specified compute config.

Options

  • -n/--name: Name of the compute config to archive.
  • --compute-config-id/--id: ID of the compute config to archive. Alternative to name.

Examples

$ anyscale compute-config archive -n my-compute-config
(anyscale +2.3s) Compute config is successfully archived.

Compute Config SDK

anyscale.compute_config.create

Create a new version of a compute config.

Returns the full name of the registered compute config, including the version.

Arguments

  • config (ComputeConfig): The config options defining the compute config.
  • name (str | None): The name of the compute config. This should not include a version tag. If a name is not provided, one will be automatically generated.

Returns: str

Examples

import anyscale
from anyscale.compute_config.models import ComputeConfig, HeadNodeConfig, MarketType, WorkerNodeGroupConfig

config = ComputeConfig(
head_node=HeadNodeConfig(
instance_type="m5.8xlarge",
),
worker_nodes=[
WorkerNodeGroupConfig(
instance_type="m5.8xlarge",
min_nodes=5,
max_nodes=5,
),
WorkerNodeGroupConfig(
instance_type="m5.4xlarge",
min_nodes=1,
max_nodes=10,
market_type=MarketType.SPOT,
),
],
)
full_name: str = anyscale.compute_config.create(config, name="my-compute-config")

anyscale.compute_config.get

Get the compute config with the specified name.

The name can contain an optional version tag, i.e., 'name:version'. If no version is provided, the latest one will be returned.

Arguments

  • name (str): The name of the compute config. This can inclue an optional version tag, i.e., 'name:version'. If no version tag is provided, the latest version will be returned.
  • include_archived (bool) = False: Whether to consider archived compute configs (defaults to False).

Returns: ComputeConfigVersion

Examples

import anyscale
from anyscale.compute_config.models import ComputeConfig

compute_config: ComputeConfig = anyscale.compute_config.get("my-compute-config")

anyscale.compute_config.archive

Archive a compute config and all of its versions.

The name can contain an optional version, e.g., 'name:version'. If no version is provided, the latest one will be archived.

Once a compute config is archived, its name will no longer be usable in the organization.

Arguments

  • name (str): Name of the compute config.

Examples

import anyscale

anyscale.compute_config.archive(name="my-compute-config")

Compute Config Models

ComputeConfig

Configuration for instance types and cloud resources for a cluster.

Fields

  • cloud (str | None): The Anyscale Cloud to run this workload on. If not provided, the organization default will be used (or, if running in a workspace, the cloud of the workspace).
  • head_node (HeadNodeConfig | Dict | None): Configuration options for the head node of the cluster. Defaults to the cloud's default head node configuration.
  • worker_nodes (List[WorkerNodeGroupConfig | Dict] | None): Configuration options for the worker nodes of the cluster. If not provided, worker nodes will be automatically selected based on logical resource requests. To use a head-node only cluster, pass [] here.
  • min_resources (Dict[str, float] | None): Total minimum logical resources across all nodes in the cluster. Resources omitted from this field have no minimum.
  • max_resources (Dict[str, float] | None): Total maximum logical resources across all nodes in the cluster. Resources omitted from this field have no maximum.
  • zones (List[str] | None): Availability zones to consider for this cluster. Defaults to all zones in the cloud's region. By default all instances with user workloads scheduled on them will run in the same zone to save cost, unless enable_cross_zone_scaling is set.
  • enable_cross_zone_scaling (bool): Allow instances in the cluster to be run across multiple zones. This is recommended when running production services (for fault-tolerance in a zone failure scenario). It is not recommended for workloads that have a large amount of inter-zone communication due to the possibility of higher costs and degraded performance. When false, all instances with user workloads scheduled on them (e.g. all worker nodes in multi-node clusters) will run in the same zone to save cost.
  • advanced_instance_config (Dict[str, Any] | None): Advanced instance configurations that will be passed through to the cloud provider.
  • flags (Dict[str, Any] | None): Cluster-level flags specifying advanced or experimental options.

Python Methods

def __init__(self, **fields) -> ComputeConfig
"""Construct a model with the provided field values set."""

def options(self, **fields) -> ComputeConfig
"""Return a copy of the model with the provided field values overwritten."""

def to_dict(self) -> Dict[str, Any]
"""Return a dictionary representation of the model."""

Examples

cloud: my-cloud
zones: # (Optional) Defaults to to all zones in a region.
- us-west-2a
- us-west-2b
head_node:
instance_type: m5.8xlarge
worker_nodes:
- instance_type: m5.8xlarge
min_nodes: 5
max_nodes: 5
market_type: PREFER_SPOT # (Optional) Defaults to ON_DEMAND
- instance_type: g5.4xlarge
min_nodes: 1
max_nodes: 10
market_type: SPOT # (Optional) Defaults to ON_DEMAND
min_resources: # (Optional) Defaults to no minimum.
CPU: 1
GPU: 1
CUSTOM_RESOURCE: 0
max_resources: # (Optional) Defaults to no maximum.
CPU: 6
GPU: 10
CUSTOM_RESOURCE: 10
enable_cross_zone_scaling: true # (Optional) Defaults to false.
advanced_instance_config: # (Optional) Defaults to no advanced configurations.
# AWS specific configuration example
BlockDeviceMappings:
- DeviceName: DEVICE_NAME
Ebs:
VolumeSize: VOLUME_SIZE
DeleteOnTermination: DELETE_ON_TERMINATION
IamInstanceProfile:
Arn: IAM_INSTANCE_PROFILE_ARN
NetworkInterfaces:
- SubnetId: SUBNET_ID
Groups:
- SECURITY_GROUP_ID
AssociatePublicIpAddress: ASSOCIATE_PUBLIC_IP
TagSpecifications:
- ResourceType: RESOURCE_TYPE
Tags:
- Key: TAG_KEY
Value: TAG_VALUE
# GCP specific configuration example
instance_properties:
disks:
- boot: BOOT_OPTION
auto_delete: AUTO_DELETE_OPTION
initialize_params:
disk_size_gb: DISK_SIZE_GB
service_accounts:
- email: SERVICE_ACCOUNT_EMAIL
scopes:
- SCOPE_URL
network_interfaces:
- subnetwork: SUBNETWORK_URL
access_configs:
- type: ACCESS_CONFIG_TYPE
labels:
LABEL_KEY: LABEL_VALUE

HeadNodeConfig

Configuration options for the head node of a cluster.

Fields

  • instance_type (str): Cloud provider instance type, e.g., m5.2xlarge on AWS or n2-standard-8 on GCP.
  • resources (Dict[str, float] | None): Logical resources that will be available on this node. Defaults to match the physical resources of the instance type.
  • advanced_instance_config (Dict[str, Any] | None): Advanced instance configurations that will be passed through to the cloud provider.
  • flags (Dict[str, Any] | None): Node-level flags specifying advanced or experimental options.
  • cloud_deployment (CloudDeployment | Dict[str, str] | None): Cloud deployment selectors for a node group; one or more selectors may be passed to target a specific deployment from all of a cloud's deployments.

Python Methods

def __init__(self, **fields) -> HeadNodeConfig
"""Construct a model with the provided field values set."""

def options(self, **fields) -> HeadNodeConfig
"""Return a copy of the model with the provided field values overwritten."""

def to_dict(self) -> Dict[str, Any]
"""Return a dictionary representation of the model."""

Examples

head_node:
instance_type: m5.8xlarge

WorkerNodeGroupConfig

Configuration options for a worker node group in a cluster.

Clusters can have multiple worker node groups that use different instance types or configurations.

Fields

  • instance_type (str): Cloud provider instance type, e.g., m5.2xlarge on AWS or n2-standard-8 on GCP.
  • resources (Dict[str, float] | None): Logical resources that will be available on this node. Defaults to match the physical resources of the instance type.
  • advanced_instance_config (Dict[str, Any] | None): Advanced instance configurations that will be passed through to the cloud provider.
  • flags (Dict[str, Any] | None): Node-level flags specifying advanced or experimental options.
  • cloud_deployment (CloudDeployment | Dict[str, str] | None): Cloud deployment selectors for a node group; one or more selectors may be passed to target a specific deployment from all of a cloud's deployments.
  • name (str | None): Unique name of this worker group. Defaults to a human-friendly representation of the instance type.
  • min_nodes (int): Minimum number of nodes of this type that will be kept running in the cluster.
  • max_nodes (int): Maximum number of nodes of this type that can be running in the cluster.
  • market_type (str | MarketType): The type of instances to use (see MarketType enum values for details).

Python Methods

def __init__(self, **fields) -> WorkerNodeGroupConfig
"""Construct a model with the provided field values set."""

def options(self, **fields) -> WorkerNodeGroupConfig
"""Return a copy of the model with the provided field values overwritten."""

def to_dict(self) -> Dict[str, Any]
"""Return a dictionary representation of the model."""

Examples

worker_nodes:
- instance_type: m5.8xlarge
min_nodes: 5
max_nodes: 5
- instance_type: m5.4xlarge
min_nodes: 1
max_nodes: 10
market_type: SPOT

MarketType

Market type of instances to use (on-demand vs. spot).

Values

  • ON_DEMAND: Use on-demand instances only.
  • SPOT: Use spot instances only.
  • PREFER_SPOT: Prefer to use spot instances, but fall back to on-demand if necessary. If on-demand instances are running and spot instances become available, the on-demand instances will be evicted and replaced with spot instances.

CloudDeployment

Cloud deployment selectors for a node group; one or more selectors may be passed to target a specific deployment from all of a cloud's deployments.

Fields

  • provider (str | None): Cloud provider name, e.g., aws or gcp.
  • region (str | None): Cloud provider region, e.g., us-west-2.
  • machine_pool (str | None): Machine pool name.
  • id (str | None): Cloud deployment ID from cloud setup.

Python Methods

def to_dict(self) -> Dict[str, Any]
"""Return a dictionary representation of the model."""

Examples

cloud_deployment:
provider: aws
region: us-west-2
machine_pool: machine-pool-name
id: cldrsrc_1234567890

ComputeConfigVersion

Details of a created version of a compute config.

Includes the config options and metadata such as the name, version, and ID.

Fields

  • name (str): Name of the compute config including the version tag, i.e., 'name:version'.
  • id (str): Unique ID of the compute config.
  • config (ComputeConfig): The compute configuration.

Python Methods

def to_dict(self) -> Dict[str, Any]
"""Return a dictionary representation of the model."""

Examples

import anyscale
from anyscale.compute_config.models import (
ComputeConfigVersion
)

version: ComputeConfigVersion = anyscale.compute_config.get("my-compute-config")

Compute Config SDK Legacy

The AnyscaleSDK class must be constructed in order to make calls to the SDK. This class allows you to create an authenticated client in which to use the SDK.

ParamTypeDescription
auth_tokenOptional StringAuthentication token used to verify you have permissions to access Anyscale. If not provided, permissions default to the credentials set for your current user. Credentials can be set by following the instructions on this page: https://console.anyscale.com/credentials

Example

from anyscale import AnyscaleSDK

sdk = AnyscaleSDK()

create_cluster_compute Legacy

warning

This command is deprecated. Upgrade to anyscale.compute_config.create.

Creates a Cluster Compute. If the specified compute config is anonymous, returns an existing compute config if an anonymous one exists with the same config.

Parameters

NameTypeDescriptionNotes
create_cluster_computeCreateClusterCompute

Returns ClustercomputeResponse

delete_cluster_compute Legacy

warning

This command is deprecated. Upgrade to anyscale.compute_config.archive.

Deletes a Cluster Compute.

Parameters

NameTypeDescriptionNotes
cluster_compute_idstrID of the Cluster Compute to delete.Defaults to null

Returns void (empty response body)

get_cluster_compute Legacy

warning

This command is deprecated. Upgrade to anyscale.compute_config.get.

Retrieves a Cluster Compute.

Parameters

NameTypeDescriptionNotes
cluster_compute_idstrID of the Cluster Compute to retrieve.Defaults to null

Returns ClustercomputeResponse

get_default_cluster_compute Legacy

warning

This command is deprecated. Upgrade to anyscale.compute_config.get.

Returns a default cluster compute that can be used with a given cloud.

Parameters

NameTypeDescriptionNotes
cloud_idoptional strThe cloud id whose default cluster compute you want to fetch. If None, will use the default cloud.Defaults to null

Returns ClustercomputeResponse

search_cluster_computes Legacy

Limited support

This command is not actively maintained. Use with caution.

Lists all Cluster Computes the user has access to, matching the input query.

Parameters

NameTypeDescriptionNotes
cluster_computes_queryClusterComputesQuery

Returns ClustercomputeListResponse

Compute Config Models Legacy

ClusterCompute Legacy

NameTypeDescriptionNotes
idstr[default to null]
namestr[default to null]
creator_idstr[default to null]
organization_idstr[default to null]
project_idstr[optional] [default to null]
created_atdatetime[default to null]
last_modified_atdatetime[default to null]
deleted_atdatetime[optional] [default to null]
archived_atdatetime[optional] [default to null]
configClusterComputeConfig[default to null]
versionint[default to null]
anonymousbool[default to null]

ClusterComputeConfig Legacy

Configuration of compute resources to use for launching a Cluster. Used when reading a cluster compute.

NameTypeDescriptionNotes
cloud_idstrThe ID of the Anyscale cloud to use for launching Clusters.[default to null]
max_workersintDesired limit on total running workers for this Cluster.[optional] [default to null]
regionstrThe region to launch Clusters in, e.g. "us-west-2".[default to null]
allowed_azsList[str]The availability zones that sessions are allowed to be launched in, e.g. "us-west-2a". If not specified or "any" is provided as the option, any AZ may be used. If "any" is provided, it must be the only item in the list.[optional] [default to null]
head_node_typeComputeNodeTypeNode configuration to use for the head node.[default to null]
worker_node_typesList[WorkerNodeType]A list of node types to use for worker nodes.[optional] [default to null]
aws_advanced_configurations_jsonobjectThe advanced configuration json that we pass directly AWS APIs when launching an instance. We may do some validation on this json and reject the json if it is using a configuration that Anyscale does not support.[optional] [default to null]
awsAWSNodeOptionsDEPRECATED: Please provide instance configuration in the `aws_advanced_configurations_json` field. Fields specific to AWS node types.[optional] [default to null]
gcp_advanced_configurations_jsonobjectThe advanced configuration json that we pass directly GCP APIs when launching an instance. We may do some validation on this json and reject the json if it is using a configuration that Anyscale does not support.[optional] [default to null]
gcpGCPNodeOptionsDEPRECATED: Please provide instance configuration in the `gcp_advanced_configurations_json` field. Fields specific to GCP node types.[optional] [default to null]
azureobjectDEPRECATED: We don't currently support azure. Fields specific to Azure node types.[optional] [default to null]
maximum_uptime_minutesintIf set to a positive number, Anyscale will terminate the cluster this many minutes after cluster start.[optional] [default to null]
auto_select_worker_configboolIf set to true, worker node groups will automatically be selected based on workload.[optional] [default to false]
flagsobjectA set of advanced cluster-level flags that can be used to configure a particular workload.[optional] [default to null]
idle_termination_minutesintIf set to a positive number, Anyscale will terminate the cluster this many minutes after the cluster is idle. Idle time is defined as the time during which a Cluster is not running a user command or a Ray driver. Time spent running commands on Jupyter or ssh is still considered 'idle'. To disable, set this field to 0.[optional] [default to null]

ClusterComputesQuery Legacy

NameTypeDescriptionNotes
project_idstrFilters Cluster Computes by project. If this field is absent, no filtering is done.[optional] [default to null]
creator_idstrFilters Cluster Computes by creator. If this field is absent, no filtering is done.[optional] [default to null]
nameTextQueryFilters Cluster Computes by name. If this field is absent, no filtering is done.[optional] [default to null]
include_anonymousboolWhether to include anonymous Cluster Computes in the search.[optional] [default to false]
pagingPageQueryPagination information.[optional] [default to null]
cloud_idstrFilters Compute Computes by cloud. If this field is absent, no filtering is done.[optional] [default to null]
versionintFilters Cluster Computes by version. Versions are positive integers. Setting this field to -1 will return only the latest version of each Cluster Compute. Setting this field to -2 will not filter by version. For example, this can be used to fetch all versions of a Cluster Compute. Deprecated behavior: Setting version to None is equivalent to setting version to '-1'.[optional] [default to null]

ClustercomputeListResponse Legacy

A list response form the API. Contains a field "results" which has the contents of the response.

NameTypeDescriptionNotes
resultsList[ClusterCompute][default to null]
metadataListResponseMetadata[optional] [default to null]

ClustercomputeResponse Legacy

A response from the API. Contains a field "result" which has the contents of the response.

NameTypeDescriptionNotes
resultClusterCompute[default to null]

ComputeNodeType Legacy

NameTypeDescriptionNotes
namestrAn arbitrary name for this node type, which will be registered with OSS available_node_types.[default to null]
instance_typestrThe cloud provider instance type to use for this node.[default to null]
resourcesResourcesDeclaration of node resources for Autoscaler.[optional] [default to null]
aws_advanced_configurations_jsonobjectThe advanced configuration json that we pass directly AWS APIs when launching an instance. We may do some validation on this json and reject the json if it is using a configuration that Anyscale does not support.[optional] [default to null]
aws_advanced_configurationsAWSNodeOptionsDEPRECATED: Please provide instance configuration in the `aws_advanced_configurations_json` field. Additional AWS-specific configurations can be specified per node type and they will override the configuration specified for the whole cloud.[optional] [default to null]
gcp_advanced_configurations_jsonobjectThe advanced configuration json that we pass directly GCP APIs when launching an instance. We may do some validation on this json and reject the json if it is using a configuration that Anyscale does not support.[optional] [default to null]
gcp_advanced_configurationsGCPNodeOptionsDEPRECATED: Please provide instance configuration in the `gcp_advanced_configurations_json` field. Additional GCP-specific configurations can be specified per node type and they will override the configuration specified for the whole cloud.[optional] [default to null]
flagsobjectA set of advanced node-level flags that can be used to configure a particular workload.[optional] [default to null]

ComputeTemplate Legacy

DEPRECATED: Please use ClusterCompute instead.

NameTypeDescriptionNotes
idstr[default to null]
namestr[default to null]
creator_idstr[default to null]
organization_idstr[default to null]
project_idstr[optional] [default to null]
created_atdatetime[default to null]
last_modified_atdatetime[default to null]
deleted_atdatetime[optional] [default to null]
archived_atdatetime[optional] [default to null]
configComputeTemplateConfig[default to null]
versionint[default to null]
anonymousbool[default to null]

ComputeTemplateConfig Legacy

DEPRECATED: Please use ClusterCompute and the corresponding ClusterComputeConfig instead. Configuration of compute resources to use for launching a session. Used when reading a compute template.

NameTypeDescriptionNotes
cloud_idstrThe ID of the Anyscale cloud to use for launching sessions.[default to null]
max_workersintDesired limit on total running workers for this session.[optional] [default to null]
regionstrThe region to launch sessions in, e.g. "us-west-2".[default to null]
allowed_azsList[str]The availability zones that sessions are allowed to be launched in, e.g. "us-west-2a". If not specified or "any" is provided as the option, any AZ may be used. If "any" is provided, it must be the only item in the list.[optional] [default to null]
head_node_typeComputeNodeTypeNode configuration to use for the head node.[default to null]
worker_node_typesList[WorkerNodeType]A list of node types to use for worker nodes.[optional] [default to null]
aws_advanced_configurations_jsonobjectThe advanced configuration json that we pass directly AWS APIs when launching an instance. We may do some validation on this json and reject the json if it is using a configuration that Anyscale does not support.[optional] [default to null]
awsAWSNodeOptionsDEPRECATED: Please provide instance configuration in the `aws_advanced_configurations_json` field. Fields specific to AWS node types.[optional] [default to null]
gcp_advanced_configurations_jsonobjectThe advanced configuration json that we pass directly GCP APIs when launching an instance. We may do some validation on this json and reject the json if it is using a configuration that Anyscale does not support.[optional] [default to null]
gcpGCPNodeOptionsDEPRECATED: Please provide instance configuration in the `gcp_advanced_configurations_json` field. Fields specific to GCP node types.[optional] [default to null]
azureobjectDEPRECATED: We don't currently support azure. Fields specific to Azure node types.[optional] [default to null]
maximum_uptime_minutesintIf set to a positive number, Anyscale will terminate the cluster this many minutes after cluster start.[optional] [default to null]
auto_select_worker_configboolIf set to true, worker node groups will automatically be selected based on workload.[optional] [default to false]
flagsobjectA set of advanced cluster-level flags that can be used to configure a particular workload.[optional] [default to null]
idle_termination_minutesintIf set to a positive number, Anyscale will terminate the cluster this many minutes after the cluster is idle. Idle time is defined as the time during which a Cluster is not running a user command or a Ray driver. Time spent running commands on Jupyter or ssh is still considered 'idle'. To disable, set this field to 0.[optional] [default to null]

ComputeTemplateQuery Legacy

NameTypeDescriptionNotes
orgwideboolThis option is deprectated. It does nothing.[optional] [default to false]
project_idstr[optional] [default to null]
creator_idstrFilters Compute Templates by creator. This is only supported when `orgwide` is True.[optional] [default to null]
nameTextQueryFilters Compute Templates by name. If this field is absent, no filtering is done.[optional] [default to null]
include_anonymousboolWhether to include anonymous Compute Templates in the search.Anonymous compute templates are usually not shown in list views.[optional] [default to false]
archive_statusArchiveStatusThe archive status to filter by. Defaults to unarchived.[optional] [default to null]
cloud_idstrFilters Compute Templates by cloud[optional] [default to null]
versionintFilters Compute Templates by version. Versions are positive integers. Setting this field to -1 will return only the latest version of each Compute Template. Setting this field to -2 will not filter by version. Setting version to None is equivalent to setting version to '-1'.[optional] [default to null]

ComputetemplateListResponse Legacy

A list response form the API. Contains a field "results" which has the contents of the response.

NameTypeDescriptionNotes
resultsList[ComputeTemplate][default to null]
metadataListResponseMetadata[optional] [default to null]

ComputetemplateResponse Legacy

A response from the API. Contains a field "result" which has the contents of the response.

NameTypeDescriptionNotes
resultComputeTemplate[default to null]

ComputetemplateconfigResponse Legacy

A response from the API. Contains a field "result" which has the contents of the response.

NameTypeDescriptionNotes
resultComputeTemplateConfig[default to null]

CreateClusterCompute Legacy

NameTypeDescriptionNotes
namestr[optional] [default to null]
project_idstr[optional] [default to null]
configCreateClusterComputeConfig[default to null]
anonymousboolAn anonymous Cluster Compute does not show up in the list of cluster configs. They can still have a name so they can be easily identified.[optional] [default to false]
new_versionboolIf a Cluster Compute with the same name already exists, create this config as a new version.[optional] [default to false]

CreateClusterComputeConfig Legacy

Configuration of compute resources to use for launching a Cluster. Used when creating a cluster compute.

NameTypeDescriptionNotes
cloud_idstrThe ID of the Anyscale cloud to use for launching Clusters.[default to null]
max_workersintDesired limit on total running workers for this Cluster.[optional] [default to null]
regionstrDeprecated! When creating a cluster compute, a region does not have to be provided. Instead we will use the value from the cloud.[optional] [default to USE_CLOUD]
allowed_azsList[str]The availability zones that sessions are allowed to be launched in, e.g. "us-west-2a". If not specified or "any" is provided as the option, any AZ may be used. If "any" is provided, it must be the only item in the list.[optional] [default to null]
head_node_typeComputeNodeTypeNode configuration to use for the head node.[default to null]
worker_node_typesList[WorkerNodeType]A list of node types to use for worker nodes.[optional] [default to null]
aws_advanced_configurations_jsonobjectThe advanced configuration json that we pass directly AWS APIs when launching an instance. We may do some validation on this json and reject the json if it is using a configuration that Anyscale does not support.[optional] [default to null]
awsAWSNodeOptionsDEPRECATED: Please provide instance configuration in the `aws_advanced_configurations_json` field. Fields specific to AWS node types.[optional] [default to null]
gcp_advanced_configurations_jsonobjectThe advanced configuration json that we pass directly GCP APIs when launching an instance. We may do some validation on this json and reject the json if it is using a configuration that Anyscale does not support.[optional] [default to null]
gcpGCPNodeOptionsDEPRECATED: Please provide instance configuration in the `gcp_advanced_configurations_json` field. Fields specific to GCP node types.[optional] [default to null]
azureobjectDEPRECATED: We don't currently support azure. Fields specific to Azure node types.[optional] [default to null]
maximum_uptime_minutesintIf set to a positive number, Anyscale will terminate the cluster this many minutes after cluster start.[optional] [default to null]
auto_select_worker_configboolIf set to true, worker node groups will automatically be selected based on workload.[optional] [default to false]
flagsobjectA set of advanced cluster-level flags that can be used to configure a particular workload.[optional] [default to null]
idle_termination_minutesintIf set to a positive number, Anyscale will terminate the cluster this many minutes after the cluster is idle. Idle time is defined as the time during which a Cluster is not running a user command or a Ray driver. Time spent running commands on Jupyter or ssh is still considered 'idle'. To disable, set this field to 0.[optional] [default to 120]

CreateComputeTemplate Legacy

DEPRECATED: Please use CreateClusterCompute instead.

NameTypeDescriptionNotes
namestr[optional] [default to null]
project_idstr[optional] [default to null]
configCreateComputeTemplateConfig[default to null]
anonymousboolAn anonymous cluster compute does not show up in the list of cluster configs. They can still have a name so they can be easily identified.[optional] [default to false]
new_versionboolIf a Compute Template with the same name already exists, create this config as a new version.[optional] [default to false]

CreateComputeTemplateConfig Legacy

DEPRECATED: Please use CreateClusterCompute and the corresponding ClusterComputeConfig instead. Configuration of compute resources to use for launching a session. Used when creating a compute template.

NameTypeDescriptionNotes
cloud_idstrThe ID of the Anyscale cloud to use for launching sessions.[default to null]
max_workersintDesired limit on total running workers for this session.[optional] [default to null]
regionstrThe region to launch sessions in, e.g. "us-west-2".[default to null]
allowed_azsList[str]The availability zones that sessions are allowed to be launched in, e.g. "us-west-2a". If not specified or "any" is provided as the option, any AZ may be used. If "any" is provided, it must be the only item in the list.[optional] [default to null]
head_node_typeComputeNodeTypeNode configuration to use for the head node.[default to null]
worker_node_typesList[WorkerNodeType]A list of node types to use for worker nodes.[optional] [default to null]
aws_advanced_configurations_jsonobjectThe advanced configuration json that we pass directly AWS APIs when launching an instance. We may do some validation on this json and reject the json if it is using a configuration that Anyscale does not support.[optional] [default to null]
awsAWSNodeOptionsDEPRECATED: Please provide instance configuration in the `aws_advanced_configurations_json` field. Fields specific to AWS node types.[optional] [default to null]
gcp_advanced_configurations_jsonobjectThe advanced configuration json that we pass directly GCP APIs when launching an instance. We may do some validation on this json and reject the json if it is using a configuration that Anyscale does not support.[optional] [default to null]
gcpGCPNodeOptionsDEPRECATED: Please provide instance configuration in the `gcp_advanced_configurations_json` field. Fields specific to GCP node types.[optional] [default to null]
azureobjectDEPRECATED: We don't currently support azure. Fields specific to Azure node types.[optional] [default to null]
maximum_uptime_minutesintIf set to a positive number, Anyscale will terminate the cluster this many minutes after cluster start.[optional] [default to null]
auto_select_worker_configboolIf set to true, worker node groups will automatically be selected based on workload.[optional] [default to false]
flagsobjectA set of advanced cluster-level flags that can be used to configure a particular workload.[optional] [default to null]
idle_termination_minutesintIf set to a positive number, Anyscale will terminate the cluster this many minutes after the cluster is idle. Idle time is defined as the time during which a Cluster is not running a user command or a Ray driver. Time spent running commands on Jupyter or ssh is still considered 'idle'. To disable, set this field to 0.[optional] [default to 120]

UpdateComputeTemplate Legacy

DEPRECATED: Compute templates are immutable. Please use CreateClusterCompute instead.

NameTypeDescriptionNotes
namestr[optional] [default to null]
configUpdateComputeTemplateConfig[optional] [default to null]

UpdateComputeTemplateConfig Legacy

DEPRECATED: Compute templates are immutable. Please use CreateClusterCompute and the corresponding ClusterComputeConfig instead. Configuration of compute resources to use for launching a session. Used when updating a compute template.

NameTypeDescriptionNotes
cloud_idstrThe ID of the Anyscale cloud to use for launching sessions.[default to null]
max_workersintDesired limit on total running workers for this session.[optional] [default to null]
regionstrThe region to launch sessions in, e.g. "us-west-2".[default to null]
allowed_azsList[str]The availability zones that sessions are allowed to be launched in, e.g. "us-west-2a". If not specified or "any" is provided as the option, any AZ may be used. If "any" is provided, it must be the only item in the list.[optional] [default to null]
head_node_typeComputeNodeTypeNode configuration to use for the head node.[default to null]
worker_node_typesList[WorkerNodeType]A list of node types to use for worker nodes.[optional] [default to null]
aws_advanced_configurations_jsonobjectThe advanced configuration json that we pass directly AWS APIs when launching an instance. We may do some validation on this json and reject the json if it is using a configuration that Anyscale does not support.[optional] [default to null]
awsAWSNodeOptionsDEPRECATED: Please provide instance configuration in the `aws_advanced_configurations_json` field. Fields specific to AWS node types.[optional] [default to null]
gcp_advanced_configurations_jsonobjectThe advanced configuration json that we pass directly GCP APIs when launching an instance. We may do some validation on this json and reject the json if it is using a configuration that Anyscale does not support.[optional] [default to null]
gcpGCPNodeOptionsDEPRECATED: Please provide instance configuration in the `gcp_advanced_configurations_json` field. Fields specific to GCP node types.[optional] [default to null]
azureobjectDEPRECATED: We don't currently support azure. Fields specific to Azure node types.[optional] [default to null]
maximum_uptime_minutesintIf set to a positive number, Anyscale will terminate the cluster this many minutes after cluster start.[optional] [default to null]
auto_select_worker_configboolIf set to true, worker node groups will automatically be selected based on workload.[optional] [default to false]
flagsobjectA set of advanced cluster-level flags that can be used to configure a particular workload.[optional] [default to null]
idle_termination_minutesintIf set to a positive number, Anyscale will terminate the cluster this many minutes after the cluster is idle. Idle time is defined as the time during which a Cluster is not running a user command or a Ray driver. Time spent running commands on Jupyter or ssh is still considered 'idle'. To disable, set this field to 0.[optional] [default to 120]