Update Cloud Region
Details
API Details | Release-Specific Information | |||
---|---|---|---|---|
CloudCenter Platform 4x | CloudCenter Suite 5x | |||
Name | Update Cloud Region | |||
Description | Updates a configured cloud region for the specified tenant using the specified Cloud Region ID | |||
Allowed Role(s) | ADMIN, WM_ADMIN, and CO_RL_ADMIN | |||
Method | PUT | |||
URI | vi/tenants/tenantId/clouds/cloudId/regions/cloudRegionId | cloudcenter-cloud-setup/api/vi/tenants/tenantId/clouds/cloudId/regions/cloudRegionId | ||
Sample Request | curl -k -X GET -H "Accept: application/json" -u cloudcenteradmin:40E45DBE57E35ECB "https://<HOST>:<PORT>/cloudcenter-cloud-setup/api/v1/tenants/1/clouds/20/regions/21" | curl -k -X PUT -H "Accept: application/json" -u cloudcenteradmin:40E45DBE57E35ECB "https://<HOST>:<PORT>/cloudcenter-cloud-setup/api/v1/tenants/1/clouds/20/regions/21" | ||
Release |
| Modified in CloudCenter Suite 5.0.0 | ||
Notes |
| |||
Back To Links | CloudCenter Platform 4x API | Workload Manager API | ||
ESB Header | action: update.tenants.tenantId.clouds.cloudId.regions.cloudRegionId See the Enterprise Service Bus (ESB) section for additional context. | Not applicable |
Sample Request Body 1
This request updates the displayName from US DC to Openstack-USDC.
If you do not specify the "enabled":true flag in the request body, the CloudCenter platform automatically changes the setting to true for this flag and API.
{ "cloudRegions": [ { "displayName": "US DC", "regionName": "Openstack-USDC" } ] }
Response
{ "id": "3", "resource": "https://<HOST>:<PORT>/v1/tenants/2/clouds/3/regions/3", "perms": [], "cloudId": "3", "displayName": "Openstack-USDC", "regionName": "Openstack-USDC", "description": null, "importRegion": null, "gateway": { "address": "198.35.57.86", "dnsName": null, "status": "RUNNING", "cloudId": null, "cloudAccountId": null, }, "storage": null, "enabled": true, "activated": true, "publicCloud": true, "numUsers": 7, "status": "RUNNING", "statusDetail": null, "regionProperties": [] }
Example 2
curl -k -X PUT -H "Accept: application/json" -H "Content-Type: application/json" -u cloudcenteradmin:40E45DBE57E35ECB "https://<HOST>:<PORT>/v1/tenants/1/clouds/20/regions/21/actions"
Request Body
This request updates the External Service scripts to persist each action for both services and regions. As these actions are defined at the region level, you do not need to define the actions for each service.
{ "externalActions": [{ "actionName": "POST_VM_INIT", "actionType": "CMD", "actionValue": "echo \"success launched vm\"" } , { "actionName": "PRE_VM_STOP", "actionType": "SCRIPT", "actionValue": "view10.sh" } , { "actionName": "PRE_VM_INIT", "actionType": "URL", "actionValue": "%REPO_ID_2%cliqrj/view10.sh" } , { "actionName": "PRE_VM_START", "actionType": "SCRIPT", "actionValue": "view10.sh" } , { "actionName": "POST_VM_STOP", "actionType": "URL", "actionValue": "http://s3.amazonaws.com/cliqrj/view10.sh" } ], "externalBundleLocation": "%REPO_ID_2%cliqrj/cloudregion.zip" }
Response
{ "id": "21", "resource": "https://<HOST>:<PORT>/v1/tenants/1/clouds/20/regions/21/", "perms": [], "cloudId": "20", "displayName": "OpenStack Private Cloud", "regionName": "Cliqr-os-sc2", "description": "OpenStack Private Cloud", "importRegion": null, "gateway": { "address": "10.10.1.1", "dnsName": null, "status": "RUNNING", "cloudId": "20", "cloudAccountId": "1" }, "enabled": true, "activated": true, ""publicCloud": true, "numUsers": 18, "status": "RUNNING", "statusDetail": null, "regionProperties": [{ "name": "InstanceNamingStrategy", "value": "CalloutHostname" }, { "name": "Region", "value": "a" }, { "name": "ExternalBundleLocation", "value": "" }, { "name": "AvailabilityZones", "value": "" }, { "name": "InstanceIPAMStrategy", "value": "None" }, { "name": "NodeNameConfig", "value": "%VM_PREFIX%-%os1%-%os2%-%OS1%-%OS2%-%RND7%-%UID%-%VID%" }, { "name": "Endpoint", "value": "http://<HOST>:<PORT>/v2.0" }, { "name": "NodesPerBatch", "value": "50" }], "externalActions": [{ "actionName": "POST_VM_INIT", "actionType": "CMD", "actionValue": "echo \"success launched vm\"" } , { "actionName": "PRE_VM_STOP", "actionType": "SCRIPT", "actionValue": "view10.sh" } , { "actionName": "PRE_VM_INIT", "actionType": "URL", "actionValue": "%REPO_ID_2%cliqrj/view10.sh" } , { "actionName": "PRE_VM_START", "actionType": "SCRIPT", "actionValue": "view10.sh" } , { "actionName": "POST_VM_STOP", "actionType": "URL", "actionValue": "http://<HOST>:<PORT>/cliqrj/view10.sh" } ], "externalBundleLocation": "%REPO_ID_2%cliqrj/cloudregion.zip" }
Request Attributes
tenantId
Required | |||||||||||
cloudId
Required | |||||||||||
cloudRegionId
Required | |||||||||||
cloudRegions (click for additional details) | |||||||||||
displayName
| |||||||||||
regionName
| |||||||||||
externalActions
| |||||||||||
externalBundleLocation
|
Response Attributes
id
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
resource
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
perms (click for additional information) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|