Update Cloud Region

Details

API DetailsRelease-Specific Information
CloudCenter Platform 4xCloudCenter Suite 5x
NameUpdate 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

MethodPUT
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
  • Introduced in CloudCenter 4.0
  • Enhanced in CloudCenter 4.5.1 to include the externalActions and externalBundleLocation attributes so you can configure External Service Deployment Lifecycle actions (Pre-VM start, Pre-VM stop, and so forth) at the cloud region level
  • Enhanced in CloudCenter 4.8.0 to ensure that the enabled parameter is set to true if you do not specify it in the payload
  • Updated to deprecate the publicCloud attribute in CloudCenter 4.9.0 and later

Modified in CloudCenter Suite 5.0.0

Notes
  • Only resource owners and users with WRITE perms can view all the fields for this resource.
  • Other users can only view common fields like name, description, and so forth. See Permission Control for additional context.

  • If you include a cloudRegionId to identify a cloud region, the response includes information for that cloud region only.
Back To LinksCloudCenter Platform 4x APIWorkload 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
  • DescriptionUnique, system-generated identifier for the tenant organization. A tenant admin must belong to this tenant to invoke any APIs for this tenant. See the Tenant ID and Tenant Name Dependency section for the relevant release for additional context.

  • Type: String

Required

cloudId
  • Description: Unique, system-generated identifier for a cloud representation (see View Deployment Environments for additional details)

  • Type: String

Required

cloudRegionId
  • Description: Unique, system-generated identifier for a cloud region
  • Type: String

Required

cloudRegions (click for additional details)
displayName
  • DescriptionA descriptive name for this CloudCenter resource.
  • Type: String
regionName
  • DescriptionThe name of this cloud region as listed in the Supported Public Clouds section for the relevant release.
  • Type: String
externalActions
  • Description: Defines the actions to be defined for each service for each phase when you create/update the service
  • Type: Array of service lifecycle actions. See the Service Lifecycle Actions section for the relevant release for additional context.

    actionName
    • Type: Enumeration
    actionType
    • Description: The value of this attribute is interpreted based on the value of the actionName attribute for this Service Lifecycle Action. See the Service Lifecycle Action section for the relevant release for additional context.
    • Type: Enumeration

      EnumerationDescription
      SCRIPT

      Indicates the script (baked into the image that is used to launch the VM) name and parameters (if any) to be executed on the VM during the corresponding actionName step.

      The entity to be run for this Service Lifecycle Action is a script located at a path relative to where the service bundle zip file is extracted:
      - Linux VMs = /usr/local/osmosix/service/serviceName
      - Windows VMs = C:\program files\osmosix\service\$SERVICE_NAME

      See the Service Lifecycle Action section for the relevant release for additional context.

       This option is not available for Container Service.

      URLIndicates the location from where the script is to be downloaded and executed on the VM during the corresponding actionName step.

      The entity to be run for this Service Lifecycle Action is a HTTP URL pointing to a script that is downloaded (the HTTP URL must be accessible from this VM). See the Service Lifecycle Action section for the relevant release for additional context.
      CMD

      Indicates the command that is be executed on the VM during actionName step.

      The entity to be run for this Service Lifecycle Action is a command that is accessible in the PATH for the user (built into the image that is used to launch the VMs):

      - Linux VMs = cliqruser

      - WindowsVMs = cliqr

      See the Service Lifecycle Action section for the relevant release for additional context.

      Effective CloudCenter 4.1.1, admins can configure the local user on application VMs. The CCO configuration file (/usr/local/osmosix/etc/gateway_config.properties) has an optional property called agent.username to specify the local user. If no user name is specified then cliqruser is the default user.

    actionValue
    • Description: Identifies the value that you provide for the selected actionType.

    • Type: String

 externalBundleLocation
  • Description: Location of the zip file that contains the external Bundle Store artifacts that are downloaded during deployment orchestration. 
    • The External Actions Bundle zip file contains all scripts required to manage the external lifecycle. You must provide the following information for this zip file depending on the resource being configured:

      • If you are configuring this file at the cloud region level – this file must contain a directory called cloudregion which contains all the scripts.

      • If you are configuring this file for a service – name this file as ServiceID.zip. For example, tomcat6.zip, where tomcat6 is the Service ID.

    • This attribute is available for all service types
    • The bundle is validated against associated repositories.
    • The repositories field should not be empty.
    • The Service Lifecycle Actions definition (if it is a SCRIPT) is used to locate the scripts in this ZIP file.
    • See Manage Services and the "Parameters and Macros" sections for the relevant release or additional context.
  • Type: String

Response Attributes

id
  • DescriptionUnique, system-generated identifier for this CloudCenter Resource.

  • Type: String
resource
  • Description: Unique URL to access this resource.
  • Type: String
perms (click for additional information)

id
  • DescriptionUnique, system-generated identifier for this CloudCenter Resource.

  • Type: String

resource
  • Description: Unique URL to access this resource.
  • Type: String

