Updated on 2026-09-08 GMT+08:00

SDK Sample Code

Cluster Management

API

Java Sample Code

Python Sample Code

Go Sample Code

More Sample Code in Different Languages

Creating a Cluster (CreateCluster)

Java

Python

Go

Go to API Explorer for online debugging.

Obtaining a Specified Cluster (ShowCluster)

Java

Python

Go

Go to API Explorer for online debugging.

Listing Clusters in a Specified Project (ListClusters)

Java

Python

Go

Go to API Explorer for online debugging.

Updating a Specified Cluster (UpdateCluster)

Java

Python

Go

Go to API Explorer for online debugging.

Deleting a Cluster (DeleteCluster)

Java

Python

Go

Go to API Explorer for online debugging.

Hibernating a Cluster (HibernateCluster)

Java

Python

Go

Go to API Explorer for online debugging.

Waking Up a Cluster (AwakeCluster)

Java

Python

Go

Go to API Explorer for online debugging.

Obtaining a Cluster Certificate (CreateKubernetesClusterCert)

Java

Python

Go

Go to API Explorer for online debugging.

Revoking a Cluster Certificate of a User (RevokeKubernetesClusterCert)

Java

Python

Go

Go to API Explorer for online debugging.

Rotating a Cluster Certificate of a User (RotateClusterCredentials)

-

-

-

Go to API Explorer for online debugging.

Changing the Cluster Flavor (ResizeClusterFlavor)

-

-

-

Go to API Explorer for online debugging.

Obtaining Job Information (ShowJob)

Java

Python

Go

Go to API Explorer for online debugging.

Binding/Unbinding the Public API Server Address (UpdateClusterEip)

Java

Python

Go

Go to API Explorer for online debugging.

Obtaining Cluster Access Addresses (ShowClusterEndpoints)

Java

Python

Go

Go to API Explorer for online debugging.

Obtaining Cluster Log Configuration (ShowClusterConfig)

Java

Python

Go

Go to API Explorer for online debugging.

Configuring Cluster Logs (UpdateClusterLogConfig)

Java

Python

Go

Go to API Explorer for online debugging.

Obtaining the Partition List (ListPartitions)

Java

Python

Go

Go to API Explorer for online debugging.

Creating a Partition (CreatePartition)

Java

Python

Go

Go to API Explorer for online debugging.

Obtaining Partition Details (ShowPartition)

Java

Python

Go

Go to API Explorer for online debugging.

Updating a Partition (UpdatePartition)

Java

Python

Go

Go to API Explorer for online debugging.

Obtaining the Global OBS Access Secret of a Cluster (GetClusterLongAKSKConfig)

Java

Python

Go

Go to API Explorer for online debugging.

Updating the Global OBS Access Secret of a Cluster (UpdateClusterLongAKSKConfig)

Java

Python

Go

Go to API Explorer for online debugging.

Obtaining the Global OBS Access Secret of a Project (GetLongAKSKConfig)

Java

Python

Go

Go to API Explorer for online debugging.

Updating the Global OBS Access Secret of a Project (UpdateLongAKSKConfig)

Java

Python

Go

Go to API Explorer for online debugging.

Obtaining Available Cluster Specifications (GetClusterFlavorSpecs)

Java

Python

Go

Go to API Explorer for online debugging.

Obtaining the Feature Gate Status (ShowFeatureGates)

Java

Python

Go

Go to API Explorer for online debugging.

Obtaining the AZ List (GetAvailableZone)

Java

Python

Go

Go to API Explorer for online debugging.

Obtaining the Cluster Quota (GetClusterQuota)

Java

Python

Go

Go to API Explorer for online debugging.

Node Management

API

Java Sample Code

Python Sample Code

Go Sample Code

More Sample Code in Different Languages

Creating a Node (CreateNode)

Java

Python

Go

Go to API Explorer for online debugging.

Obtaining a Specified Node (ShowNode)

Java

Python

Go

Go to API Explorer for online debugging.

Listing All Nodes in a Cluster (ListNodes)

Java

Python

Go

Go to API Explorer for online debugging.

