Skip to main content

Cloud API Reference

Customer-hosted cloud features

note

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

Cloud CLI

anyscale cloud setup

Usage

anyscale cloud setup [OPTIONS]

Set up a cloud provider.

Options

  • --provider: The cloud provider type.
  • --region: Region to set up the credentials in.
  • --name/-n: Name of the cloud.
  • --project-id: Globally Unique project ID for GCP clouds (e.g., my-project-abc123)
  • --functional-verify: Verify the cloud is functional. This will check that the cloud can launch workspace/service.
  • --anyscale-managed: Let anyscale create all the resources.
  • --enable-head-node-fault-tolerance: Whether to enable head node fault tolerance for services.
  • --yes/-y: Skip asking for confirmation.
  • --disable-auto-add-user: All users in the organization will be added to clouds created with anyscale cloud setup by default. Specify --disable-auto-add-user to disable this and instead manually grant users permissions to the cloud.

anyscale cloud register

Usage

anyscale cloud register [OPTIONS]

Register an anyscale cloud with your own resources.

Options

  • --provider: The cloud provider type.
  • --region: Region to set up the credentials in.
  • --compute-stack: The compute stack type (VM or K8S).
  • --name/-n: Name of the cloud.
  • --vpc-id: The ID of the VPC.
  • --subnet-ids: Comma separated list of subnet ids.
  • --file-storage-id: File storage ID (e.g. EFS ID for AWS, Filestore instance ID for GCP)
  • --efs-id: The EFS ID.
  • --anyscale-iam-role-id: The Anyscale IAM Role ARN.
  • --instance-iam-role-id: The instance IAM role ARN.
  • --security-group-ids: IDs of the security groups.
  • --s3-bucket-id: S3 bucket ID.
  • --external-id: The trust policy external ID for the cross account IAM role.
  • --memorydb-cluster-id: Memorydb cluster ID
  • --project-id: Globally Unique project ID for GCP clouds (e.g., my-project-abc123)
  • --vpc-name: VPC name for GCP clouds
  • --subnet-names: Comma separated list of subnet names for GCP clouds
  • --filestore-instance-id: Filestore instance ID for GCP clouds.
  • --filestore-location: Filestore location for GCP clouds.
  • --anyscale-service-account-email: Anyscale service account email for GCP clouds.
  • --instance-service-account-email: Instance service account email for GCP clouds.
  • --provider-name: Workload Identity Federation provider name for Anyscale access.
  • --firewall-policy-names: Filewall policy names for GCP clouds
  • --cloud-storage-bucket-name: A fully qualified storage bucket name for cloud storage, e.g. s3://bucket-name, gs://bucket-name, or azure://bucket-name.
  • --cloud-storage-bucket-endpoint: An endpoint for cloud storage, e.g. used to override the default cloud storage scheme's endpoint (e.g. for S3, this would be passed to the AWS_ENDPOINT_URL environment variable).
  • --cloud-storage-bucket-region: The region of the cloud storage bucket. If not provided, the region of the cloud will be used to access the cloud storage bucket.
  • --nfs-mount-target: A comma-separated value representing a (zone, mount target) tuple, e.g. us-west-2a,1.2.3.4 (may be provided multiple times, one for each zone). If only one value is provided (e.g. 1.2.3.4), then that value will be used for all zones.
  • --nfs-mount-path: The path of the NFS server to mount from (e.g. nfs-target-address/nfs-path will be mounted).
  • --memorystore-instance-name: Memorystore instance name for GCP clouds
  • --host-project-id: Host project ID for shared VPC
  • --kubernetes-zones: On the Kubernetes compute stack, a comma-separated list of zones to launch pods in.
  • --anyscale-operator-iam-identity: On the Kubernetes compute stack, the cloud provider IAM identity federated with the Anyscale Operator's kubernetes service account, which will be used by Anyscale control plane for validation during Anyscale Operator bootstrap in the dataplane. IN AWS EKS, this is the ARN of the IAM role. For GCP GKE, this is the service account email.
  • --private-network: Use private network.
  • --functional-verify: Verify the cloud is functional. This will check that the cloud can launch workspace/service.
  • --yes/-y: Skip asking for confirmation.
  • --skip-verifications: Skip verifications. This will skip all verifications.
  • --enable-auto-add-user: If --enable-auto-add-user is specified for a cloud, all users in the organization will be added to the cloud by default. Otherwise users will need to be manually granted permissions to the cloud. Note: There may be up to 30 sec delay for all users to be granted permissions after the cloud is created.