perms (click for additional details)

cloudId
  • Description: Unique, system-generated identifier for a cloud representation (see View Deployment Environments for additional details)

  • Type: String

displayName
  • DescriptionA descriptive name for this CloudCenter resource.
  • Type: String
regionName
  • DescriptionThe name of this cloud region as listed in the Supported Public Clouds section for the relevant release.
  • Type: String
description
  • DescriptionA brief description for this CloudCenter Resource.

  • Type: String
importRegion
  • Description: Identified the cloud region details
  • Type: Sequence of attributes

    name
    • DescriptionThe name assigned for this CloudCenter ResourceValid characters are letters, numbers, underscores, and spaces.

    • Type: String

    displayName
    • DescriptionA descriptive name for this CloudCenter resource.
    • Type: String

gateway (click for additional details)

storage (click for additional details)

enabled
  • Description: Indicates that this resource has been enabled. The default differs based on the resource.

    • true = The resource has been enabled (v2 aging and suspension policies are enabled by default).

    • false = The resource has not been enabled.

  • Type: Boolean

activated
  • Description: Indicates whether this account has been activated.

    • true = the account has been activated
    • false = the account has not been activated
  • Type: Boolean
publicCloud (Deprecated)
  • Description: Indicates if this is a public cloud. This attribute is useful to identify datacenters and private clouds as features like sync storage and add storage type is not applicable to public clouds.
  • Type: Boolean
    • true = This is a public cloud. See the Public Clouds section for the relevant release for a complete list.
    • false = This is not a public cloud. See the Datacenters and Private Clouds section for the relevant release for a complete list.
numUsers
  • DescriptionNumber of users that are currently using this resource
  • Type: Long
status
  • Description: Status of this resource 
  • Type: Enumeration

    EnumerationDescription
    RunningThe cloud account is operational
    StoppedThe cloud account is not operational
    MaintenanceModeThe cloud account is under maintenance
statusDetail
  • Description: Indicates the status of this cloud
  • Type: Enumeration

    EnumerationDescription
    CLOUD_ACCOUNT_NOT_CONFIGUREDThere are no cloud accounts configured for this cloud.
    NO_REGION_RUNNINGThe cloud does not have a region that is in running state.
    RUNNINGThe cloud has at least one configured cloud account with at least one cloud region in running state
regionProperties
  • Description: Properties for this region
  • TypeName-Value Pair (array)
externalActions
  • Description: Defines the actions to be defined for each service for each phase when you create/update the service
  • Type: Array of service lifecycle actions. See the Service Lifecycle Actions section for the relevant release for additional context.

    actionName
    • Type: Enumeration
    actionType
    • Description: The value of this attribute is interpreted based on the value of the actionName attribute for this Service Lifecycle Action. See the Service Lifecycle Action section for the relevant release for additional context.
    • Type: Enumeration

      EnumerationDescription
      SCRIPT

      Indicates the script (baked into the image that is used to launch the VM) name and parameters (if any) to be executed on the VM during the corresponding actionName step.

      The entity to be run for this Service Lifecycle Action is a script located at a path relative to where the service bundle zip file is extracted:
      - Linux VMs = /usr/local/osmosix/service/serviceName
      - Windows VMs = C:\program files\osmosix\service\$SERVICE_NAME

      See the Service Lifecycle Action section for the relevant release for additional context.

       This option is not available for Container Service.

      URLIndicates the location from where the script is to be downloaded and executed on the VM during the corresponding actionName step.

      The entity to be run for this Service Lifecycle Action is a HTTP URL pointing to a script that is downloaded (the HTTP URL must be accessible from this VM). See the Service Lifecycle Action section for the relevant release for additional context.
      CMD

      Indicates the command that is be executed on the VM during actionName step.

      The entity to be run for this Service Lifecycle Action is a command that is accessible in the PATH for the user (built into the image that is used to launch the VMs):

      - Linux VMs = cliqruser

      - WindowsVMs = cliqr

      See the Service Lifecycle Action section for the relevant release for additional context.

      Effective CloudCenter 4.1.1, admins can configure the local user on application VMs. The CCO configuration file (/usr/local/osmosix/etc/gateway_config.properties) has an optional property called agent.username to specify the local user. If no user name is specified then cliqruser is the default user.

    actionValue
    • Description: Identifies the value that you provide for the selected actionType.

    • Type: String

 externalBundleLocation
  • Description: Location of the zip file that contains the external Bundle Store artifacts that are downloaded during deployment orchestration. 
    • The External Actions Bundle zip file contains all scripts required to manage the external lifecycle. You must provide the following information for this zip file depending on the resource being configured:

      • If you are configuring this file at the cloud region level – this file must contain a directory called cloudregion which contains all the scripts.

      • If you are configuring this file for a service – name this file as ServiceID.zip. For example, tomcat6.zip, where tomcat6 is the Service ID.

    • This attribute is available for all service types
    • The bundle is validated against associated repositories.
    • The repositories field should not be empty.
    • The Service Lifecycle Actions definition (if it is a SCRIPT) is used to locate the scripts in this ZIP file.
    • See Manage Services and the "Parameters and Macros" sections for the relevant release or additional context.
  • Type: String

