Cloud API Reference
Customer-hosted cloud features
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 withanyscale cloud setup
by default. Specify --disable-auto-add-user to disable this and instead manually grant users permissions to the cloud.--shared-storage
: The type of shared storage to use for the cloud. Use 'object-storage' for cloud bucket-based storage (e.g., S3, GCS), or 'nfs' for network file systems.
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 create
Usage
anyscale cloud create [OPTIONS]
Create a new cloud deployment in an existing cloud.
Options
--cloud
: The name of the cloud to create the new deployment in.--file/-f
: YAML file containing the deployment spec.--skip-verification
: Skip cloud deployment verification.--yes/-y
: Skip asking for confirmation.
Examples
- CLI
$ anyscale cloud deployment create --cloud my-cloud --file new-cloud-deployment.yaml
Successfully created cloud deployment my-new-deployment in cloud my-cloud.
$ cat new-cloud-deployment.yaml
name: my-new-deployment
provider: AWS
compute_stack: VM
region: us-west-2
networking_mode: PUBLIC
object_storage:
bucket_name: s3://my-bucket
file_storage:
file_storage_id: fs-123
aws_config:
vpc_id: vpc-123
subnet_ids:
- subnet-123
security_group_ids:
- sg-123
anyscale_iam_role_id: arn:aws:iam::123456789012:role/anyscale-role-123
cluster_iam_role_id: arn:aws:iam::123456789012:role/cluster-role-123
memorydb_cluster_name: my-memorydb-cluster
anyscale cloud get
Usage
anyscale cloud get [OPTIONS]
Get a cloud deployment for a cloud.
Options
--cloud
: The name of the cloud that the cloud deployment belongs to.--deployment
: The name of the cloud deployment. If not provided, the primary cloud deployment will be returned.
Examples
- CLI
$ anyscale cloud deployment get --cloud my-cloud --deployment my-deployment
name: my-deployment
provider: AWS
compute_stack: VM
region: us-west-2
networking_mode: PUBLIC
object_storage:
bucket_name: s3://my-bucket
file_storage:
file_storage_id: fs-123
aws_config:
vpc_id: vpc-123
subnet_ids:
- subnet-123
security_group_ids:
- sg-123
anyscale_iam_role_id: arn:aws:iam::123456789012:role/anyscale-role-123
cluster_iam_role_id: arn:aws:iam::123456789012:role/cluster-role-123
memorydb_cluster_name: my-memorydb-cluster
anyscale cloud update
Usage
anyscale cloud update [OPTIONS]
Update a cloud deployment in an existing cloud.
Options
--cloud
: The name of the cloud that the cloud deployment belongs to.--file/-f
: Path to a YAML file defining the cloud deployment. Schema: https://docs.anyscale.com/reference/cloud-api#clouddeployment.--skip-verification
: Skip cloud deployment verification.--yes/-y
: Skip asking for confirmation.
Examples
- CLI
$ anyscale cloud deployment update --cloud my-cloud --file updated-cloud-deployment.yaml
Output
(anyscale +3.7s) Detected the following changes:
--- +++ @@ -15,9 +15,9 @@ file_storage_id: fs-123
-name: my-cloud-deployment
+name: my-updated-cloud-deployment
networking_mode: PUBLIC
object_storage:
- bucket_name: s3://my-bucket
+ bucket_name: s3://my-updated-bucket
provider: AWS
Would you like to proceed with updating this cloud deployment? [y/N]: y
(anyscale +10.2s) Successfully updated cloud deployment my-updated-cloud-deployment in cloud my-cloud.
anyscale cloud delete
Usage
anyscale cloud delete [OPTIONS]
Remove a cloud deployment from an existing cloud.
Options
--cloud
: The name of the cloud to remove the deployment from.--deployment
: The name of the deployment to remove.--yes/-y
: Skip asking for confirmation.
Examples
- CLI
$ anyscale cloud deployment delete --cloud my-cloud --deployment my-deployment
Output
Please confirm that you would like to remove deployment my-deployment from cloud my-cloud. [y/N]: y
(anyscale +3.5s) Successfully removed deployment my-deployment from cloud my-cloud!
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 update. 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.--enable-system-cluster/--disable-system-cluster
: Enable or disable system cluster functionality.--spec-file
: Provide a path to a specification file.
Examples
- CLI
$ anyscale cloud config update --cloud-id cloud_id --enable-log-ingestion --enable-system-cluster
--enable-log-ingestion is specified. [...] If you are sure you want to enable this feature, please type "consent": consent
Output
(anyscale +7.3s) Successfully updated log ingestion configuration for cloud, cloud_id to True
--enable-system-cluster is specified. [...] Are you sure you want to enable system cluster? [y/N]: y
Output
(anyscale +11.4s) Successfully enabled system cluster for cloud cloud_id
anyscale cloud set-default
Usage
anyscale cloud 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.
anyscale cloud add-collaborators
Usage
anyscale cloud add-collaborators [OPTIONS]
Add collaborators to the cloud.
Options
--cloud/-c
: Name of the cloud to add collaborators to.--users-file
: Path to a YAML file containing a list of users to add to the cloud.
Examples
- CLI
$ anyscale cloud add-collaborators --cloud cloud_name --users-file collaborators.yaml
(anyscale +1.3s) Successfully added 2 collaborators to cloud cloud_name.
$ cat collaborators.yaml
collaborators:
- email: "test1@anyscale.com"
permission_level: "write"
- email: "test2@anyscale.com"
permission_level: "readonly"
anyscale cloud get
Usage
anyscale cloud get [OPTIONS]
Get information about a specific cloud.
Options
--name/-n
: Name of the cloud to get information about.--cloud-id/--id
: ID of the cloud to get information about.--output/-o
: File to write the output YAML to.
Examples
- CLI
$ anyscale cloud get --name my-cloud
id: cld_123
name: my-cloud
created_at: 2022-10-18 05:12:13.335803+00:00
is_default: true
deployments:
- cloud_deployment_id: cldrsrc_123
name: vm-aws-us-west-2
provider: AWS
compute_stack: VM
region: us-west-2
networking_mode: PUBLIC
object_storage:
bucket_name: s3://my-bucket
file_storage:
file_storage_id: fs-123
aws_config:
vpc_id: vpc-123
subnet_ids:
- subnet-123
security_group_ids:
- sg-123
anyscale_iam_role_id: arn:aws:iam::123456789012:role/anyscale-role-123
cluster_iam_role_id: arn:aws:iam::123456789012:role/cluster-role-123
memorydb_cluster_name: my-memorydb-cluster
anyscale cloud get-default
Usage
anyscale cloud get-default [OPTIONS]
Get the default cloud for your organization.
Options
Examples
- CLI
$ anyscale cloud get-default
name: anyscale_v2_default_cloud
id: cld_abc
provider: AWS
region: us-west-2
created_at: 2022-10-18 05:12:13.335803+00:00
is_default: true
compute_stack: VM
anyscale cloud terminate-system-cluster
Usage
anyscale cloud terminate-system-cluster [OPTIONS]
Terminate the system cluster for a specific given cloud.
Options
--cloud-id/--id
: ID of the cloud to terminate the system cluster for.-w/--wait
: Block this CLI command and print logs until the job finishes.
Examples
- CLI
$ anyscale cloud terminate-system-cluster --cloud-id cloud_id --wait
(anyscale +1.3s) Waiting for system cluster termination............
(anyscale +1m22.9s) System cluster for cloud 'cloud_id' is Terminated.
Cloud SDK
anyscale.cloud.add_collaborators
Batch add collaborators to a cloud.
:param cloud: The cloud to add users to. :param collaborators: The list of collaborators to add to the cloud.
Arguments
cloud
(str): The cloud to add users to.collaborators
(List[CreateCloudCollaborator]): The list of collaborators to add to the cloud.
Returns: str
Examples
- Python
import anyscale
from anyscale.cloud.models import CloudPermissionLevel, CreateCloudCollaborator
anyscale.cloud.add_collaborators(
cloud="cloud_name",
collaborators=[
CreateCloudCollaborator(
email="test1@anyscale.com",
permission_level=CloudPermissionLevel.WRITE,
),
CreateCloudCollaborator(
email="test2@anyscale.com",
permission_level=CloudPermissionLevel.READONLY,
),
],
)
anyscale.cloud.get
Get the cloud model for the provided cloud ID or name.
If neither ID nor name is provided, returns None
.
:param id: The ID of the cloud to retrieve.
:param name: The name of the cloud to retrieve.
:return: A Cloud
object if found, otherwise None
.
Arguments
id
(str | None) = None: The ID of the cloud to retrieve.name
(str | None) = None: The name of the cloud to retrieve.
Returns: Cloud | None
Examples
- Python
import anyscale
# Get a cloud by ID
cloud_by_id = anyscale.cloud.get(id="cloud_id")
# Get a cloud by name
cloud_by_name = anyscale.cloud.get(name="cloud_name")
anyscale.cloud.get_default
Get the user's default cloud.
:return: The default Cloud
object if it exists, otherwise None
.
Arguments
Returns: Cloud | None
Examples
- Python
import anyscale
# Get the user's default cloud
default_cloud = anyscale.cloud.get_default()
anyscale.cloud.terminate_system_cluster
Terminate the system cluster for the specified cloud.
:param cloud: The name of the cloud whose system cluster should be terminated. :param wait: If True, wait for the system cluster to be terminated before returning. Defaults to False. :return: ID of the terminated system cluster.
Arguments
cloud_id
(str): The ID of the cloud whose system cluster should be terminated.wait
(bool | None) = False: If True, wait for the system cluster to be terminated before returning. Defaults to False.
Returns: str
Examples
- Python
import anyscale
# Terminate the system cluster for the cloud with the specified ID
anyscale.cloud.terminate_system_cluster(cloud_id="cloud_id", wait=True)
Cloud Models
Cloud
Minimal Cloud resource model.
Fields
name
(str): Name of this Cloud.id
(str): Unique identifier for this Cloud.provider
(CloudProvider | str): Cloud provider (AWS, GCP, AZURE) or UNKNOWN if not recognized.compute_stack
(ComputeStack | str): The compute stack associated with this cloud's primary cloud resource, or UNKNOWN if not recognized.region
(str | None): Region for this Cloud.created_at
(datetime | None): When the Cloud was created.is_default
(bool | None): Whether this is the default cloud.is_aggregated_logs_enabled
(bool | None): Whether aggregated logs are enabled for this cloud.
Python Methods
def to_dict(self) -> Dict[str, Any]
"""Return a dictionary representation of the model."""
Examples
- Python
from datetime import datetime
from anyscale.cloud.models import Cloud, CloudProvider, ComputeStack
cloud = Cloud(
name="my-cloud",
id="cloud-123",
provider="AWS", # This will be validated as CloudProvider.AWS
region="us-west-2",
created_at=datetime.now(),
is_default=True,
compute_stack="VM" # This will be validated as ComputeStack.VM
)
CloudPermissionLevel
An enumeration.
Values
WRITE
: Write permission level for the cloudREADONLY
: Readonly permission level for the cloud
CreateCloudCollaborator
User to be added as a collaborator to a cloud.
Fields
email
(str): Email of the user to be added as a collaborator.permission_level
(CloudPermissionLevel): Permission level the added user should have for the cloud(one of: WRITE,READONLY
Python Methods
def to_dict(self) -> Dict[str, Any]
"""Return a dictionary representation of the model."""
Examples
- Python
import anyscale
from anyscale.cloud.models import CloudPermissionLevel, CreateCloudCollaborator
create_cloud_collaborator = CreateCloudCollaborator(
# Email of the user to be added as a collaborator
email="test@anyscale.com",
# Permission level for the user to the cloud (CloudPermissionLevel.WRITE, CloudPermissionLevel.READONLY)
permission_level=CloudPermissionLevel.READONLY,
)
CloudDeployment
Cloud deployment configuration.
Fields
cloud_deployment_id
(str | None): Unique identifier for this deployment.name
(str | None): The name of this deployment.provider
(CloudProvider | str): The cloud provider type (e.g., AWS, GCP, or AZURE).compute_stack
(ComputeStack | str): The compute stack (VM or K8S).region
(str | None): The region for the deployment (e.g., us-west-2).networking_mode
(NetworkingMode | None): Whether to use public or private networking.object_storage
(ObjectStorage | None): Object storage configuration.file_storage
(FileStorage | None): File storage configuration.aws_config
(AWSConfig | None): AWS provider-specific configurations.gcp_config
(GCPConfig | None): GCP provider-specific configurations.kubernetes_config
(KubernetesConfig | None): Kubernetes stack configurations.
Examples
- YAML
cloud_deployment:
cloud_deployment_id: cldrsrc_12345678901234567890123456
name: my-cloud-deployment
provider: AWS
compute_stack: VM
region: us-west-2
networking_mode: PUBLIC
object_storage:
bucket_name: s3://my-bucket
file_storage:
file_storage_id: fs-12345678901234567
aws_config:
vpc_id: vpc-12345678901234567
subnet_ids:
- subnet-11111111111111111
- subnet-22222222222222222
security_group_ids:
- sg-12345678901234567
anyscale_iam_role_id: arn:aws:iam::123456789012:role/anyscale-iam-role
cluster_iam_role_id: arn:aws:iam::123456789012:role/cluster-node-role
memorydb_cluster_name: my-memorydb-cluster
ComputeStack
An enumeration.
Values
UNKNOWN
: Unknown compute stack.VM
: Virtual machine-based compute stack.K8S
: Kubernetes-based compute stack.
CloudProvider
An enumeration.
Values
UNKNOWN
: Unknown cloud provider.AWS
: Amazon Web Services.GCP
: Google Cloud Platform.AZURE
: Microsoft Azure.
NetworkingMode
An enumeration.
Values
PUBLIC
: Direct networking.PRIVATE
: Customer-defined networking.
ObjectStorage
Object storage configuration.
Fields
bucket_name
(str | None): The cloud storage bucket name, prefixed with the storage scheme (s3://bucket-name, gs://bucket-name, or azure://bucket-name).region
(str | None): The region for the cloud storage bucket. Defaults to the region of the deployment.endpoint
(str | None): The cloud storage endpoint, used to override the default cloud storage scheme's endpoint. For example, for S3, this will be passed to the AWS_ENDPOINT_URL environment variable.
Examples
- YAML
object_storage:
bucket_name: s3://my-bucket
FileStorage
File storage configuration.
Fields
file_storage_id
(str | None): For AWS, the EFS ID. For GCP, the Filestore instance name.mount_targets
(List[NFSMountTarget] | None): The mount target(s) to use.mount_path
(str | None): For GCP, the Filestore root directory. For NFS, the path of the server to mount from (e.g., <mount-target-address>/<mount-path> will be mounted).persistent_volume_claim
(str | None): For Kubernetes deployments, the name of the persistent volume claim used to mount shared storage into pods.csi_ephemeral_volume_driver
(str | None): For Kubernetes deployments, the CSI ephemeral volume driver used to mount shared storage into pods.
Examples
- YAML
file_storage:
file_storage_id: fs-12345678901234567
NFSMountTarget
NFS mount target configuration.
Fields
address
(str): The address of the NFS mount target.zone
(str | None): The zone of the NFS mount target. If not set, this mount target may be used in any zone.
Examples
- YAML
nfs_mount_target:
address: 123.456.789.012
AWSConfig
AWS provider-specific configurations.
Fields
vpc_id
(str | None): The VPC ID.subnet_ids
(List[str] | None): List of subnet IDs.zones
(List[str] | None): The availability zone corresponding to each subnet ID.security_group_ids
(List[str] | None): List of security group IDs.anyscale_iam_role_id
(str | None): The Anyscale IAM role ARN.external_id
(str | None): The trust policy external ID for the cross-account IAM rolecluster_iam_role_id
(str | None): The IAM role ARN used by Ray clusters.memorydb_cluster_name
(str | None): The MemoryDB cluster name.memorydb_cluster_arn
(str | None): The MemoryDB cluster ARN.memorydb_cluster_endpoint
(str | None): The MemoryDB cluster endpoint.cloudformation_id
(str | None): The CloudFormation stack ID, for deployments with Anyscale-managed resources.
Examples
- YAML
aws_config:
vpc_id: vpc-12345678901234567
subnet_ids:
- subnet-11111111111111111
- subnet-22222222222222222
security_group_ids:
- sg-12345678901234567
anyscale_iam_role_id: arn:aws:iam::123456789012:role/anyscale-iam-role
cluster_iam_role_id: arn:aws:iam::123456789012:role/cluster-node-role
memorydb_cluster_name: my-memorydb-cluster
GCPConfig
GCP provider-specific configurations.
Fields
project_id
(str | None): The GCP project ID.host_project_id
(str | None): The host project ID for shared VPCs.provider_name
(str | None): Workload Identity Federation provider name for Anyscale access.vpc_name
(str | None): VPC name.subnet_names
(List[str] | None): List of GCP subnet names.firewall_policy_names
(List[str] | None): List of GCP firewall policy names.anyscale_service_account_email
(str | None): The Anyscale service account email.cluster_service_account_email
(str | None): The service account email attached to Ray clusters.memorystore_instance_name
(str | None): The Memorystore instance name.memorystore_endpoint
(str | None): The Memorystore instance endpoint.deployment_manager_id
(str | None): The deployment manager deployment ID, for deployments with Anyscale-managed resources.
Examples
- YAML
gcp_config:
project_id: my-project
provider_name: projects/123456789012/locations/global/workloadIdentityPools/my-cloud/providers/my-provider
vpc_name: my-vpc
subnet_names:
- my-subnet
firewall_policy_names:
- my-firewall-policy
anyscale_service_account_email: my-anyscale-service-account@my-project.iam.gserviceaccount.com
cluster_service_account_email: my-cluster-service-account@my-project.iam.gserviceaccount.com
memorystore_instance_name: my-memorystore-instance
KubernetesConfig
Kubernetes stack configurations.
Fields
anyscale_operator_iam_id
(str | None): 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.zones
(List[str] | None): List of zones to launch pods in.
Examples
- YAML
kubernetes_config:
anyscale_operator_iam_id: arn:aws:iam::123456789012:role/anyscale-operator-role
zones:
- us-west-2a
- us-west-2b
- us-west-2c
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.
Param | Type | Description |
---|---|---|
auth_token | Optional String | Authentication 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()
get_cloud
Legacy
This command is not actively maintained. Use with caution.
Retrieves a Cloud.
Parameters
Name | Type | Description | Notes |
---|---|---|---|
cloud_id | str | ID of the Cloud to retrieve. | Defaults to null |
Returns CloudResponse
get_default_cloud
Legacy
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
This command is not actively maintained. Use with caution.
Searches for all accessible Clouds that satisfies the query.
Parameters
Name | Type | Description | Notes |
---|---|---|---|
clouds_query | CloudsQuery |
Returns CloudListResponse
Cloud Models Legacy
Cloud
Legacy
Model used to create a Cloud.
Name | Type | Description | Notes |
---|---|---|---|
name | str | Name of this Cloud. | [default to null] |
provider | CloudProviders | Provider of this Cloud (e.g. AWS). | [default to null] |
compute_stack | ComputeStack | The compute stack associated with this cloud's primary cloud resource. | [optional] [default to null] |
region | str | Region this Cloud is operating in. This value needs to be supported by this Cloud's provider. (e.g. us-west-2) | [default to null] |
credentials | str | Credentials needed to interact with this Cloud. | [default to null] |
config | CloudConfig | Additional configurable properties of this Cloud. | [optional] [default to null] |
is_k8s | bool | Whether this cloud is managed via Kubernetes. | [optional] [default to false] |
is_aioa | bool | Whether this cloud is an AIOA cloud. | [optional] [default to false] |
availability_zones | List[str] | The availability zones that instances of this cloud are allowed to be launched in. | [optional] [default to null] |
is_bring_your_own_resource | bool | Whether the resources of this cloud are provided by the customer. | [optional] [default to null] |
is_private_cloud | bool | Whether this cloud is a private cloud. | [optional] [default to false] |
cluster_management_stack_version | ClusterManagementStackVersions | The cluster management stack version of the cloud. | [optional] [default to null] |
is_private_service_cloud | bool | Whether services created in this cloud should be private. | [optional] [default to null] |
auto_add_user | bool | Whether 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_id | str | The 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] |
id | str | Server assigned unique identifier. | [default to null] |
type | CloudTypes | [default to null] | |
creator_id | str | ID of the User who created this Cloud. | [default to null] |
created_at | datetime | Time when this Cloud was created. | [default to null] |
status | CloudStatus | The status of this cloud. | [optional] [default to null] |
state | CloudState | The state of this cloud. | [optional] [default to null] |
version | CloudVersion | The version of the cloud. | [optional] [default to null] |
is_default | bool | Whether this cloud is the default cloud. | [default to null] |
customer_aggregated_logs_config_id | str | the id of the customer aggregated logs config associated with this cloud. | [default to null] |
additional_instance_types | List[UXInstance] | the list of instance types supported in the UI and through API (SDK/CLI). | [optional] [default to null] |
is_aggregated_logs_enabled | bool | Whether the aggregated logs are enabled for this cloud. | [optional] [default to null] |
system_cluster_config_id | str | the id of the system cluster config associated with this cloud. | [optional] [default to null] |
CloudConfig
Legacy
Name | Type | Description | Notes |
---|---|---|---|
max_stopped_instances | int | Maximum 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_range | str | VPC IP range for this Cloud. | [optional] [default to null] |
vpc_peering_target_project_id | str | Project ID of the VPC to peer with. | [optional] [default to null] |
vpc_peering_target_vpc_id | str | ID 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.
Name | Type | Description | Notes |
---|---|---|---|
results | List[Cloud] | [default to null] | |
metadata | ListResponseMetadata | [optional] [default to null] |
CloudProviders
Legacy
An enumeration.
Possible Values: ['AWS', 'GCP', 'CLOUDGATEWAY', 'PCP', 'GENERIC', 'AZURE']
CloudResponse
Legacy
A response from the API. Contains a field "result" which has the contents of the response.
Name | Type | Description | Notes |
---|---|---|---|
result | Cloud | [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.
Name | Type | Description | Notes |
---|---|---|---|
name | TextQuery | Filters ComputeTemplates by name. If this field is absent, no filtering is done. | [optional] [default to null] |
paging | PageQuery | Pagination info. | [optional] [default to null] |