anyscale cloud edit

Usage

anyscale cloud edit [OPTIONS] [CLOUD_NAME]

Edit registered cloud resource on Anyscale. Only applicable for anyscale registered clouds.

Options

  • --name/-n: Edit cloud by name.
  • --cloud-id/--id: Edit cloud by id, alternative to cloud name.
  • --aws-s3-id: New S3 bucket ID.
  • --aws-efs-id: New EFS ID.
  • --aws-efs-mount-target-ip: New EFS mount target IP.
  • --memorydb-cluster-id: New AWS Memorydb cluster ID.
  • --gcp-filestore-instance-id: New GCP filestore instance id.
  • --gcp-filestore-location: New GCP filestore location.
  • --gcp-cloud-storage-bucket-name: New GCP Cloud storage bucket name.
  • --memorystore-instance-name: New Memorystore instance name for GCP clouds
  • --functional-verify: Verify the cloud is functional. This will check that the cloud can launch workspace/service.
  • --enable-auto-add-user/--disable-auto-add-user: If --enable-auto-add-user is specified for a cloud, all users in the organization will be added to the cloud by default. Note: There may be up to 30 sec delay for all users to be granted permissions after this feature is enabled.

Specifying --disable-auto-add-user will require that users are manually granted permissions to access the cloud. No existing cloud permissions are altered by specifying this flag.

anyscale cloud update

Usage

anyscale cloud update [OPTIONS] [CLOUD_NAME]

Update a managed cloud to the latest configuration. Only applicable for anyscale managed clouds.

Options

  • --cloud-id/--id: Cloud id to update. Alternative to cloud name.
  • --name/-n: Update configuration of cloud by name.
  • --yes/-y: Skip asking for confirmation.
  • --functional-verify: Verify the cloud is functional. This will check that the cloud can launch workspace/service.
  • --enable-head-node-fault-tolerance: Whether to enable head node fault tolerance for services.
  • --enable-auto-add-user/--disable-auto-add-user: If --enable-auto-add-user is specified for a cloud, all users in the organization will be added to the cloud by default. Note: There may be up to 30 sec delay for all users to be granted permissions after this feature is enabled.

Specifying --disable-auto-add-user will require that users are manually granted permissions to access the cloud. No existing cloud permissions are altered by specifying this flag.

anyscale cloud delete

Usage

anyscale cloud delete [OPTIONS] [CLOUD_NAME]

Delete a cloud.

Options

  • --name/-n: Delete cloud by name.
  • --cloud-id/--id: Cloud id to delete. Alternative to cloud name.
  • --yes/-y: Don't ask for confirmation.

anyscale cloud verify

Usage

anyscale cloud verify [OPTIONS] [CLOUD_NAME]

Checks the healthiness of a cloud.

Options

  • --name/-n: Verify cloud by name.
  • --cloud-id/--id: Verify cloud by cloud id, alternative to cloud name.
  • --functional-verify: Verify the cloud is functional. This will check that the cloud can launch workspace/service.
  • --strict: Strict Verify. Treat warnings as failures.

anyscale cloud list

Usage

anyscale cloud list [OPTIONS]

List information about clouds in your Anyscale organization.

Options

  • --name/-n: Name of cloud to get information about.
  • --cloud-id/--id: Id of cloud to get information about.
  • --max-items: Max items to show in list.

anyscale cloud config update

Usage

anyscale cloud config update [OPTIONS] [CLOUD_NAME]

Update the current configuration for a cloud.

Options

  • --name/-n: Update configuration of cloud by name.
  • --cloud-id/--id: Cloud id to get details about. Alternative to cloud name.
  • --enable-log-ingestion/--disable-log-ingestion: If --enable-log-ingestion is specified for a cloud, it will enable the log viewing and querying UI features for the clusters on this cloud. This will enable easier debugging. The logs produced by the clusters will be sent from the data plane to the control plane. Anyscale does not share this data with any third party or use it for any purpose other than serving the log UI for the customer. The log will be stored at most 30 days.Please note by disable this feature again, Anyscale doesn't delete the logs that have already been ingested. Your clusters may incur extra data transfer cost from the cloud provider by enabling this feature.

