Skip to main content

Cloud API Reference (Legacy)

Cloud API Reference (Legacy)

warning

These APIs are legacy and deprecated. Please use the current APIs instead.

Cloud SDK

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()

get_cloud

Retrieves a Cloud.

Parameters

NameTypeDescriptionNotes
cloud_idstrID of the Cloud to retrieve.Defaults to null

Returns CloudResponse

get_default_cloud

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

Searches for all accessible Clouds that satisfies the query.

Parameters

NameTypeDescriptionNotes
clouds_queryCloudsQuery

Returns CloudListResponse

Cloud Models

Cloud

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]
is_aggregated_logs_enabledboolWhether the aggregated logs are enabled for this cloud.[optional] [default to null]
system_cluster_config_idstrthe id of the system cluster config associated with this cloud.[optional] [default to null]

CloudConfig

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

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

An enumeration.

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

CloudResponse

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

NameTypeDescriptionNotes
resultCloud[default to null]

CloudState

An enumeration.

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

CloudStatus

An enumeration.

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

CloudTypes

An enumeration.

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

CloudVersion

An enumeration.

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

CloudsQuery

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]