Create Cloud Region

Details

API Details
Name

Create Cloud Region

Description
MethodPOST
URIv1/tenants/tenantId/clouds/cloudId/regions
CloudCenter 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.
Notes
ESB Headeraction: create.tenants.tenantId.clouds.cloudId/.regions

Example

curl -k -X POST -H "Accept: application/json" -H "Content-Type: application/json" -u cliqradmin:40E45DBE57E35ECB "https://<HOST>:<PORT>/v1/tenants/1/clouds/9/regions"

Request Body

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.

{ 
   "cloudId":9,
   "importRegion":{ 
      "name":"us-west",
      "displayName":"US West (California)"
   },
   "enabled":true,
}

 

Response

{
    "resource": "https://<host>:<port>/v1/tenants/1/clouds/9/regions",
    "size": 1,
    "pageNumber": 0,
    "totalElements": 1,
    "totalPages": 1,
    "cloudRegions": [{
        "id": "6",
        "resource": null,
        "perms": [],
        "cloudId": "9",
        "displayName": "US West (California)",
        "regionName": "MyAzure-us-west",
        "description": "Microsoft Azure",
        "importRegion": null,
        "gateway": {
            "address": null,
            "dnsName": null,
            "status": null,
            "cloudId": null,
            "cloudAccountId": null
        },
        "storage": null,
        "enabled": true,
        "activated": false,
		"publicCloud": true,
        "numUsers": 0,
        "status": "STOPPED",
        "statusDetail": "GATEWAY_NOT_ACTIVATED",
        "regionProperties": [{
            "name": "AzureLinuxCustomScriptExtensionVersion",
            "value": "1.2"
        }, {
            "name": "AzureBlobPath",
            "value": "blob.core.windows.net/vhd-store/"
        }, {
            "name": "AzureStorageAccount",
            "value": "cliqrwest"
        }, {
            "name": "AzureWindowsCustomScriptExtensionVersion",
            "value": "1.3"
        }, {
            "name": "AzureCloudDomain",
            "value": ".cloudapp.net"
        }, {
            "name": "AzureMetadataServer",
            "value": "mds.cliqrtech.com"
        }, {
            "name": "AzureNetwork",
            "value": "cliqr-west1"
        }, {
            "name": "AzureAffinityGroup",
            "value": "432eeb32-8930-469f-ba60-bc2dc7759325"
        }, {
            "name": "AzureCloudEndpoint",
            "value": "https://management.core.windows.net"
        }]
    }],
    "externalActions": [],
    "externalBundleLocation": null
}

 

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 Add Sub-Tenants > Tenant ID and Tenant Name Dependency.

  • Type: String

Required

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

  • Type: String

Required

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
enabled
  • Description: Indicates that this resource has been enabled.

    • true = resource has been enabled
    • false = resource has not been enabled (default)
  • Type: Boolean

Response Attributes

resource
  • Description: Unique URL to access this resource.
  • Type: String
See pageResource or Pagination for additional context
cloudRegions
  • Description: Identifies details about each cloud region
  • Type: Array of cloudRegion

    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 Public Clouds.
    • 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.

      • true = resource has been enabled
      • false = resource has not been enabled (default)
    • 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
    • Description: Inticates 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
    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
    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

      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.
      • 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

         
        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).
        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

        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 Parameters and Macros for additional context.
    • Type: String