Updating a Specified Node (UpdateNode)

Java

Python

Go

Go to API Explorer for online debugging.

Deleting a Node (DeleteNode)

Java

Python

Go

Go to API Explorer for online debugging.

Enabling Scale-In Protection for Nodes (LockNodeScaledown)

-

-

-

Go to API Explorer for online debugging.

Disabling Scale-In Protection for Nodes (UnlLockNodeScaledown)

-

-

-

Go to API Explorer for online debugging.

Synchronizing a Node (SyncNode)

Java

Python

Go

Go to API Explorer for online debugging.

Synchronizing Nodes in Batches (BatchSyncNodes)

Java

Python

Go

Go to API Explorer for online debugging.

Changing the Billing Modes of Nodes to Yearly/Monthly (BatchChangeNodeToPeriod)

-

-

-

Go to API Explorer for online debugging.

Accepting a Node (AddNode)

Java

Python

Go

Go to API Explorer for online debugging.

Rotating a Node Certificate (RotateNodeCert)

-

-

-

Go to API Explorer for online debugging.

Accepting Nodes in a Custom Node Pool (AddNodesToNodePool)

Java

Python

Go

Go to API Explorer for online debugging.

Resetting a Node (ResetNode)

Java

Python

Go

Go to API Explorer for online debugging.

Removing a Node (RemoveNode)

Java

Python

Go

Go to API Explorer for online debugging.

Migrating a Node (MigrateNode)

Java

Python

Go

Go to API Explorer for online debugging.

Migrating Nodes to a Custom Node Pool (MigrateToNodePool)

Java

Python

Go

Go to API Explorer for online debugging.

Obtaining the Supernode List in a Cluster (ListHyperNodes)

Java

Python

Go

Go to API Explorer for online debugging.

Node Pool Management

API

Java Sample Code

Python Sample Code

Go Sample Code

More Sample Code in Different Languages

Creating a Node Pool (CreateNodePool)

Java

Python

Go

Go to API Explorer for online debugging.

Obtaining a Specified Node Pool (ShowNodePool)

Java

Python

Go

Go to API Explorer for online debugging.

Listing All Node Pools in a Specified Cluster (ListNodePools)

Java

Python

Go

Go to API Explorer for online debugging.

Updating a Specified Node Pool (UpdateNodePool)

Java

Python

Go

Go to API Explorer for online debugging.

Deleting a Node Pool (DeleteNodePool)

Java

Python

Go

Go to API Explorer for online debugging.

Scaling a Node Pool (ScaleNodePool)

Java

Python

Go

Go to API Explorer for online debugging.

Synchronizing Node Configurations in a Node Pool (UpgradeNodePool)

Java

Python

Go

Go to API Explorer for online debugging.

Add-on Management

API

Java Sample Code

Python Sample Code

Go Sample Code

More Sample Code in Different Languages

Installing an Add-on Instance (CreateAddonInstance)

Java

Python

Go

Go to API Explorer for online debugging.

Listing Add-on Templates (ListAddonTemplates)

Java

Python

Go

Go to API Explorer for online debugging.

Updating an Add-on Instance (UpdateAddonInstance)

Java

Python

Go

Go to API Explorer for online debugging.

Rolling Back an Add-on Instance (RollbackAddonInstance)

Java

Python

Go

Go to API Explorer for online debugging.

Deleting an Add-on Instance (DeleteAddonInstance)

Java

Python

Go

Go to API Explorer for online debugging.

Obtaining Details About an Add-on Instance (ShowAddonInstance)

Java

Python

Go

Go to API Explorer for online debugging.

Listing Add-on Instances (ListAddonInstances)

Java

Python

Go

Go to API Explorer for online debugging.

Creating Add-on Check Tasks in Batches (BatchCreateAddonPrecheck)

Java

Python

Go

Go to API Explorer for online debugging.

Listing Add-on Check Task Results (ListAddonPrecheckTasks)

Java

Python

Go

Go to API Explorer for online debugging.

Cluster Upgrade

API

Java Sample Code

Python Sample Code

Go Sample Code

More Sample Code in Different Languages

