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) | ||||
| Obtaining a Specified Cluster (ShowCluster) | ||||
| Listing Clusters in a Specified Project (ListClusters) | ||||
| Updating a Specified Cluster (UpdateCluster) | ||||
| Deleting a Cluster (DeleteCluster) | ||||
| Hibernating a Cluster (HibernateCluster) | ||||
| Waking Up a Cluster (AwakeCluster) | ||||
| Obtaining a Cluster Certificate (CreateKubernetesClusterCert) | ||||
| Revoking a Cluster Certificate of a User (RevokeKubernetesClusterCert) | ||||
| Rotating a Cluster Certificate of a User (RotateClusterCredentials) | - | - | - | |
| Changing the Cluster Flavor (ResizeClusterFlavor) | - | - | - | |
| Obtaining Job Information (ShowJob) | ||||
| Binding/Unbinding the Public API Server Address (UpdateClusterEip) | ||||
| Obtaining Cluster Access Addresses (ShowClusterEndpoints) | ||||
| Obtaining Cluster Log Configuration (ShowClusterConfig) | ||||
| Configuring Cluster Logs (UpdateClusterLogConfig) | ||||
| Obtaining the Partition List (ListPartitions) | ||||
| Creating a Partition (CreatePartition) | ||||
| Obtaining Partition Details (ShowPartition) | ||||
| Updating a Partition (UpdatePartition) | ||||
| Obtaining the Global OBS Access Secret of a Cluster (GetClusterLongAKSKConfig) | ||||
| Updating the Global OBS Access Secret of a Cluster (UpdateClusterLongAKSKConfig) | ||||
| Obtaining the Global OBS Access Secret of a Project (GetLongAKSKConfig) | ||||
| Updating the Global OBS Access Secret of a Project (UpdateLongAKSKConfig) | ||||
| Obtaining Available Cluster Specifications (GetClusterFlavorSpecs) | ||||
| Obtaining the Feature Gate Status (ShowFeatureGates) | ||||
| Obtaining the AZ List (GetAvailableZone) | ||||
| Obtaining the Cluster Quota (GetClusterQuota) |
Node Management
| API | Java Sample Code | Python Sample Code | Go Sample Code | More Sample Code in Different Languages |
|---|---|---|---|---|
| Creating a Node (CreateNode) | ||||
| Obtaining a Specified Node (ShowNode) | ||||
| Listing All Nodes in a Cluster (ListNodes) | ||||
| Updating a Specified Node (UpdateNode) | ||||
| Deleting a Node (DeleteNode) | ||||
| Enabling Scale-In Protection for Nodes (LockNodeScaledown) | - | - | - | |
| Disabling Scale-In Protection for Nodes (UnlLockNodeScaledown) | - | - | - | |
| Synchronizing a Node (SyncNode) | ||||
| Synchronizing Nodes in Batches (BatchSyncNodes) | ||||
| Changing the Billing Modes of Nodes to Yearly/Monthly (BatchChangeNodeToPeriod) | - | - | - | |
| Accepting a Node (AddNode) | ||||
| Rotating a Node Certificate (RotateNodeCert) | - | - | - | |
| Accepting Nodes in a Custom Node Pool (AddNodesToNodePool) | ||||
| Resetting a Node (ResetNode) | ||||
| Removing a Node (RemoveNode) | ||||
| Migrating a Node (MigrateNode) | ||||
| Migrating Nodes to a Custom Node Pool (MigrateToNodePool) | ||||
| Obtaining the Supernode List in a Cluster (ListHyperNodes) |
Node Pool Management
| API | Java Sample Code | Python Sample Code | Go Sample Code | More Sample Code in Different Languages |
|---|---|---|---|---|
| Creating a Node Pool (CreateNodePool) | ||||
| Obtaining a Specified Node Pool (ShowNodePool) | ||||
| Listing All Node Pools in a Specified Cluster (ListNodePools) | ||||
| Updating a Specified Node Pool (UpdateNodePool) | ||||
| Deleting a Node Pool (DeleteNodePool) | ||||
| Scaling a Node Pool (ScaleNodePool) | ||||
| Synchronizing Node Configurations in a Node Pool (UpgradeNodePool) |
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) | ||||
| Listing Add-on Templates (ListAddonTemplates) | ||||
| Updating an Add-on Instance (UpdateAddonInstance) | ||||
| Rolling Back an Add-on Instance (RollbackAddonInstance) | ||||
| Deleting an Add-on Instance (DeleteAddonInstance) | ||||
| Obtaining Details About an Add-on Instance (ShowAddonInstance) | ||||
| Listing Add-on Instances (ListAddonInstances) | ||||
| Creating Add-on Check Tasks in Batches (BatchCreateAddonPrecheck) | ||||
| Listing Add-on Check Task Results (ListAddonPrecheckTasks) |
Cluster Upgrade
| API | Java Sample Code | Python Sample Code | Go Sample Code | More Sample Code in Different Languages |
|---|---|---|---|---|
| Upgrading a Cluster (UpgradeCluster) | ||||
| Obtaining Cluster Upgrade Task Details (ShowUpgradeClusterTask) | ||||
| Retrying a Cluster Upgrade Task (RetryUpgradeClusterTask) | ||||
| Obtaining a List of Cluster Upgrade Task Details (ListUpgradeClusterTasks) | ||||
| Performing a Pre-Upgrade Check for a Cluster (PreCheck) | - | - | - | |
| Obtaining Details About a Pre-Upgrade Check Task of a Cluster (GetPreCheck) | - | - | - | |
| Obtaining a List of Pre-Upgrade Check Task Details of a Cluster (GetPreCheckList) | - | - | - | |
| Performing a Post-Upgrade Check for a Cluster (PostCheck) | - | - | - | |
| Backing Up a Cluster (ClusterMasterSnapshot) | - | - | - | |
| Obtaining a List of Cluster Backup Task Details (ListClusterMasterSnapshotTasks) | ||||
| Obtaining Cluster Upgrade Information (GetClusterUpgradeInfo) | - | - | - | |
| Obtaining Cluster Upgrade Paths (GetClusterUpgradePaths) | - | - | - | |
| Obtaining the Configuration of Cluster Upgrade Feature Gates (GetClusterUpgradeFeatureGates) | - | - | - | |
| Enabling the Cluster Upgrade Workflow Booting Task (CreateUpgradeWorkFlow) | ||||
| Obtaining a List of Upgrade Workflows (ListUpgradeWorkFlows) | ||||
| Obtaining Details About a Specified Cluster Upgrade Workflow Booting Task (ShowUpgradeWorkFlow) | ||||
| Updating the Status of a Specified Cluster Upgrade Workflow Booting Task (UpgradeWorkFlowUpdate) |
Quota Management
| API | Java Sample Code | Python Sample Code | Go Sample Code | More Sample Code in Different Languages |
|---|---|---|---|---|
| Querying Resource Quotas (ShowQuotas) |
API Versions
| API | Java Sample Code | Python Sample Code | Go Sample Code | More Sample Code in Different Languages |
|---|---|---|---|---|
| Obtaining API Versions (ShowVersion) |
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) | ||||
| Deleting Resource Tags from a Specified Cluster in Batches (BatchDeleteClusterTags) | ||||
| Obtaining Resource Tags (GetResourceTags) | ||||
| Obtaining Custom Tags (GetCustomizeTags) | ||||
| Obtaining Node Labels (GetLabels) |
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) | ||||
| Obtaining the List of Parameters That Can Be Configured for a Cluster (ShowClusterConfigurationDetails) | ||||
| Obtaining the List of Configurable Parameters Supported by a Cluster (GetClusterSupportConfiguration) | - | - | - | |
| Obtaining the Parameters That Can Be Configured for a Node Pool (ShowNodePoolConfigurations) | ||||
| Changing the Values of Configuration Parameters of a Node Pool (UpdateNodePoolConfiguration) |
Chart Management
| API | Java Sample Code | Python Sample Code | Go Sample Code | More Sample Code in Different Languages |
|---|---|---|---|---|
| Uploading a Chart (UploadChart) | ||||
| Obtaining a Chart List (ListCharts) | ||||
| Obtaining a Release List (ListReleases) | ||||
| Updating a Chart (UpdateChart) | ||||
| Creating a Release (CreateRelease) | ||||
| Deleting a Chart (DeleteChart) | ||||
| Updating a Release (UpdateRelease) | ||||
| Obtaining a Chart (ShowChart) | ||||
| Deleting a Release (DeleteRelease) | ||||
| Downloading a Chart (DownloadChart) | ||||
| Obtaining a Release (ShowRelease) | ||||
| Obtaining Chart Values (ShowChartValues) | ||||
| Obtaining Historical Records of a Release (ShowReleaseHistory) | ||||
| Obtaining the Quotas of User Charts (ShowUserChartsQuotas) |
Permissions Management
| API | Java Sample Code | Python Sample Code | Go Sample Code | More Sample Code in Different Languages |
|---|---|---|---|---|
| Creating an Access Policy (CreateAccessPolicy) | ||||
| Obtaining the Access Policy List (ListAccessPolicy) | ||||
| Obtaining Access Policy Details (GetAccessPolicy) | ||||
| Updating an Access Policy (UpdateAccessPolicy) | ||||
| Deleting an Access Policy (DeleteAccessPolicy) | ||||
| Creating a Pod Identity Association (CreatePodIdentityAssociation) | - | - | - | |
| Querying Pod Identity Associations of a Specified Cluster (ListPodIdentityAssociations) | - | - | - | |
| Querying a Specified Pod Identity Association (ShowPodIdentityAssociation) | - | - | - | |
| Updating a Pod Identity Association (UpdatePodIdentityAssociation) | - | - | - | |
| Deleting a Pod Identity Association (DeletePodIdentityAssociation) | - | - | - | |
| Obtaining the Agency Credential for a Pod Identity Association (AssumeAgencyForPodIdentity) | - | - | - |
Job Management
| API | Java Sample Code | Python Sample Code | Go Sample Code | More Sample Code in Different Languages |
|---|---|---|---|---|
| Obtaining the Job List (ListJobs) | - | - | - | |
| Obtaining Job Details (GetOneJob) | - | - | - | |
| Deleting a Job (DeleteJob) | - | - | - |
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot