Deployment Set
Last Updated:2020-09-01
Create Deployment Set
Use the following codes to create a deployment set based on the specified deployment set policy and concurrency.
// Set the name of the deployment set
deploySetName := "your-deploy-set-name"
// Set the description information of the created deployment set
deployDesc := "your-deploy-set-desc"
// Set the concurrency of deployment set, range [1,5]
concurrency := 1
// Set the policy for creating deployment set, BBC instance policy only supports :"tor_ha"
strategy := "tor_ha"
queryArgs := &CreateDeploySetArgs{
Strategy: strategy,
Concurrency: concurrency,
Name: deploySetName,
Desc: deployDesc,
}
if res, err := bbcClient.CreateDeploySet(queryArgs); err != nil {
fmt.Println("Create deploy set failed: ", err)
} else {
fmt.Println("Create deploy set success, result: ", res)
}
Query the List of Deployment Sets
Use the following codes to query the list and detailed information of all deployment set instances.
if res, err := bbcClient.ListDeploySets(); err != nil {
fmt.Println("List deploy sets failed: ", err)
} else {
fmt.Println("List deploy sets success, result: ", res)
}
Query the Deployment Set Details
Use the following codes to query the details of the specified package.
// Set the deploySetID you want to query
deploySetID := "your-choose-deploy-set-id"
if res, err := bbcClient.GetDeploySet(deploySetID); err != nil {
fmt.Println("Get deploy set failed: ", err)
} else {
fmt.Println("Get deploy set success, result: ", res)
}
Delete the Specified Deployment Set
Use the following codes to delete the user's own specified deployment set.
// Set the deploySetID you want to delete
deploySetID := "your-choose-deploy-set-id"
if err := bbcClient.DeleteDeploySet(deploySetID); err != nil {
fmt.Println("Delete deploy set failed: ", err)
}