Upgrading a Cluster (UpgradeCluster)

Java

Python

Go

Go to API Explorer for online debugging.

Obtaining Cluster Upgrade Task Details (ShowUpgradeClusterTask)

Java

Python

Go

Go to API Explorer for online debugging.

Retrying a Cluster Upgrade Task (RetryUpgradeClusterTask)

Java

Python

Go

Go to API Explorer for online debugging.

Obtaining a List of Cluster Upgrade Task Details (ListUpgradeClusterTasks)

Java

Python

Go

Go to API Explorer for online debugging.

Performing a Pre-Upgrade Check for a Cluster (PreCheck)

-

-

-

Go to API Explorer for online debugging.

Obtaining Details About a Pre-Upgrade Check Task of a Cluster (GetPreCheck)

-

-

-

Go to API Explorer for online debugging.

Obtaining a List of Pre-Upgrade Check Task Details of a Cluster (GetPreCheckList)

-

-

-

Go to API Explorer for online debugging.

Performing a Post-Upgrade Check for a Cluster (PostCheck)

-

-

-

Go to API Explorer for online debugging.

Backing Up a Cluster (ClusterMasterSnapshot)

-

-

-

Go to API Explorer for online debugging.

Obtaining a List of Cluster Backup Task Details (ListClusterMasterSnapshotTasks)

Java

Python

Go

Go to API Explorer for online debugging.

Obtaining Cluster Upgrade Information (GetClusterUpgradeInfo)

-

-

-

Go to API Explorer for online debugging.

Obtaining Cluster Upgrade Paths (GetClusterUpgradePaths)

-

-

-

Go to API Explorer for online debugging.

Obtaining the Configuration of Cluster Upgrade Feature Gates (GetClusterUpgradeFeatureGates)

-

-

-

Go to API Explorer for online debugging.

Enabling the Cluster Upgrade Workflow Booting Task (CreateUpgradeWorkFlow)

Java

Python

Go

Go to API Explorer for online debugging.

Obtaining a List of Upgrade Workflows (ListUpgradeWorkFlows)

Java

Python

Go

Go to API Explorer for online debugging.

Obtaining Details About a Specified Cluster Upgrade Workflow Booting Task (ShowUpgradeWorkFlow)

Java

Python

Go

Go to API Explorer for online debugging.

Updating the Status of a Specified Cluster Upgrade Workflow Booting Task (UpgradeWorkFlowUpdate)

Java

Python

Go

Go to API Explorer for online debugging.

Quota Management

API

Java Sample Code

Python Sample Code

Go Sample Code

More Sample Code in Different Languages

Querying Resource Quotas (ShowQuotas)

Java

Python

Go

Go to API Explorer for online debugging.

API Versions

API

Java Sample Code

Python Sample Code

Go Sample Code

More Sample Code in Different Languages

Obtaining API Versions (ShowVersion)

Java

Python

Go

Go to API Explorer for online debugging.

Tag Management

API

Java Sample Code

Python Sample Code

Go Sample Code

More Sample Code in Different Languages

Adding Resource Tags to a Specified Cluster in Batches (BatchCreateClusterTags)

Java

Python

Go

Go to API Explorer for online debugging.

Deleting Resource Tags from a Specified Cluster in Batches (BatchDeleteClusterTags)

Java

Python

Go

Go to API Explorer for online debugging.

Obtaining Resource Tags (GetResourceTags)

Java

Python

Go

Go to API Explorer for online debugging.

Obtaining Custom Tags (GetCustomizeTags)

Java

Python

Go

Go to API Explorer for online debugging.

Obtaining Node Labels (GetLabels)

Java

Python

Go

Go to API Explorer for online debugging.

Configuration Management

API

Java Sample Code

Python Sample Code

Go Sample Code

More Sample Code in Different Languages

Obtaining the List of Parameters That Can Be Configured for a Node Pool (ShowNodePoolConfigurationDetails)

Java

Python

Go

Go to API Explorer for online debugging.

Obtaining the List of Parameters That Can Be Configured for a Cluster (ShowClusterConfigurationDetails)