anyscale cloud config set-default

Usage

anyscale cloud config set-default [OPTIONS] [CLOUD_NAME]

Sets default cloud for your organization. This operation can only be performed by organization admins, and the default cloud must have organization level permissions.

Options

  • --name/-n: Set cloud as default by name.
  • --cloud-id/--id: Cloud id to set as default. Alternative to cloud name.

Cloud 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_cloud Legacy

Limited support

This command is not actively maintained. Use with caution.

Creates a Cloud.

Parameters

NameTypeDescriptionNotes
create_cloudCreateCloud

Returns CloudResponse

delete_cloud Legacy

Limited support

This command is not actively maintained. Use with caution.

Deletes a Cloud. Will delete all clusters that are using this cloud. If any of those clusters are not terminated, this call will fail.

Parameters

NameTypeDescriptionNotes
cloud_idstrID of the Cloud to delete.Defaults to null

Returns void (empty response body)

get_cloud Legacy

Limited support

This command is not actively maintained. Use with caution.

Retrieves a Cloud.

Parameters

NameTypeDescriptionNotes
cloud_idstrID of the Cloud to retrieve.Defaults to null

Returns CloudResponse

get_default_cloud Legacy

Limited support

This command is not actively maintained. Use with caution.

Retrieves the default cloud for the logged in user. First prefers the default cloud set by the user's org, then the last used cloud.

Parameters This function does not have any parameters.

Returns CloudResponse

search_clouds Legacy

Limited support

This command is not actively maintained. Use with caution.

Searches for all accessible Clouds that satisfies the query.

Parameters

NameTypeDescriptionNotes
clouds_queryCloudsQuery

Returns CloudListResponse

update_cloud Legacy

Limited support

This command is not actively maintained. Use with caution.

Updates a Cloud.

Parameters

NameTypeDescriptionNotes
cloud_idstrID of the Cloud to update.Defaults to null
update_cloudUpdateCloud

Returns CloudResponse

Cloud Models Legacy

Cloud Legacy

Model used to create a Cloud.

NameTypeDescriptionNotes
namestrName of this Cloud.[default to null]
providerCloudProvidersProvider of this Cloud (e.g. AWS).[default to null]
compute_stackComputeStackThe compute stack associated with this cloud's primary cloud resource.[optional] [default to null]
regionstrRegion this Cloud is operating in. This value needs to be supported by this Cloud's provider. (e.g. us-west-2)[default to null]
credentialsstrCredentials needed to interact with this Cloud.[default to null]
configCloudConfigAdditional configurable properties of this Cloud.[optional] [default to null]
is_k8sboolWhether this cloud is managed via Kubernetes.[optional] [default to false]
is_aioaboolWhether this cloud is an AIOA cloud.[optional] [default to false]
availability_zonesList[str]The availability zones that instances of this cloud are allowed to be launched in.[optional] [default to null]
is_bring_your_own_resourceboolWhether the resources of this cloud are provided by the customer.[optional] [default to null]
is_private_cloudboolWhether this cloud is a private cloud.[optional] [default to false]
cluster_management_stack_versionClusterManagementStackVersionsThe cluster management stack version of the cloud.[optional] [default to null]
is_private_service_cloudboolWhether services created in this cloud should be private.[optional] [default to null]
auto_add_userboolWhether all users in the organization should be automatically added to this cloud. This field is only relevant for organizations with cloud isolation enabled, because all users in the organization automatically have access to all clouds if cloud isolation is not enabled.[optional] [default to false]
external_idstrThe trust policy external ID specified by the user for the cloud control plane role. It must start with the organization ID.[optional] [default to null]
idstrServer assigned unique identifier.[default to null]
typeCloudTypes[default to null]
creator_idstrID of the User who created this Cloud.[default to null]
created_atdatetimeTime when this Cloud was created.[default to null]
statusCloudStatusThe status of this cloud.[optional] [default to null]
stateCloudStateThe state of this cloud.[optional] [default to null]
versionCloudVersionThe version of the cloud.[optional] [default to null]
is_defaultboolWhether this cloud is the default cloud.[default to null]
customer_aggregated_logs_config_idstrthe id of the customer aggregated logs config associated with this cloud.[default to null]
additional_instance_typesList[UXInstance]the list of instance types supported in the UI and through API (SDK/CLI).[optional] [default to null]