lastInstanceSyncTime
  • Description: Administrators have the ability to sync instance type and price information from the Package Store when they see a change in cloud provider instance type definitions and price information. This field identifies the date and time when the instance was last synced. See the Manage Instance Type section for additional details.
  • Type: Long

Unable to render {include} The included page could not be found.

cloudConnectStatus
  • Description: The state of the cloud connection. Effective CloudCenter Suite 5.0 and later releases.

  • Type: Enumeration

    EnumerationDescription
    WAITINGThe system is waiting to receive a status.
    CONNECTEDThe cloud is connected.
    NOT_APPLICABLEThe state does not apply to the CloudCenter Suite.

strategyBundleLocation
  • Description: The location from where the CloudCenter Suite downloads the installation bundles. Effective CloudCenter Suite 5.0 and later releases.

  • Type: String

strategy
  • Description:Identifies the overall strategy, properties, definitions, and restrictions for the cloud region. Effective CloudCenter 5.0.0 and later.

  • Type: Array of details for the cloud strategy

    properties
    • Description: Identifies the VM Naming and IPAM Strategies on a per cloud region basis (Strategy Bundle, Instance Naming Strategy, Node Name Config, Instance IPAM Strategy, Custom VM NAme, IPAM Alloc Rule, and IPAM Dealloc Rule – based on the information provided in the Guidance for Callout Scripts section).

    • Type: Array of strategy management details for each region


    propertyDefsType
    • Description: Identifies the  property value restrictions and the metadata definitions  for each property description.

    • Type: Array of value details

      propertyValueConstraintDefs
      • Description: Identifies the restrictions for each property value.
      • Type: String

      propertyMetadataDefs
      • Description: Information about the resource property

      • Type: Array of name-value pairs

        name
        • DescriptionThe name assigned for this CloudCenter ResourceValid characters are letters, numbers, underscores, and spaces.

        • Type: String

        value
        • Description: Indicates the set value for this property
        • Type: Float

    strategyActions
    • Description: Identifies the possible actions for each strategy.

    • Type: Enumeration

      StrategyEnumerationDescription
      Instance IPAM Strategy

      IPAM_ALLOCThe location of your custom IPAM address allocation script
      IPAM_DEALLOCThe location of your custom IPAM address deallocation script.
      VM_NAMINGCalled before each node is launched. It is injected into the script with all the name variables (name of application, name of tier, image selected) for each job.
      Instance Naming Strategy

      DefaultThe default method provided by Cisco is generation of a string consisting of a predefined token prefixed with cqjw-
      CliQrMacroReplacementThe Node Name Config details are required.
      HostnameCalloutThe Custom VM Name details are required.

externalActions
  • Description: Defines the actions to be defined for each service for each phase when you create/update the service
  • Type: Array of service lifecycle actions. See the Service Lifecycle Actions section for the relevant release for additional context.

    actionName
    • Type: Enumeration
    actionType
    • Description: The value of this attribute is interpreted based on the value of the actionName attribute for this Service Lifecycle Action. See the Service Lifecycle Action section for the relevant release for additional context.
    • Type: Enumeration

      EnumerationDescription
      SCRIPT

      Indicates the script (baked into the image that is used to launch the VM) name and parameters (if any) to be executed on the VM during the corresponding actionName step.

      The entity to be run for this Service Lifecycle Action is a script located at a path relative to where the service bundle zip file is extracted:
      - Linux VMs = /usr/local/osmosix/service/serviceName
      - Windows VMs = C:\program files\osmosix\service\$SERVICE_NAME

      See the Service Lifecycle Action section for the relevant release for additional context.

       This option is not available for Container Service.

      URLIndicates the location from where the script is to be downloaded and executed on the VM during the corresponding actionName step.

      The entity to be run for this Service Lifecycle Action is a HTTP URL pointing to a script that is downloaded (the HTTP URL must be accessible from this VM). See the Service Lifecycle Action section for the relevant release for additional context.
      CMD

      Indicates the command that is be executed on the VM during actionName step.

      The entity to be run for this Service Lifecycle Action is a command that is accessible in the PATH for the user (built into the image that is used to launch the VMs):

      - Linux VMs = cliqruser

      - WindowsVMs = cliqr

      See the Service Lifecycle Action section for the relevant release for additional context.

      Effective CloudCenter 4.1.1, admins can configure the local user on application VMs. The CCO configuration file (/usr/local/osmosix/etc/gateway_config.properties) has an optional property called agent.username to specify the local user. If no user name is specified then cliqruser is the default user.

    actionValue
    • Description: Identifies the value that you provide for the selected actionType.

    • Type: String

actions (click for additional details)




© 2017-2019 Cisco Systems, Inc. All rights reserved