Java

Python

Go

Go to API Explorer for online debugging.

Obtaining the List of Configurable Parameters Supported by a Cluster (GetClusterSupportConfiguration)

-

-

-

Go to API Explorer for online debugging.

Obtaining the Parameters That Can Be Configured for a Node Pool (ShowNodePoolConfigurations)

Java

Python

Go

Go to API Explorer for online debugging.

Changing the Values of Configuration Parameters of a Node Pool (UpdateNodePoolConfiguration)

Java

Python

Go

Go to API Explorer for online debugging.

Chart Management

API

Java Sample Code

Python Sample Code

Go Sample Code

More Sample Code in Different Languages

Uploading a Chart (UploadChart)

Java

Python

Go

Go to API Explorer for online debugging.

Obtaining a Chart List (ListCharts)

Java

Python

Go

Go to API Explorer for online debugging.

Obtaining a Release List (ListReleases)

Java

Python

Go

Go to API Explorer for online debugging.

Updating a Chart (UpdateChart)

Java

Python

Go

Go to API Explorer for online debugging.

Creating a Release (CreateRelease)

Java

Python

Go

Go to API Explorer for online debugging.

Deleting a Chart (DeleteChart)

Java

Python

Go

Go to API Explorer for online debugging.

Updating a Release (UpdateRelease)

Java

Python

Go

Go to API Explorer for online debugging.

Obtaining a Chart (ShowChart)

Java

Python

Go

Go to API Explorer for online debugging.

Deleting a Release (DeleteRelease)

Java

Python

Go

Go to API Explorer for online debugging.

Downloading a Chart (DownloadChart)

Java

Python

Go

Go to API Explorer for online debugging.

Obtaining a Release (ShowRelease)

Java

Python

Go

Go to API Explorer for online debugging.

Obtaining Chart Values (ShowChartValues)

Java

Python

Go

Go to API Explorer for online debugging.

Obtaining Historical Records of a Release (ShowReleaseHistory)

Java

Python

Go

Go to API Explorer for online debugging.

Obtaining the Quotas of User Charts (ShowUserChartsQuotas)

Java

Python

Go

Go to API Explorer for online debugging.

Permissions Management

API

Java Sample Code

Python Sample Code

Go Sample Code

More Sample Code in Different Languages

Creating an Access Policy (CreateAccessPolicy)

Java

Python

Go

Go to API Explorer for online debugging.

Obtaining the Access Policy List (ListAccessPolicy)

Java

Python

Go

Go to API Explorer for online debugging.

Obtaining Access Policy Details (GetAccessPolicy)

Java

Python

Go

Go to API Explorer for online debugging.

Updating an Access Policy (UpdateAccessPolicy)

Java

Python

Go

Go to API Explorer for online debugging.

Deleting an Access Policy (DeleteAccessPolicy)

Java

Python

Go

Go to API Explorer for online debugging.

Creating a Pod Identity Association (CreatePodIdentityAssociation)

-

-

-

Go to API Explorer for online debugging.

Querying Pod Identity Associations of a Specified Cluster (ListPodIdentityAssociations)

-

-

-

Go to API Explorer for online debugging.

Querying a Specified Pod Identity Association (ShowPodIdentityAssociation)

-

-

-

Go to API Explorer for online debugging.

Updating a Pod Identity Association (UpdatePodIdentityAssociation)

-

-

-

Go to API Explorer for online debugging.

Deleting a Pod Identity Association (DeletePodIdentityAssociation)

-

-

-

Go to API Explorer for online debugging.

Obtaining the Agency Credential for a Pod Identity Association (AssumeAgencyForPodIdentity)

-

-

-

Go to API Explorer for online debugging.

Job Management

API

Java Sample Code

Python Sample Code

Go Sample Code

More Sample Code in Different Languages

Obtaining the Job List (ListJobs)

-

-

-

Go to API Explorer for online debugging.

Obtaining Job Details (GetOneJob)

-

-

-

Go to API Explorer for online debugging.

Deleting a Job (DeleteJob)

-

-

-

Go to API Explorer for online debugging.