CloudConfig Legacy

NameTypeDescriptionNotes
max_stopped_instancesintMaximum number of instances that can be retained for reuse after a Cluster has terminated. This may help Clusters start up faster, but stopped instances will accrue some costs. Defaults to 0, which means no instances will be retained for reuse. A value of -1 means all instances will be retained.[optional] [default to 0]
vpc_peering_ip_rangestrVPC IP range for this Cloud.[optional] [default to null]
vpc_peering_target_project_idstrProject ID of the VPC to peer with.[optional] [default to null]
vpc_peering_target_vpc_idstrID of the VPC to peer with.[optional] [default to null]

CloudListResponse Legacy

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

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

CloudProviders Legacy

An enumeration.

Possible Values: ['AWS', 'GCP', 'CLOUDGATEWAY', 'PCP', 'GENERIC']

CloudResponse Legacy

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

NameTypeDescriptionNotes
resultCloud[default to null]

CloudState Legacy

An enumeration.

Possible Values: ['CREATING', 'ACTIVE', 'VERIFICATION_FAILED', 'DELETING', 'DELETED', 'CLAIMED']

CloudStatus Legacy

An enumeration.

Possible Values: ['pending', 'ready']

CloudTypes Legacy

An enumeration.

Possible Values: ['PUBLIC', 'INTERNAL']

CloudVersion Legacy

An enumeration.

Possible Values: ['v1', 'v2']

CloudsQuery Legacy

Query object used to search Clouds.

NameTypeDescriptionNotes
nameTextQueryFilters ComputeTemplates by name. If this field is absent, no filtering is done.[optional] [default to null]
pagingPageQueryPagination info.[optional] [default to null]

CreateCloud Legacy

Model used to create a Cloud.

NameTypeDescriptionNotes
namestrName of this Cloud.[default to null]
providerCloudProvidersProvider of this Cloud (e.g. AWS).[default to null]
compute_stackComputeStackThe compute stack associated with this cloud's primary cloud resource.[optional] [default to null]
regionstrRegion this Cloud is operating in. This value needs to be supported by this Cloud's provider. (e.g. us-west-2)[default to null]
credentialsstrCredentials needed to interact with this Cloud.[default to null]
configCloudConfigAdditional configurable properties of this Cloud.[optional] [default to null]
is_k8sboolWhether this cloud is managed via Kubernetes.[optional] [default to false]
is_aioaboolWhether this cloud is an AIOA cloud.[optional] [default to false]
availability_zonesList[str]The availability zones that instances of this cloud are allowed to be launched in.[optional] [default to null]
is_bring_your_own_resourceboolWhether the resources of this cloud are provided by the customer.[optional] [default to null]
is_private_cloudboolWhether this cloud is a private cloud.[optional] [default to false]
cluster_management_stack_versionClusterManagementStackVersionsThe cluster management stack version of the cloud.[optional] [default to null]
is_private_service_cloudboolWhether services created in this cloud should be private.[optional] [default to null]
auto_add_userboolWhether all users in the organization should be automatically added to this cloud. This field is only relevant for organizations with cloud isolation enabled, because all users in the organization automatically have access to all clouds if cloud isolation is not enabled.[optional] [default to false]
external_idstrThe trust policy external ID specified by the user for the cloud control plane role. It must start with the organization ID.[optional] [default to null]

UpdateCloud Legacy

Updateable fields for a Cloud. If a field is absent, it will not be updated.

NameTypeDescriptionNotes
configCloudConfigAdditional configurable properties of this Cloud.[optional] [default to null]
auto_add_userboolWhether all users in the organization should be automatically added to this cloud. This field is only relevant for organizations with cloud isolation enabled, because all users in the organization automatically have access to all clouds if cloud isolation is not enabled.[optional] [default to null]